@slopus/rig 0.0.4 → 0.0.6

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 (374) hide show
  1. package/README.md +144 -1
  2. package/dist/agent/Agent.d.ts +16 -0
  3. package/dist/agent/Agent.d.ts.map +1 -1
  4. package/dist/agent/Agent.js +106 -0
  5. package/dist/agent/compaction/compactConversation.d.ts +22 -0
  6. package/dist/agent/compaction/compactConversation.d.ts.map +1 -0
  7. package/dist/agent/compaction/compactConversation.js +77 -0
  8. package/dist/agent/compaction/estimateMessagesTokens.d.ts +3 -0
  9. package/dist/agent/compaction/estimateMessagesTokens.d.ts.map +1 -0
  10. package/dist/agent/compaction/estimateMessagesTokens.js +39 -0
  11. package/dist/agent/compaction/formatMessagesForCompaction.d.ts +3 -0
  12. package/dist/agent/compaction/formatMessagesForCompaction.d.ts.map +1 -0
  13. package/dist/agent/compaction/formatMessagesForCompaction.js +30 -0
  14. package/dist/agent/compaction/requestCompactionSummary.d.ts +11 -0
  15. package/dist/agent/compaction/requestCompactionSummary.d.ts.map +1 -0
  16. package/dist/agent/compaction/requestCompactionSummary.js +43 -0
  17. package/dist/agent/context/AgentContext.d.ts +8 -0
  18. package/dist/agent/context/AgentContext.d.ts.map +1 -1
  19. package/dist/agent/context/BashContext.d.ts +23 -0
  20. package/dist/agent/context/BashContext.d.ts.map +1 -1
  21. package/dist/agent/context/GoalContext.d.ts +7 -0
  22. package/dist/agent/context/GoalContext.d.ts.map +1 -0
  23. package/dist/agent/context/GoalContext.js +1 -0
  24. package/dist/agent/context/SubagentContext.d.ts +20 -1
  25. package/dist/agent/context/SubagentContext.d.ts.map +1 -1
  26. package/dist/agent/context/TaskContext.d.ts +8 -0
  27. package/dist/agent/context/TaskContext.d.ts.map +1 -0
  28. package/dist/agent/context/TaskContext.js +1 -0
  29. package/dist/agent/context/UserInputContext.d.ts +7 -0
  30. package/dist/agent/context/UserInputContext.d.ts.map +1 -0
  31. package/dist/agent/context/UserInputContext.js +1 -0
  32. package/dist/agent/context/assertCanWritePath.d.ts +3 -0
  33. package/dist/agent/context/assertCanWritePath.d.ts.map +1 -0
  34. package/dist/agent/context/assertCanWritePath.js +11 -0
  35. package/dist/agent/context/createJustBashBashContext.d.ts.map +1 -1
  36. package/dist/agent/context/createJustBashBashContext.js +127 -0
  37. package/dist/agent/context/createNodeAgentContext.d.ts +8 -0
  38. package/dist/agent/context/createNodeAgentContext.d.ts.map +1 -1
  39. package/dist/agent/context/createNodeAgentContext.js +15 -2
  40. package/dist/agent/context/createNodeBashContext.d.ts +2 -0
  41. package/dist/agent/context/createNodeBashContext.d.ts.map +1 -1
  42. package/dist/agent/context/createNodeBashContext.js +123 -4
  43. package/dist/agent/context/createNodeFileSystemContext.d.ts +2 -0
  44. package/dist/agent/context/createNodeFileSystemContext.d.ts.map +1 -1
  45. package/dist/agent/context/createNodeFileSystemContext.js +18 -8
  46. package/dist/agent/context/createSandboxedCommand.d.ts +7 -0
  47. package/dist/agent/context/createSandboxedCommand.d.ts.map +1 -0
  48. package/dist/agent/context/createSandboxedCommand.js +47 -0
  49. package/dist/agent/context/findGitWritablePaths.d.ts +2 -0
  50. package/dist/agent/context/findGitWritablePaths.d.ts.map +1 -0
  51. package/dist/agent/context/findGitWritablePaths.js +54 -0
  52. package/dist/agent/context/isPathInsideWorkspace.d.ts +2 -0
  53. package/dist/agent/context/isPathInsideWorkspace.d.ts.map +1 -0
  54. package/dist/agent/context/isPathInsideWorkspace.js +14 -0
  55. package/dist/agent/context/resolvePotentialPath.d.ts +2 -0
  56. package/dist/agent/context/resolvePotentialPath.d.ts.map +1 -0
  57. package/dist/agent/context/resolvePotentialPath.js +32 -0
  58. package/dist/agent/createPermissionInstructions.d.ts +3 -0
  59. package/dist/agent/createPermissionInstructions.d.ts.map +1 -0
  60. package/dist/agent/createPermissionInstructions.js +12 -0
  61. package/dist/agent/createSubagentInstructions.js +1 -1
  62. package/dist/agent/createSystemPrompt.d.ts.map +1 -1
  63. package/dist/agent/createSystemPrompt.js +4 -0
  64. package/dist/agent/index.d.ts +7 -3
  65. package/dist/agent/index.d.ts.map +1 -1
  66. package/dist/agent/loop.d.ts +16 -2
  67. package/dist/agent/loop.d.ts.map +1 -1
  68. package/dist/agent/loop.js +115 -15
  69. package/dist/agent/printAgentMessageToConsole.d.ts +1 -0
  70. package/dist/agent/printAgentMessageToConsole.d.ts.map +1 -1
  71. package/dist/agent/types.d.ts +1 -0
  72. package/dist/agent/types.d.ts.map +1 -1
  73. package/dist/app/CodingAssistantAgentBackend.d.ts +11 -1
  74. package/dist/app/CodingAssistantAgentBackend.d.ts.map +1 -1
  75. package/dist/app/CodingAssistantApp.d.ts +7 -1
  76. package/dist/app/CodingAssistantApp.d.ts.map +1 -1
  77. package/dist/app/CodingAssistantApp.js +678 -45
  78. package/dist/app/ScrollbackPreservingTerminal.d.ts +5 -0
  79. package/dist/app/ScrollbackPreservingTerminal.d.ts.map +1 -0
  80. package/dist/app/ScrollbackPreservingTerminal.js +7 -0
  81. package/dist/app/StartupStatusApp.js +1 -1
  82. package/dist/app/createCodingAssistantAgent.d.ts +6 -1
  83. package/dist/app/createCodingAssistantAgent.d.ts.map +1 -1
  84. package/dist/app/createCodingAssistantAgent.js +22 -5
  85. package/dist/app/createSlashCommands.d.ts.map +1 -1
  86. package/dist/app/createSlashCommands.js +42 -0
  87. package/dist/app/highlightAgentCode.d.ts.map +1 -1
  88. package/dist/app/highlightAgentCode.js +10 -7
  89. package/dist/app/humanizeGoalStatus.d.ts +3 -0
  90. package/dist/app/humanizeGoalStatus.d.ts.map +1 -0
  91. package/dist/app/humanizeGoalStatus.js +9 -0
  92. package/dist/app/humanizePermissionMode.d.ts +3 -0
  93. package/dist/app/humanizePermissionMode.d.ts.map +1 -0
  94. package/dist/app/humanizePermissionMode.js +9 -0
  95. package/dist/app/humanizeToolName.d.ts +2 -0
  96. package/dist/app/humanizeToolName.d.ts.map +1 -0
  97. package/dist/app/humanizeToolName.js +40 -0
  98. package/dist/app/main.d.ts.map +1 -1
  99. package/dist/app/main.js +4 -0
  100. package/dist/app/renderAgentMarkdown.d.ts.map +1 -1
  101. package/dist/app/renderAgentMarkdown.js +2 -1
  102. package/dist/app/runApp.d.ts +2 -0
  103. package/dist/app/runApp.d.ts.map +1 -1
  104. package/dist/app/runApp.js +48 -3
  105. package/dist/app/sanitizeTerminalText.d.ts +2 -0
  106. package/dist/app/sanitizeTerminalText.d.ts.map +1 -0
  107. package/dist/app/sanitizeTerminalText.js +55 -0
  108. package/dist/app/upsertSubagentSummary.d.ts +3 -0
  109. package/dist/app/upsertSubagentSummary.d.ts.map +1 -0
  110. package/dist/app/upsertSubagentSummary.js +6 -0
  111. package/dist/client/ProtocolHttpClient.d.ts +12 -1
  112. package/dist/client/ProtocolHttpClient.d.ts.map +1 -1
  113. package/dist/client/ProtocolHttpClient.js +21 -0
  114. package/dist/client/RemoteAgent.d.ts +11 -1
  115. package/dist/client/RemoteAgent.d.ts.map +1 -1
  116. package/dist/client/RemoteAgent.js +91 -1
  117. package/dist/config/createConfigFile.d.ts.map +1 -1
  118. package/dist/config/createConfigFile.js +5 -0
  119. package/dist/config/defaultConfig.d.ts.map +1 -1
  120. package/dist/config/defaultConfig.js +2 -0
  121. package/dist/config/mergeConfigValues.d.ts.map +1 -1
  122. package/dist/config/mergeConfigValues.js +8 -1
  123. package/dist/config/parseConfigToml.d.ts.map +1 -1
  124. package/dist/config/parseConfigToml.js +88 -0
  125. package/dist/config/serializeMcpServers.d.ts +3 -0
  126. package/dist/config/serializeMcpServers.d.ts.map +1 -0
  127. package/dist/config/serializeMcpServers.js +34 -0
  128. package/dist/config/types.d.ts +6 -0
  129. package/dist/config/types.d.ts.map +1 -1
  130. package/dist/config/writeRuntimeConfig.d.ts.map +1 -1
  131. package/dist/config/writeRuntimeConfig.js +3 -0
  132. package/dist/goals/SessionGoal.d.ts +14 -0
  133. package/dist/goals/SessionGoal.d.ts.map +1 -0
  134. package/dist/goals/SessionGoal.js +1 -0
  135. package/dist/goals/createGoalContinuationPrompt.d.ts +3 -0
  136. package/dist/goals/createGoalContinuationPrompt.d.ts.map +1 -0
  137. package/dist/goals/createGoalContinuationPrompt.js +17 -0
  138. package/dist/goals/index.d.ts +5 -0
  139. package/dist/goals/index.d.ts.map +1 -0
  140. package/dist/goals/index.js +3 -0
  141. package/dist/goals/isGoalStatus.d.ts +3 -0
  142. package/dist/goals/isGoalStatus.d.ts.map +1 -0
  143. package/dist/goals/isGoalStatus.js +3 -0
  144. package/dist/goals/normalizeGoalObjective.d.ts +3 -0
  145. package/dist/goals/normalizeGoalObjective.d.ts.map +1 -0
  146. package/dist/goals/normalizeGoalObjective.js +11 -0
  147. package/dist/mcp/McpClientManager.d.ts +12 -0
  148. package/dist/mcp/McpClientManager.d.ts.map +1 -0
  149. package/dist/mcp/McpClientManager.js +123 -0
  150. package/dist/mcp/connectMcpServer.d.ts +8 -0
  151. package/dist/mcp/connectMcpServer.d.ts.map +1 -0
  152. package/dist/mcp/connectMcpServer.js +47 -0
  153. package/dist/mcp/createMcpTool.d.ts +11 -0
  154. package/dist/mcp/createMcpTool.d.ts.map +1 -0
  155. package/dist/mcp/createMcpTool.js +43 -0
  156. package/dist/mcp/index.d.ts +5 -0
  157. package/dist/mcp/index.d.ts.map +1 -0
  158. package/dist/mcp/index.js +3 -0
  159. package/dist/mcp/loadMcpServerConfigs.d.ts +4 -0
  160. package/dist/mcp/loadMcpServerConfigs.d.ts.map +1 -0
  161. package/dist/mcp/loadMcpServerConfigs.js +122 -0
  162. package/dist/mcp/mcpResultToContentBlocks.d.ts +3 -0
  163. package/dist/mcp/mcpResultToContentBlocks.d.ts.map +1 -0
  164. package/dist/mcp/mcpResultToContentBlocks.js +51 -0
  165. package/dist/mcp/mergeMcpTools.d.ts +7 -0
  166. package/dist/mcp/mergeMcpTools.d.ts.map +1 -0
  167. package/dist/mcp/mergeMcpTools.js +34 -0
  168. package/dist/mcp/normalizeMcpName.d.ts +2 -0
  169. package/dist/mcp/normalizeMcpName.d.ts.map +1 -0
  170. package/dist/mcp/normalizeMcpName.js +3 -0
  171. package/dist/mcp/types.d.ts +37 -0
  172. package/dist/mcp/types.d.ts.map +1 -0
  173. package/dist/mcp/types.js +1 -0
  174. package/dist/permissions/PermissionContext.d.ts +7 -0
  175. package/dist/permissions/PermissionContext.d.ts.map +1 -0
  176. package/dist/permissions/PermissionContext.js +1 -0
  177. package/dist/permissions/PermissionMode.d.ts +3 -0
  178. package/dist/permissions/PermissionMode.d.ts.map +1 -0
  179. package/dist/permissions/PermissionMode.js +1 -0
  180. package/dist/permissions/createPermissionContext.d.ts +4 -0
  181. package/dist/permissions/createPermissionContext.d.ts.map +1 -0
  182. package/dist/permissions/createPermissionContext.js +16 -0
  183. package/dist/permissions/index.d.ts +13 -0
  184. package/dist/permissions/index.d.ts.map +1 -0
  185. package/dist/permissions/index.js +9 -0
  186. package/dist/permissions/isPermissionMode.d.ts +3 -0
  187. package/dist/permissions/isPermissionMode.d.ts.map +1 -0
  188. package/dist/permissions/isPermissionMode.js +6 -0
  189. package/dist/permissions/parseAutoPermissionReview.d.ts +7 -0
  190. package/dist/permissions/parseAutoPermissionReview.d.ts.map +1 -0
  191. package/dist/permissions/parseAutoPermissionReview.js +33 -0
  192. package/dist/permissions/parsePermissionMode.d.ts +3 -0
  193. package/dist/permissions/parsePermissionMode.d.ts.map +1 -0
  194. package/dist/permissions/parsePermissionMode.js +6 -0
  195. package/dist/permissions/requestAutoPermissionApproval.d.ts +9 -0
  196. package/dist/permissions/requestAutoPermissionApproval.d.ts.map +1 -0
  197. package/dist/permissions/requestAutoPermissionApproval.js +26 -0
  198. package/dist/permissions/reviewAutoPermission.d.ts +13 -0
  199. package/dist/permissions/reviewAutoPermission.d.ts.map +1 -0
  200. package/dist/permissions/reviewAutoPermission.js +70 -0
  201. package/dist/permissions/shouldElevateToolInAutoMode.d.ts +2 -0
  202. package/dist/permissions/shouldElevateToolInAutoMode.d.ts.map +1 -0
  203. package/dist/permissions/shouldElevateToolInAutoMode.js +37 -0
  204. package/dist/permissions/shouldReviewToolInAutoMode.d.ts +2 -0
  205. package/dist/permissions/shouldReviewToolInAutoMode.d.ts.map +1 -0
  206. package/dist/permissions/shouldReviewToolInAutoMode.js +85 -0
  207. package/dist/permissions/summarizePermissionAction.d.ts +2 -0
  208. package/dist/permissions/summarizePermissionAction.d.ts.map +1 -0
  209. package/dist/permissions/summarizePermissionAction.js +29 -0
  210. package/dist/protocol/SessionProtocol.d.ts +49 -2
  211. package/dist/protocol/SessionProtocol.d.ts.map +1 -1
  212. package/dist/protocol/index.d.ts +4 -1
  213. package/dist/protocol/index.d.ts.map +1 -1
  214. package/dist/providers/claude-sdk.d.ts.map +1 -1
  215. package/dist/providers/claude-sdk.js +7 -6
  216. package/dist/providers/models.d.ts +12 -12
  217. package/dist/providers/models.d.ts.map +1 -1
  218. package/dist/providers/models.js +18 -0
  219. package/dist/providers/types.d.ts +3 -0
  220. package/dist/providers/types.d.ts.map +1 -1
  221. package/dist/review/createCodeReviewPrompt.d.ts +2 -0
  222. package/dist/review/createCodeReviewPrompt.d.ts.map +1 -0
  223. package/dist/review/createCodeReviewPrompt.js +11 -0
  224. package/dist/review/index.d.ts +2 -0
  225. package/dist/review/index.d.ts.map +1 -0
  226. package/dist/review/index.js +1 -0
  227. package/dist/server/AgentSessionManager.d.ts +10 -1
  228. package/dist/server/AgentSessionManager.d.ts.map +1 -1
  229. package/dist/server/AgentSessionManager.js +203 -12
  230. package/dist/server/InMemorySession.d.ts +34 -1
  231. package/dist/server/InMemorySession.d.ts.map +1 -1
  232. package/dist/server/InMemorySession.js +558 -10
  233. package/dist/server/InMemorySessionStore.d.ts +2 -0
  234. package/dist/server/InMemorySessionStore.d.ts.map +1 -1
  235. package/dist/server/InMemorySessionStore.js +7 -0
  236. package/dist/server/PersistentSessionStore.d.ts +2 -0
  237. package/dist/server/PersistentSessionStore.d.ts.map +1 -1
  238. package/dist/server/PersistentSessionStore.js +80 -5
  239. package/dist/server/createGoalTitle.d.ts +2 -0
  240. package/dist/server/createGoalTitle.d.ts.map +1 -0
  241. package/dist/server/createGoalTitle.js +4 -0
  242. package/dist/server/createProtocolHttpServer.d.ts.map +1 -1
  243. package/dist/server/createProtocolHttpServer.js +119 -2
  244. package/dist/server/runLocalProtocolServer.d.ts.map +1 -1
  245. package/dist/server/runLocalProtocolServer.js +18 -2
  246. package/dist/tasks/index.d.ts +2 -0
  247. package/dist/tasks/index.d.ts.map +1 -0
  248. package/dist/tasks/index.js +1 -0
  249. package/dist/tasks/types.d.ts +39 -0
  250. package/dist/tasks/types.d.ts.map +1 -0
  251. package/dist/tasks/types.js +1 -0
  252. package/dist/tools/Agent.d.ts +13 -3
  253. package/dist/tools/Agent.d.ts.map +1 -1
  254. package/dist/tools/Agent.js +40 -12
  255. package/dist/tools/claude/AskUserQuestion.d.ts +23 -0
  256. package/dist/tools/claude/AskUserQuestion.d.ts.map +1 -0
  257. package/dist/tools/claude/AskUserQuestion.js +52 -0
  258. package/dist/tools/claude/Bash.d.ts +2 -0
  259. package/dist/tools/claude/Bash.d.ts.map +1 -1
  260. package/dist/tools/claude/Bash.js +20 -2
  261. package/dist/tools/claude/SendMessage.d.ts +10 -0
  262. package/dist/tools/claude/SendMessage.d.ts.map +1 -0
  263. package/dist/tools/claude/SendMessage.js +33 -0
  264. package/dist/tools/claude/TaskCreate.d.ts +12 -0
  265. package/dist/tools/claude/TaskCreate.d.ts.map +1 -0
  266. package/dist/tools/claude/TaskCreate.js +34 -0
  267. package/dist/tools/claude/TaskGet.d.ts +16 -0
  268. package/dist/tools/claude/TaskGet.d.ts.map +1 -0
  269. package/dist/tools/claude/TaskGet.js +44 -0
  270. package/dist/tools/claude/TaskList.d.ts +10 -0
  271. package/dist/tools/claude/TaskList.d.ts.map +1 -0
  272. package/dist/tools/claude/TaskList.js +51 -0
  273. package/dist/tools/claude/TaskOutput.d.ts +17 -0
  274. package/dist/tools/claude/TaskOutput.d.ts.map +1 -0
  275. package/dist/tools/claude/TaskOutput.js +74 -0
  276. package/dist/tools/claude/TaskStop.d.ts +10 -0
  277. package/dist/tools/claude/TaskStop.d.ts.map +1 -0
  278. package/dist/tools/claude/TaskStop.js +42 -0
  279. package/dist/tools/claude/TaskUpdate.d.ts +21 -0
  280. package/dist/tools/claude/TaskUpdate.d.ts.map +1 -0
  281. package/dist/tools/claude/TaskUpdate.js +55 -0
  282. package/dist/tools/claude/index.d.ts +111 -5
  283. package/dist/tools/claude/index.d.ts.map +1 -1
  284. package/dist/tools/claude/index.js +24 -2
  285. package/dist/tools/claude/parseBackgroundTaskId.d.ts +2 -0
  286. package/dist/tools/claude/parseBackgroundTaskId.d.ts.map +1 -0
  287. package/dist/tools/claude/parseBackgroundTaskId.js +7 -0
  288. package/dist/tools/claude/taskSchemas.d.ts +14 -0
  289. package/dist/tools/claude/taskSchemas.d.ts.map +1 -0
  290. package/dist/tools/claude/taskSchemas.js +18 -0
  291. package/dist/tools/codex/exec_command.d.ts +8 -6
  292. package/dist/tools/codex/exec_command.d.ts.map +1 -1
  293. package/dist/tools/codex/exec_command.js +37 -18
  294. package/dist/tools/codex/followup_task.d.ts +11 -0
  295. package/dist/tools/codex/followup_task.d.ts.map +1 -0
  296. package/dist/tools/codex/followup_task.js +18 -0
  297. package/dist/tools/codex/humanizeTaskName.d.ts +2 -0
  298. package/dist/tools/codex/humanizeTaskName.d.ts.map +1 -0
  299. package/dist/tools/codex/humanizeTaskName.js +4 -0
  300. package/dist/tools/codex/index.d.ts +90 -7
  301. package/dist/tools/codex/index.d.ts.map +1 -1
  302. package/dist/tools/codex/index.js +24 -0
  303. package/dist/tools/codex/interrupt_agent.d.ts +10 -0
  304. package/dist/tools/codex/interrupt_agent.d.ts.map +1 -0
  305. package/dist/tools/codex/interrupt_agent.js +17 -0
  306. package/dist/tools/codex/list_agents.d.ts +12 -0
  307. package/dist/tools/codex/list_agents.d.ts.map +1 -0
  308. package/dist/tools/codex/list_agents.js +23 -0
  309. package/dist/tools/codex/request_user_input.d.ts +16 -0
  310. package/dist/tools/codex/request_user_input.d.ts.map +1 -0
  311. package/dist/tools/codex/request_user_input.js +58 -0
  312. package/dist/tools/codex/requireSubagentContext.d.ts +3 -0
  313. package/dist/tools/codex/requireSubagentContext.d.ts.map +1 -0
  314. package/dist/tools/codex/requireSubagentContext.js +6 -0
  315. package/dist/tools/codex/spawn_agent.d.ts +9 -0
  316. package/dist/tools/codex/spawn_agent.d.ts.map +1 -0
  317. package/dist/tools/codex/spawn_agent.js +35 -0
  318. package/dist/tools/codex/subagentSchemas.d.ts +8 -0
  319. package/dist/tools/codex/subagentSchemas.d.ts.map +1 -0
  320. package/dist/tools/codex/subagentSchemas.js +13 -0
  321. package/dist/tools/codex/unifiedExecOutput.d.ts +14 -0
  322. package/dist/tools/codex/unifiedExecOutput.d.ts.map +1 -0
  323. package/dist/tools/codex/unifiedExecOutput.js +44 -0
  324. package/dist/tools/codex/update_plan.d.ts +10 -0
  325. package/dist/tools/codex/update_plan.d.ts.map +1 -0
  326. package/dist/tools/codex/update_plan.js +34 -0
  327. package/dist/tools/codex/wait_agent.d.ts +13 -0
  328. package/dist/tools/codex/wait_agent.d.ts.map +1 -0
  329. package/dist/tools/codex/wait_agent.js +32 -0
  330. package/dist/tools/codex/write_stdin.d.ts +6 -1
  331. package/dist/tools/codex/write_stdin.d.ts.map +1 -1
  332. package/dist/tools/codex/write_stdin.js +44 -12
  333. package/dist/tools/goals/create_goal.d.ts +11 -0
  334. package/dist/tools/goals/create_goal.d.ts.map +1 -0
  335. package/dist/tools/goals/create_goal.js +29 -0
  336. package/dist/tools/goals/get_goal.d.ts +9 -0
  337. package/dist/tools/goals/get_goal.d.ts.map +1 -0
  338. package/dist/tools/goals/get_goal.js +26 -0
  339. package/dist/tools/goals/goalSchemas.d.ts +8 -0
  340. package/dist/tools/goals/goalSchemas.d.ts.map +1 -0
  341. package/dist/tools/goals/goalSchemas.js +13 -0
  342. package/dist/tools/goals/index.d.ts +30 -0
  343. package/dist/tools/goals/index.d.ts.map +1 -0
  344. package/dist/tools/goals/index.js +7 -0
  345. package/dist/tools/goals/update_goal.d.ts +11 -0
  346. package/dist/tools/goals/update_goal.d.ts.map +1 -0
  347. package/dist/tools/goals/update_goal.js +33 -0
  348. package/dist/tools/index.d.ts +1 -0
  349. package/dist/tools/index.d.ts.map +1 -1
  350. package/dist/tools/index.js +1 -0
  351. package/dist/tools/pi/bash.d.ts.map +1 -1
  352. package/dist/tools/pi/bash.js +2 -0
  353. package/dist/tools/utils/readSessionWithProgress.d.ts +9 -0
  354. package/dist/tools/utils/readSessionWithProgress.d.ts.map +1 -0
  355. package/dist/tools/utils/readSessionWithProgress.js +27 -0
  356. package/dist/tools/utils/shell.d.ts +2 -0
  357. package/dist/tools/utils/shell.d.ts.map +1 -1
  358. package/dist/tools/utils/shell.js +37 -0
  359. package/dist/tools/utils/summarizeShellOutput.d.ts.map +1 -1
  360. package/dist/tools/utils/summarizeShellOutput.js +2 -0
  361. package/dist/user-input/index.d.ts +2 -0
  362. package/dist/user-input/index.d.ts.map +1 -0
  363. package/dist/user-input/index.js +1 -0
  364. package/dist/user-input/types.d.ts +19 -0
  365. package/dist/user-input/types.d.ts.map +1 -0
  366. package/dist/user-input/types.js +1 -0
  367. package/dist/web/assets/highlighted-body-OFNGDK62-BuJOCQJD.js +1 -0
  368. package/dist/web/assets/highlighted-body-OFNGDK62-TwhCqUaJ.js +1 -0
  369. package/dist/web/assets/index-B6Bc6sUJ.css +1 -0
  370. package/dist/web/assets/index-BC99-iZC.js +341 -0
  371. package/dist/web/assets/index-BZN9jSiw.js +341 -0
  372. package/dist/web/assets/index-CcF0unjO.css +1 -0
  373. package/dist/web/index.html +2 -2
  374. package/package.json +2 -1
@@ -0,0 +1,341 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-DA-rfuFy.js","assets/html-pp8916En.js","assets/javascript-wDzz0qaB.js","assets/css-CLj8gQPS.js","assets/angular-ts-BrjP3tb8.js","assets/scss-D5BDwBP9.js","assets/apl-CORt7UWP.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/json-Cp-IABpG.js","assets/astro-HNnZUWAn.js","assets/typescript-BPQ3VLAy.js","assets/postcss-CXtECtnM.js","assets/tsx-COt5Ahok.js","assets/blade-2xfisSek.js","assets/html-derivative-DlHx6ybY.js","assets/sql-CRqJ_cUM.js","assets/bsl-BO_Y6i37.js","assets/sdbl-DVxCFoDh.js","assets/cairo-KRGpt6FW.js","assets/python-B6aJPvgy.js","assets/cobol-nBiQ_Alo.js","assets/coffee-Ch7k5sss.js","assets/cpp-UfJy6YNI.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/c-BIGW1oBm.js","assets/crystal-DGywbUpC.js","assets/shellscript-Yzrsuije.js","assets/edge-FbVlp4U3.js","assets/elixir-CkH2-t6x.js","assets/elm-DbKCFpqz.js","assets/erb-Dm6A9KJ5.js","assets/ruby-DyJCeAvU.js","assets/haml-D5jkg6IW.js","assets/graphql-ChdNCCLP.js","assets/jsx-g9-lgVsj.js","assets/lua-BaeVxFsk.js","assets/yaml-Buea-lGh.js","assets/erlang-DsQrWhSR.js","assets/markdown-Cvjx9yec.js","assets/fortran-fixed-form-CkoXwp7k.js","assets/fortran-free-form-BxgE0vQu.js","assets/fsharp-CXgrBDvD.js","assets/gdresource-BOOCDP_w.js","assets/gdshader-DkwncUOv.js","assets/gdscript-C5YyOfLZ.js","assets/git-commit-F4YmCXRG.js","assets/diff-D97Zzqfu.js","assets/git-rebase-r7XF79zn.js","assets/glimmer-js-ByusRIyA.js","assets/glimmer-ts-BfAWNZQY.js","assets/hack-DbPARsA_.js","assets/handlebars-BpdQsYii.js","assets/http-jrhK8wxY.js","assets/hurl-irOxFIW8.js","assets/csv-fuZLfV_i.js","assets/hxml-Bvhsp5Yf.js","assets/haxe-CzTSHFRz.js","assets/jinja-f2NsQr07.js","assets/jison-wvAkD_A8.js","assets/julia-D7OTSIA_.js","assets/r-Dspwwk_N.js","assets/just-CUsbIsdP.js","assets/perl-B9cMNwum.js","assets/latex-CaSxy8MP.js","assets/tex-idrVyKtj.js","assets/liquid-C0sCDyMI.js","assets/marko-DjSrsDqO.js","assets/less-B1dDrJ26.js","assets/mdc-DTYItulj.js","assets/nextflow-C-mBbutL.js","assets/nextflow-groovy-vE_lwT2v.js","assets/nginx-BpAMiNFr.js","assets/nim-BIad80T-.js","assets/php-Csjmro_R.js","assets/pug-DKIMFp6K.js","assets/qml-3beO22l8.js","assets/razor-BjBPvh-w.js","assets/csharp-DSvCPggb.js","assets/rst-CpCqk9r5.js","assets/cmake-D1j8_8rp.js","assets/sas-DEy46yEz.js","assets/shaderlab-Dg9Lc6iA.js","assets/hlsl-D3lLCCz7.js","assets/shellsession-BADoaaVG.js","assets/soy-8wufbnw4.js","assets/sparql-rVzFXLq3.js","assets/turtle-BsS91CYL.js","assets/stata-DI20mbqo.js","assets/surrealql-Bq5Q-fJD.js","assets/svelte-Cy7k_4gC.js","assets/templ-DhtptRzy.js","assets/go-C27-OAKa.js","assets/ts-tags-D351s5mN.js","assets/twig-CW1WmMYd.js","assets/vue-D2xRrEX4.js","assets/vue-html-AaS7Mt5G.js","assets/vue-vine-BoDAl6tE.js","assets/stylus-BEDo0Tqx.js","assets/xsl-CtQFsRM5.js"])))=>i.map(i=>d[i]);
2
+ function KO(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();function mg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ip={exports:{}},El={};var J_;function ZO(){if(J_)return El;J_=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,o){var l=null;if(o!==void 0&&(l=""+o),i.key!==void 0&&(l=""+i.key),"key"in i){o={};for(var c in i)c!=="key"&&(o[c]=i[c])}else o=i;return i=o.ref,{$$typeof:e,type:r,key:l,ref:i!==void 0?i:null,props:o}}return El.Fragment=t,El.jsx=n,El.jsxs=n,El}var ex;function JO(){return ex||(ex=1,ip.exports=ZO()),ip.exports}var b=JO(),sp={exports:{}},Me={};var tx;function eL(){if(tx)return Me;tx=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),_=Symbol.iterator;function E(F){return F===null||typeof F!="object"?null:(F=_&&F[_]||F["@@iterator"],typeof F=="function"?F:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,A={};function C(F,te,P){this.props=F,this.context=te,this.refs=A,this.updater=P||T}C.prototype.isReactComponent={},C.prototype.setState=function(F,te){if(typeof F!="object"&&typeof F!="function"&&F!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,F,te,"setState")},C.prototype.forceUpdate=function(F){this.updater.enqueueForceUpdate(this,F,"forceUpdate")};function k(){}k.prototype=C.prototype;function N(F,te,P){this.props=F,this.context=te,this.refs=A,this.updater=P||T}var M=N.prototype=new k;M.constructor=N,S(M,C.prototype),M.isPureReactComponent=!0;var B=Array.isArray;function D(){}var z={H:null,A:null,T:null,S:null},G=Object.prototype.hasOwnProperty;function ie(F,te,P){var ge=P.ref;return{$$typeof:e,type:F,key:te,ref:ge!==void 0?ge:null,props:P}}function V(F,te){return ie(F.type,te,F.props)}function X(F){return typeof F=="object"&&F!==null&&F.$$typeof===e}function J(F){var te={"=":"=0",":":"=2"};return"$"+F.replace(/[=:]/g,function(P){return te[P]})}var he=/\/+/g;function ue(F,te){return typeof F=="object"&&F!==null&&F.key!=null?J(""+F.key):te.toString(36)}function re(F){switch(F.status){case"fulfilled":return F.value;case"rejected":throw F.reason;default:switch(typeof F.status=="string"?F.then(D,D):(F.status="pending",F.then(function(te){F.status==="pending"&&(F.status="fulfilled",F.value=te)},function(te){F.status==="pending"&&(F.status="rejected",F.reason=te)})),F.status){case"fulfilled":return F.value;case"rejected":throw F.reason}}throw F}function U(F,te,P,ge,Ee){var ye=typeof F;(ye==="undefined"||ye==="boolean")&&(F=null);var be=!1;if(F===null)be=!0;else switch(ye){case"bigint":case"string":case"number":be=!0;break;case"object":switch(F.$$typeof){case e:case t:be=!0;break;case p:return be=F._init,U(be(F._payload),te,P,ge,Ee)}}if(be)return Ee=Ee(F),be=ge===""?"."+ue(F,0):ge,B(Ee)?(P="",be!=null&&(P=be.replace(he,"$&/")+"/"),U(Ee,te,P,"",function(De){return De})):Ee!=null&&(X(Ee)&&(Ee=V(Ee,P+(Ee.key==null||F&&F.key===Ee.key?"":(""+Ee.key).replace(he,"$&/")+"/")+be)),te.push(Ee)),1;be=0;var ke=ge===""?".":ge+":";if(B(F))for(var Te=0;Te<F.length;Te++)ge=F[Te],ye=ke+ue(ge,Te),be+=U(ge,te,P,ye,Ee);else if(Te=E(F),typeof Te=="function")for(F=Te.call(F),Te=0;!(ge=F.next()).done;)ge=ge.value,ye=ke+ue(ge,Te++),be+=U(ge,te,P,ye,Ee);else if(ye==="object"){if(typeof F.then=="function")return U(re(F),te,P,ge,Ee);throw te=String(F),Error("Objects are not valid as a React child (found: "+(te==="[object Object]"?"object with keys {"+Object.keys(F).join(", ")+"}":te)+"). If you meant to render a collection of children, use an array instead.")}return be}function ee(F,te,P){if(F==null)return F;var ge=[],Ee=0;return U(F,ge,"","",function(ye){return te.call(P,ye,Ee++)}),ge}function ce(F){if(F._status===-1){var te=F._result;te=te(),te.then(function(P){(F._status===0||F._status===-1)&&(F._status=1,F._result=P)},function(P){(F._status===0||F._status===-1)&&(F._status=2,F._result=P)}),F._status===-1&&(F._status=0,F._result=te)}if(F._status===1)return F._result.default;throw F._result}var xe=typeof reportError=="function"?reportError:function(F){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var te=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof F=="object"&&F!==null&&typeof F.message=="string"?String(F.message):String(F),error:F});if(!window.dispatchEvent(te))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",F);return}console.error(F)},O={map:ee,forEach:function(F,te,P){ee(F,function(){te.apply(this,arguments)},P)},count:function(F){var te=0;return ee(F,function(){te++}),te},toArray:function(F){return ee(F,function(te){return te})||[]},only:function(F){if(!X(F))throw Error("React.Children.only expected to receive a single React element child.");return F}};return Me.Activity=m,Me.Children=O,Me.Component=C,Me.Fragment=n,Me.Profiler=i,Me.PureComponent=N,Me.StrictMode=r,Me.Suspense=d,Me.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=z,Me.__COMPILER_RUNTIME={__proto__:null,c:function(F){return z.H.useMemoCache(F)}},Me.cache=function(F){return function(){return F.apply(null,arguments)}},Me.cacheSignal=function(){return null},Me.cloneElement=function(F,te,P){if(F==null)throw Error("The argument must be a React element, but you passed "+F+".");var ge=S({},F.props),Ee=F.key;if(te!=null)for(ye in te.key!==void 0&&(Ee=""+te.key),te)!G.call(te,ye)||ye==="key"||ye==="__self"||ye==="__source"||ye==="ref"&&te.ref===void 0||(ge[ye]=te[ye]);var ye=arguments.length-2;if(ye===1)ge.children=P;else if(1<ye){for(var be=Array(ye),ke=0;ke<ye;ke++)be[ke]=arguments[ke+2];ge.children=be}return ie(F.type,Ee,ge)},Me.createContext=function(F){return F={$$typeof:l,_currentValue:F,_currentValue2:F,_threadCount:0,Provider:null,Consumer:null},F.Provider=F,F.Consumer={$$typeof:o,_context:F},F},Me.createElement=function(F,te,P){var ge,Ee={},ye=null;if(te!=null)for(ge in te.key!==void 0&&(ye=""+te.key),te)G.call(te,ge)&&ge!=="key"&&ge!=="__self"&&ge!=="__source"&&(Ee[ge]=te[ge]);var be=arguments.length-2;if(be===1)Ee.children=P;else if(1<be){for(var ke=Array(be),Te=0;Te<be;Te++)ke[Te]=arguments[Te+2];Ee.children=ke}if(F&&F.defaultProps)for(ge in be=F.defaultProps,be)Ee[ge]===void 0&&(Ee[ge]=be[ge]);return ie(F,ye,Ee)},Me.createRef=function(){return{current:null}},Me.forwardRef=function(F){return{$$typeof:c,render:F}},Me.isValidElement=X,Me.lazy=function(F){return{$$typeof:p,_payload:{_status:-1,_result:F},_init:ce}},Me.memo=function(F,te){return{$$typeof:h,type:F,compare:te===void 0?null:te}},Me.startTransition=function(F){var te=z.T,P={};z.T=P;try{var ge=F(),Ee=z.S;Ee!==null&&Ee(P,ge),typeof ge=="object"&&ge!==null&&typeof ge.then=="function"&&ge.then(D,xe)}catch(ye){xe(ye)}finally{te!==null&&P.types!==null&&(te.types=P.types),z.T=te}},Me.unstable_useCacheRefresh=function(){return z.H.useCacheRefresh()},Me.use=function(F){return z.H.use(F)},Me.useActionState=function(F,te,P){return z.H.useActionState(F,te,P)},Me.useCallback=function(F,te){return z.H.useCallback(F,te)},Me.useContext=function(F){return z.H.useContext(F)},Me.useDebugValue=function(){},Me.useDeferredValue=function(F,te){return z.H.useDeferredValue(F,te)},Me.useEffect=function(F,te){return z.H.useEffect(F,te)},Me.useEffectEvent=function(F){return z.H.useEffectEvent(F)},Me.useId=function(){return z.H.useId()},Me.useImperativeHandle=function(F,te,P){return z.H.useImperativeHandle(F,te,P)},Me.useInsertionEffect=function(F,te){return z.H.useInsertionEffect(F,te)},Me.useLayoutEffect=function(F,te){return z.H.useLayoutEffect(F,te)},Me.useMemo=function(F,te){return z.H.useMemo(F,te)},Me.useOptimistic=function(F,te){return z.H.useOptimistic(F,te)},Me.useReducer=function(F,te,P){return z.H.useReducer(F,te,P)},Me.useRef=function(F){return z.H.useRef(F)},Me.useState=function(F){return z.H.useState(F)},Me.useSyncExternalStore=function(F,te,P){return z.H.useSyncExternalStore(F,te,P)},Me.useTransition=function(){return z.H.useTransition()},Me.version="19.2.7",Me}var nx;function pg(){return nx||(nx=1,sp.exports=eL()),sp.exports}var v=pg();const tL=mg(v),uu=KO({__proto__:null,default:tL},[v]);var op={exports:{}},yl={},lp={exports:{}},up={};var rx;function nL(){return rx||(rx=1,(function(e){function t(U,ee){var ce=U.length;U.push(ee);e:for(;0<ce;){var xe=ce-1>>>1,O=U[xe];if(0<i(O,ee))U[xe]=ee,U[ce]=O,ce=xe;else break e}}function n(U){return U.length===0?null:U[0]}function r(U){if(U.length===0)return null;var ee=U[0],ce=U.pop();if(ce!==ee){U[0]=ce;e:for(var xe=0,O=U.length,F=O>>>1;xe<F;){var te=2*(xe+1)-1,P=U[te],ge=te+1,Ee=U[ge];if(0>i(P,ce))ge<O&&0>i(Ee,P)?(U[xe]=Ee,U[ge]=ce,xe=ge):(U[xe]=P,U[te]=ce,xe=te);else if(ge<O&&0>i(Ee,ce))U[xe]=Ee,U[ge]=ce,xe=ge;else break e}}return ee}function i(U,ee){var ce=U.sortIndex-ee.sortIndex;return ce!==0?ce:U.id-ee.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var d=[],h=[],p=1,m=null,_=3,E=!1,T=!1,S=!1,A=!1,C=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate<"u"?setImmediate:null;function M(U){for(var ee=n(h);ee!==null;){if(ee.callback===null)r(h);else if(ee.startTime<=U)r(h),ee.sortIndex=ee.expirationTime,t(d,ee);else break;ee=n(h)}}function B(U){if(S=!1,M(U),!T)if(n(d)!==null)T=!0,D||(D=!0,J());else{var ee=n(h);ee!==null&&re(B,ee.startTime-U)}}var D=!1,z=-1,G=5,ie=-1;function V(){return A?!0:!(e.unstable_now()-ie<G)}function X(){if(A=!1,D){var U=e.unstable_now();ie=U;var ee=!0;try{e:{T=!1,S&&(S=!1,k(z),z=-1),E=!0;var ce=_;try{t:{for(M(U),m=n(d);m!==null&&!(m.expirationTime>U&&V());){var xe=m.callback;if(typeof xe=="function"){m.callback=null,_=m.priorityLevel;var O=xe(m.expirationTime<=U);if(U=e.unstable_now(),typeof O=="function"){m.callback=O,M(U),ee=!0;break t}m===n(d)&&r(d),M(U)}else r(d);m=n(d)}if(m!==null)ee=!0;else{var F=n(h);F!==null&&re(B,F.startTime-U),ee=!1}}break e}finally{m=null,_=ce,E=!1}ee=void 0}}finally{ee?J():D=!1}}}var J;if(typeof N=="function")J=function(){N(X)};else if(typeof MessageChannel<"u"){var he=new MessageChannel,ue=he.port2;he.port1.onmessage=X,J=function(){ue.postMessage(null)}}else J=function(){C(X,0)};function re(U,ee){z=C(function(){U(e.unstable_now())},ee)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(U){U.callback=null},e.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):G=0<U?Math.floor(1e3/U):5},e.unstable_getCurrentPriorityLevel=function(){return _},e.unstable_next=function(U){switch(_){case 1:case 2:case 3:var ee=3;break;default:ee=_}var ce=_;_=ee;try{return U()}finally{_=ce}},e.unstable_requestPaint=function(){A=!0},e.unstable_runWithPriority=function(U,ee){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var ce=_;_=U;try{return ee()}finally{_=ce}},e.unstable_scheduleCallback=function(U,ee,ce){var xe=e.unstable_now();switch(typeof ce=="object"&&ce!==null?(ce=ce.delay,ce=typeof ce=="number"&&0<ce?xe+ce:xe):ce=xe,U){case 1:var O=-1;break;case 2:O=250;break;case 5:O=1073741823;break;case 4:O=1e4;break;default:O=5e3}return O=ce+O,U={id:p++,callback:ee,priorityLevel:U,startTime:ce,expirationTime:O,sortIndex:-1},ce>xe?(U.sortIndex=ce,t(h,U),n(d)===null&&U===n(h)&&(S?(k(z),z=-1):S=!0,re(B,ce-xe))):(U.sortIndex=O,t(d,U),T||E||(T=!0,D||(D=!0,J()))),U},e.unstable_shouldYield=V,e.unstable_wrapCallback=function(U){var ee=_;return function(){var ce=_;_=ee;try{return U.apply(this,arguments)}finally{_=ce}}}})(up)),up}var ax;function rL(){return ax||(ax=1,lp.exports=nL()),lp.exports}var cp={exports:{}},an={};var ix;function aL(){if(ix)return an;ix=1;var e=pg();function t(d){var h="https://react.dev/errors/"+d;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)h+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+d+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},i=Symbol.for("react.portal");function o(d,h,p){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:m==null?null:""+m,children:d,containerInfo:h,implementation:p}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(d,h){if(d==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return an.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,an.createPortal=function(d,h){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return o(d,h,null,p)},an.flushSync=function(d){var h=l.T,p=r.p;try{if(l.T=null,r.p=2,d)return d()}finally{l.T=h,r.p=p,r.d.f()}},an.preconnect=function(d,h){typeof d=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,r.d.C(d,h))},an.prefetchDNS=function(d){typeof d=="string"&&r.d.D(d)},an.preinit=function(d,h){if(typeof d=="string"&&h&&typeof h.as=="string"){var p=h.as,m=c(p,h.crossOrigin),_=typeof h.integrity=="string"?h.integrity:void 0,E=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;p==="style"?r.d.S(d,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:m,integrity:_,fetchPriority:E}):p==="script"&&r.d.X(d,{crossOrigin:m,integrity:_,fetchPriority:E,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},an.preinitModule=function(d,h){if(typeof d=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var p=c(h.as,h.crossOrigin);r.d.M(d,{crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&r.d.M(d)},an.preload=function(d,h){if(typeof d=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var p=h.as,m=c(p,h.crossOrigin);r.d.L(d,p,{crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},an.preloadModule=function(d,h){if(typeof d=="string")if(h){var p=c(h.as,h.crossOrigin);r.d.m(d,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else r.d.m(d)},an.requestFormReset=function(d){r.d.r(d)},an.unstable_batchedUpdates=function(d,h){return d(h)},an.useFormState=function(d,h,p){return l.H.useFormState(d,h,p)},an.useFormStatus=function(){return l.H.useHostTransitionStatus()},an.version="19.2.7",an}var sx;function D2(){if(sx)return cp.exports;sx=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),cp.exports=aL(),cp.exports}var ox;function iL(){if(ox)return yl;ox=1;var e=rL(),t=pg(),n=D2();function r(a){var s="https://react.dev/errors/"+a;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)s+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+a+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function o(a){var s=a,u=a;if(a.alternate)for(;s.return;)s=s.return;else{a=s;do s=a,(s.flags&4098)!==0&&(u=s.return),a=s.return;while(a)}return s.tag===3?u:null}function l(a){if(a.tag===13){var s=a.memoizedState;if(s===null&&(a=a.alternate,a!==null&&(s=a.memoizedState)),s!==null)return s.dehydrated}return null}function c(a){if(a.tag===31){var s=a.memoizedState;if(s===null&&(a=a.alternate,a!==null&&(s=a.memoizedState)),s!==null)return s.dehydrated}return null}function d(a){if(o(a)!==a)throw Error(r(188))}function h(a){var s=a.alternate;if(!s){if(s=o(a),s===null)throw Error(r(188));return s!==a?null:a}for(var u=a,f=s;;){var g=u.return;if(g===null)break;var y=g.alternate;if(y===null){if(f=g.return,f!==null){u=f;continue}break}if(g.child===y.child){for(y=g.child;y;){if(y===u)return d(g),a;if(y===f)return d(g),s;y=y.sibling}throw Error(r(188))}if(u.return!==f.return)u=g,f=y;else{for(var w=!1,R=g.child;R;){if(R===u){w=!0,u=g,f=y;break}if(R===f){w=!0,f=g,u=y;break}R=R.sibling}if(!w){for(R=y.child;R;){if(R===u){w=!0,u=y,f=g;break}if(R===f){w=!0,f=y,u=g;break}R=R.sibling}if(!w)throw Error(r(189))}}if(u.alternate!==f)throw Error(r(190))}if(u.tag!==3)throw Error(r(188));return u.stateNode.current===u?a:s}function p(a){var s=a.tag;if(s===5||s===26||s===27||s===6)return a;for(a=a.child;a!==null;){if(s=p(a),s!==null)return s;a=a.sibling}return null}var m=Object.assign,_=Symbol.for("react.element"),E=Symbol.for("react.transitional.element"),T=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),k=Symbol.for("react.consumer"),N=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),B=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),z=Symbol.for("react.memo"),G=Symbol.for("react.lazy"),ie=Symbol.for("react.activity"),V=Symbol.for("react.memo_cache_sentinel"),X=Symbol.iterator;function J(a){return a===null||typeof a!="object"?null:(a=X&&a[X]||a["@@iterator"],typeof a=="function"?a:null)}var he=Symbol.for("react.client.reference");function ue(a){if(a==null)return null;if(typeof a=="function")return a.$$typeof===he?null:a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case S:return"Fragment";case C:return"Profiler";case A:return"StrictMode";case B:return"Suspense";case D:return"SuspenseList";case ie:return"Activity"}if(typeof a=="object")switch(a.$$typeof){case T:return"Portal";case N:return a.displayName||"Context";case k:return(a._context.displayName||"Context")+".Consumer";case M:var s=a.render;return a=a.displayName,a||(a=s.displayName||s.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case z:return s=a.displayName||null,s!==null?s:ue(a.type)||"Memo";case G:s=a._payload,a=a._init;try{return ue(a(s))}catch{}}return null}var re=Array.isArray,U=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce={pending:!1,data:null,method:null,action:null},xe=[],O=-1;function F(a){return{current:a}}function te(a){0>O||(a.current=xe[O],xe[O]=null,O--)}function P(a,s){O++,xe[O]=a.current,a.current=s}var ge=F(null),Ee=F(null),ye=F(null),be=F(null);function ke(a,s){switch(P(ye,s),P(Ee,a),P(ge,null),s.nodeType){case 9:case 11:a=(a=s.documentElement)&&(a=a.namespaceURI)?T_(a):0;break;default:if(a=s.tagName,s=s.namespaceURI)s=T_(s),a=v_(s,a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}te(ge),P(ge,a)}function Te(){te(ge),te(Ee),te(ye)}function De(a){a.memoizedState!==null&&P(be,a);var s=ge.current,u=v_(s,a.type);s!==u&&(P(Ee,a),P(ge,u))}function je(a){Ee.current===a&&(te(ge),te(Ee)),be.current===a&&(te(be),ml._currentValue=ce)}var Je,Nt;function it(a){if(Je===void 0)try{throw Error()}catch(u){var s=u.stack.trim().match(/\n( *(at )?)/);Je=s&&s[1]||"",Nt=-1<u.stack.indexOf(`
3
+ at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
4
+ `+Je+a+Nt}var On=!1;function En(a,s){if(!a||On)return"";On=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var f={DetermineComponentFrameRoot:function(){try{if(s){var de=function(){throw Error()};if(Object.defineProperty(de.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(de,[])}catch(ne){var Z=ne}Reflect.construct(a,[],de)}else{try{de.call()}catch(ne){Z=ne}a.call(de.prototype)}}else{try{throw Error()}catch(ne){Z=ne}(de=a())&&typeof de.catch=="function"&&de.catch(function(){})}}catch(ne){if(ne&&Z&&typeof ne.stack=="string")return[ne.stack,Z.stack]}return[null,null]}};f.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var g=Object.getOwnPropertyDescriptor(f.DetermineComponentFrameRoot,"name");g&&g.configurable&&Object.defineProperty(f.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var y=f.DetermineComponentFrameRoot(),w=y[0],R=y[1];if(w&&R){var $=w.split(`
5
+ `),K=R.split(`
6
+ `);for(g=f=0;f<$.length&&!$[f].includes("DetermineComponentFrameRoot");)f++;for(;g<K.length&&!K[g].includes("DetermineComponentFrameRoot");)g++;if(f===$.length||g===K.length)for(f=$.length-1,g=K.length-1;1<=f&&0<=g&&$[f]!==K[g];)g--;for(;1<=f&&0<=g;f--,g--)if($[f]!==K[g]){if(f!==1||g!==1)do if(f--,g--,0>g||$[f]!==K[g]){var se=`
7
+ `+$[f].replace(" at new "," at ");return a.displayName&&se.includes("<anonymous>")&&(se=se.replace("<anonymous>",a.displayName)),se}while(1<=f&&0<=g);break}}}finally{On=!1,Error.prepareStackTrace=u}return(u=a?a.displayName||a.name:"")?it(u):""}function Tr(a,s){switch(a.tag){case 26:case 27:case 5:return it(a.type);case 16:return it("Lazy");case 13:return a.child!==s&&s!==null?it("Suspense Fallback"):it("Suspense");case 19:return it("SuspenseList");case 0:case 15:return En(a.type,!1);case 11:return En(a.type.render,!1);case 1:return En(a.type,!0);case 31:return it("Activity");default:return""}}function He(a){try{var s="",u=null;do s+=Tr(a,u),u=a,a=a.return;while(a);return s}catch(f){return`
8
+ Error generating stack: `+f.message+`
9
+ `+f.stack}}var st=Object.prototype.hasOwnProperty,qt=e.unstable_scheduleCallback,yn=e.unstable_cancelCallback,zr=e.unstable_shouldYield,Gf=e.unstable_requestPaint,dn=e.unstable_now,qf=e.unstable_getCurrentPriorityLevel,oe=e.unstable_ImmediatePriority,_e=e.unstable_UserBlockingPriority,Le=e.unstable_NormalPriority,Ve=e.unstable_LowPriority,ot=e.unstable_IdlePriority,Ln=e.log,Fr=e.unstable_setDisableYieldValue,fn=null,Ut=null;function _n(a){if(typeof Ln=="function"&&Fr(a),Ut&&typeof Ut.setStrictMode=="function")try{Ut.setStrictMode(fn,a)}catch{}}var pt=Math.clz32?Math.clz32:B3,ya=Math.log,or=Math.LN2;function B3(a){return a>>>=0,a===0?32:31-(ya(a)/or|0)|0}var vu=256,Su=262144,Au=4194304;function hi(a){var s=a&42;if(s!==0)return s;switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return a&261888;case 262144:case 524288:case 1048576:case 2097152:return a&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return a&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return a}}function Cu(a,s,u){var f=a.pendingLanes;if(f===0)return 0;var g=0,y=a.suspendedLanes,w=a.pingedLanes;a=a.warmLanes;var R=f&134217727;return R!==0?(f=R&~y,f!==0?g=hi(f):(w&=R,w!==0?g=hi(w):u||(u=R&~a,u!==0&&(g=hi(u))))):(R=f&~y,R!==0?g=hi(R):w!==0?g=hi(w):u||(u=f&~a,u!==0&&(g=hi(u)))),g===0?0:s!==0&&s!==g&&(s&y)===0&&(y=g&-g,u=s&-s,y>=u||y===32&&(u&4194048)!==0)?s:g}function wo(a,s){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&s)===0}function j3(a,s){switch(a){case 1:case 2:case 4:case 8:case 64:return s+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function rb(){var a=Au;return Au<<=1,(Au&62914560)===0&&(Au=4194304),a}function Yf(a){for(var s=[],u=0;31>u;u++)s.push(a);return s}function ko(a,s){a.pendingLanes|=s,s!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function U3(a,s,u,f,g,y){var w=a.pendingLanes;a.pendingLanes=u,a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0,a.expiredLanes&=u,a.entangledLanes&=u,a.errorRecoveryDisabledLanes&=u,a.shellSuspendCounter=0;var R=a.entanglements,$=a.expirationTimes,K=a.hiddenUpdates;for(u=w&~u;0<u;){var se=31-pt(u),de=1<<se;R[se]=0,$[se]=-1;var Z=K[se];if(Z!==null)for(K[se]=null,se=0;se<Z.length;se++){var ne=Z[se];ne!==null&&(ne.lane&=-536870913)}u&=~de}f!==0&&ab(a,f,0),y!==0&&g===0&&a.tag!==0&&(a.suspendedLanes|=y&~(w&~s))}function ab(a,s,u){a.pendingLanes|=s,a.suspendedLanes&=~s;var f=31-pt(s);a.entangledLanes|=s,a.entanglements[f]=a.entanglements[f]|1073741824|u&261930}function ib(a,s){var u=a.entangledLanes|=s;for(a=a.entanglements;u;){var f=31-pt(u),g=1<<f;g&s|a[f]&s&&(a[f]|=s),u&=~g}}function sb(a,s){var u=s&-s;return u=(u&42)!==0?1:Xf(u),(u&(a.suspendedLanes|s))!==0?0:u}function Xf(a){switch(a){case 2:a=1;break;case 8:a=4;break;case 32:a=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:a=128;break;case 268435456:a=134217728;break;default:a=0}return a}function Qf(a){return a&=-a,2<a?8<a?(a&134217727)!==0?32:268435456:8:2}function ob(){var a=ee.p;return a!==0?a:(a=window.event,a===void 0?32:q_(a.type))}function lb(a,s){var u=ee.p;try{return ee.p=a,s()}finally{ee.p=u}}var _a=Math.random().toString(36).slice(2),Jt="__reactFiber$"+_a,xn="__reactProps$"+_a,ls="__reactContainer$"+_a,Wf="__reactEvents$"+_a,H3="__reactListeners$"+_a,z3="__reactHandles$"+_a,ub="__reactResources$"+_a,No="__reactMarker$"+_a;function Kf(a){delete a[Jt],delete a[xn],delete a[Wf],delete a[H3],delete a[z3]}function us(a){var s=a[Jt];if(s)return s;for(var u=a.parentNode;u;){if(s=u[ls]||u[Jt]){if(u=s.alternate,s.child!==null||u!==null&&u.child!==null)for(a=R_(a);a!==null;){if(u=a[Jt])return u;a=R_(a)}return s}a=u,u=a.parentNode}return null}function cs(a){if(a=a[Jt]||a[ls]){var s=a.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return a}return null}function Ro(a){var s=a.tag;if(s===5||s===26||s===27||s===6)return a.stateNode;throw Error(r(33))}function ds(a){var s=a[ub];return s||(s=a[ub]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function Yt(a){a[No]=!0}var cb=new Set,db={};function mi(a,s){fs(a,s),fs(a+"Capture",s)}function fs(a,s){for(db[a]=s,a=0;a<s.length;a++)cb.add(s[a])}var F3=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),fb={},hb={};function $3(a){return st.call(hb,a)?!0:st.call(fb,a)?!1:F3.test(a)?hb[a]=!0:(fb[a]=!0,!1)}function wu(a,s,u){if($3(s))if(u===null)a.removeAttribute(s);else{switch(typeof u){case"undefined":case"function":case"symbol":a.removeAttribute(s);return;case"boolean":var f=s.toLowerCase().slice(0,5);if(f!=="data-"&&f!=="aria-"){a.removeAttribute(s);return}}a.setAttribute(s,""+u)}}function ku(a,s,u){if(u===null)a.removeAttribute(s);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(s);return}a.setAttribute(s,""+u)}}function $r(a,s,u,f){if(f===null)a.removeAttribute(u);else{switch(typeof f){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(u);return}a.setAttributeNS(s,u,""+f)}}function Gn(a){switch(typeof a){case"bigint":case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function mb(a){var s=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function V3(a,s,u){var f=Object.getOwnPropertyDescriptor(a.constructor.prototype,s);if(!a.hasOwnProperty(s)&&typeof f<"u"&&typeof f.get=="function"&&typeof f.set=="function"){var g=f.get,y=f.set;return Object.defineProperty(a,s,{configurable:!0,get:function(){return g.call(this)},set:function(w){u=""+w,y.call(this,w)}}),Object.defineProperty(a,s,{enumerable:f.enumerable}),{getValue:function(){return u},setValue:function(w){u=""+w},stopTracking:function(){a._valueTracker=null,delete a[s]}}}}function Zf(a){if(!a._valueTracker){var s=mb(a)?"checked":"value";a._valueTracker=V3(a,s,""+a[s])}}function pb(a){if(!a)return!1;var s=a._valueTracker;if(!s)return!0;var u=s.getValue(),f="";return a&&(f=mb(a)?a.checked?"true":"false":a.value),a=f,a!==u?(s.setValue(a),!0):!1}function Nu(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}var G3=/[\n"\\]/g;function qn(a){return a.replace(G3,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function Jf(a,s,u,f,g,y,w,R){a.name="",w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?a.type=w:a.removeAttribute("type"),s!=null?w==="number"?(s===0&&a.value===""||a.value!=s)&&(a.value=""+Gn(s)):a.value!==""+Gn(s)&&(a.value=""+Gn(s)):w!=="submit"&&w!=="reset"||a.removeAttribute("value"),s!=null?eh(a,w,Gn(s)):u!=null?eh(a,w,Gn(u)):f!=null&&a.removeAttribute("value"),g==null&&y!=null&&(a.defaultChecked=!!y),g!=null&&(a.checked=g&&typeof g!="function"&&typeof g!="symbol"),R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"?a.name=""+Gn(R):a.removeAttribute("name")}function gb(a,s,u,f,g,y,w,R){if(y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(a.type=y),s!=null||u!=null){if(!(y!=="submit"&&y!=="reset"||s!=null)){Zf(a);return}u=u!=null?""+Gn(u):"",s=s!=null?""+Gn(s):u,R||s===a.value||(a.value=s),a.defaultValue=s}f=f??g,f=typeof f!="function"&&typeof f!="symbol"&&!!f,a.checked=R?a.checked:!!f,a.defaultChecked=!!f,w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(a.name=w),Zf(a)}function eh(a,s,u){s==="number"&&Nu(a.ownerDocument)===a||a.defaultValue===""+u||(a.defaultValue=""+u)}function hs(a,s,u,f){if(a=a.options,s){s={};for(var g=0;g<u.length;g++)s["$"+u[g]]=!0;for(u=0;u<a.length;u++)g=s.hasOwnProperty("$"+a[u].value),a[u].selected!==g&&(a[u].selected=g),g&&f&&(a[u].defaultSelected=!0)}else{for(u=""+Gn(u),s=null,g=0;g<a.length;g++){if(a[g].value===u){a[g].selected=!0,f&&(a[g].defaultSelected=!0);return}s!==null||a[g].disabled||(s=a[g])}s!==null&&(s.selected=!0)}}function bb(a,s,u){if(s!=null&&(s=""+Gn(s),s!==a.value&&(a.value=s),u==null)){a.defaultValue!==s&&(a.defaultValue=s);return}a.defaultValue=u!=null?""+Gn(u):""}function Eb(a,s,u,f){if(s==null){if(f!=null){if(u!=null)throw Error(r(92));if(re(f)){if(1<f.length)throw Error(r(93));f=f[0]}u=f}u==null&&(u=""),s=u}u=Gn(s),a.defaultValue=u,f=a.textContent,f===u&&f!==""&&f!==null&&(a.value=f),Zf(a)}function ms(a,s){if(s){var u=a.firstChild;if(u&&u===a.lastChild&&u.nodeType===3){u.nodeValue=s;return}}a.textContent=s}var q3=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function yb(a,s,u){var f=s.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?f?a.setProperty(s,""):s==="float"?a.cssFloat="":a[s]="":f?a.setProperty(s,u):typeof u!="number"||u===0||q3.has(s)?s==="float"?a.cssFloat=u:a[s]=(""+u).trim():a[s]=u+"px"}function _b(a,s,u){if(s!=null&&typeof s!="object")throw Error(r(62));if(a=a.style,u!=null){for(var f in u)!u.hasOwnProperty(f)||s!=null&&s.hasOwnProperty(f)||(f.indexOf("--")===0?a.setProperty(f,""):f==="float"?a.cssFloat="":a[f]="");for(var g in s)f=s[g],s.hasOwnProperty(g)&&u[g]!==f&&yb(a,g,f)}else for(var y in s)s.hasOwnProperty(y)&&yb(a,y,s[y])}function th(a){if(a.indexOf("-")===-1)return!1;switch(a){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Y3=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["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"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["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"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["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"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),X3=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Ru(a){return X3.test(""+a)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":a}function Vr(){}var nh=null;function rh(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var ps=null,gs=null;function xb(a){var s=cs(a);if(s&&(a=s.stateNode)){var u=a[xn]||null;e:switch(a=s.stateNode,s.type){case"input":if(Jf(a,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name),s=u.name,u.type==="radio"&&s!=null){for(u=a;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll('input[name="'+qn(""+s)+'"][type="radio"]'),s=0;s<u.length;s++){var f=u[s];if(f!==a&&f.form===a.form){var g=f[xn]||null;if(!g)throw Error(r(90));Jf(f,g.value,g.defaultValue,g.defaultValue,g.checked,g.defaultChecked,g.type,g.name)}}for(s=0;s<u.length;s++)f=u[s],f.form===a.form&&pb(f)}break e;case"textarea":bb(a,u.value,u.defaultValue);break e;case"select":s=u.value,s!=null&&hs(a,!!u.multiple,s,!1)}}}var ah=!1;function Tb(a,s,u){if(ah)return a(s,u);ah=!0;try{var f=a(s);return f}finally{if(ah=!1,(ps!==null||gs!==null)&&(bc(),ps&&(s=ps,a=gs,gs=ps=null,xb(s),a)))for(s=0;s<a.length;s++)xb(a[s])}}function Oo(a,s){var u=a.stateNode;if(u===null)return null;var f=u[xn]||null;if(f===null)return null;u=f[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(f=!f.disabled)||(a=a.type,f=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!f;break e;default:a=!1}if(a)return null;if(u&&typeof u!="function")throw Error(r(231,s,typeof u));return u}var Gr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ih=!1;if(Gr)try{var Lo={};Object.defineProperty(Lo,"passive",{get:function(){ih=!0}}),window.addEventListener("test",Lo,Lo),window.removeEventListener("test",Lo,Lo)}catch{ih=!1}var xa=null,sh=null,Ou=null;function vb(){if(Ou)return Ou;var a,s=sh,u=s.length,f,g="value"in xa?xa.value:xa.textContent,y=g.length;for(a=0;a<u&&s[a]===g[a];a++);var w=u-a;for(f=1;f<=w&&s[u-f]===g[y-f];f++);return Ou=g.slice(a,1<f?1-f:void 0)}function Lu(a){var s=a.keyCode;return"charCode"in a?(a=a.charCode,a===0&&s===13&&(a=13)):a=s,a===10&&(a=13),32<=a||a===13?a:0}function Iu(){return!0}function Sb(){return!1}function Tn(a){function s(u,f,g,y,w){this._reactName=u,this._targetInst=g,this.type=f,this.nativeEvent=y,this.target=w,this.currentTarget=null;for(var R in a)a.hasOwnProperty(R)&&(u=a[R],this[R]=u?u(y):y[R]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?Iu:Sb,this.isPropagationStopped=Sb,this}return m(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=Iu)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=Iu)},persist:function(){},isPersistent:Iu}),s}var pi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Du=Tn(pi),Io=m({},pi,{view:0,detail:0}),Q3=Tn(Io),oh,lh,Do,Mu=m({},Io,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ch,button:0,buttons:0,relatedTarget:function(a){return a.relatedTarget===void 0?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){return"movementX"in a?a.movementX:(a!==Do&&(Do&&a.type==="mousemove"?(oh=a.screenX-Do.screenX,lh=a.screenY-Do.screenY):lh=oh=0,Do=a),oh)},movementY:function(a){return"movementY"in a?a.movementY:lh}}),Ab=Tn(Mu),W3=m({},Mu,{dataTransfer:0}),K3=Tn(W3),Z3=m({},Io,{relatedTarget:0}),uh=Tn(Z3),J3=m({},pi,{animationName:0,elapsedTime:0,pseudoElement:0}),eR=Tn(J3),tR=m({},pi,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),nR=Tn(tR),rR=m({},pi,{data:0}),Cb=Tn(rR),aR={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},iR={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},sR={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function oR(a){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(a):(a=sR[a])?!!s[a]:!1}function ch(){return oR}var lR=m({},Io,{key:function(a){if(a.key){var s=aR[a.key]||a.key;if(s!=="Unidentified")return s}return a.type==="keypress"?(a=Lu(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?iR[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ch,charCode:function(a){return a.type==="keypress"?Lu(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?Lu(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),uR=Tn(lR),cR=m({},Mu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),wb=Tn(cR),dR=m({},Io,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ch}),fR=Tn(dR),hR=m({},pi,{propertyName:0,elapsedTime:0,pseudoElement:0}),mR=Tn(hR),pR=m({},Mu,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),gR=Tn(pR),bR=m({},pi,{newState:0,oldState:0}),ER=Tn(bR),yR=[9,13,27,32],dh=Gr&&"CompositionEvent"in window,Mo=null;Gr&&"documentMode"in document&&(Mo=document.documentMode);var _R=Gr&&"TextEvent"in window&&!Mo,kb=Gr&&(!dh||Mo&&8<Mo&&11>=Mo),Nb=" ",Rb=!1;function Ob(a,s){switch(a){case"keyup":return yR.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Lb(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var bs=!1;function xR(a,s){switch(a){case"compositionend":return Lb(s);case"keypress":return s.which!==32?null:(Rb=!0,Nb);case"textInput":return a=s.data,a===Nb&&Rb?null:a;default:return null}}function TR(a,s){if(bs)return a==="compositionend"||!dh&&Ob(a,s)?(a=vb(),Ou=sh=xa=null,bs=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return kb&&s.locale!=="ko"?null:s.data;default:return null}}var vR={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Ib(a){var s=a&&a.nodeName&&a.nodeName.toLowerCase();return s==="input"?!!vR[a.type]:s==="textarea"}function Db(a,s,u,f){ps?gs?gs.push(f):gs=[f]:ps=f,s=Sc(s,"onChange"),0<s.length&&(u=new Du("onChange","change",null,u,f),a.push({event:u,listeners:s}))}var Po=null,Bo=null;function SR(a){g_(a,0)}function Pu(a){var s=Ro(a);if(pb(s))return a}function Mb(a,s){if(a==="change")return s}var Pb=!1;if(Gr){var fh;if(Gr){var hh="oninput"in document;if(!hh){var Bb=document.createElement("div");Bb.setAttribute("oninput","return;"),hh=typeof Bb.oninput=="function"}fh=hh}else fh=!1;Pb=fh&&(!document.documentMode||9<document.documentMode)}function jb(){Po&&(Po.detachEvent("onpropertychange",Ub),Bo=Po=null)}function Ub(a){if(a.propertyName==="value"&&Pu(Bo)){var s=[];Db(s,Bo,a,rh(a)),Tb(SR,s)}}function AR(a,s,u){a==="focusin"?(jb(),Po=s,Bo=u,Po.attachEvent("onpropertychange",Ub)):a==="focusout"&&jb()}function CR(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return Pu(Bo)}function wR(a,s){if(a==="click")return Pu(s)}function kR(a,s){if(a==="input"||a==="change")return Pu(s)}function NR(a,s){return a===s&&(a!==0||1/a===1/s)||a!==a&&s!==s}var In=typeof Object.is=="function"?Object.is:NR;function jo(a,s){if(In(a,s))return!0;if(typeof a!="object"||a===null||typeof s!="object"||s===null)return!1;var u=Object.keys(a),f=Object.keys(s);if(u.length!==f.length)return!1;for(f=0;f<u.length;f++){var g=u[f];if(!st.call(s,g)||!In(a[g],s[g]))return!1}return!0}function Hb(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function zb(a,s){var u=Hb(a);a=0;for(var f;u;){if(u.nodeType===3){if(f=a+u.textContent.length,a<=s&&f>=s)return{node:u,offset:s-a};a=f}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=Hb(u)}}function Fb(a,s){return a&&s?a===s?!0:a&&a.nodeType===3?!1:s&&s.nodeType===3?Fb(a,s.parentNode):"contains"in a?a.contains(s):a.compareDocumentPosition?!!(a.compareDocumentPosition(s)&16):!1:!1}function $b(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var s=Nu(a.document);s instanceof a.HTMLIFrameElement;){try{var u=typeof s.contentWindow.location.href=="string"}catch{u=!1}if(u)a=s.contentWindow;else break;s=Nu(a.document)}return s}function mh(a){var s=a&&a.nodeName&&a.nodeName.toLowerCase();return s&&(s==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||s==="textarea"||a.contentEditable==="true")}var RR=Gr&&"documentMode"in document&&11>=document.documentMode,Es=null,ph=null,Uo=null,gh=!1;function Vb(a,s,u){var f=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;gh||Es==null||Es!==Nu(f)||(f=Es,"selectionStart"in f&&mh(f)?f={start:f.selectionStart,end:f.selectionEnd}:(f=(f.ownerDocument&&f.ownerDocument.defaultView||window).getSelection(),f={anchorNode:f.anchorNode,anchorOffset:f.anchorOffset,focusNode:f.focusNode,focusOffset:f.focusOffset}),Uo&&jo(Uo,f)||(Uo=f,f=Sc(ph,"onSelect"),0<f.length&&(s=new Du("onSelect","select",null,s,u),a.push({event:s,listeners:f}),s.target=Es)))}function gi(a,s){var u={};return u[a.toLowerCase()]=s.toLowerCase(),u["Webkit"+a]="webkit"+s,u["Moz"+a]="moz"+s,u}var ys={animationend:gi("Animation","AnimationEnd"),animationiteration:gi("Animation","AnimationIteration"),animationstart:gi("Animation","AnimationStart"),transitionrun:gi("Transition","TransitionRun"),transitionstart:gi("Transition","TransitionStart"),transitioncancel:gi("Transition","TransitionCancel"),transitionend:gi("Transition","TransitionEnd")},bh={},Gb={};Gr&&(Gb=document.createElement("div").style,"AnimationEvent"in window||(delete ys.animationend.animation,delete ys.animationiteration.animation,delete ys.animationstart.animation),"TransitionEvent"in window||delete ys.transitionend.transition);function bi(a){if(bh[a])return bh[a];if(!ys[a])return a;var s=ys[a],u;for(u in s)if(s.hasOwnProperty(u)&&u in Gb)return bh[a]=s[u];return a}var qb=bi("animationend"),Yb=bi("animationiteration"),Xb=bi("animationstart"),OR=bi("transitionrun"),LR=bi("transitionstart"),IR=bi("transitioncancel"),Qb=bi("transitionend"),Wb=new Map,Eh="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Eh.push("scrollEnd");function lr(a,s){Wb.set(a,s),mi(s,[a])}var Bu=typeof reportError=="function"?reportError:function(a){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof a=="object"&&a!==null&&typeof a.message=="string"?String(a.message):String(a),error:a});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",a);return}console.error(a)},Yn=[],_s=0,yh=0;function ju(){for(var a=_s,s=yh=_s=0;s<a;){var u=Yn[s];Yn[s++]=null;var f=Yn[s];Yn[s++]=null;var g=Yn[s];Yn[s++]=null;var y=Yn[s];if(Yn[s++]=null,f!==null&&g!==null){var w=f.pending;w===null?g.next=g:(g.next=w.next,w.next=g),f.pending=g}y!==0&&Kb(u,g,y)}}function Uu(a,s,u,f){Yn[_s++]=a,Yn[_s++]=s,Yn[_s++]=u,Yn[_s++]=f,yh|=f,a.lanes|=f,a=a.alternate,a!==null&&(a.lanes|=f)}function _h(a,s,u,f){return Uu(a,s,u,f),Hu(a)}function Ei(a,s){return Uu(a,null,null,s),Hu(a)}function Kb(a,s,u){a.lanes|=u;var f=a.alternate;f!==null&&(f.lanes|=u);for(var g=!1,y=a.return;y!==null;)y.childLanes|=u,f=y.alternate,f!==null&&(f.childLanes|=u),y.tag===22&&(a=y.stateNode,a===null||a._visibility&1||(g=!0)),a=y,y=y.return;return a.tag===3?(y=a.stateNode,g&&s!==null&&(g=31-pt(u),a=y.hiddenUpdates,f=a[g],f===null?a[g]=[s]:f.push(s),s.lane=u|536870912),y):null}function Hu(a){if(50<ol)throw ol=0,Nm=null,Error(r(185));for(var s=a.return;s!==null;)a=s,s=a.return;return a.tag===3?a.stateNode:null}var xs={};function DR(a,s,u,f){this.tag=a,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Dn(a,s,u,f){return new DR(a,s,u,f)}function xh(a){return a=a.prototype,!(!a||!a.isReactComponent)}function qr(a,s){var u=a.alternate;return u===null?(u=Dn(a.tag,s,a.key,a.mode),u.elementType=a.elementType,u.type=a.type,u.stateNode=a.stateNode,u.alternate=a,a.alternate=u):(u.pendingProps=s,u.type=a.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=a.flags&65011712,u.childLanes=a.childLanes,u.lanes=a.lanes,u.child=a.child,u.memoizedProps=a.memoizedProps,u.memoizedState=a.memoizedState,u.updateQueue=a.updateQueue,s=a.dependencies,u.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},u.sibling=a.sibling,u.index=a.index,u.ref=a.ref,u.refCleanup=a.refCleanup,u}function Zb(a,s){a.flags&=65011714;var u=a.alternate;return u===null?(a.childLanes=0,a.lanes=s,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=u.childLanes,a.lanes=u.lanes,a.child=u.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=u.memoizedProps,a.memoizedState=u.memoizedState,a.updateQueue=u.updateQueue,a.type=u.type,s=u.dependencies,a.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),a}function zu(a,s,u,f,g,y){var w=0;if(f=a,typeof a=="function")xh(a)&&(w=1);else if(typeof a=="string")w=UO(a,u,ge.current)?26:a==="html"||a==="head"||a==="body"?27:5;else e:switch(a){case ie:return a=Dn(31,u,s,g),a.elementType=ie,a.lanes=y,a;case S:return yi(u.children,g,y,s);case A:w=8,g|=24;break;case C:return a=Dn(12,u,s,g|2),a.elementType=C,a.lanes=y,a;case B:return a=Dn(13,u,s,g),a.elementType=B,a.lanes=y,a;case D:return a=Dn(19,u,s,g),a.elementType=D,a.lanes=y,a;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case N:w=10;break e;case k:w=9;break e;case M:w=11;break e;case z:w=14;break e;case G:w=16,f=null;break e}w=29,u=Error(r(130,a===null?"null":typeof a,"")),f=null}return s=Dn(w,u,s,g),s.elementType=a,s.type=f,s.lanes=y,s}function yi(a,s,u,f){return a=Dn(7,a,f,s),a.lanes=u,a}function Th(a,s,u){return a=Dn(6,a,null,s),a.lanes=u,a}function Jb(a){var s=Dn(18,null,null,0);return s.stateNode=a,s}function vh(a,s,u){return s=Dn(4,a.children!==null?a.children:[],a.key,s),s.lanes=u,s.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},s}var eE=new WeakMap;function Xn(a,s){if(typeof a=="object"&&a!==null){var u=eE.get(a);return u!==void 0?u:(s={value:a,source:s,stack:He(s)},eE.set(a,s),s)}return{value:a,source:s,stack:He(s)}}var Ts=[],vs=0,Fu=null,Ho=0,Qn=[],Wn=0,Ta=null,vr=1,Sr="";function Yr(a,s){Ts[vs++]=Ho,Ts[vs++]=Fu,Fu=a,Ho=s}function tE(a,s,u){Qn[Wn++]=vr,Qn[Wn++]=Sr,Qn[Wn++]=Ta,Ta=a;var f=vr;a=Sr;var g=32-pt(f)-1;f&=~(1<<g),u+=1;var y=32-pt(s)+g;if(30<y){var w=g-g%5;y=(f&(1<<w)-1).toString(32),f>>=w,g-=w,vr=1<<32-pt(s)+g|u<<g|f,Sr=y+a}else vr=1<<y|u<<g|f,Sr=a}function Sh(a){a.return!==null&&(Yr(a,1),tE(a,1,0))}function Ah(a){for(;a===Fu;)Fu=Ts[--vs],Ts[vs]=null,Ho=Ts[--vs],Ts[vs]=null;for(;a===Ta;)Ta=Qn[--Wn],Qn[Wn]=null,Sr=Qn[--Wn],Qn[Wn]=null,vr=Qn[--Wn],Qn[Wn]=null}function nE(a,s){Qn[Wn++]=vr,Qn[Wn++]=Sr,Qn[Wn++]=Ta,vr=s.id,Sr=s.overflow,Ta=a}var en=null,_t=null,Ke=!1,va=null,Kn=!1,Ch=Error(r(519));function Sa(a){var s=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw zo(Xn(s,a)),Ch}function rE(a){var s=a.stateNode,u=a.type,f=a.memoizedProps;switch(s[Jt]=a,s[xn]=f,u){case"dialog":qe("cancel",s),qe("close",s);break;case"iframe":case"object":case"embed":qe("load",s);break;case"video":case"audio":for(u=0;u<ul.length;u++)qe(ul[u],s);break;case"source":qe("error",s);break;case"img":case"image":case"link":qe("error",s),qe("load",s);break;case"details":qe("toggle",s);break;case"input":qe("invalid",s),gb(s,f.value,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name,!0);break;case"select":qe("invalid",s);break;case"textarea":qe("invalid",s),Eb(s,f.value,f.defaultValue,f.children)}u=f.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||s.textContent===""+u||f.suppressHydrationWarning===!0||__(s.textContent,u)?(f.popover!=null&&(qe("beforetoggle",s),qe("toggle",s)),f.onScroll!=null&&qe("scroll",s),f.onScrollEnd!=null&&qe("scrollend",s),f.onClick!=null&&(s.onclick=Vr),s=!0):s=!1,s||Sa(a,!0)}function aE(a){for(en=a.return;en;)switch(en.tag){case 5:case 31:case 13:Kn=!1;return;case 27:case 3:Kn=!0;return;default:en=en.return}}function Ss(a){if(a!==en)return!1;if(!Ke)return aE(a),Ke=!0,!1;var s=a.tag,u;if((u=s!==3&&s!==27)&&((u=s===5)&&(u=a.type,u=!(u!=="form"&&u!=="button")||Vm(a.type,a.memoizedProps)),u=!u),u&&_t&&Sa(a),aE(a),s===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));_t=N_(a)}else if(s===31){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));_t=N_(a)}else s===27?(s=_t,ja(a.type)?(a=Qm,Qm=null,_t=a):_t=s):_t=en?Jn(a.stateNode.nextSibling):null;return!0}function _i(){_t=en=null,Ke=!1}function wh(){var a=va;return a!==null&&(Cn===null?Cn=a:Cn.push.apply(Cn,a),va=null),a}function zo(a){va===null?va=[a]:va.push(a)}var kh=F(null),xi=null,Xr=null;function Aa(a,s,u){P(kh,s._currentValue),s._currentValue=u}function Qr(a){a._currentValue=kh.current,te(kh)}function Nh(a,s,u){for(;a!==null;){var f=a.alternate;if((a.childLanes&s)!==s?(a.childLanes|=s,f!==null&&(f.childLanes|=s)):f!==null&&(f.childLanes&s)!==s&&(f.childLanes|=s),a===u)break;a=a.return}}function Rh(a,s,u,f){var g=a.child;for(g!==null&&(g.return=a);g!==null;){var y=g.dependencies;if(y!==null){var w=g.child;y=y.firstContext;e:for(;y!==null;){var R=y;y=g;for(var $=0;$<s.length;$++)if(R.context===s[$]){y.lanes|=u,R=y.alternate,R!==null&&(R.lanes|=u),Nh(y.return,u,a),f||(w=null);break e}y=R.next}}else if(g.tag===18){if(w=g.return,w===null)throw Error(r(341));w.lanes|=u,y=w.alternate,y!==null&&(y.lanes|=u),Nh(w,u,a),w=null}else w=g.child;if(w!==null)w.return=g;else for(w=g;w!==null;){if(w===a){w=null;break}if(g=w.sibling,g!==null){g.return=w.return,w=g;break}w=w.return}g=w}}function As(a,s,u,f){a=null;for(var g=s,y=!1;g!==null;){if(!y){if((g.flags&524288)!==0)y=!0;else if((g.flags&262144)!==0)break}if(g.tag===10){var w=g.alternate;if(w===null)throw Error(r(387));if(w=w.memoizedProps,w!==null){var R=g.type;In(g.pendingProps.value,w.value)||(a!==null?a.push(R):a=[R])}}else if(g===be.current){if(w=g.alternate,w===null)throw Error(r(387));w.memoizedState.memoizedState!==g.memoizedState.memoizedState&&(a!==null?a.push(ml):a=[ml])}g=g.return}a!==null&&Rh(s,a,u,f),s.flags|=262144}function $u(a){for(a=a.firstContext;a!==null;){if(!In(a.context._currentValue,a.memoizedValue))return!0;a=a.next}return!1}function Ti(a){xi=a,Xr=null,a=a.dependencies,a!==null&&(a.firstContext=null)}function tn(a){return iE(xi,a)}function Vu(a,s){return xi===null&&Ti(a),iE(a,s)}function iE(a,s){var u=s._currentValue;if(s={context:s,memoizedValue:u,next:null},Xr===null){if(a===null)throw Error(r(308));Xr=s,a.dependencies={lanes:0,firstContext:s},a.flags|=524288}else Xr=Xr.next=s;return u}var MR=typeof AbortController<"u"?AbortController:function(){var a=[],s=this.signal={aborted:!1,addEventListener:function(u,f){a.push(f)}};this.abort=function(){s.aborted=!0,a.forEach(function(u){return u()})}},PR=e.unstable_scheduleCallback,BR=e.unstable_NormalPriority,Dt={$$typeof:N,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Oh(){return{controller:new MR,data:new Map,refCount:0}}function Fo(a){a.refCount--,a.refCount===0&&PR(BR,function(){a.controller.abort()})}var $o=null,Lh=0,Cs=0,ws=null;function jR(a,s){if($o===null){var u=$o=[];Lh=0,Cs=Mm(),ws={status:"pending",value:void 0,then:function(f){u.push(f)}}}return Lh++,s.then(sE,sE),s}function sE(){if(--Lh===0&&$o!==null){ws!==null&&(ws.status="fulfilled");var a=$o;$o=null,Cs=0,ws=null;for(var s=0;s<a.length;s++)(0,a[s])()}}function UR(a,s){var u=[],f={status:"pending",value:null,reason:null,then:function(g){u.push(g)}};return a.then(function(){f.status="fulfilled",f.value=s;for(var g=0;g<u.length;g++)(0,u[g])(s)},function(g){for(f.status="rejected",f.reason=g,g=0;g<u.length;g++)(0,u[g])(void 0)}),f}var oE=U.S;U.S=function(a,s){Vy=dn(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&jR(a,s),oE!==null&&oE(a,s)};var vi=F(null);function Ih(){var a=vi.current;return a!==null?a:gt.pooledCache}function Gu(a,s){s===null?P(vi,vi.current):P(vi,s.pool)}function lE(){var a=Ih();return a===null?null:{parent:Dt._currentValue,pool:a}}var ks=Error(r(460)),Dh=Error(r(474)),qu=Error(r(542)),Yu={then:function(){}};function uE(a){return a=a.status,a==="fulfilled"||a==="rejected"}function cE(a,s,u){switch(u=a[u],u===void 0?a.push(s):u!==s&&(s.then(Vr,Vr),s=u),s.status){case"fulfilled":return s.value;case"rejected":throw a=s.reason,fE(a),a;default:if(typeof s.status=="string")s.then(Vr,Vr);else{if(a=gt,a!==null&&100<a.shellSuspendCounter)throw Error(r(482));a=s,a.status="pending",a.then(function(f){if(s.status==="pending"){var g=s;g.status="fulfilled",g.value=f}},function(f){if(s.status==="pending"){var g=s;g.status="rejected",g.reason=f}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw a=s.reason,fE(a),a}throw Ai=s,ks}}function Si(a){try{var s=a._init;return s(a._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(Ai=u,ks):u}}var Ai=null;function dE(){if(Ai===null)throw Error(r(459));var a=Ai;return Ai=null,a}function fE(a){if(a===ks||a===qu)throw Error(r(483))}var Ns=null,Vo=0;function Xu(a){var s=Vo;return Vo+=1,Ns===null&&(Ns=[]),cE(Ns,a,s)}function Go(a,s){s=s.props.ref,a.ref=s!==void 0?s:null}function Qu(a,s){throw s.$$typeof===_?Error(r(525)):(a=Object.prototype.toString.call(s),Error(r(31,a==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":a)))}function hE(a){function s(Y,q){if(a){var W=Y.deletions;W===null?(Y.deletions=[q],Y.flags|=16):W.push(q)}}function u(Y,q){if(!a)return null;for(;q!==null;)s(Y,q),q=q.sibling;return null}function f(Y){for(var q=new Map;Y!==null;)Y.key!==null?q.set(Y.key,Y):q.set(Y.index,Y),Y=Y.sibling;return q}function g(Y,q){return Y=qr(Y,q),Y.index=0,Y.sibling=null,Y}function y(Y,q,W){return Y.index=W,a?(W=Y.alternate,W!==null?(W=W.index,W<q?(Y.flags|=67108866,q):W):(Y.flags|=67108866,q)):(Y.flags|=1048576,q)}function w(Y){return a&&Y.alternate===null&&(Y.flags|=67108866),Y}function R(Y,q,W,le){return q===null||q.tag!==6?(q=Th(W,Y.mode,le),q.return=Y,q):(q=g(q,W),q.return=Y,q)}function $(Y,q,W,le){var Ne=W.type;return Ne===S?se(Y,q,W.props.children,le,W.key):q!==null&&(q.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===G&&Si(Ne)===q.type)?(q=g(q,W.props),Go(q,W),q.return=Y,q):(q=zu(W.type,W.key,W.props,null,Y.mode,le),Go(q,W),q.return=Y,q)}function K(Y,q,W,le){return q===null||q.tag!==4||q.stateNode.containerInfo!==W.containerInfo||q.stateNode.implementation!==W.implementation?(q=vh(W,Y.mode,le),q.return=Y,q):(q=g(q,W.children||[]),q.return=Y,q)}function se(Y,q,W,le,Ne){return q===null||q.tag!==7?(q=yi(W,Y.mode,le,Ne),q.return=Y,q):(q=g(q,W),q.return=Y,q)}function de(Y,q,W){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return q=Th(""+q,Y.mode,W),q.return=Y,q;if(typeof q=="object"&&q!==null){switch(q.$$typeof){case E:return W=zu(q.type,q.key,q.props,null,Y.mode,W),Go(W,q),W.return=Y,W;case T:return q=vh(q,Y.mode,W),q.return=Y,q;case G:return q=Si(q),de(Y,q,W)}if(re(q)||J(q))return q=yi(q,Y.mode,W,null),q.return=Y,q;if(typeof q.then=="function")return de(Y,Xu(q),W);if(q.$$typeof===N)return de(Y,Vu(Y,q),W);Qu(Y,q)}return null}function Z(Y,q,W,le){var Ne=q!==null?q.key:null;if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return Ne!==null?null:R(Y,q,""+W,le);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case E:return W.key===Ne?$(Y,q,W,le):null;case T:return W.key===Ne?K(Y,q,W,le):null;case G:return W=Si(W),Z(Y,q,W,le)}if(re(W)||J(W))return Ne!==null?null:se(Y,q,W,le,null);if(typeof W.then=="function")return Z(Y,q,Xu(W),le);if(W.$$typeof===N)return Z(Y,q,Vu(Y,W),le);Qu(Y,W)}return null}function ne(Y,q,W,le,Ne){if(typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint")return Y=Y.get(W)||null,R(q,Y,""+le,Ne);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case E:return Y=Y.get(le.key===null?W:le.key)||null,$(q,Y,le,Ne);case T:return Y=Y.get(le.key===null?W:le.key)||null,K(q,Y,le,Ne);case G:return le=Si(le),ne(Y,q,W,le,Ne)}if(re(le)||J(le))return Y=Y.get(W)||null,se(q,Y,le,Ne,null);if(typeof le.then=="function")return ne(Y,q,W,Xu(le),Ne);if(le.$$typeof===N)return ne(Y,q,W,Vu(q,le),Ne);Qu(q,le)}return null}function Ae(Y,q,W,le){for(var Ne=null,nt=null,Ce=q,Ue=q=0,Qe=null;Ce!==null&&Ue<W.length;Ue++){Ce.index>Ue?(Qe=Ce,Ce=null):Qe=Ce.sibling;var rt=Z(Y,Ce,W[Ue],le);if(rt===null){Ce===null&&(Ce=Qe);break}a&&Ce&&rt.alternate===null&&s(Y,Ce),q=y(rt,q,Ue),nt===null?Ne=rt:nt.sibling=rt,nt=rt,Ce=Qe}if(Ue===W.length)return u(Y,Ce),Ke&&Yr(Y,Ue),Ne;if(Ce===null){for(;Ue<W.length;Ue++)Ce=de(Y,W[Ue],le),Ce!==null&&(q=y(Ce,q,Ue),nt===null?Ne=Ce:nt.sibling=Ce,nt=Ce);return Ke&&Yr(Y,Ue),Ne}for(Ce=f(Ce);Ue<W.length;Ue++)Qe=ne(Ce,Y,Ue,W[Ue],le),Qe!==null&&(a&&Qe.alternate!==null&&Ce.delete(Qe.key===null?Ue:Qe.key),q=y(Qe,q,Ue),nt===null?Ne=Qe:nt.sibling=Qe,nt=Qe);return a&&Ce.forEach(function($a){return s(Y,$a)}),Ke&&Yr(Y,Ue),Ne}function Oe(Y,q,W,le){if(W==null)throw Error(r(151));for(var Ne=null,nt=null,Ce=q,Ue=q=0,Qe=null,rt=W.next();Ce!==null&&!rt.done;Ue++,rt=W.next()){Ce.index>Ue?(Qe=Ce,Ce=null):Qe=Ce.sibling;var $a=Z(Y,Ce,rt.value,le);if($a===null){Ce===null&&(Ce=Qe);break}a&&Ce&&$a.alternate===null&&s(Y,Ce),q=y($a,q,Ue),nt===null?Ne=$a:nt.sibling=$a,nt=$a,Ce=Qe}if(rt.done)return u(Y,Ce),Ke&&Yr(Y,Ue),Ne;if(Ce===null){for(;!rt.done;Ue++,rt=W.next())rt=de(Y,rt.value,le),rt!==null&&(q=y(rt,q,Ue),nt===null?Ne=rt:nt.sibling=rt,nt=rt);return Ke&&Yr(Y,Ue),Ne}for(Ce=f(Ce);!rt.done;Ue++,rt=W.next())rt=ne(Ce,Y,Ue,rt.value,le),rt!==null&&(a&&rt.alternate!==null&&Ce.delete(rt.key===null?Ue:rt.key),q=y(rt,q,Ue),nt===null?Ne=rt:nt.sibling=rt,nt=rt);return a&&Ce.forEach(function(WO){return s(Y,WO)}),Ke&&Yr(Y,Ue),Ne}function ht(Y,q,W,le){if(typeof W=="object"&&W!==null&&W.type===S&&W.key===null&&(W=W.props.children),typeof W=="object"&&W!==null){switch(W.$$typeof){case E:e:{for(var Ne=W.key;q!==null;){if(q.key===Ne){if(Ne=W.type,Ne===S){if(q.tag===7){u(Y,q.sibling),le=g(q,W.props.children),le.return=Y,Y=le;break e}}else if(q.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===G&&Si(Ne)===q.type){u(Y,q.sibling),le=g(q,W.props),Go(le,W),le.return=Y,Y=le;break e}u(Y,q);break}else s(Y,q);q=q.sibling}W.type===S?(le=yi(W.props.children,Y.mode,le,W.key),le.return=Y,Y=le):(le=zu(W.type,W.key,W.props,null,Y.mode,le),Go(le,W),le.return=Y,Y=le)}return w(Y);case T:e:{for(Ne=W.key;q!==null;){if(q.key===Ne)if(q.tag===4&&q.stateNode.containerInfo===W.containerInfo&&q.stateNode.implementation===W.implementation){u(Y,q.sibling),le=g(q,W.children||[]),le.return=Y,Y=le;break e}else{u(Y,q);break}else s(Y,q);q=q.sibling}le=vh(W,Y.mode,le),le.return=Y,Y=le}return w(Y);case G:return W=Si(W),ht(Y,q,W,le)}if(re(W))return Ae(Y,q,W,le);if(J(W)){if(Ne=J(W),typeof Ne!="function")throw Error(r(150));return W=Ne.call(W),Oe(Y,q,W,le)}if(typeof W.then=="function")return ht(Y,q,Xu(W),le);if(W.$$typeof===N)return ht(Y,q,Vu(Y,W),le);Qu(Y,W)}return typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint"?(W=""+W,q!==null&&q.tag===6?(u(Y,q.sibling),le=g(q,W),le.return=Y,Y=le):(u(Y,q),le=Th(W,Y.mode,le),le.return=Y,Y=le),w(Y)):u(Y,q)}return function(Y,q,W,le){try{Vo=0;var Ne=ht(Y,q,W,le);return Ns=null,Ne}catch(Ce){if(Ce===ks||Ce===qu)throw Ce;var nt=Dn(29,Ce,null,Y.mode);return nt.lanes=le,nt.return=Y,nt}}}var Ci=hE(!0),mE=hE(!1),Ca=!1;function Mh(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ph(a,s){a=a.updateQueue,s.updateQueue===a&&(s.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,callbacks:null})}function wa(a){return{lane:a,tag:0,payload:null,callback:null,next:null}}function ka(a,s,u){var f=a.updateQueue;if(f===null)return null;if(f=f.shared,(at&2)!==0){var g=f.pending;return g===null?s.next=s:(s.next=g.next,g.next=s),f.pending=s,s=Hu(a),Kb(a,null,u),s}return Uu(a,f,s,u),Hu(a)}function qo(a,s,u){if(s=s.updateQueue,s!==null&&(s=s.shared,(u&4194048)!==0)){var f=s.lanes;f&=a.pendingLanes,u|=f,s.lanes=u,ib(a,u)}}function Bh(a,s){var u=a.updateQueue,f=a.alternate;if(f!==null&&(f=f.updateQueue,u===f)){var g=null,y=null;if(u=u.firstBaseUpdate,u!==null){do{var w={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};y===null?g=y=w:y=y.next=w,u=u.next}while(u!==null);y===null?g=y=s:y=y.next=s}else g=y=s;u={baseState:f.baseState,firstBaseUpdate:g,lastBaseUpdate:y,shared:f.shared,callbacks:f.callbacks},a.updateQueue=u;return}a=u.lastBaseUpdate,a===null?u.firstBaseUpdate=s:a.next=s,u.lastBaseUpdate=s}var jh=!1;function Yo(){if(jh){var a=ws;if(a!==null)throw a}}function Xo(a,s,u,f){jh=!1;var g=a.updateQueue;Ca=!1;var y=g.firstBaseUpdate,w=g.lastBaseUpdate,R=g.shared.pending;if(R!==null){g.shared.pending=null;var $=R,K=$.next;$.next=null,w===null?y=K:w.next=K,w=$;var se=a.alternate;se!==null&&(se=se.updateQueue,R=se.lastBaseUpdate,R!==w&&(R===null?se.firstBaseUpdate=K:R.next=K,se.lastBaseUpdate=$))}if(y!==null){var de=g.baseState;w=0,se=K=$=null,R=y;do{var Z=R.lane&-536870913,ne=Z!==R.lane;if(ne?(Xe&Z)===Z:(f&Z)===Z){Z!==0&&Z===Cs&&(jh=!0),se!==null&&(se=se.next={lane:0,tag:R.tag,payload:R.payload,callback:null,next:null});e:{var Ae=a,Oe=R;Z=s;var ht=u;switch(Oe.tag){case 1:if(Ae=Oe.payload,typeof Ae=="function"){de=Ae.call(ht,de,Z);break e}de=Ae;break e;case 3:Ae.flags=Ae.flags&-65537|128;case 0:if(Ae=Oe.payload,Z=typeof Ae=="function"?Ae.call(ht,de,Z):Ae,Z==null)break e;de=m({},de,Z);break e;case 2:Ca=!0}}Z=R.callback,Z!==null&&(a.flags|=64,ne&&(a.flags|=8192),ne=g.callbacks,ne===null?g.callbacks=[Z]:ne.push(Z))}else ne={lane:Z,tag:R.tag,payload:R.payload,callback:R.callback,next:null},se===null?(K=se=ne,$=de):se=se.next=ne,w|=Z;if(R=R.next,R===null){if(R=g.shared.pending,R===null)break;ne=R,R=ne.next,ne.next=null,g.lastBaseUpdate=ne,g.shared.pending=null}}while(!0);se===null&&($=de),g.baseState=$,g.firstBaseUpdate=K,g.lastBaseUpdate=se,y===null&&(g.shared.lanes=0),Ia|=w,a.lanes=w,a.memoizedState=de}}function pE(a,s){if(typeof a!="function")throw Error(r(191,a));a.call(s)}function gE(a,s){var u=a.callbacks;if(u!==null)for(a.callbacks=null,a=0;a<u.length;a++)pE(u[a],s)}var Rs=F(null),Wu=F(0);function bE(a,s){a=aa,P(Wu,a),P(Rs,s),aa=a|s.baseLanes}function Uh(){P(Wu,aa),P(Rs,Rs.current)}function Hh(){aa=Wu.current,te(Rs),te(Wu)}var Mn=F(null),Zn=null;function Na(a){var s=a.alternate;P(Rt,Rt.current&1),P(Mn,a),Zn===null&&(s===null||Rs.current!==null||s.memoizedState!==null)&&(Zn=a)}function zh(a){P(Rt,Rt.current),P(Mn,a),Zn===null&&(Zn=a)}function EE(a){a.tag===22?(P(Rt,Rt.current),P(Mn,a),Zn===null&&(Zn=a)):Ra()}function Ra(){P(Rt,Rt.current),P(Mn,Mn.current)}function Pn(a){te(Mn),Zn===a&&(Zn=null),te(Rt)}var Rt=F(0);function Ku(a){for(var s=a;s!==null;){if(s.tag===13){var u=s.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||Ym(u)||Xm(u)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===a)break;for(;s.sibling===null;){if(s.return===null||s.return===a)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Wr=0,Be=null,dt=null,Mt=null,Zu=!1,Os=!1,wi=!1,Ju=0,Qo=0,Ls=null,HR=0;function At(){throw Error(r(321))}function Fh(a,s){if(s===null)return!1;for(var u=0;u<s.length&&u<a.length;u++)if(!In(a[u],s[u]))return!1;return!0}function $h(a,s,u,f,g,y){return Wr=y,Be=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,U.H=a===null||a.memoizedState===null?ty:am,wi=!1,y=u(f,g),wi=!1,Os&&(y=_E(s,u,f,g)),yE(a),y}function yE(a){U.H=Zo;var s=dt!==null&&dt.next!==null;if(Wr=0,Mt=dt=Be=null,Zu=!1,Qo=0,Ls=null,s)throw Error(r(300));a===null||Pt||(a=a.dependencies,a!==null&&$u(a)&&(Pt=!0))}function _E(a,s,u,f){Be=a;var g=0;do{if(Os&&(Ls=null),Qo=0,Os=!1,25<=g)throw Error(r(301));if(g+=1,Mt=dt=null,a.updateQueue!=null){var y=a.updateQueue;y.lastEffect=null,y.events=null,y.stores=null,y.memoCache!=null&&(y.memoCache.index=0)}U.H=ny,y=s(u,f)}while(Os);return y}function zR(){var a=U.H,s=a.useState()[0];return s=typeof s.then=="function"?Wo(s):s,a=a.useState()[0],(dt!==null?dt.memoizedState:null)!==a&&(Be.flags|=1024),s}function Vh(){var a=Ju!==0;return Ju=0,a}function Gh(a,s,u){s.updateQueue=a.updateQueue,s.flags&=-2053,a.lanes&=~u}function qh(a){if(Zu){for(a=a.memoizedState;a!==null;){var s=a.queue;s!==null&&(s.pending=null),a=a.next}Zu=!1}Wr=0,Mt=dt=Be=null,Os=!1,Qo=Ju=0,Ls=null}function hn(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Mt===null?Be.memoizedState=Mt=a:Mt=Mt.next=a,Mt}function Ot(){if(dt===null){var a=Be.alternate;a=a!==null?a.memoizedState:null}else a=dt.next;var s=Mt===null?Be.memoizedState:Mt.next;if(s!==null)Mt=s,dt=a;else{if(a===null)throw Be.alternate===null?Error(r(467)):Error(r(310));dt=a,a={memoizedState:dt.memoizedState,baseState:dt.baseState,baseQueue:dt.baseQueue,queue:dt.queue,next:null},Mt===null?Be.memoizedState=Mt=a:Mt=Mt.next=a}return Mt}function ec(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Wo(a){var s=Qo;return Qo+=1,Ls===null&&(Ls=[]),a=cE(Ls,a,s),s=Be,(Mt===null?s.memoizedState:Mt.next)===null&&(s=s.alternate,U.H=s===null||s.memoizedState===null?ty:am),a}function tc(a){if(a!==null&&typeof a=="object"){if(typeof a.then=="function")return Wo(a);if(a.$$typeof===N)return tn(a)}throw Error(r(438,String(a)))}function Yh(a){var s=null,u=Be.updateQueue;if(u!==null&&(s=u.memoCache),s==null){var f=Be.alternate;f!==null&&(f=f.updateQueue,f!==null&&(f=f.memoCache,f!=null&&(s={data:f.data.map(function(g){return g.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),u===null&&(u=ec(),Be.updateQueue=u),u.memoCache=s,u=s.data[s.index],u===void 0)for(u=s.data[s.index]=Array(a),f=0;f<a;f++)u[f]=V;return s.index++,u}function Kr(a,s){return typeof s=="function"?s(a):s}function nc(a){var s=Ot();return Xh(s,dt,a)}function Xh(a,s,u){var f=a.queue;if(f===null)throw Error(r(311));f.lastRenderedReducer=u;var g=a.baseQueue,y=f.pending;if(y!==null){if(g!==null){var w=g.next;g.next=y.next,y.next=w}s.baseQueue=g=y,f.pending=null}if(y=a.baseState,g===null)a.memoizedState=y;else{s=g.next;var R=w=null,$=null,K=s,se=!1;do{var de=K.lane&-536870913;if(de!==K.lane?(Xe&de)===de:(Wr&de)===de){var Z=K.revertLane;if(Z===0)$!==null&&($=$.next={lane:0,revertLane:0,gesture:null,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null}),de===Cs&&(se=!0);else if((Wr&Z)===Z){K=K.next,Z===Cs&&(se=!0);continue}else de={lane:0,revertLane:K.revertLane,gesture:null,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null},$===null?(R=$=de,w=y):$=$.next=de,Be.lanes|=Z,Ia|=Z;de=K.action,wi&&u(y,de),y=K.hasEagerState?K.eagerState:u(y,de)}else Z={lane:de,revertLane:K.revertLane,gesture:K.gesture,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null},$===null?(R=$=Z,w=y):$=$.next=Z,Be.lanes|=de,Ia|=de;K=K.next}while(K!==null&&K!==s);if($===null?w=y:$.next=R,!In(y,a.memoizedState)&&(Pt=!0,se&&(u=ws,u!==null)))throw u;a.memoizedState=y,a.baseState=w,a.baseQueue=$,f.lastRenderedState=y}return g===null&&(f.lanes=0),[a.memoizedState,f.dispatch]}function Qh(a){var s=Ot(),u=s.queue;if(u===null)throw Error(r(311));u.lastRenderedReducer=a;var f=u.dispatch,g=u.pending,y=s.memoizedState;if(g!==null){u.pending=null;var w=g=g.next;do y=a(y,w.action),w=w.next;while(w!==g);In(y,s.memoizedState)||(Pt=!0),s.memoizedState=y,s.baseQueue===null&&(s.baseState=y),u.lastRenderedState=y}return[y,f]}function xE(a,s,u){var f=Be,g=Ot(),y=Ke;if(y){if(u===void 0)throw Error(r(407));u=u()}else u=s();var w=!In((dt||g).memoizedState,u);if(w&&(g.memoizedState=u,Pt=!0),g=g.queue,Zh(SE.bind(null,f,g,a),[a]),g.getSnapshot!==s||w||Mt!==null&&Mt.memoizedState.tag&1){if(f.flags|=2048,Is(9,{destroy:void 0},vE.bind(null,f,g,u,s),null),gt===null)throw Error(r(349));y||(Wr&127)!==0||TE(f,s,u)}return u}function TE(a,s,u){a.flags|=16384,a={getSnapshot:s,value:u},s=Be.updateQueue,s===null?(s=ec(),Be.updateQueue=s,s.stores=[a]):(u=s.stores,u===null?s.stores=[a]:u.push(a))}function vE(a,s,u,f){s.value=u,s.getSnapshot=f,AE(s)&&CE(a)}function SE(a,s,u){return u(function(){AE(s)&&CE(a)})}function AE(a){var s=a.getSnapshot;a=a.value;try{var u=s();return!In(a,u)}catch{return!0}}function CE(a){var s=Ei(a,2);s!==null&&wn(s,a,2)}function Wh(a){var s=hn();if(typeof a=="function"){var u=a;if(a=u(),wi){_n(!0);try{u()}finally{_n(!1)}}}return s.memoizedState=s.baseState=a,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kr,lastRenderedState:a},s}function wE(a,s,u,f){return a.baseState=u,Xh(a,dt,typeof f=="function"?f:Kr)}function FR(a,s,u,f,g){if(ic(a))throw Error(r(485));if(a=s.action,a!==null){var y={payload:g,action:a,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(w){y.listeners.push(w)}};U.T!==null?u(!0):y.isTransition=!1,f(y),u=s.pending,u===null?(y.next=s.pending=y,kE(s,y)):(y.next=u.next,s.pending=u.next=y)}}function kE(a,s){var u=s.action,f=s.payload,g=a.state;if(s.isTransition){var y=U.T,w={};U.T=w;try{var R=u(g,f),$=U.S;$!==null&&$(w,R),NE(a,s,R)}catch(K){Kh(a,s,K)}finally{y!==null&&w.types!==null&&(y.types=w.types),U.T=y}}else try{y=u(g,f),NE(a,s,y)}catch(K){Kh(a,s,K)}}function NE(a,s,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(f){RE(a,s,f)},function(f){return Kh(a,s,f)}):RE(a,s,u)}function RE(a,s,u){s.status="fulfilled",s.value=u,OE(s),a.state=u,s=a.pending,s!==null&&(u=s.next,u===s?a.pending=null:(u=u.next,s.next=u,kE(a,u)))}function Kh(a,s,u){var f=a.pending;if(a.pending=null,f!==null){f=f.next;do s.status="rejected",s.reason=u,OE(s),s=s.next;while(s!==f)}a.action=null}function OE(a){a=a.listeners;for(var s=0;s<a.length;s++)(0,a[s])()}function LE(a,s){return s}function IE(a,s){if(Ke){var u=gt.formState;if(u!==null){e:{var f=Be;if(Ke){if(_t){t:{for(var g=_t,y=Kn;g.nodeType!==8;){if(!y){g=null;break t}if(g=Jn(g.nextSibling),g===null){g=null;break t}}y=g.data,g=y==="F!"||y==="F"?g:null}if(g){_t=Jn(g.nextSibling),f=g.data==="F!";break e}}Sa(f)}f=!1}f&&(s=u[0])}}return u=hn(),u.memoizedState=u.baseState=s,f={pending:null,lanes:0,dispatch:null,lastRenderedReducer:LE,lastRenderedState:s},u.queue=f,u=ZE.bind(null,Be,f),f.dispatch=u,f=Wh(!1),y=rm.bind(null,Be,!1,f.queue),f=hn(),g={state:s,dispatch:null,action:a,pending:null},f.queue=g,u=FR.bind(null,Be,g,y,u),g.dispatch=u,f.memoizedState=a,[s,u,!1]}function DE(a){var s=Ot();return ME(s,dt,a)}function ME(a,s,u){if(s=Xh(a,s,LE)[0],a=nc(Kr)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var f=Wo(s)}catch(w){throw w===ks?qu:w}else f=s;s=Ot();var g=s.queue,y=g.dispatch;return u!==s.memoizedState&&(Be.flags|=2048,Is(9,{destroy:void 0},$R.bind(null,g,u),null)),[f,y,a]}function $R(a,s){a.action=s}function PE(a){var s=Ot(),u=dt;if(u!==null)return ME(s,u,a);Ot(),s=s.memoizedState,u=Ot();var f=u.queue.dispatch;return u.memoizedState=a,[s,f,!1]}function Is(a,s,u,f){return a={tag:a,create:u,deps:f,inst:s,next:null},s=Be.updateQueue,s===null&&(s=ec(),Be.updateQueue=s),u=s.lastEffect,u===null?s.lastEffect=a.next=a:(f=u.next,u.next=a,a.next=f,s.lastEffect=a),a}function BE(){return Ot().memoizedState}function rc(a,s,u,f){var g=hn();Be.flags|=a,g.memoizedState=Is(1|s,{destroy:void 0},u,f===void 0?null:f)}function ac(a,s,u,f){var g=Ot();f=f===void 0?null:f;var y=g.memoizedState.inst;dt!==null&&f!==null&&Fh(f,dt.memoizedState.deps)?g.memoizedState=Is(s,y,u,f):(Be.flags|=a,g.memoizedState=Is(1|s,y,u,f))}function jE(a,s){rc(8390656,8,a,s)}function Zh(a,s){ac(2048,8,a,s)}function VR(a){Be.flags|=4;var s=Be.updateQueue;if(s===null)s=ec(),Be.updateQueue=s,s.events=[a];else{var u=s.events;u===null?s.events=[a]:u.push(a)}}function UE(a){var s=Ot().memoizedState;return VR({ref:s,nextImpl:a}),function(){if((at&2)!==0)throw Error(r(440));return s.impl.apply(void 0,arguments)}}function HE(a,s){return ac(4,2,a,s)}function zE(a,s){return ac(4,4,a,s)}function FE(a,s){if(typeof s=="function"){a=a();var u=s(a);return function(){typeof u=="function"?u():s(null)}}if(s!=null)return a=a(),s.current=a,function(){s.current=null}}function $E(a,s,u){u=u!=null?u.concat([a]):null,ac(4,4,FE.bind(null,s,a),u)}function Jh(){}function VE(a,s){var u=Ot();s=s===void 0?null:s;var f=u.memoizedState;return s!==null&&Fh(s,f[1])?f[0]:(u.memoizedState=[a,s],a)}function GE(a,s){var u=Ot();s=s===void 0?null:s;var f=u.memoizedState;if(s!==null&&Fh(s,f[1]))return f[0];if(f=a(),wi){_n(!0);try{a()}finally{_n(!1)}}return u.memoizedState=[f,s],f}function em(a,s,u){return u===void 0||(Wr&1073741824)!==0&&(Xe&261930)===0?a.memoizedState=s:(a.memoizedState=u,a=qy(),Be.lanes|=a,Ia|=a,u)}function qE(a,s,u,f){return In(u,s)?u:Rs.current!==null?(a=em(a,u,f),In(a,s)||(Pt=!0),a):(Wr&42)===0||(Wr&1073741824)!==0&&(Xe&261930)===0?(Pt=!0,a.memoizedState=u):(a=qy(),Be.lanes|=a,Ia|=a,s)}function YE(a,s,u,f,g){var y=ee.p;ee.p=y!==0&&8>y?y:8;var w=U.T,R={};U.T=R,rm(a,!1,s,u);try{var $=g(),K=U.S;if(K!==null&&K(R,$),$!==null&&typeof $=="object"&&typeof $.then=="function"){var se=UR($,f);Ko(a,s,se,Un(a))}else Ko(a,s,f,Un(a))}catch(de){Ko(a,s,{then:function(){},status:"rejected",reason:de},Un())}finally{ee.p=y,w!==null&&R.types!==null&&(w.types=R.types),U.T=w}}function GR(){}function tm(a,s,u,f){if(a.tag!==5)throw Error(r(476));var g=XE(a).queue;YE(a,g,s,ce,u===null?GR:function(){return QE(a),u(f)})}function XE(a){var s=a.memoizedState;if(s!==null)return s;s={memoizedState:ce,baseState:ce,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kr,lastRenderedState:ce},next:null};var u={};return s.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kr,lastRenderedState:u},next:null},a.memoizedState=s,a=a.alternate,a!==null&&(a.memoizedState=s),s}function QE(a){var s=XE(a);s.next===null&&(s=a.alternate.memoizedState),Ko(a,s.next.queue,{},Un())}function nm(){return tn(ml)}function WE(){return Ot().memoizedState}function KE(){return Ot().memoizedState}function qR(a){for(var s=a.return;s!==null;){switch(s.tag){case 24:case 3:var u=Un();a=wa(u);var f=ka(s,a,u);f!==null&&(wn(f,s,u),qo(f,s,u)),s={cache:Oh()},a.payload=s;return}s=s.return}}function YR(a,s,u){var f=Un();u={lane:f,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},ic(a)?JE(s,u):(u=_h(a,s,u,f),u!==null&&(wn(u,a,f),ey(u,s,f)))}function ZE(a,s,u){var f=Un();Ko(a,s,u,f)}function Ko(a,s,u,f){var g={lane:f,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(ic(a))JE(s,g);else{var y=a.alternate;if(a.lanes===0&&(y===null||y.lanes===0)&&(y=s.lastRenderedReducer,y!==null))try{var w=s.lastRenderedState,R=y(w,u);if(g.hasEagerState=!0,g.eagerState=R,In(R,w))return Uu(a,s,g,0),gt===null&&ju(),!1}catch{}if(u=_h(a,s,g,f),u!==null)return wn(u,a,f),ey(u,s,f),!0}return!1}function rm(a,s,u,f){if(f={lane:2,revertLane:Mm(),gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null},ic(a)){if(s)throw Error(r(479))}else s=_h(a,u,f,2),s!==null&&wn(s,a,2)}function ic(a){var s=a.alternate;return a===Be||s!==null&&s===Be}function JE(a,s){Os=Zu=!0;var u=a.pending;u===null?s.next=s:(s.next=u.next,u.next=s),a.pending=s}function ey(a,s,u){if((u&4194048)!==0){var f=s.lanes;f&=a.pendingLanes,u|=f,s.lanes=u,ib(a,u)}}var Zo={readContext:tn,use:tc,useCallback:At,useContext:At,useEffect:At,useImperativeHandle:At,useLayoutEffect:At,useInsertionEffect:At,useMemo:At,useReducer:At,useRef:At,useState:At,useDebugValue:At,useDeferredValue:At,useTransition:At,useSyncExternalStore:At,useId:At,useHostTransitionStatus:At,useFormState:At,useActionState:At,useOptimistic:At,useMemoCache:At,useCacheRefresh:At};Zo.useEffectEvent=At;var ty={readContext:tn,use:tc,useCallback:function(a,s){return hn().memoizedState=[a,s===void 0?null:s],a},useContext:tn,useEffect:jE,useImperativeHandle:function(a,s,u){u=u!=null?u.concat([a]):null,rc(4194308,4,FE.bind(null,s,a),u)},useLayoutEffect:function(a,s){return rc(4194308,4,a,s)},useInsertionEffect:function(a,s){rc(4,2,a,s)},useMemo:function(a,s){var u=hn();s=s===void 0?null:s;var f=a();if(wi){_n(!0);try{a()}finally{_n(!1)}}return u.memoizedState=[f,s],f},useReducer:function(a,s,u){var f=hn();if(u!==void 0){var g=u(s);if(wi){_n(!0);try{u(s)}finally{_n(!1)}}}else g=s;return f.memoizedState=f.baseState=g,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:g},f.queue=a,a=a.dispatch=YR.bind(null,Be,a),[f.memoizedState,a]},useRef:function(a){var s=hn();return a={current:a},s.memoizedState=a},useState:function(a){a=Wh(a);var s=a.queue,u=ZE.bind(null,Be,s);return s.dispatch=u,[a.memoizedState,u]},useDebugValue:Jh,useDeferredValue:function(a,s){var u=hn();return em(u,a,s)},useTransition:function(){var a=Wh(!1);return a=YE.bind(null,Be,a.queue,!0,!1),hn().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,s,u){var f=Be,g=hn();if(Ke){if(u===void 0)throw Error(r(407));u=u()}else{if(u=s(),gt===null)throw Error(r(349));(Xe&127)!==0||TE(f,s,u)}g.memoizedState=u;var y={value:u,getSnapshot:s};return g.queue=y,jE(SE.bind(null,f,y,a),[a]),f.flags|=2048,Is(9,{destroy:void 0},vE.bind(null,f,y,u,s),null),u},useId:function(){var a=hn(),s=gt.identifierPrefix;if(Ke){var u=Sr,f=vr;u=(f&~(1<<32-pt(f)-1)).toString(32)+u,s="_"+s+"R_"+u,u=Ju++,0<u&&(s+="H"+u.toString(32)),s+="_"}else u=HR++,s="_"+s+"r_"+u.toString(32)+"_";return a.memoizedState=s},useHostTransitionStatus:nm,useFormState:IE,useActionState:IE,useOptimistic:function(a){var s=hn();s.memoizedState=s.baseState=a;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=u,s=rm.bind(null,Be,!0,u),u.dispatch=s,[a,s]},useMemoCache:Yh,useCacheRefresh:function(){return hn().memoizedState=qR.bind(null,Be)},useEffectEvent:function(a){var s=hn(),u={impl:a};return s.memoizedState=u,function(){if((at&2)!==0)throw Error(r(440));return u.impl.apply(void 0,arguments)}}},am={readContext:tn,use:tc,useCallback:VE,useContext:tn,useEffect:Zh,useImperativeHandle:$E,useInsertionEffect:HE,useLayoutEffect:zE,useMemo:GE,useReducer:nc,useRef:BE,useState:function(){return nc(Kr)},useDebugValue:Jh,useDeferredValue:function(a,s){var u=Ot();return qE(u,dt.memoizedState,a,s)},useTransition:function(){var a=nc(Kr)[0],s=Ot().memoizedState;return[typeof a=="boolean"?a:Wo(a),s]},useSyncExternalStore:xE,useId:WE,useHostTransitionStatus:nm,useFormState:DE,useActionState:DE,useOptimistic:function(a,s){var u=Ot();return wE(u,dt,a,s)},useMemoCache:Yh,useCacheRefresh:KE};am.useEffectEvent=UE;var ny={readContext:tn,use:tc,useCallback:VE,useContext:tn,useEffect:Zh,useImperativeHandle:$E,useInsertionEffect:HE,useLayoutEffect:zE,useMemo:GE,useReducer:Qh,useRef:BE,useState:function(){return Qh(Kr)},useDebugValue:Jh,useDeferredValue:function(a,s){var u=Ot();return dt===null?em(u,a,s):qE(u,dt.memoizedState,a,s)},useTransition:function(){var a=Qh(Kr)[0],s=Ot().memoizedState;return[typeof a=="boolean"?a:Wo(a),s]},useSyncExternalStore:xE,useId:WE,useHostTransitionStatus:nm,useFormState:PE,useActionState:PE,useOptimistic:function(a,s){var u=Ot();return dt!==null?wE(u,dt,a,s):(u.baseState=a,[a,u.queue.dispatch])},useMemoCache:Yh,useCacheRefresh:KE};ny.useEffectEvent=UE;function im(a,s,u,f){s=a.memoizedState,u=u(f,s),u=u==null?s:m({},s,u),a.memoizedState=u,a.lanes===0&&(a.updateQueue.baseState=u)}var sm={enqueueSetState:function(a,s,u){a=a._reactInternals;var f=Un(),g=wa(f);g.payload=s,u!=null&&(g.callback=u),s=ka(a,g,f),s!==null&&(wn(s,a,f),qo(s,a,f))},enqueueReplaceState:function(a,s,u){a=a._reactInternals;var f=Un(),g=wa(f);g.tag=1,g.payload=s,u!=null&&(g.callback=u),s=ka(a,g,f),s!==null&&(wn(s,a,f),qo(s,a,f))},enqueueForceUpdate:function(a,s){a=a._reactInternals;var u=Un(),f=wa(u);f.tag=2,s!=null&&(f.callback=s),s=ka(a,f,u),s!==null&&(wn(s,a,u),qo(s,a,u))}};function ry(a,s,u,f,g,y,w){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(f,y,w):s.prototype&&s.prototype.isPureReactComponent?!jo(u,f)||!jo(g,y):!0}function ay(a,s,u,f){a=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(u,f),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(u,f),s.state!==a&&sm.enqueueReplaceState(s,s.state,null)}function ki(a,s){var u=s;if("ref"in s){u={};for(var f in s)f!=="ref"&&(u[f]=s[f])}if(a=a.defaultProps){u===s&&(u=m({},u));for(var g in a)u[g]===void 0&&(u[g]=a[g])}return u}function iy(a){Bu(a)}function sy(a){console.error(a)}function oy(a){Bu(a)}function sc(a,s){try{var u=a.onUncaughtError;u(s.value,{componentStack:s.stack})}catch(f){setTimeout(function(){throw f})}}function ly(a,s,u){try{var f=a.onCaughtError;f(u.value,{componentStack:u.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(g){setTimeout(function(){throw g})}}function om(a,s,u){return u=wa(u),u.tag=3,u.payload={element:null},u.callback=function(){sc(a,s)},u}function uy(a){return a=wa(a),a.tag=3,a}function cy(a,s,u,f){var g=u.type.getDerivedStateFromError;if(typeof g=="function"){var y=f.value;a.payload=function(){return g(y)},a.callback=function(){ly(s,u,f)}}var w=u.stateNode;w!==null&&typeof w.componentDidCatch=="function"&&(a.callback=function(){ly(s,u,f),typeof g!="function"&&(Da===null?Da=new Set([this]):Da.add(this));var R=f.stack;this.componentDidCatch(f.value,{componentStack:R!==null?R:""})})}function XR(a,s,u,f,g){if(u.flags|=32768,f!==null&&typeof f=="object"&&typeof f.then=="function"){if(s=u.alternate,s!==null&&As(s,u,g,!0),u=Mn.current,u!==null){switch(u.tag){case 31:case 13:return Zn===null?Ec():u.alternate===null&&Ct===0&&(Ct=3),u.flags&=-257,u.flags|=65536,u.lanes=g,f===Yu?u.flags|=16384:(s=u.updateQueue,s===null?u.updateQueue=new Set([f]):s.add(f),Lm(a,f,g)),!1;case 22:return u.flags|=65536,f===Yu?u.flags|=16384:(s=u.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([f])},u.updateQueue=s):(u=s.retryQueue,u===null?s.retryQueue=new Set([f]):u.add(f)),Lm(a,f,g)),!1}throw Error(r(435,u.tag))}return Lm(a,f,g),Ec(),!1}if(Ke)return s=Mn.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=g,f!==Ch&&(a=Error(r(422),{cause:f}),zo(Xn(a,u)))):(f!==Ch&&(s=Error(r(423),{cause:f}),zo(Xn(s,u))),a=a.current.alternate,a.flags|=65536,g&=-g,a.lanes|=g,f=Xn(f,u),g=om(a.stateNode,f,g),Bh(a,g),Ct!==4&&(Ct=2)),!1;var y=Error(r(520),{cause:f});if(y=Xn(y,u),sl===null?sl=[y]:sl.push(y),Ct!==4&&(Ct=2),s===null)return!0;f=Xn(f,u),u=s;do{switch(u.tag){case 3:return u.flags|=65536,a=g&-g,u.lanes|=a,a=om(u.stateNode,f,a),Bh(u,a),!1;case 1:if(s=u.type,y=u.stateNode,(u.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(Da===null||!Da.has(y))))return u.flags|=65536,g&=-g,u.lanes|=g,g=uy(g),cy(g,a,u,f),Bh(u,g),!1}u=u.return}while(u!==null);return!1}var lm=Error(r(461)),Pt=!1;function nn(a,s,u,f){s.child=a===null?mE(s,null,u,f):Ci(s,a.child,u,f)}function dy(a,s,u,f,g){u=u.render;var y=s.ref;if("ref"in f){var w={};for(var R in f)R!=="ref"&&(w[R]=f[R])}else w=f;return Ti(s),f=$h(a,s,u,w,y,g),R=Vh(),a!==null&&!Pt?(Gh(a,s,g),Zr(a,s,g)):(Ke&&R&&Sh(s),s.flags|=1,nn(a,s,f,g),s.child)}function fy(a,s,u,f,g){if(a===null){var y=u.type;return typeof y=="function"&&!xh(y)&&y.defaultProps===void 0&&u.compare===null?(s.tag=15,s.type=y,hy(a,s,y,f,g)):(a=zu(u.type,null,f,s,s.mode,g),a.ref=s.ref,a.return=s,s.child=a)}if(y=a.child,!gm(a,g)){var w=y.memoizedProps;if(u=u.compare,u=u!==null?u:jo,u(w,f)&&a.ref===s.ref)return Zr(a,s,g)}return s.flags|=1,a=qr(y,f),a.ref=s.ref,a.return=s,s.child=a}function hy(a,s,u,f,g){if(a!==null){var y=a.memoizedProps;if(jo(y,f)&&a.ref===s.ref)if(Pt=!1,s.pendingProps=f=y,gm(a,g))(a.flags&131072)!==0&&(Pt=!0);else return s.lanes=a.lanes,Zr(a,s,g)}return um(a,s,u,f,g)}function my(a,s,u,f){var g=f.children,y=a!==null?a.memoizedState:null;if(a===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),f.mode==="hidden"){if((s.flags&128)!==0){if(y=y!==null?y.baseLanes|u:u,a!==null){for(f=s.child=a.child,g=0;f!==null;)g=g|f.lanes|f.childLanes,f=f.sibling;f=g&~y}else f=0,s.child=null;return py(a,s,y,u,f)}if((u&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},a!==null&&Gu(s,y!==null?y.cachePool:null),y!==null?bE(s,y):Uh(),EE(s);else return f=s.lanes=536870912,py(a,s,y!==null?y.baseLanes|u:u,u,f)}else y!==null?(Gu(s,y.cachePool),bE(s,y),Ra(),s.memoizedState=null):(a!==null&&Gu(s,null),Uh(),Ra());return nn(a,s,g,u),s.child}function Jo(a,s){return a!==null&&a.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function py(a,s,u,f,g){var y=Ih();return y=y===null?null:{parent:Dt._currentValue,pool:y},s.memoizedState={baseLanes:u,cachePool:y},a!==null&&Gu(s,null),Uh(),EE(s),a!==null&&As(a,s,f,!0),s.childLanes=g,null}function oc(a,s){return s=uc({mode:s.mode,children:s.children},a.mode),s.ref=a.ref,a.child=s,s.return=a,s}function gy(a,s,u){return Ci(s,a.child,null,u),a=oc(s,s.pendingProps),a.flags|=2,Pn(s),s.memoizedState=null,a}function QR(a,s,u){var f=s.pendingProps,g=(s.flags&128)!==0;if(s.flags&=-129,a===null){if(Ke){if(f.mode==="hidden")return a=oc(s,f),s.lanes=536870912,Jo(null,a);if(zh(s),(a=_t)?(a=k_(a,Kn),a=a!==null&&a.data==="&"?a:null,a!==null&&(s.memoizedState={dehydrated:a,treeContext:Ta!==null?{id:vr,overflow:Sr}:null,retryLane:536870912,hydrationErrors:null},u=Jb(a),u.return=s,s.child=u,en=s,_t=null)):a=null,a===null)throw Sa(s);return s.lanes=536870912,null}return oc(s,f)}var y=a.memoizedState;if(y!==null){var w=y.dehydrated;if(zh(s),g)if(s.flags&256)s.flags&=-257,s=gy(a,s,u);else if(s.memoizedState!==null)s.child=a.child,s.flags|=128,s=null;else throw Error(r(558));else if(Pt||As(a,s,u,!1),g=(u&a.childLanes)!==0,Pt||g){if(f=gt,f!==null&&(w=sb(f,u),w!==0&&w!==y.retryLane))throw y.retryLane=w,Ei(a,w),wn(f,a,w),lm;Ec(),s=gy(a,s,u)}else a=y.treeContext,_t=Jn(w.nextSibling),en=s,Ke=!0,va=null,Kn=!1,a!==null&&nE(s,a),s=oc(s,f),s.flags|=4096;return s}return a=qr(a.child,{mode:f.mode,children:f.children}),a.ref=s.ref,s.child=a,a.return=s,a}function lc(a,s){var u=s.ref;if(u===null)a!==null&&a.ref!==null&&(s.flags|=4194816);else{if(typeof u!="function"&&typeof u!="object")throw Error(r(284));(a===null||a.ref!==u)&&(s.flags|=4194816)}}function um(a,s,u,f,g){return Ti(s),u=$h(a,s,u,f,void 0,g),f=Vh(),a!==null&&!Pt?(Gh(a,s,g),Zr(a,s,g)):(Ke&&f&&Sh(s),s.flags|=1,nn(a,s,u,g),s.child)}function by(a,s,u,f,g,y){return Ti(s),s.updateQueue=null,u=_E(s,f,u,g),yE(a),f=Vh(),a!==null&&!Pt?(Gh(a,s,y),Zr(a,s,y)):(Ke&&f&&Sh(s),s.flags|=1,nn(a,s,u,y),s.child)}function Ey(a,s,u,f,g){if(Ti(s),s.stateNode===null){var y=xs,w=u.contextType;typeof w=="object"&&w!==null&&(y=tn(w)),y=new u(f,y),s.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,y.updater=sm,s.stateNode=y,y._reactInternals=s,y=s.stateNode,y.props=f,y.state=s.memoizedState,y.refs={},Mh(s),w=u.contextType,y.context=typeof w=="object"&&w!==null?tn(w):xs,y.state=s.memoizedState,w=u.getDerivedStateFromProps,typeof w=="function"&&(im(s,u,w,f),y.state=s.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(w=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),w!==y.state&&sm.enqueueReplaceState(y,y.state,null),Xo(s,f,y,g),Yo(),y.state=s.memoizedState),typeof y.componentDidMount=="function"&&(s.flags|=4194308),f=!0}else if(a===null){y=s.stateNode;var R=s.memoizedProps,$=ki(u,R);y.props=$;var K=y.context,se=u.contextType;w=xs,typeof se=="object"&&se!==null&&(w=tn(se));var de=u.getDerivedStateFromProps;se=typeof de=="function"||typeof y.getSnapshotBeforeUpdate=="function",R=s.pendingProps!==R,se||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(R||K!==w)&&ay(s,y,f,w),Ca=!1;var Z=s.memoizedState;y.state=Z,Xo(s,f,y,g),Yo(),K=s.memoizedState,R||Z!==K||Ca?(typeof de=="function"&&(im(s,u,de,f),K=s.memoizedState),($=Ca||ry(s,u,$,f,Z,K,w))?(se||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount()),typeof y.componentDidMount=="function"&&(s.flags|=4194308)):(typeof y.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=f,s.memoizedState=K),y.props=f,y.state=K,y.context=w,f=$):(typeof y.componentDidMount=="function"&&(s.flags|=4194308),f=!1)}else{y=s.stateNode,Ph(a,s),w=s.memoizedProps,se=ki(u,w),y.props=se,de=s.pendingProps,Z=y.context,K=u.contextType,$=xs,typeof K=="object"&&K!==null&&($=tn(K)),R=u.getDerivedStateFromProps,(K=typeof R=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(w!==de||Z!==$)&&ay(s,y,f,$),Ca=!1,Z=s.memoizedState,y.state=Z,Xo(s,f,y,g),Yo();var ne=s.memoizedState;w!==de||Z!==ne||Ca||a!==null&&a.dependencies!==null&&$u(a.dependencies)?(typeof R=="function"&&(im(s,u,R,f),ne=s.memoizedState),(se=Ca||ry(s,u,se,f,Z,ne,$)||a!==null&&a.dependencies!==null&&$u(a.dependencies))?(K||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(f,ne,$),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(f,ne,$)),typeof y.componentDidUpdate=="function"&&(s.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof y.componentDidUpdate!="function"||w===a.memoizedProps&&Z===a.memoizedState||(s.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||w===a.memoizedProps&&Z===a.memoizedState||(s.flags|=1024),s.memoizedProps=f,s.memoizedState=ne),y.props=f,y.state=ne,y.context=$,f=se):(typeof y.componentDidUpdate!="function"||w===a.memoizedProps&&Z===a.memoizedState||(s.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||w===a.memoizedProps&&Z===a.memoizedState||(s.flags|=1024),f=!1)}return y=f,lc(a,s),f=(s.flags&128)!==0,y||f?(y=s.stateNode,u=f&&typeof u.getDerivedStateFromError!="function"?null:y.render(),s.flags|=1,a!==null&&f?(s.child=Ci(s,a.child,null,g),s.child=Ci(s,null,u,g)):nn(a,s,u,g),s.memoizedState=y.state,a=s.child):a=Zr(a,s,g),a}function yy(a,s,u,f){return _i(),s.flags|=256,nn(a,s,u,f),s.child}var cm={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function dm(a){return{baseLanes:a,cachePool:lE()}}function fm(a,s,u){return a=a!==null?a.childLanes&~u:0,s&&(a|=jn),a}function _y(a,s,u){var f=s.pendingProps,g=!1,y=(s.flags&128)!==0,w;if((w=y)||(w=a!==null&&a.memoizedState===null?!1:(Rt.current&2)!==0),w&&(g=!0,s.flags&=-129),w=(s.flags&32)!==0,s.flags&=-33,a===null){if(Ke){if(g?Na(s):Ra(),(a=_t)?(a=k_(a,Kn),a=a!==null&&a.data!=="&"?a:null,a!==null&&(s.memoizedState={dehydrated:a,treeContext:Ta!==null?{id:vr,overflow:Sr}:null,retryLane:536870912,hydrationErrors:null},u=Jb(a),u.return=s,s.child=u,en=s,_t=null)):a=null,a===null)throw Sa(s);return Xm(a)?s.lanes=32:s.lanes=536870912,null}var R=f.children;return f=f.fallback,g?(Ra(),g=s.mode,R=uc({mode:"hidden",children:R},g),f=yi(f,g,u,null),R.return=s,f.return=s,R.sibling=f,s.child=R,f=s.child,f.memoizedState=dm(u),f.childLanes=fm(a,w,u),s.memoizedState=cm,Jo(null,f)):(Na(s),hm(s,R))}var $=a.memoizedState;if($!==null&&(R=$.dehydrated,R!==null)){if(y)s.flags&256?(Na(s),s.flags&=-257,s=mm(a,s,u)):s.memoizedState!==null?(Ra(),s.child=a.child,s.flags|=128,s=null):(Ra(),R=f.fallback,g=s.mode,f=uc({mode:"visible",children:f.children},g),R=yi(R,g,u,null),R.flags|=2,f.return=s,R.return=s,f.sibling=R,s.child=f,Ci(s,a.child,null,u),f=s.child,f.memoizedState=dm(u),f.childLanes=fm(a,w,u),s.memoizedState=cm,s=Jo(null,f));else if(Na(s),Xm(R)){if(w=R.nextSibling&&R.nextSibling.dataset,w)var K=w.dgst;w=K,f=Error(r(419)),f.stack="",f.digest=w,zo({value:f,source:null,stack:null}),s=mm(a,s,u)}else if(Pt||As(a,s,u,!1),w=(u&a.childLanes)!==0,Pt||w){if(w=gt,w!==null&&(f=sb(w,u),f!==0&&f!==$.retryLane))throw $.retryLane=f,Ei(a,f),wn(w,a,f),lm;Ym(R)||Ec(),s=mm(a,s,u)}else Ym(R)?(s.flags|=192,s.child=a.child,s=null):(a=$.treeContext,_t=Jn(R.nextSibling),en=s,Ke=!0,va=null,Kn=!1,a!==null&&nE(s,a),s=hm(s,f.children),s.flags|=4096);return s}return g?(Ra(),R=f.fallback,g=s.mode,$=a.child,K=$.sibling,f=qr($,{mode:"hidden",children:f.children}),f.subtreeFlags=$.subtreeFlags&65011712,K!==null?R=qr(K,R):(R=yi(R,g,u,null),R.flags|=2),R.return=s,f.return=s,f.sibling=R,s.child=f,Jo(null,f),f=s.child,R=a.child.memoizedState,R===null?R=dm(u):(g=R.cachePool,g!==null?($=Dt._currentValue,g=g.parent!==$?{parent:$,pool:$}:g):g=lE(),R={baseLanes:R.baseLanes|u,cachePool:g}),f.memoizedState=R,f.childLanes=fm(a,w,u),s.memoizedState=cm,Jo(a.child,f)):(Na(s),u=a.child,a=u.sibling,u=qr(u,{mode:"visible",children:f.children}),u.return=s,u.sibling=null,a!==null&&(w=s.deletions,w===null?(s.deletions=[a],s.flags|=16):w.push(a)),s.child=u,s.memoizedState=null,u)}function hm(a,s){return s=uc({mode:"visible",children:s},a.mode),s.return=a,a.child=s}function uc(a,s){return a=Dn(22,a,null,s),a.lanes=0,a}function mm(a,s,u){return Ci(s,a.child,null,u),a=hm(s,s.pendingProps.children),a.flags|=2,s.memoizedState=null,a}function xy(a,s,u){a.lanes|=s;var f=a.alternate;f!==null&&(f.lanes|=s),Nh(a.return,s,u)}function pm(a,s,u,f,g,y){var w=a.memoizedState;w===null?a.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:f,tail:u,tailMode:g,treeForkCount:y}:(w.isBackwards=s,w.rendering=null,w.renderingStartTime=0,w.last=f,w.tail=u,w.tailMode=g,w.treeForkCount=y)}function Ty(a,s,u){var f=s.pendingProps,g=f.revealOrder,y=f.tail;f=f.children;var w=Rt.current,R=(w&2)!==0;if(R?(w=w&1|2,s.flags|=128):w&=1,P(Rt,w),nn(a,s,f,u),f=Ke?Ho:0,!R&&a!==null&&(a.flags&128)!==0)e:for(a=s.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&xy(a,u,s);else if(a.tag===19)xy(a,u,s);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===s)break e;for(;a.sibling===null;){if(a.return===null||a.return===s)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}switch(g){case"forwards":for(u=s.child,g=null;u!==null;)a=u.alternate,a!==null&&Ku(a)===null&&(g=u),u=u.sibling;u=g,u===null?(g=s.child,s.child=null):(g=u.sibling,u.sibling=null),pm(s,!1,g,u,y,f);break;case"backwards":case"unstable_legacy-backwards":for(u=null,g=s.child,s.child=null;g!==null;){if(a=g.alternate,a!==null&&Ku(a)===null){s.child=g;break}a=g.sibling,g.sibling=u,u=g,g=a}pm(s,!0,u,null,y,f);break;case"together":pm(s,!1,null,null,void 0,f);break;default:s.memoizedState=null}return s.child}function Zr(a,s,u){if(a!==null&&(s.dependencies=a.dependencies),Ia|=s.lanes,(u&s.childLanes)===0)if(a!==null){if(As(a,s,u,!1),(u&s.childLanes)===0)return null}else return null;if(a!==null&&s.child!==a.child)throw Error(r(153));if(s.child!==null){for(a=s.child,u=qr(a,a.pendingProps),s.child=u,u.return=s;a.sibling!==null;)a=a.sibling,u=u.sibling=qr(a,a.pendingProps),u.return=s;u.sibling=null}return s.child}function gm(a,s){return(a.lanes&s)!==0?!0:(a=a.dependencies,!!(a!==null&&$u(a)))}function WR(a,s,u){switch(s.tag){case 3:ke(s,s.stateNode.containerInfo),Aa(s,Dt,a.memoizedState.cache),_i();break;case 27:case 5:De(s);break;case 4:ke(s,s.stateNode.containerInfo);break;case 10:Aa(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,zh(s),null;break;case 13:var f=s.memoizedState;if(f!==null)return f.dehydrated!==null?(Na(s),s.flags|=128,null):(u&s.child.childLanes)!==0?_y(a,s,u):(Na(s),a=Zr(a,s,u),a!==null?a.sibling:null);Na(s);break;case 19:var g=(a.flags&128)!==0;if(f=(u&s.childLanes)!==0,f||(As(a,s,u,!1),f=(u&s.childLanes)!==0),g){if(f)return Ty(a,s,u);s.flags|=128}if(g=s.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),P(Rt,Rt.current),f)break;return null;case 22:return s.lanes=0,my(a,s,u,s.pendingProps);case 24:Aa(s,Dt,a.memoizedState.cache)}return Zr(a,s,u)}function vy(a,s,u){if(a!==null)if(a.memoizedProps!==s.pendingProps)Pt=!0;else{if(!gm(a,u)&&(s.flags&128)===0)return Pt=!1,WR(a,s,u);Pt=(a.flags&131072)!==0}else Pt=!1,Ke&&(s.flags&1048576)!==0&&tE(s,Ho,s.index);switch(s.lanes=0,s.tag){case 16:e:{var f=s.pendingProps;if(a=Si(s.elementType),s.type=a,typeof a=="function")xh(a)?(f=ki(a,f),s.tag=1,s=Ey(null,s,a,f,u)):(s.tag=0,s=um(null,s,a,f,u));else{if(a!=null){var g=a.$$typeof;if(g===M){s.tag=11,s=dy(null,s,a,f,u);break e}else if(g===z){s.tag=14,s=fy(null,s,a,f,u);break e}}throw s=ue(a)||a,Error(r(306,s,""))}}return s;case 0:return um(a,s,s.type,s.pendingProps,u);case 1:return f=s.type,g=ki(f,s.pendingProps),Ey(a,s,f,g,u);case 3:e:{if(ke(s,s.stateNode.containerInfo),a===null)throw Error(r(387));f=s.pendingProps;var y=s.memoizedState;g=y.element,Ph(a,s),Xo(s,f,null,u);var w=s.memoizedState;if(f=w.cache,Aa(s,Dt,f),f!==y.cache&&Rh(s,[Dt],u,!0),Yo(),f=w.element,y.isDehydrated)if(y={element:f,isDehydrated:!1,cache:w.cache},s.updateQueue.baseState=y,s.memoizedState=y,s.flags&256){s=yy(a,s,f,u);break e}else if(f!==g){g=Xn(Error(r(424)),s),zo(g),s=yy(a,s,f,u);break e}else for(a=s.stateNode.containerInfo,a.nodeType===9?a=a.body:a=a.nodeName==="HTML"?a.ownerDocument.body:a,_t=Jn(a.firstChild),en=s,Ke=!0,va=null,Kn=!0,u=mE(s,null,f,u),s.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(_i(),f===g){s=Zr(a,s,u);break e}nn(a,s,f,u)}s=s.child}return s;case 26:return lc(a,s),a===null?(u=D_(s.type,null,s.pendingProps,null))?s.memoizedState=u:Ke||(u=s.type,a=s.pendingProps,f=Ac(ye.current).createElement(u),f[Jt]=s,f[xn]=a,rn(f,u,a),Yt(f),s.stateNode=f):s.memoizedState=D_(s.type,a.memoizedProps,s.pendingProps,a.memoizedState),null;case 27:return De(s),a===null&&Ke&&(f=s.stateNode=O_(s.type,s.pendingProps,ye.current),en=s,Kn=!0,g=_t,ja(s.type)?(Qm=g,_t=Jn(f.firstChild)):_t=g),nn(a,s,s.pendingProps.children,u),lc(a,s),a===null&&(s.flags|=4194304),s.child;case 5:return a===null&&Ke&&((g=f=_t)&&(f=CO(f,s.type,s.pendingProps,Kn),f!==null?(s.stateNode=f,en=s,_t=Jn(f.firstChild),Kn=!1,g=!0):g=!1),g||Sa(s)),De(s),g=s.type,y=s.pendingProps,w=a!==null?a.memoizedProps:null,f=y.children,Vm(g,y)?f=null:w!==null&&Vm(g,w)&&(s.flags|=32),s.memoizedState!==null&&(g=$h(a,s,zR,null,null,u),ml._currentValue=g),lc(a,s),nn(a,s,f,u),s.child;case 6:return a===null&&Ke&&((a=u=_t)&&(u=wO(u,s.pendingProps,Kn),u!==null?(s.stateNode=u,en=s,_t=null,a=!0):a=!1),a||Sa(s)),null;case 13:return _y(a,s,u);case 4:return ke(s,s.stateNode.containerInfo),f=s.pendingProps,a===null?s.child=Ci(s,null,f,u):nn(a,s,f,u),s.child;case 11:return dy(a,s,s.type,s.pendingProps,u);case 7:return nn(a,s,s.pendingProps,u),s.child;case 8:return nn(a,s,s.pendingProps.children,u),s.child;case 12:return nn(a,s,s.pendingProps.children,u),s.child;case 10:return f=s.pendingProps,Aa(s,s.type,f.value),nn(a,s,f.children,u),s.child;case 9:return g=s.type._context,f=s.pendingProps.children,Ti(s),g=tn(g),f=f(g),s.flags|=1,nn(a,s,f,u),s.child;case 14:return fy(a,s,s.type,s.pendingProps,u);case 15:return hy(a,s,s.type,s.pendingProps,u);case 19:return Ty(a,s,u);case 31:return QR(a,s,u);case 22:return my(a,s,u,s.pendingProps);case 24:return Ti(s),f=tn(Dt),a===null?(g=Ih(),g===null&&(g=gt,y=Oh(),g.pooledCache=y,y.refCount++,y!==null&&(g.pooledCacheLanes|=u),g=y),s.memoizedState={parent:f,cache:g},Mh(s),Aa(s,Dt,g)):((a.lanes&u)!==0&&(Ph(a,s),Xo(s,null,null,u),Yo()),g=a.memoizedState,y=s.memoizedState,g.parent!==f?(g={parent:f,cache:f},s.memoizedState=g,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=g),Aa(s,Dt,f)):(f=y.cache,Aa(s,Dt,f),f!==g.cache&&Rh(s,[Dt],u,!0))),nn(a,s,s.pendingProps.children,u),s.child;case 29:throw s.pendingProps}throw Error(r(156,s.tag))}function Jr(a){a.flags|=4}function bm(a,s,u,f,g){if((s=(a.mode&32)!==0)&&(s=!1),s){if(a.flags|=16777216,(g&335544128)===g)if(a.stateNode.complete)a.flags|=8192;else if(Wy())a.flags|=8192;else throw Ai=Yu,Dh}else a.flags&=-16777217}function Sy(a,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)a.flags&=-16777217;else if(a.flags|=16777216,!U_(s))if(Wy())a.flags|=8192;else throw Ai=Yu,Dh}function cc(a,s){s!==null&&(a.flags|=4),a.flags&16384&&(s=a.tag!==22?rb():536870912,a.lanes|=s,Bs|=s)}function el(a,s){if(!Ke)switch(a.tailMode){case"hidden":s=a.tail;for(var u=null;s!==null;)s.alternate!==null&&(u=s),s=s.sibling;u===null?a.tail=null:u.sibling=null;break;case"collapsed":u=a.tail;for(var f=null;u!==null;)u.alternate!==null&&(f=u),u=u.sibling;f===null?s||a.tail===null?a.tail=null:a.tail.sibling=null:f.sibling=null}}function xt(a){var s=a.alternate!==null&&a.alternate.child===a.child,u=0,f=0;if(s)for(var g=a.child;g!==null;)u|=g.lanes|g.childLanes,f|=g.subtreeFlags&65011712,f|=g.flags&65011712,g.return=a,g=g.sibling;else for(g=a.child;g!==null;)u|=g.lanes|g.childLanes,f|=g.subtreeFlags,f|=g.flags,g.return=a,g=g.sibling;return a.subtreeFlags|=f,a.childLanes=u,s}function KR(a,s,u){var f=s.pendingProps;switch(Ah(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return xt(s),null;case 1:return xt(s),null;case 3:return u=s.stateNode,f=null,a!==null&&(f=a.memoizedState.cache),s.memoizedState.cache!==f&&(s.flags|=2048),Qr(Dt),Te(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(a===null||a.child===null)&&(Ss(s)?Jr(s):a===null||a.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,wh())),xt(s),null;case 26:var g=s.type,y=s.memoizedState;return a===null?(Jr(s),y!==null?(xt(s),Sy(s,y)):(xt(s),bm(s,g,null,f,u))):y?y!==a.memoizedState?(Jr(s),xt(s),Sy(s,y)):(xt(s),s.flags&=-16777217):(a=a.memoizedProps,a!==f&&Jr(s),xt(s),bm(s,g,a,f,u)),null;case 27:if(je(s),u=ye.current,g=s.type,a!==null&&s.stateNode!=null)a.memoizedProps!==f&&Jr(s);else{if(!f){if(s.stateNode===null)throw Error(r(166));return xt(s),null}a=ge.current,Ss(s)?rE(s):(a=O_(g,f,u),s.stateNode=a,Jr(s))}return xt(s),null;case 5:if(je(s),g=s.type,a!==null&&s.stateNode!=null)a.memoizedProps!==f&&Jr(s);else{if(!f){if(s.stateNode===null)throw Error(r(166));return xt(s),null}if(y=ge.current,Ss(s))rE(s);else{var w=Ac(ye.current);switch(y){case 1:y=w.createElementNS("http://www.w3.org/2000/svg",g);break;case 2:y=w.createElementNS("http://www.w3.org/1998/Math/MathML",g);break;default:switch(g){case"svg":y=w.createElementNS("http://www.w3.org/2000/svg",g);break;case"math":y=w.createElementNS("http://www.w3.org/1998/Math/MathML",g);break;case"script":y=w.createElement("div"),y.innerHTML="<script><\/script>",y=y.removeChild(y.firstChild);break;case"select":y=typeof f.is=="string"?w.createElement("select",{is:f.is}):w.createElement("select"),f.multiple?y.multiple=!0:f.size&&(y.size=f.size);break;default:y=typeof f.is=="string"?w.createElement(g,{is:f.is}):w.createElement(g)}}y[Jt]=s,y[xn]=f;e:for(w=s.child;w!==null;){if(w.tag===5||w.tag===6)y.appendChild(w.stateNode);else if(w.tag!==4&&w.tag!==27&&w.child!==null){w.child.return=w,w=w.child;continue}if(w===s)break e;for(;w.sibling===null;){if(w.return===null||w.return===s)break e;w=w.return}w.sibling.return=w.return,w=w.sibling}s.stateNode=y;e:switch(rn(y,g,f),g){case"button":case"input":case"select":case"textarea":f=!!f.autoFocus;break e;case"img":f=!0;break e;default:f=!1}f&&Jr(s)}}return xt(s),bm(s,s.type,a===null?null:a.memoizedProps,s.pendingProps,u),null;case 6:if(a&&s.stateNode!=null)a.memoizedProps!==f&&Jr(s);else{if(typeof f!="string"&&s.stateNode===null)throw Error(r(166));if(a=ye.current,Ss(s)){if(a=s.stateNode,u=s.memoizedProps,f=null,g=en,g!==null)switch(g.tag){case 27:case 5:f=g.memoizedProps}a[Jt]=s,a=!!(a.nodeValue===u||f!==null&&f.suppressHydrationWarning===!0||__(a.nodeValue,u)),a||Sa(s,!0)}else a=Ac(a).createTextNode(f),a[Jt]=s,s.stateNode=a}return xt(s),null;case 31:if(u=s.memoizedState,a===null||a.memoizedState!==null){if(f=Ss(s),u!==null){if(a===null){if(!f)throw Error(r(318));if(a=s.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(557));a[Jt]=s}else _i(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;xt(s),a=!1}else u=wh(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=u),a=!0;if(!a)return s.flags&256?(Pn(s),s):(Pn(s),null);if((s.flags&128)!==0)throw Error(r(558))}return xt(s),null;case 13:if(f=s.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(g=Ss(s),f!==null&&f.dehydrated!==null){if(a===null){if(!g)throw Error(r(318));if(g=s.memoizedState,g=g!==null?g.dehydrated:null,!g)throw Error(r(317));g[Jt]=s}else _i(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;xt(s),g=!1}else g=wh(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=g),g=!0;if(!g)return s.flags&256?(Pn(s),s):(Pn(s),null)}return Pn(s),(s.flags&128)!==0?(s.lanes=u,s):(u=f!==null,a=a!==null&&a.memoizedState!==null,u&&(f=s.child,g=null,f.alternate!==null&&f.alternate.memoizedState!==null&&f.alternate.memoizedState.cachePool!==null&&(g=f.alternate.memoizedState.cachePool.pool),y=null,f.memoizedState!==null&&f.memoizedState.cachePool!==null&&(y=f.memoizedState.cachePool.pool),y!==g&&(f.flags|=2048)),u!==a&&u&&(s.child.flags|=8192),cc(s,s.updateQueue),xt(s),null);case 4:return Te(),a===null&&Um(s.stateNode.containerInfo),xt(s),null;case 10:return Qr(s.type),xt(s),null;case 19:if(te(Rt),f=s.memoizedState,f===null)return xt(s),null;if(g=(s.flags&128)!==0,y=f.rendering,y===null)if(g)el(f,!1);else{if(Ct!==0||a!==null&&(a.flags&128)!==0)for(a=s.child;a!==null;){if(y=Ku(a),y!==null){for(s.flags|=128,el(f,!1),a=y.updateQueue,s.updateQueue=a,cc(s,a),s.subtreeFlags=0,a=u,u=s.child;u!==null;)Zb(u,a),u=u.sibling;return P(Rt,Rt.current&1|2),Ke&&Yr(s,f.treeForkCount),s.child}a=a.sibling}f.tail!==null&&dn()>pc&&(s.flags|=128,g=!0,el(f,!1),s.lanes=4194304)}else{if(!g)if(a=Ku(y),a!==null){if(s.flags|=128,g=!0,a=a.updateQueue,s.updateQueue=a,cc(s,a),el(f,!0),f.tail===null&&f.tailMode==="hidden"&&!y.alternate&&!Ke)return xt(s),null}else 2*dn()-f.renderingStartTime>pc&&u!==536870912&&(s.flags|=128,g=!0,el(f,!1),s.lanes=4194304);f.isBackwards?(y.sibling=s.child,s.child=y):(a=f.last,a!==null?a.sibling=y:s.child=y,f.last=y)}return f.tail!==null?(a=f.tail,f.rendering=a,f.tail=a.sibling,f.renderingStartTime=dn(),a.sibling=null,u=Rt.current,P(Rt,g?u&1|2:u&1),Ke&&Yr(s,f.treeForkCount),a):(xt(s),null);case 22:case 23:return Pn(s),Hh(),f=s.memoizedState!==null,a!==null?a.memoizedState!==null!==f&&(s.flags|=8192):f&&(s.flags|=8192),f?(u&536870912)!==0&&(s.flags&128)===0&&(xt(s),s.subtreeFlags&6&&(s.flags|=8192)):xt(s),u=s.updateQueue,u!==null&&cc(s,u.retryQueue),u=null,a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),f=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(f=s.memoizedState.cachePool.pool),f!==u&&(s.flags|=2048),a!==null&&te(vi),null;case 24:return u=null,a!==null&&(u=a.memoizedState.cache),s.memoizedState.cache!==u&&(s.flags|=2048),Qr(Dt),xt(s),null;case 25:return null;case 30:return null}throw Error(r(156,s.tag))}function ZR(a,s){switch(Ah(s),s.tag){case 1:return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 3:return Qr(Dt),Te(),a=s.flags,(a&65536)!==0&&(a&128)===0?(s.flags=a&-65537|128,s):null;case 26:case 27:case 5:return je(s),null;case 31:if(s.memoizedState!==null){if(Pn(s),s.alternate===null)throw Error(r(340));_i()}return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 13:if(Pn(s),a=s.memoizedState,a!==null&&a.dehydrated!==null){if(s.alternate===null)throw Error(r(340));_i()}return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 19:return te(Rt),null;case 4:return Te(),null;case 10:return Qr(s.type),null;case 22:case 23:return Pn(s),Hh(),a!==null&&te(vi),a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 24:return Qr(Dt),null;case 25:return null;default:return null}}function Ay(a,s){switch(Ah(s),s.tag){case 3:Qr(Dt),Te();break;case 26:case 27:case 5:je(s);break;case 4:Te();break;case 31:s.memoizedState!==null&&Pn(s);break;case 13:Pn(s);break;case 19:te(Rt);break;case 10:Qr(s.type);break;case 22:case 23:Pn(s),Hh(),a!==null&&te(vi);break;case 24:Qr(Dt)}}function tl(a,s){try{var u=s.updateQueue,f=u!==null?u.lastEffect:null;if(f!==null){var g=f.next;u=g;do{if((u.tag&a)===a){f=void 0;var y=u.create,w=u.inst;f=y(),w.destroy=f}u=u.next}while(u!==g)}}catch(R){ct(s,s.return,R)}}function Oa(a,s,u){try{var f=s.updateQueue,g=f!==null?f.lastEffect:null;if(g!==null){var y=g.next;f=y;do{if((f.tag&a)===a){var w=f.inst,R=w.destroy;if(R!==void 0){w.destroy=void 0,g=s;var $=u,K=R;try{K()}catch(se){ct(g,$,se)}}}f=f.next}while(f!==y)}}catch(se){ct(s,s.return,se)}}function Cy(a){var s=a.updateQueue;if(s!==null){var u=a.stateNode;try{gE(s,u)}catch(f){ct(a,a.return,f)}}}function wy(a,s,u){u.props=ki(a.type,a.memoizedProps),u.state=a.memoizedState;try{u.componentWillUnmount()}catch(f){ct(a,s,f)}}function nl(a,s){try{var u=a.ref;if(u!==null){switch(a.tag){case 26:case 27:case 5:var f=a.stateNode;break;case 30:f=a.stateNode;break;default:f=a.stateNode}typeof u=="function"?a.refCleanup=u(f):u.current=f}}catch(g){ct(a,s,g)}}function Ar(a,s){var u=a.ref,f=a.refCleanup;if(u!==null)if(typeof f=="function")try{f()}catch(g){ct(a,s,g)}finally{a.refCleanup=null,a=a.alternate,a!=null&&(a.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(g){ct(a,s,g)}else u.current=null}function ky(a){var s=a.type,u=a.memoizedProps,f=a.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":u.autoFocus&&f.focus();break e;case"img":u.src?f.src=u.src:u.srcSet&&(f.srcset=u.srcSet)}}catch(g){ct(a,a.return,g)}}function Em(a,s,u){try{var f=a.stateNode;_O(f,a.type,u,s),f[xn]=s}catch(g){ct(a,a.return,g)}}function Ny(a){return a.tag===5||a.tag===3||a.tag===26||a.tag===27&&ja(a.type)||a.tag===4}function ym(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||Ny(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.tag===27&&ja(a.type)||a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function _m(a,s,u){var f=a.tag;if(f===5||f===6)a=a.stateNode,s?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(a,s):(s=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,s.appendChild(a),u=u._reactRootContainer,u!=null||s.onclick!==null||(s.onclick=Vr));else if(f!==4&&(f===27&&ja(a.type)&&(u=a.stateNode,s=null),a=a.child,a!==null))for(_m(a,s,u),a=a.sibling;a!==null;)_m(a,s,u),a=a.sibling}function dc(a,s,u){var f=a.tag;if(f===5||f===6)a=a.stateNode,s?u.insertBefore(a,s):u.appendChild(a);else if(f!==4&&(f===27&&ja(a.type)&&(u=a.stateNode),a=a.child,a!==null))for(dc(a,s,u),a=a.sibling;a!==null;)dc(a,s,u),a=a.sibling}function Ry(a){var s=a.stateNode,u=a.memoizedProps;try{for(var f=a.type,g=s.attributes;g.length;)s.removeAttributeNode(g[0]);rn(s,f,u),s[Jt]=a,s[xn]=u}catch(y){ct(a,a.return,y)}}var ea=!1,Bt=!1,xm=!1,Oy=typeof WeakSet=="function"?WeakSet:Set,Xt=null;function JR(a,s){if(a=a.containerInfo,Fm=Lc,a=$b(a),mh(a)){if("selectionStart"in a)var u={start:a.selectionStart,end:a.selectionEnd};else e:{u=(u=a.ownerDocument)&&u.defaultView||window;var f=u.getSelection&&u.getSelection();if(f&&f.rangeCount!==0){u=f.anchorNode;var g=f.anchorOffset,y=f.focusNode;f=f.focusOffset;try{u.nodeType,y.nodeType}catch{u=null;break e}var w=0,R=-1,$=-1,K=0,se=0,de=a,Z=null;t:for(;;){for(var ne;de!==u||g!==0&&de.nodeType!==3||(R=w+g),de!==y||f!==0&&de.nodeType!==3||($=w+f),de.nodeType===3&&(w+=de.nodeValue.length),(ne=de.firstChild)!==null;)Z=de,de=ne;for(;;){if(de===a)break t;if(Z===u&&++K===g&&(R=w),Z===y&&++se===f&&($=w),(ne=de.nextSibling)!==null)break;de=Z,Z=de.parentNode}de=ne}u=R===-1||$===-1?null:{start:R,end:$}}else u=null}u=u||{start:0,end:0}}else u=null;for($m={focusedElem:a,selectionRange:u},Lc=!1,Xt=s;Xt!==null;)if(s=Xt,a=s.child,(s.subtreeFlags&1028)!==0&&a!==null)a.return=s,Xt=a;else for(;Xt!==null;){switch(s=Xt,y=s.alternate,a=s.flags,s.tag){case 0:if((a&4)!==0&&(a=s.updateQueue,a=a!==null?a.events:null,a!==null))for(u=0;u<a.length;u++)g=a[u],g.ref.impl=g.nextImpl;break;case 11:case 15:break;case 1:if((a&1024)!==0&&y!==null){a=void 0,u=s,g=y.memoizedProps,y=y.memoizedState,f=u.stateNode;try{var Ae=ki(u.type,g);a=f.getSnapshotBeforeUpdate(Ae,y),f.__reactInternalSnapshotBeforeUpdate=a}catch(Oe){ct(u,u.return,Oe)}}break;case 3:if((a&1024)!==0){if(a=s.stateNode.containerInfo,u=a.nodeType,u===9)qm(a);else if(u===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":qm(a);break;default:a.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((a&1024)!==0)throw Error(r(163))}if(a=s.sibling,a!==null){a.return=s.return,Xt=a;break}Xt=s.return}}function Ly(a,s,u){var f=u.flags;switch(u.tag){case 0:case 11:case 15:na(a,u),f&4&&tl(5,u);break;case 1:if(na(a,u),f&4)if(a=u.stateNode,s===null)try{a.componentDidMount()}catch(w){ct(u,u.return,w)}else{var g=ki(u.type,s.memoizedProps);s=s.memoizedState;try{a.componentDidUpdate(g,s,a.__reactInternalSnapshotBeforeUpdate)}catch(w){ct(u,u.return,w)}}f&64&&Cy(u),f&512&&nl(u,u.return);break;case 3:if(na(a,u),f&64&&(a=u.updateQueue,a!==null)){if(s=null,u.child!==null)switch(u.child.tag){case 27:case 5:s=u.child.stateNode;break;case 1:s=u.child.stateNode}try{gE(a,s)}catch(w){ct(u,u.return,w)}}break;case 27:s===null&&f&4&&Ry(u);case 26:case 5:na(a,u),s===null&&f&4&&ky(u),f&512&&nl(u,u.return);break;case 12:na(a,u);break;case 31:na(a,u),f&4&&My(a,u);break;case 13:na(a,u),f&4&&Py(a,u),f&64&&(a=u.memoizedState,a!==null&&(a=a.dehydrated,a!==null&&(u=lO.bind(null,u),kO(a,u))));break;case 22:if(f=u.memoizedState!==null||ea,!f){s=s!==null&&s.memoizedState!==null||Bt,g=ea;var y=Bt;ea=f,(Bt=s)&&!y?ra(a,u,(u.subtreeFlags&8772)!==0):na(a,u),ea=g,Bt=y}break;case 30:break;default:na(a,u)}}function Iy(a){var s=a.alternate;s!==null&&(a.alternate=null,Iy(s)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(s=a.stateNode,s!==null&&Kf(s)),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}var Tt=null,vn=!1;function ta(a,s,u){for(u=u.child;u!==null;)Dy(a,s,u),u=u.sibling}function Dy(a,s,u){if(Ut&&typeof Ut.onCommitFiberUnmount=="function")try{Ut.onCommitFiberUnmount(fn,u)}catch{}switch(u.tag){case 26:Bt||Ar(u,s),ta(a,s,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:Bt||Ar(u,s);var f=Tt,g=vn;ja(u.type)&&(Tt=u.stateNode,vn=!1),ta(a,s,u),dl(u.stateNode),Tt=f,vn=g;break;case 5:Bt||Ar(u,s);case 6:if(f=Tt,g=vn,Tt=null,ta(a,s,u),Tt=f,vn=g,Tt!==null)if(vn)try{(Tt.nodeType===9?Tt.body:Tt.nodeName==="HTML"?Tt.ownerDocument.body:Tt).removeChild(u.stateNode)}catch(y){ct(u,s,y)}else try{Tt.removeChild(u.stateNode)}catch(y){ct(u,s,y)}break;case 18:Tt!==null&&(vn?(a=Tt,C_(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,u.stateNode),Gs(a)):C_(Tt,u.stateNode));break;case 4:f=Tt,g=vn,Tt=u.stateNode.containerInfo,vn=!0,ta(a,s,u),Tt=f,vn=g;break;case 0:case 11:case 14:case 15:Oa(2,u,s),Bt||Oa(4,u,s),ta(a,s,u);break;case 1:Bt||(Ar(u,s),f=u.stateNode,typeof f.componentWillUnmount=="function"&&wy(u,s,f)),ta(a,s,u);break;case 21:ta(a,s,u);break;case 22:Bt=(f=Bt)||u.memoizedState!==null,ta(a,s,u),Bt=f;break;default:ta(a,s,u)}}function My(a,s){if(s.memoizedState===null&&(a=s.alternate,a!==null&&(a=a.memoizedState,a!==null))){a=a.dehydrated;try{Gs(a)}catch(u){ct(s,s.return,u)}}}function Py(a,s){if(s.memoizedState===null&&(a=s.alternate,a!==null&&(a=a.memoizedState,a!==null&&(a=a.dehydrated,a!==null))))try{Gs(a)}catch(u){ct(s,s.return,u)}}function eO(a){switch(a.tag){case 31:case 13:case 19:var s=a.stateNode;return s===null&&(s=a.stateNode=new Oy),s;case 22:return a=a.stateNode,s=a._retryCache,s===null&&(s=a._retryCache=new Oy),s;default:throw Error(r(435,a.tag))}}function fc(a,s){var u=eO(a);s.forEach(function(f){if(!u.has(f)){u.add(f);var g=uO.bind(null,a,f);f.then(g,g)}})}function Sn(a,s){var u=s.deletions;if(u!==null)for(var f=0;f<u.length;f++){var g=u[f],y=a,w=s,R=w;e:for(;R!==null;){switch(R.tag){case 27:if(ja(R.type)){Tt=R.stateNode,vn=!1;break e}break;case 5:Tt=R.stateNode,vn=!1;break e;case 3:case 4:Tt=R.stateNode.containerInfo,vn=!0;break e}R=R.return}if(Tt===null)throw Error(r(160));Dy(y,w,g),Tt=null,vn=!1,y=g.alternate,y!==null&&(y.return=null),g.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)By(s,a),s=s.sibling}var ur=null;function By(a,s){var u=a.alternate,f=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:Sn(s,a),An(a),f&4&&(Oa(3,a,a.return),tl(3,a),Oa(5,a,a.return));break;case 1:Sn(s,a),An(a),f&512&&(Bt||u===null||Ar(u,u.return)),f&64&&ea&&(a=a.updateQueue,a!==null&&(f=a.callbacks,f!==null&&(u=a.shared.hiddenCallbacks,a.shared.hiddenCallbacks=u===null?f:u.concat(f))));break;case 26:var g=ur;if(Sn(s,a),An(a),f&512&&(Bt||u===null||Ar(u,u.return)),f&4){var y=u!==null?u.memoizedState:null;if(f=a.memoizedState,u===null)if(f===null)if(a.stateNode===null){e:{f=a.type,u=a.memoizedProps,g=g.ownerDocument||g;t:switch(f){case"title":y=g.getElementsByTagName("title")[0],(!y||y[No]||y[Jt]||y.namespaceURI==="http://www.w3.org/2000/svg"||y.hasAttribute("itemprop"))&&(y=g.createElement(f),g.head.insertBefore(y,g.querySelector("head > title"))),rn(y,f,u),y[Jt]=a,Yt(y),f=y;break e;case"link":var w=B_("link","href",g).get(f+(u.href||""));if(w){for(var R=0;R<w.length;R++)if(y=w[R],y.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&y.getAttribute("rel")===(u.rel==null?null:u.rel)&&y.getAttribute("title")===(u.title==null?null:u.title)&&y.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){w.splice(R,1);break t}}y=g.createElement(f),rn(y,f,u),g.head.appendChild(y);break;case"meta":if(w=B_("meta","content",g).get(f+(u.content||""))){for(R=0;R<w.length;R++)if(y=w[R],y.getAttribute("content")===(u.content==null?null:""+u.content)&&y.getAttribute("name")===(u.name==null?null:u.name)&&y.getAttribute("property")===(u.property==null?null:u.property)&&y.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&y.getAttribute("charset")===(u.charSet==null?null:u.charSet)){w.splice(R,1);break t}}y=g.createElement(f),rn(y,f,u),g.head.appendChild(y);break;default:throw Error(r(468,f))}y[Jt]=a,Yt(y),f=y}a.stateNode=f}else j_(g,a.type,a.stateNode);else a.stateNode=P_(g,f,a.memoizedProps);else y!==f?(y===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):y.count--,f===null?j_(g,a.type,a.stateNode):P_(g,f,a.memoizedProps)):f===null&&a.stateNode!==null&&Em(a,a.memoizedProps,u.memoizedProps)}break;case 27:Sn(s,a),An(a),f&512&&(Bt||u===null||Ar(u,u.return)),u!==null&&f&4&&Em(a,a.memoizedProps,u.memoizedProps);break;case 5:if(Sn(s,a),An(a),f&512&&(Bt||u===null||Ar(u,u.return)),a.flags&32){g=a.stateNode;try{ms(g,"")}catch(Ae){ct(a,a.return,Ae)}}f&4&&a.stateNode!=null&&(g=a.memoizedProps,Em(a,g,u!==null?u.memoizedProps:g)),f&1024&&(xm=!0);break;case 6:if(Sn(s,a),An(a),f&4){if(a.stateNode===null)throw Error(r(162));f=a.memoizedProps,u=a.stateNode;try{u.nodeValue=f}catch(Ae){ct(a,a.return,Ae)}}break;case 3:if(kc=null,g=ur,ur=Cc(s.containerInfo),Sn(s,a),ur=g,An(a),f&4&&u!==null&&u.memoizedState.isDehydrated)try{Gs(s.containerInfo)}catch(Ae){ct(a,a.return,Ae)}xm&&(xm=!1,jy(a));break;case 4:f=ur,ur=Cc(a.stateNode.containerInfo),Sn(s,a),An(a),ur=f;break;case 12:Sn(s,a),An(a);break;case 31:Sn(s,a),An(a),f&4&&(f=a.updateQueue,f!==null&&(a.updateQueue=null,fc(a,f)));break;case 13:Sn(s,a),An(a),a.child.flags&8192&&a.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(mc=dn()),f&4&&(f=a.updateQueue,f!==null&&(a.updateQueue=null,fc(a,f)));break;case 22:g=a.memoizedState!==null;var $=u!==null&&u.memoizedState!==null,K=ea,se=Bt;if(ea=K||g,Bt=se||$,Sn(s,a),Bt=se,ea=K,An(a),f&8192)e:for(s=a.stateNode,s._visibility=g?s._visibility&-2:s._visibility|1,g&&(u===null||$||ea||Bt||Ni(a)),u=null,s=a;;){if(s.tag===5||s.tag===26){if(u===null){$=u=s;try{if(y=$.stateNode,g)w=y.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none";else{R=$.stateNode;var de=$.memoizedProps.style,Z=de!=null&&de.hasOwnProperty("display")?de.display:null;R.style.display=Z==null||typeof Z=="boolean"?"":(""+Z).trim()}}catch(Ae){ct($,$.return,Ae)}}}else if(s.tag===6){if(u===null){$=s;try{$.stateNode.nodeValue=g?"":$.memoizedProps}catch(Ae){ct($,$.return,Ae)}}}else if(s.tag===18){if(u===null){$=s;try{var ne=$.stateNode;g?w_(ne,!0):w_($.stateNode,!1)}catch(Ae){ct($,$.return,Ae)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===a)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===a)break e;for(;s.sibling===null;){if(s.return===null||s.return===a)break e;u===s&&(u=null),s=s.return}u===s&&(u=null),s.sibling.return=s.return,s=s.sibling}f&4&&(f=a.updateQueue,f!==null&&(u=f.retryQueue,u!==null&&(f.retryQueue=null,fc(a,u))));break;case 19:Sn(s,a),An(a),f&4&&(f=a.updateQueue,f!==null&&(a.updateQueue=null,fc(a,f)));break;case 30:break;case 21:break;default:Sn(s,a),An(a)}}function An(a){var s=a.flags;if(s&2){try{for(var u,f=a.return;f!==null;){if(Ny(f)){u=f;break}f=f.return}if(u==null)throw Error(r(160));switch(u.tag){case 27:var g=u.stateNode,y=ym(a);dc(a,y,g);break;case 5:var w=u.stateNode;u.flags&32&&(ms(w,""),u.flags&=-33);var R=ym(a);dc(a,R,w);break;case 3:case 4:var $=u.stateNode.containerInfo,K=ym(a);_m(a,K,$);break;default:throw Error(r(161))}}catch(se){ct(a,a.return,se)}a.flags&=-3}s&4096&&(a.flags&=-4097)}function jy(a){if(a.subtreeFlags&1024)for(a=a.child;a!==null;){var s=a;jy(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),a=a.sibling}}function na(a,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)Ly(a,s.alternate,s),s=s.sibling}function Ni(a){for(a=a.child;a!==null;){var s=a;switch(s.tag){case 0:case 11:case 14:case 15:Oa(4,s,s.return),Ni(s);break;case 1:Ar(s,s.return);var u=s.stateNode;typeof u.componentWillUnmount=="function"&&wy(s,s.return,u),Ni(s);break;case 27:dl(s.stateNode);case 26:case 5:Ar(s,s.return),Ni(s);break;case 22:s.memoizedState===null&&Ni(s);break;case 30:Ni(s);break;default:Ni(s)}a=a.sibling}}function ra(a,s,u){for(u=u&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var f=s.alternate,g=a,y=s,w=y.flags;switch(y.tag){case 0:case 11:case 15:ra(g,y,u),tl(4,y);break;case 1:if(ra(g,y,u),f=y,g=f.stateNode,typeof g.componentDidMount=="function")try{g.componentDidMount()}catch(K){ct(f,f.return,K)}if(f=y,g=f.updateQueue,g!==null){var R=f.stateNode;try{var $=g.shared.hiddenCallbacks;if($!==null)for(g.shared.hiddenCallbacks=null,g=0;g<$.length;g++)pE($[g],R)}catch(K){ct(f,f.return,K)}}u&&w&64&&Cy(y),nl(y,y.return);break;case 27:Ry(y);case 26:case 5:ra(g,y,u),u&&f===null&&w&4&&ky(y),nl(y,y.return);break;case 12:ra(g,y,u);break;case 31:ra(g,y,u),u&&w&4&&My(g,y);break;case 13:ra(g,y,u),u&&w&4&&Py(g,y);break;case 22:y.memoizedState===null&&ra(g,y,u),nl(y,y.return);break;case 30:break;default:ra(g,y,u)}s=s.sibling}}function Tm(a,s){var u=null;a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),a=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(a=s.memoizedState.cachePool.pool),a!==u&&(a!=null&&a.refCount++,u!=null&&Fo(u))}function vm(a,s){a=null,s.alternate!==null&&(a=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==a&&(s.refCount++,a!=null&&Fo(a))}function cr(a,s,u,f){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)Uy(a,s,u,f),s=s.sibling}function Uy(a,s,u,f){var g=s.flags;switch(s.tag){case 0:case 11:case 15:cr(a,s,u,f),g&2048&&tl(9,s);break;case 1:cr(a,s,u,f);break;case 3:cr(a,s,u,f),g&2048&&(a=null,s.alternate!==null&&(a=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==a&&(s.refCount++,a!=null&&Fo(a)));break;case 12:if(g&2048){cr(a,s,u,f),a=s.stateNode;try{var y=s.memoizedProps,w=y.id,R=y.onPostCommit;typeof R=="function"&&R(w,s.alternate===null?"mount":"update",a.passiveEffectDuration,-0)}catch($){ct(s,s.return,$)}}else cr(a,s,u,f);break;case 31:cr(a,s,u,f);break;case 13:cr(a,s,u,f);break;case 23:break;case 22:y=s.stateNode,w=s.alternate,s.memoizedState!==null?y._visibility&2?cr(a,s,u,f):rl(a,s):y._visibility&2?cr(a,s,u,f):(y._visibility|=2,Ds(a,s,u,f,(s.subtreeFlags&10256)!==0||!1)),g&2048&&Tm(w,s);break;case 24:cr(a,s,u,f),g&2048&&vm(s.alternate,s);break;default:cr(a,s,u,f)}}function Ds(a,s,u,f,g){for(g=g&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var y=a,w=s,R=u,$=f,K=w.flags;switch(w.tag){case 0:case 11:case 15:Ds(y,w,R,$,g),tl(8,w);break;case 23:break;case 22:var se=w.stateNode;w.memoizedState!==null?se._visibility&2?Ds(y,w,R,$,g):rl(y,w):(se._visibility|=2,Ds(y,w,R,$,g)),g&&K&2048&&Tm(w.alternate,w);break;case 24:Ds(y,w,R,$,g),g&&K&2048&&vm(w.alternate,w);break;default:Ds(y,w,R,$,g)}s=s.sibling}}function rl(a,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var u=a,f=s,g=f.flags;switch(f.tag){case 22:rl(u,f),g&2048&&Tm(f.alternate,f);break;case 24:rl(u,f),g&2048&&vm(f.alternate,f);break;default:rl(u,f)}s=s.sibling}}var al=8192;function Ms(a,s,u){if(a.subtreeFlags&al)for(a=a.child;a!==null;)Hy(a,s,u),a=a.sibling}function Hy(a,s,u){switch(a.tag){case 26:Ms(a,s,u),a.flags&al&&a.memoizedState!==null&&HO(u,ur,a.memoizedState,a.memoizedProps);break;case 5:Ms(a,s,u);break;case 3:case 4:var f=ur;ur=Cc(a.stateNode.containerInfo),Ms(a,s,u),ur=f;break;case 22:a.memoizedState===null&&(f=a.alternate,f!==null&&f.memoizedState!==null?(f=al,al=16777216,Ms(a,s,u),al=f):Ms(a,s,u));break;default:Ms(a,s,u)}}function zy(a){var s=a.alternate;if(s!==null&&(a=s.child,a!==null)){s.child=null;do s=a.sibling,a.sibling=null,a=s;while(a!==null)}}function il(a){var s=a.deletions;if((a.flags&16)!==0){if(s!==null)for(var u=0;u<s.length;u++){var f=s[u];Xt=f,$y(f,a)}zy(a)}if(a.subtreeFlags&10256)for(a=a.child;a!==null;)Fy(a),a=a.sibling}function Fy(a){switch(a.tag){case 0:case 11:case 15:il(a),a.flags&2048&&Oa(9,a,a.return);break;case 3:il(a);break;case 12:il(a);break;case 22:var s=a.stateNode;a.memoizedState!==null&&s._visibility&2&&(a.return===null||a.return.tag!==13)?(s._visibility&=-3,hc(a)):il(a);break;default:il(a)}}function hc(a){var s=a.deletions;if((a.flags&16)!==0){if(s!==null)for(var u=0;u<s.length;u++){var f=s[u];Xt=f,$y(f,a)}zy(a)}for(a=a.child;a!==null;){switch(s=a,s.tag){case 0:case 11:case 15:Oa(8,s,s.return),hc(s);break;case 22:u=s.stateNode,u._visibility&2&&(u._visibility&=-3,hc(s));break;default:hc(s)}a=a.sibling}}function $y(a,s){for(;Xt!==null;){var u=Xt;switch(u.tag){case 0:case 11:case 15:Oa(8,u,s);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var f=u.memoizedState.cachePool.pool;f!=null&&f.refCount++}break;case 24:Fo(u.memoizedState.cache)}if(f=u.child,f!==null)f.return=u,Xt=f;else e:for(u=a;Xt!==null;){f=Xt;var g=f.sibling,y=f.return;if(Iy(f),f===u){Xt=null;break e}if(g!==null){g.return=y,Xt=g;break e}Xt=y}}}var tO={getCacheForType:function(a){var s=tn(Dt),u=s.data.get(a);return u===void 0&&(u=a(),s.data.set(a,u)),u},cacheSignal:function(){return tn(Dt).controller.signal}},nO=typeof WeakMap=="function"?WeakMap:Map,at=0,gt=null,Ge=null,Xe=0,ut=0,Bn=null,La=!1,Ps=!1,Sm=!1,aa=0,Ct=0,Ia=0,Ri=0,Am=0,jn=0,Bs=0,sl=null,Cn=null,Cm=!1,mc=0,Vy=0,pc=1/0,gc=null,Da=null,Ht=0,Ma=null,js=null,ia=0,wm=0,km=null,Gy=null,ol=0,Nm=null;function Un(){return(at&2)!==0&&Xe!==0?Xe&-Xe:U.T!==null?Mm():ob()}function qy(){if(jn===0)if((Xe&536870912)===0||Ke){var a=Su;Su<<=1,(Su&3932160)===0&&(Su=262144),jn=a}else jn=536870912;return a=Mn.current,a!==null&&(a.flags|=32),jn}function wn(a,s,u){(a===gt&&(ut===2||ut===9)||a.cancelPendingCommit!==null)&&(Us(a,0),Pa(a,Xe,jn,!1)),ko(a,u),((at&2)===0||a!==gt)&&(a===gt&&((at&2)===0&&(Ri|=u),Ct===4&&Pa(a,Xe,jn,!1)),Cr(a))}function Yy(a,s,u){if((at&6)!==0)throw Error(r(327));var f=!u&&(s&127)===0&&(s&a.expiredLanes)===0||wo(a,s),g=f?iO(a,s):Om(a,s,!0),y=f;do{if(g===0){Ps&&!f&&Pa(a,s,0,!1);break}else{if(u=a.current.alternate,y&&!rO(u)){g=Om(a,s,!1),y=!1;continue}if(g===2){if(y=s,a.errorRecoveryDisabledLanes&y)var w=0;else w=a.pendingLanes&-536870913,w=w!==0?w:w&536870912?536870912:0;if(w!==0){s=w;e:{var R=a;g=sl;var $=R.current.memoizedState.isDehydrated;if($&&(Us(R,w).flags|=256),w=Om(R,w,!1),w!==2){if(Sm&&!$){R.errorRecoveryDisabledLanes|=y,Ri|=y,g=4;break e}y=Cn,Cn=g,y!==null&&(Cn===null?Cn=y:Cn.push.apply(Cn,y))}g=w}if(y=!1,g!==2)continue}}if(g===1){Us(a,0),Pa(a,s,0,!0);break}e:{switch(f=a,y=g,y){case 0:case 1:throw Error(r(345));case 4:if((s&4194048)!==s)break;case 6:Pa(f,s,jn,!La);break e;case 2:Cn=null;break;case 3:case 5:break;default:throw Error(r(329))}if((s&62914560)===s&&(g=mc+300-dn(),10<g)){if(Pa(f,s,jn,!La),Cu(f,0,!0)!==0)break e;ia=s,f.timeoutHandle=S_(Xy.bind(null,f,u,Cn,gc,Cm,s,jn,Ri,Bs,La,y,"Throttled",-0,0),g);break e}Xy(f,u,Cn,gc,Cm,s,jn,Ri,Bs,La,y,null,-0,0)}}break}while(!0);Cr(a)}function Xy(a,s,u,f,g,y,w,R,$,K,se,de,Z,ne){if(a.timeoutHandle=-1,de=s.subtreeFlags,de&8192||(de&16785408)===16785408){de={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Vr},Hy(s,y,de);var Ae=(y&62914560)===y?mc-dn():(y&4194048)===y?Vy-dn():0;if(Ae=zO(de,Ae),Ae!==null){ia=y,a.cancelPendingCommit=Ae(n_.bind(null,a,s,y,u,f,g,w,R,$,se,de,null,Z,ne)),Pa(a,y,w,!K);return}}n_(a,s,y,u,f,g,w,R,$)}function rO(a){for(var s=a;;){var u=s.tag;if((u===0||u===11||u===15)&&s.flags&16384&&(u=s.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var f=0;f<u.length;f++){var g=u[f],y=g.getSnapshot;g=g.value;try{if(!In(y(),g))return!1}catch{return!1}}if(u=s.child,s.subtreeFlags&16384&&u!==null)u.return=s,s=u;else{if(s===a)break;for(;s.sibling===null;){if(s.return===null||s.return===a)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Pa(a,s,u,f){s&=~Am,s&=~Ri,a.suspendedLanes|=s,a.pingedLanes&=~s,f&&(a.warmLanes|=s),f=a.expirationTimes;for(var g=s;0<g;){var y=31-pt(g),w=1<<y;f[y]=-1,g&=~w}u!==0&&ab(a,u,s)}function bc(){return(at&6)===0?(ll(0),!1):!0}function Rm(){if(Ge!==null){if(ut===0)var a=Ge.return;else a=Ge,Xr=xi=null,qh(a),Ns=null,Vo=0,a=Ge;for(;a!==null;)Ay(a.alternate,a),a=a.return;Ge=null}}function Us(a,s){var u=a.timeoutHandle;u!==-1&&(a.timeoutHandle=-1,vO(u)),u=a.cancelPendingCommit,u!==null&&(a.cancelPendingCommit=null,u()),ia=0,Rm(),gt=a,Ge=u=qr(a.current,null),Xe=s,ut=0,Bn=null,La=!1,Ps=wo(a,s),Sm=!1,Bs=jn=Am=Ri=Ia=Ct=0,Cn=sl=null,Cm=!1,(s&8)!==0&&(s|=s&32);var f=a.entangledLanes;if(f!==0)for(a=a.entanglements,f&=s;0<f;){var g=31-pt(f),y=1<<g;s|=a[g],f&=~y}return aa=s,ju(),u}function Qy(a,s){Be=null,U.H=Zo,s===ks||s===qu?(s=dE(),ut=3):s===Dh?(s=dE(),ut=4):ut=s===lm?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,Bn=s,Ge===null&&(Ct=1,sc(a,Xn(s,a.current)))}function Wy(){var a=Mn.current;return a===null?!0:(Xe&4194048)===Xe?Zn===null:(Xe&62914560)===Xe||(Xe&536870912)!==0?a===Zn:!1}function Ky(){var a=U.H;return U.H=Zo,a===null?Zo:a}function Zy(){var a=U.A;return U.A=tO,a}function Ec(){Ct=4,La||(Xe&4194048)!==Xe&&Mn.current!==null||(Ps=!0),(Ia&134217727)===0&&(Ri&134217727)===0||gt===null||Pa(gt,Xe,jn,!1)}function Om(a,s,u){var f=at;at|=2;var g=Ky(),y=Zy();(gt!==a||Xe!==s)&&(gc=null,Us(a,s)),s=!1;var w=Ct;e:do try{if(ut!==0&&Ge!==null){var R=Ge,$=Bn;switch(ut){case 8:Rm(),w=6;break e;case 3:case 2:case 9:case 6:Mn.current===null&&(s=!0);var K=ut;if(ut=0,Bn=null,Hs(a,R,$,K),u&&Ps){w=0;break e}break;default:K=ut,ut=0,Bn=null,Hs(a,R,$,K)}}aO(),w=Ct;break}catch(se){Qy(a,se)}while(!0);return s&&a.shellSuspendCounter++,Xr=xi=null,at=f,U.H=g,U.A=y,Ge===null&&(gt=null,Xe=0,ju()),w}function aO(){for(;Ge!==null;)Jy(Ge)}function iO(a,s){var u=at;at|=2;var f=Ky(),g=Zy();gt!==a||Xe!==s?(gc=null,pc=dn()+500,Us(a,s)):Ps=wo(a,s);e:do try{if(ut!==0&&Ge!==null){s=Ge;var y=Bn;t:switch(ut){case 1:ut=0,Bn=null,Hs(a,s,y,1);break;case 2:case 9:if(uE(y)){ut=0,Bn=null,e_(s);break}s=function(){ut!==2&&ut!==9||gt!==a||(ut=7),Cr(a)},y.then(s,s);break e;case 3:ut=7;break e;case 4:ut=5;break e;case 7:uE(y)?(ut=0,Bn=null,e_(s)):(ut=0,Bn=null,Hs(a,s,y,7));break;case 5:var w=null;switch(Ge.tag){case 26:w=Ge.memoizedState;case 5:case 27:var R=Ge;if(w?U_(w):R.stateNode.complete){ut=0,Bn=null;var $=R.sibling;if($!==null)Ge=$;else{var K=R.return;K!==null?(Ge=K,yc(K)):Ge=null}break t}}ut=0,Bn=null,Hs(a,s,y,5);break;case 6:ut=0,Bn=null,Hs(a,s,y,6);break;case 8:Rm(),Ct=6;break e;default:throw Error(r(462))}}sO();break}catch(se){Qy(a,se)}while(!0);return Xr=xi=null,U.H=f,U.A=g,at=u,Ge!==null?0:(gt=null,Xe=0,ju(),Ct)}function sO(){for(;Ge!==null&&!zr();)Jy(Ge)}function Jy(a){var s=vy(a.alternate,a,aa);a.memoizedProps=a.pendingProps,s===null?yc(a):Ge=s}function e_(a){var s=a,u=s.alternate;switch(s.tag){case 15:case 0:s=by(u,s,s.pendingProps,s.type,void 0,Xe);break;case 11:s=by(u,s,s.pendingProps,s.type.render,s.ref,Xe);break;case 5:qh(s);default:Ay(u,s),s=Ge=Zb(s,aa),s=vy(u,s,aa)}a.memoizedProps=a.pendingProps,s===null?yc(a):Ge=s}function Hs(a,s,u,f){Xr=xi=null,qh(s),Ns=null,Vo=0;var g=s.return;try{if(XR(a,g,s,u,Xe)){Ct=1,sc(a,Xn(u,a.current)),Ge=null;return}}catch(y){if(g!==null)throw Ge=g,y;Ct=1,sc(a,Xn(u,a.current)),Ge=null;return}s.flags&32768?(Ke||f===1?a=!0:Ps||(Xe&536870912)!==0?a=!1:(La=a=!0,(f===2||f===9||f===3||f===6)&&(f=Mn.current,f!==null&&f.tag===13&&(f.flags|=16384))),t_(s,a)):yc(s)}function yc(a){var s=a;do{if((s.flags&32768)!==0){t_(s,La);return}a=s.return;var u=KR(s.alternate,s,aa);if(u!==null){Ge=u;return}if(s=s.sibling,s!==null){Ge=s;return}Ge=s=a}while(s!==null);Ct===0&&(Ct=5)}function t_(a,s){do{var u=ZR(a.alternate,a);if(u!==null){u.flags&=32767,Ge=u;return}if(u=a.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!s&&(a=a.sibling,a!==null)){Ge=a;return}Ge=a=u}while(a!==null);Ct=6,Ge=null}function n_(a,s,u,f,g,y,w,R,$){a.cancelPendingCommit=null;do _c();while(Ht!==0);if((at&6)!==0)throw Error(r(327));if(s!==null){if(s===a.current)throw Error(r(177));if(y=s.lanes|s.childLanes,y|=yh,U3(a,u,y,w,R,$),a===gt&&(Ge=gt=null,Xe=0),js=s,Ma=a,ia=u,wm=y,km=g,Gy=f,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(a.callbackNode=null,a.callbackPriority=0,cO(Le,function(){return o_(),null})):(a.callbackNode=null,a.callbackPriority=0),f=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||f){f=U.T,U.T=null,g=ee.p,ee.p=2,w=at,at|=4;try{JR(a,s,u)}finally{at=w,ee.p=g,U.T=f}}Ht=1,r_(),a_(),i_()}}function r_(){if(Ht===1){Ht=0;var a=Ma,s=js,u=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||u){u=U.T,U.T=null;var f=ee.p;ee.p=2;var g=at;at|=4;try{By(s,a);var y=$m,w=$b(a.containerInfo),R=y.focusedElem,$=y.selectionRange;if(w!==R&&R&&R.ownerDocument&&Fb(R.ownerDocument.documentElement,R)){if($!==null&&mh(R)){var K=$.start,se=$.end;if(se===void 0&&(se=K),"selectionStart"in R)R.selectionStart=K,R.selectionEnd=Math.min(se,R.value.length);else{var de=R.ownerDocument||document,Z=de&&de.defaultView||window;if(Z.getSelection){var ne=Z.getSelection(),Ae=R.textContent.length,Oe=Math.min($.start,Ae),ht=$.end===void 0?Oe:Math.min($.end,Ae);!ne.extend&&Oe>ht&&(w=ht,ht=Oe,Oe=w);var Y=zb(R,Oe),q=zb(R,ht);if(Y&&q&&(ne.rangeCount!==1||ne.anchorNode!==Y.node||ne.anchorOffset!==Y.offset||ne.focusNode!==q.node||ne.focusOffset!==q.offset)){var W=de.createRange();W.setStart(Y.node,Y.offset),ne.removeAllRanges(),Oe>ht?(ne.addRange(W),ne.extend(q.node,q.offset)):(W.setEnd(q.node,q.offset),ne.addRange(W))}}}}for(de=[],ne=R;ne=ne.parentNode;)ne.nodeType===1&&de.push({element:ne,left:ne.scrollLeft,top:ne.scrollTop});for(typeof R.focus=="function"&&R.focus(),R=0;R<de.length;R++){var le=de[R];le.element.scrollLeft=le.left,le.element.scrollTop=le.top}}Lc=!!Fm,$m=Fm=null}finally{at=g,ee.p=f,U.T=u}}a.current=s,Ht=2}}function a_(){if(Ht===2){Ht=0;var a=Ma,s=js,u=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||u){u=U.T,U.T=null;var f=ee.p;ee.p=2;var g=at;at|=4;try{Ly(a,s.alternate,s)}finally{at=g,ee.p=f,U.T=u}}Ht=3}}function i_(){if(Ht===4||Ht===3){Ht=0,Gf();var a=Ma,s=js,u=ia,f=Gy;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?Ht=5:(Ht=0,js=Ma=null,s_(a,a.pendingLanes));var g=a.pendingLanes;if(g===0&&(Da=null),Qf(u),s=s.stateNode,Ut&&typeof Ut.onCommitFiberRoot=="function")try{Ut.onCommitFiberRoot(fn,s,void 0,(s.current.flags&128)===128)}catch{}if(f!==null){s=U.T,g=ee.p,ee.p=2,U.T=null;try{for(var y=a.onRecoverableError,w=0;w<f.length;w++){var R=f[w];y(R.value,{componentStack:R.stack})}}finally{U.T=s,ee.p=g}}(ia&3)!==0&&_c(),Cr(a),g=a.pendingLanes,(u&261930)!==0&&(g&42)!==0?a===Nm?ol++:(ol=0,Nm=a):ol=0,ll(0)}}function s_(a,s){(a.pooledCacheLanes&=s)===0&&(s=a.pooledCache,s!=null&&(a.pooledCache=null,Fo(s)))}function _c(){return r_(),a_(),i_(),o_()}function o_(){if(Ht!==5)return!1;var a=Ma,s=wm;wm=0;var u=Qf(ia),f=U.T,g=ee.p;try{ee.p=32>u?32:u,U.T=null,u=km,km=null;var y=Ma,w=ia;if(Ht=0,js=Ma=null,ia=0,(at&6)!==0)throw Error(r(331));var R=at;if(at|=4,Fy(y.current),Uy(y,y.current,w,u),at=R,ll(0,!1),Ut&&typeof Ut.onPostCommitFiberRoot=="function")try{Ut.onPostCommitFiberRoot(fn,y)}catch{}return!0}finally{ee.p=g,U.T=f,s_(a,s)}}function l_(a,s,u){s=Xn(u,s),s=om(a.stateNode,s,2),a=ka(a,s,2),a!==null&&(ko(a,2),Cr(a))}function ct(a,s,u){if(a.tag===3)l_(a,a,u);else for(;s!==null;){if(s.tag===3){l_(s,a,u);break}else if(s.tag===1){var f=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(Da===null||!Da.has(f))){a=Xn(u,a),u=uy(2),f=ka(s,u,2),f!==null&&(cy(u,f,s,a),ko(f,2),Cr(f));break}}s=s.return}}function Lm(a,s,u){var f=a.pingCache;if(f===null){f=a.pingCache=new nO;var g=new Set;f.set(s,g)}else g=f.get(s),g===void 0&&(g=new Set,f.set(s,g));g.has(u)||(Sm=!0,g.add(u),a=oO.bind(null,a,s,u),s.then(a,a))}function oO(a,s,u){var f=a.pingCache;f!==null&&f.delete(s),a.pingedLanes|=a.suspendedLanes&u,a.warmLanes&=~u,gt===a&&(Xe&u)===u&&(Ct===4||Ct===3&&(Xe&62914560)===Xe&&300>dn()-mc?(at&2)===0&&Us(a,0):Am|=u,Bs===Xe&&(Bs=0)),Cr(a)}function u_(a,s){s===0&&(s=rb()),a=Ei(a,s),a!==null&&(ko(a,s),Cr(a))}function lO(a){var s=a.memoizedState,u=0;s!==null&&(u=s.retryLane),u_(a,u)}function uO(a,s){var u=0;switch(a.tag){case 31:case 13:var f=a.stateNode,g=a.memoizedState;g!==null&&(u=g.retryLane);break;case 19:f=a.stateNode;break;case 22:f=a.stateNode._retryCache;break;default:throw Error(r(314))}f!==null&&f.delete(s),u_(a,u)}function cO(a,s){return qt(a,s)}var xc=null,zs=null,Im=!1,Tc=!1,Dm=!1,Ba=0;function Cr(a){a!==zs&&a.next===null&&(zs===null?xc=zs=a:zs=zs.next=a),Tc=!0,Im||(Im=!0,fO())}function ll(a,s){if(!Dm&&Tc){Dm=!0;do for(var u=!1,f=xc;f!==null;){if(a!==0){var g=f.pendingLanes;if(g===0)var y=0;else{var w=f.suspendedLanes,R=f.pingedLanes;y=(1<<31-pt(42|a)+1)-1,y&=g&~(w&~R),y=y&201326741?y&201326741|1:y?y|2:0}y!==0&&(u=!0,h_(f,y))}else y=Xe,y=Cu(f,f===gt?y:0,f.cancelPendingCommit!==null||f.timeoutHandle!==-1),(y&3)===0||wo(f,y)||(u=!0,h_(f,y));f=f.next}while(u);Dm=!1}}function dO(){c_()}function c_(){Tc=Im=!1;var a=0;Ba!==0&&TO()&&(a=Ba);for(var s=dn(),u=null,f=xc;f!==null;){var g=f.next,y=d_(f,s);y===0?(f.next=null,u===null?xc=g:u.next=g,g===null&&(zs=u)):(u=f,(a!==0||(y&3)!==0)&&(Tc=!0)),f=g}Ht!==0&&Ht!==5||ll(a),Ba!==0&&(Ba=0)}function d_(a,s){for(var u=a.suspendedLanes,f=a.pingedLanes,g=a.expirationTimes,y=a.pendingLanes&-62914561;0<y;){var w=31-pt(y),R=1<<w,$=g[w];$===-1?((R&u)===0||(R&f)!==0)&&(g[w]=j3(R,s)):$<=s&&(a.expiredLanes|=R),y&=~R}if(s=gt,u=Xe,u=Cu(a,a===s?u:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),f=a.callbackNode,u===0||a===s&&(ut===2||ut===9)||a.cancelPendingCommit!==null)return f!==null&&f!==null&&yn(f),a.callbackNode=null,a.callbackPriority=0;if((u&3)===0||wo(a,u)){if(s=u&-u,s===a.callbackPriority)return s;switch(f!==null&&yn(f),Qf(u)){case 2:case 8:u=_e;break;case 32:u=Le;break;case 268435456:u=ot;break;default:u=Le}return f=f_.bind(null,a),u=qt(u,f),a.callbackPriority=s,a.callbackNode=u,s}return f!==null&&f!==null&&yn(f),a.callbackPriority=2,a.callbackNode=null,2}function f_(a,s){if(Ht!==0&&Ht!==5)return a.callbackNode=null,a.callbackPriority=0,null;var u=a.callbackNode;if(_c()&&a.callbackNode!==u)return null;var f=Xe;return f=Cu(a,a===gt?f:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),f===0?null:(Yy(a,f,s),d_(a,dn()),a.callbackNode!=null&&a.callbackNode===u?f_.bind(null,a):null)}function h_(a,s){if(_c())return null;Yy(a,s,!0)}function fO(){SO(function(){(at&6)!==0?qt(oe,dO):c_()})}function Mm(){if(Ba===0){var a=Cs;a===0&&(a=vu,vu<<=1,(vu&261888)===0&&(vu=256)),Ba=a}return Ba}function m_(a){return a==null||typeof a=="symbol"||typeof a=="boolean"?null:typeof a=="function"?a:Ru(""+a)}function p_(a,s){var u=s.ownerDocument.createElement("input");return u.name=s.name,u.value=s.value,a.id&&u.setAttribute("form",a.id),s.parentNode.insertBefore(u,s),a=new FormData(a),u.parentNode.removeChild(u),a}function hO(a,s,u,f,g){if(s==="submit"&&u&&u.stateNode===g){var y=m_((g[xn]||null).action),w=f.submitter;w&&(s=(s=w[xn]||null)?m_(s.formAction):w.getAttribute("formAction"),s!==null&&(y=s,w=null));var R=new Du("action","action",null,f,g);a.push({event:R,listeners:[{instance:null,listener:function(){if(f.defaultPrevented){if(Ba!==0){var $=w?p_(g,w):new FormData(g);tm(u,{pending:!0,data:$,method:g.method,action:y},null,$)}}else typeof y=="function"&&(R.preventDefault(),$=w?p_(g,w):new FormData(g),tm(u,{pending:!0,data:$,method:g.method,action:y},y,$))},currentTarget:g}]})}}for(var Pm=0;Pm<Eh.length;Pm++){var Bm=Eh[Pm],mO=Bm.toLowerCase(),pO=Bm[0].toUpperCase()+Bm.slice(1);lr(mO,"on"+pO)}lr(qb,"onAnimationEnd"),lr(Yb,"onAnimationIteration"),lr(Xb,"onAnimationStart"),lr("dblclick","onDoubleClick"),lr("focusin","onFocus"),lr("focusout","onBlur"),lr(OR,"onTransitionRun"),lr(LR,"onTransitionStart"),lr(IR,"onTransitionCancel"),lr(Qb,"onTransitionEnd"),fs("onMouseEnter",["mouseout","mouseover"]),fs("onMouseLeave",["mouseout","mouseover"]),fs("onPointerEnter",["pointerout","pointerover"]),fs("onPointerLeave",["pointerout","pointerover"]),mi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),mi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),mi("onBeforeInput",["compositionend","keypress","textInput","paste"]),mi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),mi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),mi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ul="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),gO=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ul));function g_(a,s){s=(s&4)!==0;for(var u=0;u<a.length;u++){var f=a[u],g=f.event;f=f.listeners;e:{var y=void 0;if(s)for(var w=f.length-1;0<=w;w--){var R=f[w],$=R.instance,K=R.currentTarget;if(R=R.listener,$!==y&&g.isPropagationStopped())break e;y=R,g.currentTarget=K;try{y(g)}catch(se){Bu(se)}g.currentTarget=null,y=$}else for(w=0;w<f.length;w++){if(R=f[w],$=R.instance,K=R.currentTarget,R=R.listener,$!==y&&g.isPropagationStopped())break e;y=R,g.currentTarget=K;try{y(g)}catch(se){Bu(se)}g.currentTarget=null,y=$}}}}function qe(a,s){var u=s[Wf];u===void 0&&(u=s[Wf]=new Set);var f=a+"__bubble";u.has(f)||(b_(s,a,2,!1),u.add(f))}function jm(a,s,u){var f=0;s&&(f|=4),b_(u,a,f,s)}var vc="_reactListening"+Math.random().toString(36).slice(2);function Um(a){if(!a[vc]){a[vc]=!0,cb.forEach(function(u){u!=="selectionchange"&&(gO.has(u)||jm(u,!1,a),jm(u,!0,a))});var s=a.nodeType===9?a:a.ownerDocument;s===null||s[vc]||(s[vc]=!0,jm("selectionchange",!1,s))}}function b_(a,s,u,f){switch(q_(s)){case 2:var g=VO;break;case 8:g=GO;break;default:g=ep}u=g.bind(null,s,u,a),g=void 0,!ih||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(g=!0),f?g!==void 0?a.addEventListener(s,u,{capture:!0,passive:g}):a.addEventListener(s,u,!0):g!==void 0?a.addEventListener(s,u,{passive:g}):a.addEventListener(s,u,!1)}function Hm(a,s,u,f,g){var y=f;if((s&1)===0&&(s&2)===0&&f!==null)e:for(;;){if(f===null)return;var w=f.tag;if(w===3||w===4){var R=f.stateNode.containerInfo;if(R===g)break;if(w===4)for(w=f.return;w!==null;){var $=w.tag;if(($===3||$===4)&&w.stateNode.containerInfo===g)return;w=w.return}for(;R!==null;){if(w=us(R),w===null)return;if($=w.tag,$===5||$===6||$===26||$===27){f=y=w;continue e}R=R.parentNode}}f=f.return}Tb(function(){var K=y,se=rh(u),de=[];e:{var Z=Wb.get(a);if(Z!==void 0){var ne=Du,Ae=a;switch(a){case"keypress":if(Lu(u)===0)break e;case"keydown":case"keyup":ne=uR;break;case"focusin":Ae="focus",ne=uh;break;case"focusout":Ae="blur",ne=uh;break;case"beforeblur":case"afterblur":ne=uh;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ne=Ab;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ne=K3;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ne=fR;break;case qb:case Yb:case Xb:ne=eR;break;case Qb:ne=mR;break;case"scroll":case"scrollend":ne=Q3;break;case"wheel":ne=gR;break;case"copy":case"cut":case"paste":ne=nR;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ne=wb;break;case"toggle":case"beforetoggle":ne=ER}var Oe=(s&4)!==0,ht=!Oe&&(a==="scroll"||a==="scrollend"),Y=Oe?Z!==null?Z+"Capture":null:Z;Oe=[];for(var q=K,W;q!==null;){var le=q;if(W=le.stateNode,le=le.tag,le!==5&&le!==26&&le!==27||W===null||Y===null||(le=Oo(q,Y),le!=null&&Oe.push(cl(q,le,W))),ht)break;q=q.return}0<Oe.length&&(Z=new ne(Z,Ae,null,u,se),de.push({event:Z,listeners:Oe}))}}if((s&7)===0){e:{if(Z=a==="mouseover"||a==="pointerover",ne=a==="mouseout"||a==="pointerout",Z&&u!==nh&&(Ae=u.relatedTarget||u.fromElement)&&(us(Ae)||Ae[ls]))break e;if((ne||Z)&&(Z=se.window===se?se:(Z=se.ownerDocument)?Z.defaultView||Z.parentWindow:window,ne?(Ae=u.relatedTarget||u.toElement,ne=K,Ae=Ae?us(Ae):null,Ae!==null&&(ht=o(Ae),Oe=Ae.tag,Ae!==ht||Oe!==5&&Oe!==27&&Oe!==6)&&(Ae=null)):(ne=null,Ae=K),ne!==Ae)){if(Oe=Ab,le="onMouseLeave",Y="onMouseEnter",q="mouse",(a==="pointerout"||a==="pointerover")&&(Oe=wb,le="onPointerLeave",Y="onPointerEnter",q="pointer"),ht=ne==null?Z:Ro(ne),W=Ae==null?Z:Ro(Ae),Z=new Oe(le,q+"leave",ne,u,se),Z.target=ht,Z.relatedTarget=W,le=null,us(se)===K&&(Oe=new Oe(Y,q+"enter",Ae,u,se),Oe.target=W,Oe.relatedTarget=ht,le=Oe),ht=le,ne&&Ae)t:{for(Oe=bO,Y=ne,q=Ae,W=0,le=Y;le;le=Oe(le))W++;le=0;for(var Ne=q;Ne;Ne=Oe(Ne))le++;for(;0<W-le;)Y=Oe(Y),W--;for(;0<le-W;)q=Oe(q),le--;for(;W--;){if(Y===q||q!==null&&Y===q.alternate){Oe=Y;break t}Y=Oe(Y),q=Oe(q)}Oe=null}else Oe=null;ne!==null&&E_(de,Z,ne,Oe,!1),Ae!==null&&ht!==null&&E_(de,ht,Ae,Oe,!0)}}e:{if(Z=K?Ro(K):window,ne=Z.nodeName&&Z.nodeName.toLowerCase(),ne==="select"||ne==="input"&&Z.type==="file")var nt=Mb;else if(Ib(Z))if(Pb)nt=kR;else{nt=CR;var Ce=AR}else ne=Z.nodeName,!ne||ne.toLowerCase()!=="input"||Z.type!=="checkbox"&&Z.type!=="radio"?K&&th(K.elementType)&&(nt=Mb):nt=wR;if(nt&&(nt=nt(a,K))){Db(de,nt,u,se);break e}Ce&&Ce(a,Z,K),a==="focusout"&&K&&Z.type==="number"&&K.memoizedProps.value!=null&&eh(Z,"number",Z.value)}switch(Ce=K?Ro(K):window,a){case"focusin":(Ib(Ce)||Ce.contentEditable==="true")&&(Es=Ce,ph=K,Uo=null);break;case"focusout":Uo=ph=Es=null;break;case"mousedown":gh=!0;break;case"contextmenu":case"mouseup":case"dragend":gh=!1,Vb(de,u,se);break;case"selectionchange":if(RR)break;case"keydown":case"keyup":Vb(de,u,se)}var Ue;if(dh)e:{switch(a){case"compositionstart":var Qe="onCompositionStart";break e;case"compositionend":Qe="onCompositionEnd";break e;case"compositionupdate":Qe="onCompositionUpdate";break e}Qe=void 0}else bs?Ob(a,u)&&(Qe="onCompositionEnd"):a==="keydown"&&u.keyCode===229&&(Qe="onCompositionStart");Qe&&(kb&&u.locale!=="ko"&&(bs||Qe!=="onCompositionStart"?Qe==="onCompositionEnd"&&bs&&(Ue=vb()):(xa=se,sh="value"in xa?xa.value:xa.textContent,bs=!0)),Ce=Sc(K,Qe),0<Ce.length&&(Qe=new Cb(Qe,a,null,u,se),de.push({event:Qe,listeners:Ce}),Ue?Qe.data=Ue:(Ue=Lb(u),Ue!==null&&(Qe.data=Ue)))),(Ue=_R?xR(a,u):TR(a,u))&&(Qe=Sc(K,"onBeforeInput"),0<Qe.length&&(Ce=new Cb("onBeforeInput","beforeinput",null,u,se),de.push({event:Ce,listeners:Qe}),Ce.data=Ue)),hO(de,a,K,u,se)}g_(de,s)})}function cl(a,s,u){return{instance:a,listener:s,currentTarget:u}}function Sc(a,s){for(var u=s+"Capture",f=[];a!==null;){var g=a,y=g.stateNode;if(g=g.tag,g!==5&&g!==26&&g!==27||y===null||(g=Oo(a,u),g!=null&&f.unshift(cl(a,g,y)),g=Oo(a,s),g!=null&&f.push(cl(a,g,y))),a.tag===3)return f;a=a.return}return[]}function bO(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5&&a.tag!==27);return a||null}function E_(a,s,u,f,g){for(var y=s._reactName,w=[];u!==null&&u!==f;){var R=u,$=R.alternate,K=R.stateNode;if(R=R.tag,$!==null&&$===f)break;R!==5&&R!==26&&R!==27||K===null||($=K,g?(K=Oo(u,y),K!=null&&w.unshift(cl(u,K,$))):g||(K=Oo(u,y),K!=null&&w.push(cl(u,K,$)))),u=u.return}w.length!==0&&a.push({event:s,listeners:w})}var EO=/\r\n?/g,yO=/\u0000|\uFFFD/g;function y_(a){return(typeof a=="string"?a:""+a).replace(EO,`
10
+ `).replace(yO,"")}function __(a,s){return s=y_(s),y_(a)===s}function ft(a,s,u,f,g,y){switch(u){case"children":typeof f=="string"?s==="body"||s==="textarea"&&f===""||ms(a,f):(typeof f=="number"||typeof f=="bigint")&&s!=="body"&&ms(a,""+f);break;case"className":ku(a,"class",f);break;case"tabIndex":ku(a,"tabindex",f);break;case"dir":case"role":case"viewBox":case"width":case"height":ku(a,u,f);break;case"style":_b(a,f,y);break;case"data":if(s!=="object"){ku(a,"data",f);break}case"src":case"href":if(f===""&&(s!=="a"||u!=="href")){a.removeAttribute(u);break}if(f==null||typeof f=="function"||typeof f=="symbol"||typeof f=="boolean"){a.removeAttribute(u);break}f=Ru(""+f),a.setAttribute(u,f);break;case"action":case"formAction":if(typeof f=="function"){a.setAttribute(u,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof y=="function"&&(u==="formAction"?(s!=="input"&&ft(a,s,"name",g.name,g,null),ft(a,s,"formEncType",g.formEncType,g,null),ft(a,s,"formMethod",g.formMethod,g,null),ft(a,s,"formTarget",g.formTarget,g,null)):(ft(a,s,"encType",g.encType,g,null),ft(a,s,"method",g.method,g,null),ft(a,s,"target",g.target,g,null)));if(f==null||typeof f=="symbol"||typeof f=="boolean"){a.removeAttribute(u);break}f=Ru(""+f),a.setAttribute(u,f);break;case"onClick":f!=null&&(a.onclick=Vr);break;case"onScroll":f!=null&&qe("scroll",a);break;case"onScrollEnd":f!=null&&qe("scrollend",a);break;case"dangerouslySetInnerHTML":if(f!=null){if(typeof f!="object"||!("__html"in f))throw Error(r(61));if(u=f.__html,u!=null){if(g.children!=null)throw Error(r(60));a.innerHTML=u}}break;case"multiple":a.multiple=f&&typeof f!="function"&&typeof f!="symbol";break;case"muted":a.muted=f&&typeof f!="function"&&typeof f!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(f==null||typeof f=="function"||typeof f=="boolean"||typeof f=="symbol"){a.removeAttribute("xlink:href");break}u=Ru(""+f),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":f!=null&&typeof f!="function"&&typeof f!="symbol"?a.setAttribute(u,""+f):a.removeAttribute(u);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":f&&typeof f!="function"&&typeof f!="symbol"?a.setAttribute(u,""):a.removeAttribute(u);break;case"capture":case"download":f===!0?a.setAttribute(u,""):f!==!1&&f!=null&&typeof f!="function"&&typeof f!="symbol"?a.setAttribute(u,f):a.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":f!=null&&typeof f!="function"&&typeof f!="symbol"&&!isNaN(f)&&1<=f?a.setAttribute(u,f):a.removeAttribute(u);break;case"rowSpan":case"start":f==null||typeof f=="function"||typeof f=="symbol"||isNaN(f)?a.removeAttribute(u):a.setAttribute(u,f);break;case"popover":qe("beforetoggle",a),qe("toggle",a),wu(a,"popover",f);break;case"xlinkActuate":$r(a,"http://www.w3.org/1999/xlink","xlink:actuate",f);break;case"xlinkArcrole":$r(a,"http://www.w3.org/1999/xlink","xlink:arcrole",f);break;case"xlinkRole":$r(a,"http://www.w3.org/1999/xlink","xlink:role",f);break;case"xlinkShow":$r(a,"http://www.w3.org/1999/xlink","xlink:show",f);break;case"xlinkTitle":$r(a,"http://www.w3.org/1999/xlink","xlink:title",f);break;case"xlinkType":$r(a,"http://www.w3.org/1999/xlink","xlink:type",f);break;case"xmlBase":$r(a,"http://www.w3.org/XML/1998/namespace","xml:base",f);break;case"xmlLang":$r(a,"http://www.w3.org/XML/1998/namespace","xml:lang",f);break;case"xmlSpace":$r(a,"http://www.w3.org/XML/1998/namespace","xml:space",f);break;case"is":wu(a,"is",f);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=Y3.get(u)||u,wu(a,u,f))}}function zm(a,s,u,f,g,y){switch(u){case"style":_b(a,f,y);break;case"dangerouslySetInnerHTML":if(f!=null){if(typeof f!="object"||!("__html"in f))throw Error(r(61));if(u=f.__html,u!=null){if(g.children!=null)throw Error(r(60));a.innerHTML=u}}break;case"children":typeof f=="string"?ms(a,f):(typeof f=="number"||typeof f=="bigint")&&ms(a,""+f);break;case"onScroll":f!=null&&qe("scroll",a);break;case"onScrollEnd":f!=null&&qe("scrollend",a);break;case"onClick":f!=null&&(a.onclick=Vr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!db.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(g=u.endsWith("Capture"),s=u.slice(2,g?u.length-7:void 0),y=a[xn]||null,y=y!=null?y[u]:null,typeof y=="function"&&a.removeEventListener(s,y,g),typeof f=="function")){typeof y!="function"&&y!==null&&(u in a?a[u]=null:a.hasAttribute(u)&&a.removeAttribute(u)),a.addEventListener(s,f,g);break e}u in a?a[u]=f:f===!0?a.setAttribute(u,""):wu(a,u,f)}}}function rn(a,s,u){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":qe("error",a),qe("load",a);var f=!1,g=!1,y;for(y in u)if(u.hasOwnProperty(y)){var w=u[y];if(w!=null)switch(y){case"src":f=!0;break;case"srcSet":g=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:ft(a,s,y,w,u,null)}}g&&ft(a,s,"srcSet",u.srcSet,u,null),f&&ft(a,s,"src",u.src,u,null);return;case"input":qe("invalid",a);var R=y=w=g=null,$=null,K=null;for(f in u)if(u.hasOwnProperty(f)){var se=u[f];if(se!=null)switch(f){case"name":g=se;break;case"type":w=se;break;case"checked":$=se;break;case"defaultChecked":K=se;break;case"value":y=se;break;case"defaultValue":R=se;break;case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(r(137,s));break;default:ft(a,s,f,se,u,null)}}gb(a,y,R,$,K,w,g,!1);return;case"select":qe("invalid",a),f=w=y=null;for(g in u)if(u.hasOwnProperty(g)&&(R=u[g],R!=null))switch(g){case"value":y=R;break;case"defaultValue":w=R;break;case"multiple":f=R;default:ft(a,s,g,R,u,null)}s=y,u=w,a.multiple=!!f,s!=null?hs(a,!!f,s,!1):u!=null&&hs(a,!!f,u,!0);return;case"textarea":qe("invalid",a),y=g=f=null;for(w in u)if(u.hasOwnProperty(w)&&(R=u[w],R!=null))switch(w){case"value":f=R;break;case"defaultValue":g=R;break;case"children":y=R;break;case"dangerouslySetInnerHTML":if(R!=null)throw Error(r(91));break;default:ft(a,s,w,R,u,null)}Eb(a,f,g,y);return;case"option":for($ in u)u.hasOwnProperty($)&&(f=u[$],f!=null)&&($==="selected"?a.selected=f&&typeof f!="function"&&typeof f!="symbol":ft(a,s,$,f,u,null));return;case"dialog":qe("beforetoggle",a),qe("toggle",a),qe("cancel",a),qe("close",a);break;case"iframe":case"object":qe("load",a);break;case"video":case"audio":for(f=0;f<ul.length;f++)qe(ul[f],a);break;case"image":qe("error",a),qe("load",a);break;case"details":qe("toggle",a);break;case"embed":case"source":case"link":qe("error",a),qe("load",a);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(K in u)if(u.hasOwnProperty(K)&&(f=u[K],f!=null))switch(K){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:ft(a,s,K,f,u,null)}return;default:if(th(s)){for(se in u)u.hasOwnProperty(se)&&(f=u[se],f!==void 0&&zm(a,s,se,f,u,void 0));return}}for(R in u)u.hasOwnProperty(R)&&(f=u[R],f!=null&&ft(a,s,R,f,u,null))}function _O(a,s,u,f){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var g=null,y=null,w=null,R=null,$=null,K=null,se=null;for(ne in u){var de=u[ne];if(u.hasOwnProperty(ne)&&de!=null)switch(ne){case"checked":break;case"value":break;case"defaultValue":$=de;default:f.hasOwnProperty(ne)||ft(a,s,ne,null,f,de)}}for(var Z in f){var ne=f[Z];if(de=u[Z],f.hasOwnProperty(Z)&&(ne!=null||de!=null))switch(Z){case"type":y=ne;break;case"name":g=ne;break;case"checked":K=ne;break;case"defaultChecked":se=ne;break;case"value":w=ne;break;case"defaultValue":R=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(r(137,s));break;default:ne!==de&&ft(a,s,Z,ne,f,de)}}Jf(a,w,R,$,K,se,y,g);return;case"select":ne=w=R=Z=null;for(y in u)if($=u[y],u.hasOwnProperty(y)&&$!=null)switch(y){case"value":break;case"multiple":ne=$;default:f.hasOwnProperty(y)||ft(a,s,y,null,f,$)}for(g in f)if(y=f[g],$=u[g],f.hasOwnProperty(g)&&(y!=null||$!=null))switch(g){case"value":Z=y;break;case"defaultValue":R=y;break;case"multiple":w=y;default:y!==$&&ft(a,s,g,y,f,$)}s=R,u=w,f=ne,Z!=null?hs(a,!!u,Z,!1):!!f!=!!u&&(s!=null?hs(a,!!u,s,!0):hs(a,!!u,u?[]:"",!1));return;case"textarea":ne=Z=null;for(R in u)if(g=u[R],u.hasOwnProperty(R)&&g!=null&&!f.hasOwnProperty(R))switch(R){case"value":break;case"children":break;default:ft(a,s,R,null,f,g)}for(w in f)if(g=f[w],y=u[w],f.hasOwnProperty(w)&&(g!=null||y!=null))switch(w){case"value":Z=g;break;case"defaultValue":ne=g;break;case"children":break;case"dangerouslySetInnerHTML":if(g!=null)throw Error(r(91));break;default:g!==y&&ft(a,s,w,g,f,y)}bb(a,Z,ne);return;case"option":for(var Ae in u)Z=u[Ae],u.hasOwnProperty(Ae)&&Z!=null&&!f.hasOwnProperty(Ae)&&(Ae==="selected"?a.selected=!1:ft(a,s,Ae,null,f,Z));for($ in f)Z=f[$],ne=u[$],f.hasOwnProperty($)&&Z!==ne&&(Z!=null||ne!=null)&&($==="selected"?a.selected=Z&&typeof Z!="function"&&typeof Z!="symbol":ft(a,s,$,Z,f,ne));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Oe in u)Z=u[Oe],u.hasOwnProperty(Oe)&&Z!=null&&!f.hasOwnProperty(Oe)&&ft(a,s,Oe,null,f,Z);for(K in f)if(Z=f[K],ne=u[K],f.hasOwnProperty(K)&&Z!==ne&&(Z!=null||ne!=null))switch(K){case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(r(137,s));break;default:ft(a,s,K,Z,f,ne)}return;default:if(th(s)){for(var ht in u)Z=u[ht],u.hasOwnProperty(ht)&&Z!==void 0&&!f.hasOwnProperty(ht)&&zm(a,s,ht,void 0,f,Z);for(se in f)Z=f[se],ne=u[se],!f.hasOwnProperty(se)||Z===ne||Z===void 0&&ne===void 0||zm(a,s,se,Z,f,ne);return}}for(var Y in u)Z=u[Y],u.hasOwnProperty(Y)&&Z!=null&&!f.hasOwnProperty(Y)&&ft(a,s,Y,null,f,Z);for(de in f)Z=f[de],ne=u[de],!f.hasOwnProperty(de)||Z===ne||Z==null&&ne==null||ft(a,s,de,Z,f,ne)}function x_(a){switch(a){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function xO(){if(typeof performance.getEntriesByType=="function"){for(var a=0,s=0,u=performance.getEntriesByType("resource"),f=0;f<u.length;f++){var g=u[f],y=g.transferSize,w=g.initiatorType,R=g.duration;if(y&&R&&x_(w)){for(w=0,R=g.responseEnd,f+=1;f<u.length;f++){var $=u[f],K=$.startTime;if(K>R)break;var se=$.transferSize,de=$.initiatorType;se&&x_(de)&&($=$.responseEnd,w+=se*($<R?1:(R-K)/($-K)))}if(--f,s+=8*(y+w)/(g.duration/1e3),a++,10<a)break}}if(0<a)return s/a/1e6}return navigator.connection&&(a=navigator.connection.downlink,typeof a=="number")?a:5}var Fm=null,$m=null;function Ac(a){return a.nodeType===9?a:a.ownerDocument}function T_(a){switch(a){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function v_(a,s){if(a===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return a===1&&s==="foreignObject"?0:a}function Vm(a,s){return a==="textarea"||a==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var Gm=null;function TO(){var a=window.event;return a&&a.type==="popstate"?a===Gm?!1:(Gm=a,!0):(Gm=null,!1)}var S_=typeof setTimeout=="function"?setTimeout:void 0,vO=typeof clearTimeout=="function"?clearTimeout:void 0,A_=typeof Promise=="function"?Promise:void 0,SO=typeof queueMicrotask=="function"?queueMicrotask:typeof A_<"u"?function(a){return A_.resolve(null).then(a).catch(AO)}:S_;function AO(a){setTimeout(function(){throw a})}function ja(a){return a==="head"}function C_(a,s){var u=s,f=0;do{var g=u.nextSibling;if(a.removeChild(u),g&&g.nodeType===8)if(u=g.data,u==="/$"||u==="/&"){if(f===0){a.removeChild(g),Gs(s);return}f--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")f++;else if(u==="html")dl(a.ownerDocument.documentElement);else if(u==="head"){u=a.ownerDocument.head,dl(u);for(var y=u.firstChild;y;){var w=y.nextSibling,R=y.nodeName;y[No]||R==="SCRIPT"||R==="STYLE"||R==="LINK"&&y.rel.toLowerCase()==="stylesheet"||u.removeChild(y),y=w}}else u==="body"&&dl(a.ownerDocument.body);u=g}while(u);Gs(s)}function w_(a,s){var u=a;a=0;do{var f=u.nextSibling;if(u.nodeType===1?s?(u._stashedDisplay=u.style.display,u.style.display="none"):(u.style.display=u._stashedDisplay||"",u.getAttribute("style")===""&&u.removeAttribute("style")):u.nodeType===3&&(s?(u._stashedText=u.nodeValue,u.nodeValue=""):u.nodeValue=u._stashedText||""),f&&f.nodeType===8)if(u=f.data,u==="/$"){if(a===0)break;a--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||a++;u=f}while(u)}function qm(a){var s=a.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var u=s;switch(s=s.nextSibling,u.nodeName){case"HTML":case"HEAD":case"BODY":qm(u),Kf(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}a.removeChild(u)}}function CO(a,s,u,f){for(;a.nodeType===1;){var g=u;if(a.nodeName.toLowerCase()!==s.toLowerCase()){if(!f&&(a.nodeName!=="INPUT"||a.type!=="hidden"))break}else if(f){if(!a[No])switch(s){case"meta":if(!a.hasAttribute("itemprop"))break;return a;case"link":if(y=a.getAttribute("rel"),y==="stylesheet"&&a.hasAttribute("data-precedence"))break;if(y!==g.rel||a.getAttribute("href")!==(g.href==null||g.href===""?null:g.href)||a.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin)||a.getAttribute("title")!==(g.title==null?null:g.title))break;return a;case"style":if(a.hasAttribute("data-precedence"))break;return a;case"script":if(y=a.getAttribute("src"),(y!==(g.src==null?null:g.src)||a.getAttribute("type")!==(g.type==null?null:g.type)||a.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin))&&y&&a.hasAttribute("async")&&!a.hasAttribute("itemprop"))break;return a;default:return a}}else if(s==="input"&&a.type==="hidden"){var y=g.name==null?null:""+g.name;if(g.type==="hidden"&&a.getAttribute("name")===y)return a}else return a;if(a=Jn(a.nextSibling),a===null)break}return null}function wO(a,s,u){if(s==="")return null;for(;a.nodeType!==3;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!u||(a=Jn(a.nextSibling),a===null))return null;return a}function k_(a,s){for(;a.nodeType!==8;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!s||(a=Jn(a.nextSibling),a===null))return null;return a}function Ym(a){return a.data==="$?"||a.data==="$~"}function Xm(a){return a.data==="$!"||a.data==="$?"&&a.ownerDocument.readyState!=="loading"}function kO(a,s){var u=a.ownerDocument;if(a.data==="$~")a._reactRetry=s;else if(a.data!=="$?"||u.readyState!=="loading")s();else{var f=function(){s(),u.removeEventListener("DOMContentLoaded",f)};u.addEventListener("DOMContentLoaded",f),a._reactRetry=f}}function Jn(a){for(;a!=null;a=a.nextSibling){var s=a.nodeType;if(s===1||s===3)break;if(s===8){if(s=a.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return a}var Qm=null;function N_(a){a=a.nextSibling;for(var s=0;a;){if(a.nodeType===8){var u=a.data;if(u==="/$"||u==="/&"){if(s===0)return Jn(a.nextSibling);s--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||s++}a=a.nextSibling}return null}function R_(a){a=a.previousSibling;for(var s=0;a;){if(a.nodeType===8){var u=a.data;if(u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"){if(s===0)return a;s--}else u!=="/$"&&u!=="/&"||s++}a=a.previousSibling}return null}function O_(a,s,u){switch(s=Ac(u),a){case"html":if(a=s.documentElement,!a)throw Error(r(452));return a;case"head":if(a=s.head,!a)throw Error(r(453));return a;case"body":if(a=s.body,!a)throw Error(r(454));return a;default:throw Error(r(451))}}function dl(a){for(var s=a.attributes;s.length;)a.removeAttributeNode(s[0]);Kf(a)}var er=new Map,L_=new Set;function Cc(a){return typeof a.getRootNode=="function"?a.getRootNode():a.nodeType===9?a:a.ownerDocument}var sa=ee.d;ee.d={f:NO,r:RO,D:OO,C:LO,L:IO,m:DO,X:PO,S:MO,M:BO};function NO(){var a=sa.f(),s=bc();return a||s}function RO(a){var s=cs(a);s!==null&&s.tag===5&&s.type==="form"?QE(s):sa.r(a)}var Fs=typeof document>"u"?null:document;function I_(a,s,u){var f=Fs;if(f&&typeof s=="string"&&s){var g=qn(s);g='link[rel="'+a+'"][href="'+g+'"]',typeof u=="string"&&(g+='[crossorigin="'+u+'"]'),L_.has(g)||(L_.add(g),a={rel:a,crossOrigin:u,href:s},f.querySelector(g)===null&&(s=f.createElement("link"),rn(s,"link",a),Yt(s),f.head.appendChild(s)))}}function OO(a){sa.D(a),I_("dns-prefetch",a,null)}function LO(a,s){sa.C(a,s),I_("preconnect",a,s)}function IO(a,s,u){sa.L(a,s,u);var f=Fs;if(f&&a&&s){var g='link[rel="preload"][as="'+qn(s)+'"]';s==="image"&&u&&u.imageSrcSet?(g+='[imagesrcset="'+qn(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(g+='[imagesizes="'+qn(u.imageSizes)+'"]')):g+='[href="'+qn(a)+'"]';var y=g;switch(s){case"style":y=$s(a);break;case"script":y=Vs(a)}er.has(y)||(a=m({rel:"preload",href:s==="image"&&u&&u.imageSrcSet?void 0:a,as:s},u),er.set(y,a),f.querySelector(g)!==null||s==="style"&&f.querySelector(fl(y))||s==="script"&&f.querySelector(hl(y))||(s=f.createElement("link"),rn(s,"link",a),Yt(s),f.head.appendChild(s)))}}function DO(a,s){sa.m(a,s);var u=Fs;if(u&&a){var f=s&&typeof s.as=="string"?s.as:"script",g='link[rel="modulepreload"][as="'+qn(f)+'"][href="'+qn(a)+'"]',y=g;switch(f){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":y=Vs(a)}if(!er.has(y)&&(a=m({rel:"modulepreload",href:a},s),er.set(y,a),u.querySelector(g)===null)){switch(f){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(hl(y)))return}f=u.createElement("link"),rn(f,"link",a),Yt(f),u.head.appendChild(f)}}}function MO(a,s,u){sa.S(a,s,u);var f=Fs;if(f&&a){var g=ds(f).hoistableStyles,y=$s(a);s=s||"default";var w=g.get(y);if(!w){var R={loading:0,preload:null};if(w=f.querySelector(fl(y)))R.loading=5;else{a=m({rel:"stylesheet",href:a,"data-precedence":s},u),(u=er.get(y))&&Wm(a,u);var $=w=f.createElement("link");Yt($),rn($,"link",a),$._p=new Promise(function(K,se){$.onload=K,$.onerror=se}),$.addEventListener("load",function(){R.loading|=1}),$.addEventListener("error",function(){R.loading|=2}),R.loading|=4,wc(w,s,f)}w={type:"stylesheet",instance:w,count:1,state:R},g.set(y,w)}}}function PO(a,s){sa.X(a,s);var u=Fs;if(u&&a){var f=ds(u).hoistableScripts,g=Vs(a),y=f.get(g);y||(y=u.querySelector(hl(g)),y||(a=m({src:a,async:!0},s),(s=er.get(g))&&Km(a,s),y=u.createElement("script"),Yt(y),rn(y,"link",a),u.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},f.set(g,y))}}function BO(a,s){sa.M(a,s);var u=Fs;if(u&&a){var f=ds(u).hoistableScripts,g=Vs(a),y=f.get(g);y||(y=u.querySelector(hl(g)),y||(a=m({src:a,async:!0,type:"module"},s),(s=er.get(g))&&Km(a,s),y=u.createElement("script"),Yt(y),rn(y,"link",a),u.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},f.set(g,y))}}function D_(a,s,u,f){var g=(g=ye.current)?Cc(g):null;if(!g)throw Error(r(446));switch(a){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(s=$s(u.href),u=ds(g).hoistableStyles,f=u.get(s),f||(f={type:"style",instance:null,count:0,state:null},u.set(s,f)),f):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){a=$s(u.href);var y=ds(g).hoistableStyles,w=y.get(a);if(w||(g=g.ownerDocument||g,w={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},y.set(a,w),(y=g.querySelector(fl(a)))&&!y._p&&(w.instance=y,w.state.loading=5),er.has(a)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},er.set(a,u),y||jO(g,a,u,w.state))),s&&f===null)throw Error(r(528,""));return w}if(s&&f!==null)throw Error(r(529,""));return null;case"script":return s=u.async,u=u.src,typeof u=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=Vs(u),u=ds(g).hoistableScripts,f=u.get(s),f||(f={type:"script",instance:null,count:0,state:null},u.set(s,f)),f):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,a))}}function $s(a){return'href="'+qn(a)+'"'}function fl(a){return'link[rel="stylesheet"]['+a+"]"}function M_(a){return m({},a,{"data-precedence":a.precedence,precedence:null})}function jO(a,s,u,f){a.querySelector('link[rel="preload"][as="style"]['+s+"]")?f.loading=1:(s=a.createElement("link"),f.preload=s,s.addEventListener("load",function(){return f.loading|=1}),s.addEventListener("error",function(){return f.loading|=2}),rn(s,"link",u),Yt(s),a.head.appendChild(s))}function Vs(a){return'[src="'+qn(a)+'"]'}function hl(a){return"script[async]"+a}function P_(a,s,u){if(s.count++,s.instance===null)switch(s.type){case"style":var f=a.querySelector('style[data-href~="'+qn(u.href)+'"]');if(f)return s.instance=f,Yt(f),f;var g=m({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return f=(a.ownerDocument||a).createElement("style"),Yt(f),rn(f,"style",g),wc(f,u.precedence,a),s.instance=f;case"stylesheet":g=$s(u.href);var y=a.querySelector(fl(g));if(y)return s.state.loading|=4,s.instance=y,Yt(y),y;f=M_(u),(g=er.get(g))&&Wm(f,g),y=(a.ownerDocument||a).createElement("link"),Yt(y);var w=y;return w._p=new Promise(function(R,$){w.onload=R,w.onerror=$}),rn(y,"link",f),s.state.loading|=4,wc(y,u.precedence,a),s.instance=y;case"script":return y=Vs(u.src),(g=a.querySelector(hl(y)))?(s.instance=g,Yt(g),g):(f=u,(g=er.get(y))&&(f=m({},u),Km(f,g)),a=a.ownerDocument||a,g=a.createElement("script"),Yt(g),rn(g,"link",f),a.head.appendChild(g),s.instance=g);case"void":return null;default:throw Error(r(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(f=s.instance,s.state.loading|=4,wc(f,u.precedence,a));return s.instance}function wc(a,s,u){for(var f=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),g=f.length?f[f.length-1]:null,y=g,w=0;w<f.length;w++){var R=f[w];if(R.dataset.precedence===s)y=R;else if(y!==g)break}y?y.parentNode.insertBefore(a,y.nextSibling):(s=u.nodeType===9?u.head:u,s.insertBefore(a,s.firstChild))}function Wm(a,s){a.crossOrigin==null&&(a.crossOrigin=s.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=s.referrerPolicy),a.title==null&&(a.title=s.title)}function Km(a,s){a.crossOrigin==null&&(a.crossOrigin=s.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=s.referrerPolicy),a.integrity==null&&(a.integrity=s.integrity)}var kc=null;function B_(a,s,u){if(kc===null){var f=new Map,g=kc=new Map;g.set(u,f)}else g=kc,f=g.get(u),f||(f=new Map,g.set(u,f));if(f.has(a))return f;for(f.set(a,null),u=u.getElementsByTagName(a),g=0;g<u.length;g++){var y=u[g];if(!(y[No]||y[Jt]||a==="link"&&y.getAttribute("rel")==="stylesheet")&&y.namespaceURI!=="http://www.w3.org/2000/svg"){var w=y.getAttribute(s)||"";w=a+w;var R=f.get(w);R?R.push(y):f.set(w,[y])}}return f}function j_(a,s,u){a=a.ownerDocument||a,a.head.insertBefore(u,s==="title"?a.querySelector("head > title"):null)}function UO(a,s,u){if(u===1||s.itemProp!=null)return!1;switch(a){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;return s.rel==="stylesheet"?(a=s.disabled,typeof s.precedence=="string"&&a==null):!0;case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function U_(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}function HO(a,s,u,f){if(u.type==="stylesheet"&&(typeof f.media!="string"||matchMedia(f.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var g=$s(f.href),y=s.querySelector(fl(g));if(y){s=y._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(a.count++,a=Nc.bind(a),s.then(a,a)),u.state.loading|=4,u.instance=y,Yt(y);return}y=s.ownerDocument||s,f=M_(f),(g=er.get(g))&&Wm(f,g),y=y.createElement("link"),Yt(y);var w=y;w._p=new Promise(function(R,$){w.onload=R,w.onerror=$}),rn(y,"link",f),u.instance=y}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(u,s),(s=u.state.preload)&&(u.state.loading&3)===0&&(a.count++,u=Nc.bind(a),s.addEventListener("load",u),s.addEventListener("error",u))}}var Zm=0;function zO(a,s){return a.stylesheets&&a.count===0&&Oc(a,a.stylesheets),0<a.count||0<a.imgCount?function(u){var f=setTimeout(function(){if(a.stylesheets&&Oc(a,a.stylesheets),a.unsuspend){var y=a.unsuspend;a.unsuspend=null,y()}},6e4+s);0<a.imgBytes&&Zm===0&&(Zm=62500*xO());var g=setTimeout(function(){if(a.waitingForImages=!1,a.count===0&&(a.stylesheets&&Oc(a,a.stylesheets),a.unsuspend)){var y=a.unsuspend;a.unsuspend=null,y()}},(a.imgBytes>Zm?50:800)+s);return a.unsuspend=u,function(){a.unsuspend=null,clearTimeout(f),clearTimeout(g)}}:null}function Nc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Oc(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var Rc=null;function Oc(a,s){a.stylesheets=null,a.unsuspend!==null&&(a.count++,Rc=new Map,s.forEach(FO,a),Rc=null,Nc.call(a))}function FO(a,s){if(!(s.state.loading&4)){var u=Rc.get(a);if(u)var f=u.get(null);else{u=new Map,Rc.set(a,u);for(var g=a.querySelectorAll("link[data-precedence],style[data-precedence]"),y=0;y<g.length;y++){var w=g[y];(w.nodeName==="LINK"||w.getAttribute("media")!=="not all")&&(u.set(w.dataset.precedence,w),f=w)}f&&u.set(null,f)}g=s.instance,w=g.getAttribute("data-precedence"),y=u.get(w)||f,y===f&&u.set(null,g),u.set(w,g),this.count++,f=Nc.bind(this),g.addEventListener("load",f),g.addEventListener("error",f),y?y.parentNode.insertBefore(g,y.nextSibling):(a=a.nodeType===9?a.head:a,a.insertBefore(g,a.firstChild)),s.state.loading|=4}}var ml={$$typeof:N,Provider:null,Consumer:null,_currentValue:ce,_currentValue2:ce,_threadCount:0};function $O(a,s,u,f,g,y,w,R,$){this.tag=1,this.containerInfo=a,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Yf(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Yf(0),this.hiddenUpdates=Yf(null),this.identifierPrefix=f,this.onUncaughtError=g,this.onCaughtError=y,this.onRecoverableError=w,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=$,this.incompleteTransitions=new Map}function H_(a,s,u,f,g,y,w,R,$,K,se,de){return a=new $O(a,s,u,w,$,K,se,de,R),s=1,y===!0&&(s|=24),y=Dn(3,null,null,s),a.current=y,y.stateNode=a,s=Oh(),s.refCount++,a.pooledCache=s,s.refCount++,y.memoizedState={element:f,isDehydrated:u,cache:s},Mh(y),a}function z_(a){return a?(a=xs,a):xs}function F_(a,s,u,f,g,y){g=z_(g),f.context===null?f.context=g:f.pendingContext=g,f=wa(s),f.payload={element:u},y=y===void 0?null:y,y!==null&&(f.callback=y),u=ka(a,f,s),u!==null&&(wn(u,a,s),qo(u,a,s))}function $_(a,s){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var u=a.retryLane;a.retryLane=u!==0&&u<s?u:s}}function Jm(a,s){$_(a,s),(a=a.alternate)&&$_(a,s)}function V_(a){if(a.tag===13||a.tag===31){var s=Ei(a,67108864);s!==null&&wn(s,a,67108864),Jm(a,67108864)}}function G_(a){if(a.tag===13||a.tag===31){var s=Un();s=Xf(s);var u=Ei(a,s);u!==null&&wn(u,a,s),Jm(a,s)}}var Lc=!0;function VO(a,s,u,f){var g=U.T;U.T=null;var y=ee.p;try{ee.p=2,ep(a,s,u,f)}finally{ee.p=y,U.T=g}}function GO(a,s,u,f){var g=U.T;U.T=null;var y=ee.p;try{ee.p=8,ep(a,s,u,f)}finally{ee.p=y,U.T=g}}function ep(a,s,u,f){if(Lc){var g=tp(f);if(g===null)Hm(a,s,f,Ic,u),Y_(a,f);else if(YO(g,a,s,u,f))f.stopPropagation();else if(Y_(a,f),s&4&&-1<qO.indexOf(a)){for(;g!==null;){var y=cs(g);if(y!==null)switch(y.tag){case 3:if(y=y.stateNode,y.current.memoizedState.isDehydrated){var w=hi(y.pendingLanes);if(w!==0){var R=y;for(R.pendingLanes|=2,R.entangledLanes|=2;w;){var $=1<<31-pt(w);R.entanglements[1]|=$,w&=~$}Cr(y),(at&6)===0&&(pc=dn()+500,ll(0))}}break;case 31:case 13:R=Ei(y,2),R!==null&&wn(R,y,2),bc(),Jm(y,2)}if(y=tp(f),y===null&&Hm(a,s,f,Ic,u),y===g)break;g=y}g!==null&&f.stopPropagation()}else Hm(a,s,f,null,u)}}function tp(a){return a=rh(a),np(a)}var Ic=null;function np(a){if(Ic=null,a=us(a),a!==null){var s=o(a);if(s===null)a=null;else{var u=s.tag;if(u===13){if(a=l(s),a!==null)return a;a=null}else if(u===31){if(a=c(s),a!==null)return a;a=null}else if(u===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;a=null}else s!==a&&(a=null)}}return Ic=a,null}function q_(a){switch(a){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(qf()){case oe:return 2;case _e:return 8;case Le:case Ve:return 32;case ot:return 268435456;default:return 32}default:return 32}}var rp=!1,Ua=null,Ha=null,za=null,pl=new Map,gl=new Map,Fa=[],qO="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Y_(a,s){switch(a){case"focusin":case"focusout":Ua=null;break;case"dragenter":case"dragleave":Ha=null;break;case"mouseover":case"mouseout":za=null;break;case"pointerover":case"pointerout":pl.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":gl.delete(s.pointerId)}}function bl(a,s,u,f,g,y){return a===null||a.nativeEvent!==y?(a={blockedOn:s,domEventName:u,eventSystemFlags:f,nativeEvent:y,targetContainers:[g]},s!==null&&(s=cs(s),s!==null&&V_(s)),a):(a.eventSystemFlags|=f,s=a.targetContainers,g!==null&&s.indexOf(g)===-1&&s.push(g),a)}function YO(a,s,u,f,g){switch(s){case"focusin":return Ua=bl(Ua,a,s,u,f,g),!0;case"dragenter":return Ha=bl(Ha,a,s,u,f,g),!0;case"mouseover":return za=bl(za,a,s,u,f,g),!0;case"pointerover":var y=g.pointerId;return pl.set(y,bl(pl.get(y)||null,a,s,u,f,g)),!0;case"gotpointercapture":return y=g.pointerId,gl.set(y,bl(gl.get(y)||null,a,s,u,f,g)),!0}return!1}function X_(a){var s=us(a.target);if(s!==null){var u=o(s);if(u!==null){if(s=u.tag,s===13){if(s=l(u),s!==null){a.blockedOn=s,lb(a.priority,function(){G_(u)});return}}else if(s===31){if(s=c(u),s!==null){a.blockedOn=s,lb(a.priority,function(){G_(u)});return}}else if(s===3&&u.stateNode.current.memoizedState.isDehydrated){a.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}a.blockedOn=null}function Dc(a){if(a.blockedOn!==null)return!1;for(var s=a.targetContainers;0<s.length;){var u=tp(a.nativeEvent);if(u===null){u=a.nativeEvent;var f=new u.constructor(u.type,u);nh=f,u.target.dispatchEvent(f),nh=null}else return s=cs(u),s!==null&&V_(s),a.blockedOn=u,!1;s.shift()}return!0}function Q_(a,s,u){Dc(a)&&u.delete(s)}function XO(){rp=!1,Ua!==null&&Dc(Ua)&&(Ua=null),Ha!==null&&Dc(Ha)&&(Ha=null),za!==null&&Dc(za)&&(za=null),pl.forEach(Q_),gl.forEach(Q_)}function Mc(a,s){a.blockedOn===s&&(a.blockedOn=null,rp||(rp=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,XO)))}var Pc=null;function W_(a){Pc!==a&&(Pc=a,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Pc===a&&(Pc=null);for(var s=0;s<a.length;s+=3){var u=a[s],f=a[s+1],g=a[s+2];if(typeof f!="function"){if(np(f||u)===null)continue;break}var y=cs(u);y!==null&&(a.splice(s,3),s-=3,tm(y,{pending:!0,data:g,method:u.method,action:f},f,g))}}))}function Gs(a){function s($){return Mc($,a)}Ua!==null&&Mc(Ua,a),Ha!==null&&Mc(Ha,a),za!==null&&Mc(za,a),pl.forEach(s),gl.forEach(s);for(var u=0;u<Fa.length;u++){var f=Fa[u];f.blockedOn===a&&(f.blockedOn=null)}for(;0<Fa.length&&(u=Fa[0],u.blockedOn===null);)X_(u),u.blockedOn===null&&Fa.shift();if(u=(a.ownerDocument||a).$$reactFormReplay,u!=null)for(f=0;f<u.length;f+=3){var g=u[f],y=u[f+1],w=g[xn]||null;if(typeof y=="function")w||W_(u);else if(w){var R=null;if(y&&y.hasAttribute("formAction")){if(g=y,w=y[xn]||null)R=w.formAction;else if(np(g)!==null)continue}else R=w.action;typeof R=="function"?u[f+1]=R:(u.splice(f,3),f-=3),W_(u)}}}function K_(){function a(y){y.canIntercept&&y.info==="react-transition"&&y.intercept({handler:function(){return new Promise(function(w){return g=w})},focusReset:"manual",scroll:"manual"})}function s(){g!==null&&(g(),g=null),f||setTimeout(u,20)}function u(){if(!f&&!navigation.transition){var y=navigation.currentEntry;y&&y.url!=null&&navigation.navigate(y.url,{state:y.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var f=!1,g=null;return navigation.addEventListener("navigate",a),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(u,100),function(){f=!0,navigation.removeEventListener("navigate",a),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),g!==null&&(g(),g=null)}}}function ap(a){this._internalRoot=a}Bc.prototype.render=ap.prototype.render=function(a){var s=this._internalRoot;if(s===null)throw Error(r(409));var u=s.current,f=Un();F_(u,f,a,s,null,null)},Bc.prototype.unmount=ap.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var s=a.containerInfo;F_(a.current,2,null,a,null,null),bc(),s[ls]=null}};function Bc(a){this._internalRoot=a}Bc.prototype.unstable_scheduleHydration=function(a){if(a){var s=ob();a={blockedOn:null,target:a,priority:s};for(var u=0;u<Fa.length&&s!==0&&s<Fa[u].priority;u++);Fa.splice(u,0,a),u===0&&X_(a)}};var Z_=t.version;if(Z_!=="19.2.7")throw Error(r(527,Z_,"19.2.7"));ee.findDOMNode=function(a){var s=a._reactInternals;if(s===void 0)throw typeof a.render=="function"?Error(r(188)):(a=Object.keys(a).join(","),Error(r(268,a)));return a=h(s),a=a!==null?p(a):null,a=a===null?null:a.stateNode,a};var QO={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var jc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!jc.isDisabled&&jc.supportsFiber)try{fn=jc.inject(QO),Ut=jc}catch{}}return yl.createRoot=function(a,s){if(!i(a))throw Error(r(299));var u=!1,f="",g=iy,y=sy,w=oy;return s!=null&&(s.unstable_strictMode===!0&&(u=!0),s.identifierPrefix!==void 0&&(f=s.identifierPrefix),s.onUncaughtError!==void 0&&(g=s.onUncaughtError),s.onCaughtError!==void 0&&(y=s.onCaughtError),s.onRecoverableError!==void 0&&(w=s.onRecoverableError)),s=H_(a,1,!1,null,null,u,f,null,g,y,w,K_),a[ls]=s.current,Um(a),new ap(s)},yl.hydrateRoot=function(a,s,u){if(!i(a))throw Error(r(299));var f=!1,g="",y=iy,w=sy,R=oy,$=null;return u!=null&&(u.unstable_strictMode===!0&&(f=!0),u.identifierPrefix!==void 0&&(g=u.identifierPrefix),u.onUncaughtError!==void 0&&(y=u.onUncaughtError),u.onCaughtError!==void 0&&(w=u.onCaughtError),u.onRecoverableError!==void 0&&(R=u.onRecoverableError),u.formState!==void 0&&($=u.formState)),s=H_(a,1,!0,s,u??null,f,g,$,y,w,R,K_),s.context=z_(null),u=s.current,f=Un(),f=Xf(f),g=wa(f),g.callback=null,ka(u,g,f),u=f,s.current.lanes=u,ko(s,u),Cr(s),a[ls]=s.current,Um(a),new Bc(s)},yl.version="19.2.7",yl}var lx;function sL(){if(lx)return op.exports;lx=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),op.exports=iL(),op.exports}var oL=sL();const M2=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const lL=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const uL=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const ux=e=>{const t=uL(e);return t.charAt(0).toUpperCase()+t.slice(1)};var dp={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const cL=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},dL=v.createContext({}),fL=()=>v.useContext(dL),hL=v.forwardRef(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i="",children:o,iconNode:l,...c},d)=>{const{size:h=24,strokeWidth:p=2,absoluteStrokeWidth:m=!1,color:_="currentColor",className:E=""}=fL()??{},T=r??m?Number(n??p)*24/Number(t??h):n??p;return v.createElement("svg",{ref:d,...dp,width:t??h??dp.width,height:t??h??dp.height,stroke:e??_,strokeWidth:T,className:M2("lucide",E,i),...!o&&!cL(c)&&{"aria-hidden":"true"},...c},[...l.map(([S,A])=>v.createElement(S,A)),...Array.isArray(o)?o:[o]])});const lt=(e,t)=>{const n=v.forwardRef(({className:r,...i},o)=>v.createElement(hL,{ref:o,iconNode:t,className:M2(`lucide-${lL(ux(e))}`,`lucide-${e}`,r),...i}));return n.displayName=ux(e),n};const mL=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],pL=lt("arrow-down",mL);const gL=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],P2=lt("arrow-left",gL);const bL=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],EL=lt("arrow-right",bL);const yL=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],_L=lt("brain",yL);const xL=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],TL=lt("check",xL);const vL=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Jd=lt("chevron-down",vL);const SL=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],B2=lt("chevron-right",SL);const AL=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],CL=lt("chevron-up",AL);const wL=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],d0=lt("circle-alert",wL);const kL=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],NL=lt("circle-check-big",kL);const RL=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],OL=lt("circle-check",RL);const LL=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"9",x2:"15",y1:"15",y2:"9",key:"1dfufj"}]],j2=lt("circle-slash",LL);const IL=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],U2=lt("circle-x",IL);const DL=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],ML=lt("circle",DL);const PL=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],BL=lt("clock",PL);const jL=[["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}],["path",{d:"m9 10-5 5 5 5",key:"1kshq7"}]],UL=lt("corner-down-left",jL);const HL=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],zL=lt("file",HL);const FL=[["circle",{cx:"12",cy:"18",r:"3",key:"1mpf1b"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["path",{d:"M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9",key:"1uq4wg"}],["path",{d:"M12 12v3",key:"158kv8"}]],H2=lt("git-fork",FL);const $L=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],ef=lt("loader-circle",$L);const VL=[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]],GL=lt("lock-keyhole",VL);const qL=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],YL=lt("message-square",qL);const XL=[["path",{d:"M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z",key:"1n2ejm"}],["path",{d:"M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1",key:"1qfcsi"}]],z2=lt("messages-square",XL);const QL=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]],WL=lt("panel-right",QL);const KL=[["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"}]],F2=lt("paperclip",KL);const ZL=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],JL=lt("plus",ZL);const eI=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],tI=lt("rotate-ccw",eI);const nI=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],$2=lt("square",nI);const rI=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],cx=lt("triangle-alert",rI);const aI=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],V2=lt("wrench",aI);const iI=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],gg=lt("x",iI);function G2(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=G2(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function tf(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=G2(e))&&(r&&(r+=" "),r+=t);return r}const dx=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,fx=tf,bg=(e,t)=>n=>{var r;if(t?.variants==null)return fx(e,n?.class,n?.className);const{variants:i,defaultVariants:o}=t,l=Object.keys(i).map(h=>{const p=n?.[h],m=o?.[h];if(p===null)return null;const _=dx(p)||dx(m);return i[h][_]}),c=n&&Object.entries(n).reduce((h,p)=>{let[m,_]=p;return _===void 0||(h[m]=_),h},{}),d=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((h,p)=>{let{class:m,className:_,...E}=p;return Object.entries(E).every(T=>{let[S,A]=T;return Array.isArray(A)?A.includes({...o,...c}[S]):{...o,...c}[S]===A})?[...h,m,_]:h},[]);return fx(e,l,d,n?.class,n?.className)};var Ji=D2();function hx(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function sI(...e){return t=>{let n=!1;const r=e.map(i=>{const o=hx(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():hx(e[i],null)}}}}function St(...e){return v.useCallback(sI(...e),e)}function lo(e){const t=v.forwardRef((n,r)=>{let{children:i,...o}=n,l=null,c=!1;const d=[];mx(i)&&typeof Uc=="function"&&(i=Uc(i._payload)),v.Children.forEach(i,_=>{if(dI(_)){c=!0;const E=_;let T="child"in E.props?E.props.child:E.props.children;mx(T)&&typeof Uc=="function"&&(T=Uc(T._payload)),l=lI(E,T),d.push(l?.props?.children)}else d.push(_)}),l?l=v.cloneElement(l,void 0,d):!c&&v.Children.count(i)===1&&v.isValidElement(i)&&(l=i);const h=l?cI(l):void 0,p=St(r,h);if(!l){if(i||i===0)throw new Error(c?pI(e):mI(e));return i}const m=uI(o,l.props??{});return l.type!==v.Fragment&&(m.ref=r?p:h),v.cloneElement(l,m)});return t.displayName=`${e}.Slot`,t}var q2=lo("Slot"),oI=Symbol.for("radix.slottable"),lI=(e,t)=>{if("child"in e.props){const n=e.props.child;return v.isValidElement(n)?v.cloneElement(n,void 0,e.props.children(n.props.children)):null}return v.isValidElement(t)?t:null};function uI(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...c)=>{const d=o(...c);return i(...c),d}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function cI(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function dI(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===oI}var fI=Symbol.for("react.lazy");function mx(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===fI&&"_payload"in e&&hI(e._payload)}function hI(e){return typeof e=="object"&&e!==null&&"then"in e}var mI=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,pI=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,Uc=uu[" use ".trim().toString()],gI=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],We=gI.reduce((e,t)=>{const n=lo(`Primitive.${t}`),r=v.forwardRef((i,o)=>{const{asChild:l,...c}=i,d=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(d,{...c,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function bI(e,t){e&&Ji.flushSync(()=>e.dispatchEvent(t))}var Y2=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),EI="VisuallyHidden",yI=v.forwardRef((e,t)=>b.jsx(We.span,{...e,ref:t,style:{...Y2,...e.style}}));yI.displayName=EI;function es(e,t=[]){let n=[];function r(o,l){const c=v.createContext(l);c.displayName=o+"Context";const d=n.length;n=[...n,l];const h=m=>{const{scope:_,children:E,...T}=m,S=_?.[e]?.[d]||c,A=v.useMemo(()=>T,Object.values(T));return b.jsx(S.Provider,{value:A,children:E})};h.displayName=o+"Provider";function p(m,_){const E=_?.[e]?.[d]||c,T=v.useContext(E);if(T)return T;if(l!==void 0)return l;throw new Error(`\`${m}\` must be used within \`${o}\``)}return[h,p]}const i=()=>{const o=n.map(l=>v.createContext(l));return function(c){const d=c?.[e]||o;return v.useMemo(()=>({[`__scope${e}`]:{...c,[e]:d}}),[c,d])}};return i.scopeName=e,[r,_I(i,...t)]}function _I(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const l=r.reduce((c,{useScope:d,scopeName:h})=>{const m=d(o)[`__scope${h}`];return{...c,...m}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}function X2(e){const t=e+"CollectionProvider",[n,r]=es(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=S=>{const{scope:A,children:C}=S,k=v.useRef(null),N=v.useRef(new Map).current;return b.jsx(i,{scope:A,itemMap:N,collectionRef:k,children:C})};l.displayName=t;const c=e+"CollectionSlot",d=lo(c),h=v.forwardRef((S,A)=>{const{scope:C,children:k}=S,N=o(c,C),M=St(A,N.collectionRef);return b.jsx(d,{ref:M,children:k})});h.displayName=c;const p=e+"CollectionItemSlot",m="data-radix-collection-item",_=lo(p),E=v.forwardRef((S,A)=>{const{scope:C,children:k,...N}=S,M=v.useRef(null),B=St(A,M),D=o(p,C);return v.useEffect(()=>(D.itemMap.set(M,{ref:M,...N}),()=>{D.itemMap.delete(M)})),b.jsx(_,{[m]:"",ref:B,children:k})});E.displayName=p;function T(S){const A=o(e+"CollectionConsumer",S);return v.useCallback(()=>{const k=A.collectionRef.current;if(!k)return[];const N=Array.from(k.querySelectorAll(`[${m}]`));return Array.from(A.itemMap.values()).sort((D,z)=>N.indexOf(D.ref.current)-N.indexOf(z.ref.current))},[A.collectionRef,A.itemMap])}return[{Provider:l,Slot:h,ItemSlot:E},T,r]}function Ze(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}var Vt=globalThis?.document?v.useLayoutEffect:()=>{},px=uu[" useEffectEvent ".trim().toString()],gx=uu[" useInsertionEffect ".trim().toString()];function xI(e){if(typeof px=="function")return px(e);const t=v.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof gx=="function"?gx(()=>{t.current=e}):Vt(()=>{t.current=e}),v.useMemo(()=>((...n)=>t.current?.(...n)),[])}var TI=uu[" useInsertionEffect ".trim().toString()]||Vt;function ni({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,o,l]=vI({defaultProp:t,onChange:n}),c=e!==void 0,d=c?e:i;{const p=v.useRef(e!==void 0);v.useEffect(()=>{const m=p.current;m!==c&&console.warn(`${r} is changing from ${m?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),p.current=c},[c,r])}const h=v.useCallback(p=>{if(c){const m=SI(p)?p(e):p;m!==e&&l.current?.(m)}else o(p)},[c,e,o,l]);return[d,h]}function vI({defaultProp:e,onChange:t}){const[n,r]=v.useState(e),i=v.useRef(n),o=v.useRef(t);return TI(()=>{o.current=t},[t]),v.useEffect(()=>{i.current!==n&&(o.current?.(n),i.current=n)},[n,i]),[n,r,o]}function SI(e){return typeof e=="function"}function AI(e,t){return v.useReducer((n,r)=>t[n][r]??n,e)}var ts=e=>{const{present:t,children:n}=e,r=CI(t),i=typeof n=="function"?n({present:r.isPresent}):v.Children.only(n),o=wI(r.ref,kI(i));return typeof n=="function"||r.isPresent?v.cloneElement(i,{ref:o}):null};ts.displayName="Presence";function CI(e){const[t,n]=v.useState(),r=v.useRef(null),i=v.useRef(e),o=v.useRef("none"),l=e?"mounted":"unmounted",[c,d]=AI(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const h=Hc(r.current);o.current=c==="mounted"?h:"none"},[c]),Vt(()=>{const h=r.current,p=i.current;if(p!==e){const _=o.current,E=Hc(h);e?d("MOUNT"):E==="none"||h?.display==="none"?d("UNMOUNT"):d(p&&_!==E?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,d]),Vt(()=>{if(t){let h;const p=t.ownerDocument.defaultView??window,m=E=>{const S=Hc(r.current).includes(CSS.escape(E.animationName));if(E.target===t&&S&&(d("ANIMATION_END"),!i.current)){const A=t.style.animationFillMode;t.style.animationFillMode="forwards",h=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=A)})}},_=E=>{E.target===t&&(o.current=Hc(r.current))};return t.addEventListener("animationstart",_),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{p.clearTimeout(h),t.removeEventListener("animationstart",_),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:v.useCallback(h=>{r.current=h?getComputedStyle(h):null,n(h)},[])}}function bx(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function wI(...e){const t=v.useRef(e);return t.current=e,v.useCallback(n=>{const r=t.current;let i=!1;const o=r.map(l=>{const c=bx(l,n);return!i&&typeof c=="function"&&(i=!0),c});if(i)return()=>{for(let l=0;l<o.length;l++){const c=o[l];typeof c=="function"?c():bx(r[l],null)}}},[])}function Hc(e){return e?.animationName||"none"}function kI(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var NI=uu[" useId ".trim().toString()]||(()=>{}),RI=0;function fa(e){const[t,n]=v.useState(NI());return Vt(()=>{n(r=>r??String(RI++))},[e]),e||(t?`radix-${t}`:"")}var nf="Collapsible",[OI]=es(nf),[LI,Eg]=OI(nf),Q2=v.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:o,onOpenChange:l,...c}=e,[d,h]=ni({prop:r,defaultProp:i??!1,onChange:l,caller:nf});return b.jsx(LI,{scope:n,disabled:o,contentId:fa(),open:d,onOpenToggle:v.useCallback(()=>h(p=>!p),[h]),children:b.jsx(We.div,{"data-state":_g(d),"data-disabled":o?"":void 0,...c,ref:t})})});Q2.displayName=nf;var W2="CollapsibleTrigger",K2=v.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,i=Eg(W2,n);return b.jsx(We.button,{type:"button","aria-controls":i.open?i.contentId:void 0,"aria-expanded":i.open||!1,"data-state":_g(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:t,onClick:Ze(e.onClick,i.onOpenToggle)})});K2.displayName=W2;var yg="CollapsibleContent",Z2=v.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=Eg(yg,e.__scopeCollapsible);return b.jsx(ts,{present:n||i.open,children:({present:o})=>b.jsx(II,{...r,ref:t,present:o})})});Z2.displayName=yg;var II=v.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...o}=e,l=Eg(yg,n),[c,d]=v.useState(r),h=v.useRef(null),p=St(t,h),m=v.useRef(0),_=m.current,E=v.useRef(0),T=E.current,S=l.open||c,A=v.useRef(S),C=v.useRef(void 0);return v.useEffect(()=>{const k=requestAnimationFrame(()=>A.current=!1);return()=>cancelAnimationFrame(k)},[]),Vt(()=>{const k=h.current;if(k){C.current=C.current||{transitionDuration:k.style.transitionDuration,animationName:k.style.animationName},k.style.transitionDuration="0s",k.style.animationName="none";const N=k.getBoundingClientRect();m.current=N.height,E.current=N.width,A.current||(k.style.transitionDuration=C.current.transitionDuration,k.style.animationName=C.current.animationName),d(r)}},[l.open,r]),b.jsx(We.div,{"data-state":_g(l.open),"data-disabled":l.disabled?"":void 0,id:l.contentId,hidden:!S,...o,ref:p,style:{"--radix-collapsible-content-height":_?`${_}px`:void 0,"--radix-collapsible-content-width":T?`${T}px`:void 0,...e.style},children:S&&i})});function _g(e){return e?"open":"closed"}var DI=Q2,MI=v.createContext(void 0);function xg(e){const t=v.useContext(MI);return e||t||"ltr"}function ha(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>((...n)=>t.current?.(...n)),[])}var PI="DismissableLayer",f0="dismissableLayer.update",BI="dismissableLayer.pointerDownOutside",jI="dismissableLayer.focusOutside",Ex,Tg=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),vg=v.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:l,onInteractOutside:c,onDismiss:d,...h}=e,p=v.useContext(Tg),[m,_]=v.useState(null),E=m?.ownerDocument??globalThis?.document,[,T]=v.useState({}),S=St(t,_),A=Array.from(p.layers),[C]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),k=A.indexOf(C),N=m?A.indexOf(m):-1,M=p.layersWithOutsidePointerEventsDisabled.size>0,B=N>=k,D=v.useRef(!1),z=FI(X=>{const J=X.target;if(!(J instanceof Node))return;const he=[...p.branches].some(ue=>ue.contains(J));!B||he||(o?.(X),c?.(X),X.defaultPrevented||d?.())},{ownerDocument:E,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:D,dismissableSurfaces:p.dismissableSurfaces}),G=$I(X=>{if(r&&D.current)return;const J=X.target;[...p.branches].some(ue=>ue.contains(J))||(l?.(X),c?.(X),X.defaultPrevented||d?.())},E),ie=m?N===A.length-1:!1,V=xI(X=>{X.key==="Escape"&&(i?.(X),!X.defaultPrevented&&d&&(X.preventDefault(),d()))});return v.useEffect(()=>{if(ie)return E.addEventListener("keydown",V,{capture:!0}),()=>E.removeEventListener("keydown",V,{capture:!0})},[E,ie]),v.useEffect(()=>{if(m)return n&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(Ex=E.body.style.pointerEvents,E.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(m)),p.layers.add(m),yx(),()=>{n&&(p.layersWithOutsidePointerEventsDisabled.delete(m),p.layersWithOutsidePointerEventsDisabled.size===0&&(E.body.style.pointerEvents=Ex))}},[m,E,n,p]),v.useEffect(()=>()=>{m&&(p.layers.delete(m),p.layersWithOutsidePointerEventsDisabled.delete(m),yx())},[m,p]),v.useEffect(()=>{const X=()=>T({});return document.addEventListener(f0,X),()=>document.removeEventListener(f0,X)},[]),b.jsx(We.div,{...h,ref:S,style:{pointerEvents:M?B?"auto":"none":void 0,...e.style},onFocusCapture:Ze(e.onFocusCapture,G.onFocusCapture),onBlurCapture:Ze(e.onBlurCapture,G.onBlurCapture),onPointerDownCapture:Ze(e.onPointerDownCapture,z.onPointerDownCapture)})});vg.displayName=PI;var UI="DismissableLayerBranch",HI=v.forwardRef((e,t)=>{const n=v.useContext(Tg),r=v.useRef(null),i=St(t,r);return v.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),b.jsx(We.div,{...e,ref:i})});HI.displayName=UI;function zI(){const e=v.useContext(Tg),[t,n]=v.useState(null);return v.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}function FI(e,t){const{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:o}=t,l=ha(e),c=v.useRef(!1),d=v.useRef(!1),h=v.useRef(new Map),p=v.useRef(()=>{});return v.useEffect(()=>{function m(){d.current=!1,i.current=!1,h.current.clear()}function _(){return Array.from(h.current.values()).some(Boolean)}function E(k){if(!d.current)return;const N=k.target;N instanceof Node&&[...o].some(B=>B.contains(N))||h.current.set(k.type,!0),k.type==="click"&&window.setTimeout(()=>{d.current&&p.current()},0)}function T(k){d.current&&h.current.set(k.type,!1)}const S=k=>{if(k.target&&!c.current){let N=function(){n.removeEventListener("click",p.current);const B=_();m(),B||J2(BI,l,M,{discrete:!0})};const M={originalEvent:k};d.current=!0,i.current=r&&k.button===0,h.current.clear(),!r||k.button!==0?N():(n.removeEventListener("click",p.current),p.current=N,n.addEventListener("click",p.current,{once:!0}))}else n.removeEventListener("click",p.current),m();c.current=!1},A=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const k of A)n.addEventListener(k,E,!0),n.addEventListener(k,T);const C=window.setTimeout(()=>{n.addEventListener("pointerdown",S)},0);return()=>{window.clearTimeout(C),n.removeEventListener("pointerdown",S),n.removeEventListener("click",p.current);for(const k of A)n.removeEventListener(k,E,!0),n.removeEventListener(k,T)}},[n,l,r,i,o]),{onPointerDownCapture:()=>c.current=!0}}function $I(e,t=globalThis?.document){const n=ha(e),r=v.useRef(!1);return v.useEffect(()=>{const i=o=>{o.target&&!r.current&&J2(jI,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function yx(){const e=new CustomEvent(f0);document.dispatchEvent(e)}function J2(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?bI(i,o):i.dispatchEvent(o)}var fp="focusScope.autoFocusOnMount",hp="focusScope.autoFocusOnUnmount",_x={bubbles:!1,cancelable:!0},VI="FocusScope",Sg=v.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...l}=e,[c,d]=v.useState(null),h=ha(i),p=ha(o),m=v.useRef(null),_=St(t,d),E=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(r){let S=function(N){if(E.paused||!c)return;const M=N.target;c.contains(M)?m.current=M:qa(m.current,{select:!0})},A=function(N){if(E.paused||!c)return;const M=N.relatedTarget;M!==null&&(c.contains(M)||qa(m.current,{select:!0}))},C=function(N){if(document.activeElement===document.body)for(const B of N)B.removedNodes.length>0&&qa(c)};document.addEventListener("focusin",S),document.addEventListener("focusout",A);const k=new MutationObserver(C);return c&&k.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",A),k.disconnect()}}},[r,c,E.paused]),v.useEffect(()=>{if(c){Tx.add(E);const S=document.activeElement;if(!c.contains(S)){const C=new CustomEvent(fp,_x);c.addEventListener(fp,h),c.dispatchEvent(C),C.defaultPrevented||(GI(WI(eS(c)),{select:!0}),document.activeElement===S&&qa(c))}return()=>{c.removeEventListener(fp,h),setTimeout(()=>{const C=new CustomEvent(hp,_x);c.addEventListener(hp,p),c.dispatchEvent(C),C.defaultPrevented||qa(S??document.body,{select:!0}),c.removeEventListener(hp,p),Tx.remove(E)},0)}}},[c,h,p,E]);const T=v.useCallback(S=>{if(!n&&!r||E.paused)return;const A=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,C=document.activeElement;if(A&&C){const k=S.currentTarget,[N,M]=qI(k);N&&M?!S.shiftKey&&C===M?(S.preventDefault(),n&&qa(N,{select:!0})):S.shiftKey&&C===N&&(S.preventDefault(),n&&qa(M,{select:!0})):C===k&&S.preventDefault()}},[n,r,E.paused]);return b.jsx(We.div,{tabIndex:-1,...l,ref:_,onKeyDown:T})});Sg.displayName=VI;function GI(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(qa(r,{select:t}),document.activeElement!==n)return}function qI(e){const t=eS(e),n=xx(t,e),r=xx(t.reverse(),e);return[n,r]}function eS(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function xx(e,t){for(const n of e)if(!YI(n,{upTo:t}))return n}function YI(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function XI(e){return e instanceof HTMLInputElement&&"select"in e}function qa(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&XI(e)&&t&&e.select()}}var Tx=QI();function QI(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=vx(e,t),e.unshift(t)},remove(t){e=vx(e,t),e[0]?.resume()}}}function vx(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function WI(e){return e.filter(t=>t.tagName!=="A")}var KI="Portal",Ag=v.forwardRef((e,t)=>{const{container:n,...r}=e,[i,o]=v.useState(!1);Vt(()=>o(!0),[]);const l=n||i&&globalThis?.document?.body;return l?Ji.createPortal(b.jsx(We.div,{...r,ref:t}),l):null});Ag.displayName=KI;var zc=0,qs=null;function tS(){v.useEffect(()=>{qs||(qs={start:Sx(),end:Sx()});const{start:e,end:t}=qs;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),zc++,()=>{zc===1&&(qs?.start.remove(),qs?.end.remove(),qs=null),zc=Math.max(0,zc-1)}},[])}function Sx(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Ir=function(){return Ir=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Ir.apply(this,arguments)};function nS(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function ZI(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var fd="right-scroll-bar-position",hd="width-before-scroll-bar",JI="with-scroll-bars-hidden",e6="--removed-body-scroll-bar-size";function mp(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function t6(e,t){var n=v.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var n6=typeof window<"u"?v.useLayoutEffect:v.useEffect,Ax=new WeakMap;function r6(e,t){var n=t6(null,function(r){return e.forEach(function(i){return mp(i,r)})});return n6(function(){var r=Ax.get(n);if(r){var i=new Set(r),o=new Set(e),l=n.current;i.forEach(function(c){o.has(c)||mp(c,null)}),o.forEach(function(c){i.has(c)||mp(c,l)})}Ax.set(n,e)},[e]),n}function a6(e){return e}function i6(e,t){t===void 0&&(t=a6);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var l=t(o,r);return n.push(l),function(){n=n.filter(function(c){return c!==l})}},assignSyncMedium:function(o){for(r=!0;n.length;){var l=n;n=[],l.forEach(o)}n={push:function(c){return o(c)},filter:function(){return n}}},assignMedium:function(o){r=!0;var l=[];if(n.length){var c=n;n=[],c.forEach(o),l=n}var d=function(){var p=l;l=[],p.forEach(o)},h=function(){return Promise.resolve().then(d)};h(),n={push:function(p){l.push(p),h()},filter:function(p){return l=l.filter(p),n}}}};return i}function s6(e){e===void 0&&(e={});var t=i6(null);return t.options=Ir({async:!0,ssr:!1},e),t}var rS=function(e){var t=e.sideCar,n=nS(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return v.createElement(r,Ir({},n))};rS.isSideCarExport=!0;function o6(e,t){return e.useMedium(t),rS}var aS=s6(),pp=function(){},rf=v.forwardRef(function(e,t){var n=v.useRef(null),r=v.useState({onScrollCapture:pp,onWheelCapture:pp,onTouchMoveCapture:pp}),i=r[0],o=r[1],l=e.forwardProps,c=e.children,d=e.className,h=e.removeScrollBar,p=e.enabled,m=e.shards,_=e.sideCar,E=e.noRelative,T=e.noIsolation,S=e.inert,A=e.allowPinchZoom,C=e.as,k=C===void 0?"div":C,N=e.gapMode,M=nS(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),B=_,D=r6([n,t]),z=Ir(Ir({},M),i);return v.createElement(v.Fragment,null,p&&v.createElement(B,{sideCar:aS,removeScrollBar:h,shards:m,noRelative:E,noIsolation:T,inert:S,setCallbacks:o,allowPinchZoom:!!A,lockRef:n,gapMode:N}),l?v.cloneElement(v.Children.only(c),Ir(Ir({},z),{ref:D})):v.createElement(k,Ir({},z,{className:d,ref:D}),c))});rf.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};rf.classNames={fullWidth:hd,zeroRight:fd};var l6=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function u6(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=l6();return t&&e.setAttribute("nonce",t),e}function c6(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function d6(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var f6=function(){var e=0,t=null;return{add:function(n){e==0&&(t=u6())&&(c6(t,n),d6(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},h6=function(){var e=f6();return function(t,n){v.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},iS=function(){var e=h6(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},m6={left:0,top:0,right:0,gap:0},gp=function(e){return parseInt(e||"",10)||0},p6=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[gp(n),gp(r),gp(i)]},g6=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return m6;var t=p6(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},b6=iS(),ao="data-scroll-locked",E6=function(e,t,n,r){var i=e.left,o=e.top,l=e.right,c=e.gap;return n===void 0&&(n="margin"),`
11
+ .`.concat(JI,` {
12
+ overflow: hidden `).concat(r,`;
13
+ padding-right: `).concat(c,"px ").concat(r,`;
14
+ }
15
+ body[`).concat(ao,`] {
16
+ overflow: hidden `).concat(r,`;
17
+ overscroll-behavior: contain;
18
+ `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
19
+ padding-left: `.concat(i,`px;
20
+ padding-top: `).concat(o,`px;
21
+ padding-right: `).concat(l,`px;
22
+ margin-left:0;
23
+ margin-top:0;
24
+ margin-right: `).concat(c,"px ").concat(r,`;
25
+ `),n==="padding"&&"padding-right: ".concat(c,"px ").concat(r,";")].filter(Boolean).join(""),`
26
+ }
27
+
28
+ .`).concat(fd,` {
29
+ right: `).concat(c,"px ").concat(r,`;
30
+ }
31
+
32
+ .`).concat(hd,` {
33
+ margin-right: `).concat(c,"px ").concat(r,`;
34
+ }
35
+
36
+ .`).concat(fd," .").concat(fd,` {
37
+ right: 0 `).concat(r,`;
38
+ }
39
+
40
+ .`).concat(hd," .").concat(hd,` {
41
+ margin-right: 0 `).concat(r,`;
42
+ }
43
+
44
+ body[`).concat(ao,`] {
45
+ `).concat(e6,": ").concat(c,`px;
46
+ }
47
+ `)},Cx=function(){var e=parseInt(document.body.getAttribute(ao)||"0",10);return isFinite(e)?e:0},y6=function(){v.useEffect(function(){return document.body.setAttribute(ao,(Cx()+1).toString()),function(){var e=Cx()-1;e<=0?document.body.removeAttribute(ao):document.body.setAttribute(ao,e.toString())}},[])},_6=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;y6();var o=v.useMemo(function(){return g6(i)},[i]);return v.createElement(b6,{styles:E6(o,!t,i,n?"":"!important")})},h0=!1;if(typeof window<"u")try{var Fc=Object.defineProperty({},"passive",{get:function(){return h0=!0,!0}});window.addEventListener("test",Fc,Fc),window.removeEventListener("test",Fc,Fc)}catch{h0=!1}var Ys=h0?{passive:!1}:!1,x6=function(e){return e.tagName==="TEXTAREA"},sS=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!x6(e)&&n[t]==="visible")},T6=function(e){return sS(e,"overflowY")},v6=function(e){return sS(e,"overflowX")},wx=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=oS(e,r);if(i){var o=lS(e,r),l=o[1],c=o[2];if(l>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},S6=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},A6=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},oS=function(e,t){return e==="v"?T6(t):v6(t)},lS=function(e,t){return e==="v"?S6(t):A6(t)},C6=function(e,t){return e==="h"&&t==="rtl"?-1:1},w6=function(e,t,n,r,i){var o=C6(e,window.getComputedStyle(t).direction),l=o*r,c=n.target,d=t.contains(c),h=!1,p=l>0,m=0,_=0;do{if(!c)break;var E=lS(e,c),T=E[0],S=E[1],A=E[2],C=S-A-o*T;(T||C)&&oS(e,c)&&(m+=C,_+=T);var k=c.parentNode;c=k&&k.nodeType===Node.DOCUMENT_FRAGMENT_NODE?k.host:k}while(!d&&c!==document.body||d&&(t.contains(c)||t===c));return(p&&Math.abs(m)<1||!p&&Math.abs(_)<1)&&(h=!0),h},$c=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},kx=function(e){return[e.deltaX,e.deltaY]},Nx=function(e){return e&&"current"in e?e.current:e},k6=function(e,t){return e[0]===t[0]&&e[1]===t[1]},N6=function(e){return`
48
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
49
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
50
+ `)},R6=0,Xs=[];function O6(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),i=v.useState(R6++)[0],o=v.useState(iS)[0],l=v.useRef(e);v.useEffect(function(){l.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var S=ZI([e.lockRef.current],(e.shards||[]).map(Nx),!0).filter(Boolean);return S.forEach(function(A){return A.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),S.forEach(function(A){return A.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var c=v.useCallback(function(S,A){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!l.current.allowPinchZoom;var C=$c(S),k=n.current,N="deltaX"in S?S.deltaX:k[0]-C[0],M="deltaY"in S?S.deltaY:k[1]-C[1],B,D=S.target,z=Math.abs(N)>Math.abs(M)?"h":"v";if("touches"in S&&z==="h"&&D.type==="range")return!1;var G=window.getSelection(),ie=G&&G.anchorNode,V=ie?ie===D||ie.contains(D):!1;if(V)return!1;var X=wx(z,D);if(!X)return!0;if(X?B=z:(B=z==="v"?"h":"v",X=wx(z,D)),!X)return!1;if(!r.current&&"changedTouches"in S&&(N||M)&&(r.current=B),!B)return!0;var J=r.current||B;return w6(J,A,S,J==="h"?N:M)},[]),d=v.useCallback(function(S){var A=S;if(!(!Xs.length||Xs[Xs.length-1]!==o)){var C="deltaY"in A?kx(A):$c(A),k=t.current.filter(function(B){return B.name===A.type&&(B.target===A.target||A.target===B.shadowParent)&&k6(B.delta,C)})[0];if(k&&k.should){A.cancelable&&A.preventDefault();return}if(!k){var N=(l.current.shards||[]).map(Nx).filter(Boolean).filter(function(B){return B.contains(A.target)}),M=N.length>0?c(A,N[0]):!l.current.noIsolation;M&&A.cancelable&&A.preventDefault()}}},[]),h=v.useCallback(function(S,A,C,k){var N={name:S,delta:A,target:C,should:k,shadowParent:L6(C)};t.current.push(N),setTimeout(function(){t.current=t.current.filter(function(M){return M!==N})},1)},[]),p=v.useCallback(function(S){n.current=$c(S),r.current=void 0},[]),m=v.useCallback(function(S){h(S.type,kx(S),S.target,c(S,e.lockRef.current))},[]),_=v.useCallback(function(S){h(S.type,$c(S),S.target,c(S,e.lockRef.current))},[]);v.useEffect(function(){return Xs.push(o),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:_}),document.addEventListener("wheel",d,Ys),document.addEventListener("touchmove",d,Ys),document.addEventListener("touchstart",p,Ys),function(){Xs=Xs.filter(function(S){return S!==o}),document.removeEventListener("wheel",d,Ys),document.removeEventListener("touchmove",d,Ys),document.removeEventListener("touchstart",p,Ys)}},[]);var E=e.removeScrollBar,T=e.inert;return v.createElement(v.Fragment,null,T?v.createElement(o,{styles:N6(i)}):null,E?v.createElement(_6,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function L6(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const I6=o6(aS,O6);var Cg=v.forwardRef(function(e,t){return v.createElement(rf,Ir({},e,{ref:t,sideCar:I6}))});Cg.classNames=rf.classNames;var D6=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Qs=new WeakMap,Vc=new WeakMap,Gc={},bp=0,uS=function(e){return e&&(e.host||uS(e.parentNode))},M6=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=uS(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},P6=function(e,t,n,r){var i=M6(t,Array.isArray(e)?e:[e]);Gc[n]||(Gc[n]=new WeakMap);var o=Gc[n],l=[],c=new Set,d=new Set(i),h=function(m){!m||c.has(m)||(c.add(m),h(m.parentNode))};i.forEach(h);var p=function(m){!m||d.has(m)||Array.prototype.forEach.call(m.children,function(_){if(c.has(_))p(_);else try{var E=_.getAttribute(r),T=E!==null&&E!=="false",S=(Qs.get(_)||0)+1,A=(o.get(_)||0)+1;Qs.set(_,S),o.set(_,A),l.push(_),S===1&&T&&Vc.set(_,!0),A===1&&_.setAttribute(n,"true"),T||_.setAttribute(r,"true")}catch(C){console.error("aria-hidden: cannot operate on ",_,C)}})};return p(t),c.clear(),bp++,function(){l.forEach(function(m){var _=Qs.get(m)-1,E=o.get(m)-1;Qs.set(m,_),o.set(m,E),_||(Vc.has(m)||m.removeAttribute(r),Vc.delete(m)),E||m.removeAttribute(n)}),bp--,bp||(Qs=new WeakMap,Qs=new WeakMap,Vc=new WeakMap,Gc={})}},cS=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=D6(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),P6(r,i,n,"aria-hidden")):function(){return null}},af="Dialog",[dS]=es(af),[B6,yr]=dS(af),fS=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:l=!0}=e,c=v.useRef(null),d=v.useRef(null),[h,p]=ni({prop:r,defaultProp:i??!1,onChange:o,caller:af});return b.jsx(B6,{scope:t,triggerRef:c,contentRef:d,contentId:fa(),titleId:fa(),descriptionId:fa(),open:h,onOpenChange:p,onOpenToggle:v.useCallback(()=>p(m=>!m),[p]),modal:l,children:n})};fS.displayName=af;var hS="DialogTrigger",mS=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=yr(hS,n),o=St(t,i.triggerRef);return b.jsx(We.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":kg(i.open),...r,ref:o,onClick:Ze(e.onClick,i.onOpenToggle)})});mS.displayName=hS;var wg="DialogPortal",[j6,pS]=dS(wg,{forceMount:void 0}),gS=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,o=yr(wg,t);return b.jsx(j6,{scope:t,forceMount:n,children:v.Children.map(r,l=>b.jsx(ts,{present:n||o.open,children:b.jsx(Ag,{asChild:!0,container:i,children:l})}))})};gS.displayName=wg;var vd="DialogOverlay",bS=v.forwardRef((e,t)=>{const n=pS(vd,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=yr(vd,e.__scopeDialog);return o.modal?b.jsx(ts,{present:r||o.open,children:b.jsx(H6,{...i,ref:t})}):null});bS.displayName=vd;var U6=lo("DialogOverlay.RemoveScroll"),H6=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=yr(vd,n),o=zI(),l=St(t,o);return b.jsx(Cg,{as:U6,allowPinchZoom:!0,shards:[i.contentRef],children:b.jsx(We.div,{"data-state":kg(i.open),...r,ref:l,style:{pointerEvents:"auto",...r.style}})})}),uo="DialogContent",ES=v.forwardRef((e,t)=>{const n=pS(uo,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=yr(uo,e.__scopeDialog);return b.jsx(ts,{present:r||o.open,children:o.modal?b.jsx(z6,{...i,ref:t}):b.jsx(F6,{...i,ref:t})})});ES.displayName=uo;var z6=v.forwardRef((e,t)=>{const n=yr(uo,e.__scopeDialog),r=v.useRef(null),i=St(t,n.contentRef,r);return v.useEffect(()=>{const o=r.current;if(o)return cS(o)},[]),b.jsx(yS,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:Ze(e.onCloseAutoFocus,o=>{o.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Ze(e.onPointerDownOutside,o=>{const l=o.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0;(l.button===2||c)&&o.preventDefault()}),onFocusOutside:Ze(e.onFocusOutside,o=>o.preventDefault())})}),F6=v.forwardRef((e,t)=>{const n=yr(uo,e.__scopeDialog),r=v.useRef(!1),i=v.useRef(!1);return b.jsx(yS,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(r.current||n.triggerRef.current?.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const l=o.target;n.triggerRef.current?.contains(l)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),yS=v.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...l}=e,c=yr(uo,n);return tS(),b.jsx(b.Fragment,{children:b.jsx(Sg,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:b.jsx(vg,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":kg(c.open),...l,ref:t,deferPointerDownOutside:!0,onDismiss:()=>c.onOpenChange(!1)})})})}),_S="DialogTitle",xS=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=yr(_S,n);return b.jsx(We.h2,{id:i.titleId,...r,ref:t})});xS.displayName=_S;var TS="DialogDescription",vS=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=yr(TS,n);return b.jsx(We.p,{id:i.descriptionId,...r,ref:t})});vS.displayName=TS;var SS="DialogClose",sf=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=yr(SS,n);return b.jsx(We.button,{type:"button",...r,ref:t,onClick:Ze(e.onClick,()=>i.onOpenChange(!1))})});sf.displayName=SS;function kg(e){return e?"open":"closed"}function $6(e){const t=v.useRef({value:e,previous:e});return v.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function V6(e){const[t,n]=v.useState(void 0);return Vt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let l,c;if("borderBoxSize"in o){const d=o.borderBoxSize,h=Array.isArray(d)?d[0]:d;l=h.inlineSize,c=h.blockSize}else l=e.offsetWidth,c=e.offsetHeight;n({width:l,height:c})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const G6=["top","right","bottom","left"],ri=Math.min,zn=Math.max,Sd=Math.round,qc=Math.floor,Mr=e=>({x:e,y:e}),q6={left:"right",right:"left",bottom:"top",top:"bottom"};function m0(e,t,n){return zn(e,ri(t,n))}function ma(e,t){return typeof e=="function"?e(t):e}function pa(e){return e.split("-")[0]}function po(e){return e.split("-")[1]}function Ng(e){return e==="x"?"y":"x"}function Rg(e){return e==="y"?"height":"width"}function Dr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Og(e){return Ng(Dr(e))}function Y6(e,t,n){n===void 0&&(n=!1);const r=po(e),i=Og(e),o=Rg(i);let l=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=Ad(l)),[l,Ad(l)]}function X6(e){const t=Ad(e);return[p0(e),t,p0(t)]}function p0(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Rx=["left","right"],Ox=["right","left"],Q6=["top","bottom"],W6=["bottom","top"];function K6(e,t,n){switch(e){case"top":case"bottom":return n?t?Ox:Rx:t?Rx:Ox;case"left":case"right":return t?Q6:W6;default:return[]}}function Z6(e,t,n,r){const i=po(e);let o=K6(pa(e),n==="start",r);return i&&(o=o.map(l=>l+"-"+i),t&&(o=o.concat(o.map(p0)))),o}function Ad(e){const t=pa(e);return q6[t]+e.slice(t.length)}function J6(e){return{top:0,right:0,bottom:0,left:0,...e}}function AS(e){return typeof e!="number"?J6(e):{top:e,right:e,bottom:e,left:e}}function Cd(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Lx(e,t,n){let{reference:r,floating:i}=e;const o=Dr(t),l=Og(t),c=Rg(l),d=pa(t),h=o==="y",p=r.x+r.width/2-i.width/2,m=r.y+r.height/2-i.height/2,_=r[c]/2-i[c]/2;let E;switch(d){case"top":E={x:p,y:r.y-i.height};break;case"bottom":E={x:p,y:r.y+r.height};break;case"right":E={x:r.x+r.width,y:m};break;case"left":E={x:r.x-i.width,y:m};break;default:E={x:r.x,y:r.y}}switch(po(t)){case"start":E[l]-=_*(n&&h?-1:1);break;case"end":E[l]+=_*(n&&h?-1:1);break}return E}async function eD(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:l,elements:c,strategy:d}=e,{boundary:h="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:_=!1,padding:E=0}=ma(t,e),T=AS(E),A=c[_?m==="floating"?"reference":"floating":m],C=Cd(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(A)))==null||n?A:A.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(c.floating)),boundary:h,rootBoundary:p,strategy:d})),k=m==="floating"?{x:r,y:i,width:l.floating.width,height:l.floating.height}:l.reference,N=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c.floating)),M=await(o.isElement==null?void 0:o.isElement(N))?await(o.getScale==null?void 0:o.getScale(N))||{x:1,y:1}:{x:1,y:1},B=Cd(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:k,offsetParent:N,strategy:d}):k);return{top:(C.top-B.top+T.top)/M.y,bottom:(B.bottom-C.bottom+T.bottom)/M.y,left:(C.left-B.left+T.left)/M.x,right:(B.right-C.right+T.right)/M.x}}const tD=50,nD=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:l}=n,c=l.detectOverflow?l:{...l,detectOverflow:eD},d=await(l.isRTL==null?void 0:l.isRTL(t));let h=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:p,y:m}=Lx(h,r,d),_=r,E=0;const T={};for(let S=0;S<o.length;S++){const A=o[S];if(!A)continue;const{name:C,fn:k}=A,{x:N,y:M,data:B,reset:D}=await k({x:p,y:m,initialPlacement:r,placement:_,strategy:i,middlewareData:T,rects:h,platform:c,elements:{reference:e,floating:t}});p=N??p,m=M??m,T[C]={...T[C],...B},D&&E<tD&&(E++,typeof D=="object"&&(D.placement&&(_=D.placement),D.rects&&(h=D.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:i}):D.rects),{x:p,y:m}=Lx(h,_,d)),S=-1)}return{x:p,y:m,placement:_,strategy:i,middlewareData:T}},rD=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:l,elements:c,middlewareData:d}=t,{element:h,padding:p=0}=ma(e,t)||{};if(h==null)return{};const m=AS(p),_={x:n,y:r},E=Og(i),T=Rg(E),S=await l.getDimensions(h),A=E==="y",C=A?"top":"left",k=A?"bottom":"right",N=A?"clientHeight":"clientWidth",M=o.reference[T]+o.reference[E]-_[E]-o.floating[T],B=_[E]-o.reference[E],D=await(l.getOffsetParent==null?void 0:l.getOffsetParent(h));let z=D?D[N]:0;(!z||!await(l.isElement==null?void 0:l.isElement(D)))&&(z=c.floating[N]||o.floating[T]);const G=M/2-B/2,ie=z/2-S[T]/2-1,V=ri(m[C],ie),X=ri(m[k],ie),J=V,he=z-S[T]-X,ue=z/2-S[T]/2+G,re=m0(J,ue,he),U=!d.arrow&&po(i)!=null&&ue!==re&&o.reference[T]/2-(ue<J?V:X)-S[T]/2<0,ee=U?ue<J?ue-J:ue-he:0;return{[E]:_[E]+ee,data:{[E]:re,centerOffset:ue-re-ee,...U&&{alignmentOffset:ee}},reset:U}}}),aD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:l,initialPlacement:c,platform:d,elements:h}=t,{mainAxis:p=!0,crossAxis:m=!0,fallbackPlacements:_,fallbackStrategy:E="bestFit",fallbackAxisSideDirection:T="none",flipAlignment:S=!0,...A}=ma(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const C=pa(i),k=Dr(c),N=pa(c)===c,M=await(d.isRTL==null?void 0:d.isRTL(h.floating)),B=_||(N||!S?[Ad(c)]:X6(c)),D=T!=="none";!_&&D&&B.push(...Z6(c,S,T,M));const z=[c,...B],G=await d.detectOverflow(t,A),ie=[];let V=((r=o.flip)==null?void 0:r.overflows)||[];if(p&&ie.push(G[C]),m){const ue=Y6(i,l,M);ie.push(G[ue[0]],G[ue[1]])}if(V=[...V,{placement:i,overflows:ie}],!ie.every(ue=>ue<=0)){var X,J;const ue=(((X=o.flip)==null?void 0:X.index)||0)+1,re=z[ue];if(re&&(!(m==="alignment"?k!==Dr(re):!1)||V.every(ce=>Dr(ce.placement)===k?ce.overflows[0]>0:!0)))return{data:{index:ue,overflows:V},reset:{placement:re}};let U=(J=V.filter(ee=>ee.overflows[0]<=0).sort((ee,ce)=>ee.overflows[1]-ce.overflows[1])[0])==null?void 0:J.placement;if(!U)switch(E){case"bestFit":{var he;const ee=(he=V.filter(ce=>{if(D){const xe=Dr(ce.placement);return xe===k||xe==="y"}return!0}).map(ce=>[ce.placement,ce.overflows.filter(xe=>xe>0).reduce((xe,O)=>xe+O,0)]).sort((ce,xe)=>ce[1]-xe[1])[0])==null?void 0:he[0];ee&&(U=ee);break}case"initialPlacement":U=c;break}if(i!==U)return{reset:{placement:U}}}return{}}}};function Ix(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Dx(e){return G6.some(t=>e[t]>=0)}const iD=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:i="referenceHidden",...o}=ma(e,t);switch(i){case"referenceHidden":{const l=await r.detectOverflow(t,{...o,elementContext:"reference"}),c=Ix(l,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:Dx(c)}}}case"escaped":{const l=await r.detectOverflow(t,{...o,altBoundary:!0}),c=Ix(l,n.floating);return{data:{escapedOffsets:c,escaped:Dx(c)}}}default:return{}}}}},CS=new Set(["left","top"]);async function sD(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),l=pa(n),c=po(n),d=Dr(n)==="y",h=CS.has(l)?-1:1,p=o&&d?-1:1,m=ma(t,e);let{mainAxis:_,crossAxis:E,alignmentAxis:T}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return c&&typeof T=="number"&&(E=c==="end"?T*-1:T),d?{x:E*p,y:_*h}:{x:_*h,y:E*p}}const oD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:l,middlewareData:c}=t,d=await sD(t,e);return l===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:i+d.x,y:o+d.y,data:{...d,placement:l}}}}},lD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i,platform:o}=t,{mainAxis:l=!0,crossAxis:c=!1,limiter:d={fn:C=>{let{x:k,y:N}=C;return{x:k,y:N}}},...h}=ma(e,t),p={x:n,y:r},m=await o.detectOverflow(t,h),_=Dr(pa(i)),E=Ng(_);let T=p[E],S=p[_];if(l){const C=E==="y"?"top":"left",k=E==="y"?"bottom":"right",N=T+m[C],M=T-m[k];T=m0(N,T,M)}if(c){const C=_==="y"?"top":"left",k=_==="y"?"bottom":"right",N=S+m[C],M=S-m[k];S=m0(N,S,M)}const A=d.fn({...t,[E]:T,[_]:S});return{...A,data:{x:A.x-n,y:A.y-r,enabled:{[E]:l,[_]:c}}}}}},uD=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:l}=t,{offset:c=0,mainAxis:d=!0,crossAxis:h=!0}=ma(e,t),p={x:n,y:r},m=Dr(i),_=Ng(m);let E=p[_],T=p[m];const S=ma(c,t),A=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(d){const N=_==="y"?"height":"width",M=o.reference[_]-o.floating[N]+A.mainAxis,B=o.reference[_]+o.reference[N]-A.mainAxis;E<M?E=M:E>B&&(E=B)}if(h){var C,k;const N=_==="y"?"width":"height",M=CS.has(pa(i)),B=o.reference[m]-o.floating[N]+(M&&((C=l.offset)==null?void 0:C[m])||0)+(M?0:A.crossAxis),D=o.reference[m]+o.reference[N]+(M?0:((k=l.offset)==null?void 0:k[m])||0)-(M?A.crossAxis:0);T<B?T=B:T>D&&(T=D)}return{[_]:E,[m]:T}}}},cD=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:l,elements:c}=t,{apply:d=()=>{},...h}=ma(e,t),p=await l.detectOverflow(t,h),m=pa(i),_=po(i),E=Dr(i)==="y",{width:T,height:S}=o.floating;let A,C;m==="top"||m==="bottom"?(A=m,C=_===(await(l.isRTL==null?void 0:l.isRTL(c.floating))?"start":"end")?"left":"right"):(C=m,A=_==="end"?"top":"bottom");const k=S-p.top-p.bottom,N=T-p.left-p.right,M=ri(S-p[A],k),B=ri(T-p[C],N),D=!t.middlewareData.shift;let z=M,G=B;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(G=N),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(z=k),D&&!_){const V=zn(p.left,0),X=zn(p.right,0),J=zn(p.top,0),he=zn(p.bottom,0);E?G=T-2*(V!==0||X!==0?V+X:zn(p.left,p.right)):z=S-2*(J!==0||he!==0?J+he:zn(p.top,p.bottom))}await d({...t,availableWidth:G,availableHeight:z});const ie=await l.getDimensions(c.floating);return T!==ie.width||S!==ie.height?{reset:{rects:!0}}:{}}}};function of(){return typeof window<"u"}function go(e){return wS(e)?(e.nodeName||"").toLowerCase():"#document"}function Fn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Br(e){var t;return(t=(wS(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function wS(e){return of()?e instanceof Node||e instanceof Fn(e).Node:!1}function br(e){return of()?e instanceof Element||e instanceof Fn(e).Element:!1}function ga(e){return of()?e instanceof HTMLElement||e instanceof Fn(e).HTMLElement:!1}function Mx(e){return!of()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Fn(e).ShadowRoot}function cu(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Er(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!=="inline"&&i!=="contents"}function dD(e){return/^(table|td|th)$/.test(go(e))}function lf(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const fD=/transform|translate|scale|rotate|perspective|filter/,hD=/paint|layout|strict|content/,Oi=e=>!!e&&e!=="none";let Ep;function Lg(e){const t=br(e)?Er(e):e;return Oi(t.transform)||Oi(t.translate)||Oi(t.scale)||Oi(t.rotate)||Oi(t.perspective)||!Ig()&&(Oi(t.backdropFilter)||Oi(t.filter))||fD.test(t.willChange||"")||hD.test(t.contain||"")}function mD(e){let t=ai(e);for(;ga(t)&&!co(t);){if(Lg(t))return t;if(lf(t))return null;t=ai(t)}return null}function Ig(){return Ep==null&&(Ep=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ep}function co(e){return/^(html|body|#document)$/.test(go(e))}function Er(e){return Fn(e).getComputedStyle(e)}function uf(e){return br(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ai(e){if(go(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Mx(e)&&e.host||Br(e);return Mx(t)?t.host:t}function kS(e){const t=ai(e);return co(t)?e.ownerDocument?e.ownerDocument.body:e.body:ga(t)&&cu(t)?t:kS(t)}function Yl(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=kS(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),l=Fn(i);if(o){const c=g0(l);return t.concat(l,l.visualViewport||[],cu(i)?i:[],c&&n?Yl(c):[])}else return t.concat(i,Yl(i,[],n))}function g0(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function NS(e){const t=Er(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=ga(e),o=i?e.offsetWidth:n,l=i?e.offsetHeight:r,c=Sd(n)!==o||Sd(r)!==l;return c&&(n=o,r=l),{width:n,height:r,$:c}}function Dg(e){return br(e)?e:e.contextElement}function io(e){const t=Dg(e);if(!ga(t))return Mr(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=NS(t);let l=(o?Sd(n.width):n.width)/r,c=(o?Sd(n.height):n.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!c||!Number.isFinite(c))&&(c=1),{x:l,y:c}}const pD=Mr(0);function RS(e){const t=Fn(e);return!Ig()||!t.visualViewport?pD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function gD(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Fn(e)?!1:t}function Yi(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=Dg(e);let l=Mr(1);t&&(r?br(r)&&(l=io(r)):l=io(e));const c=gD(o,n,r)?RS(o):Mr(0);let d=(i.left+c.x)/l.x,h=(i.top+c.y)/l.y,p=i.width/l.x,m=i.height/l.y;if(o){const _=Fn(o),E=r&&br(r)?Fn(r):r;let T=_,S=g0(T);for(;S&&r&&E!==T;){const A=io(S),C=S.getBoundingClientRect(),k=Er(S),N=C.left+(S.clientLeft+parseFloat(k.paddingLeft))*A.x,M=C.top+(S.clientTop+parseFloat(k.paddingTop))*A.y;d*=A.x,h*=A.y,p*=A.x,m*=A.y,d+=N,h+=M,T=Fn(S),S=g0(T)}}return Cd({width:p,height:m,x:d,y:h})}function cf(e,t){const n=uf(e).scrollLeft;return t?t.left+n:Yi(Br(e)).left+n}function OS(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-cf(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function bD(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",l=Br(r),c=t?lf(t.floating):!1;if(r===l||c&&o)return n;let d={scrollLeft:0,scrollTop:0},h=Mr(1);const p=Mr(0),m=ga(r);if((m||!m&&!o)&&((go(r)!=="body"||cu(l))&&(d=uf(r)),m)){const E=Yi(r);h=io(r),p.x=E.x+r.clientLeft,p.y=E.y+r.clientTop}const _=l&&!m&&!o?OS(l,d):Mr(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-d.scrollLeft*h.x+p.x+_.x,y:n.y*h.y-d.scrollTop*h.y+p.y+_.y}}function ED(e){return Array.from(e.getClientRects())}function yD(e){const t=Br(e),n=uf(e),r=e.ownerDocument.body,i=zn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=zn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+cf(e);const c=-n.scrollTop;return Er(r).direction==="rtl"&&(l+=zn(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:l,y:c}}const Px=25;function _D(e,t){const n=Fn(e),r=Br(e),i=n.visualViewport;let o=r.clientWidth,l=r.clientHeight,c=0,d=0;if(i){o=i.width,l=i.height;const p=Ig();(!p||p&&t==="fixed")&&(c=i.offsetLeft,d=i.offsetTop)}const h=cf(r);if(h<=0){const p=r.ownerDocument,m=p.body,_=getComputedStyle(m),E=p.compatMode==="CSS1Compat"&&parseFloat(_.marginLeft)+parseFloat(_.marginRight)||0,T=Math.abs(r.clientWidth-m.clientWidth-E);T<=Px&&(o-=T)}else h<=Px&&(o+=h);return{width:o,height:l,x:c,y:d}}function xD(e,t){const n=Yi(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=ga(e)?io(e):Mr(1),l=e.clientWidth*o.x,c=e.clientHeight*o.y,d=i*o.x,h=r*o.y;return{width:l,height:c,x:d,y:h}}function Bx(e,t,n){let r;if(t==="viewport")r=_D(e,n);else if(t==="document")r=yD(Br(e));else if(br(t))r=xD(t,n);else{const i=RS(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Cd(r)}function LS(e,t){const n=ai(e);return n===t||!br(n)||co(n)?!1:Er(n).position==="fixed"||LS(n,t)}function TD(e,t){const n=t.get(e);if(n)return n;let r=Yl(e,[],!1).filter(c=>br(c)&&go(c)!=="body"),i=null;const o=Er(e).position==="fixed";let l=o?ai(e):e;for(;br(l)&&!co(l);){const c=Er(l),d=Lg(l);!d&&c.position==="fixed"&&(i=null),(o?!d&&!i:!d&&c.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||cu(l)&&!d&&LS(e,l))?r=r.filter(p=>p!==l):i=c,l=ai(l)}return t.set(e,r),r}function vD(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const l=[...n==="clippingAncestors"?lf(t)?[]:TD(t,this._c):[].concat(n),r],c=Bx(t,l[0],i);let d=c.top,h=c.right,p=c.bottom,m=c.left;for(let _=1;_<l.length;_++){const E=Bx(t,l[_],i);d=zn(E.top,d),h=ri(E.right,h),p=ri(E.bottom,p),m=zn(E.left,m)}return{width:h-m,height:p-d,x:m,y:d}}function SD(e){const{width:t,height:n}=NS(e);return{width:t,height:n}}function AD(e,t,n){const r=ga(t),i=Br(t),o=n==="fixed",l=Yi(e,!0,o,t);let c={scrollLeft:0,scrollTop:0};const d=Mr(0);function h(){d.x=cf(i)}if(r||!r&&!o)if((go(t)!=="body"||cu(i))&&(c=uf(t)),r){const E=Yi(t,!0,o,t);d.x=E.x+t.clientLeft,d.y=E.y+t.clientTop}else i&&h();o&&!r&&i&&h();const p=i&&!r&&!o?OS(i,c):Mr(0),m=l.left+c.scrollLeft-d.x-p.x,_=l.top+c.scrollTop-d.y-p.y;return{x:m,y:_,width:l.width,height:l.height}}function yp(e){return Er(e).position==="static"}function jx(e,t){if(!ga(e)||Er(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Br(e)===n&&(n=n.ownerDocument.body),n}function IS(e,t){const n=Fn(e);if(lf(e))return n;if(!ga(e)){let i=ai(e);for(;i&&!co(i);){if(br(i)&&!yp(i))return i;i=ai(i)}return n}let r=jx(e,t);for(;r&&dD(r)&&yp(r);)r=jx(r,t);return r&&co(r)&&yp(r)&&!Lg(r)?n:r||mD(e)||n}const CD=async function(e){const t=this.getOffsetParent||IS,n=this.getDimensions,r=await n(e.floating);return{reference:AD(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function wD(e){return Er(e).direction==="rtl"}const kD={convertOffsetParentRelativeRectToViewportRelativeRect:bD,getDocumentElement:Br,getClippingRect:vD,getOffsetParent:IS,getElementRects:CD,getClientRects:ED,getDimensions:SD,getScale:io,isElement:br,isRTL:wD};function DS(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ND(e,t){let n=null,r;const i=Br(e);function o(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function l(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),o();const h=e.getBoundingClientRect(),{left:p,top:m,width:_,height:E}=h;if(c||t(),!_||!E)return;const T=qc(m),S=qc(i.clientWidth-(p+_)),A=qc(i.clientHeight-(m+E)),C=qc(p),N={rootMargin:-T+"px "+-S+"px "+-A+"px "+-C+"px",threshold:zn(0,ri(1,d))||1};let M=!0;function B(D){const z=D[0].intersectionRatio;if(z!==d){if(!M)return l();z?l(!1,z):r=setTimeout(()=>{l(!1,1e-7)},1e3)}z===1&&!DS(h,e.getBoundingClientRect())&&l(),M=!1}try{n=new IntersectionObserver(B,{...N,root:i.ownerDocument})}catch{n=new IntersectionObserver(B,N)}n.observe(e)}return l(!0),o}function RD(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,h=Dg(e),p=i||o?[...h?Yl(h):[],...t?Yl(t):[]]:[];p.forEach(C=>{i&&C.addEventListener("scroll",n,{passive:!0}),o&&C.addEventListener("resize",n)});const m=h&&c?ND(h,n):null;let _=-1,E=null;l&&(E=new ResizeObserver(C=>{let[k]=C;k&&k.target===h&&E&&t&&(E.unobserve(t),cancelAnimationFrame(_),_=requestAnimationFrame(()=>{var N;(N=E)==null||N.observe(t)})),n()}),h&&!d&&E.observe(h),t&&E.observe(t));let T,S=d?Yi(e):null;d&&A();function A(){const C=Yi(e);S&&!DS(S,C)&&n(),S=C,T=requestAnimationFrame(A)}return n(),()=>{var C;p.forEach(k=>{i&&k.removeEventListener("scroll",n),o&&k.removeEventListener("resize",n)}),m?.(),(C=E)==null||C.disconnect(),E=null,d&&cancelAnimationFrame(T)}}const OD=oD,LD=lD,ID=aD,DD=cD,MD=iD,Ux=rD,PD=uD,BD=(e,t,n)=>{const r=new Map,i={platform:kD,...n},o={...i.platform,_c:r};return nD(e,t,{...i,platform:o})};var jD=typeof document<"u",UD=function(){},md=jD?v.useLayoutEffect:UD;function wd(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!wd(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!wd(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function MS(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Hx(e,t){const n=MS(e);return Math.round(t*n)/n}function _p(e){const t=v.useRef(e);return md(()=>{t.current=e}),t}function HD(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:l}={},transform:c=!0,whileElementsMounted:d,open:h}=e,[p,m]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[_,E]=v.useState(r);wd(_,r)||E(r);const[T,S]=v.useState(null),[A,C]=v.useState(null),k=v.useCallback(ce=>{ce!==D.current&&(D.current=ce,S(ce))},[]),N=v.useCallback(ce=>{ce!==z.current&&(z.current=ce,C(ce))},[]),M=o||T,B=l||A,D=v.useRef(null),z=v.useRef(null),G=v.useRef(p),ie=d!=null,V=_p(d),X=_p(i),J=_p(h),he=v.useCallback(()=>{if(!D.current||!z.current)return;const ce={placement:t,strategy:n,middleware:_};X.current&&(ce.platform=X.current),BD(D.current,z.current,ce).then(xe=>{const O={...xe,isPositioned:J.current!==!1};ue.current&&!wd(G.current,O)&&(G.current=O,Ji.flushSync(()=>{m(O)}))})},[_,t,n,X,J]);md(()=>{h===!1&&G.current.isPositioned&&(G.current.isPositioned=!1,m(ce=>({...ce,isPositioned:!1})))},[h]);const ue=v.useRef(!1);md(()=>(ue.current=!0,()=>{ue.current=!1}),[]),md(()=>{if(M&&(D.current=M),B&&(z.current=B),M&&B){if(V.current)return V.current(M,B,he);he()}},[M,B,he,V,ie]);const re=v.useMemo(()=>({reference:D,floating:z,setReference:k,setFloating:N}),[k,N]),U=v.useMemo(()=>({reference:M,floating:B}),[M,B]),ee=v.useMemo(()=>{const ce={position:n,left:0,top:0};if(!U.floating)return ce;const xe=Hx(U.floating,p.x),O=Hx(U.floating,p.y);return c?{...ce,transform:"translate("+xe+"px, "+O+"px)",...MS(U.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:xe,top:O}},[n,c,U.floating,p.x,p.y]);return v.useMemo(()=>({...p,update:he,refs:re,elements:U,floatingStyles:ee}),[p,he,re,U,ee])}const zD=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Ux({element:r.current,padding:i}).fn(n):{}:r?Ux({element:r,padding:i}).fn(n):{}}}},FD=(e,t)=>{const n=OD(e);return{name:n.name,fn:n.fn,options:[e,t]}},$D=(e,t)=>{const n=LD(e);return{name:n.name,fn:n.fn,options:[e,t]}},VD=(e,t)=>({fn:PD(e).fn,options:[e,t]}),GD=(e,t)=>{const n=ID(e);return{name:n.name,fn:n.fn,options:[e,t]}},qD=(e,t)=>{const n=DD(e);return{name:n.name,fn:n.fn,options:[e,t]}},YD=(e,t)=>{const n=MD(e);return{name:n.name,fn:n.fn,options:[e,t]}},XD=(e,t)=>{const n=zD(e);return{name:n.name,fn:n.fn,options:[e,t]}};var QD="Arrow",PS=v.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...o}=e;return b.jsx(We.svg,{...o,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:b.jsx("polygon",{points:"0,0 30,0 15,10"})})});PS.displayName=QD;var WD=PS,Mg="Popper",[BS,jS]=es(Mg),[KD,US]=BS(Mg),HS=e=>{const{__scopePopper:t,children:n}=e,[r,i]=v.useState(null),[o,l]=v.useState(void 0);return b.jsx(KD,{scope:t,anchor:r,onAnchorChange:i,placementState:o,setPlacementState:l,children:n})};HS.displayName=Mg;var zS="PopperAnchor",FS=v.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=US(zS,n),l=v.useRef(null),c=o.onAnchorChange,d=v.useCallback(T=>{l.current=T,T&&c(T)},[c]),h=St(t,d),p=v.useRef(null);v.useEffect(()=>{if(!r)return;const T=p.current;p.current=r.current,T!==p.current&&c(p.current)});const m=o.placementState&&Bg(o.placementState),_=m?.[0],E=m?.[1];return r?null:b.jsx(We.div,{"data-radix-popper-side":_,"data-radix-popper-align":E,...i,ref:h})});FS.displayName=zS;var Pg="PopperContent",[ZD,JD]=BS(Pg),$S=v.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:l=0,arrowPadding:c=0,avoidCollisions:d=!0,collisionBoundary:h=[],collisionPadding:p=0,sticky:m="partial",hideWhenDetached:_=!1,updatePositionStrategy:E="optimized",onPlaced:T,...S}=e,A=US(Pg,n),[C,k]=v.useState(null),N=St(t,k),[M,B]=v.useState(null),D=V6(M),z=D?.width??0,G=D?.height??0,ie=r+(o!=="center"?"-"+o:""),V=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},X=Array.isArray(h)?h:[h],J=X.length>0,he={padding:V,boundary:X.filter(t4),altBoundary:J},{refs:ue,floatingStyles:re,placement:U,isPositioned:ee,middlewareData:ce}=HD({strategy:"fixed",placement:ie,whileElementsMounted:(...ke)=>RD(...ke,{animationFrame:E==="always"}),elements:{reference:A.anchor},middleware:[FD({mainAxis:i+G,alignmentAxis:l}),d&&$D({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?VD():void 0,...he}),d&&GD({...he}),qD({...he,apply:({elements:ke,rects:Te,availableWidth:De,availableHeight:je})=>{const{width:Je,height:Nt}=Te.reference,it=ke.floating.style;it.setProperty("--radix-popper-available-width",`${De}px`),it.setProperty("--radix-popper-available-height",`${je}px`),it.setProperty("--radix-popper-anchor-width",`${Je}px`),it.setProperty("--radix-popper-anchor-height",`${Nt}px`)}}),M&&XD({element:M,padding:c}),n4({arrowWidth:z,arrowHeight:G}),_&&YD({strategy:"referenceHidden",...he,boundary:J?he.boundary:void 0})]}),xe=A.setPlacementState;Vt(()=>(xe(U),()=>{xe(void 0)}),[U,xe]);const[O,F]=Bg(U),te=ha(T);Vt(()=>{ee&&te?.()},[ee,te]);const P=ce.arrow?.x,ge=ce.arrow?.y,Ee=ce.arrow?.centerOffset!==0,[ye,be]=v.useState();return Vt(()=>{C&&be(window.getComputedStyle(C).zIndex)},[C]),b.jsx("div",{ref:ue.setFloating,"data-radix-popper-content-wrapper":"",style:{...re,transform:ee?re.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ye,"--radix-popper-transform-origin":[ce.transformOrigin?.x,ce.transformOrigin?.y].join(" "),...ce.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:b.jsx(ZD,{scope:n,placedSide:O,placedAlign:F,onArrowChange:B,arrowX:P,arrowY:ge,shouldHideArrow:Ee,children:b.jsx(We.div,{"data-side":O,"data-align":F,...S,ref:N,style:{...S.style,animation:ee?void 0:"none"}})})})});$S.displayName=Pg;var VS="PopperArrow",e4={top:"bottom",right:"left",bottom:"top",left:"right"},GS=v.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,o=JD(VS,r),l=e4[o.placedSide];return b.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:b.jsx(WD,{...i,ref:n,style:{...i.style,display:"block"}})})});GS.displayName=VS;function t4(e){return e!==null}var n4=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:i}=t,l=i.arrow?.centerOffset!==0,c=l?0:e.arrowWidth,d=l?0:e.arrowHeight,[h,p]=Bg(n),m={start:"0%",center:"50%",end:"100%"}[p],_=(i.arrow?.x??0)+c/2,E=(i.arrow?.y??0)+d/2;let T="",S="";return h==="bottom"?(T=l?m:`${_}px`,S=`${-d}px`):h==="top"?(T=l?m:`${_}px`,S=`${r.floating.height+d}px`):h==="right"?(T=`${-d}px`,S=l?m:`${E}px`):h==="left"&&(T=`${r.floating.width+d}px`,S=l?m:`${E}px`),{data:{x:T,y:S}}}});function Bg(e){const[t,n="center"]=e.split("-");return[t,n]}var r4=HS,a4=FS,i4=$S,s4=GS,xp="rovingFocusGroup.onEntryFocus",o4={bubbles:!1,cancelable:!0},du="RovingFocusGroup",[b0,qS,l4]=X2(du),[u4,YS]=es(du,[l4]),[c4,d4]=u4(du),XS=v.forwardRef((e,t)=>b.jsx(b0.Provider,{scope:e.__scopeRovingFocusGroup,children:b.jsx(b0.Slot,{scope:e.__scopeRovingFocusGroup,children:b.jsx(f4,{...e,ref:t})})}));XS.displayName=du;var f4=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:l,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:d,onEntryFocus:h,preventScrollOnEntryFocus:p=!1,...m}=e,_=v.useRef(null),E=St(t,_),T=xg(o),[S,A]=ni({prop:l,defaultProp:c??null,onChange:d,caller:du}),[C,k]=v.useState(!1),N=ha(h),M=qS(n),B=v.useRef(!1),[D,z]=v.useState(0);return v.useEffect(()=>{const G=_.current;if(G)return G.addEventListener(xp,N),()=>G.removeEventListener(xp,N)},[N]),b.jsx(c4,{scope:n,orientation:r,dir:T,loop:i,currentTabStopId:S,onItemFocus:v.useCallback(G=>A(G),[A]),onItemShiftTab:v.useCallback(()=>k(!0),[]),onFocusableItemAdd:v.useCallback(()=>z(G=>G+1),[]),onFocusableItemRemove:v.useCallback(()=>z(G=>G-1),[]),children:b.jsx(We.div,{tabIndex:C||D===0?-1:0,"data-orientation":r,...m,ref:E,style:{outline:"none",...e.style},onMouseDown:Ze(e.onMouseDown,()=>{B.current=!0}),onFocus:Ze(e.onFocus,G=>{const ie=!B.current;if(G.target===G.currentTarget&&ie&&!C){const V=new CustomEvent(xp,o4);if(G.currentTarget.dispatchEvent(V),!V.defaultPrevented){const X=M().filter(U=>U.focusable),J=X.find(U=>U.active),he=X.find(U=>U.id===S),re=[J,he,...X].filter(Boolean).map(U=>U.ref.current);KS(re,p)}}B.current=!1}),onBlur:Ze(e.onBlur,()=>k(!1))})})}),QS="RovingFocusGroupItem",WS=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,children:l,...c}=e,d=fa(),h=o||d,p=d4(QS,n),m=p.currentTabStopId===h,_=qS(n),{onFocusableItemAdd:E,onFocusableItemRemove:T,currentTabStopId:S}=p;return v.useEffect(()=>{if(r)return E(),()=>T()},[r,E,T]),b.jsx(b0.ItemSlot,{scope:n,id:h,focusable:r,active:i,children:b.jsx(We.span,{tabIndex:m?0:-1,"data-orientation":p.orientation,...c,ref:t,onMouseDown:Ze(e.onMouseDown,A=>{r?p.onItemFocus(h):A.preventDefault()}),onFocus:Ze(e.onFocus,()=>p.onItemFocus(h)),onKeyDown:Ze(e.onKeyDown,A=>{if(A.key==="Tab"&&A.shiftKey){p.onItemShiftTab();return}if(A.target!==A.currentTarget)return;const C=p4(A,p.orientation,p.dir);if(C!==void 0){if(A.metaKey||A.ctrlKey||A.altKey||A.shiftKey)return;A.preventDefault();let N=_().filter(M=>M.focusable).map(M=>M.ref.current);if(C==="last")N.reverse();else if(C==="prev"||C==="next"){C==="prev"&&N.reverse();const M=N.indexOf(A.currentTarget);N=p.loop?g4(N,M+1):N.slice(M+1)}setTimeout(()=>KS(N))}}),children:typeof l=="function"?l({isCurrentTabStop:m,hasTabStop:S!=null}):l})})});WS.displayName=QS;var h4={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function m4(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function p4(e,t,n){const r=m4(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return h4[r]}function KS(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function g4(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var b4=XS,E4=WS;function zx(e,[t,n]){return Math.min(n,Math.max(t,e))}var y4=[" ","Enter","ArrowUp","ArrowDown"],_4=[" ","Enter"],Xi="Select",[df,ff,x4]=X2(Xi),[ns]=es(Xi,[x4,jS]),hf=jS(),[T4,li]=ns(Xi),[v4,S4]=ns(Xi),A4="SelectProvider";function ZS(e){const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:o,value:l,defaultValue:c,onValueChange:d,dir:h,name:p,autoComplete:m,disabled:_,required:E,form:T,internal_do_not_use_render:S}=e,A=hf(t),[C,k]=v.useState(null),[N,M]=v.useState(null),[B,D]=v.useState(!1),z=xg(h),[G,ie]=ni({prop:r,defaultProp:i??!1,onChange:o,caller:Xi}),[V,X]=ni({prop:l,defaultProp:c,onChange:d,caller:Xi}),J=v.useRef(null),he=C?!!T||!!C.closest("form"):!0,[ue,re]=v.useState(new Set),U=fa(),ee=Array.from(ue).map(F=>F.props.value).join(";"),ce=v.useCallback(F=>{re(te=>new Set(te).add(F))},[]),xe=v.useCallback(F=>{re(te=>{const P=new Set(te);return P.delete(F),P})},[]),O={required:E,trigger:C,onTriggerChange:k,valueNode:N,onValueNodeChange:M,valueNodeHasChildren:B,onValueNodeHasChildrenChange:D,contentId:U,value:V,onValueChange:X,open:G,onOpenChange:ie,dir:z,triggerPointerDownPosRef:J,disabled:_,name:p,autoComplete:m,form:T,nativeOptions:ue,nativeSelectKey:ee,isFormControl:he};return b.jsx(r4,{...A,children:b.jsx(T4,{scope:t,...O,children:b.jsx(df.Provider,{scope:t,children:b.jsx(v4,{scope:t,onNativeOptionAdd:ce,onNativeOptionRemove:xe,children:H4(S)?S(O):n})})})})}ZS.displayName=A4;var JS=e=>{const{__scopeSelect:t,children:n,...r}=e;return b.jsx(ZS,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:i})=>b.jsxs(b.Fragment,{children:[n,i?b.jsx(wA,{__scopeSelect:t}):null]})})};JS.displayName=Xi;var eA="SelectTrigger",tA=v.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,o=hf(n),l=li(eA,n),c=l.disabled||r,d=St(t,l.onTriggerChange),h=ff(n),p=v.useRef("touch"),[m,_,E]=kA(S=>{const A=h().filter(N=>!N.disabled),C=A.find(N=>N.value===l.value),k=NA(A,S,C);k!==void 0&&l.onValueChange(k.value)}),T=S=>{c||(l.onOpenChange(!0),E()),S&&(l.triggerPointerDownPosRef.current={x:Math.round(S.pageX),y:Math.round(S.pageY)})};return b.jsx(a4,{asChild:!0,...o,children:b.jsx(We.button,{type:"button",role:"combobox","aria-controls":l.open?l.contentId:void 0,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":mf(l.value)?"":void 0,...i,ref:d,onClick:Ze(i.onClick,S=>{S.currentTarget.focus(),p.current!=="mouse"&&T(S)}),onPointerDown:Ze(i.onPointerDown,S=>{p.current=S.pointerType;const A=S.target;A.hasPointerCapture(S.pointerId)&&A.releasePointerCapture(S.pointerId),S.button===0&&S.ctrlKey===!1&&S.pointerType==="mouse"&&(T(S),S.preventDefault())}),onKeyDown:Ze(i.onKeyDown,S=>{const A=m.current!=="";!(S.ctrlKey||S.altKey||S.metaKey)&&S.key.length===1&&_(S.key),!(A&&S.key===" ")&&y4.includes(S.key)&&(T(),S.preventDefault())})})})});tA.displayName=eA;var nA="SelectValue",rA=v.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:o,placeholder:l="",...c}=e,d=li(nA,n),{onValueNodeHasChildrenChange:h}=d,p=o!==void 0,m=St(t,d.onValueNodeChange);Vt(()=>{h(p)},[h,p]);const _=mf(d.value);return b.jsx(We.span,{...c,asChild:_?!1:c.asChild,ref:m,style:{pointerEvents:"none"},children:b.jsx(v.Fragment,{children:_?l:o},_?"placeholder":"value")})});rA.displayName=nA;var C4="SelectIcon",aA=v.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return b.jsx(We.span,{"aria-hidden":!0,...i,ref:t,children:r||"▼"})});aA.displayName=C4;var iA="SelectPortal",[w4,k4]=ns(iA,{forceMount:void 0}),sA=e=>{const{__scopeSelect:t,forceMount:n,...r}=e;return b.jsx(w4,{scope:e.__scopeSelect,forceMount:n,children:b.jsx(Ag,{asChild:!0,...r})})};sA.displayName=iA;var ii="SelectContent",oA=v.forwardRef((e,t)=>{const n=k4(ii,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,o=li(ii,e.__scopeSelect),[l,c]=v.useState();return Vt(()=>{c(new DocumentFragment)},[]),b.jsx(ts,{present:r||o.open,children:({present:d})=>d?b.jsx(cA,{...i,ref:t}):b.jsx(lA,{...i,fragment:l})})});oA.displayName=ii;var lA=v.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,fragment:i}=e;return i?Ji.createPortal(b.jsx(uA,{scope:n,children:b.jsx(df.Slot,{scope:n,children:b.jsx("div",{ref:t,children:r})})}),i):null});lA.displayName="SelectContentFragment";var fr=10,[uA,ui]=ns(ii),N4="SelectContentImpl",R4=lo("SelectContent.RemoveScroll"),cA=v.forwardRef((e,t)=>{const{__scopeSelect:n}=e,{position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:o,onPointerDownOutside:l,side:c,sideOffset:d,align:h,alignOffset:p,arrowPadding:m,collisionBoundary:_,collisionPadding:E,sticky:T,hideWhenDetached:S,avoidCollisions:A,...C}=e,k=li(ii,n),[N,M]=v.useState(null),[B,D]=v.useState(null),z=St(t,M),[G,ie]=v.useState(null),[V,X]=v.useState(null),J=ff(n),[he,ue]=v.useState(!1),re=v.useRef(!1);v.useEffect(()=>{if(N)return cS(N)},[N]),tS();const U=v.useCallback(be=>{const[ke,...Te]=J().map(Je=>Je.ref.current),[De]=Te.slice(-1),je=document.activeElement;for(const Je of be)if(Je===je||(Je?.scrollIntoView({block:"nearest"}),Je===ke&&B&&(B.scrollTop=0),Je===De&&B&&(B.scrollTop=B.scrollHeight),Je?.focus(),document.activeElement!==je))return},[J,B]),ee=v.useCallback(()=>U([G,N]),[U,G,N]);v.useEffect(()=>{he&&ee()},[he,ee]);const{onOpenChange:ce,triggerPointerDownPosRef:xe}=k;v.useEffect(()=>{if(N){let be={x:0,y:0};const ke=De=>{be={x:Math.abs(Math.round(De.pageX)-(xe.current?.x??0)),y:Math.abs(Math.round(De.pageY)-(xe.current?.y??0))}},Te=De=>{be.x<=10&&be.y<=10?De.preventDefault():De.composedPath().includes(N)||ce(!1),document.removeEventListener("pointermove",ke),xe.current=null};return xe.current!==null&&(document.addEventListener("pointermove",ke),document.addEventListener("pointerup",Te,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ke),document.removeEventListener("pointerup",Te,{capture:!0})}}},[N,ce,xe]),v.useEffect(()=>{const be=()=>ce(!1);return window.addEventListener("blur",be),window.addEventListener("resize",be),()=>{window.removeEventListener("blur",be),window.removeEventListener("resize",be)}},[ce]);const[O,F]=kA(be=>{const ke=J().filter(je=>!je.disabled),Te=ke.find(je=>je.ref.current===document.activeElement),De=NA(ke,be,Te);De&&setTimeout(()=>De.ref.current?.focus())}),te=v.useCallback((be,ke,Te)=>{const De=!re.current&&!Te;(k.value!==void 0&&k.value===ke||De)&&(ie(be),De&&(re.current=!0))},[k.value]),P=v.useCallback(()=>N?.focus(),[N]),ge=v.useCallback((be,ke,Te)=>{const De=!re.current&&!Te;(k.value!==void 0&&k.value===ke||De)&&X(be)},[k.value]),Ee=r==="popper"?E0:dA,ye=Ee===E0?{side:c,sideOffset:d,align:h,alignOffset:p,arrowPadding:m,collisionBoundary:_,collisionPadding:E,sticky:T,hideWhenDetached:S,avoidCollisions:A}:{};return b.jsx(uA,{scope:n,content:N,viewport:B,onViewportChange:D,itemRefCallback:te,selectedItem:G,onItemLeave:P,itemTextRefCallback:ge,focusSelectedItem:ee,selectedItemText:V,position:r,isPositioned:he,searchRef:O,children:b.jsx(Cg,{as:R4,allowPinchZoom:!0,children:b.jsx(Sg,{asChild:!0,trapped:k.open,onMountAutoFocus:be=>{be.preventDefault()},onUnmountAutoFocus:Ze(i,be=>{k.trigger?.focus({preventScroll:!0}),be.preventDefault()}),children:b.jsx(vg,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:be=>be.preventDefault(),onDismiss:()=>k.onOpenChange(!1),children:b.jsx(Ee,{role:"listbox",id:k.contentId,"data-state":k.open?"open":"closed",dir:k.dir,onContextMenu:be=>be.preventDefault(),...C,...ye,onPlaced:()=>ue(!0),ref:z,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:Ze(C.onKeyDown,be=>{const ke=be.ctrlKey||be.altKey||be.metaKey;if(be.key==="Tab"&&be.preventDefault(),!ke&&be.key.length===1&&F(be.key),["ArrowUp","ArrowDown","Home","End"].includes(be.key)){let De=J().filter(je=>!je.disabled).map(je=>je.ref.current);if(["ArrowUp","End"].includes(be.key)&&(De=De.slice().reverse()),["ArrowUp","ArrowDown"].includes(be.key)){const je=be.target,Je=De.indexOf(je);De=De.slice(Je+1)}setTimeout(()=>U(De)),be.preventDefault()}})})})})})})});cA.displayName=N4;var O4="SelectItemAlignedPosition",dA=v.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,o=li(ii,n),l=ui(ii,n),[c,d]=v.useState(null),[h,p]=v.useState(null),m=St(t,p),_=ff(n),E=v.useRef(!1),T=v.useRef(!0),{viewport:S,selectedItem:A,selectedItemText:C,focusSelectedItem:k}=l,N=v.useCallback(()=>{if(o.trigger&&o.valueNode&&c&&h&&S&&A&&C){const z=o.trigger.getBoundingClientRect(),G=h.getBoundingClientRect(),ie=o.valueNode.getBoundingClientRect(),V=C.getBoundingClientRect();if(o.dir!=="rtl"){const je=V.left-G.left,Je=ie.left-je,Nt=z.left-Je,it=z.width+Nt,On=Math.max(it,G.width),En=window.innerWidth-fr,Tr=zx(Je,[fr,Math.max(fr,En-On)]);c.style.minWidth=it+"px",c.style.left=Tr+"px"}else{const je=G.right-V.right,Je=window.innerWidth-ie.right-je,Nt=window.innerWidth-z.right-Je,it=z.width+Nt,On=Math.max(it,G.width),En=window.innerWidth-fr,Tr=zx(Je,[fr,Math.max(fr,En-On)]);c.style.minWidth=it+"px",c.style.right=Tr+"px"}const X=_(),J=window.innerHeight-fr*2,he=S.scrollHeight,ue=window.getComputedStyle(h),re=parseInt(ue.borderTopWidth,10),U=parseInt(ue.paddingTop,10),ee=parseInt(ue.borderBottomWidth,10),ce=parseInt(ue.paddingBottom,10),xe=re+U+he+ce+ee,O=Math.min(A.offsetHeight*5,xe),F=window.getComputedStyle(S),te=parseInt(F.paddingTop,10),P=parseInt(F.paddingBottom,10),ge=z.top+z.height/2-fr,Ee=J-ge,ye=A.offsetHeight/2,be=A.offsetTop+ye,ke=re+U+be,Te=xe-ke;if(ke<=ge){const je=X.length>0&&A===X[X.length-1].ref.current;c.style.bottom="0px";const Je=h.clientHeight-S.offsetTop-S.offsetHeight,Nt=Math.max(Ee,ye+(je?P:0)+Je+ee),it=ke+Nt;c.style.height=it+"px"}else{const je=X.length>0&&A===X[0].ref.current;c.style.top="0px";const Nt=Math.max(ge,re+S.offsetTop+(je?te:0)+ye)+Te;c.style.height=Nt+"px",S.scrollTop=ke-ge+S.offsetTop}c.style.margin=`${fr}px 0`,c.style.minHeight=O+"px",c.style.maxHeight=J+"px",r?.(),requestAnimationFrame(()=>E.current=!0)}},[_,o.trigger,o.valueNode,c,h,S,A,C,o.dir,r]);Vt(()=>N(),[N]);const[M,B]=v.useState();Vt(()=>{h&&B(window.getComputedStyle(h).zIndex)},[h]);const D=v.useCallback(z=>{z&&T.current===!0&&(N(),k?.(),T.current=!1)},[N,k]);return b.jsx(I4,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:E,onScrollButtonChange:D,children:b.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:M},children:b.jsx(We.div,{...i,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});dA.displayName=O4;var L4="SelectPopperPosition",E0=v.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=fr,...o}=e,l=hf(n);return b.jsx(i4,{...l,...o,ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});E0.displayName=L4;var[I4,jg]=ns(ii,{}),y0="SelectViewport",fA=v.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,o=ui(y0,n),l=jg(y0,n),c=St(t,o.onViewportChange),d=v.useRef(0);return b.jsxs(b.Fragment,{children:[b.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),b.jsx(df.Slot,{scope:n,children:b.jsx(We.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:Ze(i.onScroll,h=>{const p=h.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:_}=l;if(_?.current&&m){const E=Math.abs(d.current-p.scrollTop);if(E>0){const T=window.innerHeight-fr*2,S=parseFloat(m.style.minHeight),A=parseFloat(m.style.height),C=Math.max(S,A);if(C<T){const k=C+E,N=Math.min(T,k),M=k-N;m.style.height=N+"px",m.style.bottom==="0px"&&(p.scrollTop=M>0?M:0,m.style.justifyContent="flex-end")}}}d.current=p.scrollTop})})})]})});fA.displayName=y0;var hA="SelectGroup",[D4,M4]=ns(hA),mA=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=fa();return b.jsx(D4,{scope:n,id:i,children:b.jsx(We.div,{role:"group","aria-labelledby":i,...r,ref:t})})});mA.displayName=hA;var pA="SelectLabel",gA=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=M4(pA,n);return b.jsx(We.div,{id:i.id,...r,ref:t})});gA.displayName=pA;var kd="SelectItem",[P4,bA]=ns(kd),EA=v.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:o,...l}=e,c=li(kd,n),d=ui(kd,n),h=c.value===r,[p,m]=v.useState(o??""),[_,E]=v.useState(!1),T=ha(N=>d.itemRefCallback?.(N,r,i)),S=St(t,T),A=fa(),C=v.useRef("touch"),k=()=>{i||(c.onValueChange(r),c.onOpenChange(!1))};return b.jsx(P4,{scope:n,value:r,disabled:i,textId:A,isSelected:h,onItemTextChange:v.useCallback(N=>{m(M=>M||(N?.textContent??"").trim())},[]),children:b.jsx(df.ItemSlot,{scope:n,value:r,disabled:i,textValue:p,children:b.jsx(We.div,{role:"option","aria-labelledby":A,"data-highlighted":_?"":void 0,"aria-selected":h&&_,"data-state":h?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...l,ref:S,onFocus:Ze(l.onFocus,()=>E(!0)),onBlur:Ze(l.onBlur,()=>E(!1)),onClick:Ze(l.onClick,()=>{C.current!=="mouse"&&k()}),onPointerUp:Ze(l.onPointerUp,()=>{C.current==="mouse"&&k()}),onPointerDown:Ze(l.onPointerDown,N=>{C.current=N.pointerType}),onPointerMove:Ze(l.onPointerMove,N=>{C.current=N.pointerType,i?d.onItemLeave?.():C.current==="mouse"&&N.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ze(l.onPointerLeave,N=>{N.currentTarget===document.activeElement&&d.onItemLeave?.()}),onKeyDown:Ze(l.onKeyDown,N=>{d.searchRef?.current!==""&&N.key===" "||(_4.includes(N.key)&&k(),N.key===" "&&N.preventDefault())})})})})});EA.displayName=kd;var Rl="SelectItemText",yA=v.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...o}=e,l=li(Rl,n),c=ui(Rl,n),d=bA(Rl,n),h=S4(Rl,n),[p,m]=v.useState(null),_=ha(k=>c.itemTextRefCallback?.(k,d.value,d.disabled)),E=St(t,m,d.onItemTextChange,_),T=p?.textContent,S=v.useMemo(()=>b.jsx("option",{value:d.value,disabled:d.disabled,children:T},d.value),[d.disabled,d.value,T]),{onNativeOptionAdd:A,onNativeOptionRemove:C}=h;return Vt(()=>(A(S),()=>C(S)),[A,C,S]),b.jsxs(b.Fragment,{children:[b.jsx(We.span,{id:d.textId,...o,ref:E}),d.isSelected&&l.valueNode&&!l.valueNodeHasChildren&&!mf(l.value)?Ji.createPortal(o.children,l.valueNode):null]})});yA.displayName=Rl;var _A="SelectItemIndicator",xA=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return bA(_A,n).isSelected?b.jsx(We.span,{"aria-hidden":!0,...r,ref:t}):null});xA.displayName=_A;var _0="SelectScrollUpButton",TA=v.forwardRef((e,t)=>{const n=ui(_0,e.__scopeSelect),r=jg(_0,e.__scopeSelect),[i,o]=v.useState(!1),l=St(t,r.onScrollButtonChange);return Vt(()=>{if(n.viewport&&n.isPositioned){let c=function(){const h=d.scrollTop>0;o(h)};const d=n.viewport;return c(),d.addEventListener("scroll",c),()=>d.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),i?b.jsx(SA,{...e,ref:l,onAutoScroll:()=>{const{viewport:c,selectedItem:d}=n;c&&d&&(c.scrollTop=c.scrollTop-d.offsetHeight)}}):null});TA.displayName=_0;var x0="SelectScrollDownButton",vA=v.forwardRef((e,t)=>{const n=ui(x0,e.__scopeSelect),r=jg(x0,e.__scopeSelect),[i,o]=v.useState(!1),l=St(t,r.onScrollButtonChange);return Vt(()=>{if(n.viewport&&n.isPositioned){let c=function(){const h=d.scrollHeight-d.clientHeight,p=Math.ceil(d.scrollTop)<h;o(p)};const d=n.viewport;return c(),d.addEventListener("scroll",c),()=>d.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),i?b.jsx(SA,{...e,ref:l,onAutoScroll:()=>{const{viewport:c,selectedItem:d}=n;c&&d&&(c.scrollTop=c.scrollTop+d.offsetHeight)}}):null});vA.displayName=x0;var SA=v.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,o=ui("SelectScrollButton",n),l=v.useRef(null),c=ff(n),d=v.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return v.useEffect(()=>()=>d(),[d]),Vt(()=>{c().find(p=>p.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[c]),b.jsx(We.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:Ze(i.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(r,50))}),onPointerMove:Ze(i.onPointerMove,()=>{o.onItemLeave?.(),l.current===null&&(l.current=window.setInterval(r,50))}),onPointerLeave:Ze(i.onPointerLeave,()=>{d()})})}),B4="SelectSeparator",j4=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return b.jsx(We.div,{"aria-hidden":!0,...r,ref:t})});j4.displayName=B4;var AA="SelectArrow",U4=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=hf(n);return ui(AA,n).position==="popper"?b.jsx(s4,{...i,...r,ref:t}):null});U4.displayName=AA;var CA="SelectBubbleInput",wA=v.forwardRef(({__scopeSelect:e,...t},n)=>{const r=li(CA,e),{value:i,onValueChange:o,required:l,disabled:c,name:d,autoComplete:h,form:p}=r,{nativeOptions:m,nativeSelectKey:_}=r,E=v.useRef(null),T=St(n,E),S=i??"",A=$6(S),C=Array.from(m).some(k=>(k.props.value??"")==="");return v.useEffect(()=>{const k=E.current;if(!k)return;const N=window.HTMLSelectElement.prototype,B=Object.getOwnPropertyDescriptor(N,"value").set;if(A!==S&&B){const D=new Event("change",{bubbles:!0});B.call(k,S),k.dispatchEvent(D)}},[A,S]),b.jsxs(We.select,{"aria-hidden":!0,required:l,tabIndex:-1,name:d,autoComplete:h,disabled:c,form:p,onChange:k=>o(k.target.value),...t,style:{...Y2,...t.style},ref:T,defaultValue:S,children:[mf(i)&&!C?b.jsx("option",{value:""}):null,Array.from(m)]},_)});wA.displayName=CA;function H4(e){return typeof e=="function"}function mf(e){return e===""||e===void 0}function kA(e){const t=ha(e),n=v.useRef(""),r=v.useRef(0),i=v.useCallback(l=>{const c=n.current+l;t(c),(function d(h){n.current=h,window.clearTimeout(r.current),h!==""&&(r.current=window.setTimeout(()=>d(""),1e3))})(c)},[t]),o=v.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,o]}function NA(e,t,n){const i=t.length>1&&Array.from(t).every(h=>h===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let l=z4(e,Math.max(o,0));i.length===1&&(l=l.filter(h=>h!==n));const d=l.find(h=>h.textValue.toLowerCase().startsWith(i.toLowerCase()));return d!==n?d:void 0}function z4(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var F4="Separator",Fx="horizontal",$4=["horizontal","vertical"],RA=v.forwardRef((e,t)=>{const{decorative:n,orientation:r=Fx,...i}=e,o=V4(r)?r:Fx,c=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return b.jsx(We.div,{"data-orientation":o,...c,...i,ref:t})});RA.displayName=F4;function V4(e){return $4.includes(e)}var G4=RA,pf="Tabs",[q4]=es(pf,[YS]),OA=YS(),[Y4,Ug]=q4(pf),LA=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:o,orientation:l="horizontal",dir:c,activationMode:d="automatic",...h}=e,p=xg(c),[m,_]=ni({prop:r,onChange:i,defaultProp:o??"",caller:pf});return b.jsx(Y4,{scope:n,baseId:fa(),value:m,onValueChange:_,orientation:l,dir:p,activationMode:d,children:b.jsx(We.div,{dir:p,"data-orientation":l,...h,ref:t})})});LA.displayName=pf;var IA="TabsList",DA=v.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,o=Ug(IA,n),l=OA(n);return b.jsx(b4,{asChild:!0,...l,orientation:o.orientation,dir:o.dir,loop:r,children:b.jsx(We.div,{role:"tablist","aria-orientation":o.orientation,...i,ref:t})})});DA.displayName=IA;var MA="TabsTrigger",PA=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...o}=e,l=Ug(MA,n),c=OA(n),d=UA(l.baseId,r),h=HA(l.baseId,r),p=r===l.value;return b.jsx(E4,{asChild:!0,...c,focusable:!i,active:p,children:b.jsx(We.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":h,"data-state":p?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:d,...o,ref:t,onMouseDown:Ze(e.onMouseDown,m=>{!i&&m.button===0&&m.ctrlKey===!1?l.onValueChange(r):m.preventDefault()}),onKeyDown:Ze(e.onKeyDown,m=>{[" ","Enter"].includes(m.key)&&l.onValueChange(r)}),onFocus:Ze(e.onFocus,()=>{const m=l.activationMode!=="manual";!p&&!i&&m&&l.onValueChange(r)})})})});PA.displayName=MA;var BA="TabsContent",jA=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:o,...l}=e,c=Ug(BA,n),d=UA(c.baseId,r),h=HA(c.baseId,r),p=r===c.value,m=v.useRef(p);return v.useEffect(()=>{const _=requestAnimationFrame(()=>m.current=!1);return()=>cancelAnimationFrame(_)},[]),b.jsx(ts,{present:i||p,children:({present:_})=>b.jsx(We.div,{"data-state":p?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":d,hidden:!_,id:h,tabIndex:0,...l,ref:t,style:{...e.style,animationDuration:m.current?"0s":void 0},children:_&&o})})});jA.displayName=BA;function UA(e,t){return`${e}-trigger-${t}`}function HA(e,t){return`${e}-content-${t}`}var X4=LA,Q4=DA,W4=PA,K4=jA;const Z4=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},J4=(e,t)=>({classGroupId:e,validator:t}),zA=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Nd="-",$x=[],e5="arbitrary..",t5=e=>{const t=r5(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return n5(l);const c=l.split(Nd),d=c[0]===""&&c.length>1?1:0;return FA(c,d,t)},getConflictingClassGroupIds:(l,c)=>{if(c){const d=r[l],h=n[l];return d?h?Z4(h,d):d:h||$x}return n[l]||$x}}},FA=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],o=n.nextPart.get(i);if(o){const h=FA(e,t+1,o);if(h)return h}const l=n.validators;if(l===null)return;const c=t===0?e.join(Nd):e.slice(t).join(Nd),d=l.length;for(let h=0;h<d;h++){const p=l[h];if(p.validator(c))return p.classGroupId}},n5=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?e5+r:void 0})(),r5=e=>{const{theme:t,classGroups:n}=e;return a5(n,t)},a5=(e,t)=>{const n=zA();for(const r in e){const i=e[r];Hg(i,n,r,t)}return n},Hg=(e,t,n,r)=>{const i=e.length;for(let o=0;o<i;o++){const l=e[o];i5(l,t,n,r)}},i5=(e,t,n,r)=>{if(typeof e=="string"){s5(e,t,n);return}if(typeof e=="function"){o5(e,t,n,r);return}l5(e,t,n,r)},s5=(e,t,n)=>{const r=e===""?t:$A(t,e);r.classGroupId=n},o5=(e,t,n,r)=>{if(u5(e)){Hg(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(J4(n,e))},l5=(e,t,n,r)=>{const i=Object.entries(e),o=i.length;for(let l=0;l<o;l++){const[c,d]=i[l];Hg(d,$A(t,c),n,r)}},$A=(e,t)=>{let n=e;const r=t.split(Nd),i=r.length;for(let o=0;o<i;o++){const l=r[o];let c=n.nextPart.get(l);c||(c=zA(),n.nextPart.set(l,c)),n=c}return n},u5=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,c5=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const i=(o,l)=>{n[o]=l,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(o){let l=n[o];if(l!==void 0)return l;if((l=r[o])!==void 0)return i(o,l),l},set(o,l){o in n?n[o]=l:i(o,l)}}},T0="!",Vx=":",d5=[],Gx=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),f5=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const o=[];let l=0,c=0,d=0,h;const p=i.length;for(let S=0;S<p;S++){const A=i[S];if(l===0&&c===0){if(A===Vx){o.push(i.slice(d,S)),d=S+1;continue}if(A==="/"){h=S;continue}}A==="["?l++:A==="]"?l--:A==="("?c++:A===")"&&c--}const m=o.length===0?i:i.slice(d);let _=m,E=!1;m.endsWith(T0)?(_=m.slice(0,-1),E=!0):m.startsWith(T0)&&(_=m.slice(1),E=!0);const T=h&&h>d?h-d:void 0;return Gx(o,E,_,T)};if(t){const i=t+Vx,o=r;r=l=>l.startsWith(i)?o(l.slice(i.length)):Gx(d5,!1,l,void 0,!0)}if(n){const i=r;r=o=>n({className:o,parseClassName:i})}return r},h5=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let i=[];for(let o=0;o<n.length;o++){const l=n[o],c=l[0]==="[",d=t.has(l);c||d?(i.length>0&&(i.sort(),r.push(...i),i=[]),r.push(l)):i.push(l)}return i.length>0&&(i.sort(),r.push(...i)),r}},m5=e=>({cache:c5(e.cacheSize),parseClassName:f5(e),sortModifiers:h5(e),postfixLookupClassGroupIds:p5(e),...t5(e)}),p5=e=>{const t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let r=0;r<n.length;r++)t[n[r]]=!0;return t},g5=/\s+/,b5=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:o,postfixLookupClassGroupIds:l}=t,c=[],d=e.trim().split(g5);let h="";for(let p=d.length-1;p>=0;p-=1){const m=d[p],{isExternal:_,modifiers:E,hasImportantModifier:T,baseClassName:S,maybePostfixModifierPosition:A}=n(m);if(_){h=m+(h.length>0?" "+h:h);continue}let C=!!A,k;if(C){const z=S.substring(0,A);k=r(z);const G=k&&l[k]?r(S):void 0;G&&G!==k&&(k=G,C=!1)}else k=r(S);if(!k){if(!C){h=m+(h.length>0?" "+h:h);continue}if(k=r(S),!k){h=m+(h.length>0?" "+h:h);continue}C=!1}const N=E.length===0?"":E.length===1?E[0]:o(E).join(":"),M=T?N+T0:N,B=M+k;if(c.indexOf(B)>-1)continue;c.push(B);const D=i(k,C);for(let z=0;z<D.length;++z){const G=D[z];c.push(M+G)}h=m+(h.length>0?" "+h:h)}return h},E5=(...e)=>{let t=0,n,r,i="";for(;t<e.length;)(n=e[t++])&&(r=VA(n))&&(i&&(i+=" "),i+=r);return i},VA=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=VA(e[r]))&&(n&&(n+=" "),n+=t);return n},y5=(e,...t)=>{let n,r,i,o;const l=d=>{const h=t.reduce((p,m)=>m(p),e());return n=m5(h),r=n.cache.get,i=n.cache.set,o=c,c(d)},c=d=>{const h=r(d);if(h)return h;const p=b5(d,n);return i(d,p),p};return o=l,(...d)=>o(E5(...d))},_5=[],zt=e=>{const t=n=>n[e]||_5;return t.isThemeGetter=!0,t},GA=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,qA=/^\((?:(\w[\w-]*):)?(.+)\)$/i,x5=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,T5=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,v5=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,S5=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,A5=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,C5=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Va=e=>x5.test(e),ze=e=>!!e&&!Number.isNaN(Number(e)),wr=e=>!!e&&Number.isInteger(Number(e)),Tp=e=>e.endsWith("%")&&ze(e.slice(0,-1)),oa=e=>T5.test(e),YA=()=>!0,w5=e=>v5.test(e)&&!S5.test(e),zg=()=>!1,k5=e=>A5.test(e),N5=e=>C5.test(e),R5=e=>!ve(e)&&!Se(e),O5=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),L5=e=>ci(e,WA,zg),ve=e=>GA.test(e),Li=e=>ci(e,KA,w5),qx=e=>ci(e,H5,ze),I5=e=>ci(e,JA,YA),D5=e=>ci(e,ZA,zg),Yx=e=>ci(e,XA,zg),M5=e=>ci(e,QA,N5),Yc=e=>ci(e,eC,k5),Se=e=>qA.test(e),_l=e=>rs(e,KA),P5=e=>rs(e,ZA),Xx=e=>rs(e,XA),B5=e=>rs(e,WA),j5=e=>rs(e,QA),Xc=e=>rs(e,eC,!0),U5=e=>rs(e,JA,!0),ci=(e,t,n)=>{const r=GA.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},rs=(e,t,n=!1)=>{const r=qA.exec(e);return r?r[1]?t(r[1]):n:!1},XA=e=>e==="position"||e==="percentage",QA=e=>e==="image"||e==="url",WA=e=>e==="length"||e==="size"||e==="bg-size",KA=e=>e==="length",H5=e=>e==="number",ZA=e=>e==="family-name",JA=e=>e==="number"||e==="weight",eC=e=>e==="shadow",z5=()=>{const e=zt("color"),t=zt("font"),n=zt("text"),r=zt("font-weight"),i=zt("tracking"),o=zt("leading"),l=zt("breakpoint"),c=zt("container"),d=zt("spacing"),h=zt("radius"),p=zt("shadow"),m=zt("inset-shadow"),_=zt("text-shadow"),E=zt("drop-shadow"),T=zt("blur"),S=zt("perspective"),A=zt("aspect"),C=zt("ease"),k=zt("animate"),N=()=>["auto","avoid","all","avoid-page","page","left","right","column"],M=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],B=()=>[...M(),Se,ve],D=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto","contain","none"],G=()=>[Se,ve,d],ie=()=>[Va,"full","auto",...G()],V=()=>[wr,"none","subgrid",Se,ve],X=()=>["auto",{span:["full",wr,Se,ve]},wr,Se,ve],J=()=>[wr,"auto",Se,ve],he=()=>["auto","min","max","fr",Se,ve],ue=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],re=()=>["start","end","center","stretch","center-safe","end-safe"],U=()=>["auto",...G()],ee=()=>[Va,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...G()],ce=()=>[Va,"screen","full","dvw","lvw","svw","min","max","fit",...G()],xe=()=>[Va,"screen","full","lh","dvh","lvh","svh","min","max","fit",...G()],O=()=>[e,Se,ve],F=()=>[...M(),Xx,Yx,{position:[Se,ve]}],te=()=>["no-repeat",{repeat:["","x","y","space","round"]}],P=()=>["auto","cover","contain",B5,L5,{size:[Se,ve]}],ge=()=>[Tp,_l,Li],Ee=()=>["","none","full",h,Se,ve],ye=()=>["",ze,_l,Li],be=()=>["solid","dashed","dotted","double"],ke=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Te=()=>[ze,Tp,Xx,Yx],De=()=>["","none",T,Se,ve],je=()=>["none",ze,Se,ve],Je=()=>["none",ze,Se,ve],Nt=()=>[ze,Se,ve],it=()=>[Va,"full",...G()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[oa],breakpoint:[oa],color:[YA],container:[oa],"drop-shadow":[oa],ease:["in","out","in-out"],font:[R5],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[oa],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[oa],shadow:[oa],spacing:["px",ze],text:[oa],"text-shadow":[oa],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Va,ve,Se,A]}],container:["container"],"container-type":[{"@container":["","normal","size",Se,ve]}],"container-named":[O5],columns:[{columns:[ze,ve,Se,c]}],"break-after":[{"break-after":N()}],"break-before":[{"break-before":N()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:B()}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ie()}],"inset-x":[{"inset-x":ie()}],"inset-y":[{"inset-y":ie()}],start:[{"inset-s":ie(),start:ie()}],end:[{"inset-e":ie(),end:ie()}],"inset-bs":[{"inset-bs":ie()}],"inset-be":[{"inset-be":ie()}],top:[{top:ie()}],right:[{right:ie()}],bottom:[{bottom:ie()}],left:[{left:ie()}],visibility:["visible","invisible","collapse"],z:[{z:[wr,"auto",Se,ve]}],basis:[{basis:[Va,"full","auto",c,...G()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ze,Va,"auto","initial","none",ve]}],grow:[{grow:["",ze,Se,ve]}],shrink:[{shrink:["",ze,Se,ve]}],order:[{order:[wr,"first","last","none",Se,ve]}],"grid-cols":[{"grid-cols":V()}],"col-start-end":[{col:X()}],"col-start":[{"col-start":J()}],"col-end":[{"col-end":J()}],"grid-rows":[{"grid-rows":V()}],"row-start-end":[{row:X()}],"row-start":[{"row-start":J()}],"row-end":[{"row-end":J()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":he()}],"auto-rows":[{"auto-rows":he()}],gap:[{gap:G()}],"gap-x":[{"gap-x":G()}],"gap-y":[{"gap-y":G()}],"justify-content":[{justify:[...ue(),"normal"]}],"justify-items":[{"justify-items":[...re(),"normal"]}],"justify-self":[{"justify-self":["auto",...re()]}],"align-content":[{content:["normal",...ue()]}],"align-items":[{items:[...re(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...re(),{baseline:["","last"]}]}],"place-content":[{"place-content":ue()}],"place-items":[{"place-items":[...re(),"baseline"]}],"place-self":[{"place-self":["auto",...re()]}],p:[{p:G()}],px:[{px:G()}],py:[{py:G()}],ps:[{ps:G()}],pe:[{pe:G()}],pbs:[{pbs:G()}],pbe:[{pbe:G()}],pt:[{pt:G()}],pr:[{pr:G()}],pb:[{pb:G()}],pl:[{pl:G()}],m:[{m:U()}],mx:[{mx:U()}],my:[{my:U()}],ms:[{ms:U()}],me:[{me:U()}],mbs:[{mbs:U()}],mbe:[{mbe:U()}],mt:[{mt:U()}],mr:[{mr:U()}],mb:[{mb:U()}],ml:[{ml:U()}],"space-x":[{"space-x":G()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":G()}],"space-y-reverse":["space-y-reverse"],size:[{size:ee()}],"inline-size":[{inline:["auto",...ce()]}],"min-inline-size":[{"min-inline":["auto",...ce()]}],"max-inline-size":[{"max-inline":["none",...ce()]}],"block-size":[{block:["auto",...xe()]}],"min-block-size":[{"min-block":["auto",...xe()]}],"max-block-size":[{"max-block":["none",...xe()]}],w:[{w:[c,"screen",...ee()]}],"min-w":[{"min-w":[c,"screen","none",...ee()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[l]},...ee()]}],h:[{h:["screen","lh",...ee()]}],"min-h":[{"min-h":["screen","lh","none",...ee()]}],"max-h":[{"max-h":["screen","lh",...ee()]}],"font-size":[{text:["base",n,_l,Li]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,U5,I5]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Tp,ve]}],"font-family":[{font:[P5,D5,t]}],"font-features":[{"font-features":[ve]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,Se,ve]}],"line-clamp":[{"line-clamp":[ze,"none",Se,qx]}],leading:[{leading:[o,...G()]}],"list-image":[{"list-image":["none",Se,ve]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Se,ve]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:O()}],"text-color":[{text:O()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...be(),"wavy"]}],"text-decoration-thickness":[{decoration:[ze,"from-font","auto",Se,Li]}],"text-decoration-color":[{decoration:O()}],"underline-offset":[{"underline-offset":[ze,"auto",Se,ve]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:G()}],"tab-size":[{tab:[wr,Se,ve]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Se,ve]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Se,ve]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:F()}],"bg-repeat":[{bg:te()}],"bg-size":[{bg:P()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},wr,Se,ve],radial:["",Se,ve],conic:[wr,Se,ve]},j5,M5]}],"bg-color":[{bg:O()}],"gradient-from-pos":[{from:ge()}],"gradient-via-pos":[{via:ge()}],"gradient-to-pos":[{to:ge()}],"gradient-from":[{from:O()}],"gradient-via":[{via:O()}],"gradient-to":[{to:O()}],rounded:[{rounded:Ee()}],"rounded-s":[{"rounded-s":Ee()}],"rounded-e":[{"rounded-e":Ee()}],"rounded-t":[{"rounded-t":Ee()}],"rounded-r":[{"rounded-r":Ee()}],"rounded-b":[{"rounded-b":Ee()}],"rounded-l":[{"rounded-l":Ee()}],"rounded-ss":[{"rounded-ss":Ee()}],"rounded-se":[{"rounded-se":Ee()}],"rounded-ee":[{"rounded-ee":Ee()}],"rounded-es":[{"rounded-es":Ee()}],"rounded-tl":[{"rounded-tl":Ee()}],"rounded-tr":[{"rounded-tr":Ee()}],"rounded-br":[{"rounded-br":Ee()}],"rounded-bl":[{"rounded-bl":Ee()}],"border-w":[{border:ye()}],"border-w-x":[{"border-x":ye()}],"border-w-y":[{"border-y":ye()}],"border-w-s":[{"border-s":ye()}],"border-w-e":[{"border-e":ye()}],"border-w-bs":[{"border-bs":ye()}],"border-w-be":[{"border-be":ye()}],"border-w-t":[{"border-t":ye()}],"border-w-r":[{"border-r":ye()}],"border-w-b":[{"border-b":ye()}],"border-w-l":[{"border-l":ye()}],"divide-x":[{"divide-x":ye()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ye()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...be(),"hidden","none"]}],"divide-style":[{divide:[...be(),"hidden","none"]}],"border-color":[{border:O()}],"border-color-x":[{"border-x":O()}],"border-color-y":[{"border-y":O()}],"border-color-s":[{"border-s":O()}],"border-color-e":[{"border-e":O()}],"border-color-bs":[{"border-bs":O()}],"border-color-be":[{"border-be":O()}],"border-color-t":[{"border-t":O()}],"border-color-r":[{"border-r":O()}],"border-color-b":[{"border-b":O()}],"border-color-l":[{"border-l":O()}],"divide-color":[{divide:O()}],"outline-style":[{outline:[...be(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ze,Se,ve]}],"outline-w":[{outline:["",ze,_l,Li]}],"outline-color":[{outline:O()}],shadow:[{shadow:["","none",p,Xc,Yc]}],"shadow-color":[{shadow:O()}],"inset-shadow":[{"inset-shadow":["none",m,Xc,Yc]}],"inset-shadow-color":[{"inset-shadow":O()}],"ring-w":[{ring:ye()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:O()}],"ring-offset-w":[{"ring-offset":[ze,Li]}],"ring-offset-color":[{"ring-offset":O()}],"inset-ring-w":[{"inset-ring":ye()}],"inset-ring-color":[{"inset-ring":O()}],"text-shadow":[{"text-shadow":["none",_,Xc,Yc]}],"text-shadow-color":[{"text-shadow":O()}],opacity:[{opacity:[ze,Se,ve]}],"mix-blend":[{"mix-blend":[...ke(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ke()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ze]}],"mask-image-linear-from-pos":[{"mask-linear-from":Te()}],"mask-image-linear-to-pos":[{"mask-linear-to":Te()}],"mask-image-linear-from-color":[{"mask-linear-from":O()}],"mask-image-linear-to-color":[{"mask-linear-to":O()}],"mask-image-t-from-pos":[{"mask-t-from":Te()}],"mask-image-t-to-pos":[{"mask-t-to":Te()}],"mask-image-t-from-color":[{"mask-t-from":O()}],"mask-image-t-to-color":[{"mask-t-to":O()}],"mask-image-r-from-pos":[{"mask-r-from":Te()}],"mask-image-r-to-pos":[{"mask-r-to":Te()}],"mask-image-r-from-color":[{"mask-r-from":O()}],"mask-image-r-to-color":[{"mask-r-to":O()}],"mask-image-b-from-pos":[{"mask-b-from":Te()}],"mask-image-b-to-pos":[{"mask-b-to":Te()}],"mask-image-b-from-color":[{"mask-b-from":O()}],"mask-image-b-to-color":[{"mask-b-to":O()}],"mask-image-l-from-pos":[{"mask-l-from":Te()}],"mask-image-l-to-pos":[{"mask-l-to":Te()}],"mask-image-l-from-color":[{"mask-l-from":O()}],"mask-image-l-to-color":[{"mask-l-to":O()}],"mask-image-x-from-pos":[{"mask-x-from":Te()}],"mask-image-x-to-pos":[{"mask-x-to":Te()}],"mask-image-x-from-color":[{"mask-x-from":O()}],"mask-image-x-to-color":[{"mask-x-to":O()}],"mask-image-y-from-pos":[{"mask-y-from":Te()}],"mask-image-y-to-pos":[{"mask-y-to":Te()}],"mask-image-y-from-color":[{"mask-y-from":O()}],"mask-image-y-to-color":[{"mask-y-to":O()}],"mask-image-radial":[{"mask-radial":[Se,ve]}],"mask-image-radial-from-pos":[{"mask-radial-from":Te()}],"mask-image-radial-to-pos":[{"mask-radial-to":Te()}],"mask-image-radial-from-color":[{"mask-radial-from":O()}],"mask-image-radial-to-color":[{"mask-radial-to":O()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":M()}],"mask-image-conic-pos":[{"mask-conic":[ze]}],"mask-image-conic-from-pos":[{"mask-conic-from":Te()}],"mask-image-conic-to-pos":[{"mask-conic-to":Te()}],"mask-image-conic-from-color":[{"mask-conic-from":O()}],"mask-image-conic-to-color":[{"mask-conic-to":O()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:F()}],"mask-repeat":[{mask:te()}],"mask-size":[{mask:P()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Se,ve]}],filter:[{filter:["","none",Se,ve]}],blur:[{blur:De()}],brightness:[{brightness:[ze,Se,ve]}],contrast:[{contrast:[ze,Se,ve]}],"drop-shadow":[{"drop-shadow":["","none",E,Xc,Yc]}],"drop-shadow-color":[{"drop-shadow":O()}],grayscale:[{grayscale:["",ze,Se,ve]}],"hue-rotate":[{"hue-rotate":[ze,Se,ve]}],invert:[{invert:["",ze,Se,ve]}],saturate:[{saturate:[ze,Se,ve]}],sepia:[{sepia:["",ze,Se,ve]}],"backdrop-filter":[{"backdrop-filter":["","none",Se,ve]}],"backdrop-blur":[{"backdrop-blur":De()}],"backdrop-brightness":[{"backdrop-brightness":[ze,Se,ve]}],"backdrop-contrast":[{"backdrop-contrast":[ze,Se,ve]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ze,Se,ve]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ze,Se,ve]}],"backdrop-invert":[{"backdrop-invert":["",ze,Se,ve]}],"backdrop-opacity":[{"backdrop-opacity":[ze,Se,ve]}],"backdrop-saturate":[{"backdrop-saturate":[ze,Se,ve]}],"backdrop-sepia":[{"backdrop-sepia":["",ze,Se,ve]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":G()}],"border-spacing-x":[{"border-spacing-x":G()}],"border-spacing-y":[{"border-spacing-y":G()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Se,ve]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ze,"initial",Se,ve]}],ease:[{ease:["linear","initial",C,Se,ve]}],delay:[{delay:[ze,Se,ve]}],animate:[{animate:["none",k,Se,ve]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,Se,ve]}],"perspective-origin":[{"perspective-origin":B()}],rotate:[{rotate:je()}],"rotate-x":[{"rotate-x":je()}],"rotate-y":[{"rotate-y":je()}],"rotate-z":[{"rotate-z":je()}],scale:[{scale:Je()}],"scale-x":[{"scale-x":Je()}],"scale-y":[{"scale-y":Je()}],"scale-z":[{"scale-z":Je()}],"scale-3d":["scale-3d"],skew:[{skew:Nt()}],"skew-x":[{"skew-x":Nt()}],"skew-y":[{"skew-y":Nt()}],transform:[{transform:[Se,ve,"","none","gpu","cpu"]}],"transform-origin":[{origin:B()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:it()}],"translate-x":[{"translate-x":it()}],"translate-y":[{"translate-y":it()}],"translate-z":[{"translate-z":it()}],"translate-none":["translate-none"],zoom:[{zoom:[wr,Se,ve]}],accent:[{accent:O()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:O()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Se,ve]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":O()}],"scrollbar-track-color":[{"scrollbar-track":O()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":G()}],"scroll-mx":[{"scroll-mx":G()}],"scroll-my":[{"scroll-my":G()}],"scroll-ms":[{"scroll-ms":G()}],"scroll-me":[{"scroll-me":G()}],"scroll-mbs":[{"scroll-mbs":G()}],"scroll-mbe":[{"scroll-mbe":G()}],"scroll-mt":[{"scroll-mt":G()}],"scroll-mr":[{"scroll-mr":G()}],"scroll-mb":[{"scroll-mb":G()}],"scroll-ml":[{"scroll-ml":G()}],"scroll-p":[{"scroll-p":G()}],"scroll-px":[{"scroll-px":G()}],"scroll-py":[{"scroll-py":G()}],"scroll-ps":[{"scroll-ps":G()}],"scroll-pe":[{"scroll-pe":G()}],"scroll-pbs":[{"scroll-pbs":G()}],"scroll-pbe":[{"scroll-pbe":G()}],"scroll-pt":[{"scroll-pt":G()}],"scroll-pr":[{"scroll-pr":G()}],"scroll-pb":[{"scroll-pb":G()}],"scroll-pl":[{"scroll-pl":G()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Se,ve]}],fill:[{fill:["none",...O()]}],"stroke-w":[{stroke:[ze,_l,Li,qx]}],stroke:[{stroke:["none",...O()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Fg=y5(z5);function we(...e){return Fg(tf(e))}const F5=bg("inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function wt({className:e,variant:t="default",size:n="default",asChild:r=!1,...i}){const o=r?q2:"button";return b.jsx(o,{"data-slot":"button","data-variant":t,"data-size":n,className:we(F5({variant:t,size:n,className:e})),...i})}const $5={damping:.7,stiffness:.05,mass:1.25},V5=70,G5=1e3/60,q5=350;let gf=!1;globalThis.document?.addEventListener("mousedown",()=>{gf=!0});globalThis.document?.addEventListener("mouseup",()=>{gf=!1});globalThis.document?.addEventListener("click",()=>{gf=!1});const Y5=(e={})=>{const[t,n]=v.useState(!1),[r,i]=v.useState(e.initial!==!1),[o,l]=v.useState(!1),c=v.useRef(null);c.current=e;const d=v.useCallback(()=>{if(!gf)return!1;const k=window.getSelection();if(!k||!k.rangeCount)return!1;const N=k.getRangeAt(0);return N.commonAncestorContainer.contains(A.current)||A.current?.contains(N.commonAncestorContainer)},[]),h=v.useCallback(k=>{m.isAtBottom=k,i(k)},[]),p=v.useCallback(k=>{m.escapedFromLock=k,n(k)},[]),m=v.useMemo(()=>{let k;return{escapedFromLock:t,isAtBottom:r,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return A.current?.scrollTop??0},set scrollTop(N){if(A.current){const{scrollBehavior:M}=getComputedStyle(A.current);M!=="auto"&&(A.current.style.scrollBehavior="auto"),A.current.scrollTop=N,m.ignoreScrollToTop=A.current.scrollTop,M!=="auto"&&(A.current.style.scrollBehavior=M)}},get targetScrollTop(){return!A.current||!C.current?0:A.current.scrollHeight-1-A.current.clientHeight},get calculatedTargetScrollTop(){if(!A.current||!C.current)return 0;const{targetScrollTop:N}=this;if(!e.targetScrollTop)return N;if(k?.targetScrollTop===N)return k.calculatedScrollTop;const M=Math.max(Math.min(e.targetScrollTop(N,{scrollElement:A.current,contentElement:C.current}),N),0);return k={targetScrollTop:N,calculatedScrollTop:M},requestAnimationFrame(()=>{k=void 0}),M},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=V5}}},[]),_=v.useCallback((k={})=>{typeof k=="string"&&(k={animation:k}),k.preserveScrollPosition||h(!0);const N=Date.now()+(Number(k.wait)||0),M=Sp(c.current,k.animation),{ignoreEscapes:B=!1}=k;let D,z=m.calculatedTargetScrollTop;k.duration instanceof Promise?k.duration.finally(()=>{D=Date.now()}):D=N+(k.duration??0);const G=async()=>{const ie=new Promise(requestAnimationFrame).then(()=>{if(!m.isAtBottom)return m.animation=void 0,!1;const{scrollTop:V}=m,X=performance.now(),J=(X-(m.lastTick??X))/G5;if(m.animation||(m.animation={behavior:M,promise:ie,ignoreEscapes:B}),m.animation.behavior===M&&(m.lastTick=X),d()||N>Date.now())return G();if(V<Math.min(z,m.calculatedTargetScrollTop)){if(m.animation?.behavior===M){if(M==="instant")return m.scrollTop=m.calculatedTargetScrollTop,G();m.velocity=(M.damping*m.velocity+M.stiffness*m.scrollDifference)/M.mass,m.accumulated+=m.velocity*J,m.scrollTop+=m.accumulated,m.scrollTop!==V&&(m.accumulated=0)}return G()}return D>Date.now()?(z=m.calculatedTargetScrollTop,G()):(m.animation=void 0,m.scrollTop<m.calculatedTargetScrollTop?_({animation:Sp(c.current,c.current.resize),ignoreEscapes:B,duration:Math.max(0,D-Date.now())||void 0}):m.isAtBottom)});return ie.then(V=>(requestAnimationFrame(()=>{m.animation||(m.lastTick=void 0,m.velocity=0)}),V))};return k.wait!==!0&&(m.animation=void 0),m.animation?.behavior===M?m.animation.promise:G()},[h,d,m]),E=v.useCallback(()=>{p(!0),h(!1)},[p,h]),T=v.useCallback(({target:k})=>{if(k!==A.current)return;const{scrollTop:N,ignoreScrollToTop:M}=m;let{lastScrollTop:B=N}=m;m.lastScrollTop=N,m.ignoreScrollToTop=void 0,M&&M>N&&(B=M),l(m.isNearBottom),setTimeout(()=>{if(m.resizeDifference||N===M)return;if(d()){p(!0),h(!1);return}const D=N>B,z=N<B;if(m.animation?.ignoreEscapes){m.scrollTop=B;return}z&&(p(!0),h(!1)),D&&p(!1),!m.escapedFromLock&&m.isNearBottom&&h(!0)},1)},[p,h,d,m]),S=v.useCallback(({target:k,deltaY:N})=>{let M=k;for(;!["scroll","auto"].includes(getComputedStyle(M).overflow);){if(!M.parentElement)return;M=M.parentElement}M===A.current&&N<0&&A.current.scrollHeight>A.current.clientHeight&&!m.animation?.ignoreEscapes&&(p(!0),h(!1))},[p,h,m]),A=Qx(k=>{A.current?.removeEventListener("scroll",T),A.current?.removeEventListener("wheel",S),k?.addEventListener("scroll",T,{passive:!0}),k?.addEventListener("wheel",S,{passive:!0})},[]),C=Qx(k=>{if(m.resizeObserver?.disconnect(),m.resizeObserver=void 0,!k)return;let N;m.resizeObserver=new ResizeObserver(([M])=>{const{height:B}=M.contentRect,D=B-(N??B);if(m.resizeDifference=D,m.scrollTop>m.targetScrollTop&&(m.scrollTop=m.targetScrollTop),l(m.isNearBottom),D>=0){const z=Sp(c.current,N?c.current.resize:c.current.initial);_({animation:z,wait:!0,preserveScrollPosition:!0,duration:z==="instant"?void 0:q5})}else m.isNearBottom&&(p(!1),h(!0));N=B,requestAnimationFrame(()=>{setTimeout(()=>{m.resizeDifference===D&&(m.resizeDifference=0)},1)})}),m.resizeObserver?.observe(k)},[]);return{contentRef:C,scrollRef:A,scrollToBottom:_,stopScroll:E,isAtBottom:r||o,isNearBottom:o,escapedFromLock:t,state:m}};function Qx(e,t){const n=v.useCallback(r=>(n.current=r,e(r)),t);return n}const vp=new Map;function Sp(...e){const t={...$5};let n=!1;for(const i of e){if(i==="instant"){n=!0;continue}typeof i=="object"&&(n=!1,t.damping=i.damping??t.damping,t.stiffness=i.stiffness??t.stiffness,t.mass=i.mass??t.mass)}const r=JSON.stringify(t);return vp.has(r)||vp.set(r,Object.freeze(t)),n?"instant":vp.get(r)}const tC=v.createContext(null),X5=typeof window<"u"?v.useLayoutEffect:v.useEffect;function Rd({instance:e,children:t,resize:n,initial:r,mass:i,damping:o,stiffness:l,targetScrollTop:c,contextRef:d,...h}){const p=v.useRef(null),m=v.useCallback((B,D)=>(M?.targetScrollTop??c)?.(B,D)??B,[c]),_=Y5({mass:i,damping:o,stiffness:l,resize:n,initial:r,targetScrollTop:m}),{scrollRef:E,contentRef:T,scrollToBottom:S,stopScroll:A,isAtBottom:C,escapedFromLock:k,state:N}=e??_,M=v.useMemo(()=>({scrollToBottom:S,stopScroll:A,scrollRef:E,isAtBottom:C,escapedFromLock:k,contentRef:T,state:N,get targetScrollTop(){return p.current},set targetScrollTop(B){p.current=B}}),[S,C,T,E,A,k,N]);return v.useImperativeHandle(d,()=>M,[M]),X5(()=>{E.current&&getComputedStyle(E.current).overflow==="visible"&&(E.current.style.overflow="auto")},[]),v.createElement(tC.Provider,{value:M},v.createElement("div",{...h},typeof t=="function"?t(M):t))}(function(e){function t({children:n,scrollClassName:r,...i}){const o=nC();return v.createElement("div",{ref:o.scrollRef,style:{height:"100%",width:"100%",scrollbarGutter:"stable both-edges"},className:r},v.createElement("div",{...i,ref:o.contentRef},typeof n=="function"?n(o):n))}e.Content=t})(Rd||(Rd={}));function nC(){const e=v.useContext(tC);if(!e)throw new Error("use-stick-to-bottom component context must be used within a StickToBottom component");return e}const Q5=({className:e,...t})=>b.jsx(Rd,{className:we("relative flex-1 overflow-y-hidden",e),initial:"smooth",resize:"smooth",role:"log",...t}),W5=({className:e,...t})=>b.jsx(Rd.Content,{className:we("flex flex-col gap-8 p-4",e),...t}),K5=({className:e,...t})=>{const{isAtBottom:n,scrollToBottom:r}=nC(),i=v.useCallback(()=>{r()},[r]);return!n&&b.jsx(wt,{className:we("absolute bottom-4 left-[50%] translate-x-[-50%] rounded-full",e),onClick:i,size:"icon",type:"button",variant:"outline",...t,children:b.jsx(pL,{className:"size-4"})})},Z5=({size:e=16})=>b.jsxs("svg",{height:e,strokeLinejoin:"round",style:{color:"currentcolor"},viewBox:"0 0 16 16",width:e,children:[b.jsx("title",{children:"Loader"}),b.jsxs("g",{clipPath:"url(#clip0_2393_1490)",children:[b.jsx("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),b.jsx("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),b.jsx("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),b.jsx("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),b.jsx("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),b.jsx("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),b.jsx("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),b.jsx("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),b.jsx("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),b.jsx("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),b.jsx("defs",{children:b.jsx("clipPath",{id:"clip0_2393_1490",children:b.jsx("rect",{fill:"white",height:"16",width:"16"})})})]}),Wx=({className:e,size:t=16,...n})=>b.jsx("div",{className:we("inline-flex animate-spin items-center justify-center",e),...n,children:b.jsx(Z5,{size:t})}),J5=({children:e,as:t="p",className:n,duration:r=2,spread:i=2})=>{const o=v.useMemo(()=>(e?.length??0)*i,[e,i]);return v.createElement(t,{className:we("relative inline-block bg-[length:250%_100%,auto] bg-clip-text text-transparent","[--bg:linear-gradient(90deg,#0000_calc(50%-var(--spread)),var(--color-background),#0000_calc(50%+var(--spread)))] [background-repeat:no-repeat,padding-box]","animate-shimmer",n),style:{"--spread":`${o}px`,backgroundImage:"var(--bg), linear-gradient(var(--color-muted-foreground), var(--color-muted-foreground))",animationDuration:`${r}s`}},e)},rC=v.memo(J5),eM=({base64:e,uint8Array:t,mediaType:n,...r})=>b.jsx("img",{...r,alt:r.alt,className:we("h-auto max-w-full overflow-hidden rounded-md",r.className),src:`data:${n};base64,${e}`}),$g=({className:e,from:t,...n})=>b.jsx("div",{className:we("group flex w-full max-w-[95%] flex-col gap-2",t==="user"?"is-user ml-auto justify-end":"is-assistant",e),...n}),Vg=({children:e,className:t,...n})=>b.jsx("div",{className:we("is-user:dark flex w-fit max-w-full min-w-0 flex-col gap-2 overflow-hidden text-sm","group-[.is-user]:ml-auto group-[.is-user]:rounded-lg group-[.is-user]:bg-secondary group-[.is-user]:px-4 group-[.is-user]:py-3 group-[.is-user]:text-foreground","group-[.is-assistant]:text-foreground",t),...n,children:e});function aC({...e}){return b.jsx(DI,{"data-slot":"collapsible",...e})}function iC({...e}){return b.jsx(K2,{"data-slot":"collapsible-trigger",...e})}function sC({...e}){return b.jsx(Z2,{"data-slot":"collapsible-content",...e})}const tM="modulepreload",nM=function(e){return"/"+e},Kx={},L=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let d=function(h){return Promise.all(h.map(p=>Promise.resolve(p).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),c=l?.nonce||l?.getAttribute("nonce");i=d(n.map(h=>{if(h=nM(h),h in Kx)return;Kx[h]=!0;const p=h.endsWith(".css"),m=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${m}`))return;const _=document.createElement("link");if(_.rel=p?"stylesheet":tM,p||(_.as="script"),_.crossOrigin="",_.href=h,c&&_.setAttribute("nonce",c),document.head.appendChild(_),p)return new Promise((E,T)=>{_.addEventListener("load",E),_.addEventListener("error",()=>T(new Error(`Unable to preload CSS for ${h}`)))})}))}function o(l){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=l,window.dispatchEvent(c),!c.defaultPrevented)throw l}return i.then(l=>{for(const c of l||[])c.status==="rejected"&&o(c.reason);return t().catch(o)})},bf=(function(e){if(e==null)return sM;if(typeof e=="function")return Ef(e);if(typeof e=="object")return Array.isArray(e)?rM(e):aM(e);if(typeof e=="string")return iM(e);throw new Error("Expected function, string, or object as test")});function rM(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=bf(e[n]);return Ef(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function aM(e){const t=e;return Ef(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function iM(e){return Ef(t);function t(n){return n&&n.type===e}}function Ef(e){return t;function t(n,r,i){return!!(oM(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function sM(){return!0}function oM(e){return e!==null&&typeof e=="object"&&"type"in e}const oC=[],Ol=!0,v0=!1,no="skip";function Gg(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=bf(i),l=r?-1:1;c(e,void 0,[])();function c(d,h,p){const m=d&&typeof d=="object"?d:{};if(typeof m.type=="string"){const E=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(_,"name",{value:"node ("+(d.type+(E?"<"+E+">":""))+")"})}return _;function _(){let E=oC,T,S,A;if((!t||o(d,h,p[p.length-1]||void 0))&&(E=lM(n(d,p)),E[0]===v0))return E;if("children"in d&&d.children){const C=d;if(C.children&&E[0]!==no)for(S=(r?C.children.length:-1)+l,A=p.concat(C);S>-1&&S<C.children.length;){const k=C.children[S];if(T=c(k,S,A)(),T[0]===v0)return T;S=typeof T[1]=="number"?T[1]:S+l}}return E}}}function lM(e){return Array.isArray(e)?e:typeof e=="number"?[Ol,e]:e==null?oC:[e]}function Pr(e,t,n,r){let i,o,l;typeof t=="function"&&typeof n!="function"?(o=void 0,l=t,i=n):(o=t,l=n,i=r),Gg(e,o,c,i);function c(d,h){const p=h[h.length-1],m=p?p.children.indexOf(d):void 0;return l(d,m,p)}}const fo={indicator:"indicator",textOnly:"text-only",remove:"remove"};function uM({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:r=!1,allowedProtocols:i=[],blockedImageClass:o="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:l="text-gray-500",linkBlockPolicy:c=fo.indicator,imageBlockPolicy:d=fo.indicator}){const h=t.length&&!t.every(m=>m==="*"),p=n.length&&!n.every(m=>m==="*");if(!e&&(h||p))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return m=>{const _=pM(e,t,n,r,i,o,l,c,d);lC(m),Pr(m,_)}}function Zx(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 cM(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const dM=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),fM=new Set(["javascript:","data:","file:","vbscript:"]);function Jx(e,t,n,r=!1,i=!1,o=[]){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 p=e.substring(5);if(p&&p.length>0&&p!=="invalid")return e}}catch{return null}return null}const l=Zx(e,n);if(!l||fM.has(l.protocol)||!(dM.has(l.protocol)||o.includes(l.protocol)||o.includes("*")))return null;if(l.protocol==="mailto:"||!l.protocol.match(/^https?:$/))return l.href;const d=cM(e);return l&&t.some(h=>{const p=Zx(h,n);return!p||p.origin!==l.origin?!1:l.href.startsWith(p.href)})?d?l.pathname+l.search+l.hash:l.href:t.includes("*")?l.protocol!=="https:"&&l.protocol!=="http:"?null:d?l.pathname+l.search+l.hash:l.href:null}function lC(e){if("children"in e&&Array.isArray(e.children)){e.children=e.children.filter(t=>t!=null);for(const t of e.children)lC(t)}}const Ap=Symbol("node-seen");function hM(e,t,n){return t===fo.remove?{type:"remove"}:t===fo.textOnly?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[...e.children]}}:{type:"replace",element:{type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(e.properties.href),class:n},children:[...e.children,{type:"text",value:" [blocked]"}]}}}function mM(e,t,n){if(t===fo.remove)return{type:"remove"};if(t===fo.textOnly){const r=String(e.properties.alt||"");return r?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[{type:"text",value:r}]}}:{type:"remove"}}return{type:"replace",element:{type:"element",tagName:"span",properties:{class:n},children:[{type:"text",value:"[Image blocked: "+String(e.properties.alt||"No description")+"]"}]}}}const pM=(e,t,n,r,i,o,l,c,d)=>{const h=(p,m,_)=>{if(p.type!=="element"||p[Ap])return Ol;if(p.tagName==="a"){const E=Jx(p.properties.href,t,e,!1,!1,i);if(E===null){if(p[Ap]=!0,Pr(p,h),_&&typeof m=="number"){const T=hM(p,c,l);if(T.type==="remove")return _.children.splice(m,1),[no,m];_.children[m]=T.element}return no}else return p.properties.href=E,p.properties.target="_blank",p.properties.rel="noopener noreferrer",Ol}if(p.tagName==="img"){const E=Jx(p.properties.src,n,e,r,!0,i);if(E===null){if(p[Ap]=!0,Pr(p,h),_&&typeof m=="number"){const T=mM(p,d,o);if(T.type==="remove")return _.children.splice(m,1),[no,m];_.children[m]=T.element}return no}else return p.properties.src=E,Ol}return Ol};return h},uC=-1,yf=0,Pl=1,Od=2,qg=3,Yg=4,Xg=5,Qg=6,cC=7,dC=8,gM=typeof self=="object"?self:globalThis,eT=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new gM[e](t)},bM=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,l]=t[i];switch(o){case yf:case uC:return n(l,i);case Pl:{const c=n([],i);for(const d of l)c.push(r(d));return c}case Od:{const c=n({},i);for(const[d,h]of l)c[r(d)]=r(h);return c}case qg:return n(new Date(l),i);case Yg:{const{source:c,flags:d}=l;return n(new RegExp(c,d),i)}case Xg:{const c=n(new Map,i);for(const[d,h]of l)c.set(r(d),r(h));return c}case Qg:{const c=n(new Set,i);for(const d of l)c.add(r(d));return c}case cC:{const{name:c,message:d}=l;return n(eT(c,d),i)}case dC:return n(BigInt(l),i);case"BigInt":return n(Object(BigInt(l)),i);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:c}=new Uint8Array(l);return n(new DataView(c),l)}}return n(eT(o,l),i)};return r},tT=e=>bM(new Map,e)(0),Pi="",{toString:EM}={},{keys:yM}=Object,xl=e=>{const t=typeof e;if(t!=="object"||!e)return[yf,t];const n=EM.call(e).slice(8,-1);switch(n){case"Array":return[Pl,Pi];case"Object":return[Od,Pi];case"Date":return[qg,Pi];case"RegExp":return[Yg,Pi];case"Map":return[Xg,Pi];case"Set":return[Qg,Pi];case"DataView":return[Pl,n]}return n.includes("Array")?[Pl,n]:n.includes("Error")?[cC,n]:[Od,n]},Qc=([e,t])=>e===yf&&(t==="function"||t==="symbol"),_M=(e,t,n,r)=>{const i=(l,c)=>{const d=r.push(l)-1;return n.set(c,d),d},o=l=>{if(n.has(l))return n.get(l);let[c,d]=xl(l);switch(c){case yf:{let p=l;switch(d){case"bigint":c=dC,p=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);p=null;break;case"undefined":return i([uC],l)}return i([c,p],l)}case Pl:{if(d){let _=l;return d==="DataView"?_=new Uint8Array(l.buffer):d==="ArrayBuffer"&&(_=new Uint8Array(l)),i([d,[..._]],l)}const p=[],m=i([c,p],l);for(const _ of l)p.push(o(_));return m}case Od:{if(d)switch(d){case"BigInt":return i([d,l.toString()],l);case"Boolean":case"Number":case"String":return i([d,l.valueOf()],l)}if(t&&"toJSON"in l)return o(l.toJSON());const p=[],m=i([c,p],l);for(const _ of yM(l))(e||!Qc(xl(l[_])))&&p.push([o(_),o(l[_])]);return m}case qg:return i([c,isNaN(l.getTime())?Pi:l.toISOString()],l);case Yg:{const{source:p,flags:m}=l;return i([c,{source:p,flags:m}],l)}case Xg:{const p=[],m=i([c,p],l);for(const[_,E]of l)(e||!(Qc(xl(_))||Qc(xl(E))))&&p.push([o(_),o(E)]);return m}case Qg:{const p=[],m=i([c,p],l);for(const _ of l)(e||!Qc(xl(_)))&&p.push(o(_));return m}}const{message:h}=l;return i([c,{name:d,message:h}],l)};return o},nT=(e,{json:t,lossy:n}={})=>{const r=[];return _M(!(t||n),!!t,new Map,r)(e),r},Qi=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?tT(nT(e,t)):structuredClone(e):(e,t)=>tT(nT(e,t));class fu{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}fu.prototype.normal={};fu.prototype.property={};fu.prototype.space=void 0;function fC(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new fu(n,r,t)}function Xl(e){return e.toLowerCase()}class Rn{constructor(t,n){this.attribute=n,this.property=t}}Rn.prototype.attribute="";Rn.prototype.booleanish=!1;Rn.prototype.boolean=!1;Rn.prototype.commaOrSpaceSeparated=!1;Rn.prototype.commaSeparated=!1;Rn.prototype.defined=!1;Rn.prototype.mustUseProperty=!1;Rn.prototype.number=!1;Rn.prototype.overloadedBoolean=!1;Rn.prototype.property="";Rn.prototype.spaceSeparated=!1;Rn.prototype.space=void 0;let xM=0;const Ie=as(),jt=as(),S0=as(),pe=as(),bt=as(),Vi=as(),Hn=as();function as(){return 2**++xM}const A0=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ie,booleanish:jt,commaOrSpaceSeparated:Hn,commaSeparated:Vi,number:pe,overloadedBoolean:S0,spaceSeparated:bt},Symbol.toStringTag,{value:"Module"})),Cp=Object.keys(A0);class Wg extends Rn{constructor(t,n,r,i){let o=-1;if(super(t,n),rT(this,"space",i),typeof r=="number")for(;++o<Cp.length;){const l=Cp[o];rT(this,Cp[o],(r&A0[l])===A0[l])}}}Wg.prototype.defined=!0;function rT(e,t,n){n&&(e[t]=n)}function bo(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new Wg(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[Xl(r)]=r,n[Xl(o.attribute)]=r}return new fu(t,n,e.space)}const hC=bo({properties:{ariaActiveDescendant:null,ariaAtomic:jt,ariaAutoComplete:null,ariaBusy:jt,ariaChecked:jt,ariaColCount:pe,ariaColIndex:pe,ariaColSpan:pe,ariaControls:bt,ariaCurrent:null,ariaDescribedBy:bt,ariaDetails:null,ariaDisabled:jt,ariaDropEffect:bt,ariaErrorMessage:null,ariaExpanded:jt,ariaFlowTo:bt,ariaGrabbed:jt,ariaHasPopup:null,ariaHidden:jt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:bt,ariaLevel:pe,ariaLive:null,ariaModal:jt,ariaMultiLine:jt,ariaMultiSelectable:jt,ariaOrientation:null,ariaOwns:bt,ariaPlaceholder:null,ariaPosInSet:pe,ariaPressed:jt,ariaReadOnly:jt,ariaRelevant:null,ariaRequired:jt,ariaRoleDescription:bt,ariaRowCount:pe,ariaRowIndex:pe,ariaRowSpan:pe,ariaSelected:jt,ariaSetSize:pe,ariaSort:null,ariaValueMax:pe,ariaValueMin:pe,ariaValueNow:pe,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function mC(e,t){return t in e?e[t]:t}function pC(e,t){return mC(e,t.toLowerCase())}const TM=bo({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Vi,acceptCharset:bt,accessKey:bt,action:null,allow:null,allowFullScreen:Ie,allowPaymentRequest:Ie,allowUserMedia:Ie,alpha:Ie,alt:null,as:null,async:Ie,autoCapitalize:null,autoComplete:bt,autoFocus:Ie,autoPlay:Ie,blocking:bt,capture:null,charSet:null,checked:Ie,cite:null,className:bt,closedBy:null,colorSpace:null,cols:pe,colSpan:pe,command:null,commandFor:null,content:null,contentEditable:jt,controls:Ie,controlsList:bt,coords:pe|Vi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ie,defer:Ie,dir:null,dirName:null,disabled:Ie,download:S0,draggable:jt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ie,formTarget:null,headers:bt,height:pe,hidden:S0,high:pe,href:null,hrefLang:null,htmlFor:bt,httpEquiv:bt,id:null,imageSizes:null,imageSrcSet:null,inert:Ie,inputMode:null,integrity:null,is:null,isMap:Ie,itemId:null,itemProp:bt,itemRef:bt,itemScope:Ie,itemType:bt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ie,low:pe,manifest:null,max:null,maxLength:pe,media:null,method:null,min:null,minLength:pe,multiple:Ie,muted:Ie,name:null,nonce:null,noModule:Ie,noValidate:Ie,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:Ie,optimum:pe,pattern:null,ping:bt,placeholder:null,playsInline:Ie,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ie,referrerPolicy:null,rel:bt,required:Ie,reversed:Ie,rows:pe,rowSpan:pe,sandbox:bt,scope:null,scoped:Ie,seamless:Ie,selected:Ie,shadowRootClonable:Ie,shadowRootCustomElementRegistry:Ie,shadowRootDelegatesFocus:Ie,shadowRootMode:null,shadowRootSerializable:Ie,shape:null,size:pe,sizes:null,slot:null,span:pe,spellCheck:jt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:pe,step:null,style:null,tabIndex:pe,target:null,title:null,translate:null,type:null,typeMustMatch:Ie,useMap:null,value:jt,width:pe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:bt,axis:null,background:null,bgColor:null,border:pe,borderColor:null,bottomMargin:pe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ie,declare:Ie,event:null,face:null,frame:null,frameBorder:null,hSpace:pe,leftMargin:pe,link:null,longDesc:null,lowSrc:null,marginHeight:pe,marginWidth:pe,noResize:Ie,noHref:Ie,noShade:Ie,noWrap:Ie,object:null,profile:null,prompt:null,rev:null,rightMargin:pe,rules:null,scheme:null,scrolling:jt,standby:null,summary:null,text:null,topMargin:pe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:pe,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Ie,disablePictureInPicture:Ie,disableRemotePlayback:Ie,exportParts:Vi,part:bt,prefix:null,property:null,results:pe,security:null,unselectable:null},space:"html",transform:pC}),vM=bo({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",maskType:"mask-type",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:Hn,accentHeight:pe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:pe,amplitude:pe,arabicForm:null,ascent:pe,attributeName:null,attributeType:null,azimuth:pe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:pe,by:null,calcMode:null,capHeight:pe,className:bt,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:pe,diffuseConstant:pe,direction:null,display:null,dur:null,divisor:pe,dominantBaseline:null,download:Ie,dx:null,dy:null,edgeMode:null,editable:null,elevation:pe,enableBackground:null,end:null,event:null,exponent:pe,externalResourcesRequired:null,fill:null,fillOpacity:pe,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:Vi,g2:Vi,glyphName:Vi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:pe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:pe,horizOriginX:pe,horizOriginY:pe,id:null,ideographic:pe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:pe,k:pe,k1:pe,k2:pe,k3:pe,k4:pe,kernelMatrix:Hn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:pe,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:pe,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:pe,overlineThickness:pe,paintOrder:null,panose1:null,path:null,pathLength:pe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:bt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:pe,pointsAtY:pe,pointsAtZ:pe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Hn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Hn,rev:Hn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Hn,requiredFeatures:Hn,requiredFonts:Hn,requiredFormats:Hn,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:pe,specularExponent:pe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:pe,strikethroughThickness:pe,string:null,stroke:null,strokeDashArray:Hn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:pe,strokeOpacity:pe,strokeWidth:null,style:null,surfaceScale:pe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Hn,tabIndex:pe,tableValues:null,target:null,targetX:pe,targetY:pe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Hn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:pe,underlineThickness:pe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:pe,values:null,vAlphabetic:pe,vMathematical:pe,vectorEffect:null,vHanging:pe,vIdeographic:pe,version:null,vertAdvY:pe,vertOriginX:pe,vertOriginY:pe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:pe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:mC}),gC=bo({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()}}),bC=bo({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:pC}),EC=bo({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),SM={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"},AM=/[A-Z]/g,aT=/-[a-z]/g,CM=/^data[-\w.:]+$/i;function hu(e,t){const n=Xl(t);let r=t,i=Rn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&CM.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(aT,kM);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!aT.test(o)){let l=o.replace(AM,wM);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}i=Wg}return new i(r,t)}function wM(e){return"-"+e.toLowerCase()}function kM(e){return e.charAt(1).toUpperCase()}const Eo=fC([hC,TM,gC,bC,EC],"html"),jr=fC([hC,vM,gC,bC,EC],"svg");function iT(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,o=!1;for(;!o;){r===-1&&(r=n.length,o=!0);const l=n.slice(i,r).trim();(l||!o)&&t.push(l),i=r+1,r=n.indexOf(",",i)}return t}function Kg(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const sT=/[#.]/g;function NM(e,t){const n=e||"",r={};let i=0,o,l;for(;i<n.length;){sT.lastIndex=i;const c=sT.exec(n),d=n.slice(i,c?c.index:n.length);d&&(o?o==="#"?r.id=d:Array.isArray(r.className)?r.className.push(d):r.className=[d]:l=d,i+=d.length),c&&(o=c[0],i++)}return{type:"element",tagName:l||t||"div",properties:r,children:[]}}function oT(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Zg(e){return e.join(" ").trim()}function yC(e,t,n){const r=n?IM(n):void 0;function i(o,l,...c){let d;if(o==null){d={type:"root",children:[]};const h=l;c.unshift(h)}else{d=NM(o,t);const h=d.tagName.toLowerCase(),p=r?r.get(h):void 0;if(d.tagName=p||h,RM(l))c.unshift(l);else for(const[m,_]of Object.entries(l))OM(e,d.properties,m,_)}for(const h of c)C0(d.children,h);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return i}function RM(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 o=i;for(const l of o)if(typeof l!="number"&&typeof l!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function OM(e,t,n,r){const i=hu(e,n);let o;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;o=r}else typeof r=="boolean"?o=r:typeof r=="string"?i.spaceSeparated?o=oT(r):i.commaSeparated?o=iT(r):i.commaOrSpaceSeparated?o=oT(iT(r).join(" ")):o=lT(i,i.property,r):Array.isArray(r)?o=[...r]:o=i.property==="style"?LM(r):String(r);if(Array.isArray(o)){const l=[];for(const c of o)l.push(lT(i,i.property,c));o=l}i.property==="className"&&Array.isArray(t.className)&&(o=t.className.concat(o)),t[i.property]=o}}function C0(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)C0(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?C0(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function lT(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Xl(n)===Xl(t)))return!0}return n}function LM(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function IM(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const DM=["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"],MM=yC(Eo,"div"),PM=yC(jr,"g",DM);function BM(e){const t=String(e),n=[];return{toOffset:i,toPoint:r};function r(o){if(typeof o=="number"&&o>-1&&o<=t.length){let l=0;for(;;){let c=n[l];if(c===void 0){const d=uT(t,n[l-1]);c=d===-1?t.length+1:d+1,n[l]=c}if(c>o)return{line:l+1,column:o-(l>0?n[l-1]:0)+1,offset:o};l++}}}function i(o){if(o&&typeof o.line=="number"&&typeof o.column=="number"&&!Number.isNaN(o.line)&&!Number.isNaN(o.column)){for(;n.length<o.line;){const c=n[n.length-1],d=uT(t,c),h=d===-1?t.length+1:d+1;if(c===h)break;n.push(h)}const l=(o.line>1?n[o.line-2]:0)+o.column-1;if(l<n[o.line-1])return l}}}function uT(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
51
+ `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const zi={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/"},_C={}.hasOwnProperty,jM=Object.prototype;function UM(e,t){const n=t||{};return Jg({file:n.file||void 0,location:!1,schema:n.space==="svg"?jr:Eo,verbose:n.verbose||!1},e)}function Jg(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},pd(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:xC(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const o=String(e.file),l=BM(o),c=l.toPoint(0),d=l.toPoint(o.length);n.position={start:c,end:d}}return n}case"#documentType":{const r=t;return n={type:"doctype"},pd(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},pd(e,r,n),n}default:return n=HM(e,t),n}}function xC(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=Jg(e,t[n]);r.push(i)}return r}function HM(e,t){const n=e.schema;e.schema=t.namespaceURI===zi.svg?jr:Eo;let r=-1;const i={};for(;++r<t.attrs.length;){const c=t.attrs[r],d=(c.prefix?c.prefix+":":"")+c.name;_C.call(jM,d)||(i[d]=c.value)}const l=(e.schema.space==="svg"?PM:MM)(t.tagName,i,xC(e,t.childNodes));if(pd(e,t,l),l.tagName==="template"){const c=t,d=c.sourceCodeLocation,h=d&&d.startTag&&ro(d.startTag),p=d&&d.endTag&&ro(d.endTag),m=Jg(e,c.content);h&&p&&e.file&&(m.position={start:h.end,end:p.start}),l.content=m}return e.schema=n,l}function pd(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=zM(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function zM(e,t,n){const r=ro(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 o={};let l;if(n.attrs)for(l in n.attrs)_C.call(n.attrs,l)&&(o[hu(e.schema,l).property]=ro(n.attrs[l]));n.startTag;const c=ro(n.startTag),d=n.endTag?ro(n.endTag):void 0,h={opening:c};d&&(h.closing=d),h.properties=o,t.data={position:h}}}return r}function ro(e){const t=cT({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=cT({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function cT(e){return e.line&&e.column?e:void 0}const dT={}.hasOwnProperty;function e1(e,t){const n=t||{};function r(i,...o){let l=r.invalid;const c=r.handlers;if(i&&dT.call(i,e)){const d=String(i[e]);l=dT.call(c,d)?c[d]:r.unknown}if(l)return l.call(this,i,...o)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const FM={},$M={}.hasOwnProperty,TC=e1("type",{handlers:{root:GM,element:WM,text:XM,comment:QM,doctype:YM}});function VM(e,t){const r=(t||FM).space;return TC(e,r==="svg"?jr:Eo)}function GM(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=t1(e.children,n,t),yo(e,n),n}function qM(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=t1(e.children,n,t),yo(e,n),n}function YM(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return yo(e,t),t}function XM(e){const t={nodeName:"#text",value:e.value,parentNode:null};return yo(e,t),t}function QM(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return yo(e,t),t}function WM(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=jr);const i=[];let o;if(e.properties){for(o in e.properties)if(o!=="children"&&$M.call(e.properties,o)){const d=KM(r,o,e.properties[o]);d&&i.push(d)}}const l=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:zi[l],childNodes:[],parentNode:null};return c.childNodes=t1(e.children,c,r),yo(e,c),e.tagName==="template"&&e.content&&(c.content=qM(e.content,r)),c}function KM(e,t,n){const r=hu(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?Kg(n):Zg(n));const i={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const o=i.name.indexOf(":");o<0?i.prefix="":(i.name=i.name.slice(o+1),i.prefix=r.attribute.slice(0,o)),i.namespace=zi[r.space]}return i}function t1(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const o=TC(e[r],n);o.parentNode=t,i.push(o)}return i}function yo(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 vC=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],ZM=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]),vt="�";var I;(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"})(I||(I={}));const kn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function SC(e){return e>=55296&&e<=57343}function JM(e){return e>=56320&&e<=57343}function e8(e,t){return(e-55296)*1024+9216+t}function AC(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function CC(e){return e>=64976&&e<=65007||ZM.has(e)}var ae;(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"})(ae||(ae={}));const t8=65536;class n8{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=t8,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:o}=this,l=i+n,c=o+n;return{code:t,startLine:r,endLine:r,startCol:l,endCol:l,startOffset:c,endOffset:c}}_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(JM(n))return this.pos++,this._addGap(),e8(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,I.EOF;return this._err(ae.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,I.EOF;const r=this.html.charCodeAt(n);return r===I.CARRIAGE_RETURN?I.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,I.EOF;let t=this.html.charCodeAt(this.pos);return t===I.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,I.LINE_FEED):t===I.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,SC(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===I.LINE_FEED||t===I.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){AC(t)?this._err(ae.controlCharacterInInputStream):CC(t)&&this._err(ae.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Fe;(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"})(Fe||(Fe={}));function wC(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 r8=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))),a8=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 i8(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=a8.get(e))!==null&&t!==void 0?t:e}var Kt;(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"})(Kt||(Kt={}));const s8=32;var Ja;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Ja||(Ja={}));function w0(e){return e>=Kt.ZERO&&e<=Kt.NINE}function o8(e){return e>=Kt.UPPER_A&&e<=Kt.UPPER_F||e>=Kt.LOWER_A&&e<=Kt.LOWER_F}function l8(e){return e>=Kt.UPPER_A&&e<=Kt.UPPER_Z||e>=Kt.LOWER_A&&e<=Kt.LOWER_Z||w0(e)}function u8(e){return e===Kt.EQUALS||l8(e)}var Qt;(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"})(Qt||(Qt={}));var ca;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(ca||(ca={}));class c8{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Qt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=ca.Strict}startEntity(t){this.decodeMode=t,this.state=Qt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Qt.EntityStart:return t.charCodeAt(n)===Kt.NUM?(this.state=Qt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Qt.NamedEntity,this.stateNamedEntity(t,n));case Qt.NumericStart:return this.stateNumericStart(t,n);case Qt.NumericDecimal:return this.stateNumericDecimal(t,n);case Qt.NumericHex:return this.stateNumericHex(t,n);case Qt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|s8)===Kt.LOWER_X?(this.state=Qt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Qt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const o=r-n;this.result=this.result*Math.pow(i,o)+Number.parseInt(t.substr(n,o),i),this.consumed+=o}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(w0(i)||o8(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(w0(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===Kt.SEMI)this.consumed+=1;else if(this.decodeMode===ca.Strict)return 0;return this.emitCodePoint(i8(this.result),this.consumed),this.errors&&(t!==Kt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let i=r[this.treeIndex],o=(i&Ja.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const l=t.charCodeAt(n);if(this.treeIndex=d8(r,i,this.treeIndex+Math.max(1,o),l),this.treeIndex<0)return this.result===0||this.decodeMode===ca.Attribute&&(o===0||u8(l))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],o=(i&Ja.VALUE_LENGTH)>>14,o!==0){if(l===Kt.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==ca.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]&Ja.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]&~Ja.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case Qt.NamedEntity:return this.result!==0&&(this.decodeMode!==ca.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Qt.NumericDecimal:return this.emitNumericEntity(0,2);case Qt.NumericHex:return this.emitNumericEntity(0,3);case Qt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Qt.EntityStart:return 0}}}function d8(e,t,n,r){const i=(t&Ja.BRANCH_LENGTH)>>7,o=t&Ja.JUMP_TABLE;if(i===0)return o!==0&&r===o?n:-1;if(o){const d=r-o;return d<0||d>=i?-1:e[n+d]-1}let l=n,c=l+i-1;for(;l<=c;){const d=l+c>>>1,h=e[d];if(h<r)l=d+1;else if(h>r)c=d-1;else return e[d+i]}return-1}var fe;(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/"})(fe||(fe={}));var Gi;(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"})(Gi||(Gi={}));var nr;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(nr||(nr={}));var Q;(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"})(Q||(Q={}));var x;(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"})(x||(x={}));const f8=new Map([[Q.A,x.A],[Q.ADDRESS,x.ADDRESS],[Q.ANNOTATION_XML,x.ANNOTATION_XML],[Q.APPLET,x.APPLET],[Q.AREA,x.AREA],[Q.ARTICLE,x.ARTICLE],[Q.ASIDE,x.ASIDE],[Q.B,x.B],[Q.BASE,x.BASE],[Q.BASEFONT,x.BASEFONT],[Q.BGSOUND,x.BGSOUND],[Q.BIG,x.BIG],[Q.BLOCKQUOTE,x.BLOCKQUOTE],[Q.BODY,x.BODY],[Q.BR,x.BR],[Q.BUTTON,x.BUTTON],[Q.CAPTION,x.CAPTION],[Q.CENTER,x.CENTER],[Q.CODE,x.CODE],[Q.COL,x.COL],[Q.COLGROUP,x.COLGROUP],[Q.DD,x.DD],[Q.DESC,x.DESC],[Q.DETAILS,x.DETAILS],[Q.DIALOG,x.DIALOG],[Q.DIR,x.DIR],[Q.DIV,x.DIV],[Q.DL,x.DL],[Q.DT,x.DT],[Q.EM,x.EM],[Q.EMBED,x.EMBED],[Q.FIELDSET,x.FIELDSET],[Q.FIGCAPTION,x.FIGCAPTION],[Q.FIGURE,x.FIGURE],[Q.FONT,x.FONT],[Q.FOOTER,x.FOOTER],[Q.FOREIGN_OBJECT,x.FOREIGN_OBJECT],[Q.FORM,x.FORM],[Q.FRAME,x.FRAME],[Q.FRAMESET,x.FRAMESET],[Q.H1,x.H1],[Q.H2,x.H2],[Q.H3,x.H3],[Q.H4,x.H4],[Q.H5,x.H5],[Q.H6,x.H6],[Q.HEAD,x.HEAD],[Q.HEADER,x.HEADER],[Q.HGROUP,x.HGROUP],[Q.HR,x.HR],[Q.HTML,x.HTML],[Q.I,x.I],[Q.IMG,x.IMG],[Q.IMAGE,x.IMAGE],[Q.INPUT,x.INPUT],[Q.IFRAME,x.IFRAME],[Q.KEYGEN,x.KEYGEN],[Q.LABEL,x.LABEL],[Q.LI,x.LI],[Q.LINK,x.LINK],[Q.LISTING,x.LISTING],[Q.MAIN,x.MAIN],[Q.MALIGNMARK,x.MALIGNMARK],[Q.MARQUEE,x.MARQUEE],[Q.MATH,x.MATH],[Q.MENU,x.MENU],[Q.META,x.META],[Q.MGLYPH,x.MGLYPH],[Q.MI,x.MI],[Q.MO,x.MO],[Q.MN,x.MN],[Q.MS,x.MS],[Q.MTEXT,x.MTEXT],[Q.NAV,x.NAV],[Q.NOBR,x.NOBR],[Q.NOFRAMES,x.NOFRAMES],[Q.NOEMBED,x.NOEMBED],[Q.NOSCRIPT,x.NOSCRIPT],[Q.OBJECT,x.OBJECT],[Q.OL,x.OL],[Q.OPTGROUP,x.OPTGROUP],[Q.OPTION,x.OPTION],[Q.P,x.P],[Q.PARAM,x.PARAM],[Q.PLAINTEXT,x.PLAINTEXT],[Q.PRE,x.PRE],[Q.RB,x.RB],[Q.RP,x.RP],[Q.RT,x.RT],[Q.RTC,x.RTC],[Q.RUBY,x.RUBY],[Q.S,x.S],[Q.SCRIPT,x.SCRIPT],[Q.SEARCH,x.SEARCH],[Q.SECTION,x.SECTION],[Q.SELECT,x.SELECT],[Q.SOURCE,x.SOURCE],[Q.SMALL,x.SMALL],[Q.SPAN,x.SPAN],[Q.STRIKE,x.STRIKE],[Q.STRONG,x.STRONG],[Q.STYLE,x.STYLE],[Q.SUB,x.SUB],[Q.SUMMARY,x.SUMMARY],[Q.SUP,x.SUP],[Q.TABLE,x.TABLE],[Q.TBODY,x.TBODY],[Q.TEMPLATE,x.TEMPLATE],[Q.TEXTAREA,x.TEXTAREA],[Q.TFOOT,x.TFOOT],[Q.TD,x.TD],[Q.TH,x.TH],[Q.THEAD,x.THEAD],[Q.TITLE,x.TITLE],[Q.TR,x.TR],[Q.TRACK,x.TRACK],[Q.TT,x.TT],[Q.U,x.U],[Q.UL,x.UL],[Q.SVG,x.SVG],[Q.VAR,x.VAR],[Q.WBR,x.WBR],[Q.XMP,x.XMP]]);function _o(e){var t;return(t=f8.get(e))!==null&&t!==void 0?t:x.UNKNOWN}const me=x,h8={[fe.HTML]:new Set([me.ADDRESS,me.APPLET,me.AREA,me.ARTICLE,me.ASIDE,me.BASE,me.BASEFONT,me.BGSOUND,me.BLOCKQUOTE,me.BODY,me.BR,me.BUTTON,me.CAPTION,me.CENTER,me.COL,me.COLGROUP,me.DD,me.DETAILS,me.DIR,me.DIV,me.DL,me.DT,me.EMBED,me.FIELDSET,me.FIGCAPTION,me.FIGURE,me.FOOTER,me.FORM,me.FRAME,me.FRAMESET,me.H1,me.H2,me.H3,me.H4,me.H5,me.H6,me.HEAD,me.HEADER,me.HGROUP,me.HR,me.HTML,me.IFRAME,me.IMG,me.INPUT,me.LI,me.LINK,me.LISTING,me.MAIN,me.MARQUEE,me.MENU,me.META,me.NAV,me.NOEMBED,me.NOFRAMES,me.NOSCRIPT,me.OBJECT,me.OL,me.P,me.PARAM,me.PLAINTEXT,me.PRE,me.SCRIPT,me.SECTION,me.SELECT,me.SOURCE,me.STYLE,me.SUMMARY,me.TABLE,me.TBODY,me.TD,me.TEMPLATE,me.TEXTAREA,me.TFOOT,me.TH,me.THEAD,me.TITLE,me.TR,me.TRACK,me.UL,me.WBR,me.XMP]),[fe.MATHML]:new Set([me.MI,me.MO,me.MN,me.MS,me.MTEXT,me.ANNOTATION_XML]),[fe.SVG]:new Set([me.TITLE,me.FOREIGN_OBJECT,me.DESC]),[fe.XLINK]:new Set,[fe.XML]:new Set,[fe.XMLNS]:new Set},k0=new Set([me.H1,me.H2,me.H3,me.H4,me.H5,me.H6]);Q.STYLE,Q.SCRIPT,Q.XMP,Q.IFRAME,Q.NOEMBED,Q.NOFRAMES,Q.PLAINTEXT;var j;(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"})(j||(j={}));const It={DATA:j.DATA,RCDATA:j.RCDATA,RAWTEXT:j.RAWTEXT,SCRIPT_DATA:j.SCRIPT_DATA,PLAINTEXT:j.PLAINTEXT,CDATA_SECTION:j.CDATA_SECTION};function m8(e){return e>=I.DIGIT_0&&e<=I.DIGIT_9}function Ll(e){return e>=I.LATIN_CAPITAL_A&&e<=I.LATIN_CAPITAL_Z}function p8(e){return e>=I.LATIN_SMALL_A&&e<=I.LATIN_SMALL_Z}function Ya(e){return p8(e)||Ll(e)}function fT(e){return Ya(e)||m8(e)}function Wc(e){return e+32}function kC(e){return e===I.SPACE||e===I.LINE_FEED||e===I.TABULATION||e===I.FORM_FEED}function hT(e){return kC(e)||e===I.SOLIDUS||e===I.GREATER_THAN_SIGN}function g8(e){return e===I.NULL?ae.nullCharacterReference:e>1114111?ae.characterReferenceOutsideUnicodeRange:SC(e)?ae.surrogateCharacterReference:CC(e)?ae.noncharacterCharacterReference:AC(e)||e===I.CARRIAGE_RETURN?ae.controlCharacterReference:null}class b8{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=j.DATA,this.returnState=j.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new n8(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new c8(r8,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(ae.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(ae.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=g8(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:Fe.START_TAG,tagName:"",tagID:x.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Fe.END_TAG,tagName:"",tagID:x.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Fe.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Fe.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(wC(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(ae.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=_o(t.tagName),t.type===Fe.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(ae.endTagWithAttributes),t.selfClosing&&this._err(ae.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 Fe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Fe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Fe.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:Fe.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=kC(t)?Fe.WHITESPACE_CHARACTER:t===I.NULL?Fe.NULL_CHARACTER:Fe.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Fe.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=j.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?ca.Attribute:ca.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===j.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===j.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===j.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case j.DATA:{this._stateData(t);break}case j.RCDATA:{this._stateRcdata(t);break}case j.RAWTEXT:{this._stateRawtext(t);break}case j.SCRIPT_DATA:{this._stateScriptData(t);break}case j.PLAINTEXT:{this._statePlaintext(t);break}case j.TAG_OPEN:{this._stateTagOpen(t);break}case j.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case j.TAG_NAME:{this._stateTagName(t);break}case j.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case j.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case j.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case j.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case j.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case j.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case j.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case j.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case j.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case j.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case j.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case j.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case j.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case j.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case j.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case j.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case j.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case j.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case j.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case j.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case j.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case j.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case j.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case j.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case j.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case j.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case j.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case j.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case j.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case j.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case j.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case j.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case j.BOGUS_COMMENT:{this._stateBogusComment(t);break}case j.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case j.COMMENT_START:{this._stateCommentStart(t);break}case j.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case j.COMMENT:{this._stateComment(t);break}case j.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case j.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case j.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case j.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case j.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case j.COMMENT_END:{this._stateCommentEnd(t);break}case j.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case j.DOCTYPE:{this._stateDoctype(t);break}case j.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case j.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case j.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case j.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case j.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case j.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case j.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case j.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case j.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case j.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case j.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case j.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case j.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case j.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case j.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case j.CDATA_SECTION:{this._stateCdataSection(t);break}case j.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case j.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case j.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case j.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case I.LESS_THAN_SIGN:{this.state=j.TAG_OPEN;break}case I.AMPERSAND:{this._startCharacterReference();break}case I.NULL:{this._err(ae.unexpectedNullCharacter),this._emitCodePoint(t);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case I.AMPERSAND:{this._startCharacterReference();break}case I.LESS_THAN_SIGN:{this.state=j.RCDATA_LESS_THAN_SIGN;break}case I.NULL:{this._err(ae.unexpectedNullCharacter),this._emitChars(vt);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case I.LESS_THAN_SIGN:{this.state=j.RAWTEXT_LESS_THAN_SIGN;break}case I.NULL:{this._err(ae.unexpectedNullCharacter),this._emitChars(vt);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case I.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_LESS_THAN_SIGN;break}case I.NULL:{this._err(ae.unexpectedNullCharacter),this._emitChars(vt);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case I.NULL:{this._err(ae.unexpectedNullCharacter),this._emitChars(vt);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Ya(t))this._createStartTagToken(),this.state=j.TAG_NAME,this._stateTagName(t);else switch(t){case I.EXCLAMATION_MARK:{this.state=j.MARKUP_DECLARATION_OPEN;break}case I.SOLIDUS:{this.state=j.END_TAG_OPEN;break}case I.QUESTION_MARK:{this._err(ae.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=j.BOGUS_COMMENT,this._stateBogusComment(t);break}case I.EOF:{this._err(ae.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(ae.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=j.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Ya(t))this._createEndTagToken(),this.state=j.TAG_NAME,this._stateTagName(t);else switch(t){case I.GREATER_THAN_SIGN:{this._err(ae.missingEndTagName),this.state=j.DATA;break}case I.EOF:{this._err(ae.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(ae.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=j.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=j.BEFORE_ATTRIBUTE_NAME;break}case I.SOLIDUS:{this.state=j.SELF_CLOSING_START_TAG;break}case I.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentTagToken();break}case I.NULL:{this._err(ae.unexpectedNullCharacter),n.tagName+=vt;break}case I.EOF:{this._err(ae.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Ll(t)?Wc(t):t)}}_stateRcdataLessThanSign(t){t===I.SOLIDUS?this.state=j.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=j.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Ya(t)?(this.state=j.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=j.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 I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=j.BEFORE_ATTRIBUTE_NAME,!1;case I.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=j.SELF_CLOSING_START_TAG,!1;case I.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=j.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=j.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===I.SOLIDUS?this.state=j.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=j.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Ya(t)?(this.state=j.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=j.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=j.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case I.SOLIDUS:{this.state=j.SCRIPT_DATA_END_TAG_OPEN;break}case I.EXCLAMATION_MARK:{this.state=j.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=j.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Ya(t)?(this.state=j.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=j.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=j.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===I.HYPHEN_MINUS?(this.state=j.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=j.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===I.HYPHEN_MINUS?(this.state=j.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=j.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case I.HYPHEN_MINUS:{this.state=j.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case I.NULL:{this._err(ae.unexpectedNullCharacter),this._emitChars(vt);break}case I.EOF:{this._err(ae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case I.HYPHEN_MINUS:{this.state=j.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case I.NULL:{this._err(ae.unexpectedNullCharacter),this.state=j.SCRIPT_DATA_ESCAPED,this._emitChars(vt);break}case I.EOF:{this._err(ae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=j.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case I.HYPHEN_MINUS:{this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case I.GREATER_THAN_SIGN:{this.state=j.SCRIPT_DATA,this._emitChars(">");break}case I.NULL:{this._err(ae.unexpectedNullCharacter),this.state=j.SCRIPT_DATA_ESCAPED,this._emitChars(vt);break}case I.EOF:{this._err(ae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=j.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===I.SOLIDUS?this.state=j.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Ya(t)?(this._emitChars("<"),this.state=j.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=j.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Ya(t)?(this.state=j.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=j.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=j.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(kn.SCRIPT,!1)&&hT(this.preprocessor.peek(kn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<kn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=j.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case I.HYPHEN_MINUS:{this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case I.NULL:{this._err(ae.unexpectedNullCharacter),this._emitChars(vt);break}case I.EOF:{this._err(ae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case I.HYPHEN_MINUS:{this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case I.NULL:{this._err(ae.unexpectedNullCharacter),this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(vt);break}case I.EOF:{this._err(ae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case I.HYPHEN_MINUS:{this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case I.GREATER_THAN_SIGN:{this.state=j.SCRIPT_DATA,this._emitChars(">");break}case I.NULL:{this._err(ae.unexpectedNullCharacter),this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(vt);break}case I.EOF:{this._err(ae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===I.SOLIDUS?(this.state=j.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(kn.SCRIPT,!1)&&hT(this.preprocessor.peek(kn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<kn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=j.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.SOLIDUS:case I.GREATER_THAN_SIGN:case I.EOF:{this.state=j.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case I.EQUALS_SIGN:{this._err(ae.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=j.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=j.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:case I.SOLIDUS:case I.GREATER_THAN_SIGN:case I.EOF:{this._leaveAttrName(),this.state=j.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case I.EQUALS_SIGN:{this._leaveAttrName(),this.state=j.BEFORE_ATTRIBUTE_VALUE;break}case I.QUOTATION_MARK:case I.APOSTROPHE:case I.LESS_THAN_SIGN:{this._err(ae.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case I.NULL:{this._err(ae.unexpectedNullCharacter),this.currentAttr.name+=vt;break}default:this.currentAttr.name+=String.fromCodePoint(Ll(t)?Wc(t):t)}}_stateAfterAttributeName(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.SOLIDUS:{this.state=j.SELF_CLOSING_START_TAG;break}case I.EQUALS_SIGN:{this.state=j.BEFORE_ATTRIBUTE_VALUE;break}case I.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentTagToken();break}case I.EOF:{this._err(ae.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=j.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.QUOTATION_MARK:{this.state=j.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this.state=j.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(ae.missingAttributeValue),this.state=j.DATA,this.emitCurrentTagToken();break}default:this.state=j.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case I.QUOTATION_MARK:{this.state=j.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case I.AMPERSAND:{this._startCharacterReference();break}case I.NULL:{this._err(ae.unexpectedNullCharacter),this.currentAttr.value+=vt;break}case I.EOF:{this._err(ae.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case I.APOSTROPHE:{this.state=j.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case I.AMPERSAND:{this._startCharacterReference();break}case I.NULL:{this._err(ae.unexpectedNullCharacter),this.currentAttr.value+=vt;break}case I.EOF:{this._err(ae.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this._leaveAttrValue(),this.state=j.BEFORE_ATTRIBUTE_NAME;break}case I.AMPERSAND:{this._startCharacterReference();break}case I.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=j.DATA,this.emitCurrentTagToken();break}case I.NULL:{this._err(ae.unexpectedNullCharacter),this.currentAttr.value+=vt;break}case I.QUOTATION_MARK:case I.APOSTROPHE:case I.LESS_THAN_SIGN:case I.EQUALS_SIGN:case I.GRAVE_ACCENT:{this._err(ae.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case I.EOF:{this._err(ae.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this._leaveAttrValue(),this.state=j.BEFORE_ATTRIBUTE_NAME;break}case I.SOLIDUS:{this._leaveAttrValue(),this.state=j.SELF_CLOSING_START_TAG;break}case I.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=j.DATA,this.emitCurrentTagToken();break}case I.EOF:{this._err(ae.eofInTag),this._emitEOFToken();break}default:this._err(ae.missingWhitespaceBetweenAttributes),this.state=j.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case I.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=j.DATA,this.emitCurrentTagToken();break}case I.EOF:{this._err(ae.eofInTag),this._emitEOFToken();break}default:this._err(ae.unexpectedSolidusInTag),this.state=j.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case I.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentComment(n);break}case I.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case I.NULL:{this._err(ae.unexpectedNullCharacter),n.data+=vt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(kn.DASH_DASH,!0)?(this._createCommentToken(kn.DASH_DASH.length+1),this.state=j.COMMENT_START):this._consumeSequenceIfMatch(kn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(kn.DOCTYPE.length+1),this.state=j.DOCTYPE):this._consumeSequenceIfMatch(kn.CDATA_START,!0)?this.inForeignNode?this.state=j.CDATA_SECTION:(this._err(ae.cdataInHtmlContent),this._createCommentToken(kn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=j.BOGUS_COMMENT):this._ensureHibernation()||(this._err(ae.incorrectlyOpenedComment),this._createCommentToken(2),this.state=j.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case I.HYPHEN_MINUS:{this.state=j.COMMENT_START_DASH;break}case I.GREATER_THAN_SIGN:{this._err(ae.abruptClosingOfEmptyComment),this.state=j.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=j.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case I.HYPHEN_MINUS:{this.state=j.COMMENT_END;break}case I.GREATER_THAN_SIGN:{this._err(ae.abruptClosingOfEmptyComment),this.state=j.DATA,this.emitCurrentComment(n);break}case I.EOF:{this._err(ae.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=j.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case I.HYPHEN_MINUS:{this.state=j.COMMENT_END_DASH;break}case I.LESS_THAN_SIGN:{n.data+="<",this.state=j.COMMENT_LESS_THAN_SIGN;break}case I.NULL:{this._err(ae.unexpectedNullCharacter),n.data+=vt;break}case I.EOF:{this._err(ae.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case I.EXCLAMATION_MARK:{n.data+="!",this.state=j.COMMENT_LESS_THAN_SIGN_BANG;break}case I.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=j.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===I.HYPHEN_MINUS?this.state=j.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=j.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===I.HYPHEN_MINUS?this.state=j.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=j.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==I.GREATER_THAN_SIGN&&t!==I.EOF&&this._err(ae.nestedComment),this.state=j.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case I.HYPHEN_MINUS:{this.state=j.COMMENT_END;break}case I.EOF:{this._err(ae.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=j.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case I.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentComment(n);break}case I.EXCLAMATION_MARK:{this.state=j.COMMENT_END_BANG;break}case I.HYPHEN_MINUS:{n.data+="-";break}case I.EOF:{this._err(ae.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=j.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case I.HYPHEN_MINUS:{n.data+="--!",this.state=j.COMMENT_END_DASH;break}case I.GREATER_THAN_SIGN:{this._err(ae.incorrectlyClosedComment),this.state=j.DATA,this.emitCurrentComment(n);break}case I.EOF:{this._err(ae.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=j.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=j.BEFORE_DOCTYPE_NAME;break}case I.GREATER_THAN_SIGN:{this.state=j.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case I.EOF:{this._err(ae.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ae.missingWhitespaceBeforeDoctypeName),this.state=j.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Ll(t))this._createDoctypeToken(String.fromCharCode(Wc(t))),this.state=j.DOCTYPE_NAME;else switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.NULL:{this._err(ae.unexpectedNullCharacter),this._createDoctypeToken(vt),this.state=j.DOCTYPE_NAME;break}case I.GREATER_THAN_SIGN:{this._err(ae.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=j.DATA;break}case I.EOF:{this._err(ae.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=j.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=j.AFTER_DOCTYPE_NAME;break}case I.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentDoctype(n);break}case I.NULL:{this._err(ae.unexpectedNullCharacter),n.name+=vt;break}case I.EOF:{this._err(ae.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Ll(t)?Wc(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(ae.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(kn.PUBLIC,!1)?this.state=j.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(kn.SYSTEM,!1)?this.state=j.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(ae.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=j.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case I.QUOTATION_MARK:{this._err(ae.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=j.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this._err(ae.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=j.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(ae.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=j.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(ae.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ae.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.QUOTATION_MARK:{n.publicId="",this.state=j.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{n.publicId="",this.state=j.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(ae.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=j.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(ae.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ae.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case I.QUOTATION_MARK:{this.state=j.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case I.NULL:{this._err(ae.unexpectedNullCharacter),n.publicId+=vt;break}case I.GREATER_THAN_SIGN:{this._err(ae.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=j.DATA;break}case I.EOF:{this._err(ae.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 I.APOSTROPHE:{this.state=j.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case I.NULL:{this._err(ae.unexpectedNullCharacter),n.publicId+=vt;break}case I.GREATER_THAN_SIGN:{this._err(ae.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=j.DATA;break}case I.EOF:{this._err(ae.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 I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=j.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case I.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentDoctype(n);break}case I.QUOTATION_MARK:{this._err(ae.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this._err(ae.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.EOF:{this._err(ae.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ae.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=j.DATA;break}case I.QUOTATION_MARK:{n.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{n.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.EOF:{this._err(ae.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ae.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=j.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case I.QUOTATION_MARK:{this._err(ae.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this._err(ae.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(ae.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=j.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(ae.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ae.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.QUOTATION_MARK:{n.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{n.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(ae.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=j.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(ae.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ae.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case I.QUOTATION_MARK:{this.state=j.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case I.NULL:{this._err(ae.unexpectedNullCharacter),n.systemId+=vt;break}case I.GREATER_THAN_SIGN:{this._err(ae.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=j.DATA;break}case I.EOF:{this._err(ae.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 I.APOSTROPHE:{this.state=j.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case I.NULL:{this._err(ae.unexpectedNullCharacter),n.systemId+=vt;break}case I.GREATER_THAN_SIGN:{this._err(ae.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=j.DATA;break}case I.EOF:{this._err(ae.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 I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=j.DATA;break}case I.EOF:{this._err(ae.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ae.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case I.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=j.DATA;break}case I.NULL:{this._err(ae.unexpectedNullCharacter);break}case I.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case I.RIGHT_SQUARE_BRACKET:{this.state=j.CDATA_SECTION_BRACKET;break}case I.EOF:{this._err(ae.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===I.RIGHT_SQUARE_BRACKET?this.state=j.CDATA_SECTION_END:(this._emitChars("]"),this.state=j.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case I.GREATER_THAN_SIGN:{this.state=j.DATA;break}case I.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=j.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(I.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&fT(this.preprocessor.peek(1))?j.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){fT(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===I.SEMICOLON&&this._err(ae.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const NC=new Set([x.DD,x.DT,x.LI,x.OPTGROUP,x.OPTION,x.P,x.RB,x.RP,x.RT,x.RTC]),mT=new Set([...NC,x.CAPTION,x.COLGROUP,x.TBODY,x.TD,x.TFOOT,x.TH,x.THEAD,x.TR]),Ld=new Set([x.APPLET,x.CAPTION,x.HTML,x.MARQUEE,x.OBJECT,x.TABLE,x.TD,x.TEMPLATE,x.TH]),E8=new Set([...Ld,x.OL,x.UL]),y8=new Set([...Ld,x.BUTTON]),pT=new Set([x.ANNOTATION_XML,x.MI,x.MN,x.MO,x.MS,x.MTEXT]),gT=new Set([x.DESC,x.FOREIGN_OBJECT,x.TITLE]),_8=new Set([x.TR,x.TEMPLATE,x.HTML]),x8=new Set([x.TBODY,x.TFOOT,x.THEAD,x.TEMPLATE,x.HTML]),T8=new Set([x.TABLE,x.TEMPLATE,x.HTML]),v8=new Set([x.TD,x.TH]);class S8{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=x.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===x.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===fe.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])!==fe.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(k0,fe.HTML)}popUntilTableCellPopped(){this.popUntilPopped(v8,fe.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(T8,fe.HTML)}clearBackToTableBodyContext(){this.clearBackTo(x8,fe.HTML)}clearBackToTableRowContext(){this.clearBackTo(_8,fe.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]===x.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]===x.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 fe.HTML:{if(i===t)return!0;if(n.has(i))return!1;break}case fe.SVG:{if(gT.has(i))return!1;break}case fe.MATHML:{if(pT.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Ld)}hasInListItemScope(t){return this.hasInDynamicScope(t,E8)}hasInButtonScope(t){return this.hasInDynamicScope(t,y8)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case fe.HTML:{if(k0.has(n))return!0;if(Ld.has(n))return!1;break}case fe.SVG:{if(gT.has(n))return!1;break}case fe.MATHML:{if(pT.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===fe.HTML)switch(this.tagIDs[n]){case t:return!0;case x.TABLE:case x.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===fe.HTML)switch(this.tagIDs[t]){case x.TBODY:case x.THEAD:case x.TFOOT:return!0;case x.TABLE:case x.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===fe.HTML)switch(this.tagIDs[n]){case t:return!0;case x.OPTION:case x.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&NC.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&mT.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&mT.has(this.currentTagId);)this.pop()}}const wp=3;var Lr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Lr||(Lr={}));const bT={type:Lr.Marker};class A8{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],i=n.length,o=this.treeAdapter.getTagName(t),l=this.treeAdapter.getNamespaceURI(t);for(let c=0;c<this.entries.length;c++){const d=this.entries[c];if(d.type===Lr.Marker)break;const{element:h}=d;if(this.treeAdapter.getTagName(h)===o&&this.treeAdapter.getNamespaceURI(h)===l){const p=this.treeAdapter.getAttrList(h);p.length===i&&r.push({idx:c,attrs:p})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<wp)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<wp)return;const i=new Map(n.map(l=>[l.name,l.value]));let o=0;for(let l=0;l<r.length;l++){const c=r[l];c.attrs.every(d=>i.get(d.name)===d.value)&&(o+=1,o>=wp&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(bT)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Lr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Lr.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(bT);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Lr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Lr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Lr.Element&&n.element===t)}}const Xa={createDocument(){return{nodeName:"#document",mode:nr.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(o=>o.nodeName==="#documentType");if(i)i.name=t,i.publicId=n,i.systemId=r;else{const o={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};Xa.appendChild(e,o)}},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(Xa.isTextNode(n)){n.value+=t;return}}Xa.appendChild(e,Xa.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Xa.isTextNode(r)?r.value+=t:Xa.insertBefore(e,Xa.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}}},RC="html",C8="about:legacy-compat",w8="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",OC=["+//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//"],k8=[...OC,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],N8=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),LC=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],R8=[...LC,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function ET(e,t){return t.some(n=>e.startsWith(n))}function O8(e){return e.name===RC&&e.publicId===null&&(e.systemId===null||e.systemId===C8)}function L8(e){if(e.name!==RC)return nr.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===w8)return nr.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),N8.has(n))return nr.QUIRKS;let r=t===null?k8:OC;if(ET(n,r))return nr.QUIRKS;if(r=t===null?LC:R8,ET(n,r))return nr.LIMITED_QUIRKS}return nr.NO_QUIRKS}const yT={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},I8="definitionurl",D8="definitionURL",M8=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])),P8=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:fe.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:fe.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:fe.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:fe.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:fe.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:fe.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:fe.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:fe.XML}],["xml:space",{prefix:"xml",name:"space",namespace:fe.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:fe.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:fe.XMLNS}]]),B8=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])),j8=new Set([x.B,x.BIG,x.BLOCKQUOTE,x.BODY,x.BR,x.CENTER,x.CODE,x.DD,x.DIV,x.DL,x.DT,x.EM,x.EMBED,x.H1,x.H2,x.H3,x.H4,x.H5,x.H6,x.HEAD,x.HR,x.I,x.IMG,x.LI,x.LISTING,x.MENU,x.META,x.NOBR,x.OL,x.P,x.PRE,x.RUBY,x.S,x.SMALL,x.SPAN,x.STRONG,x.STRIKE,x.SUB,x.SUP,x.TABLE,x.TT,x.U,x.UL,x.VAR]);function U8(e){const t=e.tagID;return t===x.FONT&&e.attrs.some(({name:r})=>r===Gi.COLOR||r===Gi.SIZE||r===Gi.FACE)||j8.has(t)}function IC(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===I8){e.attrs[t].name=D8;break}}function DC(e){for(let t=0;t<e.attrs.length;t++){const n=M8.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function n1(e){for(let t=0;t<e.attrs.length;t++){const n=P8.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 H8(e){const t=B8.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=_o(e.tagName))}function z8(e,t){return t===fe.MATHML&&(e===x.MI||e===x.MO||e===x.MN||e===x.MS||e===x.MTEXT)}function F8(e,t,n){if(t===fe.MATHML&&e===x.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Gi.ENCODING){const i=n[r].value.toLowerCase();return i===yT.TEXT_HTML||i===yT.APPLICATION_XML}}return t===fe.SVG&&(e===x.FOREIGN_OBJECT||e===x.DESC||e===x.TITLE)}function $8(e,t,n,r){return(!r||r===fe.HTML)&&F8(e,t,n)||(!r||r===fe.MATHML)&&z8(e,t)}const V8="hidden",G8=8,q8=3;var H;(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"})(H||(H={}));const Y8={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},MC=new Set([x.TABLE,x.TBODY,x.TFOOT,x.THEAD,x.TR]),_T={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Xa,onParseError:null};class xT{constructor(t,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=H.INITIAL,this.originalInsertionMode=H.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={..._T,...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 b8(this.options,this),this.activeFormattingElements=new A8(this.treeAdapter),this.fragmentContextID=r?_o(this.treeAdapter.getTagName(r)):x.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new S8(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={..._T,...n};t??(t=r.treeAdapter.createElement(Q.TEMPLATE,fe.HTML,[]));const i=r.treeAdapter.createElement("documentmock",fe.HTML,[]),o=new this(r,i,t);return o.fragmentContextID===x.TEMPLATE&&o.tmplInsertionModeStack.unshift(H.IN_TEMPLATE),o._initTokenizerForFragmentParsing(),o._insertFakeRootElement(),o._resetInsertionMode(),o._findFormInFragmentContext(),o}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 o=(i=t.location)!==null&&i!==void 0?i:Y8,l={code:n,startLine:o.startLine,startCol:o.startCol,startOffset:o.startOffset,endLine:r?o.startLine:o.endLine,endCol:r?o.startCol:o.endCol,endOffset:r?o.startOffset:o.endOffset};this.onParseError(l)}onItemPush(t,n,r){var i,o;(o=(i=this.treeAdapter).onItemPush)===null||o===void 0||o.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 o,l;this.openElements.stackTop===0&&this.fragmentContext?(o=this.fragmentContext,l=this.fragmentContextID):{current:o,currentTagId:l}=this.openElements,this._setContextModes(o,l)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===fe.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,fe.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=H.TEXT}switchToPlaintextParsing(){this.insertionMode=H.TEXT,this.originalInsertionMode=H.IN_BODY,this.tokenizer.state=It.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)===Q.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==fe.HTML))switch(this.fragmentContextID){case x.TITLE:case x.TEXTAREA:{this.tokenizer.state=It.RCDATA;break}case x.STYLE:case x.XMP:case x.IFRAME:case x.NOEMBED:case x.NOFRAMES:case x.NOSCRIPT:{this.tokenizer.state=It.RAWTEXT;break}case x.SCRIPT:{this.tokenizer.state=It.SCRIPT_DATA;break}case x.PLAINTEXT:{this.tokenizer.state=It.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 l=this.treeAdapter.getChildNodes(this.document).find(c=>this.treeAdapter.isDocumentTypeNode(c));l&&this.treeAdapter.setNodeSourceCodeLocation(l,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,fe.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,fe.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(Q.HTML,fe.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,x.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),o=r?i.lastIndexOf(r):i.length,l=i[o-1];if(this.treeAdapter.getNodeSourceCodeLocation(l)){const{endLine:d,endCol:h,endOffset:p}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(l,{endLine:d,endCol:h,endOffset:p})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(l,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),o=n.type===Fe.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,o)}}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===x.SVG&&this.treeAdapter.getTagName(n)===Q.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===fe.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===x.MGLYPH||t.tagID===x.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,fe.HTML)}_processToken(t){switch(t.type){case Fe.CHARACTER:{this.onCharacter(t);break}case Fe.NULL_CHARACTER:{this.onNullCharacter(t);break}case Fe.COMMENT:{this.onComment(t);break}case Fe.DOCTYPE:{this.onDoctype(t);break}case Fe.START_TAG:{this._processStartTag(t);break}case Fe.END_TAG:{this.onEndTag(t);break}case Fe.EOF:{this.onEof(t);break}case Fe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),o=this.treeAdapter.getAttrList(n);return $8(t,i,o,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===Lr.Marker||this.openElements.contains(i.element)),r=n===-1?t-1:n-1;for(let i=r;i>=0;i--){const o=this.activeFormattingElements.entries[i];this._insertElement(o.token,this.treeAdapter.getNamespaceURI(o.element)),o.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=H.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(x.P),this.openElements.popUntilTagNamePopped(x.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case x.TR:{this.insertionMode=H.IN_ROW;return}case x.TBODY:case x.THEAD:case x.TFOOT:{this.insertionMode=H.IN_TABLE_BODY;return}case x.CAPTION:{this.insertionMode=H.IN_CAPTION;return}case x.COLGROUP:{this.insertionMode=H.IN_COLUMN_GROUP;return}case x.TABLE:{this.insertionMode=H.IN_TABLE;return}case x.BODY:{this.insertionMode=H.IN_BODY;return}case x.FRAMESET:{this.insertionMode=H.IN_FRAMESET;return}case x.SELECT:{this._resetInsertionModeForSelect(t);return}case x.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case x.HTML:{this.insertionMode=this.headElement?H.AFTER_HEAD:H.BEFORE_HEAD;return}case x.TD:case x.TH:{if(t>0){this.insertionMode=H.IN_CELL;return}break}case x.HEAD:{if(t>0){this.insertionMode=H.IN_HEAD;return}break}}this.insertionMode=H.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===x.TEMPLATE)break;if(r===x.TABLE){this.insertionMode=H.IN_SELECT_IN_TABLE;return}}this.insertionMode=H.IN_SELECT}_isElementCausesFosterParenting(t){return MC.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 x.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===fe.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case x.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 h8[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){v9(this,t);return}switch(this.insertionMode){case H.INITIAL:{Tl(this,t);break}case H.BEFORE_HTML:{Bl(this,t);break}case H.BEFORE_HEAD:{jl(this,t);break}case H.IN_HEAD:{Ul(this,t);break}case H.IN_HEAD_NO_SCRIPT:{Hl(this,t);break}case H.AFTER_HEAD:{zl(this,t);break}case H.IN_BODY:case H.IN_CAPTION:case H.IN_CELL:case H.IN_TEMPLATE:{BC(this,t);break}case H.TEXT:case H.IN_SELECT:case H.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case H.IN_TABLE:case H.IN_TABLE_BODY:case H.IN_ROW:{kp(this,t);break}case H.IN_TABLE_TEXT:{$C(this,t);break}case H.IN_COLUMN_GROUP:{Id(this,t);break}case H.AFTER_BODY:{Dd(this,t);break}case H.AFTER_AFTER_BODY:{gd(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){T9(this,t);return}switch(this.insertionMode){case H.INITIAL:{Tl(this,t);break}case H.BEFORE_HTML:{Bl(this,t);break}case H.BEFORE_HEAD:{jl(this,t);break}case H.IN_HEAD:{Ul(this,t);break}case H.IN_HEAD_NO_SCRIPT:{Hl(this,t);break}case H.AFTER_HEAD:{zl(this,t);break}case H.TEXT:{this._insertCharacters(t);break}case H.IN_TABLE:case H.IN_TABLE_BODY:case H.IN_ROW:{kp(this,t);break}case H.IN_COLUMN_GROUP:{Id(this,t);break}case H.AFTER_BODY:{Dd(this,t);break}case H.AFTER_AFTER_BODY:{gd(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){N0(this,t);return}switch(this.insertionMode){case H.INITIAL:case H.BEFORE_HTML:case H.BEFORE_HEAD:case H.IN_HEAD:case H.IN_HEAD_NO_SCRIPT:case H.AFTER_HEAD:case H.IN_BODY:case H.IN_TABLE:case H.IN_CAPTION:case H.IN_COLUMN_GROUP:case H.IN_TABLE_BODY:case H.IN_ROW:case H.IN_CELL:case H.IN_SELECT:case H.IN_SELECT_IN_TABLE:case H.IN_TEMPLATE:case H.IN_FRAMESET:case H.AFTER_FRAMESET:{N0(this,t);break}case H.IN_TABLE_TEXT:{vl(this,t);break}case H.AFTER_BODY:{eP(this,t);break}case H.AFTER_AFTER_BODY:case H.AFTER_AFTER_FRAMESET:{tP(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case H.INITIAL:{nP(this,t);break}case H.BEFORE_HEAD:case H.IN_HEAD:case H.IN_HEAD_NO_SCRIPT:case H.AFTER_HEAD:{this._err(t,ae.misplacedDoctype);break}case H.IN_TABLE_TEXT:{vl(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,ae.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?S9(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case H.INITIAL:{Tl(this,t);break}case H.BEFORE_HTML:{rP(this,t);break}case H.BEFORE_HEAD:{iP(this,t);break}case H.IN_HEAD:{_r(this,t);break}case H.IN_HEAD_NO_SCRIPT:{lP(this,t);break}case H.AFTER_HEAD:{cP(this,t);break}case H.IN_BODY:{un(this,t);break}case H.IN_TABLE:{ho(this,t);break}case H.IN_TABLE_TEXT:{vl(this,t);break}case H.IN_CAPTION:{s9(this,t);break}case H.IN_COLUMN_GROUP:{i1(this,t);break}case H.IN_TABLE_BODY:{Tf(this,t);break}case H.IN_ROW:{vf(this,t);break}case H.IN_CELL:{u9(this,t);break}case H.IN_SELECT:{qC(this,t);break}case H.IN_SELECT_IN_TABLE:{d9(this,t);break}case H.IN_TEMPLATE:{h9(this,t);break}case H.AFTER_BODY:{p9(this,t);break}case H.IN_FRAMESET:{g9(this,t);break}case H.AFTER_FRAMESET:{E9(this,t);break}case H.AFTER_AFTER_BODY:{_9(this,t);break}case H.AFTER_AFTER_FRAMESET:{x9(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?A9(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case H.INITIAL:{Tl(this,t);break}case H.BEFORE_HTML:{aP(this,t);break}case H.BEFORE_HEAD:{sP(this,t);break}case H.IN_HEAD:{oP(this,t);break}case H.IN_HEAD_NO_SCRIPT:{uP(this,t);break}case H.AFTER_HEAD:{dP(this,t);break}case H.IN_BODY:{xf(this,t);break}case H.TEXT:{WP(this,t);break}case H.IN_TABLE:{Ql(this,t);break}case H.IN_TABLE_TEXT:{vl(this,t);break}case H.IN_CAPTION:{o9(this,t);break}case H.IN_COLUMN_GROUP:{l9(this,t);break}case H.IN_TABLE_BODY:{R0(this,t);break}case H.IN_ROW:{GC(this,t);break}case H.IN_CELL:{c9(this,t);break}case H.IN_SELECT:{YC(this,t);break}case H.IN_SELECT_IN_TABLE:{f9(this,t);break}case H.IN_TEMPLATE:{m9(this,t);break}case H.AFTER_BODY:{QC(this,t);break}case H.IN_FRAMESET:{b9(this,t);break}case H.AFTER_FRAMESET:{y9(this,t);break}case H.AFTER_AFTER_BODY:{gd(this,t);break}}}onEof(t){switch(this.insertionMode){case H.INITIAL:{Tl(this,t);break}case H.BEFORE_HTML:{Bl(this,t);break}case H.BEFORE_HEAD:{jl(this,t);break}case H.IN_HEAD:{Ul(this,t);break}case H.IN_HEAD_NO_SCRIPT:{Hl(this,t);break}case H.AFTER_HEAD:{zl(this,t);break}case H.IN_BODY:case H.IN_TABLE:case H.IN_CAPTION:case H.IN_COLUMN_GROUP:case H.IN_TABLE_BODY:case H.IN_ROW:case H.IN_CELL:case H.IN_SELECT:case H.IN_SELECT_IN_TABLE:{zC(this,t);break}case H.TEXT:{KP(this,t);break}case H.IN_TABLE_TEXT:{vl(this,t);break}case H.IN_TEMPLATE:{XC(this,t);break}case H.AFTER_BODY:case H.IN_FRAMESET:case H.AFTER_FRAMESET:case H.AFTER_AFTER_BODY:case H.AFTER_AFTER_FRAMESET:{a1(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===I.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 H.IN_HEAD:case H.IN_HEAD_NO_SCRIPT:case H.AFTER_HEAD:case H.TEXT:case H.IN_COLUMN_GROUP:case H.IN_SELECT:case H.IN_SELECT_IN_TABLE:case H.IN_FRAMESET:case H.AFTER_FRAMESET:{this._insertCharacters(t);break}case H.IN_BODY:case H.IN_CAPTION:case H.IN_CELL:case H.IN_TEMPLATE:case H.AFTER_BODY:case H.AFTER_AFTER_BODY:case H.AFTER_AFTER_FRAMESET:{PC(this,t);break}case H.IN_TABLE:case H.IN_TABLE_BODY:case H.IN_ROW:{kp(this,t);break}case H.IN_TABLE_TEXT:{FC(this,t);break}}}}function X8(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):HC(e,t),n}function Q8(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 W8(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let o=0,l=i;l!==n;o++,l=i){i=e.openElements.getCommonAncestor(l);const c=e.activeFormattingElements.getElementEntry(l),d=c&&o>=q8;!c||d?(d&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(l)):(l=K8(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(l,r),r=l)}return r}function K8(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 Z8(e,t,n){const r=e.treeAdapter.getTagName(t),i=_o(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const o=e.treeAdapter.getNamespaceURI(t);i===x.TEMPLATE&&o===fe.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function J8(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,o=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,o),e.treeAdapter.appendChild(t,o),e.activeFormattingElements.insertElementAfterBookmark(o,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,o,i.tagID)}function r1(e,t){for(let n=0;n<G8;n++){const r=X8(e,t);if(!r)break;const i=Q8(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const o=W8(e,i,r.element),l=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(o),l&&Z8(e,l,o),J8(e,i,r)}}function N0(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function eP(e,t){e._appendCommentNode(t,e.openElements.items[0])}function tP(e,t){e._appendCommentNode(t,e.document)}function a1(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 o=e.openElements.items[1],l=e.treeAdapter.getNodeSourceCodeLocation(o);l&&!l.endTag&&e._setEndLocation(o,t)}}}}function nP(e,t){e._setDocumentType(t);const n=t.forceQuirks?nr.QUIRKS:L8(t);O8(t)||e._err(t,ae.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=H.BEFORE_HTML}function Tl(e,t){e._err(t,ae.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,nr.QUIRKS),e.insertionMode=H.BEFORE_HTML,e._processToken(t)}function rP(e,t){t.tagID===x.HTML?(e._insertElement(t,fe.HTML),e.insertionMode=H.BEFORE_HEAD):Bl(e,t)}function aP(e,t){const n=t.tagID;(n===x.HTML||n===x.HEAD||n===x.BODY||n===x.BR)&&Bl(e,t)}function Bl(e,t){e._insertFakeRootElement(),e.insertionMode=H.BEFORE_HEAD,e._processToken(t)}function iP(e,t){switch(t.tagID){case x.HTML:{un(e,t);break}case x.HEAD:{e._insertElement(t,fe.HTML),e.headElement=e.openElements.current,e.insertionMode=H.IN_HEAD;break}default:jl(e,t)}}function sP(e,t){const n=t.tagID;n===x.HEAD||n===x.BODY||n===x.HTML||n===x.BR?jl(e,t):e._err(t,ae.endTagWithoutMatchingOpenElement)}function jl(e,t){e._insertFakeElement(Q.HEAD,x.HEAD),e.headElement=e.openElements.current,e.insertionMode=H.IN_HEAD,e._processToken(t)}function _r(e,t){switch(t.tagID){case x.HTML:{un(e,t);break}case x.BASE:case x.BASEFONT:case x.BGSOUND:case x.LINK:case x.META:{e._appendElement(t,fe.HTML),t.ackSelfClosing=!0;break}case x.TITLE:{e._switchToTextParsing(t,It.RCDATA);break}case x.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,It.RAWTEXT):(e._insertElement(t,fe.HTML),e.insertionMode=H.IN_HEAD_NO_SCRIPT);break}case x.NOFRAMES:case x.STYLE:{e._switchToTextParsing(t,It.RAWTEXT);break}case x.SCRIPT:{e._switchToTextParsing(t,It.SCRIPT_DATA);break}case x.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=H.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(H.IN_TEMPLATE);break}case x.HEAD:{e._err(t,ae.misplacedStartTagForHeadElement);break}default:Ul(e,t)}}function oP(e,t){switch(t.tagID){case x.HEAD:{e.openElements.pop(),e.insertionMode=H.AFTER_HEAD;break}case x.BODY:case x.BR:case x.HTML:{Ul(e,t);break}case x.TEMPLATE:{is(e,t);break}default:e._err(t,ae.endTagWithoutMatchingOpenElement)}}function is(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==x.TEMPLATE&&e._err(t,ae.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(x.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,ae.endTagWithoutMatchingOpenElement)}function Ul(e,t){e.openElements.pop(),e.insertionMode=H.AFTER_HEAD,e._processToken(t)}function lP(e,t){switch(t.tagID){case x.HTML:{un(e,t);break}case x.BASEFONT:case x.BGSOUND:case x.HEAD:case x.LINK:case x.META:case x.NOFRAMES:case x.STYLE:{_r(e,t);break}case x.NOSCRIPT:{e._err(t,ae.nestedNoscriptInHead);break}default:Hl(e,t)}}function uP(e,t){switch(t.tagID){case x.NOSCRIPT:{e.openElements.pop(),e.insertionMode=H.IN_HEAD;break}case x.BR:{Hl(e,t);break}default:e._err(t,ae.endTagWithoutMatchingOpenElement)}}function Hl(e,t){const n=t.type===Fe.EOF?ae.openElementsLeftAfterEof:ae.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=H.IN_HEAD,e._processToken(t)}function cP(e,t){switch(t.tagID){case x.HTML:{un(e,t);break}case x.BODY:{e._insertElement(t,fe.HTML),e.framesetOk=!1,e.insertionMode=H.IN_BODY;break}case x.FRAMESET:{e._insertElement(t,fe.HTML),e.insertionMode=H.IN_FRAMESET;break}case x.BASE:case x.BASEFONT:case x.BGSOUND:case x.LINK:case x.META:case x.NOFRAMES:case x.SCRIPT:case x.STYLE:case x.TEMPLATE:case x.TITLE:{e._err(t,ae.abandonedHeadElementChild),e.openElements.push(e.headElement,x.HEAD),_r(e,t),e.openElements.remove(e.headElement);break}case x.HEAD:{e._err(t,ae.misplacedStartTagForHeadElement);break}default:zl(e,t)}}function dP(e,t){switch(t.tagID){case x.BODY:case x.HTML:case x.BR:{zl(e,t);break}case x.TEMPLATE:{is(e,t);break}default:e._err(t,ae.endTagWithoutMatchingOpenElement)}}function zl(e,t){e._insertFakeElement(Q.BODY,x.BODY),e.insertionMode=H.IN_BODY,_f(e,t)}function _f(e,t){switch(t.type){case Fe.CHARACTER:{BC(e,t);break}case Fe.WHITESPACE_CHARACTER:{PC(e,t);break}case Fe.COMMENT:{N0(e,t);break}case Fe.START_TAG:{un(e,t);break}case Fe.END_TAG:{xf(e,t);break}case Fe.EOF:{zC(e,t);break}}}function PC(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function BC(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function fP(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function hP(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function mP(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,fe.HTML),e.insertionMode=H.IN_FRAMESET)}function pP(e,t){e.openElements.hasInButtonScope(x.P)&&e._closePElement(),e._insertElement(t,fe.HTML)}function gP(e,t){e.openElements.hasInButtonScope(x.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&k0.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,fe.HTML)}function bP(e,t){e.openElements.hasInButtonScope(x.P)&&e._closePElement(),e._insertElement(t,fe.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function EP(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(x.P)&&e._closePElement(),e._insertElement(t,fe.HTML),n||(e.formElement=e.openElements.current))}function yP(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===x.LI&&i===x.LI||(n===x.DD||n===x.DT)&&(i===x.DD||i===x.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==x.ADDRESS&&i!==x.DIV&&i!==x.P&&e._isSpecialElement(e.openElements.items[r],i))break}e.openElements.hasInButtonScope(x.P)&&e._closePElement(),e._insertElement(t,fe.HTML)}function _P(e,t){e.openElements.hasInButtonScope(x.P)&&e._closePElement(),e._insertElement(t,fe.HTML),e.tokenizer.state=It.PLAINTEXT}function xP(e,t){e.openElements.hasInScope(x.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(x.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,fe.HTML),e.framesetOk=!1}function TP(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(Q.A);n&&(r1(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,fe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function vP(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,fe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function SP(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(x.NOBR)&&(r1(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,fe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function AP(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,fe.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function CP(e,t){e.treeAdapter.getDocumentMode(e.document)!==nr.QUIRKS&&e.openElements.hasInButtonScope(x.P)&&e._closePElement(),e._insertElement(t,fe.HTML),e.framesetOk=!1,e.insertionMode=H.IN_TABLE}function jC(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,fe.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function UC(e){const t=wC(e,Gi.TYPE);return t!=null&&t.toLowerCase()===V8}function wP(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,fe.HTML),UC(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function kP(e,t){e._appendElement(t,fe.HTML),t.ackSelfClosing=!0}function NP(e,t){e.openElements.hasInButtonScope(x.P)&&e._closePElement(),e._appendElement(t,fe.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function RP(e,t){t.tagName=Q.IMG,t.tagID=x.IMG,jC(e,t)}function OP(e,t){e._insertElement(t,fe.HTML),e.skipNextNewLine=!0,e.tokenizer.state=It.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=H.TEXT}function LP(e,t){e.openElements.hasInButtonScope(x.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,It.RAWTEXT)}function IP(e,t){e.framesetOk=!1,e._switchToTextParsing(t,It.RAWTEXT)}function TT(e,t){e._switchToTextParsing(t,It.RAWTEXT)}function DP(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,fe.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===H.IN_TABLE||e.insertionMode===H.IN_CAPTION||e.insertionMode===H.IN_TABLE_BODY||e.insertionMode===H.IN_ROW||e.insertionMode===H.IN_CELL?H.IN_SELECT_IN_TABLE:H.IN_SELECT}function MP(e,t){e.openElements.currentTagId===x.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,fe.HTML)}function PP(e,t){e.openElements.hasInScope(x.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,fe.HTML)}function BP(e,t){e.openElements.hasInScope(x.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(x.RTC),e._insertElement(t,fe.HTML)}function jP(e,t){e._reconstructActiveFormattingElements(),IC(t),n1(t),t.selfClosing?e._appendElement(t,fe.MATHML):e._insertElement(t,fe.MATHML),t.ackSelfClosing=!0}function UP(e,t){e._reconstructActiveFormattingElements(),DC(t),n1(t),t.selfClosing?e._appendElement(t,fe.SVG):e._insertElement(t,fe.SVG),t.ackSelfClosing=!0}function vT(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,fe.HTML)}function un(e,t){switch(t.tagID){case x.I:case x.S:case x.B:case x.U:case x.EM:case x.TT:case x.BIG:case x.CODE:case x.FONT:case x.SMALL:case x.STRIKE:case x.STRONG:{vP(e,t);break}case x.A:{TP(e,t);break}case x.H1:case x.H2:case x.H3:case x.H4:case x.H5:case x.H6:{gP(e,t);break}case x.P:case x.DL:case x.OL:case x.UL:case x.DIV:case x.DIR:case x.NAV:case x.MAIN:case x.MENU:case x.ASIDE:case x.CENTER:case x.FIGURE:case x.FOOTER:case x.HEADER:case x.HGROUP:case x.DIALOG:case x.DETAILS:case x.ADDRESS:case x.ARTICLE:case x.SEARCH:case x.SECTION:case x.SUMMARY:case x.FIELDSET:case x.BLOCKQUOTE:case x.FIGCAPTION:{pP(e,t);break}case x.LI:case x.DD:case x.DT:{yP(e,t);break}case x.BR:case x.IMG:case x.WBR:case x.AREA:case x.EMBED:case x.KEYGEN:{jC(e,t);break}case x.HR:{NP(e,t);break}case x.RB:case x.RTC:{PP(e,t);break}case x.RT:case x.RP:{BP(e,t);break}case x.PRE:case x.LISTING:{bP(e,t);break}case x.XMP:{LP(e,t);break}case x.SVG:{UP(e,t);break}case x.HTML:{fP(e,t);break}case x.BASE:case x.LINK:case x.META:case x.STYLE:case x.TITLE:case x.SCRIPT:case x.BGSOUND:case x.BASEFONT:case x.TEMPLATE:{_r(e,t);break}case x.BODY:{hP(e,t);break}case x.FORM:{EP(e,t);break}case x.NOBR:{SP(e,t);break}case x.MATH:{jP(e,t);break}case x.TABLE:{CP(e,t);break}case x.INPUT:{wP(e,t);break}case x.PARAM:case x.TRACK:case x.SOURCE:{kP(e,t);break}case x.IMAGE:{RP(e,t);break}case x.BUTTON:{xP(e,t);break}case x.APPLET:case x.OBJECT:case x.MARQUEE:{AP(e,t);break}case x.IFRAME:{IP(e,t);break}case x.SELECT:{DP(e,t);break}case x.OPTION:case x.OPTGROUP:{MP(e,t);break}case x.NOEMBED:case x.NOFRAMES:{TT(e,t);break}case x.FRAMESET:{mP(e,t);break}case x.TEXTAREA:{OP(e,t);break}case x.NOSCRIPT:{e.options.scriptingEnabled?TT(e,t):vT(e,t);break}case x.PLAINTEXT:{_P(e,t);break}case x.COL:case x.TH:case x.TD:case x.TR:case x.HEAD:case x.FRAME:case x.TBODY:case x.TFOOT:case x.THEAD:case x.CAPTION:case x.COLGROUP:break;default:vT(e,t)}}function HP(e,t){if(e.openElements.hasInScope(x.BODY)&&(e.insertionMode=H.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function zP(e,t){e.openElements.hasInScope(x.BODY)&&(e.insertionMode=H.AFTER_BODY,QC(e,t))}function FP(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function $P(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(x.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(x.FORM):n&&e.openElements.remove(n))}function VP(e){e.openElements.hasInButtonScope(x.P)||e._insertFakeElement(Q.P,x.P),e._closePElement()}function GP(e){e.openElements.hasInListItemScope(x.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(x.LI),e.openElements.popUntilTagNamePopped(x.LI))}function qP(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function YP(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function XP(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function QP(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(Q.BR,x.BR),e.openElements.pop(),e.framesetOk=!1}function HC(e,t){const n=t.tagName,r=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const o=e.openElements.items[i],l=e.openElements.tagIDs[i];if(r===l&&(r!==x.UNKNOWN||e.treeAdapter.getTagName(o)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(o,l))break}}function xf(e,t){switch(t.tagID){case x.A:case x.B:case x.I:case x.S:case x.U:case x.EM:case x.TT:case x.BIG:case x.CODE:case x.FONT:case x.NOBR:case x.SMALL:case x.STRIKE:case x.STRONG:{r1(e,t);break}case x.P:{VP(e);break}case x.DL:case x.UL:case x.OL:case x.DIR:case x.DIV:case x.NAV:case x.PRE:case x.MAIN:case x.MENU:case x.ASIDE:case x.BUTTON:case x.CENTER:case x.FIGURE:case x.FOOTER:case x.HEADER:case x.HGROUP:case x.DIALOG:case x.ADDRESS:case x.ARTICLE:case x.DETAILS:case x.SEARCH:case x.SECTION:case x.SUMMARY:case x.LISTING:case x.FIELDSET:case x.BLOCKQUOTE:case x.FIGCAPTION:{FP(e,t);break}case x.LI:{GP(e);break}case x.DD:case x.DT:{qP(e,t);break}case x.H1:case x.H2:case x.H3:case x.H4:case x.H5:case x.H6:{YP(e);break}case x.BR:{QP(e);break}case x.BODY:{HP(e,t);break}case x.HTML:{zP(e,t);break}case x.FORM:{$P(e);break}case x.APPLET:case x.OBJECT:case x.MARQUEE:{XP(e,t);break}case x.TEMPLATE:{is(e,t);break}default:HC(e,t)}}function zC(e,t){e.tmplInsertionModeStack.length>0?XC(e,t):a1(e,t)}function WP(e,t){var n;t.tagID===x.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function KP(e,t){e._err(t,ae.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function kp(e,t){if(e.openElements.currentTagId!==void 0&&MC.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=H.IN_TABLE_TEXT,t.type){case Fe.CHARACTER:{$C(e,t);break}case Fe.WHITESPACE_CHARACTER:{FC(e,t);break}}else mu(e,t)}function ZP(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,fe.HTML),e.insertionMode=H.IN_CAPTION}function JP(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,fe.HTML),e.insertionMode=H.IN_COLUMN_GROUP}function e9(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Q.COLGROUP,x.COLGROUP),e.insertionMode=H.IN_COLUMN_GROUP,i1(e,t)}function t9(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,fe.HTML),e.insertionMode=H.IN_TABLE_BODY}function n9(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Q.TBODY,x.TBODY),e.insertionMode=H.IN_TABLE_BODY,Tf(e,t)}function r9(e,t){e.openElements.hasInTableScope(x.TABLE)&&(e.openElements.popUntilTagNamePopped(x.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function a9(e,t){UC(t)?e._appendElement(t,fe.HTML):mu(e,t),t.ackSelfClosing=!0}function i9(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,fe.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function ho(e,t){switch(t.tagID){case x.TD:case x.TH:case x.TR:{n9(e,t);break}case x.STYLE:case x.SCRIPT:case x.TEMPLATE:{_r(e,t);break}case x.COL:{e9(e,t);break}case x.FORM:{i9(e,t);break}case x.TABLE:{r9(e,t);break}case x.TBODY:case x.TFOOT:case x.THEAD:{t9(e,t);break}case x.INPUT:{a9(e,t);break}case x.CAPTION:{ZP(e,t);break}case x.COLGROUP:{JP(e,t);break}default:mu(e,t)}}function Ql(e,t){switch(t.tagID){case x.TABLE:{e.openElements.hasInTableScope(x.TABLE)&&(e.openElements.popUntilTagNamePopped(x.TABLE),e._resetInsertionMode());break}case x.TEMPLATE:{is(e,t);break}case x.BODY:case x.CAPTION:case x.COL:case x.COLGROUP:case x.HTML:case x.TBODY:case x.TD:case x.TFOOT:case x.TH:case x.THEAD:case x.TR:break;default:mu(e,t)}}function mu(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,_f(e,t),e.fosterParentingEnabled=n}function FC(e,t){e.pendingCharacterTokens.push(t)}function $C(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function vl(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)mu(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const VC=new Set([x.CAPTION,x.COL,x.COLGROUP,x.TBODY,x.TD,x.TFOOT,x.TH,x.THEAD,x.TR]);function s9(e,t){const n=t.tagID;VC.has(n)?e.openElements.hasInTableScope(x.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(x.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=H.IN_TABLE,ho(e,t)):un(e,t)}function o9(e,t){const n=t.tagID;switch(n){case x.CAPTION:case x.TABLE:{e.openElements.hasInTableScope(x.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(x.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=H.IN_TABLE,n===x.TABLE&&Ql(e,t));break}case x.BODY:case x.COL:case x.COLGROUP:case x.HTML:case x.TBODY:case x.TD:case x.TFOOT:case x.TH:case x.THEAD:case x.TR:break;default:xf(e,t)}}function i1(e,t){switch(t.tagID){case x.HTML:{un(e,t);break}case x.COL:{e._appendElement(t,fe.HTML),t.ackSelfClosing=!0;break}case x.TEMPLATE:{_r(e,t);break}default:Id(e,t)}}function l9(e,t){switch(t.tagID){case x.COLGROUP:{e.openElements.currentTagId===x.COLGROUP&&(e.openElements.pop(),e.insertionMode=H.IN_TABLE);break}case x.TEMPLATE:{is(e,t);break}case x.COL:break;default:Id(e,t)}}function Id(e,t){e.openElements.currentTagId===x.COLGROUP&&(e.openElements.pop(),e.insertionMode=H.IN_TABLE,e._processToken(t))}function Tf(e,t){switch(t.tagID){case x.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,fe.HTML),e.insertionMode=H.IN_ROW;break}case x.TH:case x.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(Q.TR,x.TR),e.insertionMode=H.IN_ROW,vf(e,t);break}case x.CAPTION:case x.COL:case x.COLGROUP:case x.TBODY:case x.TFOOT:case x.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=H.IN_TABLE,ho(e,t));break}default:ho(e,t)}}function R0(e,t){const n=t.tagID;switch(t.tagID){case x.TBODY:case x.TFOOT:case x.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=H.IN_TABLE);break}case x.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=H.IN_TABLE,Ql(e,t));break}case x.BODY:case x.CAPTION:case x.COL:case x.COLGROUP:case x.HTML:case x.TD:case x.TH:case x.TR:break;default:Ql(e,t)}}function vf(e,t){switch(t.tagID){case x.TH:case x.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,fe.HTML),e.insertionMode=H.IN_CELL,e.activeFormattingElements.insertMarker();break}case x.CAPTION:case x.COL:case x.COLGROUP:case x.TBODY:case x.TFOOT:case x.THEAD:case x.TR:{e.openElements.hasInTableScope(x.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=H.IN_TABLE_BODY,Tf(e,t));break}default:ho(e,t)}}function GC(e,t){switch(t.tagID){case x.TR:{e.openElements.hasInTableScope(x.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=H.IN_TABLE_BODY);break}case x.TABLE:{e.openElements.hasInTableScope(x.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=H.IN_TABLE_BODY,R0(e,t));break}case x.TBODY:case x.TFOOT:case x.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(x.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=H.IN_TABLE_BODY,R0(e,t));break}case x.BODY:case x.CAPTION:case x.COL:case x.COLGROUP:case x.HTML:case x.TD:case x.TH:break;default:Ql(e,t)}}function u9(e,t){const n=t.tagID;VC.has(n)?(e.openElements.hasInTableScope(x.TD)||e.openElements.hasInTableScope(x.TH))&&(e._closeTableCell(),vf(e,t)):un(e,t)}function c9(e,t){const n=t.tagID;switch(n){case x.TD:case x.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=H.IN_ROW);break}case x.TABLE:case x.TBODY:case x.TFOOT:case x.THEAD:case x.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),GC(e,t));break}case x.BODY:case x.CAPTION:case x.COL:case x.COLGROUP:case x.HTML:break;default:xf(e,t)}}function qC(e,t){switch(t.tagID){case x.HTML:{un(e,t);break}case x.OPTION:{e.openElements.currentTagId===x.OPTION&&e.openElements.pop(),e._insertElement(t,fe.HTML);break}case x.OPTGROUP:{e.openElements.currentTagId===x.OPTION&&e.openElements.pop(),e.openElements.currentTagId===x.OPTGROUP&&e.openElements.pop(),e._insertElement(t,fe.HTML);break}case x.HR:{e.openElements.currentTagId===x.OPTION&&e.openElements.pop(),e.openElements.currentTagId===x.OPTGROUP&&e.openElements.pop(),e._appendElement(t,fe.HTML),t.ackSelfClosing=!0;break}case x.INPUT:case x.KEYGEN:case x.TEXTAREA:case x.SELECT:{e.openElements.hasInSelectScope(x.SELECT)&&(e.openElements.popUntilTagNamePopped(x.SELECT),e._resetInsertionMode(),t.tagID!==x.SELECT&&e._processStartTag(t));break}case x.SCRIPT:case x.TEMPLATE:{_r(e,t);break}}}function YC(e,t){switch(t.tagID){case x.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===x.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===x.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===x.OPTGROUP&&e.openElements.pop();break}case x.OPTION:{e.openElements.currentTagId===x.OPTION&&e.openElements.pop();break}case x.SELECT:{e.openElements.hasInSelectScope(x.SELECT)&&(e.openElements.popUntilTagNamePopped(x.SELECT),e._resetInsertionMode());break}case x.TEMPLATE:{is(e,t);break}}}function d9(e,t){const n=t.tagID;n===x.CAPTION||n===x.TABLE||n===x.TBODY||n===x.TFOOT||n===x.THEAD||n===x.TR||n===x.TD||n===x.TH?(e.openElements.popUntilTagNamePopped(x.SELECT),e._resetInsertionMode(),e._processStartTag(t)):qC(e,t)}function f9(e,t){const n=t.tagID;n===x.CAPTION||n===x.TABLE||n===x.TBODY||n===x.TFOOT||n===x.THEAD||n===x.TR||n===x.TD||n===x.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(x.SELECT),e._resetInsertionMode(),e.onEndTag(t)):YC(e,t)}function h9(e,t){switch(t.tagID){case x.BASE:case x.BASEFONT:case x.BGSOUND:case x.LINK:case x.META:case x.NOFRAMES:case x.SCRIPT:case x.STYLE:case x.TEMPLATE:case x.TITLE:{_r(e,t);break}case x.CAPTION:case x.COLGROUP:case x.TBODY:case x.TFOOT:case x.THEAD:{e.tmplInsertionModeStack[0]=H.IN_TABLE,e.insertionMode=H.IN_TABLE,ho(e,t);break}case x.COL:{e.tmplInsertionModeStack[0]=H.IN_COLUMN_GROUP,e.insertionMode=H.IN_COLUMN_GROUP,i1(e,t);break}case x.TR:{e.tmplInsertionModeStack[0]=H.IN_TABLE_BODY,e.insertionMode=H.IN_TABLE_BODY,Tf(e,t);break}case x.TD:case x.TH:{e.tmplInsertionModeStack[0]=H.IN_ROW,e.insertionMode=H.IN_ROW,vf(e,t);break}default:e.tmplInsertionModeStack[0]=H.IN_BODY,e.insertionMode=H.IN_BODY,un(e,t)}}function m9(e,t){t.tagID===x.TEMPLATE&&is(e,t)}function XC(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(x.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):a1(e,t)}function p9(e,t){t.tagID===x.HTML?un(e,t):Dd(e,t)}function QC(e,t){var n;if(t.tagID===x.HTML){if(e.fragmentContext||(e.insertionMode=H.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===x.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 Dd(e,t)}function Dd(e,t){e.insertionMode=H.IN_BODY,_f(e,t)}function g9(e,t){switch(t.tagID){case x.HTML:{un(e,t);break}case x.FRAMESET:{e._insertElement(t,fe.HTML);break}case x.FRAME:{e._appendElement(t,fe.HTML),t.ackSelfClosing=!0;break}case x.NOFRAMES:{_r(e,t);break}}}function b9(e,t){t.tagID===x.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==x.FRAMESET&&(e.insertionMode=H.AFTER_FRAMESET))}function E9(e,t){switch(t.tagID){case x.HTML:{un(e,t);break}case x.NOFRAMES:{_r(e,t);break}}}function y9(e,t){t.tagID===x.HTML&&(e.insertionMode=H.AFTER_AFTER_FRAMESET)}function _9(e,t){t.tagID===x.HTML?un(e,t):gd(e,t)}function gd(e,t){e.insertionMode=H.IN_BODY,_f(e,t)}function x9(e,t){switch(t.tagID){case x.HTML:{un(e,t);break}case x.NOFRAMES:{_r(e,t);break}}}function T9(e,t){t.chars=vt,e._insertCharacters(t)}function v9(e,t){e._insertCharacters(t),e.framesetOk=!1}function WC(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==fe.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function S9(e,t){if(U8(t))WC(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===fe.MATHML?IC(t):r===fe.SVG&&(H8(t),DC(t)),n1(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function A9(e,t){if(t.tagID===x.P||t.tagID===x.BR){WC(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)===fe.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}Q.AREA,Q.BASE,Q.BASEFONT,Q.BGSOUND,Q.BR,Q.COL,Q.EMBED,Q.FRAME,Q.HR,Q.IMG,Q.INPUT,Q.KEYGEN,Q.LINK,Q.META,Q.PARAM,Q.SOURCE,Q.TRACK,Q.WBR;const Sf=KC("end"),Ur=KC("start");function KC(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 ZC(e){const t=Ur(e),n=Sf(e);if(t&&n)return{start:t,end:n}}const C9=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,w9=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),ST={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function JC(e,t){const n=B9(e),r=e1("type",{handlers:{root:k9,element:N9,text:R9,comment:tw,doctype:O9,raw:I9},unknown:D9}),i={parser:n?new xT(ST):xT.getFragmentParser(void 0,ST),handle(c){r(c,i)},stitches:!1,options:t||{}};r(e,i),xo(i,Ur());const o=n?i.parser.document:i.parser.getFragment(),l=UM(o,{file:i.options.file});return i.stitches&&Pr(l,"comment",function(c,d,h){const p=c;if(p.value.stitch&&h&&d!==void 0){const m=h.children;return m[d]=p.value.stitch,d}}),l.type==="root"&&l.children.length===1&&l.children[0].type===e.type?l.children[0]:l}function ew(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function k9(e,t){ew(e.children,t)}function N9(e,t){M9(e,t),ew(e.children,t),P9(e,t)}function R9(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Fe.CHARACTER,chars:e.value,location:pu(e)};xo(t,Ur(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function O9(e,t){const n={type:Fe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:pu(e)};xo(t,Ur(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function L9(e,t){t.stitches=!0;const n=j9(e);if("children"in e&&"children"in n){const r=JC({type:"root",children:e.children},t.options);n.children=r.children}tw({type:"comment",value:{stitch:n}},t)}function tw(e,t){const n=e.value,r={type:Fe.COMMENT,data:n,location:pu(e)};xo(t,Ur(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function I9(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,nw(t,Ur(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(C9,"&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 D9(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))L9(n,t);else{let r="";throw w9.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 xo(e,t){nw(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=It.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 nw(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 M9(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===It.PLAINTEXT)return;xo(t,Ur(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:zi.html;i===zi.html&&n==="svg"&&(i=zi.svg);const o=VM({...e,children:[]},{space:i===zi.svg?"svg":"html"}),l={type:Fe.START_TAG,tagName:n,tagID:_o(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in o?o.attrs:[],location:pu(e)};t.parser.currentToken=l,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function P9(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&vC.includes(n)||t.parser.tokenizer.state===It.PLAINTEXT)return;xo(t,Sf(e));const r={type:Fe.END_TAG,tagName:n,tagID:_o(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:pu(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===It.RCDATA||t.parser.tokenizer.state===It.RAWTEXT||t.parser.tokenizer.state===It.SCRIPT_DATA)&&(t.parser.tokenizer.state=It.DATA)}function B9(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function pu(e){const t=Ur(e)||{line:void 0,column:void 0,offset:void 0},n=Sf(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 j9(e){return"children"in e?Qi({...e,children:[]}):Qi(e)}function O0(e){return function(t,n){return JC(t,{...e,file:n})}}const Ii=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],ji={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Ii,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Ii],h2:[["className","sr-only"]],img:[...Ii,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Ii,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Ii],table:[...Ii],ul:[...Ii,["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"]},Ka={}.hasOwnProperty;function U9(e,t){let n={type:"root",children:[]};const r={schema:t?{...ji,...t}:ji,stack:[]},i=rw(r,e);return i&&(Array.isArray(i)?i.length===1?n=i[0]:n.children=i:n=i),n}function rw(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return H9(e,n);case"doctype":return z9(e,n);case"element":return F9(e,n);case"root":return $9(e,n);case"text":return V9(e,n)}}}function H9(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),o={type:"comment",value:r<0?n:n.slice(0,r)};return gu(o,t),o}}function z9(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return gu(n,t),n}}function F9(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=aw(e,t.children),i=G9(e,t.properties);e.stack.pop();let o=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(o=!0,e.schema.ancestors&&Ka.call(e.schema.ancestors,n))){const c=e.schema.ancestors[n];let d=-1;for(o=!1;++d<c.length;)e.stack.includes(c[d])&&(o=!0)}if(!o)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const l={type:"element",tagName:n,properties:i,children:r};return gu(l,t),l}function $9(e,t){const r={type:"root",children:aw(e,t.children)};return gu(r,t),r}function V9(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return gu(r,t),r}function aw(e,t){const n=[];if(Array.isArray(t)){const r=t;let i=-1;for(;++i<r.length;){const o=rw(e,r[i]);o&&(Array.isArray(o)?n.push(...o):n.push(o))}}return n}function G9(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,o=r&&Ka.call(r,n)?r[n]:void 0,l=r&&Ka.call(r,"*")?r["*"]:void 0,c=t&&typeof t=="object"?t:{},d={};let h;for(h in c)if(Ka.call(c,h)){const p=c[h];let m=AT(e,CT(o,h),h,p);m==null&&(m=AT(e,CT(l,h),h,p)),m!=null&&(d[h]=m)}if(i&&Ka.call(i,n)){const p=i[n];for(h in p)Ka.call(p,h)&&!Ka.call(d,h)&&(d[h]=p[h])}return d}function AT(e,t,n,r){return t?Array.isArray(r)?q9(e,t,n,r):iw(e,t,n,r):void 0}function q9(e,t,n,r){let i=-1;const o=[];for(;++i<r.length;){const l=iw(e,t,n,r[i]);(typeof l=="number"||typeof l=="string")&&o.push(l)}return o}function iw(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&Y9(e,n,r)){if(typeof t=="object"&&t.length>1){let i=!1,o=0;for(;++o<t.length;){const l=t[o];if(l&&typeof l=="object"&&"flags"in l){if(l.test(String(r))){i=!0;break}}else if(l===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 Y9(e,t,n){const r=e.schema.protocols&&Ka.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const i=String(n),o=i.indexOf(":"),l=i.indexOf("?"),c=i.indexOf("#"),d=i.indexOf("/");if(o<0||d>-1&&o>d||l>-1&&o>l||c>-1&&o>c)return!0;let h=-1;for(;++h<r.length;){const p=r[h];if(o===p.length&&i.slice(0,p.length)===p)return!0}return!1}function gu(e,t){const n=ZC(t);t.data&&(e.data=Qi(t.data)),n&&(e.position=n)}function CT(e,t){let n,r=-1;if(e)for(;++r<e.length;){const i=e[r],o=typeof i=="string"?i:i[0];if(o===t)return i;o==="data*"&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function sw(e){return function(t){return U9(t,e)}}function Md(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 pn=di(/[A-Za-z]/),ln=di(/[\dA-Za-z]/),X9=di(/[#-'*+\--9=?A-Z^-~]/);function Pd(e){return e!==null&&(e<32||e===127)}const L0=di(/\d/),Q9=di(/[\dA-Fa-f]/),W9=di(/[!-/:-@[-`{-~]/);function Re(e){return e!==null&&e<-2}function Et(e){return e!==null&&(e<0||e===32)}function Ye(e){return e===-2||e===-1||e===32}const Af=di(new RegExp("\\p{P}|\\p{S}","u")),Wi=di(/\s/);function di(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function K9(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Z9(e,t,n){const i=bf((n||{}).ignore||[]),o=J9(t);let l=-1;for(;++l<o.length;)Gg(e,"text",c);function c(h,p){let m=-1,_;for(;++m<p.length;){const E=p[m],T=_?_.children:void 0;if(i(E,T?T.indexOf(E):void 0,_))return;_=E}if(_)return d(h,p)}function d(h,p){const m=p[p.length-1],_=o[l][0],E=o[l][1];let T=0;const A=m.children.indexOf(h);let C=!1,k=[];_.lastIndex=0;let N=_.exec(h.value);for(;N;){const M=N.index,B={index:N.index,input:N.input,stack:[...p,h]};let D=E(...N,B);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1?_.lastIndex=M+1:(T!==M&&k.push({type:"text",value:h.value.slice(T,M)}),Array.isArray(D)?k.push(...D):D&&k.push(D),T=M+N[0].length,C=!0),!_.global)break;N=_.exec(h.value)}return C?(T<h.value.length&&k.push({type:"text",value:h.value.slice(T)}),m.children.splice(A,1,...k)):k=[h],A+k.length}}function J9(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([eB(i[0]),tB(i[1])])}return t}function eB(e){return typeof e=="string"?new RegExp(K9(e),"g"):e}function tB(e){return typeof e=="function"?e:function(){return e}}const Np="phrasing",Rp=["autolink","link","image","label"];function nB(){return{transforms:[uB],enter:{literalAutolink:aB,literalAutolinkEmail:Op,literalAutolinkHttp:Op,literalAutolinkWww:Op},exit:{literalAutolink:lB,literalAutolinkEmail:oB,literalAutolinkHttp:iB,literalAutolinkWww:sB}}}function rB(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Np,notInConstruct:Rp},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Np,notInConstruct:Rp},{character:":",before:"[ps]",after:"\\/",inConstruct:Np,notInConstruct:Rp}]}}function aB(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Op(e){this.config.enter.autolinkProtocol.call(this,e)}function iB(e){this.config.exit.autolinkProtocol.call(this,e)}function sB(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 oB(e){this.config.exit.autolinkEmail.call(this,e)}function lB(e){this.exit(e)}function uB(e){Z9(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,cB],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),dB]],{ignore:["link","linkReference"]})}function cB(e,t,n,r,i){let o="";if(!ow(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!fB(n)))return!1;const l=hB(n+r);if(!l[0])return!1;const c={type:"link",title:null,url:o+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[c,{type:"text",value:l[1]}]:c}function dB(e,t,n,r){return!ow(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function fB(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 hB(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=Md(e,"(");let o=Md(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function ow(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Wi(n)||Af(n))&&(!t||n!==47)}function pr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}lw.peek=TB;function mB(){this.buffer()}function pB(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function gB(){this.buffer()}function bB(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function EB(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=pr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function yB(e){this.exit(e)}function _B(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=pr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function xB(e){this.exit(e)}function TB(){return"["}function lw(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const l=n.enter("footnoteReference"),c=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{after:"]",before:o})),c(),l(),o+=i.move("]"),o}function vB(){return{enter:{gfmFootnoteCallString:mB,gfmFootnoteCall:pB,gfmFootnoteDefinitionLabelString:gB,gfmFootnoteDefinition:bB},exit:{gfmFootnoteCallString:EB,gfmFootnoteCall:yB,gfmFootnoteDefinitionLabelString:_B,gfmFootnoteDefinition:xB}}}function SB(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:lw},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,o,l){const c=o.createTracker(l);let d=c.move("[^");const h=o.enter("footnoteDefinition"),p=o.enter("label");return d+=c.move(o.safe(o.associationId(r),{before:d,after:"]"})),p(),d+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),d+=c.move((t?`
52
+ `:" ")+o.indentLines(o.containerFlow(r,c.current()),t?uw:AB))),h(),d}}function AB(e,t,n){return t===0?e:uw(e,t,n)}function uw(e,t,n){return(n?"":" ")+e}const CB=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];cw.peek=OB;function wB(){return{canContainEols:["delete"],enter:{strikethrough:NB},exit:{strikethrough:RB}}}function kB(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:CB}],handlers:{delete:cw}}}function NB(e){this.enter({type:"delete",children:[]},e)}function RB(e){this.exit(e)}function cw(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let l=i.move("~~");return l+=n.containerPhrasing(e,{...i.current(),before:l,after:"~"}),l+=i.move("~~"),o(),l}function OB(){return"~"}function LB(e){return e.length}function IB(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||LB,o=[],l=[],c=[],d=[];let h=0,p=-1;for(;++p<e.length;){const S=[],A=[];let C=-1;for(e[p].length>h&&(h=e[p].length);++C<e[p].length;){const k=DB(e[p][C]);if(n.alignDelimiters!==!1){const N=i(k);A[C]=N,(d[C]===void 0||N>d[C])&&(d[C]=N)}S.push(k)}l[p]=S,c[p]=A}let m=-1;if(typeof r=="object"&&"length"in r)for(;++m<h;)o[m]=wT(r[m]);else{const S=wT(r);for(;++m<h;)o[m]=S}m=-1;const _=[],E=[];for(;++m<h;){const S=o[m];let A="",C="";S===99?(A=":",C=":"):S===108?A=":":S===114&&(C=":");let k=n.alignDelimiters===!1?1:Math.max(1,d[m]-A.length-C.length);const N=A+"-".repeat(k)+C;n.alignDelimiters!==!1&&(k=A.length+k+C.length,k>d[m]&&(d[m]=k),E[m]=k),_[m]=N}l.splice(1,0,_),c.splice(1,0,E),p=-1;const T=[];for(;++p<l.length;){const S=l[p],A=c[p];m=-1;const C=[];for(;++m<h;){const k=S[m]||"";let N="",M="";if(n.alignDelimiters!==!1){const B=d[m]-(A[m]||0),D=o[m];D===114?N=" ".repeat(B):D===99?B%2?(N=" ".repeat(B/2+.5),M=" ".repeat(B/2-.5)):(N=" ".repeat(B/2),M=N):M=" ".repeat(B)}n.delimiterStart!==!1&&!m&&C.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&k==="")&&(n.delimiterStart!==!1||m)&&C.push(" "),n.alignDelimiters!==!1&&C.push(N),C.push(k),n.alignDelimiters!==!1&&C.push(M),n.padding!==!1&&C.push(" "),(n.delimiterEnd!==!1||m!==h-1)&&C.push("|")}T.push(n.delimiterEnd===!1?C.join("").replace(/ +$/,""):C.join(""))}return T.join(`
53
+ `)}function DB(e){return e==null?"":String(e)}function wT(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 MB(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const l=n.indentLines(n.containerFlow(e,o.current()),PB);return i(),l}function PB(e,t,n){return">"+(n?"":" ")+e}function BB(e,t){return kT(e,t.inConstruct,!0)&&!kT(e,t.notInConstruct,!1)}function kT(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 NT(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
54
+ `&&BB(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
55
+ `}function jB(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,l=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>l&&(l=o):o=1,i=r+t.length,r=n.indexOf(t,i);return l}function UB(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 HB(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 zB(e,t,n,r){const i=HB(n),o=e.value||"",l=i==="`"?"GraveAccent":"Tilde";if(UB(e,n)){const m=n.enter("codeIndented"),_=n.indentLines(o,FB);return m(),_}const c=n.createTracker(r),d=i.repeat(Math.max(jB(o,i)+1,3)),h=n.enter("codeFenced");let p=c.move(d);if(e.lang){const m=n.enter(`codeFencedLang${l}`);p+=c.move(n.safe(e.lang,{before:p,after:" ",encode:["`"],...c.current()})),m()}if(e.lang&&e.meta){const m=n.enter(`codeFencedMeta${l}`);p+=c.move(" "),p+=c.move(n.safe(e.meta,{before:p,after:`
56
+ `,encode:["`"],...c.current()})),m()}return p+=c.move(`
57
+ `),o&&(p+=c.move(o+`
58
+ `)),p+=c.move(d),h(),p}function FB(e,t,n){return(n?"":" ")+e}function s1(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 $B(e,t,n,r){const i=s1(n),o=i==='"'?"Quote":"Apostrophe",l=n.enter("definition");let c=n.enter("label");const d=n.createTracker(r);let h=d.move("[");return h+=d.move(n.safe(n.associationId(e),{before:h,after:"]",...d.current()})),h+=d.move("]: "),c(),!e.url||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),h+=d.move("<"),h+=d.move(n.safe(e.url,{before:h,after:">",...d.current()})),h+=d.move(">")):(c=n.enter("destinationRaw"),h+=d.move(n.safe(e.url,{before:h,after:e.title?" ":`
59
+ `,...d.current()}))),c(),e.title&&(c=n.enter(`title${o}`),h+=d.move(" "+i),h+=d.move(n.safe(e.title,{before:h,after:i,...d.current()})),h+=d.move(i),c()),l(),h}function VB(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 Wl(e){return"&#x"+e.toString(16).toUpperCase()+";"}function mo(e){if(e===null||Et(e)||Wi(e))return 1;if(Af(e))return 2}function Bd(e,t,n){const r=mo(e),i=mo(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}}dw.peek=GB;function dw(e,t,n,r){const i=VB(n),o=n.enter("emphasis"),l=n.createTracker(r),c=l.move(i);let d=l.move(n.containerPhrasing(e,{after:i,before:c,...l.current()}));const h=d.charCodeAt(0),p=Bd(r.before.charCodeAt(r.before.length-1),h,i);p.inside&&(d=Wl(h)+d.slice(1));const m=d.charCodeAt(d.length-1),_=Bd(r.after.charCodeAt(0),m,i);_.inside&&(d=d.slice(0,-1)+Wl(m));const E=l.move(i);return o(),n.attentionEncodeSurroundingInfo={after:_.outside,before:p.outside},c+d+E}function GB(e,t,n){return n.options.emphasis||"*"}const qB={};function o1(e,t){const n=qB,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return fw(e,r,i)}function fw(e,t,n){if(YB(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 RT(e.children,t,n)}return Array.isArray(e)?RT(e,t,n):""}function RT(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=fw(e[i],t,n);return r.join("")}function YB(e){return!!(e&&typeof e=="object")}function XB(e,t){let n=!1;return Pr(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,v0}),!!((!e.depth||e.depth<3)&&o1(e)&&(t.options.setext||n))}function QB(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(XB(e,n)){const p=n.enter("headingSetext"),m=n.enter("phrasing"),_=n.containerPhrasing(e,{...o.current(),before:`
60
+ `,after:`
61
+ `});return m(),p(),_+`
62
+ `+(i===1?"=":"-").repeat(_.length-(Math.max(_.lastIndexOf("\r"),_.lastIndexOf(`
63
+ `))+1))}const l="#".repeat(i),c=n.enter("headingAtx"),d=n.enter("phrasing");o.move(l+" ");let h=n.containerPhrasing(e,{before:"# ",after:`
64
+ `,...o.current()});return/^[\t ]/.test(h)&&(h=Wl(h.charCodeAt(0))+h.slice(1)),h=h?l+" "+h:l,n.options.closeAtx&&(h+=" "+l),d(),c(),h}hw.peek=WB;function hw(e){return e.value||""}function WB(){return"<"}mw.peek=KB;function mw(e,t,n,r){const i=s1(n),o=i==='"'?"Quote":"Apostrophe",l=n.enter("image");let c=n.enter("label");const d=n.createTracker(r);let h=d.move("![");return h+=d.move(n.safe(e.alt,{before:h,after:"]",...d.current()})),h+=d.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),h+=d.move("<"),h+=d.move(n.safe(e.url,{before:h,after:">",...d.current()})),h+=d.move(">")):(c=n.enter("destinationRaw"),h+=d.move(n.safe(e.url,{before:h,after:e.title?" ":")",...d.current()}))),c(),e.title&&(c=n.enter(`title${o}`),h+=d.move(" "+i),h+=d.move(n.safe(e.title,{before:h,after:i,...d.current()})),h+=d.move(i),c()),h+=d.move(")"),l(),h}function KB(){return"!"}pw.peek=ZB;function pw(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let l=n.enter("label");const c=n.createTracker(r);let d=c.move("![");const h=n.safe(e.alt,{before:d,after:"]",...c.current()});d+=c.move(h+"]["),l();const p=n.stack;n.stack=[],l=n.enter("reference");const m=n.safe(n.associationId(e),{before:d,after:"]",...c.current()});return l(),n.stack=p,o(),i==="full"||!h||h!==m?d+=c.move(m+"]"):i==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function ZB(){return"!"}gw.peek=JB;function gw(e,t,n){let r=e.value||"",i="`",o=-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+" ");++o<n.unsafe.length;){const l=n.unsafe[o],c=n.compilePattern(l);let d;if(l.atBreak)for(;d=c.exec(r);){let h=d.index;r.charCodeAt(h)===10&&r.charCodeAt(h-1)===13&&h--,r=r.slice(0,h)+" "+r.slice(d.index+1)}}return i+r+i}function JB(){return"`"}function bw(e,t){const n=o1(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))}Ew.peek=e7;function Ew(e,t,n,r){const i=s1(n),o=i==='"'?"Quote":"Apostrophe",l=n.createTracker(r);let c,d;if(bw(e,n)){const p=n.stack;n.stack=[],c=n.enter("autolink");let m=l.move("<");return m+=l.move(n.containerPhrasing(e,{before:m,after:">",...l.current()})),m+=l.move(">"),c(),n.stack=p,m}c=n.enter("link"),d=n.enter("label");let h=l.move("[");return h+=l.move(n.containerPhrasing(e,{before:h,after:"](",...l.current()})),h+=l.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),h+=l.move("<"),h+=l.move(n.safe(e.url,{before:h,after:">",...l.current()})),h+=l.move(">")):(d=n.enter("destinationRaw"),h+=l.move(n.safe(e.url,{before:h,after:e.title?" ":")",...l.current()}))),d(),e.title&&(d=n.enter(`title${o}`),h+=l.move(" "+i),h+=l.move(n.safe(e.title,{before:h,after:i,...l.current()})),h+=l.move(i),d()),h+=l.move(")"),c(),h}function e7(e,t,n){return bw(e,n)?"<":"["}yw.peek=t7;function yw(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let l=n.enter("label");const c=n.createTracker(r);let d=c.move("[");const h=n.containerPhrasing(e,{before:d,after:"]",...c.current()});d+=c.move(h+"]["),l();const p=n.stack;n.stack=[],l=n.enter("reference");const m=n.safe(n.associationId(e),{before:d,after:"]",...c.current()});return l(),n.stack=p,o(),i==="full"||!h||h!==m?d+=c.move(m+"]"):i==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function t7(){return"["}function l1(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 n7(e){const t=l1(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 r7(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 _w(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 a7(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let l=e.ordered?r7(n):l1(n);const c=e.ordered?l==="."?")":".":n7(n);let d=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const p=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&p&&(!p.children||!p.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&&(d=!0),_w(n)===l&&p){let m=-1;for(;++m<e.children.length;){const _=e.children[m];if(_&&_.type==="listItem"&&_.children&&_.children[0]&&_.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(l=c),n.bulletCurrent=l;const h=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=o,i(),h}function i7(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 s7(e,t,n,r){const i=i7(n);let o=n.bulletCurrent||l1(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let l=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const c=n.createTracker(r);c.move(o+" ".repeat(l-o.length)),c.shift(l);const d=n.enter("listItem"),h=n.indentLines(n.containerFlow(e,c.current()),p);return d(),h;function p(m,_,E){return _?(E?"":" ".repeat(l))+m:(E?o:o+" ".repeat(l-o.length))+m}}function o7(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),l=n.containerPhrasing(e,r);return o(),i(),l}const l7=bf(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function u7(e,t,n,r){return(e.children.some(function(l){return l7(l)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function c7(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}xw.peek=d7;function xw(e,t,n,r){const i=c7(n),o=n.enter("strong"),l=n.createTracker(r),c=l.move(i+i);let d=l.move(n.containerPhrasing(e,{after:i,before:c,...l.current()}));const h=d.charCodeAt(0),p=Bd(r.before.charCodeAt(r.before.length-1),h,i);p.inside&&(d=Wl(h)+d.slice(1));const m=d.charCodeAt(d.length-1),_=Bd(r.after.charCodeAt(0),m,i);_.inside&&(d=d.slice(0,-1)+Wl(m));const E=l.move(i+i);return o(),n.attentionEncodeSurroundingInfo={after:_.outside,before:p.outside},c+d+E}function d7(e,t,n){return n.options.strong||"*"}function f7(e,t,n,r){return n.safe(e.value,r)}function h7(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 m7(e,t,n){const r=(_w(n)+(n.options.ruleSpaces?" ":"")).repeat(h7(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Tw={blockquote:MB,break:NT,code:zB,definition:$B,emphasis:dw,hardBreak:NT,heading:QB,html:hw,image:mw,imageReference:pw,inlineCode:gw,link:Ew,linkReference:yw,list:a7,listItem:s7,paragraph:o7,root:u7,strong:xw,text:f7,thematicBreak:m7},OT=document.createElement("i");function u1(e){const t="&"+e+";";OT.innerHTML=t;const n=OT.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function vw(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 p7=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function g7(e){return e.replace(p7,b7)}function b7(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return vw(n.slice(o?2:1),o?16:10)}return u1(n)||e}function E7(){return{enter:{table:y7,tableData:LT,tableHeader:LT,tableRow:x7},exit:{codeText:T7,table:_7,tableData:Lp,tableHeader:Lp,tableRow:Lp}}}function y7(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 _7(e){this.exit(e),this.data.inTable=void 0}function x7(e){this.enter({type:"tableRow",children:[]},e)}function Lp(e){this.exit(e)}function LT(e){this.enter({type:"tableCell",children:[]},e)}function T7(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,v7));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function v7(e,t){return t==="|"?t:e}function S7(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
65
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:_,table:l,tableCell:d,tableRow:c}};function l(E,T,S,A){return h(p(E,S,A),E.align)}function c(E,T,S,A){const C=m(E,S,A),k=h([C]);return k.slice(0,k.indexOf(`
66
+ `))}function d(E,T,S,A){const C=S.enter("tableCell"),k=S.enter("phrasing"),N=S.containerPhrasing(E,{...A,before:o,after:o});return k(),C(),N}function h(E,T){return IB(E,{align:T,alignDelimiters:r,padding:n,stringLength:i})}function p(E,T,S){const A=E.children;let C=-1;const k=[],N=T.enter("table");for(;++C<A.length;)k[C]=m(A[C],T,S);return N(),k}function m(E,T,S){const A=E.children;let C=-1;const k=[],N=T.enter("tableRow");for(;++C<A.length;)k[C]=d(A[C],E,T,S);return N(),k}function _(E,T,S){let A=Tw.inlineCode(E,T,S);return S.stack.includes("tableCell")&&(A=A.replace(/\|/g,"\\$&")),A}}function A7(){return{exit:{taskListCheckValueChecked:IT,taskListCheckValueUnchecked:IT,paragraph:w7}}}function C7(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:k7}}}function IT(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function w7(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 o=-1,l;for(;++o<i.length;){const c=i[o];if(c.type==="paragraph"){l=c;break}}l===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 k7(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);o&&c.move(l);let d=Tw.listItem(e,t,n,{...r,...c.current()});return o&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),d;function h(p){return p+l}}function N7(){return[nB(),vB(),wB(),E7(),A7()]}function R7(e){return{extensions:[rB(),SB(e),kB(),S7(e),C7()]}}function $n(e,t,n,r){const i=e.length;let o=0,l;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);o<r.length;)l=r.slice(o,o+1e4),l.unshift(t,0),e.splice(...l),o+=1e4,t+=1e4}function rr(e,t){return e.length>0?($n(e,e.length,0,t),e):t}const DT={}.hasOwnProperty;function Sw(e){const t={};let n=-1;for(;++n<e.length;)O7(t,e[n]);return t}function O7(e,t){let n;for(n in t){const i=(DT.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let l;if(o)for(l in o){DT.call(i,l)||(i[l]=[]);const c=o[l];L7(i[l],Array.isArray(c)?c:c?[c]:[])}}}function L7(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);$n(e,0,0,r)}const I7={tokenize:U7,partial:!0},Aw={tokenize:H7,partial:!0},Cw={tokenize:z7,partial:!0},ww={tokenize:F7,partial:!0},D7={tokenize:$7,partial:!0},kw={name:"wwwAutolink",tokenize:B7,previous:Rw},Nw={name:"protocolAutolink",tokenize:j7,previous:Ow},ba={name:"emailAutolink",tokenize:P7,previous:Lw},Hr={};function M7(){return{text:Hr}}let Di=48;for(;Di<123;)Hr[Di]=ba,Di++,Di===58?Di=65:Di===91&&(Di=97);Hr[43]=ba;Hr[45]=ba;Hr[46]=ba;Hr[95]=ba;Hr[72]=[ba,Nw];Hr[104]=[ba,Nw];Hr[87]=[ba,kw];Hr[119]=[ba,kw];function P7(e,t,n){const r=this;let i,o;return l;function l(m){return!I0(m)||!Lw.call(r,r.previous)||c1(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(m))}function c(m){return I0(m)?(e.consume(m),c):m===64?(e.consume(m),d):n(m)}function d(m){return m===46?e.check(D7,p,h)(m):m===45||m===95||ln(m)?(o=!0,e.consume(m),d):p(m)}function h(m){return e.consume(m),i=!0,d}function p(m){return o&&i&&pn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function B7(e,t,n){const r=this;return i;function i(l){return l!==87&&l!==119||!Rw.call(r,r.previous)||c1(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(I7,e.attempt(Aw,e.attempt(Cw,o),n),n)(l))}function o(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function j7(e,t,n){const r=this;let i="",o=!1;return l;function l(m){return(m===72||m===104)&&Ow.call(r,r.previous)&&!c1(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(m),e.consume(m),c):n(m)}function c(m){if(pn(m)&&i.length<5)return i+=String.fromCodePoint(m),e.consume(m),c;if(m===58){const _=i.toLowerCase();if(_==="http"||_==="https")return e.consume(m),d}return n(m)}function d(m){return m===47?(e.consume(m),o?h:(o=!0,d)):n(m)}function h(m){return m===null||Pd(m)||Et(m)||Wi(m)||Af(m)?n(m):e.attempt(Aw,e.attempt(Cw,p),n)(m)}function p(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function U7(e,t,n){let r=0;return i;function i(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),i):l===46&&r===3?(e.consume(l),o):n(l)}function o(l){return l===null?n(l):t(l)}}function H7(e,t,n){let r,i,o;return l;function l(h){return h===46||h===95?e.check(ww,d,c)(h):h===null||Et(h)||Wi(h)||h!==45&&Af(h)?d(h):(o=!0,e.consume(h),l)}function c(h){return h===95?r=!0:(i=r,r=void 0),e.consume(h),l}function d(h){return i||r||!o?n(h):t(h)}}function z7(e,t){let n=0,r=0;return i;function i(l){return l===40?(n++,e.consume(l),i):l===41&&r<n?o(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(ww,t,o)(l):l===null||Et(l)||Wi(l)?t(l):(e.consume(l),i)}function o(l){return l===41&&r++,e.consume(l),i}}function F7(e,t,n){return r;function r(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),r):c===38?(e.consume(c),o):c===93?(e.consume(c),i):c===60||c===null||Et(c)||Wi(c)?t(c):n(c)}function i(c){return c===null||c===40||c===91||Et(c)||Wi(c)?t(c):r(c)}function o(c){return pn(c)?l(c):n(c)}function l(c){return c===59?(e.consume(c),r):pn(c)?(e.consume(c),l):n(c)}}function $7(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return ln(o)?n(o):t(o)}}function Rw(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Et(e)}function Ow(e){return!pn(e)}function Lw(e){return!(e===47||I0(e))}function I0(e){return e===43||e===45||e===46||e===95||ln(e)}function c1(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 To(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let l="";if(o===37&&ln(e.charCodeAt(n+1))&&ln(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(l=String.fromCharCode(o));else if(o>55295&&o<57344){const c=e.charCodeAt(n+1);o<56320&&c>56319&&c<57344?(l=String.fromCharCode(o,c),i=1):l="�"}else l=String.fromCharCode(o);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+i+1,l=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Cf(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const D0={name:"attention",resolveAll:V7,tokenize:G7};function V7(e,t){let n=-1,r,i,o,l,c,d,h,p;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;d=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 m={...e[r][1].end},_={...e[n][1].start};MT(m,-d),MT(_,d),l={type:d>1?"strongSequence":"emphasisSequence",start:m,end:{...e[r][1].end}},c={type:d>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:_},o={type:d>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:d>1?"strong":"emphasis",start:{...l.start},end:{...c.end}},e[r][1].end={...l.start},e[n][1].start={...c.end},h=[],e[r][1].end.offset-e[r][1].start.offset&&(h=rr(h,[["enter",e[r][1],t],["exit",e[r][1],t]])),h=rr(h,[["enter",i,t],["enter",l,t],["exit",l,t],["enter",o,t]]),h=rr(h,Cf(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),h=rr(h,[["exit",o,t],["enter",c,t],["exit",c,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,h=rr(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,$n(e,r-1,n-r+3,h),n=r+h.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function G7(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=mo(r);let o;return l;function l(d){return o=d,e.enter("attentionSequence"),c(d)}function c(d){if(d===o)return e.consume(d),c;const h=e.exit("attentionSequence"),p=mo(d),m=!p||p===2&&i||n.includes(d),_=!i||i===2&&p||n.includes(r);return h._open=!!(o===42?m:m&&(i||!_)),h._close=!!(o===42?_:_&&(p||!m)),t(d)}}function MT(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const q7={name:"autolink",tokenize:Y7};function Y7(e,t,n){let r=0;return i;function i(E){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(E),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(E){return pn(E)?(e.consume(E),l):E===64?n(E):h(E)}function l(E){return E===43||E===45||E===46||ln(E)?(r=1,c(E)):h(E)}function c(E){return E===58?(e.consume(E),r=0,d):(E===43||E===45||E===46||ln(E))&&r++<32?(e.consume(E),c):(r=0,h(E))}function d(E){return E===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(E),e.exit("autolinkMarker"),e.exit("autolink"),t):E===null||E===32||E===60||Pd(E)?n(E):(e.consume(E),d)}function h(E){return E===64?(e.consume(E),p):X9(E)?(e.consume(E),h):n(E)}function p(E){return ln(E)?m(E):n(E)}function m(E){return E===46?(e.consume(E),r=0,p):E===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(E),e.exit("autolinkMarker"),e.exit("autolink"),t):_(E)}function _(E){if((E===45||ln(E))&&r++<63){const T=E===45?_:m;return e.consume(E),T}return n(E)}}function et(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(d){return Ye(d)?(e.enter(n),c(d)):t(d)}function c(d){return Ye(d)&&o++<i?(e.consume(d),c):(e.exit(n),t(d))}}const bu={partial:!0,tokenize:X7};function X7(e,t,n){return r;function r(o){return Ye(o)?et(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||Re(o)?t(o):n(o)}}const Iw={continuation:{tokenize:W7},exit:K7,name:"blockQuote",tokenize:Q7};function Q7(e,t,n){const r=this;return i;function i(l){if(l===62){const c=r.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),o}return n(l)}function o(l){return Ye(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function W7(e,t,n){const r=this;return i;function i(l){return Ye(l)?et(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):o(l)}function o(l){return e.attempt(Iw,t,n)(l)}}function K7(e){e.exit("blockQuote")}const Dw={name:"characterEscape",tokenize:Z7};function Z7(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return W9(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const Mw={name:"characterReference",tokenize:J7};function J7(e,t,n){const r=this;let i=0,o,l;return c;function c(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),d}function d(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),o=31,l=ln,p(m))}function h(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,l=Q9,p):(e.enter("characterReferenceValue"),o=7,l=L0,p(m))}function p(m){if(m===59&&i){const _=e.exit("characterReferenceValue");return l===ln&&!u1(r.sliceSerialize(_))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(m)&&i++<o?(e.consume(m),p):n(m)}}const PT={partial:!0,tokenize:tj},BT={concrete:!0,name:"codeFenced",tokenize:ej};function ej(e,t,n){const r=this,i={partial:!0,tokenize:B};let o=0,l=0,c;return d;function d(D){return h(D)}function h(D){const z=r.events[r.events.length-1];return o=z&&z[1].type==="linePrefix"?z[2].sliceSerialize(z[1],!0).length:0,c=D,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(D)}function p(D){return D===c?(l++,e.consume(D),p):l<3?n(D):(e.exit("codeFencedFenceSequence"),Ye(D)?et(e,m,"whitespace")(D):m(D))}function m(D){return D===null||Re(D)?(e.exit("codeFencedFence"),r.interrupt?t(D):e.check(PT,S,M)(D)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),_(D))}function _(D){return D===null||Re(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(D)):Ye(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),et(e,E,"whitespace")(D)):D===96&&D===c?n(D):(e.consume(D),_)}function E(D){return D===null||Re(D)?m(D):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),T(D))}function T(D){return D===null||Re(D)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(D)):D===96&&D===c?n(D):(e.consume(D),T)}function S(D){return e.attempt(i,M,A)(D)}function A(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),C}function C(D){return o>0&&Ye(D)?et(e,k,"linePrefix",o+1)(D):k(D)}function k(D){return D===null||Re(D)?e.check(PT,S,M)(D):(e.enter("codeFlowValue"),N(D))}function N(D){return D===null||Re(D)?(e.exit("codeFlowValue"),k(D)):(e.consume(D),N)}function M(D){return e.exit("codeFenced"),t(D)}function B(D,z,G){let ie=0;return V;function V(re){return D.enter("lineEnding"),D.consume(re),D.exit("lineEnding"),X}function X(re){return D.enter("codeFencedFence"),Ye(re)?et(D,J,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(re):J(re)}function J(re){return re===c?(D.enter("codeFencedFenceSequence"),he(re)):G(re)}function he(re){return re===c?(ie++,D.consume(re),he):ie>=l?(D.exit("codeFencedFenceSequence"),Ye(re)?et(D,ue,"whitespace")(re):ue(re)):G(re)}function ue(re){return re===null||Re(re)?(D.exit("codeFencedFence"),z(re)):G(re)}}}function tj(e,t,n){const r=this;return i;function i(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const Ip={name:"codeIndented",tokenize:rj},nj={partial:!0,tokenize:aj};function rj(e,t,n){const r=this;return i;function i(h){return e.enter("codeIndented"),et(e,o,"linePrefix",5)(h)}function o(h){const p=r.events[r.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?l(h):n(h)}function l(h){return h===null?d(h):Re(h)?e.attempt(nj,l,d)(h):(e.enter("codeFlowValue"),c(h))}function c(h){return h===null||Re(h)?(e.exit("codeFlowValue"),l(h)):(e.consume(h),c)}function d(h){return e.exit("codeIndented"),t(h)}}function aj(e,t,n){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?n(l):Re(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):et(e,o,"linePrefix",5)(l)}function o(l){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(l):Re(l)?i(l):n(l)}}const ij={name:"codeText",previous:oj,resolve:sj,tokenize:lj};function sj(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 oj(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function lj(e,t,n){let r=0,i,o;return l;function l(m){return e.enter("codeText"),e.enter("codeTextSequence"),c(m)}function c(m){return m===96?(e.consume(m),r++,c):(e.exit("codeTextSequence"),d(m))}function d(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),d):m===96?(o=e.enter("codeTextSequence"),i=0,p(m)):Re(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("codeTextData"),h(m))}function h(m){return m===null||m===32||m===96||Re(m)?(e.exit("codeTextData"),d(m)):(e.consume(m),h)}function p(m){return m===96?(e.consume(m),i++,p):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(o.type="codeTextData",h(m))}}class uj{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 o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Sl(this.left,r),o.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),Sl(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Sl(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);Sl(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Sl(this.left,n.reverse())}}}function Sl(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 Pw(e){const t={};let n=-1,r,i,o,l,c,d,h;const p=new uj(e);for(;++n<p.length;){for(;n in t;)n=t[n];if(r=p.get(n),n&&r[1].type==="chunkFlow"&&p.get(n-1)[1].type==="listItemPrefix"&&(d=r[1]._tokenizer.events,o=0,o<d.length&&d[o][1].type==="lineEndingBlank"&&(o+=2),o<d.length&&d[o][1].type==="content"))for(;++o<d.length&&d[o][1].type!=="content";)d[o][1].type==="chunkText"&&(d[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,cj(p,n)),n=t[n],h=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(l=p.get(o),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(i&&(p.get(i)[1].type="lineEndingBlank"),l[1].type="lineEnding",i=o);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;i&&(r[1].end={...p.get(i)[1].start},c=p.slice(i,n),c.unshift(r),p.splice(i,n-i+1,c))}}return $n(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!h}function cj(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const c=l.events,d=[],h={};let p,m,_=-1,E=n,T=0,S=0;const A=[S];for(;E;){for(;e.get(++i)[1]!==E;);o.push(i),E._tokenizer||(p=r.sliceStream(E),E.next||p.push(null),m&&l.defineSkip(E.start),E._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(p),E._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),m=E,E=E.next}for(E=n;++_<c.length;)c[_][0]==="exit"&&c[_-1][0]==="enter"&&c[_][1].type===c[_-1][1].type&&c[_][1].start.line!==c[_][1].end.line&&(S=_+1,A.push(S),E._tokenizer=void 0,E.previous=void 0,E=E.next);for(l.events=[],E?(E._tokenizer=void 0,E.previous=void 0):A.pop(),_=A.length;_--;){const C=c.slice(A[_],A[_+1]),k=o.pop();d.push([k,k+C.length-1]),e.splice(k,2,C)}for(d.reverse(),_=-1;++_<d.length;)h[T+d[_][0]]=T+d[_][1],T+=d[_][1]-d[_][0]-1;return h}const dj={resolve:hj,tokenize:mj},fj={partial:!0,tokenize:pj};function hj(e){return Pw(e),e}function mj(e,t){let n;return r;function r(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(c)}function i(c){return c===null?o(c):Re(c)?e.check(fj,l,o)(c):(e.consume(c),i)}function o(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function l(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function pj(e,t,n){const r=this;return i;function i(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),et(e,o,"linePrefix")}function o(l){if(l===null||Re(l))return n(l);const c=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function Bw(e,t,n,r,i,o,l,c,d){const h=d||Number.POSITIVE_INFINITY;let p=0;return m;function m(C){return C===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(C),e.exit(o),_):C===null||C===32||C===41||Pd(C)?n(C):(e.enter(r),e.enter(l),e.enter(c),e.enter("chunkString",{contentType:"string"}),S(C))}function _(C){return C===62?(e.enter(o),e.consume(C),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),E(C))}function E(C){return C===62?(e.exit("chunkString"),e.exit(c),_(C)):C===null||C===60||Re(C)?n(C):(e.consume(C),C===92?T:E)}function T(C){return C===60||C===62||C===92?(e.consume(C),E):E(C)}function S(C){return!p&&(C===null||C===41||Et(C))?(e.exit("chunkString"),e.exit(c),e.exit(l),e.exit(r),t(C)):p<h&&C===40?(e.consume(C),p++,S):C===41?(e.consume(C),p--,S):C===null||C===32||C===40||Pd(C)?n(C):(e.consume(C),C===92?A:S)}function A(C){return C===40||C===41||C===92?(e.consume(C),S):S(C)}}function jw(e,t,n,r,i,o){const l=this;let c=0,d;return h;function h(E){return e.enter(r),e.enter(i),e.consume(E),e.exit(i),e.enter(o),p}function p(E){return c>999||E===null||E===91||E===93&&!d||E===94&&!c&&"_hiddenFootnoteSupport"in l.parser.constructs?n(E):E===93?(e.exit(o),e.enter(i),e.consume(E),e.exit(i),e.exit(r),t):Re(E)?(e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),m(E))}function m(E){return E===null||E===91||E===93||Re(E)||c++>999?(e.exit("chunkString"),p(E)):(e.consume(E),d||(d=!Ye(E)),E===92?_:m)}function _(E){return E===91||E===92||E===93?(e.consume(E),c++,m):m(E)}}function Uw(e,t,n,r,i,o){let l;return c;function c(_){return _===34||_===39||_===40?(e.enter(r),e.enter(i),e.consume(_),e.exit(i),l=_===40?41:_,d):n(_)}function d(_){return _===l?(e.enter(i),e.consume(_),e.exit(i),e.exit(r),t):(e.enter(o),h(_))}function h(_){return _===l?(e.exit(o),d(l)):_===null?n(_):Re(_)?(e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),et(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(_))}function p(_){return _===l||_===null||Re(_)?(e.exit("chunkString"),h(_)):(e.consume(_),_===92?m:p)}function m(_){return _===l||_===92?(e.consume(_),p):p(_)}}function Fl(e,t){let n;return r;function r(i){return Re(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Ye(i)?et(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const gj={name:"definition",tokenize:Ej},bj={partial:!0,tokenize:yj};function Ej(e,t,n){const r=this;let i;return o;function o(E){return e.enter("definition"),l(E)}function l(E){return jw.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(E)}function c(E){return i=pr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),E===58?(e.enter("definitionMarker"),e.consume(E),e.exit("definitionMarker"),d):n(E)}function d(E){return Et(E)?Fl(e,h)(E):h(E)}function h(E){return Bw(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(E)}function p(E){return e.attempt(bj,m,m)(E)}function m(E){return Ye(E)?et(e,_,"whitespace")(E):_(E)}function _(E){return E===null||Re(E)?(e.exit("definition"),r.parser.defined.push(i),t(E)):n(E)}}function yj(e,t,n){return r;function r(c){return Et(c)?Fl(e,i)(c):n(c)}function i(c){return Uw(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function o(c){return Ye(c)?et(e,l,"whitespace")(c):l(c)}function l(c){return c===null||Re(c)?t(c):n(c)}}const _j={name:"hardBreakEscape",tokenize:xj};function xj(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return Re(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const Tj={name:"headingAtx",resolve:vj,tokenize:Sj};function vj(e,t){let n=e.length-2,r=3,i,o;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},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},$n(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function Sj(e,t,n){let r=0;return i;function i(p){return e.enter("atxHeading"),o(p)}function o(p){return e.enter("atxHeadingSequence"),l(p)}function l(p){return p===35&&r++<6?(e.consume(p),l):p===null||Et(p)?(e.exit("atxHeadingSequence"),c(p)):n(p)}function c(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||Re(p)?(e.exit("atxHeading"),t(p)):Ye(p)?et(e,c,"whitespace")(p):(e.enter("atxHeadingText"),h(p))}function d(p){return p===35?(e.consume(p),d):(e.exit("atxHeadingSequence"),c(p))}function h(p){return p===null||p===35||Et(p)?(e.exit("atxHeadingText"),c(p)):(e.consume(p),h)}}const Aj=["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"],jT=["pre","script","style","textarea"],Cj={concrete:!0,name:"htmlFlow",resolveTo:Nj,tokenize:Rj},wj={partial:!0,tokenize:Lj},kj={partial:!0,tokenize:Oj};function Nj(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 Rj(e,t,n){const r=this;let i,o,l,c,d;return h;function h(P){return p(P)}function p(P){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(P),m}function m(P){return P===33?(e.consume(P),_):P===47?(e.consume(P),o=!0,S):P===63?(e.consume(P),i=3,r.interrupt?t:O):pn(P)?(e.consume(P),l=String.fromCharCode(P),A):n(P)}function _(P){return P===45?(e.consume(P),i=2,E):P===91?(e.consume(P),i=5,c=0,T):pn(P)?(e.consume(P),i=4,r.interrupt?t:O):n(P)}function E(P){return P===45?(e.consume(P),r.interrupt?t:O):n(P)}function T(P){const ge="CDATA[";return P===ge.charCodeAt(c++)?(e.consume(P),c===ge.length?r.interrupt?t:J:T):n(P)}function S(P){return pn(P)?(e.consume(P),l=String.fromCharCode(P),A):n(P)}function A(P){if(P===null||P===47||P===62||Et(P)){const ge=P===47,Ee=l.toLowerCase();return!ge&&!o&&jT.includes(Ee)?(i=1,r.interrupt?t(P):J(P)):Aj.includes(l.toLowerCase())?(i=6,ge?(e.consume(P),C):r.interrupt?t(P):J(P)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(P):o?k(P):N(P))}return P===45||ln(P)?(e.consume(P),l+=String.fromCharCode(P),A):n(P)}function C(P){return P===62?(e.consume(P),r.interrupt?t:J):n(P)}function k(P){return Ye(P)?(e.consume(P),k):V(P)}function N(P){return P===47?(e.consume(P),V):P===58||P===95||pn(P)?(e.consume(P),M):Ye(P)?(e.consume(P),N):V(P)}function M(P){return P===45||P===46||P===58||P===95||ln(P)?(e.consume(P),M):B(P)}function B(P){return P===61?(e.consume(P),D):Ye(P)?(e.consume(P),B):N(P)}function D(P){return P===null||P===60||P===61||P===62||P===96?n(P):P===34||P===39?(e.consume(P),d=P,z):Ye(P)?(e.consume(P),D):G(P)}function z(P){return P===d?(e.consume(P),d=null,ie):P===null||Re(P)?n(P):(e.consume(P),z)}function G(P){return P===null||P===34||P===39||P===47||P===60||P===61||P===62||P===96||Et(P)?B(P):(e.consume(P),G)}function ie(P){return P===47||P===62||Ye(P)?N(P):n(P)}function V(P){return P===62?(e.consume(P),X):n(P)}function X(P){return P===null||Re(P)?J(P):Ye(P)?(e.consume(P),X):n(P)}function J(P){return P===45&&i===2?(e.consume(P),U):P===60&&i===1?(e.consume(P),ee):P===62&&i===4?(e.consume(P),F):P===63&&i===3?(e.consume(P),O):P===93&&i===5?(e.consume(P),xe):Re(P)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(wj,te,he)(P)):P===null||Re(P)?(e.exit("htmlFlowData"),he(P)):(e.consume(P),J)}function he(P){return e.check(kj,ue,te)(P)}function ue(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),re}function re(P){return P===null||Re(P)?he(P):(e.enter("htmlFlowData"),J(P))}function U(P){return P===45?(e.consume(P),O):J(P)}function ee(P){return P===47?(e.consume(P),l="",ce):J(P)}function ce(P){if(P===62){const ge=l.toLowerCase();return jT.includes(ge)?(e.consume(P),F):J(P)}return pn(P)&&l.length<8?(e.consume(P),l+=String.fromCharCode(P),ce):J(P)}function xe(P){return P===93?(e.consume(P),O):J(P)}function O(P){return P===62?(e.consume(P),F):P===45&&i===2?(e.consume(P),O):J(P)}function F(P){return P===null||Re(P)?(e.exit("htmlFlowData"),te(P)):(e.consume(P),F)}function te(P){return e.exit("htmlFlow"),t(P)}}function Oj(e,t,n){const r=this;return i;function i(l){return Re(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):n(l)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function Lj(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(bu,t,n)}}const Ij={name:"htmlText",tokenize:Dj};function Dj(e,t,n){const r=this;let i,o,l;return c;function c(O){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(O),d}function d(O){return O===33?(e.consume(O),h):O===47?(e.consume(O),B):O===63?(e.consume(O),N):pn(O)?(e.consume(O),G):n(O)}function h(O){return O===45?(e.consume(O),p):O===91?(e.consume(O),o=0,T):pn(O)?(e.consume(O),k):n(O)}function p(O){return O===45?(e.consume(O),E):n(O)}function m(O){return O===null?n(O):O===45?(e.consume(O),_):Re(O)?(l=m,ee(O)):(e.consume(O),m)}function _(O){return O===45?(e.consume(O),E):m(O)}function E(O){return O===62?U(O):O===45?_(O):m(O)}function T(O){const F="CDATA[";return O===F.charCodeAt(o++)?(e.consume(O),o===F.length?S:T):n(O)}function S(O){return O===null?n(O):O===93?(e.consume(O),A):Re(O)?(l=S,ee(O)):(e.consume(O),S)}function A(O){return O===93?(e.consume(O),C):S(O)}function C(O){return O===62?U(O):O===93?(e.consume(O),C):S(O)}function k(O){return O===null||O===62?U(O):Re(O)?(l=k,ee(O)):(e.consume(O),k)}function N(O){return O===null?n(O):O===63?(e.consume(O),M):Re(O)?(l=N,ee(O)):(e.consume(O),N)}function M(O){return O===62?U(O):N(O)}function B(O){return pn(O)?(e.consume(O),D):n(O)}function D(O){return O===45||ln(O)?(e.consume(O),D):z(O)}function z(O){return Re(O)?(l=z,ee(O)):Ye(O)?(e.consume(O),z):U(O)}function G(O){return O===45||ln(O)?(e.consume(O),G):O===47||O===62||Et(O)?ie(O):n(O)}function ie(O){return O===47?(e.consume(O),U):O===58||O===95||pn(O)?(e.consume(O),V):Re(O)?(l=ie,ee(O)):Ye(O)?(e.consume(O),ie):U(O)}function V(O){return O===45||O===46||O===58||O===95||ln(O)?(e.consume(O),V):X(O)}function X(O){return O===61?(e.consume(O),J):Re(O)?(l=X,ee(O)):Ye(O)?(e.consume(O),X):ie(O)}function J(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),i=O,he):Re(O)?(l=J,ee(O)):Ye(O)?(e.consume(O),J):(e.consume(O),ue)}function he(O){return O===i?(e.consume(O),i=void 0,re):O===null?n(O):Re(O)?(l=he,ee(O)):(e.consume(O),he)}function ue(O){return O===null||O===34||O===39||O===60||O===61||O===96?n(O):O===47||O===62||Et(O)?ie(O):(e.consume(O),ue)}function re(O){return O===47||O===62||Et(O)?ie(O):n(O)}function U(O){return O===62?(e.consume(O),e.exit("htmlTextData"),e.exit("htmlText"),t):n(O)}function ee(O){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),ce}function ce(O){return Ye(O)?et(e,xe,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):xe(O)}function xe(O){return e.enter("htmlTextData"),l(O)}}const d1={name:"labelEnd",resolveAll:jj,resolveTo:Uj,tokenize:Hj},Mj={tokenize:zj},Pj={tokenize:Fj},Bj={tokenize:$j};function jj(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&&$n(e,0,e.length,n),e}function Uj(e,t){let n=e.length,r=0,i,o,l,c;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(l=n);const d={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[o][1].start},end:{...e[l][1].end}},p={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[l-2][1].start}};return c=[["enter",d,t],["enter",h,t]],c=rr(c,e.slice(o+1,o+r+3)),c=rr(c,[["enter",p,t]]),c=rr(c,Cf(t.parser.constructs.insideSpan.null,e.slice(o+r+4,l-3),t)),c=rr(c,[["exit",p,t],e[l-2],e[l-1],["exit",h,t]]),c=rr(c,e.slice(l+1)),c=rr(c,[["exit",d,t]]),$n(e,o,e.length,c),e}function Hj(e,t,n){const r=this;let i=r.events.length,o,l;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return c;function c(_){return o?o._inactive?m(_):(l=r.parser.defined.includes(pr(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(_),e.exit("labelMarker"),e.exit("labelEnd"),d):n(_)}function d(_){return _===40?e.attempt(Mj,p,l?p:m)(_):_===91?e.attempt(Pj,p,l?h:m)(_):l?p(_):m(_)}function h(_){return e.attempt(Bj,p,m)(_)}function p(_){return t(_)}function m(_){return o._balanced=!0,n(_)}}function zj(e,t,n){return r;function r(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),i}function i(m){return Et(m)?Fl(e,o)(m):o(m)}function o(m){return m===41?p(m):Bw(e,l,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function l(m){return Et(m)?Fl(e,d)(m):p(m)}function c(m){return n(m)}function d(m){return m===34||m===39||m===40?Uw(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):p(m)}function h(m){return Et(m)?Fl(e,p)(m):p(m)}function p(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function Fj(e,t,n){const r=this;return i;function i(c){return jw.call(r,e,o,l,"reference","referenceMarker","referenceString")(c)}function o(c){return r.parser.defined.includes(pr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function l(c){return n(c)}}function $j(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const Vj={name:"labelStartImage",resolveAll:d1.resolveAll,tokenize:Gj};function Gj(e,t,n){const r=this;return i;function i(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),o}function o(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),l):n(c)}function l(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(c):t(c)}}const qj={name:"labelStartLink",resolveAll:d1.resolveAll,tokenize:Yj};function Yj(e,t,n){const r=this;return i;function i(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),o}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const Dp={name:"lineEnding",tokenize:Xj};function Xj(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),et(e,t,"linePrefix")}}const bd={name:"thematicBreak",tokenize:Qj};function Qj(e,t,n){let r=0,i;return o;function o(h){return e.enter("thematicBreak"),l(h)}function l(h){return i=h,c(h)}function c(h){return h===i?(e.enter("thematicBreakSequence"),d(h)):r>=3&&(h===null||Re(h))?(e.exit("thematicBreak"),t(h)):n(h)}function d(h){return h===i?(e.consume(h),r++,d):(e.exit("thematicBreakSequence"),Ye(h)?et(e,c,"whitespace")(h):c(h))}}const Nn={continuation:{tokenize:Jj},exit:tU,name:"list",tokenize:Zj},Wj={partial:!0,tokenize:nU},Kj={partial:!0,tokenize:eU};function Zj(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=0;return c;function c(E){const T=r.containerState.type||(E===42||E===43||E===45?"listUnordered":"listOrdered");if(T==="listUnordered"?!r.containerState.marker||E===r.containerState.marker:L0(E)){if(r.containerState.type||(r.containerState.type=T,e.enter(T,{_container:!0})),T==="listUnordered")return e.enter("listItemPrefix"),E===42||E===45?e.check(bd,n,h)(E):h(E);if(!r.interrupt||E===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(E)}return n(E)}function d(E){return L0(E)&&++l<10?(e.consume(E),d):(!r.interrupt||l<2)&&(r.containerState.marker?E===r.containerState.marker:E===41||E===46)?(e.exit("listItemValue"),h(E)):n(E)}function h(E){return e.enter("listItemMarker"),e.consume(E),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||E,e.check(bu,r.interrupt?n:p,e.attempt(Wj,_,m))}function p(E){return r.containerState.initialBlankLine=!0,o++,_(E)}function m(E){return Ye(E)?(e.enter("listItemPrefixWhitespace"),e.consume(E),e.exit("listItemPrefixWhitespace"),_):n(E)}function _(E){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(E)}}function Jj(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(bu,i,o);function i(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,et(e,t,"listItemIndent",r.containerState.size+1)(c)}function o(c){return r.containerState.furtherBlankLines||!Ye(c)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(c)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Kj,t,l)(c))}function l(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,et(e,e.attempt(Nn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function eU(e,t,n){const r=this;return et(e,i,"listItemIndent",r.containerState.size+1);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(o):n(o)}}function tU(e){e.exit(this.containerState.type)}function nU(e,t,n){const r=this;return et(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const l=r.events[r.events.length-1];return!Ye(o)&&l&&l[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const UT={name:"setextUnderline",resolveTo:rU,tokenize:aU};function rU(e,t){let n=e.length,r,i,o;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),!o&&e[n][1].type==="definition"&&(o=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",l,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function aU(e,t,n){const r=this;let i;return o;function o(h){let p=r.events.length,m;for(;p--;)if(r.events[p][1].type!=="lineEnding"&&r.events[p][1].type!=="linePrefix"&&r.events[p][1].type!=="content"){m=r.events[p][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||m)?(e.enter("setextHeadingLine"),i=h,l(h)):n(h)}function l(h){return e.enter("setextHeadingLineSequence"),c(h)}function c(h){return h===i?(e.consume(h),c):(e.exit("setextHeadingLineSequence"),Ye(h)?et(e,d,"lineSuffix")(h):d(h))}function d(h){return h===null||Re(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const iU={tokenize:hU,partial:!0};function sU(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:cU,continuation:{tokenize:dU},exit:fU}},text:{91:{name:"gfmFootnoteCall",tokenize:uU},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:oU,resolveTo:lU}}}}function oU(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;i--;){const d=r.events[i][1];if(d.type==="labelImage"){l=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return c;function c(d){if(!l||!l._balanced)return n(d);const h=pr(r.sliceSerialize({start:l.end,end:r.now()}));return h.codePointAt(0)!==94||!o.includes(h.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function lU(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 o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",l,t],["exit",l,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...c),e}function uU(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,l;return c;function c(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),d}function d(m){return m!==94?n(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(m){if(o>999||m===93&&!l||m===null||m===91||Et(m))return n(m);if(m===93){e.exit("chunkString");const _=e.exit("gfmFootnoteCallString");return i.includes(pr(r.sliceSerialize(_)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return Et(m)||(l=!0),o++,e.consume(m),m===92?p:h}function p(m){return m===91||m===92||m===93?(e.consume(m),o++,h):h(m)}}function cU(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,l=0,c;return d;function d(T){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(T),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(T){return T===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(T),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",p):n(T)}function p(T){if(l>999||T===93&&!c||T===null||T===91||Et(T))return n(T);if(T===93){e.exit("chunkString");const S=e.exit("gfmFootnoteDefinitionLabelString");return o=pr(r.sliceSerialize(S)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(T),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),_}return Et(T)||(c=!0),l++,e.consume(T),T===92?m:p}function m(T){return T===91||T===92||T===93?(e.consume(T),l++,p):p(T)}function _(T){return T===58?(e.enter("definitionMarker"),e.consume(T),e.exit("definitionMarker"),i.includes(o)||i.push(o),et(e,E,"gfmFootnoteDefinitionWhitespace")):n(T)}function E(T){return t(T)}}function dU(e,t,n){return e.check(bu,t,e.attempt(iU,t,n))}function fU(e){e.exit("gfmFootnoteDefinition")}function hU(e,t,n){const r=this;return et(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(o):n(o)}}function mU(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(l,c){let d=-1;for(;++d<l.length;)if(l[d][0]==="enter"&&l[d][1].type==="strikethroughSequenceTemporary"&&l[d][1]._close){let h=d;for(;h--;)if(l[h][0]==="exit"&&l[h][1].type==="strikethroughSequenceTemporary"&&l[h][1]._open&&l[d][1].end.offset-l[d][1].start.offset===l[h][1].end.offset-l[h][1].start.offset){l[d][1].type="strikethroughSequence",l[h][1].type="strikethroughSequence";const p={type:"strikethrough",start:Object.assign({},l[h][1].start),end:Object.assign({},l[d][1].end)},m={type:"strikethroughText",start:Object.assign({},l[h][1].end),end:Object.assign({},l[d][1].start)},_=[["enter",p,c],["enter",l[h][1],c],["exit",l[h][1],c],["enter",m,c]],E=c.parser.constructs.insideSpan.null;E&&$n(_,_.length,0,Cf(E,l.slice(h+1,d),c)),$n(_,_.length,0,[["exit",m,c],["enter",l[d][1],c],["exit",l[d][1],c],["exit",p,c]]),$n(l,h-1,d-h+3,_),d=h+_.length-2;break}}for(d=-1;++d<l.length;)l[d][1].type==="strikethroughSequenceTemporary"&&(l[d][1].type="data");return l}function o(l,c,d){const h=this.previous,p=this.events;let m=0;return _;function _(T){return h===126&&p[p.length-1][1].type!=="characterEscape"?d(T):(l.enter("strikethroughSequenceTemporary"),E(T))}function E(T){const S=mo(h);if(T===126)return m>1?d(T):(l.consume(T),m++,E);if(m<2&&!n)return d(T);const A=l.exit("strikethroughSequenceTemporary"),C=mo(T);return A._open=!C||C===2&&!!S,A._close=!S||S===2&&!!C,c(T)}}}class pU{constructor(){this.map=[]}add(t,n,r){gU(this,t,n,r)}consume(t){if(this.map.sort(function(o,l){return o[0]-l[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 o of i)t.push(o);i=r.pop()}this.map.length=0}}function gU(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 bU(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 o=r.length-1;r[o]=r[o]==="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 EU(){return{flow:{null:{name:"table",tokenize:yU,resolveAll:_U}}}}function yU(e,t,n){const r=this;let i=0,o=0,l;return c;function c(V){let X=r.events.length-1;for(;X>-1;){const ue=r.events[X][1].type;if(ue==="lineEnding"||ue==="linePrefix")X--;else break}const J=X>-1?r.events[X][1].type:null,he=J==="tableHead"||J==="tableRow"?D:d;return he===D&&r.parser.lazy[r.now().line]?n(V):he(V)}function d(V){return e.enter("tableHead"),e.enter("tableRow"),h(V)}function h(V){return V===124||(l=!0,o+=1),p(V)}function p(V){return V===null?n(V):Re(V)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(V),e.exit("lineEnding"),E):n(V):Ye(V)?et(e,p,"whitespace")(V):(o+=1,l&&(l=!1,i+=1),V===124?(e.enter("tableCellDivider"),e.consume(V),e.exit("tableCellDivider"),l=!0,p):(e.enter("data"),m(V)))}function m(V){return V===null||V===124||Et(V)?(e.exit("data"),p(V)):(e.consume(V),V===92?_:m)}function _(V){return V===92||V===124?(e.consume(V),m):m(V)}function E(V){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(V):(e.enter("tableDelimiterRow"),l=!1,Ye(V)?et(e,T,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(V):T(V))}function T(V){return V===45||V===58?A(V):V===124?(l=!0,e.enter("tableCellDivider"),e.consume(V),e.exit("tableCellDivider"),S):B(V)}function S(V){return Ye(V)?et(e,A,"whitespace")(V):A(V)}function A(V){return V===58?(o+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(V),e.exit("tableDelimiterMarker"),C):V===45?(o+=1,C(V)):V===null||Re(V)?M(V):B(V)}function C(V){return V===45?(e.enter("tableDelimiterFiller"),k(V)):B(V)}function k(V){return V===45?(e.consume(V),k):V===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(V),e.exit("tableDelimiterMarker"),N):(e.exit("tableDelimiterFiller"),N(V))}function N(V){return Ye(V)?et(e,M,"whitespace")(V):M(V)}function M(V){return V===124?T(V):V===null||Re(V)?!l||i!==o?B(V):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(V)):B(V)}function B(V){return n(V)}function D(V){return e.enter("tableRow"),z(V)}function z(V){return V===124?(e.enter("tableCellDivider"),e.consume(V),e.exit("tableCellDivider"),z):V===null||Re(V)?(e.exit("tableRow"),t(V)):Ye(V)?et(e,z,"whitespace")(V):(e.enter("data"),G(V))}function G(V){return V===null||V===124||Et(V)?(e.exit("data"),z(V)):(e.consume(V),V===92?ie:G)}function ie(V){return V===92||V===124?(e.consume(V),G):G(V)}}function _U(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],l=[0,0,0,0],c=!1,d=0,h,p,m;const _=new pU;for(;++n<e.length;){const E=e[n],T=E[1];E[0]==="enter"?T.type==="tableHead"?(c=!1,d!==0&&(HT(_,t,d,h,p),p=void 0,d=0),h={type:"table",start:Object.assign({},T.start),end:Object.assign({},T.end)},_.add(n,0,[["enter",h,t]])):T.type==="tableRow"||T.type==="tableDelimiterRow"?(r=!0,m=void 0,o=[0,0,0,0],l=[0,n+1,0,0],c&&(c=!1,p={type:"tableBody",start:Object.assign({},T.start),end:Object.assign({},T.end)},_.add(n,0,[["enter",p,t]])),i=T.type==="tableDelimiterRow"?2:p?3:1):i&&(T.type==="data"||T.type==="tableDelimiterMarker"||T.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(o[1]!==0&&(l[0]=l[1],m=Kc(_,t,o,i,void 0,m),o=[0,0,0,0]),l[2]=n)):T.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(l[0]=l[1],m=Kc(_,t,o,i,void 0,m)),o=l,l=[o[1],n,0,0])):T.type==="tableHead"?(c=!0,d=n):T.type==="tableRow"||T.type==="tableDelimiterRow"?(d=n,o[1]!==0?(l[0]=l[1],m=Kc(_,t,o,i,n,m)):l[1]!==0&&(m=Kc(_,t,l,i,n,m)),i=0):i&&(T.type==="data"||T.type==="tableDelimiterMarker"||T.type==="tableDelimiterFiller")&&(l[3]=n)}for(d!==0&&HT(_,t,d,h,p),_.consume(t.events),n=-1;++n<t.events.length;){const E=t.events[n];E[0]==="enter"&&E[1].type==="table"&&(E[1]._align=bU(t.events,n))}return e}function Kc(e,t,n,r,i,o){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(o.end=Object.assign({},Js(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const d=Js(t.events,n[1]);if(o={type:l,start:Object.assign({},d),end:Object.assign({},d)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const h=Js(t.events,n[2]),p=Js(t.events,n[3]),m={type:c,start:Object.assign({},h),end:Object.assign({},p)};if(e.add(n[2],0,[["enter",m,t]]),r!==2){const _=t.events[n[2]],E=t.events[n[3]];if(_[1].end=Object.assign({},E[1].end),_[1].type="chunkText",_[1].contentType="text",n[3]>n[2]+1){const T=n[2]+1,S=n[3]-n[2]-1;e.add(T,S,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return i!==void 0&&(o.end=Object.assign({},Js(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function HT(e,t,n,r,i){const o=[],l=Js(t.events,n);i&&(i.end=Object.assign({},l),o.push(["exit",i,t])),r.end=Object.assign({},l),o.push(["exit",r,t]),e.add(n+1,0,o)}function Js(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const xU={name:"tasklistCheck",tokenize:vU};function TU(){return{text:{91:xU}}}function vU(e,t,n){const r=this;return i;function i(d){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),o)}function o(d){return Et(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),l):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),l):n(d)}function l(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(d)}function c(d){return Re(d)?t(d):Ye(d)?e.check({tokenize:SU},t,n)(d):n(d)}}function SU(e,t,n){return et(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function AU(e){return Sw([M7(),sU(),mU(e),EU(),TU()])}const CU={};function wU(e){const t=this,n=e||CU,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(AU(n)),o.push(N7()),l.push(R7(n))}var kU=Object.defineProperty,NU=Object.defineProperties,RU=Object.getOwnPropertyDescriptors,zT=Object.getOwnPropertySymbols,OU=Object.prototype.hasOwnProperty,LU=Object.prototype.propertyIsEnumerable,FT=(e,t,n)=>t in e?kU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Hw=(e,t)=>{for(var n in t||(t={}))OU.call(t,n)&&FT(e,n,t[n]);if(zT)for(var n of zT(t))LU.call(t,n)&&FT(e,n,t[n]);return e},zw=(e,t)=>NU(e,RU(t)),bn=(e,t)=>{let n=!1,r=!1;for(let i=0;i<t;i+=1){if(e[i]==="\\"&&i+1<e.length&&e[i+1]==="`"){i+=1;continue}if(e.substring(i,i+3)==="```"){r=!r,i+=2;continue}!r&&e[i]==="`"&&(n=!n)}return n||r},IU=(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},DU=e=>{let t=0;for(let n=0;n<e.length;n+=1){if(e[n]==="\\"&&n+1<e.length&&e[n+1]==="`"){n+=1;continue}e[n]==="`"&&!IU(e,n)&&(t+=1)}return t},si=(e,t)=>{let n=!1,r=!1,i=-1;for(let o=0;o<e.length;o+=1){if(e[o]==="\\"&&o+1<e.length&&e[o+1]==="`"){o+=1;continue}if(e.substring(o,o+3)==="```"){r=!r,o+=2;continue}if(!r&&e[o]==="`")if(n){if(i<t&&t<o)return!0;n=!1,i=-1}else n=!0,i=o}return!1},MU=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,PU=e=>!e||typeof e!="string"||!e.includes(">")?e:e.replace(MU,(t,n,r,i)=>bn(e,i)?t:`${n}\\>${r}`),BU=/(\*\*)([^*]*\*?)$/,jU=/(__)([^_]*?)$/,UU=/(\*\*\*)([^*]*?)$/,HU=/(\*)([^*]*?)$/,zU=/(_)([^_]*?)$/,FU=/(`)([^`]*?)$/,$U=/(~~)([^~]*?)$/,ss=/^[\s_~*`]*$/,Fw=/^[\s]*[-*+][\s]+$/,VU=/[\p{L}\p{N}_]/u,GU=/^```[^`\n]*```?$/,qU=/^\*{4,}$/,YU=/(__)([^_]+)_$/,XU=/(~~)([^~]+)~$/,$T=/~~/g,oi=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:VU.test(e)},QU=(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},$w=(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},wf=(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},WU=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===")")return!0;if(e[n]===`
67
+ `)return!1}return!1},Vw=(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]==="]"?WU(e,t):!1;if(e[n]===`
68
+ `)return!1}return!1},KU=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===">")return!1;if(e[n]==="<"){let r=n+1<e.length?e[n+1]:"";return r>="a"&&r<="z"||r>="A"&&r<="Z"||r==="/"}if(e[n]===`
69
+ `)return!1}return!1},f1=(e,t,n)=>{let r=0;for(let d=t-1;d>=0;d-=1)if(e[d]===`
70
+ `){r=d+1;break}let i=e.length;for(let d=t;d<e.length;d+=1)if(e[d]===`
71
+ `){i=d;break}let o=e.substring(r,i),l=0,c=!1;for(let d of o)if(d===n)l+=1;else if(d!==" "&&d!==" "){c=!0;break}return l>=3&&!c},ZU=(e,t,n,r)=>n==="\\"||e.includes("$")&&wf(e,t)?!0:n!=="*"&&r==="*"?(t<e.length-2?e[t+2]:"")!=="*":!!(n==="*"||n&&r&&oi(n)&&oi(r)||(!n||n===" "||n===" "||n===`
72
+ `)&&(!r||r===" "||r===" "||r===`
73
+ `)),Gw=e=>{let t=0,n=!1,r=e.length;for(let i=0;i<r;i+=1){if(e[i]==="`"&&i+2<r&&e[i+1]==="`"&&e[i+2]==="`"){n=!n,i+=2;continue}if(n||e[i]!=="*")continue;let o=i>0?e[i-1]:"",l=i<r-1?e[i+1]:"";ZU(e,i,o,l)||(t+=1)}return t},JU=(e,t,n,r)=>!!(n==="\\"||e.includes("$")&&wf(e,t)||Vw(e,t)||KU(e,t)||n==="_"||r==="_"||n&&r&&oi(n)&&oi(r)),eH=e=>{let t=0,n=!1,r=e.length;for(let i=0;i<r;i+=1){if(e[i]==="`"&&i+2<r&&e[i+1]==="`"&&e[i+2]==="`"){n=!n,i+=2;continue}if(n||e[i]!=="_")continue;let o=i>0?e[i-1]:"",l=i<r-1?e[i+1]:"";JU(e,i,o,l)||(t+=1)}return t},tH=e=>{let t=0,n=0,r=!1;for(let i=0;i<e.length;i+=1){if(e[i]==="`"&&i+2<e.length&&e[i+1]==="`"&&e[i+2]==="`"){n>=3&&(t+=Math.floor(n/3)),n=0,r=!r,i+=2;continue}r||(e[i]==="*"?n+=1:(n>=3&&(t+=Math.floor(n/3)),n=0))}return n>=3&&(t+=Math.floor(n/3)),t},h1=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){n=!n,r+=2;continue}n||e[r]==="*"&&r+1<e.length&&e[r+1]==="*"&&(t+=1,r+=1)}return t},VT=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){n=!n,r+=2;continue}n||e[r]==="_"&&r+1<e.length&&e[r+1]==="_"&&(t+=1,r+=1)}return t},nH=(e,t,n)=>{if(!t||ss.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
74
+ `),i=r===-1?0:r+1,o=e.substring(i,n);return Fw.test(o)&&t.includes(`
75
+ `)?!0:f1(e,n,"*")},rH=e=>{let t=e.match(BU);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return bn(e,r)||si(e,r)||nH(e,n,r)?e:h1(e)%2===1?n.endsWith("*")?`${e}*`:`${e}**`:e},aH=(e,t,n)=>{if(!t||ss.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
76
+ `),i=r===-1?0:r+1,o=e.substring(i,n);return Fw.test(o)&&t.includes(`
77
+ `)?!0:f1(e,n,"_")},iH=e=>{let t=e.match(jU);if(!t){let i=e.match(YU);if(i){let o=e.lastIndexOf(i[1]);if(!(bn(e,o)||si(e,o))&&VT(e)%2===1)return`${e}_`}return e}let n=t[2],r=e.lastIndexOf(t[1]);return bn(e,r)||si(e,r)||aH(e,n,r)?e:VT(e)%2===1?`${e}__`:e},sH=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]==="*"&&e[n-1]!=="*"&&e[n+1]!=="*"&&e[n-1]!=="\\"&&!wf(e,n)){let r=n>0?e[n-1]:"",i=n<e.length-1?e[n+1]:"";if((!r||r===" "||r===" "||r===`
78
+ `)&&(!i||i===" "||i===" "||i===`
79
+ `)||r&&i&&oi(r)&&oi(i))continue;return n}}return-1},oH=e=>{if(!e.match(HU))return e;let t=sH(e);if(t===-1||bn(e,t)||si(e,t))return e;let n=e.substring(t+1);return!n||ss.test(n)?e:Gw(e)%2===1?`${e}*`:e},qw=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]==="_"&&e[n-1]!=="_"&&e[n+1]!=="_"&&e[n-1]!=="\\"&&!wf(e,n)&&!Vw(e,n)){let r=n>0?e[n-1]:"",i=n<e.length-1?e[n+1]:"";if(r&&i&&oi(r)&&oi(i))continue;return n}}return-1},lH=e=>{let t=e.length;for(;t>0&&e[t-1]===`
80
+ `;)t-=1;if(t<e.length){let n=e.slice(0,t),r=e.slice(t);return`${n}_${r}`}return`${e}_`},uH=e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if(h1(t)%2!==1)return null;let n=t.indexOf("**"),r=qw(t);return n!==-1&&r!==-1&&n<r?`${t}_**`:null},cH=e=>{if(!e.match(zU))return e;let t=qw(e);if(t===-1)return e;let n=e.substring(t+1);if(!n||ss.test(n)||bn(e,t)||si(e,t))return e;if(eH(e)%2===1){let r=uH(e);return r!==null?r:lH(e)}return e},dH=e=>{let t=h1(e),n=Gw(e);return t%2===0&&n%2===0},fH=(e,t,n)=>!t||ss.test(t)||bn(e,n)||si(e,n)?!0:f1(e,n,"*"),hH=e=>{if(qU.test(e))return e;let t=e.match(UU);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return fH(e,n,r)?e:tH(e)%2===1?dH(e)?e:`${e}***`:e},mH=/<[a-zA-Z/][^>]*$/,pH=e=>{let t=e.match(mH);return!t||t.index===void 0||bn(e,t.index)?e:e.substring(0,t.index).trimEnd()},gH=e=>!e.match(GU)||e.includes(`
81
+ `)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,bH=e=>(e.match(/```/g)||[]).length%2===1,EH=e=>{let t=gH(e);if(t!==null)return t;let n=e.match(FU);if(n&&!bH(e)){let r=n[2];if(!r||ss.test(r))return e;if(DU(e)%2===1)return`${e}\``}return e},Yw=(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)==="```",yH=e=>{let t=0,n=!1;for(let r=0;r<e.length-1;r+=1)e[r]==="`"&&!Yw(e,r)&&(n=!n),!n&&e[r]==="$"&&e[r+1]==="$"&&(t+=1,r+=1);return t},_H=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="\\"){r+=1;continue}if(e[r]==="`"&&!Yw(e,r)){n=!n;continue}!n&&e[r]==="$"&&(r+1<e.length&&e[r+1]==="$"?r+=1:t+=1)}return t},xH=e=>{if(e.endsWith("$")&&!e.endsWith("$$"))return`${e}$`;let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
82
+ `,t)!==-1&&!e.endsWith(`
83
+ `)?`${e}
84
+ $$`:`${e}$$`},TH=e=>yH(e)%2===0?e:xH(e),vH=e=>_H(e)%2===1?`${e}$`:e,SH=(e,t,n)=>{if(e.substring(t+2).includes(")"))return null;let r=QU(e,t);if(r===-1||bn(e,r))return null;let i=r>0&&e[r-1]==="!",o=i?r-1:r,l=e.substring(0,o);if(i)return l;let c=e.substring(r+1,t);return n==="text-only"?`${l}${c}`:`${l}[${c}](streamdown:incomplete-link)`},GT=(e,t)=>{for(let n=0;n<t;n++)if(e[n]==="["&&!bn(e,n)){if(n>0&&e[n-1]==="!")continue;let r=$w(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 t},AH=(e,t,n)=>{let r=t>0&&e[t-1]==="!",i=r?t-1:t;if(!e.substring(t+1).includes("]")){let o=e.substring(0,i);if(r)return o;if(n==="text-only"){let l=GT(e,t);return e.substring(0,l)+e.substring(l+1)}return`${e}](streamdown:incomplete-link)`}if($w(e,t)===-1){let o=e.substring(0,i);if(r)return o;if(n==="text-only"){let l=GT(e,t);return e.substring(0,l)+e.substring(l+1)}return`${e}](streamdown:incomplete-link)`}return null},Xw=(e,t="protocol")=>{let n=e.lastIndexOf("](");if(n!==-1&&!bn(e,n)){let r=SH(e,n,t);if(r!==null)return r}for(let r=e.length-1;r>=0;r-=1)if(e[r]==="["&&!bn(e,r)){let i=AH(e,r,t);if(i!==null)return i}return e},CH=/^-{1,2}$/,wH=/^[\s]*-{1,2}[\s]+$/,kH=/^={1,2}$/,NH=/^[\s]*={1,2}[\s]+$/,RH=e=>{if(!e||typeof e!="string")return e;let t=e.lastIndexOf(`
85
+ `);if(t===-1)return e;let n=e.substring(t+1),r=e.substring(0,t),i=n.trim();if(CH.test(i)&&!n.match(wH)){let o=r.split(`
86
+ `).at(-1);if(o&&o.trim().length>0)return`${e}​`}if(kH.test(i)&&!n.match(NH)){let o=r.split(`
87
+ `).at(-1);if(o&&o.trim().length>0)return`${e}​`}return e},OH=new RegExp("(?<=[\\p{L}\\p{N}_])~(?!~)(?=[\\p{L}\\p{N}_])","gu"),LH=e=>!e||typeof e!="string"||!e.includes("~")?e:e.replace(OH,(t,n)=>bn(e,n)?t:"\\~"),IH=e=>{var t,n;let r=e.match($U);if(r){let i=r[2];if(!i||ss.test(i))return e;let o=e.lastIndexOf(r[1]);if(bn(e,o)||si(e,o))return e;if(((t=e.match($T))==null?void 0:t.length)%2===1)return`${e}~~`}else{let i=e.match(XU);if(i){let o=e.lastIndexOf(i[0].slice(0,2));if(bn(e,o)||si(e,o))return e;if(((n=e.match($T))==null?void 0:n.length)%2===1)return`${e}~`}}return e},Mp=e=>e!==!1,DH=e=>e===!0,mn={SINGLE_TILDE:0,COMPARISON_OPERATORS:5,HTML_TAGS:10,SETEXT_HEADINGS:15,LINKS:20,BOLD_ITALIC:30,BOLD:35,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,INLINE_KATEX:75,DEFAULT:100},MH=[{handler:{name:"singleTilde",handle:LH,priority:mn.SINGLE_TILDE},optionKey:"singleTilde"},{handler:{name:"comparisonOperators",handle:PU,priority:mn.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:pH,priority:mn.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:RH,priority:mn.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:Xw,priority:mn.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:hH,priority:mn.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:rH,priority:mn.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:iH,priority:mn.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:oH,priority:mn.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:cH,priority:mn.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:EH,priority:mn.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:IH,priority:mn.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:TH,priority:mn.KATEX},optionKey:"katex"},{handler:{name:"inlineKatex",handle:vH,priority:mn.INLINE_KATEX},optionKey:"inlineKatex"}],PH=e=>{var t;let n=(t=e?.linkMode)!=null?t:"protocol";return MH.filter(({handler:r,optionKey:i})=>r.name==="links"?Mp(e?.links)||Mp(e?.images):r.name==="inlineKatex"?DH(e?.inlineKatex):Mp(e?.[i])).map(({handler:r,earlyReturn:i})=>r.name==="links"?{handler:zw(Hw({},r),{handle:o=>Xw(o,n)}),earlyReturn:n==="protocol"?i:void 0}:{handler:r,earlyReturn:i})},BH=(e,t)=>{var n;if(!e||typeof e!="string")return e;let r=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,i=PH(t),o=((n=t?.handlers)!=null?n:[]).map(c=>{var d;return{handler:zw(Hw({},c),{priority:(d=c.priority)!=null?d:mn.DEFAULT}),earlyReturn:void 0}}),l=[...i,...o].sort((c,d)=>{var h,p;return((h=c.handler.priority)!=null?h:0)-((p=d.handler.priority)!=null?p:0)});for(let{handler:c,earlyReturn:d}of l)if(r=c.handle(r),d!=null&&d(r))return r;return r},jH=BH;const UH=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,HH=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,zH={};function qT(e,t){return(zH.jsx?HH:UH).test(e)}const FH=/[ \t\n\f\r]/g;function kf(e){return typeof e=="object"?e.type==="text"?YT(e.value):!1:YT(e)}function YT(e){return e.replace(FH,"")===""}var Ws={},Pp,XT;function $H(){if(XT)return Pp;XT=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
88
+ `,h="/",p="*",m="",_="comment",E="declaration";function T(A,C){if(typeof A!="string")throw new TypeError("First argument must be a string");if(!A)return[];C=C||{};var k=1,N=1;function M(ue){var re=ue.match(t);re&&(k+=re.length);var U=ue.lastIndexOf(d);N=~U?ue.length-U:N+ue.length}function B(){var ue={line:k,column:N};return function(re){return re.position=new D(ue),ie(),re}}function D(ue){this.start=ue,this.end={line:k,column:N},this.source=C.source}D.prototype.content=A;function z(ue){var re=new Error(C.source+":"+k+":"+N+": "+ue);if(re.reason=ue,re.filename=C.source,re.line=k,re.column=N,re.source=A,!C.silent)throw re}function G(ue){var re=ue.exec(A);if(re){var U=re[0];return M(U),A=A.slice(U.length),re}}function ie(){G(n)}function V(ue){var re;for(ue=ue||[];re=X();)re!==!1&&ue.push(re);return ue}function X(){var ue=B();if(!(h!=A.charAt(0)||p!=A.charAt(1))){for(var re=2;m!=A.charAt(re)&&(p!=A.charAt(re)||h!=A.charAt(re+1));)++re;if(re+=2,m===A.charAt(re-1))return z("End of comment missing");var U=A.slice(2,re-2);return N+=2,M(U),A=A.slice(re),N+=2,ue({type:_,comment:U})}}function J(){var ue=B(),re=G(r);if(re){if(X(),!G(i))return z("property missing ':'");var U=G(o),ee=ue({type:E,property:S(re[0].replace(e,m)),value:U?S(U[0].replace(e,m)):m});return G(l),ee}}function he(){var ue=[];V(ue);for(var re;re=J();)re!==!1&&(ue.push(re),V(ue));return ue}return ie(),he()}function S(A){return A?A.replace(c,m):m}return Pp=T,Pp}var QT;function VH(){if(QT)return Ws;QT=1;var e=Ws&&Ws.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ws,"__esModule",{value:!0}),Ws.default=n;const t=e($H());function n(r,i){let o=null;if(!r||typeof r!="string")return o;const l=(0,t.default)(r),c=typeof i=="function";return l.forEach(d=>{if(d.type!=="declaration")return;const{property:h,value:p}=d;c?i(h,p,d):p&&(o=o||{},o[h]=p)}),o}return Ws}var Al={},WT;function GH(){if(WT)return Al;WT=1,Object.defineProperty(Al,"__esModule",{value:!0}),Al.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,o=function(h){return!h||n.test(h)||e.test(h)},l=function(h,p){return p.toUpperCase()},c=function(h,p){return"".concat(p,"-")},d=function(h,p){return p===void 0&&(p={}),o(h)?h:(h=h.toLowerCase(),p.reactCompat?h=h.replace(i,c):h=h.replace(r,c),h.replace(t,l))};return Al.camelCase=d,Al}var Cl,KT;function qH(){if(KT)return Cl;KT=1;var e=Cl&&Cl.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(VH()),n=GH();function r(i,o){var l={};return!i||typeof i!="string"||(0,t.default)(i,function(c,d){c&&d&&(l[(0,n.camelCase)(c,o)]=d)}),l}return r.default=r,Cl=r,Cl}var YH=qH();const XH=mg(YH);function $l(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?ZT(e.position):"start"in e||"end"in e?ZT(e):"line"in e||"column"in e?M0(e):""}function M0(e){return JT(e&&e.line)+":"+JT(e&&e.column)}function ZT(e){return M0(e&&e.start)+"-"+M0(e&&e.end)}function JT(e){return e&&typeof e=="number"?e:1}class cn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},l=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(l=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?o.ruleId=r:(o.source=r.slice(0,d),o.ruleId=r.slice(d+1))}if(!o.place&&o.ancestors&&o.ancestors){const d=o.ancestors[o.ancestors.length-1];d&&(o.place=d.position)}const c=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=c?c.line:void 0,this.name=$l(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=l&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}cn.prototype.file="";cn.prototype.name="";cn.prototype.reason="";cn.prototype.message="";cn.prototype.stack="";cn.prototype.column=void 0;cn.prototype.line=void 0;cn.prototype.ancestors=void 0;cn.prototype.cause=void 0;cn.prototype.fatal=void 0;cn.prototype.place=void 0;cn.prototype.ruleId=void 0;cn.prototype.source=void 0;const m1={}.hasOwnProperty,QH=new Map,WH=/[A-Z]/g,KH=new Set(["table","tbody","thead","tfoot","tr"]),ZH=new Set(["td","th"]),Qw="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function JH(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=oz(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=sz(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"?jr:Eo,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=Ww(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function Ww(e,t,n){if(t.type==="element")return ez(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return tz(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return rz(e,t,n);if(t.type==="mdxjsEsm")return nz(e,t);if(t.type==="root")return az(e,t,n);if(t.type==="text")return iz(e,t)}function ez(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=jr,e.schema=i),e.ancestors.push(t);const o=Zw(e,t.tagName,!1),l=lz(e,t);let c=g1(e,t);return KH.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!kf(d):!0})),Kw(e,l,o,t),p1(l,c),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function tz(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)}Kl(e,t.position)}function nz(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Kl(e,t.position)}function rz(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=jr,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:Zw(e,t.name,!0),l=uz(e,t),c=g1(e,t);return Kw(e,l,o,t),p1(l,c),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function az(e,t,n){const r={};return p1(r,g1(e,t)),e.create(t,e.Fragment,r,n)}function iz(e,t){return t.value}function Kw(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function p1(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function sz(e,t,n){return r;function r(i,o,l,c){const h=Array.isArray(l.children)?n:t;return c?h(o,l,c):h(o,l)}}function oz(e,t){return n;function n(r,i,o,l){const c=Array.isArray(o.children),d=Ur(r);return t(i,o,l,c,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function lz(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&m1.call(t.properties,i)){const o=cz(e,i,t.properties[i]);if(o){const[l,c]=o;e.tableCellAlignToStyle&&l==="align"&&typeof c=="string"&&ZH.has(t.tagName)?r=c:n[l]=c}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function uz(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const l=o.expression;l.type;const c=l.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else Kl(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const c=r.value.data.estree.body[0];c.type,o=e.evaluater.evaluateExpression(c.expression)}else Kl(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function g1(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:QH;for(;++r<t.children.length;){const o=t.children[r];let l;if(e.passKeys){const d=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(d){const h=i.get(d)||0;l=d+"-"+h,i.set(d,h+1)}}const c=Ww(e,o,l);c!==void 0&&n.push(c)}return n}function cz(e,t,n){const r=hu(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Kg(n):Zg(n)),r.property==="style"){let i=typeof n=="object"?n:dz(e,String(n));return e.stylePropertyNameCase==="css"&&(i=fz(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?SM[r.property]||r.property:r.attribute,n]}}function dz(e,t){try{return XH(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new cn("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=Qw+"#cannot-parse-style-attribute",i}}function Zw(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,l;for(;++o<i.length;){const c=qT(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};l=l?{type:"MemberExpression",object:l,property:c,computed:!!(o&&c.type==="Literal"),optional:!1}:c}r=l}else r=qT(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return m1.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Kl(e)}function Kl(e,t){const n=new cn("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=Qw+"#cannot-handle-mdx-estrees-without-createevaluater",n}function fz(e){const t={};let n;for(n in e)m1.call(e,n)&&(t[hz(n)]=e[n]);return t}function hz(e){let t=e.replace(WH,mz);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function mz(e){return"-"+e.toLowerCase()}const Bp={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"]},pz={tokenize:gz};function gz(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),et(e,t,"linePrefix")}function i(c){return e.enter("paragraph"),o(c)}function o(c){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,l(c)}function l(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return Re(c)?(e.consume(c),e.exit("chunkText"),o):(e.consume(c),l)}}const bz={tokenize:Ez},ev={tokenize:yz};function Ez(e){const t=this,n=[];let r=0,i,o,l;return c;function c(N){if(r<n.length){const M=n[r];return t.containerState=M[1],e.attempt(M[0].continuation,d,h)(N)}return h(N)}function d(N){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&k();const M=t.events.length;let B=M,D;for(;B--;)if(t.events[B][0]==="exit"&&t.events[B][1].type==="chunkFlow"){D=t.events[B][1].end;break}C(r);let z=M;for(;z<t.events.length;)t.events[z][1].end={...D},z++;return $n(t.events,B+1,0,t.events.slice(M)),t.events.length=z,h(N)}return c(N)}function h(N){if(r===n.length){if(!i)return _(N);if(i.currentConstruct&&i.currentConstruct.concrete)return T(N);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(ev,p,m)(N)}function p(N){return i&&k(),C(r),_(N)}function m(N){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,T(N)}function _(N){return t.containerState={},e.attempt(ev,E,T)(N)}function E(N){return r++,n.push([t.currentConstruct,t.containerState]),_(N)}function T(N){if(N===null){i&&k(),C(0),e.consume(N);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),S(N)}function S(N){if(N===null){A(e.exit("chunkFlow"),!0),C(0),e.consume(N);return}return Re(N)?(e.consume(N),A(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(N),S)}function A(N,M){const B=t.sliceStream(N);if(M&&B.push(null),N.previous=o,o&&(o.next=N),o=N,i.defineSkip(N.start),i.write(B),t.parser.lazy[N.start.line]){let D=i.events.length;for(;D--;)if(i.events[D][1].start.offset<l&&(!i.events[D][1].end||i.events[D][1].end.offset>l))return;const z=t.events.length;let G=z,ie,V;for(;G--;)if(t.events[G][0]==="exit"&&t.events[G][1].type==="chunkFlow"){if(ie){V=t.events[G][1].end;break}ie=!0}for(C(r),D=z;D<t.events.length;)t.events[D][1].end={...V},D++;$n(t.events,G+1,0,t.events.slice(z)),t.events.length=D}}function C(N){let M=n.length;for(;M-- >N;){const B=n[M];t.containerState=B[1],B[0].exit.call(t,e)}n.length=N}function k(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function yz(e,t,n){return et(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const _z={tokenize:xz};function xz(e){const t=this,n=e.attempt(bu,r,e.attempt(this.parser.constructs.flowInitial,i,et(e,e.attempt(this.parser.constructs.flow,i,e.attempt(dj,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Tz={resolveAll:ek()},vz=Jw("string"),Sz=Jw("text");function Jw(e){return{resolveAll:ek(e==="text"?Az:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,l,c);return l;function l(p){return h(p)?o(p):c(p)}function c(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),d}function d(p){return h(p)?(n.exit("data"),o(p)):(n.consume(p),d)}function h(p){if(p===null)return!0;const m=i[p];let _=-1;if(m)for(;++_<m.length;){const E=m[_];if(!E.previous||E.previous.call(r,r.previous))return!0}return!1}}}function ek(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function Az(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 o=i.length,l=-1,c=0,d;for(;o--;){const h=i[o];if(typeof h=="string"){for(l=h.length;h.charCodeAt(l-1)===32;)c++,l--;if(l)break;l=-1}else if(h===-2)d=!0,c++;else if(h!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const h={type:n===e.length||d||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?l:r.start._bufferIndex+l,_index:r.start._index+o,line:r.end.line,column:r.end.column-c,offset:r.end.offset-c},end:{...r.end}};r.end={...h.start},r.start.offset===r.end.offset?Object.assign(r,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const Cz={42:Nn,43:Nn,45:Nn,48:Nn,49:Nn,50:Nn,51:Nn,52:Nn,53:Nn,54:Nn,55:Nn,56:Nn,57:Nn,62:Iw},wz={91:gj},kz={[-2]:Ip,[-1]:Ip,32:Ip},Nz={35:Tj,42:bd,45:[UT,bd],60:Cj,61:UT,95:bd,96:BT,126:BT},Rz={38:Mw,92:Dw},Oz={[-5]:Dp,[-4]:Dp,[-3]:Dp,33:Vj,38:Mw,42:D0,60:[q7,Ij],91:qj,92:[_j,Dw],93:d1,95:D0,96:ij},Lz={null:[D0,Tz]},Iz={null:[42,95]},Dz={null:[]},Mz=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Iz,contentInitial:wz,disable:Dz,document:Cz,flow:Nz,flowInitial:kz,insideSpan:Lz,string:Rz,text:Oz},Symbol.toStringTag,{value:"Module"}));function Pz(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={},o=[];let l=[],c=[];const d={attempt:z(B),check:z(D),consume:k,enter:N,exit:M,interrupt:z(D,{interrupt:!0})},h={code:null,containerState:{},defineSkip:S,events:[],now:T,parser:e,previous:null,sliceSerialize:_,sliceStream:E,write:m};let p=t.tokenize.call(h,d);return t.resolveAll&&o.push(t),h;function m(X){return l=rr(l,X),A(),l[l.length-1]!==null?[]:(G(t,0),h.events=Cf(o,h.events,h),h.events)}function _(X,J){return jz(E(X),J)}function E(X){return Bz(l,X)}function T(){const{_bufferIndex:X,_index:J,line:he,column:ue,offset:re}=r;return{_bufferIndex:X,_index:J,line:he,column:ue,offset:re}}function S(X){i[X.line]=X.column,V()}function A(){let X;for(;r._index<l.length;){const J=l[r._index];if(typeof J=="string")for(X=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===X&&r._bufferIndex<J.length;)C(J.charCodeAt(r._bufferIndex));else C(J)}}function C(X){p=p(X)}function k(X){Re(X)?(r.line++,r.column=1,r.offset+=X===-3?2:1,V()):X!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),h.previous=X}function N(X,J){const he=J||{};return he.type=X,he.start=T(),h.events.push(["enter",he,h]),c.push(he),he}function M(X){const J=c.pop();return J.end=T(),h.events.push(["exit",J,h]),J}function B(X,J){G(X,J.from)}function D(X,J){J.restore()}function z(X,J){return he;function he(ue,re,U){let ee,ce,xe,O;return Array.isArray(ue)?te(ue):"tokenize"in ue?te([ue]):F(ue);function F(ye){return be;function be(ke){const Te=ke!==null&&ye[ke],De=ke!==null&&ye.null,je=[...Array.isArray(Te)?Te:Te?[Te]:[],...Array.isArray(De)?De:De?[De]:[]];return te(je)(ke)}}function te(ye){return ee=ye,ce=0,ye.length===0?U:P(ye[ce])}function P(ye){return be;function be(ke){return O=ie(),xe=ye,ye.partial||(h.currentConstruct=ye),ye.name&&h.parser.constructs.disable.null.includes(ye.name)?Ee():ye.tokenize.call(J?Object.assign(Object.create(h),J):h,d,ge,Ee)(ke)}}function ge(ye){return X(xe,O),re}function Ee(ye){return O.restore(),++ce<ee.length?P(ee[ce]):U}}}function G(X,J){X.resolveAll&&!o.includes(X)&&o.push(X),X.resolve&&$n(h.events,J,h.events.length-J,X.resolve(h.events.slice(J),h)),X.resolveTo&&(h.events=X.resolveTo(h.events,h))}function ie(){const X=T(),J=h.previous,he=h.currentConstruct,ue=h.events.length,re=Array.from(c);return{from:ue,restore:U};function U(){r=X,h.previous=J,h.currentConstruct=he,h.events.length=ue,c=re,V()}}function V(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Bz(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let l;if(n===i)l=[e[n].slice(r,o)];else{if(l=e.slice(n,i),r>-1){const c=l[0];typeof c=="string"?l[0]=c.slice(r):l.shift()}o>0&&l.push(e[i].slice(0,o))}return l}function jz(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let l;if(typeof o=="string")l=o;else switch(o){case-5:{l="\r";break}case-4:{l=`
89
+ `;break}case-3:{l=`\r
90
+ `;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&i)continue;l=" ";break}default:l=String.fromCharCode(o)}i=o===-2,r.push(l)}return r.join("")}function Uz(e){const r={constructs:Sw([Mz,...(e||{}).extensions||[]]),content:i(pz),defined:[],document:i(bz),flow:i(_z),lazy:{},string:i(vz),text:i(Sz)};return r;function i(o){return l;function l(c){return Pz(r,o,c)}}}function Hz(e){for(;!Pw(e););return e}const tv=/[\0\t\n\r]/g;function zz(){let e=1,t="",n=!0,r;return i;function i(o,l,c){const d=[];let h,p,m,_,E;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(l||void 0).decode(o)),m=0,t="",n&&(o.charCodeAt(0)===65279&&m++,n=void 0);m<o.length;){if(tv.lastIndex=m,h=tv.exec(o),_=h&&h.index!==void 0?h.index:o.length,E=o.charCodeAt(_),!h){t=o.slice(m);break}if(E===10&&m===_&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),m<_&&(d.push(o.slice(m,_)),e+=_-m),E){case 0:{d.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,d.push(-2);e++<p;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}m=_+1}return c&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const tk={}.hasOwnProperty;function Fz(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),$z(n)(Hz(Uz(n).document().write(zz()(e,t,!0))))}function $z(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(st),autolinkProtocol:ie,autolinkEmail:ie,atxHeading:o(On),blockQuote:o(De),characterEscape:ie,characterReference:ie,codeFenced:o(je),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(je,l),codeText:o(Je,l),codeTextData:ie,data:ie,codeFlowValue:ie,definition:o(Nt),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o(it),hardBreakEscape:o(En),hardBreakTrailing:o(En),htmlFlow:o(Tr,l),htmlFlowData:ie,htmlText:o(Tr,l),htmlTextData:ie,image:o(He),label:l,link:o(st),listItem:o(yn),listItemValue:_,listOrdered:o(qt,m),listUnordered:o(qt),paragraph:o(zr),reference:P,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o(On),strong:o(Gf),thematicBreak:o(qf)},exit:{atxHeading:d(),atxHeadingSequence:B,autolink:d(),autolinkEmail:Te,autolinkProtocol:ke,blockQuote:d(),characterEscapeValue:V,characterReferenceMarkerHexadecimal:Ee,characterReferenceMarkerNumeric:Ee,characterReferenceValue:ye,characterReference:be,codeFenced:d(A),codeFencedFence:S,codeFencedFenceInfo:E,codeFencedFenceMeta:T,codeFlowValue:V,codeIndented:d(C),codeText:d(re),codeTextData:V,data:V,definition:d(),definitionDestinationString:M,definitionLabelString:k,definitionTitleString:N,emphasis:d(),hardBreakEscape:d(J),hardBreakTrailing:d(J),htmlFlow:d(he),htmlFlowData:V,htmlText:d(ue),htmlTextData:V,image:d(ee),label:xe,labelText:ce,lineEnding:X,link:d(U),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:ge,resourceDestinationString:O,resourceTitleString:F,resource:te,setextHeading:d(G),setextHeadingLineSequence:z,setextHeadingText:D,strong:d(),thematicBreak:d()}};nk(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(oe){let _e={type:"root",children:[]};const Le={stack:[_e],tokenStack:[],config:t,enter:c,exit:h,buffer:l,resume:p,data:n},Ve=[];let ot=-1;for(;++ot<oe.length;)if(oe[ot][1].type==="listOrdered"||oe[ot][1].type==="listUnordered")if(oe[ot][0]==="enter")Ve.push(ot);else{const Ln=Ve.pop();ot=i(oe,Ln,ot)}for(ot=-1;++ot<oe.length;){const Ln=t[oe[ot][0]];tk.call(Ln,oe[ot][1].type)&&Ln[oe[ot][1].type].call(Object.assign({sliceSerialize:oe[ot][2].sliceSerialize},Le),oe[ot][1])}if(Le.tokenStack.length>0){const Ln=Le.tokenStack[Le.tokenStack.length-1];(Ln[1]||nv).call(Le,void 0,Ln[0])}for(_e.position={start:Ga(oe.length>0?oe[0][1].start:{line:1,column:1,offset:0}),end:Ga(oe.length>0?oe[oe.length-2][1].end:{line:1,column:1,offset:0})},ot=-1;++ot<t.transforms.length;)_e=t.transforms[ot](_e)||_e;return _e}function i(oe,_e,Le){let Ve=_e-1,ot=-1,Ln=!1,Fr,fn,Ut,_n;for(;++Ve<=Le;){const pt=oe[Ve];switch(pt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{pt[0]==="enter"?ot++:ot--,_n=void 0;break}case"lineEndingBlank":{pt[0]==="enter"&&(Fr&&!_n&&!ot&&!Ut&&(Ut=Ve),_n=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:_n=void 0}if(!ot&&pt[0]==="enter"&&pt[1].type==="listItemPrefix"||ot===-1&&pt[0]==="exit"&&(pt[1].type==="listUnordered"||pt[1].type==="listOrdered")){if(Fr){let ya=Ve;for(fn=void 0;ya--;){const or=oe[ya];if(or[1].type==="lineEnding"||or[1].type==="lineEndingBlank"){if(or[0]==="exit")continue;fn&&(oe[fn][1].type="lineEndingBlank",Ln=!0),or[1].type="lineEnding",fn=ya}else if(!(or[1].type==="linePrefix"||or[1].type==="blockQuotePrefix"||or[1].type==="blockQuotePrefixWhitespace"||or[1].type==="blockQuoteMarker"||or[1].type==="listItemIndent"))break}Ut&&(!fn||Ut<fn)&&(Fr._spread=!0),Fr.end=Object.assign({},fn?oe[fn][1].start:pt[1].end),oe.splice(fn||Ve,0,["exit",Fr,pt[2]]),Ve++,Le++}if(pt[1].type==="listItemPrefix"){const ya={type:"listItem",_spread:!1,start:Object.assign({},pt[1].start),end:void 0};Fr=ya,oe.splice(Ve,0,["enter",ya,pt[2]]),Ve++,Le++,Ut=void 0,_n=!0}}}return oe[_e][1]._spread=Ln,Le}function o(oe,_e){return Le;function Le(Ve){c.call(this,oe(Ve),Ve),_e&&_e.call(this,Ve)}}function l(){this.stack.push({type:"fragment",children:[]})}function c(oe,_e,Le){this.stack[this.stack.length-1].children.push(oe),this.stack.push(oe),this.tokenStack.push([_e,Le||void 0]),oe.position={start:Ga(_e.start),end:void 0}}function d(oe){return _e;function _e(Le){oe&&oe.call(this,Le),h.call(this,Le)}}function h(oe,_e){const Le=this.stack.pop(),Ve=this.tokenStack.pop();if(Ve)Ve[0].type!==oe.type&&(_e?_e.call(this,oe,Ve[0]):(Ve[1]||nv).call(this,oe,Ve[0]));else throw new Error("Cannot close `"+oe.type+"` ("+$l({start:oe.start,end:oe.end})+"): it’s not open");Le.position.end=Ga(oe.end)}function p(){return o1(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function _(oe){if(this.data.expectingFirstListItemValue){const _e=this.stack[this.stack.length-2];_e.start=Number.parseInt(this.sliceSerialize(oe),10),this.data.expectingFirstListItemValue=void 0}}function E(){const oe=this.resume(),_e=this.stack[this.stack.length-1];_e.lang=oe}function T(){const oe=this.resume(),_e=this.stack[this.stack.length-1];_e.meta=oe}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function A(){const oe=this.resume(),_e=this.stack[this.stack.length-1];_e.value=oe.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function C(){const oe=this.resume(),_e=this.stack[this.stack.length-1];_e.value=oe.replace(/(\r?\n|\r)$/g,"")}function k(oe){const _e=this.resume(),Le=this.stack[this.stack.length-1];Le.label=_e,Le.identifier=pr(this.sliceSerialize(oe)).toLowerCase()}function N(){const oe=this.resume(),_e=this.stack[this.stack.length-1];_e.title=oe}function M(){const oe=this.resume(),_e=this.stack[this.stack.length-1];_e.url=oe}function B(oe){const _e=this.stack[this.stack.length-1];if(!_e.depth){const Le=this.sliceSerialize(oe).length;_e.depth=Le}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function z(oe){const _e=this.stack[this.stack.length-1];_e.depth=this.sliceSerialize(oe).codePointAt(0)===61?1:2}function G(){this.data.setextHeadingSlurpLineEnding=void 0}function ie(oe){const Le=this.stack[this.stack.length-1].children;let Ve=Le[Le.length-1];(!Ve||Ve.type!=="text")&&(Ve=dn(),Ve.position={start:Ga(oe.start),end:void 0},Le.push(Ve)),this.stack.push(Ve)}function V(oe){const _e=this.stack.pop();_e.value+=this.sliceSerialize(oe),_e.position.end=Ga(oe.end)}function X(oe){const _e=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Le=_e.children[_e.children.length-1];Le.position.end=Ga(oe.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(_e.type)&&(ie.call(this,oe),V.call(this,oe))}function J(){this.data.atHardBreak=!0}function he(){const oe=this.resume(),_e=this.stack[this.stack.length-1];_e.value=oe}function ue(){const oe=this.resume(),_e=this.stack[this.stack.length-1];_e.value=oe}function re(){const oe=this.resume(),_e=this.stack[this.stack.length-1];_e.value=oe}function U(){const oe=this.stack[this.stack.length-1];if(this.data.inReference){const _e=this.data.referenceType||"shortcut";oe.type+="Reference",oe.referenceType=_e,delete oe.url,delete oe.title}else delete oe.identifier,delete oe.label;this.data.referenceType=void 0}function ee(){const oe=this.stack[this.stack.length-1];if(this.data.inReference){const _e=this.data.referenceType||"shortcut";oe.type+="Reference",oe.referenceType=_e,delete oe.url,delete oe.title}else delete oe.identifier,delete oe.label;this.data.referenceType=void 0}function ce(oe){const _e=this.sliceSerialize(oe),Le=this.stack[this.stack.length-2];Le.label=g7(_e),Le.identifier=pr(_e).toLowerCase()}function xe(){const oe=this.stack[this.stack.length-1],_e=this.resume(),Le=this.stack[this.stack.length-1];if(this.data.inReference=!0,Le.type==="link"){const Ve=oe.children;Le.children=Ve}else Le.alt=_e}function O(){const oe=this.resume(),_e=this.stack[this.stack.length-1];_e.url=oe}function F(){const oe=this.resume(),_e=this.stack[this.stack.length-1];_e.title=oe}function te(){this.data.inReference=void 0}function P(){this.data.referenceType="collapsed"}function ge(oe){const _e=this.resume(),Le=this.stack[this.stack.length-1];Le.label=_e,Le.identifier=pr(this.sliceSerialize(oe)).toLowerCase(),this.data.referenceType="full"}function Ee(oe){this.data.characterReferenceType=oe.type}function ye(oe){const _e=this.sliceSerialize(oe),Le=this.data.characterReferenceType;let Ve;Le?(Ve=vw(_e,Le==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ve=u1(_e);const ot=this.stack[this.stack.length-1];ot.value+=Ve}function be(oe){const _e=this.stack.pop();_e.position.end=Ga(oe.end)}function ke(oe){V.call(this,oe);const _e=this.stack[this.stack.length-1];_e.url=this.sliceSerialize(oe)}function Te(oe){V.call(this,oe);const _e=this.stack[this.stack.length-1];_e.url="mailto:"+this.sliceSerialize(oe)}function De(){return{type:"blockquote",children:[]}}function je(){return{type:"code",lang:null,meta:null,value:""}}function Je(){return{type:"inlineCode",value:""}}function Nt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function it(){return{type:"emphasis",children:[]}}function On(){return{type:"heading",depth:0,children:[]}}function En(){return{type:"break"}}function Tr(){return{type:"html",value:""}}function He(){return{type:"image",title:null,url:"",alt:null}}function st(){return{type:"link",title:null,url:"",children:[]}}function qt(oe){return{type:"list",ordered:oe.type==="listOrdered",start:null,spread:oe._spread,children:[]}}function yn(oe){return{type:"listItem",spread:oe._spread,checked:null,children:[]}}function zr(){return{type:"paragraph",children:[]}}function Gf(){return{type:"strong",children:[]}}function dn(){return{type:"text",value:""}}function qf(){return{type:"thematicBreak"}}}function Ga(e){return{line:e.line,column:e.column,offset:e.offset}}function nk(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?nk(e,r):Vz(e,r)}}function Vz(e,t){let n;for(n in t)if(tk.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 nv(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+$l({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+$l({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+$l({start:t.start,end:t.end})+") is still open")}function Gz(e){const t=this;t.parser=n;function n(r){return Fz(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function qz(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 Yz(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
91
+ `}]}function Xz(e,t){const n=t.value?t.value+`
92
+ `:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function Qz(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Wz(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Kz(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=To(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let l,c=e.footnoteCounts.get(r);c===void 0?(c=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=o+1,c+=1,e.footnoteCounts.set(r,c);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,d);const h={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,h),e.applyData(t,h)}function Zz(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 Jz(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function rk(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),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const l=i[i.length-1];return l&&l.type==="text"?l.value+=r:i.push({type:"text",value:r}),i}function eF(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return rk(e,t);const i={src:To(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function tF(e,t){const n={src:To(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 nF(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 rF(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return rk(e,t);const i={href:To(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function aF(e,t){const n={href:To(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 iF(e,t,n){const r=e.all(t),i=n?sF(n):ak(t),o={},l=[];if(typeof t.checked=="boolean"){const p=r[0];let m;p&&p.type==="element"&&p.tagName==="p"?m=p:(m={type:"element",tagName:"p",properties:{},children:[]},r.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let c=-1;for(;++c<r.length;){const p=r[c];(i||c!==0||p.type!=="element"||p.tagName!=="p")&&l.push({type:"text",value:`
93
+ `}),p.type==="element"&&p.tagName==="p"&&!i?l.push(...p.children):l.push(p)}const d=r[r.length-1];d&&(i||d.type!=="element"||d.tagName!=="p")&&l.push({type:"text",value:`
94
+ `});const h={type:"element",tagName:"li",properties:o,children:l};return e.patch(t,h),e.applyData(t,h)}function sF(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=ak(n[r])}return t}function ak(e){const t=e.spread;return t??e.children.length>1}function oF(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 l=r[i];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function lF(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function uF(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function cF(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function dF(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),i.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=Ur(t.children[1]),d=Sf(t.children[t.children.length-1]);c&&d&&(l.position={start:c,end:d}),i.push(l)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function fF(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,c=l?l.length:t.children.length;let d=-1;const h=[];for(;++d<c;){const m=t.children[d],_={},E=l?l[d]:void 0;E&&(_.align=E);let T={type:"element",tagName:o,properties:_,children:[]};m&&(T.children=e.all(m),e.patch(m,T),T=e.applyData(m,T)),h.push(T)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,p),e.applyData(t,p)}function hF(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const rv=9,av=32;function mF(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(iv(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(iv(t.slice(i),i>0,!1)),o.join("")}function iv(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===rv||o===av;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===rv||o===av;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function pF(e,t){const n={type:"text",value:mF(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function gF(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const bF={blockquote:qz,break:Yz,code:Xz,delete:Qz,emphasis:Wz,footnoteReference:Kz,heading:Zz,html:Jz,imageReference:eF,image:tF,inlineCode:nF,linkReference:rF,link:aF,listItem:iF,list:oF,paragraph:lF,root:uF,strong:cF,table:dF,tableCell:hF,tableRow:fF,text:pF,thematicBreak:gF,toml:Zc,yaml:Zc,definition:Zc,footnoteDefinition:Zc};function Zc(){}function EF(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 yF(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function _F(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||EF,r=e.options.footnoteBackLabel||yF,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let d=-1;for(;++d<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[d]);if(!h)continue;const p=e.all(h),m=String(h.identifier).toUpperCase(),_=To(m.toLowerCase());let E=0;const T=[],S=e.footnoteCounts.get(m);for(;S!==void 0&&++E<=S;){T.length>0&&T.push({type:"text",value:" "});let k=typeof n=="string"?n:n(d,E);typeof k=="string"&&(k={type:"text",value:k}),T.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+_+(E>1?"-"+E:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,E),className:["data-footnote-backref"]},children:Array.isArray(k)?k:[k]})}const A=p[p.length-1];if(A&&A.type==="element"&&A.tagName==="p"){const k=A.children[A.children.length-1];k&&k.type==="text"?k.value+=" ":A.children.push({type:"text",value:" "}),A.children.push(...T)}else p.push(...T);const C={type:"element",tagName:"li",properties:{id:t+"fn-"+_},children:e.wrap(p,!0)};e.patch(h,C),c.push(C)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Qi(l),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
95
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
96
+ `}]}}const P0={}.hasOwnProperty,xF={};function TF(e,t){const n=t||xF,r=new Map,i=new Map,o=new Map,l={...bF,...n.handlers},c={all:h,applyData:SF,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:l,one:d,options:n,patch:vF,wrap:CF};return Pr(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const m=p.type==="definition"?r:i,_=String(p.identifier).toUpperCase();m.has(_)||m.set(_,p)}}),c;function d(p,m){const _=p.type,E=c.handlers[_];if(P0.call(c.handlers,_)&&E)return E(c,p,m);if(c.options.passThrough&&c.options.passThrough.includes(_)){if("children"in p){const{children:S,...A}=p,C=Qi(A);return C.children=c.all(p),C}return Qi(p)}return(c.options.unknownHandler||AF)(c,p,m)}function h(p){const m=[];if("children"in p){const _=p.children;let E=-1;for(;++E<_.length;){const T=c.one(_[E],p);if(T){if(E&&_[E-1].type==="break"&&(!Array.isArray(T)&&T.type==="text"&&(T.value=sv(T.value)),!Array.isArray(T)&&T.type==="element")){const S=T.children[0];S&&S.type==="text"&&(S.value=sv(S.value))}Array.isArray(T)?m.push(...T):m.push(T)}}}return m}}function vF(e,t){e.position&&(t.position=ZC(e))}function SF(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const l="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:l}}n.type==="element"&&o&&Object.assign(n.properties,Qi(o)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function AF(e,t){const n=t.data||{},r="value"in t&&!(P0.call(n,"hProperties")||P0.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 CF(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
97
+ `});++r<e.length;)r&&n.push({type:"text",value:`
98
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
99
+ `}),n}function sv(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function ov(e,t){const n=TF(e,t),r=n.one(e,void 0),i=_F(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
100
+ `},i),o}function wF(e,t){return e&&"run"in e?async function(n,r){const i=ov(n,{file:r,...t});await e.run(i,r)}:function(n,r){return ov(n,{file:r,...e||t})}}function lv(e){if(e)throw e}var jp,uv;function kF(){if(uv)return jp;uv=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},o=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var p=e.call(h,"constructor"),m=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!p&&!m)return!1;var _;for(_ in h);return typeof _>"u"||e.call(h,_)},l=function(h,p){n&&p.name==="__proto__"?n(h,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):h[p.name]=p.newValue},c=function(h,p){if(p==="__proto__")if(e.call(h,p)){if(r)return r(h,p).value}else return;return h[p]};return jp=function d(){var h,p,m,_,E,T,S=arguments[0],A=1,C=arguments.length,k=!1;for(typeof S=="boolean"&&(k=S,S=arguments[1]||{},A=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});A<C;++A)if(h=arguments[A],h!=null)for(p in h)m=c(S,p),_=c(h,p),S!==_&&(k&&_&&(o(_)||(E=i(_)))?(E?(E=!1,T=m&&i(m)?m:[]):T=m&&o(m)?m:{},l(S,{name:p,newValue:d(k,T,_)})):typeof _<"u"&&l(S,{name:p,newValue:_}));return S},jp}var NF=kF();const Up=mg(NF);function B0(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 RF(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const l=i.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);c(null,...i);function c(d,...h){const p=e[++o];let m=-1;if(d){l(d);return}for(;++m<i.length;)(h[m]===null||h[m]===void 0)&&(h[m]=i[m]);i=h,p?OF(p,c)(...h):l(null,...h)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function OF(e,t){let n;return r;function r(...l){const c=e.length>l.length;let d;c&&l.push(i);try{d=e.apply(this,l)}catch(h){const p=h;if(c&&n)throw p;return i(p)}c||(d&&d.then&&typeof d.then=="function"?d.then(o,i):d instanceof Error?i(d):o(d))}function i(l,...c){n||(n=!0,t(l,...c))}function o(l){i(null,l)}}const Or={basename:LF,dirname:IF,extname:DF,join:MF,sep:"/"};function LF(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Eu(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,c=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else l<0&&(o=!0,l=i+1),c>-1&&(e.codePointAt(i)===t.codePointAt(c--)?c<0&&(r=i):(c=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function IF(e){if(Eu(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 DF(e){Eu(e);let t=e.length,n=-1,r=0,i=-1,o=0,l;for(;t--;){const c=e.codePointAt(t);if(c===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),c===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function MF(...e){let t=-1,n;for(;++t<e.length;)Eu(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":PF(n)}function PF(e){Eu(e);const t=e.codePointAt(0)===47;let n=BF(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function BF(e,t){let n="",r=0,i=-1,o=0,l=-1,c,d;for(;++l<=e.length;){if(l<e.length)c=e.codePointAt(l);else{if(c===47)break;c=47}if(c===47){if(!(i===l-1||o===1))if(i!==l-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",r=0):(n=n.slice(0,d),r=n.length-1-n.lastIndexOf("/")),i=l,o=0;continue}}else if(n.length>0){n="",r=0,i=l,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,l):n=e.slice(i+1,l),r=l-i-1;i=l,o=0}else c===46&&o>-1?o++:o=-1}return n}function Eu(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const jF={cwd:UF};function UF(){return"/"}function j0(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function HF(e){if(typeof e=="string")e=new URL(e);else if(!j0(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 zF(e)}function zF(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 Hp=["history","path","basename","stem","extname","dirname"];class FF{constructor(t){let n;t?j0(t)?n={path:t}:typeof t=="string"||$F(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":jF.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Hp.length;){const o=Hp[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)Hp.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Or.basename(this.path):void 0}set basename(t){Fp(t,"basename"),zp(t,"basename"),this.path=Or.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Or.dirname(this.path):void 0}set dirname(t){cv(this.basename,"dirname"),this.path=Or.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Or.extname(this.path):void 0}set extname(t){if(zp(t,"extname"),cv(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=Or.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){j0(t)&&(t=HF(t)),Fp(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Or.basename(this.path,this.extname):void 0}set stem(t){Fp(t,"stem"),zp(t,"stem"),this.path=Or.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 cn(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 zp(e,t){if(e&&e.includes(Or.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Or.sep+"`")}function Fp(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function cv(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function $F(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const VF=(function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),GF={}.hasOwnProperty;class b1 extends VF{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=RF()}copy(){const t=new b1;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Up(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Gp("data",this.frozen),this.namespace[t]=n,this):GF.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Gp("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=Jc(t),r=this.parser||this.Parser;return $p("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),$p("process",this.parser||this.Parser),Vp("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,l){const c=Jc(t),d=r.parse(c);r.run(d,c,function(p,m,_){if(p||!m||!_)return h(p);const E=m,T=r.stringify(E,_);XF(T)?_.value=T:_.result=T,h(p,_)});function h(p,m){p||!m?l(p):o?o(m):n(void 0,m)}}}processSync(t){let n=!1,r;return this.freeze(),$p("processSync",this.parser||this.Parser),Vp("processSync",this.compiler||this.Compiler),this.process(t,i),fv("processSync","process",n),r;function i(o,l){n=!0,lv(o),r=l}}run(t,n,r){dv(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(l,c){const d=Jc(n);i.run(t,d,h);function h(p,m,_){const E=m||t;p?c(p):l?l(E):r(void 0,E,_)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),fv("runSync","run",r),i;function o(l,c){lv(l),i=c,r=!0}}stringify(t,n){this.freeze();const r=Jc(n),i=this.compiler||this.Compiler;return Vp("stringify",i),dv(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Gp("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(h){if(typeof h=="function")d(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[p,...m]=h;d(p,m)}else l(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function l(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");c(h.plugins),h.settings&&(i.settings=Up(!0,i.settings,h.settings))}function c(h){let p=-1;if(h!=null)if(Array.isArray(h))for(;++p<h.length;){const m=h[p];o(m)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function d(h,p){let m=-1,_=-1;for(;++m<r.length;)if(r[m][0]===h){_=m;break}if(_===-1)r.push([h,...p]);else if(p.length>0){let[E,...T]=p;const S=r[_][1];B0(S)&&B0(E)&&(E=Up(!0,S,E)),r[_]=[h,E,...T]}}}}const qF=new b1().freeze();function $p(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Vp(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Gp(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 dv(e){if(!B0(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function fv(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Jc(e){return YF(e)?e:new FF(e)}function YF(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function XF(e){return typeof e=="string"||QF(e)}function QF(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function E1(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var os=E1();function ik(e){os=e}var Ui={exec:()=>null};function tt(e,t=""){let n=typeof e=="string"?e:e.source,r={replace:(i,o)=>{let l=typeof o=="string"?o:o.source;return l=l.replace(gn.caret,"$1"),n=n.replace(i,l),r},getRegex:()=>new RegExp(n,t)};return r}var WF=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),gn={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,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,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"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},KF=/^(?:[ \t]*(?:\n|$))+/,ZF=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,JF=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,yu=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,e$=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,y1=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,sk=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ok=tt(sk).replace(/bull/g,y1).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(),t$=tt(sk).replace(/bull/g,y1).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(),_1=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,n$=/^[^\n]+/,x1=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,r$=tt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",x1).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),a$=tt(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,y1).getRegex(),Nf="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",T1=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,i$=tt("^ {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",T1).replace("tag",Nf).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),lk=tt(_1).replace("hr",yu).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[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Nf).getRegex(),s$=tt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",lk).getRegex(),v1={blockquote:s$,code:ZF,def:r$,fences:JF,heading:e$,hr:yu,html:i$,lheading:ok,list:a$,newline:KF,paragraph:lk,table:Ui,text:n$},hv=tt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",yu).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[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Nf).getRegex(),o$={...v1,lheading:t$,table:hv,paragraph:tt(_1).replace("hr",yu).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",hv).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Nf).getRegex()},l$={...v1,html:tt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",T1).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:Ui,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:tt(_1).replace("hr",yu).replace("heading",` *#{1,6} *[^
101
+ ]`).replace("lheading",ok).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},u$=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,c$=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,uk=/^( {2,}|\\)\n(?!\s*$)/,d$=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,vo=/[\p{P}\p{S}]/u,Rf=/[\s\p{P}\p{S}]/u,S1=/[^\s\p{P}\p{S}]/u,f$=tt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Rf).getRegex(),ck=/(?!~)[\p{P}\p{S}]/u,h$=/(?!~)[\s\p{P}\p{S}]/u,m$=/(?:[^\s\p{P}\p{S}]|~)/u,p$=tt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",WF?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),dk=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,g$=tt(dk,"u").replace(/punct/g,vo).getRegex(),b$=tt(dk,"u").replace(/punct/g,ck).getRegex(),fk="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",E$=tt(fk,"gu").replace(/notPunctSpace/g,S1).replace(/punctSpace/g,Rf).replace(/punct/g,vo).getRegex(),y$=tt(fk,"gu").replace(/notPunctSpace/g,m$).replace(/punctSpace/g,h$).replace(/punct/g,ck).getRegex(),_$=tt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,S1).replace(/punctSpace/g,Rf).replace(/punct/g,vo).getRegex(),x$=tt(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,vo).getRegex(),T$="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",v$=tt(T$,"gu").replace(/notPunctSpace/g,S1).replace(/punctSpace/g,Rf).replace(/punct/g,vo).getRegex(),S$=tt(/\\(punct)/,"gu").replace(/punct/g,vo).getRegex(),A$=tt(/^<(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(),C$=tt(T1).replace("(?:-->|$)","-->").getRegex(),w$=tt("^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",C$).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),jd=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,k$=tt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",jd).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),hk=tt(/^!?\[(label)\]\[(ref)\]/).replace("label",jd).replace("ref",x1).getRegex(),mk=tt(/^!?\[(ref)\](?:\[\])?/).replace("ref",x1).getRegex(),N$=tt("reflink|nolink(?!\\()","g").replace("reflink",hk).replace("nolink",mk).getRegex(),mv=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,A1={_backpedal:Ui,anyPunctuation:S$,autolink:A$,blockSkip:p$,br:uk,code:c$,del:Ui,delLDelim:Ui,delRDelim:Ui,emStrongLDelim:g$,emStrongRDelimAst:E$,emStrongRDelimUnd:_$,escape:u$,link:k$,nolink:mk,punctuation:f$,reflink:hk,reflinkSearch:N$,tag:w$,text:d$,url:Ui},R$={...A1,link:tt(/^!?\[(label)\]\((.*?)\)/).replace("label",jd).getRegex(),reflink:tt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",jd).getRegex()},U0={...A1,emStrongRDelimAst:y$,emStrongLDelim:b$,delLDelim:x$,delRDelim:v$,url:tt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",mv).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:tt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",mv).getRegex()},O$={...U0,br:tt(uk).replace("{2,}","*").getRegex(),text:tt(U0.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},ed={normal:v1,gfm:o$,pedantic:l$},wl={normal:A1,gfm:U0,breaks:O$,pedantic:R$},L$={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},pv=e=>L$[e];function kr(e,t){if(t){if(gn.escapeTest.test(e))return e.replace(gn.escapeReplace,pv)}else if(gn.escapeTestNoEncode.test(e))return e.replace(gn.escapeReplaceNoEncode,pv);return e}function gv(e){try{e=encodeURI(e).replace(gn.percentDecode,"%")}catch{return null}return e}function bv(e,t){let n=e.replace(gn.findPipe,(o,l,c)=>{let d=!1,h=l;for(;--h>=0&&c[h]==="\\";)d=!d;return d?"|":" |"}),r=n.split(gn.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(gn.slashPipe,"|");return r}function kl(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 I$(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 D$(e,t=0){let n=t,r="";for(let i of e)if(i===" "){let o=4-n%4;r+=" ".repeat(o),n+=o}else r+=i,n++;return r}function Ev(e,t,n,r,i){let o=t.href,l=t.title||null,c=e[1].replace(i.other.outputLinkReplace,"$1");r.state.inLink=!0;let d={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:o,title:l,text:c,tokens:r.inlineTokens(c)};return r.state.inLink=!1,d}function M$(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
102
+ `).map(o=>{let l=o.match(n.other.beginningSpace);if(l===null)return o;let[c]=l;return c.length>=i.length?o.slice(i.length):o}).join(`
103
+ `)}var Ud=class{options;rules;lexer;constructor(t){this.options=t||os}space(t){let n=this.rules.block.newline.exec(t);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(t){let n=this.rules.block.code.exec(t);if(n){let r=n[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:kl(r,`
104
+ `)}}}fences(t){let n=this.rules.block.fences.exec(t);if(n){let r=n[0],i=M$(r,n[3]||"",this.rules);return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):n[2],text:i}}}heading(t){let n=this.rules.block.heading.exec(t);if(n){let r=n[2].trim();if(this.rules.other.endingHash.test(r)){let i=kl(r,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(r=i.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){let n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:kl(n[0],`
105
+ `)}}blockquote(t){let n=this.rules.block.blockquote.exec(t);if(n){let r=kl(n[0],`
106
+ `).split(`
107
+ `),i="",o="",l=[];for(;r.length>0;){let c=!1,d=[],h;for(h=0;h<r.length;h++)if(this.rules.other.blockquoteStart.test(r[h]))d.push(r[h]),c=!0;else if(!c)d.push(r[h]);else break;r=r.slice(h);let p=d.join(`
108
+ `),m=p.replace(this.rules.other.blockquoteSetextReplace,`
109
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i}
110
+ ${p}`:p,o=o?`${o}
111
+ ${m}`:m;let _=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(m,l,!0),this.lexer.state.top=_,r.length===0)break;let E=l.at(-1);if(E?.type==="code")break;if(E?.type==="blockquote"){let T=E,S=T.raw+`
112
+ `+r.join(`
113
+ `),A=this.blockquote(S);l[l.length-1]=A,i=i.substring(0,i.length-T.raw.length)+A.raw,o=o.substring(0,o.length-T.text.length)+A.text;break}else if(E?.type==="list"){let T=E,S=T.raw+`
114
+ `+r.join(`
115
+ `),A=this.list(S);l[l.length-1]=A,i=i.substring(0,i.length-E.raw.length)+A.raw,o=o.substring(0,o.length-T.raw.length)+A.raw,r=S.substring(l.at(-1).raw.length).split(`
116
+ `);continue}}return{type:"blockquote",raw:i,tokens:l,text:o}}}list(t){let n=this.rules.block.list.exec(t);if(n){let r=n[1].trim(),i=r.length>1,o={type:"list",raw:"",ordered:i,start:i?+r.slice(0,-1):"",loose:!1,items:[]};r=i?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=i?r:"[*+-]");let l=this.rules.other.listItemRegex(r),c=!1;for(;t;){let h=!1,p="",m="";if(!(n=l.exec(t))||this.rules.block.hr.test(t))break;p=n[0],t=t.substring(p.length);let _=D$(n[2].split(`
117
+ `,1)[0],n[1].length),E=t.split(`
118
+ `,1)[0],T=!_.trim(),S=0;if(this.options.pedantic?(S=2,m=_.trimStart()):T?S=n[1].length+1:(S=_.search(this.rules.other.nonSpaceChar),S=S>4?1:S,m=_.slice(S),S+=n[1].length),T&&this.rules.other.blankLine.test(E)&&(p+=E+`
119
+ `,t=t.substring(E.length+1),h=!0),!h){let A=this.rules.other.nextBulletRegex(S),C=this.rules.other.hrRegex(S),k=this.rules.other.fencesBeginRegex(S),N=this.rules.other.headingBeginRegex(S),M=this.rules.other.htmlBeginRegex(S),B=this.rules.other.blockquoteBeginRegex(S);for(;t;){let D=t.split(`
120
+ `,1)[0],z;if(E=D,this.options.pedantic?(E=E.replace(this.rules.other.listReplaceNesting," "),z=E):z=E.replace(this.rules.other.tabCharGlobal," "),k.test(E)||N.test(E)||M.test(E)||B.test(E)||A.test(E)||C.test(E))break;if(z.search(this.rules.other.nonSpaceChar)>=S||!E.trim())m+=`
121
+ `+z.slice(S);else{if(T||_.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||k.test(_)||N.test(_)||C.test(_))break;m+=`
122
+ `+E}T=!E.trim(),p+=D+`
123
+ `,t=t.substring(D.length+1),_=z.slice(S)}}o.loose||(c?o.loose=!0:this.rules.other.doubleBlankLine.test(p)&&(c=!0)),o.items.push({type:"list_item",raw:p,task:!!this.options.gfm&&this.rules.other.listIsTask.test(m),loose:!1,text:m,tokens:[]}),o.raw+=p}let d=o.items.at(-1);if(d)d.raw=d.raw.trimEnd(),d.text=d.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let h of o.items){if(this.lexer.state.top=!1,h.tokens=this.lexer.blockTokens(h.text,[]),h.task){if(h.text=h.text.replace(this.rules.other.listReplaceTask,""),h.tokens[0]?.type==="text"||h.tokens[0]?.type==="paragraph"){h.tokens[0].raw=h.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),h.tokens[0].text=h.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let m=this.lexer.inlineQueue.length-1;m>=0;m--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[m].src)){this.lexer.inlineQueue[m].src=this.lexer.inlineQueue[m].src.replace(this.rules.other.listReplaceTask,"");break}}let p=this.rules.other.listTaskCheckbox.exec(h.raw);if(p){let m={type:"checkbox",raw:p[0]+" ",checked:p[0]!=="[ ]"};h.checked=m.checked,o.loose?h.tokens[0]&&["paragraph","text"].includes(h.tokens[0].type)&&"tokens"in h.tokens[0]&&h.tokens[0].tokens?(h.tokens[0].raw=m.raw+h.tokens[0].raw,h.tokens[0].text=m.raw+h.tokens[0].text,h.tokens[0].tokens.unshift(m)):h.tokens.unshift({type:"paragraph",raw:m.raw,text:m.raw,tokens:[m]}):h.tokens.unshift(m)}}if(!o.loose){let p=h.tokens.filter(_=>_.type==="space"),m=p.length>0&&p.some(_=>this.rules.other.anyLine.test(_.raw));o.loose=m}}if(o.loose)for(let h of o.items){h.loose=!0;for(let p of h.tokens)p.type==="text"&&(p.type="paragraph")}return o}}html(t){let n=this.rules.block.html.exec(t);if(n)return{type:"html",block:!0,raw:n[0],pre:n[1]==="pre"||n[1]==="script"||n[1]==="style",text:n[0]}}def(t){let n=this.rules.block.def.exec(t);if(n){let r=n[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=n[2]?n[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):n[3];return{type:"def",tag:r,raw:n[0],href:i,title:o}}}table(t){let n=this.rules.block.table.exec(t);if(!n||!this.rules.other.tableDelimiter.test(n[2]))return;let r=bv(n[1]),i=n[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=n[3]?.trim()?n[3].replace(this.rules.other.tableRowBlankLine,"").split(`
124
+ `):[],l={type:"table",raw:n[0],header:[],align:[],rows:[]};if(r.length===i.length){for(let c of i)this.rules.other.tableAlignRight.test(c)?l.align.push("right"):this.rules.other.tableAlignCenter.test(c)?l.align.push("center"):this.rules.other.tableAlignLeft.test(c)?l.align.push("left"):l.align.push(null);for(let c=0;c<r.length;c++)l.header.push({text:r[c],tokens:this.lexer.inline(r[c]),header:!0,align:l.align[c]});for(let c of o)l.rows.push(bv(c,l.header.length).map((d,h)=>({text:d,tokens:this.lexer.inline(d),header:!1,align:l.align[h]})));return l}}lheading(t){let n=this.rules.block.lheading.exec(t);if(n){let r=n[1].trim();return{type:"heading",raw:n[0],depth:n[2].charAt(0)==="="?1:2,text:r,tokens:this.lexer.inline(r)}}}paragraph(t){let n=this.rules.block.paragraph.exec(t);if(n){let r=n[1].charAt(n[1].length-1)===`
125
+ `?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:r,tokens:this.lexer.inline(r)}}}text(t){let n=this.rules.block.text.exec(t);if(n)return{type:"text",raw:n[0],text:n[0],tokens:this.lexer.inline(n[0])}}escape(t){let n=this.rules.inline.escape.exec(t);if(n)return{type:"escape",raw:n[0],text:n[1]}}tag(t){let n=this.rules.inline.tag.exec(t);if(n)return!this.lexer.state.inLink&&this.rules.other.startATag.test(n[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(t){let n=this.rules.inline.link.exec(t);if(n){let r=n[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let l=kl(r.slice(0,-1),"\\");if((r.length-l.length)%2===0)return}else{let l=I$(n[2],"()");if(l===-2)return;if(l>-1){let c=(n[0].indexOf("!")===0?5:4)+n[1].length+l;n[2]=n[2].substring(0,l),n[0]=n[0].substring(0,c).trim(),n[3]=""}}let i=n[2],o="";if(this.options.pedantic){let l=this.rules.other.pedanticHrefTitle.exec(i);l&&(i=l[1],o=l[3])}else o=n[3]?n[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?i=i.slice(1):i=i.slice(1,-1)),Ev(n,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},n[0],this.lexer,this.rules)}}reflink(t,n){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let i=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=n[i.toLowerCase()];if(!o){let l=r[0].charAt(0);return{type:"text",raw:l,text:l}}return Ev(r,o,r[0],this.lexer,this.rules)}}emStrong(t,n,r=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!(!i||!i[1]&&!i[2]&&!i[3]&&!i[4]||i[4]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(i[1]||i[3])||!r||this.rules.inline.punctuation.exec(r))){let o=[...i[0]].length-1,l,c,d=o,h=0,p=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(p.lastIndex=0,n=n.slice(-1*t.length+o);(i=p.exec(n))!==null;){if(l=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!l)continue;if(c=[...l].length,i[3]||i[4]){d+=c;continue}else if((i[5]||i[6])&&o%3&&!((o+c)%3)){h+=c;continue}if(d-=c,d>0)continue;c=Math.min(c,c+d+h);let m=[...i[0]][0].length,_=t.slice(0,o+i.index+m+c);if(Math.min(o,c)%2){let T=_.slice(1,-1);return{type:"em",raw:_,text:T,tokens:this.lexer.inlineTokens(T)}}let E=_.slice(2,-2);return{type:"strong",raw:_,text:E,tokens:this.lexer.inlineTokens(E)}}}}codespan(t){let n=this.rules.inline.code.exec(t);if(n){let r=n[2].replace(this.rules.other.newLineCharGlobal," "),i=this.rules.other.nonSpaceChar.test(r),o=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return i&&o&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:n[0],text:r}}}br(t){let n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t,n,r=""){let i=this.rules.inline.delLDelim.exec(t);if(i&&(!i[1]||!r||this.rules.inline.punctuation.exec(r))){let o=[...i[0]].length-1,l,c,d=o,h=this.rules.inline.delRDelim;for(h.lastIndex=0,n=n.slice(-1*t.length+o);(i=h.exec(n))!==null;){if(l=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!l||(c=[...l].length,c!==o))continue;if(i[3]||i[4]){d+=c;continue}if(d-=c,d>0)continue;c=Math.min(c,c+d);let p=[...i[0]][0].length,m=t.slice(0,o+i.index+p+c),_=m.slice(o,-o);return{type:"del",raw:m,text:_,tokens:this.lexer.inlineTokens(_)}}}}autolink(t){let n=this.rules.inline.autolink.exec(t);if(n){let r,i;return n[2]==="@"?(r=n[1],i="mailto:"+r):(r=n[1],i=r),{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}url(t){let n;if(n=this.rules.inline.url.exec(t)){let r,i;if(n[2]==="@")r=n[0],i="mailto:"+r;else{let o;do o=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])?.[0]??"";while(o!==n[0]);r=n[0],n[1]==="www."?i="http://"+n[0]:i=n[0]}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(t){let n=this.rules.inline.text.exec(t);if(n){let r=this.lexer.state.inRawBlock;return{type:"text",raw:n[0],text:n[0],escaped:r}}}},ar=class H0{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||os,this.options.tokenizer=this.options.tokenizer||new Ud,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:gn,block:ed.normal,inline:wl.normal};this.options.pedantic?(n.block=ed.pedantic,n.inline=wl.pedantic):this.options.gfm&&(n.block=ed.gfm,this.options.breaks?n.inline=wl.breaks:n.inline=wl.gfm),this.tokenizer.rules=n}static get rules(){return{block:ed,inline:wl}}static lex(t,n){return new H0(n).lex(t)}static lexInline(t,n){return new H0(n).inlineTokens(t)}lex(t){t=t.replace(gn.carriageReturn,`
126
+ `),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.tokenizer.lexer=this,this.options.pedantic&&(t=t.replace(gn.tabCharGlobal," ").replace(gn.spaceLine,""));t;){let i;if(this.options.extensions?.block?.some(l=>(i=l.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 l=n.at(-1);i.raw.length===1&&l!==void 0?l.raw+=`
127
+ `:n.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length);let l=n.at(-1);l?.type==="paragraph"||l?.type==="text"?(l.raw+=(l.raw.endsWith(`
128
+ `)?"":`
129
+ `)+i.raw,l.text+=`
130
+ `+i.text,this.inlineQueue.at(-1).src=l.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 l=n.at(-1);l?.type==="paragraph"||l?.type==="text"?(l.raw+=(l.raw.endsWith(`
131
+ `)?"":`
132
+ `)+i.raw,l.text+=`
133
+ `+i.raw,this.inlineQueue.at(-1).src=l.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 o=t;if(this.options.extensions?.startBlock){let l=1/0,c=t.slice(1),d;this.options.extensions.startBlock.forEach(h=>{d=h.call({lexer:this},c),typeof d=="number"&&d>=0&&(l=Math.min(l,d))}),l<1/0&&l>=0&&(o=t.substring(0,l+1))}if(this.state.top&&(i=this.tokenizer.paragraph(o))){let l=n.at(-1);r&&l?.type==="paragraph"?(l.raw+=(l.raw.endsWith(`
134
+ `)?"":`
135
+ `)+i.raw,l.text+=`
136
+ `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):n.push(i),r=o.length!==t.length,t=t.substring(i.raw.length);continue}if(i=this.tokenizer.text(t)){t=t.substring(i.raw.length);let l=n.at(-1);l?.type==="text"?(l.raw+=(l.raw.endsWith(`
137
+ `)?"":`
138
+ `)+i.raw,l.text+=`
139
+ `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):n.push(i);continue}if(t){let l="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){this.tokenizer.lexer=this;let r=t,i=null;if(this.tokens.links){let d=Object.keys(this.tokens.links);if(d.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(r))!==null;)d.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 o;for(;(i=this.tokenizer.rules.inline.blockSkip.exec(r))!==null;)o=i[2]?i[2].length:0,r=r.slice(0,i.index+o)+"["+"a".repeat(i[0].length-o-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r;let l=!1,c="";for(;t;){l||(c=""),l=!1;let d;if(this.options.extensions?.inline?.some(p=>(d=p.call({lexer:this},t,n))?(t=t.substring(d.raw.length),n.push(d),!0):!1))continue;if(d=this.tokenizer.escape(t)){t=t.substring(d.raw.length),n.push(d);continue}if(d=this.tokenizer.tag(t)){t=t.substring(d.raw.length),n.push(d);continue}if(d=this.tokenizer.link(t)){t=t.substring(d.raw.length),n.push(d);continue}if(d=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(d.raw.length);let p=n.at(-1);d.type==="text"&&p?.type==="text"?(p.raw+=d.raw,p.text+=d.text):n.push(d);continue}if(d=this.tokenizer.emStrong(t,r,c)){t=t.substring(d.raw.length),n.push(d);continue}if(d=this.tokenizer.codespan(t)){t=t.substring(d.raw.length),n.push(d);continue}if(d=this.tokenizer.br(t)){t=t.substring(d.raw.length),n.push(d);continue}if(d=this.tokenizer.del(t,r,c)){t=t.substring(d.raw.length),n.push(d);continue}if(d=this.tokenizer.autolink(t)){t=t.substring(d.raw.length),n.push(d);continue}if(!this.state.inLink&&(d=this.tokenizer.url(t))){t=t.substring(d.raw.length),n.push(d);continue}let h=t;if(this.options.extensions?.startInline){let p=1/0,m=t.slice(1),_;this.options.extensions.startInline.forEach(E=>{_=E.call({lexer:this},m),typeof _=="number"&&_>=0&&(p=Math.min(p,_))}),p<1/0&&p>=0&&(h=t.substring(0,p+1))}if(d=this.tokenizer.inlineText(h)){t=t.substring(d.raw.length),d.raw.slice(-1)!=="_"&&(c=d.raw.slice(-1)),l=!0;let p=n.at(-1);p?.type==="text"?(p.raw+=d.raw,p.text+=d.text):n.push(d);continue}if(t){let p="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(p);break}else throw new Error(p)}}return n}},Hd=class{options;parser;constructor(t){this.options=t||os}space(t){return""}code({text:t,lang:n,escaped:r}){let i=(n||"").match(gn.notSpaceStart)?.[0],o=t.replace(gn.endingNewline,"")+`
140
+ `;return i?'<pre><code class="language-'+kr(i)+'">'+(r?o:kr(o,!0))+`</code></pre>
141
+ `:"<pre><code>"+(r?o:kr(o,!0))+`</code></pre>
142
+ `}blockquote({tokens:t}){return`<blockquote>
143
+ ${this.parser.parse(t)}</blockquote>
144
+ `}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:n}){return`<h${n}>${this.parser.parseInline(t)}</h${n}>
145
+ `}hr(t){return`<hr>
146
+ `}list(t){let n=t.ordered,r=t.start,i="";for(let c=0;c<t.items.length;c++){let d=t.items[c];i+=this.listitem(d)}let o=n?"ol":"ul",l=n&&r!==1?' start="'+r+'"':"";return"<"+o+l+`>
147
+ `+i+"</"+o+`>
148
+ `}listitem(t){return`<li>${this.parser.parse(t.tokens)}</li>
149
+ `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
150
+ `}table(t){let n="",r="";for(let o=0;o<t.header.length;o++)r+=this.tablecell(t.header[o]);n+=this.tablerow({text:r});let i="";for(let o=0;o<t.rows.length;o++){let l=t.rows[o];r="";for(let c=0;c<l.length;c++)r+=this.tablecell(l[c]);i+=this.tablerow({text:r})}return i&&(i=`<tbody>${i}</tbody>`),`<table>
151
+ <thead>
152
+ `+n+`</thead>
153
+ `+i+`</table>
154
+ `}tablerow({text:t}){return`<tr>
155
+ ${t}</tr>
156
+ `}tablecell(t){let n=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+n+`</${r}>
157
+ `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${kr(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:n,tokens:r}){let i=this.parser.parseInline(r),o=gv(t);if(o===null)return i;t=o;let l='<a href="'+t+'"';return n&&(l+=' title="'+kr(n)+'"'),l+=">"+i+"</a>",l}image({href:t,title:n,text:r,tokens:i}){i&&(r=this.parser.parseInline(i,this.parser.textRenderer));let o=gv(t);if(o===null)return kr(r);t=o;let l=`<img src="${t}" alt="${kr(r)}"`;return n&&(l+=` title="${kr(n)}"`),l+=">",l}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:kr(t.text)}},C1=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}checkbox({raw:t}){return t}},hr=class z0{options;renderer;textRenderer;constructor(t){this.options=t||os,this.options.renderer=this.options.renderer||new Hd,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new C1}static parse(t,n){return new z0(n).parse(t)}static parseInline(t,n){return new z0(n).parseInline(t)}parse(t){this.renderer.parser=this;let n="";for(let r=0;r<t.length;r++){let i=t[r];if(this.options.extensions?.renderers?.[i.type]){let l=i,c=this.options.extensions.renderers[l.type].call({parser:this},l);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(l.type)){n+=c||"";continue}}let o=i;switch(o.type){case"space":{n+=this.renderer.space(o);break}case"hr":{n+=this.renderer.hr(o);break}case"heading":{n+=this.renderer.heading(o);break}case"code":{n+=this.renderer.code(o);break}case"table":{n+=this.renderer.table(o);break}case"blockquote":{n+=this.renderer.blockquote(o);break}case"list":{n+=this.renderer.list(o);break}case"checkbox":{n+=this.renderer.checkbox(o);break}case"html":{n+=this.renderer.html(o);break}case"def":{n+=this.renderer.def(o);break}case"paragraph":{n+=this.renderer.paragraph(o);break}case"text":{n+=this.renderer.text(o);break}default:{let l='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return n}parseInline(t,n=this.renderer){this.renderer.parser=this;let r="";for(let i=0;i<t.length;i++){let o=t[i];if(this.options.extensions?.renderers?.[o.type]){let c=this.options.extensions.renderers[o.type].call({parser:this},o);if(c!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){r+=c||"";continue}}let l=o;switch(l.type){case"escape":{r+=n.text(l);break}case"html":{r+=n.html(l);break}case"link":{r+=n.link(l);break}case"image":{r+=n.image(l);break}case"checkbox":{r+=n.checkbox(l);break}case"strong":{r+=n.strong(l);break}case"em":{r+=n.em(l);break}case"codespan":{r+=n.codespan(l);break}case"br":{r+=n.br(l);break}case"del":{r+=n.del(l);break}case"text":{r+=n.text(l);break}default:{let c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return r}},Il=class{options;block;constructor(t){this.options=t||os}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(t=this.block){return t?ar.lex:ar.lexInline}provideParser(t=this.block){return t?hr.parse:hr.parseInline}},P$=class{defaults=E1();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=hr;Renderer=Hd;TextRenderer=C1;Lexer=ar;Tokenizer=Ud;Hooks=Il;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 o=i;for(let l of o.header)r=r.concat(this.walkTokens(l.tokens,n));for(let l of o.rows)for(let c of l)r=r.concat(this.walkTokens(c.tokens,n));break}case"list":{let o=i;r=r.concat(this.walkTokens(o.items,n));break}default:{let o=i;this.defaults.extensions?.childTokens?.[o.type]?this.defaults.extensions.childTokens[o.type].forEach(l=>{let c=o[l].flat(1/0);r=r.concat(this.walkTokens(c,n))}):o.tokens&&(r=r.concat(this.walkTokens(o.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(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let l=n.renderers[o.name];l?n.renderers[o.name]=function(...c){let d=o.renderer.apply(this,c);return d===!1&&(d=l.apply(this,c)),d}:n.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let l=n[o.level];l?l.unshift(o.tokenizer):n[o.level]=[o.tokenizer],o.start&&(o.level==="block"?n.startBlock?n.startBlock.push(o.start):n.startBlock=[o.start]:o.level==="inline"&&(n.startInline?n.startInline.push(o.start):n.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(n.childTokens[o.name]=o.childTokens)}),i.extensions=n),r.renderer){let o=this.defaults.renderer||new Hd(this.defaults);for(let l in r.renderer){if(!(l in o))throw new Error(`renderer '${l}' does not exist`);if(["options","parser"].includes(l))continue;let c=l,d=r.renderer[c],h=o[c];o[c]=(...p)=>{let m=d.apply(o,p);return m===!1&&(m=h.apply(o,p)),m||""}}i.renderer=o}if(r.tokenizer){let o=this.defaults.tokenizer||new Ud(this.defaults);for(let l in r.tokenizer){if(!(l in o))throw new Error(`tokenizer '${l}' does not exist`);if(["options","rules","lexer"].includes(l))continue;let c=l,d=r.tokenizer[c],h=o[c];o[c]=(...p)=>{let m=d.apply(o,p);return m===!1&&(m=h.apply(o,p)),m}}i.tokenizer=o}if(r.hooks){let o=this.defaults.hooks||new Il;for(let l in r.hooks){if(!(l in o))throw new Error(`hook '${l}' does not exist`);if(["options","block"].includes(l))continue;let c=l,d=r.hooks[c],h=o[c];Il.passThroughHooks.has(l)?o[c]=p=>{if(this.defaults.async&&Il.passThroughHooksRespectAsync.has(l))return(async()=>{let _=await d.call(o,p);return h.call(o,_)})();let m=d.call(o,p);return h.call(o,m)}:o[c]=(...p)=>{if(this.defaults.async)return(async()=>{let _=await d.apply(o,p);return _===!1&&(_=await h.apply(o,p)),_})();let m=d.apply(o,p);return m===!1&&(m=h.apply(o,p)),m}}i.hooks=o}if(r.walkTokens){let o=this.defaults.walkTokens,l=r.walkTokens;i.walkTokens=function(c){let d=[];return d.push(l.call(this,c)),o&&(d=d.concat(o.call(this,c))),d}}this.defaults={...this.defaults,...i}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,n){return ar.lex(t,n??this.defaults)}parser(t,n){return hr.parse(t,n??this.defaults)}parseMarkdown(t){return(n,r)=>{let i={...r},o={...this.defaults,...i},l=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&i.async===!1)return l(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 l(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=t),o.async)return(async()=>{let c=o.hooks?await o.hooks.preprocess(n):n,d=await(o.hooks?await o.hooks.provideLexer(t):t?ar.lex:ar.lexInline)(c,o),h=o.hooks?await o.hooks.processAllTokens(d):d;o.walkTokens&&await Promise.all(this.walkTokens(h,o.walkTokens));let p=await(o.hooks?await o.hooks.provideParser(t):t?hr.parse:hr.parseInline)(h,o);return o.hooks?await o.hooks.postprocess(p):p})().catch(l);try{o.hooks&&(n=o.hooks.preprocess(n));let c=(o.hooks?o.hooks.provideLexer(t):t?ar.lex:ar.lexInline)(n,o);o.hooks&&(c=o.hooks.processAllTokens(c)),o.walkTokens&&this.walkTokens(c,o.walkTokens);let d=(o.hooks?o.hooks.provideParser(t):t?hr.parse:hr.parseInline)(c,o);return o.hooks&&(d=o.hooks.postprocess(d)),d}catch(c){return l(c)}}}onError(t,n){return r=>{if(r.message+=`
158
+ Please report this to https://github.com/markedjs/marked.`,t){let i="<p>An error occurred:</p><pre>"+kr(r.message+"",!0)+"</pre>";return n?Promise.resolve(i):i}if(n)return Promise.reject(r);throw r}}},Ki=new P$;function mt(e,t){return Ki.parse(e,t)}mt.options=mt.setOptions=function(e){return Ki.setOptions(e),mt.defaults=Ki.defaults,ik(mt.defaults),mt};mt.getDefaults=E1;mt.defaults=os;mt.use=function(...e){return Ki.use(...e),mt.defaults=Ki.defaults,ik(mt.defaults),mt};mt.walkTokens=function(e,t){return Ki.walkTokens(e,t)};mt.parseInline=Ki.parseInline;mt.Parser=hr;mt.parser=hr.parse;mt.Renderer=Hd;mt.TextRenderer=C1;mt.Lexer=ar;mt.lexer=ar.lex;mt.Tokenizer=Ud;mt.Hooks=Il;mt.parse=mt;mt.options;mt.setOptions;mt.use;mt.walkTokens;mt.parseInline;hr.parse;ar.lex;var B$=300,j$="300px",U$=500;function H$(e={}){let{immediate:t=!1,debounceDelay:n=B$,rootMargin:r=j$,idleTimeout:i=U$}=e,[o,l]=v.useState(!1),c=v.useRef(null),d=v.useRef(null),h=v.useRef(null),p=v.useMemo(()=>E=>{let T=Date.now();return window.setTimeout(()=>{E({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-T))})},1)},[]),m=v.useMemo(()=>typeof window<"u"&&window.requestIdleCallback?(E,T)=>window.requestIdleCallback(E,T):p,[p]),_=v.useMemo(()=>typeof window<"u"&&window.cancelIdleCallback?E=>window.cancelIdleCallback(E):E=>{clearTimeout(E)},[]);return v.useEffect(()=>{if(t){l(!0);return}let E=c.current;if(!E)return;d.current&&(clearTimeout(d.current),d.current=null),h.current&&(_(h.current),h.current=null);let T=()=>{d.current&&(clearTimeout(d.current),d.current=null),h.current&&(_(h.current),h.current=null)},S=N=>{h.current=m(M=>{M.timeRemaining()>0||M.didTimeout?(l(!0),N.disconnect()):h.current=m(()=>{l(!0),N.disconnect()},{timeout:i/2})},{timeout:i})},A=N=>{T(),d.current=window.setTimeout(()=>{var M,B;let D=N.takeRecords();(D.length===0||(B=(M=D.at(-1))==null?void 0:M.isIntersecting)!=null&&B)&&S(N)},n)},C=(N,M)=>{N.isIntersecting?A(M):T()},k=new IntersectionObserver(N=>{for(let M of N)C(M,k)},{rootMargin:r,threshold:0});return k.observe(E),()=>{d.current&&clearTimeout(d.current),h.current&&_(h.current),k.disconnect()}},[t,n,r,i,_,m]),{shouldRender:o,containerRef:c}}var pk=/\s/,z$=/^\s+$/,F$=new Set(["code","pre","svg","math","annotation"]),$$=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",V$=e=>e.some(t=>$$(t)&&F$.has(t.tagName)),G$=e=>{let t=[],n="",r=!1;for(let i of e){let o=pk.test(i);o!==r&&n&&(t.push(n),n=""),n+=i,r=o}return n&&t.push(n),t},q$=e=>{let t=[],n="";for(let r of e)pk.test(r)?n+=r:(n&&(t.push(n),n=""),t.push(r));return n&&t.push(n),t},Y$=(e,t,n,r,i,o)=>{let l=`--sd-animation:sd-${t};--sd-duration:${i?0:n}ms;--sd-easing:${r}`;return o&&(l+=`;--sd-delay:${o}ms`),{type:"element",tagName:"span",properties:{"data-sd-animate":!0,style:l},children:[{type:"text",value:e}]}},X$=(e,t,n,r,i)=>{let o=t.at(-1);if(!(o&&"children"in o))return;if(V$(t))return no;let l=o,c=l.children.indexOf(e);if(c===-1)return;let d=e.value;if(!d.trim()){i.count+=d.length;return}let h=n.sep==="char"?q$(d):G$(d),p=r.prevContentLength,m=h.map(_=>{let E=i.count;if(i.count+=_.length,z$.test(_))return{type:"text",value:_};let T=p>0&&E<p,S=T?0:i.newIndex++*n.stagger;return Y$(_,n.animation,n.duration,n.easing,T,S)});return l.children.splice(c,1,...m),c+m.length},Q$=0;function F0(e){var t,n,r,i,o;let l={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",stagger:(o=e?.stagger)!=null?o:40},c={prevContentLength:0,lastRenderCharCount:0},d=Q$++,h=()=>p=>{let m={count:0,newIndex:0};Gg(p,"text",(_,E)=>X$(_,E,l,c,m)),c.lastRenderCharCount=m.count,c.prevContentLength=0};return Object.defineProperty(h,"name",{value:`rehypeAnimate$${d}`}),{name:"animate",type:"animate",rehypePlugin:h,setPrevContentLength(p){c.prevContentLength=p},getLastRenderCharCount(){let p=c.lastRenderCharCount;return c.lastRenderCharCount=0,p}}}F0();var gk=v.createContext(!1),W$=()=>v.useContext(gk),w1=(...e)=>Fg(tf(e)),K$=(e,t)=>{if(!e||!t)return t;let n=`${e}:`;return t.split(/\s+/).filter(Boolean).map(r=>r.startsWith(n)?r:`${e}:${r}`).join(" ")},Z$=e=>e?(...t)=>K$(e,Fg(tf(t))):w1,so=(e,t,n)=>{let r=typeof t=="string"&&n.startsWith("text/csv")?"\uFEFF":"",i=typeof t=="string"?new Blob([r+t],{type:n}):t,o=URL.createObjectURL(i),l=document.createElement("a");l.href=o,l.download=e,document.body.appendChild(l),l.click(),document.body.removeChild(l),URL.revokeObjectURL(o)},$0=v.createContext(w1),$e=()=>v.useContext($0),J$=w1("block","before:content-[counter(line)]","before:inline-block","before:[counter-increment:line]","before:w-6","before:mr-4","before:text-[13px]","before:text-right","before:text-muted-foreground/50","before:font-mono","before:select-none"),eV=e=>{let t={};for(let n of e.split(";")){let r=n.indexOf(":");if(r>0){let i=n.slice(0,r).trim(),o=n.slice(r+1).trim();i&&o&&(t[i]=o)}}return t},tV=v.memo(({children:e,result:t,language:n,className:r,startLine:i,lineNumbers:o=!0,...l})=>{let c=$e(),d=v.useMemo(()=>c(J$),[c]),h=v.useMemo(()=>{let p={};return t.bg&&(p["--sdm-bg"]=t.bg),t.fg&&(p["--sdm-fg"]=t.fg),t.rootStyle&&Object.assign(p,eV(t.rootStyle)),p},[t.bg,t.fg,t.rootStyle]);return b.jsx("div",{className:c(r,"overflow-x-auto rounded-md border border-border bg-background p-4 text-sm"),"data-language":n,"data-streamdown":"code-block-body",...l,children:b.jsx("pre",{className:c(r,"bg-[var(--sdm-bg,inherit]","dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit)]"),style:h,children:b.jsx("code",{className:o?c("[counter-increment:line_0] [counter-reset:line]"):void 0,style:o&&i&&i>1?{counterReset:`line ${i-1}`}:void 0,children:t.tokens.map((p,m)=>b.jsx("span",{className:o?d:void 0,children:p.length===0||p.length===1&&p[0].content===""?`
159
+ `:p.map((_,E)=>{let T={},S=!!_.bgColor;if(_.color&&(T["--sdm-c"]=_.color),_.bgColor&&(T["--sdm-tbg"]=_.bgColor),_.htmlStyle)for(let[A,C]of Object.entries(_.htmlStyle))A==="color"?T["--sdm-c"]=C:A==="background-color"?(T["--sdm-tbg"]=C,S=!0):T[A]=C;return b.jsx("span",{className:c("text-[var(--sdm-c,inherit)]","dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]",S&&"bg-[var(--sdm-tbg)]",S&&"dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]"),style:T,..._.htmlAttrs,children:_.content},E)})},m))})})})},(e,t)=>e.result===t.result&&e.language===t.language&&e.className===t.className&&e.startLine===t.startLine&&e.lineNumbers===t.lineNumbers),nV=({className:e,language:t,style:n,isIncomplete:r,...i})=>{let o=$e();return b.jsx("div",{className:o("my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",e),"data-incomplete":r||void 0,"data-language":t,"data-streamdown":"code-block",style:{contentVisibility:"auto",containIntrinsicSize:"auto 200px",...n},...i})},bk=v.createContext({code:""}),Ek=()=>v.useContext(bk),rV=({language:e})=>{let t=$e();return b.jsx("div",{className:t("flex h-8 items-center text-muted-foreground text-xs"),"data-language":e,"data-streamdown":"code-block-header",children:b.jsx("span",{className:t("ml-1 font-mono lowercase"),children:e})})},aV=e=>{let t=e.length;for(;t>0&&e[t-1]===`
160
+ `;)t--;return e.slice(0,t)},iV=v.lazy(()=>L(()=>import("./highlighted-body-OFNGDK62-TwhCqUaJ.js"),[]).then(e=>({default:e.HighlightedCodeBlockBody}))),sV=({code:e,language:t,className:n,children:r,isIncomplete:i=!1,startLine:o,lineNumbers:l,...c})=>{let d=$e(),h=v.useMemo(()=>aV(e),[e]),p=v.useMemo(()=>({bg:"transparent",fg:"inherit",tokens:h.split(`
161
+ `).map(m=>[{content:m,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}),[h]);return b.jsx(bk.Provider,{value:{code:e},children:b.jsxs(nV,{isIncomplete:i,language:t,children:[b.jsx(rV,{language:t}),r?b.jsx("div",{className:d("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:b.jsx("div",{className:d("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"code-block-actions",children:r})}):null,b.jsx(v.Suspense,{fallback:b.jsx(tV,{className:n,language:t,lineNumbers:l,result:p,startLine:o,...c}),children:b.jsx(iV,{className:n,code:h,language:t,lineNumbers:l,raw:p,startLine:o,...c})})]})})},oV=e=>b.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:b.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"})}),lV=e=>b.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:b.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"})}),uV=e=>b.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:b.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"})}),cV=e=>b.jsxs("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[b.jsx("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),b.jsx("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),b.jsx("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),b.jsx("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),b.jsx("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),b.jsx("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),b.jsx("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),b.jsx("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),b.jsx("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),b.jsx("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),dV=e=>b.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:b.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"})}),fV=e=>b.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:b.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"})}),hV=e=>b.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:b.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"})}),mV=e=>b.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:b.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"})}),pV=e=>b.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:b.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"})}),gV=e=>b.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:b.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"})}),Dl={CheckIcon:oV,CopyIcon:lV,DownloadIcon:uV,ExternalLinkIcon:mV,Loader2Icon:cV,Maximize2Icon:dV,RotateCcwIcon:fV,XIcon:hV,ZoomInIcon:pV,ZoomOutIcon:gV},yk=v.createContext(Dl),bV=(e,t)=>{if(e===t)return!0;if(!(e&&t))return e===t;let n=Object.keys(e),r=Object.keys(t);return n.length!==r.length?!1:n.every(i=>e[i]===t[i])},yv=({icons:e,children:t})=>{let n=v.useRef(e),r=v.useRef(e?{...Dl,...e}:Dl);bV(n.current,e)||(n.current=e,r.current=e?{...Dl,...e}:Dl);let i=r.current;return b.jsx(yk.Provider,{value:i,children:t})},xr=()=>v.useContext(yk),_k={copyCode:"Copy Code",downloadFile:"Download file",downloadDiagram:"Download diagram",downloadDiagramAsSvg:"Download diagram as SVG",downloadDiagramAsPng:"Download diagram as PNG",downloadDiagramAsMmd:"Download diagram as MMD",viewFullscreen:"View fullscreen",exitFullscreen:"Exit fullscreen",mermaidFormatSvg:"SVG",mermaidFormatPng:"PNG",mermaidFormatMmd:"MMD",copyTable:"Copy table",copyTableAsMarkdown:"Copy table as Markdown",copyTableAsCsv:"Copy table as CSV",copyTableAsTsv:"Copy table as TSV",downloadTable:"Download table",downloadTableAsCsv:"Download table as CSV",downloadTableAsMarkdown:"Download table as Markdown",tableFormatMarkdown:"Markdown",tableFormatCsv:"CSV",tableFormatTsv:"TSV",imageNotAvailable:"Image not available",downloadImage:"Download image",openExternalLink:"Open external link?",externalLinkWarning:"You're about to visit an external website.",close:"Close",copyLink:"Copy link",copied:"Copied",openLink:"Open link"},V0=v.createContext(_k),Ea=()=>v.useContext(V0),_v=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:i,code:o,...l})=>{let c=$e(),[d,h]=v.useState(!1),p=v.useRef(0),{code:m}=Ek(),{isAnimating:_}=v.useContext(Vn),E=Ea(),T=o??m,S=async()=>{var k;if(typeof window>"u"||!((k=navigator?.clipboard)!=null&&k.writeText)){t?.(new Error("Clipboard API not available"));return}try{d||(await navigator.clipboard.writeText(T),h(!0),e?.(),p.current=window.setTimeout(()=>h(!1),n))}catch(N){t?.(N)}};v.useEffect(()=>()=>{window.clearTimeout(p.current)},[]);let A=xr(),C=d?A.CheckIcon:A.CopyIcon;return b.jsx("button",{className:c("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:_,onClick:S,title:E.copyCode,type:"button",...l,children:r??b.jsx(C,{size:14})})},xv={"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"},EV=({onDownload:e,onError:t,language:n,children:r,className:i,code:o,...l})=>{let c=$e(),{code:d}=Ek(),{isAnimating:h}=v.useContext(Vn),p=Ea(),m=xr(),_=o??d,E=`file.${n&&n in xv?xv[n]:"txt"}`,T="text/plain",S=()=>{try{so(E,_,T),e?.()}catch(A){t?.(A)}};return b.jsx("button",{className:c("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:h,onClick:S,title:p.downloadFile,type:"button",...l,children:r??b.jsx(m.DownloadIcon,{size:14})})},Tv=()=>{let{Loader2Icon:e}=xr(),t=$e();return b.jsxs("div",{className:t("w-full divide-y divide-border overflow-hidden rounded-xl border border-border"),children:[b.jsx("div",{className:t("h-[46px] w-full bg-muted/80")}),b.jsx("div",{className:t("flex w-full items-center justify-center p-4"),children:b.jsx(e,{className:t("size-4 animate-spin")})})]})},yV=/\.[^/.]+$/,_V=({node:e,className:t,src:n,alt:r,onLoad:i,onError:o,...l})=>{let{DownloadIcon:c}=xr(),d=$e(),h=v.useRef(null),[p,m]=v.useState(!1),[_,E]=v.useState(!1),T=Ea(),S=l.width!=null||l.height!=null,A=(p||S)&&!_,C=_&&!S;v.useEffect(()=>{let B=h.current;if(B!=null&&B.complete){let D=B.naturalWidth>0;m(D),E(!D)}},[]);let k=v.useCallback(B=>{m(!0),E(!1),i?.(B)},[i]),N=v.useCallback(B=>{m(!1),E(!0),o?.(B)},[o]),M=async()=>{if(n)try{let B=await(await fetch(n)).blob(),D=new URL(n,window.location.origin).pathname.split("/").pop()||"",z=D.split(".").pop(),G=D.includes(".")&&z!==void 0&&z.length<=4,ie="";if(G)ie=D;else{let V=B.type,X="png";V.includes("jpeg")||V.includes("jpg")?X="jpg":V.includes("png")?X="png":V.includes("svg")?X="svg":V.includes("gif")?X="gif":V.includes("webp")&&(X="webp"),ie=`${(r||D||"image").replace(yV,"")}.${X}`}so(ie,B,B.type)}catch{window.open(n,"_blank")}};return n?b.jsxs("div",{className:d("group relative my-4 inline-block"),"data-streamdown":"image-wrapper",children:[b.jsx("img",{alt:r,className:d("max-w-full rounded-lg",C&&"hidden",t),"data-streamdown":"image",onError:N,onLoad:k,ref:h,src:n,...l}),C&&b.jsx("span",{className:d("text-muted-foreground text-xs italic"),"data-streamdown":"image-fallback",children:T.imageNotAvailable}),b.jsx("div",{className:d("pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block")}),A&&b.jsx("button",{className:d("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:M,title:T.downloadImage,type:"button",children:b.jsx(c,{size:14})})]}):null},Vl=0,k1=()=>{Vl+=1,Vl===1&&(document.body.style.overflow="hidden")},N1=()=>{Vl=Math.max(0,Vl-1),Vl===0&&(document.body.style.overflow="")},xV=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let{CheckIcon:i,CopyIcon:o,ExternalLinkIcon:l,XIcon:c}=xr(),d=$e(),[h,p]=v.useState(!1),m=Ea(),_=v.useCallback(async()=>{try{await navigator.clipboard.writeText(e),p(!0),setTimeout(()=>p(!1),2e3)}catch{}},[e]),E=v.useCallback(()=>{r(),n()},[r,n]);return v.useEffect(()=>{if(t){k1();let T=S=>{S.key==="Escape"&&n()};return document.addEventListener("keydown",T),()=>{document.removeEventListener("keydown",T),N1()}}},[t,n]),t?b.jsx("div",{className:d("fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm"),"data-streamdown":"link-safety-modal",onClick:n,onKeyDown:T=>{T.key==="Escape"&&n()},role:"button",tabIndex:0,children:b.jsxs("div",{className:d("relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg"),onClick:T=>T.stopPropagation(),onKeyDown:T=>T.stopPropagation(),role:"presentation",children:[b.jsx("button",{className:d("absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:n,title:m.close,type:"button",children:b.jsx(c,{size:16})}),b.jsxs("div",{className:d("flex flex-col gap-2"),children:[b.jsxs("div",{className:d("flex items-center gap-2 font-semibold text-lg"),children:[b.jsx(l,{size:20}),b.jsx("span",{children:m.openExternalLink})]}),b.jsx("p",{className:d("text-muted-foreground text-sm"),children:m.externalLinkWarning})]}),b.jsx("div",{className:d("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),b.jsxs("div",{className:d("flex gap-2"),children:[b.jsx("button",{className:d("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:_,type:"button",children:h?b.jsxs(b.Fragment,{children:[b.jsx(i,{size:14}),b.jsx("span",{children:m.copied})]}):b.jsxs(b.Fragment,{children:[b.jsx(o,{size:14}),b.jsx("span",{children:m.copyLink})]})}),b.jsxs("button",{className:d("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:E,type:"button",children:[b.jsx(l,{size:14}),b.jsx("span",{children:m.openLink})]})]})]})}):null},G0=v.createContext(null),R1=()=>v.useContext(G0),hZ=()=>{var e;let t=R1();return(e=t?.code)!=null?e:null},O1=()=>{var e;let t=R1();return(e=t?.mermaid)!=null?e:null},TV=e=>{var t;let n=R1();return n!=null&&n.renderers&&e&&(t=n.renderers.find(r=>Array.isArray(r.language)?r.language.includes(e):r.language===e))!=null?t:null},vV=(e,t)=>{var n;let r=(n=void 0)!=null?n:5;return new Promise((i,o)=>{let l="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),c=new Image;c.crossOrigin="anonymous",c.onload=()=>{let d=document.createElement("canvas"),h=c.width*r,p=c.height*r;d.width=h,d.height=p;let m=d.getContext("2d");if(!m){o(new Error("Failed to create 2D canvas context for PNG export"));return}m.drawImage(c,0,0,h,p),d.toBlob(_=>{if(!_){o(new Error("Failed to create PNG blob"));return}i(_)},"image/png")},c.onerror=()=>o(new Error("Failed to load SVG image")),c.src=l})},SV=({chart:e,children:t,className:n,onDownload:r,config:i,onError:o})=>{let l=$e(),[c,d]=v.useState(!1),h=v.useRef(null),{isAnimating:p}=v.useContext(Vn),m=xr(),_=O1(),E=Ea(),T=async S=>{try{if(S==="mmd"){so("diagram.mmd",e,"text/plain"),d(!1),r?.(S);return}if(!_){o?.(new Error("Mermaid plugin not available"));return}let A=_.getMermaid(i),C=e.split("").reduce((M,B)=>(M<<5)-M+B.charCodeAt(0)|0,0),k=`mermaid-${Math.abs(C)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:N}=await A.render(k,e);if(!N){o?.(new Error("SVG not found. Please wait for the diagram to render."));return}if(S==="svg"){so("diagram.svg",N,"image/svg+xml"),d(!1),r?.(S);return}if(S==="png"){let M=await vV(N);so("diagram.png",M,"image/png"),r?.(S),d(!1);return}}catch(A){o?.(A)}};return v.useEffect(()=>{let S=A=>{let C=A.composedPath();h.current&&!C.includes(h.current)&&d(!1)};return document.addEventListener("mousedown",S),()=>{document.removeEventListener("mousedown",S)}},[]),b.jsxs("div",{className:l("relative"),ref:h,children:[b.jsx("button",{className:l("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),disabled:p,onClick:()=>d(!c),title:E.downloadDiagram,type:"button",children:t??b.jsx(m.DownloadIcon,{size:14})}),c?b.jsxs("div",{className:l("absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[b.jsx("button",{className:l("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>T("svg"),title:E.downloadDiagramAsSvg,type:"button",children:E.mermaidFormatSvg}),b.jsx("button",{className:l("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>T("png"),title:E.downloadDiagramAsPng,type:"button",children:E.mermaidFormatPng}),b.jsx("button",{className:l("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>T("mmd"),title:E.downloadDiagramAsMmd,type:"button",children:E.mermaidFormatMmd})]}):null]})},AV=({chart:e,config:t,onFullscreen:n,onExit:r,className:i,...o})=>{let{Maximize2Icon:l,XIcon:c}=xr(),d=$e(),[h,p]=v.useState(!1),{isAnimating:m,controls:_}=v.useContext(Vn),E=Ea(),T=(()=>{if(typeof _=="boolean")return _;let A=_.mermaid;return A===!1?!1:A===!0||A===void 0?!0:A.panZoom!==!1})(),S=()=>{p(!h)};return v.useEffect(()=>{if(h){k1();let A=C=>{C.key==="Escape"&&p(!1)};return document.addEventListener("keydown",A),()=>{document.removeEventListener("keydown",A),N1()}}},[h]),v.useEffect(()=>{h?n?.():r&&r()},[h,n,r]),b.jsxs(b.Fragment,{children:[b.jsx("button",{className:d("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),disabled:m,onClick:S,title:E.viewFullscreen,type:"button",...o,children:b.jsx(l,{size:14})}),h?Ji.createPortal(b.jsxs("div",{className:d("fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm"),onClick:S,onKeyDown:A=>{A.key==="Escape"&&S()},role:"button",tabIndex:0,children:[b.jsx("button",{className:d("absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:S,title:E.exitFullscreen,type:"button",children:b.jsx(c,{size:20})}),b.jsx("div",{className:d("flex size-full items-center justify-center p-4"),onClick:A=>A.stopPropagation(),onKeyDown:A=>A.stopPropagation(),role:"presentation",children:b.jsx(eN,{chart:e,className:d("size-full [&_svg]:h-auto [&_svg]:w-auto"),config:t,fullscreen:!0,showControls:T})})]}),document.body):null]})},xk=e=>{var t,n;let r=[],i=[],o=e.querySelectorAll("thead th");for(let c of o)r.push(((t=c.textContent)==null?void 0:t.trim())||"");let l=e.querySelectorAll("tbody tr");for(let c of l){let d=[],h=c.querySelectorAll("td");for(let p of h)d.push(((n=p.textContent)==null?void 0:n.trim())||"");i.push(d)}return{headers:r,rows:i}},Tk=e=>{let{headers:t,rows:n}=e,r=c=>{let d=!1,h=!1;for(let p of c){if(p==='"'){d=!0,h=!0;break}(p===","||p===`
162
+ `)&&(d=!0)}return d?h?`"${c.replace(/"/g,'""')}"`:`"${c}"`:c},i=t.length>0?n.length+1:n.length,o=new Array(i),l=0;t.length>0&&(o[l]=t.map(r).join(","),l+=1);for(let c of n)o[l]=c.map(r).join(","),l+=1;return o.join(`
163
+ `)},CV=e=>{let{headers:t,rows:n}=e,r=c=>{let d=!1;for(let p of c)if(p===" "||p===`
164
+ `||p==="\r"){d=!0;break}if(!d)return c;let h=[];for(let p of c)p===" "?h.push("\\t"):p===`
165
+ `?h.push("\\n"):p==="\r"?h.push("\\r"):h.push(p);return h.join("")},i=t.length>0?n.length+1:n.length,o=new Array(i),l=0;t.length>0&&(o[l]=t.map(r).join(" "),l+=1);for(let c of n)o[l]=c.map(r).join(" "),l+=1;return o.join(`
166
+ `)},qp=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("")},q0=e=>{let{headers:t,rows:n}=e;if(t.length===0)return"";let r=new Array(n.length+2),i=0,o=t.map(c=>qp(c));r[i]=`| ${o.join(" | ")} |`,i+=1;let l=new Array(t.length);for(let c=0;c<t.length;c+=1)l[c]="---";r[i]=`| ${l.join(" | ")} |`,i+=1;for(let c of n)if(c.length<t.length){let d=new Array(t.length);for(let h=0;h<t.length;h+=1)d[h]=h<c.length?qp(c[h]):"";r[i]=`| ${d.join(" | ")} |`,i+=1}else{let d=c.map(h=>qp(h));r[i]=`| ${d.join(" | ")} |`,i+=1}return r.join(`
167
+ `)},vk=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let o=$e(),[l,c]=v.useState(!1),[d,h]=v.useState(!1),p=v.useRef(null),m=v.useRef(0),{isAnimating:_}=v.useContext(Vn),E=Ea(),T=async C=>{var k,N;if(typeof window>"u"||!((k=navigator?.clipboard)!=null&&k.write)){r?.(new Error("Clipboard API not available"));return}try{let M=(N=p.current)==null?void 0:N.closest('[data-streamdown="table-wrapper"]'),B=M?.querySelector("table");if(!B){r?.(new Error("Table not found"));return}let D=xk(B),z=({csv:Tk,tsv:CV,md:q0}[C]||q0)(D),G=new ClipboardItem({"text/plain":new Blob([z],{type:"text/plain"}),"text/html":new Blob([B.outerHTML],{type:"text/html"})});await navigator.clipboard.write([G]),h(!0),c(!1),n?.(C),m.current=window.setTimeout(()=>h(!1),i)}catch(M){r?.(M)}};v.useEffect(()=>{let C=k=>{let N=k.composedPath();p.current&&!N.includes(p.current)&&c(!1)};return document.addEventListener("mousedown",C),()=>{document.removeEventListener("mousedown",C),window.clearTimeout(m.current)}},[]);let S=xr(),A=d?S.CheckIcon:S.CopyIcon;return b.jsxs("div",{className:o("relative"),ref:p,children:[b.jsx("button",{className:o("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:_,onClick:()=>c(!l),title:E.copyTable,type:"button",children:e??b.jsx(A,{height:14,width:14})}),l?b.jsxs("div",{className:o("absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[b.jsx("button",{className:o("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>T("md"),title:E.copyTableAsMarkdown,type:"button",children:E.tableFormatMarkdown}),b.jsx("button",{className:o("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>T("csv"),title:E.copyTableAsCsv,type:"button",children:E.tableFormatCsv}),b.jsx("button",{className:o("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>T("tsv"),title:E.copyTableAsTsv,type:"button",children:E.tableFormatTsv})]}):null]})},Sk=({children:e,className:t,onDownload:n,onError:r})=>{let i=$e(),[o,l]=v.useState(!1),c=v.useRef(null),{isAnimating:d}=v.useContext(Vn),h=Ea(),p=xr(),m=_=>{var E;try{let T=(E=c.current)==null?void 0:E.closest('[data-streamdown="table-wrapper"]'),S=T?.querySelector("table");if(!S){r?.(new Error("Table not found"));return}let A=xk(S),C=_==="csv"?Tk(A):q0(A);so(`table.${_==="csv"?"csv":"md"}`,C,_==="csv"?"text/csv":"text/markdown"),l(!1),n?.(_)}catch(T){r?.(T)}};return v.useEffect(()=>{let _=E=>{let T=E.composedPath();c.current&&!T.includes(c.current)&&l(!1)};return document.addEventListener("mousedown",_),()=>{document.removeEventListener("mousedown",_)}},[]),b.jsxs("div",{className:i("relative"),ref:c,children:[b.jsx("button",{className:i("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:d,onClick:()=>l(!o),title:h.downloadTable,type:"button",children:e??b.jsx(p.DownloadIcon,{size:14})}),o?b.jsxs("div",{className:i("absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[b.jsx("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>m("csv"),title:h.downloadTableAsCsv,type:"button",children:h.tableFormatCsv}),b.jsx("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>m("markdown"),title:h.downloadTableAsMarkdown,type:"button",children:h.tableFormatMarkdown})]}):null]})},wV=({children:e,className:t,showCopy:n=!0,showDownload:r=!0})=>{let{Maximize2Icon:i,XIcon:o}=xr(),l=$e(),[c,d]=v.useState(!1),{isAnimating:h}=v.useContext(Vn),p=Ea(),m=()=>{d(!0)},_=()=>{d(!1)};return v.useEffect(()=>{if(c){k1();let E=T=>{T.key==="Escape"&&d(!1)};return document.addEventListener("keydown",E),()=>{document.removeEventListener("keydown",E),N1()}}},[c]),b.jsxs(b.Fragment,{children:[b.jsx("button",{className:l("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:h,onClick:m,title:p.viewFullscreen,type:"button",children:b.jsx(i,{size:14})}),c?Ji.createPortal(b.jsx("div",{"aria-label":p.viewFullscreen,"aria-modal":"true",className:l("fixed inset-0 z-50 flex flex-col bg-background"),"data-streamdown":"table-fullscreen",onClick:_,onKeyDown:E=>{E.key==="Escape"&&_()},role:"dialog",children:b.jsxs("div",{className:l("flex h-full flex-col"),onClick:E=>E.stopPropagation(),onKeyDown:E=>E.stopPropagation(),role:"presentation",children:[b.jsxs("div",{className:l("flex items-center justify-end gap-1 p-4"),children:[n?b.jsx(vk,{}):null,r?b.jsx(Sk,{}):null,b.jsx("button",{className:l("rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:_,title:p.exitFullscreen,type:"button",children:b.jsx(o,{size:20})})]}),b.jsx("div",{className:l("flex-1 overflow-auto p-4 pt-0 [&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10"),children:b.jsx("table",{className:l("w-full border-collapse border border-border"),"data-streamdown":"table",children:e})})]})}),document.body):null]})},kV=({children:e,className:t,showControls:n,showCopy:r=!0,showDownload:i=!0,showFullscreen:o=!0,...l})=>{let c=$e(),d=n&&r,h=n&&i,p=n&&o,m=d||h||p;return b.jsxs("div",{className:c("my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2"),"data-streamdown":"table-wrapper",children:[m?b.jsxs("div",{className:c("flex items-center justify-end gap-1"),children:[d?b.jsx(vk,{}):null,h?b.jsx(Sk,{}):null,p?b.jsx(wV,{showCopy:d,showDownload:h,children:e}):null]}):null,b.jsx("div",{className:c("border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background"),children:b.jsx("table",{className:c("w-full divide-y divide-border",t),"data-streamdown":"table",...l,children:e})})]})},NV=/startLine=(\d+)/,RV=/\bnoLineNumbers\b/,OV=v.lazy(()=>L(()=>Promise.resolve().then(()=>oZ),void 0).then(e=>({default:e.Mermaid}))),LV=/language-([^\s]+)/;function Of(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,o=t.position.end;return n?.line===r?.line&&n?.column===r?.column&&i?.line===o?.line&&i?.column===o?.column}function kt(e,t){return e.className===t.className&&Of(e.node,t.node)}var Y0=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,Yp=(e,t)=>{if(typeof e=="boolean")return e;let n=e.table;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},vv=(e,t)=>{if(typeof e=="boolean")return e;let n=e.code;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},td=(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},L1=v.memo(({children:e,className:t,node:n,...r})=>{let i=$e();return b.jsx("ol",{className:i("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...r,children:e})},(e,t)=>kt(e,t));L1.displayName="MarkdownOl";var Ak=v.memo(({children:e,className:t,node:n,...r})=>{let i=$e();return b.jsx("li",{className:i("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...r,children:e})},(e,t)=>e.className===t.className&&Of(e.node,t.node));Ak.displayName="MarkdownLi";var Ck=v.memo(({children:e,className:t,node:n,...r})=>{let i=$e();return b.jsx("ul",{className:i("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...r,children:e})},(e,t)=>kt(e,t));Ck.displayName="MarkdownUl";var wk=v.memo(({className:e,node:t,...n})=>{let r=$e();return b.jsx("hr",{className:r("my-6 border-border",e),"data-streamdown":"horizontal-rule",...n})},(e,t)=>kt(e,t));wk.displayName="MarkdownHr";var kk=v.memo(({children:e,className:t,node:n,...r})=>{let i=$e();return b.jsx("span",{className:i("font-semibold",t),"data-streamdown":"strong",...r,children:e})},(e,t)=>kt(e,t));kk.displayName="MarkdownStrong";var IV=({children:e,className:t,href:n,node:r,...i})=>{let o=$e(),{linkSafety:l}=v.useContext(Vn),[c,d]=v.useState(!1),h=n==="streamdown:incomplete-link",p=v.useCallback(async T=>{if(!(!(l!=null&&l.enabled&&n)||h)){if(T.preventDefault(),l.onLinkCheck&&await l.onLinkCheck(n)){window.open(n,"_blank","noreferrer");return}d(!0)}},[l,n,h]),m=v.useCallback(()=>{n&&window.open(n,"_blank","noreferrer")},[n]),_=v.useCallback(()=>{d(!1)},[]),E={url:n??"",isOpen:c,onClose:_,onConfirm:m};return l!=null&&l.enabled&&n?b.jsxs(b.Fragment,{children:[b.jsx("button",{className:o("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":h,"data-streamdown":"link",onClick:p,type:"button",children:e}),l.renderModal?l.renderModal(E):b.jsx(xV,{...E})]}):b.jsx("a",{className:o("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":h,"data-streamdown":"link",href:n,rel:"noreferrer",target:"_blank",...i,children:e})},Nk=v.memo(IV,(e,t)=>kt(e,t)&&e.href===t.href);Nk.displayName="MarkdownA";var Rk=v.memo(({children:e,className:t,node:n,...r})=>{let i=$e();return b.jsx("h1",{className:i("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...r,children:e})},(e,t)=>kt(e,t));Rk.displayName="MarkdownH1";var Ok=v.memo(({children:e,className:t,node:n,...r})=>{let i=$e();return b.jsx("h2",{className:i("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...r,children:e})},(e,t)=>kt(e,t));Ok.displayName="MarkdownH2";var Lk=v.memo(({children:e,className:t,node:n,...r})=>{let i=$e();return b.jsx("h3",{className:i("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...r,children:e})},(e,t)=>kt(e,t));Lk.displayName="MarkdownH3";var Ik=v.memo(({children:e,className:t,node:n,...r})=>{let i=$e();return b.jsx("h4",{className:i("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...r,children:e})},(e,t)=>kt(e,t));Ik.displayName="MarkdownH4";var Dk=v.memo(({children:e,className:t,node:n,...r})=>{let i=$e();return b.jsx("h5",{className:i("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...r,children:e})},(e,t)=>kt(e,t));Dk.displayName="MarkdownH5";var Mk=v.memo(({children:e,className:t,node:n,...r})=>{let i=$e();return b.jsx("h6",{className:i("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...r,children:e})},(e,t)=>kt(e,t));Mk.displayName="MarkdownH6";var Pk=v.memo(({children:e,className:t,node:n,...r})=>{let{controls:i}=v.useContext(Vn),o=Y0(i,"table"),l=Yp(i,"copy"),c=Yp(i,"download"),d=Yp(i,"fullscreen");return b.jsx(kV,{className:t,showControls:o,showCopy:l,showDownload:c,showFullscreen:d,...r,children:e})},(e,t)=>kt(e,t));Pk.displayName="MarkdownTable";var Bk=v.memo(({children:e,className:t,node:n,...r})=>{let i=$e();return b.jsx("thead",{className:i("bg-muted/80",t),"data-streamdown":"table-header",...r,children:e})},(e,t)=>kt(e,t));Bk.displayName="MarkdownThead";var jk=v.memo(({children:e,className:t,node:n,...r})=>{let i=$e();return b.jsx("tbody",{className:i("divide-y divide-border",t),"data-streamdown":"table-body",...r,children:e})},(e,t)=>kt(e,t));jk.displayName="MarkdownTbody";var Uk=v.memo(({children:e,className:t,node:n,...r})=>{let i=$e();return b.jsx("tr",{className:i("border-border",t),"data-streamdown":"table-row",...r,children:e})},(e,t)=>kt(e,t));Uk.displayName="MarkdownTr";var Hk=v.memo(({children:e,className:t,node:n,...r})=>{let i=$e();return b.jsx("th",{className:i("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...r,children:e})},(e,t)=>kt(e,t));Hk.displayName="MarkdownTh";var zk=v.memo(({children:e,className:t,node:n,...r})=>{let i=$e();return b.jsx("td",{className:i("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...r,children:e})},(e,t)=>kt(e,t));zk.displayName="MarkdownTd";var Fk=v.memo(({children:e,className:t,node:n,...r})=>{let i=$e();return b.jsx("blockquote",{className:i("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...r,children:e})},(e,t)=>kt(e,t));Fk.displayName="MarkdownBlockquote";var $k=v.memo(({children:e,className:t,node:n,...r})=>{let i=$e();return b.jsx("sup",{className:i("text-sm",t),"data-streamdown":"superscript",...r,children:e})},(e,t)=>kt(e,t));$k.displayName="MarkdownSup";var Vk=v.memo(({children:e,className:t,node:n,...r})=>{let i=$e();return b.jsx("sub",{className:i("text-sm",t),"data-streamdown":"subscript",...r,children:e})},(e,t)=>kt(e,t));Vk.displayName="MarkdownSub";var Gk=v.memo(({children:e,className:t,node:n,...r})=>{if("data-footnotes"in r){let i=l=>{var c,d;if(!v.isValidElement(l))return!1;let h=Array.isArray(l.props.children)?l.props.children:[l.props.children],p=!1,m=!1;for(let _ of h)if(_){if(typeof _=="string")_.trim()!==""&&(p=!0);else if(v.isValidElement(_))if(((c=_.props)==null?void 0:c["data-footnote-backref"])!==void 0)m=!0;else{let E=Array.isArray(_.props.children)?_.props.children:[_.props.children];for(let T of E){if(typeof T=="string"&&T.trim()!==""){p=!0;break}if(v.isValidElement(T)&&((d=T.props)==null?void 0:d["data-footnote-backref"])===void 0){p=!0;break}}}}return m&&!p},o=Array.isArray(e)?e.map(l=>{if(!v.isValidElement(l))return l;if(l.type===L1){let c=(Array.isArray(l.props.children)?l.props.children:[l.props.children]).filter(d=>!i(d));return c.length===0?null:{...l,props:{...l.props,children:c}}}return l}):e;return(Array.isArray(o)?o.some(l=>l!==null):o!==null)?b.jsx("section",{className:t,...r,children:o}):null}return b.jsx("section",{className:t,...r,children:e})},(e,t)=>kt(e,t));Gk.displayName="MarkdownSection";var DV=({node:e,className:t,children:n,...r})=>{var i,o;let l=$e(),c=!("data-block"in r),{mermaid:d,controls:h,lineNumbers:p}=v.useContext(Vn),m=O1(),_=W$(),E=t?.match(LV),T=(i=E?.at(1))!=null?i:"",S=TV(T);if(c)return b.jsx("code",{className:l("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...r,children:n});let A=(o=e?.properties)==null?void 0:o.metastring,C=A?.match(NV),k=C?Number.parseInt(C[1],10):void 0,N=k!==void 0&&k>=1?k:void 0,M=!(A&&RV.test(A))&&p!==!1,B="";if(v.isValidElement(n)&&n.props&&typeof n.props=="object"&&"children"in n.props&&typeof n.props.children=="string"?B=n.props.children:typeof n=="string"&&(B=n),S){let ie=S.component;return b.jsx(v.Suspense,{fallback:b.jsx(Tv,{}),children:b.jsx(ie,{code:B,isIncomplete:_,language:T,meta:A})})}if(T==="mermaid"&&m){let ie=Y0(h,"mermaid"),V=td(h,"download"),X=td(h,"copy"),J=td(h,"fullscreen"),he=td(h,"panZoom"),ue=ie&&(V||X||J);return b.jsx(v.Suspense,{fallback:b.jsx(Tv,{}),children:b.jsxs("div",{className:l("group relative my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",t),"data-streamdown":"mermaid-block",children:[b.jsx("div",{className:l("flex h-8 items-center text-muted-foreground text-xs"),children:b.jsx("span",{className:l("ml-1 font-mono lowercase"),children:"mermaid"})}),ue?b.jsx("div",{className:l("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:b.jsxs("div",{className:l("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"mermaid-block-actions",children:[V?b.jsx(SV,{chart:B,config:d?.config}):null,X?b.jsx(_v,{code:B}):null,J?b.jsx(AV,{chart:B,config:d?.config}):null]})}):null,b.jsx("div",{className:l("rounded-md border border-border bg-background"),children:b.jsx(OV,{chart:B,config:d?.config,showControls:he})})]})})}let D=Y0(h,"code"),z=vv(h,"download"),G=vv(h,"copy");return b.jsx(sV,{className:t,code:B,isIncomplete:_,language:T,lineNumbers:M,startLine:N,children:D?b.jsxs(b.Fragment,{children:[z?b.jsx(EV,{code:B,language:T}):null,G?b.jsx(_v,{}):null]}):null})},qk=v.memo(DV,(e,t)=>e.className===t.className&&Of(e.node,t.node));qk.displayName="MarkdownCode";var Yk=v.memo(_V,(e,t)=>e.className===t.className&&Of(e.node,t.node));Yk.displayName="MarkdownImg";var Xk=v.memo(({children:e,node:t,...n})=>{let r=(Array.isArray(e)?e:[e]).filter(i=>i!=null&&i!=="");if(r.length===1&&v.isValidElement(r[0])){let i=r[0].props.node,o=i?.tagName;if(o==="img")return b.jsx(b.Fragment,{children:e});if(o==="code"&&"data-block"in r[0].props)return b.jsx(b.Fragment,{children:e})}return b.jsx("p",{...n,children:e})},(e,t)=>kt(e,t));Xk.displayName="MarkdownParagraph";var MV={ol:L1,li:Ak,ul:Ck,hr:wk,strong:kk,a:Nk,h1:Rk,h2:Ok,h3:Lk,h4:Ik,h5:Dk,h6:Mk,table:Pk,thead:Bk,tbody:jk,tr:Uk,th:Hk,td:zk,blockquote:Fk,code:qk,img:Yk,pre:({children:e})=>v.isValidElement(e)?v.cloneElement(e,{"data-block":"true"}):e,sup:$k,sub:Vk,p:Xk,section:Gk},PV=/[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,BV=new RegExp("\\p{L}","u");function Sv(e){let t=e.replace(/^#{1,6}\s+/gm,"").replace(/(\*{1,3}|_{1,3})/g,"").replace(/`[^`]*`/g,"").replace(/\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/^[\s>*\-+\d.]+/gm,"");for(let n of t){if(PV.test(n))return"rtl";if(BV.test(n))return"ltr"}return"ltr"}var jV=/^[ \t]{0,3}(`{3,}|~{3,})/,UV=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,Av=e=>{let t=e.split(`
168
+ `),n=null,r=0;for(let i of t){let o=jV.exec(i);if(n===null){if(o){let l=o[1];n=l[0],r=l.length}}else if(o){let l=o[1],c=l[0],d=l.length;c===n&&d>=r&&(n=null,r=0)}}return n!==null},HV=e=>{let t=e.split(`
169
+ `);for(let n of t){let r=n.trim();if(r.length>0&&r.includes("|")&&UV.test(r))return!0}return!1},zV=()=>e=>{Pr(e,"html",(t,n,r)=>{!r||typeof n!="number"||(r.children[n]={type:"text",value:t.value})})},Cv=[],wv={allowDangerousHtml:!0},nd=new WeakMap,FV=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 p="default";return this.keyCache.set(e,p),p}let o=p=>{if(!p||p.length===0)return"";let m="";for(let _=0;_<p.length;_+=1){let E=p[_];if(_>0&&(m+=","),Array.isArray(E)){let[T,S]=E;if(typeof T=="function"){let A=nd.get(T);A||(A=T.name,nd.set(T,A)),m+=A}else m+=String(T);m+=":",m+=JSON.stringify(S)}else if(typeof E=="function"){let T=nd.get(E);T||(T=E.name,nd.set(E,T)),m+=T}else m+=String(E)}return m},l=o(n),c=o(r),d=i?JSON.stringify(i):"",h=`${c}::${l}::${d}`;return this.keyCache.set(e,h),h}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()}},kv=new FV,Qk=e=>{let t=$V(e),n=e.children||"",r=t.runSync(t.parse(n),n);return WV(r,e)},$V=e=>{let t=kv.get(e);if(t)return t;let n=GV(e);return kv.set(e,n),n},VV=e=>e.some(t=>Array.isArray(t)?t[0]===O0:t===O0),GV=e=>{let t=e.rehypePlugins||Cv,n=e.remarkPlugins||Cv,r=VV(t)?n:[...n,zV],i=e.remarkRehypeOptions?{...wv,...e.remarkRehypeOptions}:wv;return qF().use(Gz).use(r).use(wF,i).use(t)},qV=e=>e,YV=(e,t,n,r)=>{n?e.children.splice(t,1):e.children[t]={type:"text",value:r}},XV=(e,t)=>{var n;for(let r in Bp)if(Object.hasOwn(Bp,r)&&Object.hasOwn(e.properties,r)){let i=e.properties[r],o=Bp[r];(o===null||o.includes(e.tagName))&&(e.properties[r]=(n=t(String(i||""),r,e))!=null?n:void 0)}},QV=(e,t,n,r,i,o)=>{let l=!1;return r?l=!r.includes(e.tagName):i&&(l=i.includes(e.tagName)),!l&&o&&typeof t=="number"&&(l=!o(e,t,n)),l},WV=(e,t)=>{let{allowElement:n,allowedElements:r,disallowedElements:i,skipHtml:o,unwrapDisallowed:l,urlTransform:c}=t;if(n||r||i||o||c){let d=c||qV;Pr(e,(h,p,m)=>{if(h.type==="raw"&&m&&typeof p=="number")return YV(m,p,o,h.value),p;if(h.type==="element"&&(XV(h,d),QV(h,p,m,r,i,n)&&m&&typeof p=="number"))return l&&h.children?m.children.splice(p,1,...h.children):m.children.splice(p,1),p})}return JH(e,{Fragment:b.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:b.jsx,jsxs:b.jsxs,passKeys:!0,passNode:!0})},KV=/\[\^[\w-]{1,200}\](?!:)/,ZV=/\[\^[\w-]{1,200}\]:/,JV=/<(\w+)[\s>]/,eG=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Nv=new Map,Rv=new Map,tG=e=>{let t=e.toLowerCase(),n=Nv.get(t);if(n)return n;let r=new RegExp(`<${t}(?=[\\s>/])[^>]*>`,"gi");return Nv.set(t,r),r},nG=e=>{let t=e.toLowerCase(),n=Rv.get(t);if(n)return n;let r=new RegExp(`</${t}(?=[\\s>])[^>]*>`,"gi");return Rv.set(t,r),r},Ov=(e,t)=>{if(eG.has(t.toLowerCase()))return 0;let n=e.match(tG(t));if(!n)return 0;let r=0;for(let i of n)i.trimEnd().endsWith("/>")||(r+=1);return r},Lv=(e,t)=>{let n=e.match(nG(t));return n?n.length:0},rG=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},aG=e=>{let t=KV.test(e),n=ZV.test(e);if(t||n)return[e];let r=ar.lex(e,{gfm:!0}),i=[],o=[],l=!1;for(let c of r){let d=c.raw,h=i.length;if(o.length>0){i[h-1]+=d;let p=o.at(-1),m=Ov(d,p),_=Lv(d,p);for(let E=0;E<m;E+=1)o.push(p);for(let E=0;E<_;E+=1)o.length>0&&o.at(-1)===p&&o.pop();continue}if(c.type==="html"&&c.block){let p=d.match(JV);if(p){let m=p[1],_=Ov(d,m),E=Lv(d,m);_>E&&o.push(m)}}if(h>0&&!l){let p=i[h-1];if(rG(p)%2===1){i[h-1]=p+d;continue}}i.push(d),c.type!=="space"&&(l=c.type==="code")}return i},iG=(e,t)=>{if(!t.length)return e;let n=e;for(let r of t){let i=new RegExp(`(<${r}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${r}\\s*>)`,"gi");n=n.replace(i,(o,l,c,d)=>{if(!c.includes(`
170
+
171
+ `))return l+c+d;let h=c.replace(/\n\n/g,`
172
+ <!---->
173
+ `),p=(h.startsWith(`
174
+ `)?"":`
175
+ `)+h+(h.endsWith(`
176
+ `)?"":`
177
+ `);return`${l}${p}${d}
178
+
179
+ `})}return n},sG=/([\\`*_~[\]|])/g,oG=e=>e.replace(sG,"\\$1"),lG=(e,t)=>{if(!t.length)return e;let n=e;for(let r of t){let i=new RegExp(`(<${r}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${r}\\s*>)`,"gi");n=n.replace(i,(o,l,c,d)=>{let h=oG(c).replace(/\n\n/g,"&#10;&#10;");return l+h+d})}return n},Wk=e=>e.type==="text"?e.value:"children"in e&&Array.isArray(e.children)?e.children.map(Wk).join(""):"",uG=e=>t=>{if(!e||e.length===0)return;let n=new Set(e.map(r=>r.toLowerCase()));Pr(t,"element",r=>{if(n.has(r.tagName.toLowerCase())){let i=Wk(r);r.children=i?[{type:"text",value:i}]:[]}})},cG=()=>e=>{Pr(e,"code",t=>{var n,r;t.meta&&(t.data=(n=t.data)!=null?n:{},t.data.hProperties={...(r=t.data.hProperties)!=null?r:{},metastring:t.meta})})},dG=/^[ \t]*<[\w!/?-]/,fG=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,hG=e=>typeof e!="string"||e.length===0||!dG.test(e)?e:e.replace(fG,"$1"),Iv,Dv,Mv,Pv,Ed={...ji,protocols:{...ji.protocols,href:[...(Dv=(Iv=ji.protocols)==null?void 0:Iv.href)!=null?Dv:[],"tel"]},attributes:{...ji.attributes,code:[...(Pv=(Mv=ji.attributes)==null?void 0:Mv.code)!=null?Pv:[],"metastring"]}},X0={raw:O0,sanitize:[sw,Ed],harden:[uM,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},mG={gfm:[wU,{}],codeMeta:cG},Bv=Object.values(X0),pG=Object.values(mG),gG={block:" ▋",circle:" ●"},Kk=["github-light","github-dark"],Zk={enabled:!0},bG={shikiTheme:Kk,controls:!0,isAnimating:!1,lineNumbers:!0,mode:"streaming",mermaid:void 0,linkSafety:Zk},Vn=v.createContext(bG),Jk=v.memo(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:n,index:r,isIncomplete:i,dir:o,animatePlugin:l,...c})=>{if(l){let p=l.getLastRenderCharCount();l.setPrevContentLength(p)}let d=typeof e=="string"&&n?hG(e):e,h=b.jsx(Qk,{...c,children:d});return b.jsx(gk.Provider,{value:i,children:o?b.jsx("div",{dir:o,style:{display:"contents"},children:h}):h})},(e,t)=>{if(e.content!==t.content||e.shouldNormalizeHtmlIndentation!==t.shouldNormalizeHtmlIndentation||e.index!==t.index||e.isIncomplete!==t.isIncomplete||e.dir!==t.dir)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 o,l;return((o=e.components)==null?void 0:o[i])!==((l=t.components)==null?void 0:l[i])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});Jk.displayName="Block";var I1=v.memo(({children:e,mode:t="streaming",dir:n,parseIncompleteMarkdown:r=!0,normalizeHtmlIndentation:i=!1,components:o,rehypePlugins:l=Bv,remarkPlugins:c=pG,className:d,shikiTheme:h=Kk,mermaid:p,controls:m=!0,isAnimating:_=!1,animated:E,BlockComponent:T=Jk,parseMarkdownIntoBlocksFn:S=aG,caret:A,plugins:C,remend:k,linkSafety:N=Zk,lineNumbers:M=!0,allowedTags:B,literalTagContent:D,translations:z,icons:G,prefix:ie,onAnimationStart:V,onAnimationEnd:X,...J})=>{let he=v.useId(),[ue,re]=v.useTransition(),U=v.useMemo(()=>Z$(ie),[ie]),ee=v.useRef(null),ce=v.useRef(V),xe=v.useRef(X);ce.current=V,xe.current=X,v.useEffect(()=>{var He,st,qt;if(t==="static")return;let yn=ee.current;if(ee.current=_,yn===null){_&&((He=ce.current)==null||He.call(ce));return}_&&!yn?(st=ce.current)==null||st.call(ce):!_&&yn&&((qt=xe.current)==null||qt.call(xe))},[_,t]);let O=v.useMemo(()=>B?Object.keys(B):[],[B]),F=v.useMemo(()=>{if(typeof e!="string")return"";let He=t==="streaming"&&r?jH(e,k):e;return D&&D.length>0&&(He=lG(He,D)),O.length>0&&(He=iG(He,O)),He},[e,t,r,k,O,D]),te=v.useMemo(()=>S(F),[F,S]),[P,ge]=v.useState(te);v.useEffect(()=>{t==="streaming"&&!Te?re(()=>{ge(te)}):ge(te)},[te,t]);let Ee=t==="streaming"?P:te,ye=v.useMemo(()=>n==="auto"?Ee.map(Sv):void 0,[Ee,n]),be=v.useMemo(()=>Ee.map((He,st)=>`${he}-${st}`),[Ee.length,he]),ke=v.useMemo(()=>E===!0?"true":E?JSON.stringify(E):"",[E]),Te=v.useMemo(()=>ke?ke==="true"?F0():F0(E):null,[ke]),De=v.useMemo(()=>{var He,st;return{shikiTheme:(st=(He=C?.code)==null?void 0:He.getThemes())!=null?st:h,controls:m,isAnimating:_,lineNumbers:M,mode:t,mermaid:p,linkSafety:N}},[h,m,_,M,t,p,N,C?.code]),je=v.useMemo(()=>z?JSON.stringify(z):"",[z]),Je=v.useMemo(()=>({..._k,...z}),[je]),Nt=v.useMemo(()=>{let{inlineCode:He,...st}=o??{},qt={...MV,...st};if(He){let yn=qt.code;qt.code=zr=>"data-block"in zr?yn?v.createElement(yn,zr):null:v.createElement(He,zr)}return qt},[o]),it=v.useMemo(()=>{let He=[];return C!=null&&C.cjk&&(He=[...He,...C.cjk.remarkPluginsBefore]),He=[...He,...c],C!=null&&C.cjk&&(He=[...He,...C.cjk.remarkPluginsAfter]),C!=null&&C.math&&(He=[...He,C.math.remarkPlugin]),He},[c,C?.math,C?.cjk]),On=v.useMemo(()=>{var He;let st=l;if(B&&Object.keys(B).length>0&&l===Bv){let qt={...Ed,tagNames:[...(He=Ed.tagNames)!=null?He:[],...Object.keys(B)],attributes:{...Ed.attributes,...B}};st=[X0.raw,[sw,qt],X0.harden]}return D&&D.length>0&&(st=[...st,[uG,D]]),C!=null&&C.math&&(st=[...st,C.math.rehypePlugin]),Te&&_&&(st=[...st,Te.rehypePlugin]),st},[l,C?.math,Te,_,B,D]),En=v.useMemo(()=>{if(!_||Ee.length===0)return!1;let He=Ee.at(-1);return Av(He)||HV(He)},[_,Ee]),Tr=v.useMemo(()=>A&&_&&!En?{"--streamdown-caret":`"${gG[A]}"`}:void 0,[A,_,En]);return t==="static"?b.jsx(V0.Provider,{value:Je,children:b.jsx(G0.Provider,{value:C??null,children:b.jsx(Vn.Provider,{value:De,children:b.jsx(yv,{icons:G,children:b.jsx($0.Provider,{value:U,children:b.jsx("div",{className:U("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",d),dir:n==="auto"?Sv(F):n,children:b.jsx(Qk,{components:Nt,rehypePlugins:On,remarkPlugins:it,...J,children:F})})})})})})}):b.jsx(V0.Provider,{value:Je,children:b.jsx(G0.Provider,{value:C??null,children:b.jsx(Vn.Provider,{value:De,children:b.jsx(yv,{icons:G,children:b.jsx($0.Provider,{value:U,children:b.jsxs("div",{className:U("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",A&&!En?"[&>*:last-child]:after:inline [&>*:last-child]:after:align-baseline [&>*:last-child]:after:content-[var(--streamdown-caret)]":null,d),style:Tr,children:[Ee.length===0&&A&&_&&b.jsx("span",{}),Ee.map((He,st)=>{var qt;let yn=st===Ee.length-1,zr=_&&yn&&Av(He);return b.jsx(T,{animatePlugin:Te,components:Nt,content:He,dir:(qt=ye?.[st])!=null?qt:n!=="auto"?n:void 0,index:st,isIncomplete:zr,rehypePlugins:On,remarkPlugins:it,shouldNormalizeHtmlIndentation:i,shouldParseIncompleteMarkdown:r,...J},be[st])})]})})})})})})},(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&&e.lineNumbers===t.lineNumbers&&e.normalizeHtmlIndentation===t.normalizeHtmlIndentation&&e.literalTagContent===t.literalTagContent&&JSON.stringify(e.translations)===JSON.stringify(t.translations)&&e.prefix===t.prefix&&e.dir===t.dir);I1.displayName="Streamdown";var EG=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:i=.1,showControls:o=!0,initialZoom:l=1,fullscreen:c=!1})=>{let{RotateCcwIcon:d,ZoomInIcon:h,ZoomOutIcon:p}=xr(),m=$e(),_=v.useRef(null),E=v.useRef(null),[T,S]=v.useState(l),[A,C]=v.useState({x:0,y:0}),[k,N]=v.useState(!1),[M,B]=v.useState({x:0,y:0}),[D,z]=v.useState({x:0,y:0}),G=v.useCallback(U=>{S(ee=>Math.max(n,Math.min(r,ee+U)))},[n,r]),ie=v.useCallback(()=>{G(i)},[G,i]),V=v.useCallback(()=>{G(-i)},[G,i]),X=v.useCallback(()=>{S(l),C({x:0,y:0})},[l]),J=v.useCallback(U=>{U.preventDefault();let ee=U.deltaY>0?-i:i;G(ee)},[G,i]),he=v.useCallback(U=>{if(U.button!==0||U.isPrimary===!1)return;N(!0),B({x:U.clientX,y:U.clientY}),z(A);let ee=U.currentTarget;ee instanceof HTMLElement&&ee.setPointerCapture(U.pointerId)},[A]),ue=v.useCallback(U=>{if(!k)return;U.preventDefault();let ee=U.clientX-M.x,ce=U.clientY-M.y;C({x:D.x+ee,y:D.y+ce})},[k,M,D]),re=v.useCallback(U=>{N(!1);let ee=U.currentTarget;ee instanceof HTMLElement&&ee.releasePointerCapture(U.pointerId)},[]);return v.useEffect(()=>{let U=_.current;if(U)return U.addEventListener("wheel",J,{passive:!1}),()=>{U.removeEventListener("wheel",J)}},[J]),v.useEffect(()=>{let U=E.current;if(U&&k)return document.body.style.userSelect="none",U.addEventListener("pointermove",ue,{passive:!1}),U.addEventListener("pointerup",re),U.addEventListener("pointercancel",re),()=>{document.body.style.userSelect="",U.removeEventListener("pointermove",ue),U.removeEventListener("pointerup",re),U.removeEventListener("pointercancel",re)}},[k,ue,re]),b.jsxs("div",{className:m("relative flex flex-col",c?"h-full w-full":"min-h-28 w-full",t),ref:_,style:{cursor:k?"grabbing":"grab"},children:[o?b.jsxs("div",{className:m("absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/80 p-1 supports-[backdrop-filter]:bg-background/70 supports-[backdrop-filter]:backdrop-blur-sm",c?"bottom-4 left-4":"bottom-2 left-2"),children:[b.jsx("button",{className:m("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:T>=r,onClick:ie,title:"Zoom in",type:"button",children:b.jsx(h,{size:16})}),b.jsx("button",{className:m("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:T<=n,onClick:V,title:"Zoom out",type:"button",children:b.jsx(p,{size:16})}),b.jsx("button",{className:m("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"),onClick:X,title:"Reset zoom and pan",type:"button",children:b.jsx(d,{size:16})})]}):null,b.jsx("div",{className:m("flex-1 origin-center transition-transform duration-150 ease-out",c?"flex h-full w-full items-center justify-center":"flex w-full items-center justify-center"),onPointerDown:he,ref:E,role:"application",style:{transform:`translate(${A.x}px, ${A.y}px) scale(${T})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},eN=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:i=!0})=>{let o=$e(),[l,c]=v.useState(null),[d,h]=v.useState(!1),[p,m]=v.useState(""),[_,E]=v.useState(""),[T,S]=v.useState(0),{mermaid:A}=v.useContext(Vn),C=O1(),k=A?.errorComponent,{shouldRender:N,containerRef:M}=H$({immediate:r});if(v.useEffect(()=>{if(N){if(!C){c("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{c(null),h(!0);let D=C.getMermaid(n),z=e.split("").reduce((V,X)=>(V<<5)-V+X.charCodeAt(0)|0,0),G=`mermaid-${Math.abs(z)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:ie}=await D.render(G,e);m(ie),E(ie)}catch(D){if(!(_||p)){let z=D instanceof Error?D.message:"Failed to render Mermaid chart";c(z)}}finally{h(!1)}})()}},[e,n,T,N,C]),!(N||p||_))return b.jsx("div",{className:o("my-4 min-h-[200px]",t),ref:M});if(d&&!p&&!_)return b.jsx("div",{className:o("my-4 flex justify-center p-4",t),ref:M,children:b.jsxs("div",{className:o("flex items-center space-x-2 text-muted-foreground"),children:[b.jsx("div",{className:o("h-4 w-4 animate-spin rounded-full border-current border-b-2")}),b.jsx("span",{className:o("text-sm"),children:"Loading diagram..."})]})});if(l&&!p&&!_){let D=()=>S(z=>z+1);return k?b.jsx("div",{ref:M,children:b.jsx(k,{chart:e,error:l,retry:D})}):b.jsxs("div",{className:o("rounded-md bg-red-50 p-4",t),ref:M,children:[b.jsxs("p",{className:o("font-mono text-red-700 text-sm"),children:["Mermaid Error: ",l]}),b.jsxs("details",{className:o("mt-2"),children:[b.jsx("summary",{className:o("cursor-pointer text-red-600 text-xs"),children:"Show Code"}),b.jsx("pre",{className:o("mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs"),children:e})]})]})}let B=p||_;return b.jsx("div",{className:o("size-full",t),"data-streamdown":"mermaid",ref:M,children:b.jsx(EG,{className:o(r?"size-full overflow-hidden":"overflow-hidden",t),fullscreen:r,maxZoom:3,minZoom:.5,showControls:i,zoomStep:.1,children:b.jsx("div",{"aria-label":"Mermaid chart",className:o("flex justify-center",r?"size-full items-center":null),dangerouslySetInnerHTML:{__html:B},role:"img"})})})};const tN=v.createContext(null),yG=()=>{const e=v.useContext(tN);if(!e)throw new Error("Reasoning components must be used within Reasoning");return e},_G=1e3,xG=1e3,D1=v.memo(({className:e,isStreaming:t=!1,open:n,defaultOpen:r=!0,onOpenChange:i,duration:o,children:l,...c})=>{const[d,h]=ni({prop:n,defaultProp:r,...i?{onChange:i}:{}}),[p,m]=ni({prop:o,defaultProp:void 0}),[_,E]=v.useState(!1),[T,S]=v.useState(null);v.useEffect(()=>{t?T===null&&S(Date.now()):T!==null&&(m(Math.ceil((Date.now()-T)/xG)),S(null))},[t,T,m]),v.useEffect(()=>{if(r&&!t&&d&&!_){const C=setTimeout(()=>{h(!1),E(!0)},_G);return()=>clearTimeout(C)}},[t,d,r,h,_]);const A=C=>{h(C)};return b.jsx(tN.Provider,{value:{isStreaming:t,isOpen:d,setIsOpen:h,duration:p},children:b.jsx(aC,{className:we("not-prose mb-4",e),onOpenChange:A,open:d,...c,children:l})})}),TG=(e,t)=>e||t===0?b.jsx(rC,{duration:1,children:"Thinking…"}):t===void 0?b.jsx("p",{children:"Thought for a few seconds"}):b.jsxs("p",{children:["Thought for ",t," seconds"]}),M1=v.memo(({className:e,children:t,getThinkingMessage:n=TG,...r})=>{const{isStreaming:i,isOpen:o,duration:l}=yG();return b.jsx(iC,{className:we("flex w-full items-center gap-2 text-muted-foreground text-sm transition-colors hover:text-foreground",e),...r,children:t??b.jsxs(b.Fragment,{children:[b.jsx(_L,{className:"size-4"}),n(i,l),b.jsx(Jd,{className:we("size-4 transition-transform",o?"rotate-180":"rotate-0")})]})})}),P1=v.memo(({className:e,children:t,...n})=>b.jsx(sC,{className:we("mt-4 text-sm","data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-muted-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...n,children:b.jsx(I1,{children:t})}));D1.displayName="Reasoning";M1.displayName="ReasoningTrigger";P1.displayName="ReasoningContent";const B1=v.memo(({className:e,...t})=>b.jsx(I1,{className:we("size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",e),...t}),(e,t)=>e.children===t.children);B1.displayName="Response";const vG=bg("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function nN({className:e,variant:t="default",asChild:n=!1,...r}){const i=n?q2:"span";return b.jsx(i,{"data-slot":"badge","data-variant":t,className:we(vG({variant:t}),e),...r})}var Q0=Object.defineProperty,SG=Object.getOwnPropertyDescriptor,AG=Object.getOwnPropertyNames,CG=Object.prototype.hasOwnProperty,j1=(e,t)=>{let n={};for(var r in e)Q0(n,r,{get:e[r],enumerable:!0});return Q0(n,Symbol.toStringTag,{value:"Module"}),n},wG=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var i=AG(t),o=0,l=i.length,c;o<l;o++)c=i[o],!CG.call(e,c)&&c!==n&&Q0(e,c,{get:(d=>t[d]).bind(null,c),enumerable:!(r=SG(t,c))||r.enumerable});return e},rN=(e,t,n)=>(wG(e,t,"default"),n);const Lf=[{id:"abap",name:"ABAP",import:(()=>L(()=>import("./abap-BdImnpbu.js"),[]))},{id:"actionscript-3",name:"ActionScript",import:(()=>L(()=>import("./actionscript-3-CoDkCxhg.js"),[]))},{id:"ada",name:"Ada",import:(()=>L(()=>import("./ada-bCR0ucgS.js"),[]))},{id:"angular-html",name:"Angular HTML",import:(()=>L(()=>import("./angular-html-DA-rfuFy.js").then(e=>e.f),__vite__mapDeps([0,1,2,3])))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>L(()=>import("./angular-ts-BrjP3tb8.js"),__vite__mapDeps([4,0,1,2,3,5])))},{id:"apache",name:"Apache Conf",import:(()=>L(()=>import("./apache-Pmp26Uib.js"),[]))},{id:"apex",name:"Apex",import:(()=>L(()=>import("./apex-Dqspr-GT.js"),[]))},{id:"apl",name:"APL",import:(()=>L(()=>import("./apl-CORt7UWP.js"),__vite__mapDeps([6,1,2,3,7,8,9])))},{id:"applescript",name:"AppleScript",import:(()=>L(()=>import("./applescript-Co6uUVPk.js"),[]))},{id:"ara",name:"Ara",import:(()=>L(()=>import("./ara-BRHolxvo.js"),[]))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>L(()=>import("./asciidoc-Ve4PFQV2.js"),[]))},{id:"asm",name:"Assembly",import:(()=>L(()=>import("./asm-D_Q5rh1f.js"),[]))},{id:"astro",name:"Astro",import:(()=>L(()=>import("./astro-HNnZUWAn.js"),__vite__mapDeps([10,9,2,11,3,12,13])))},{id:"awk",name:"AWK",import:(()=>L(()=>import("./awk-DMzUqQB5.js"),[]))},{id:"ballerina",name:"Ballerina",import:(()=>L(()=>import("./ballerina-BFfxhgS-.js"),[]))},{id:"bat",name:"Batch File",aliases:["batch"],import:(()=>L(()=>import("./bat-BkioyH1T.js"),[]))},{id:"beancount",name:"Beancount",import:(()=>L(()=>import("./beancount-k_qm7-4y.js"),[]))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>L(()=>import("./berry-uYugtg8r.js"),[]))},{id:"bibtex",name:"BibTeX",import:(()=>L(()=>import("./bibtex-CHM0blh-.js"),[]))},{id:"bicep",name:"Bicep",import:(()=>L(()=>import("./bicep-Bmn6On1c.js"),[]))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>L(()=>import("./bird2-BIv1doCn.js"),[]))},{id:"blade",name:"Blade",import:(()=>L(()=>import("./blade-2xfisSek.js"),__vite__mapDeps([14,15,1,2,3,7,8,16,9])))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>L(()=>import("./bsl-BO_Y6i37.js"),__vite__mapDeps([17,18])))},{id:"c",name:"C",import:(()=>L(()=>import("./c-BIGW1oBm.js"),[]))},{id:"c3",name:"C3",import:(()=>L(()=>import("./c3-MRO5bC_T.js"),[]))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>L(()=>import("./cadence-Bv_4Rxtq.js"),[]))},{id:"cairo",name:"Cairo",import:(()=>L(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([19,20])))},{id:"clarity",name:"Clarity",import:(()=>L(()=>import("./clarity-D53aC0YG.js"),[]))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>L(()=>import("./clojure-P80f7IUj.js"),[]))},{id:"cmake",name:"CMake",import:(()=>L(()=>import("./cmake-D1j8_8rp.js"),[]))},{id:"cobol",name:"COBOL",import:(()=>L(()=>import("./cobol-nBiQ_Alo.js"),__vite__mapDeps([21,1,2,3,8])))},{id:"codeowners",name:"CODEOWNERS",import:(()=>L(()=>import("./codeowners-Bp6g37R7.js"),[]))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>L(()=>import("./codeql-DsOJ9woJ.js"),[]))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>L(()=>import("./coffee-Ch7k5sss.js"),__vite__mapDeps([22,2])))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>L(()=>import("./common-lisp-Cg-RD9OK.js"),[]))},{id:"coq",name:"Coq",import:(()=>L(()=>import("./coq-DkFqJrB1.js"),[]))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>L(()=>import("./cpp-UfJy6YNI.js"),__vite__mapDeps([23,24,25,26,16])))},{id:"crystal",name:"Crystal",import:(()=>L(()=>import("./crystal-DGywbUpC.js"),__vite__mapDeps([27,1,2,3,16,26,28])))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>L(()=>import("./csharp-DSvCPggb.js"),[]))},{id:"css",name:"CSS",import:(()=>L(()=>import("./css-CLj8gQPS.js"),[]))},{id:"csv",name:"CSV",import:(()=>L(()=>import("./csv-fuZLfV_i.js"),[]))},{id:"cue",name:"CUE",import:(()=>L(()=>import("./cue-D82EKSYY.js"),[]))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>L(()=>import("./cypher-COkxafJQ.js"),[]))},{id:"d",name:"D",import:(()=>L(()=>import("./d-85-TOEBH.js"),[]))},{id:"dart",name:"Dart",import:(()=>L(()=>import("./dart-bE4Kk8sk.js"),[]))},{id:"dax",name:"DAX",import:(()=>L(()=>import("./dax-CEL-wOlO.js"),[]))},{id:"desktop",name:"Desktop",import:(()=>L(()=>import("./desktop-BmXAJ9_W.js"),[]))},{id:"diff",name:"Diff",import:(()=>L(()=>import("./diff-D97Zzqfu.js"),[]))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>L(()=>import("./docker-BcOcwvcX.js"),[]))},{id:"dotenv",name:"dotEnv",import:(()=>L(()=>import("./dotenv-Da5cRb03.js"),[]))},{id:"dream-maker",name:"Dream Maker",import:(()=>L(()=>import("./dream-maker-BtqSS_iP.js"),[]))},{id:"edge",name:"Edge",import:(()=>L(()=>import("./edge-FbVlp4U3.js"),__vite__mapDeps([29,11,1,2,3,15])))},{id:"elixir",name:"Elixir",import:(()=>L(()=>import("./elixir-CkH2-t6x.js"),__vite__mapDeps([30,1,2,3])))},{id:"elm",name:"Elm",import:(()=>L(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([31,25,26])))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>L(()=>import("./emacs-lisp-CXvaQtF9.js"),[]))},{id:"erb",name:"ERB",import:(()=>L(()=>import("./erb-Dm6A9KJ5.js"),__vite__mapDeps([32,1,2,3,33,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>L(()=>import("./erlang-DsQrWhSR.js"),__vite__mapDeps([39,40])))},{id:"fennel",name:"Fennel",import:(()=>L(()=>import("./fennel-BYunw83y.js"),[]))},{id:"fish",name:"Fish",import:(()=>L(()=>import("./fish-BvzEVeQv.js"),[]))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>L(()=>import("./fluent-C4IJs8-o.js"),[]))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>L(()=>import("./fortran-fixed-form-CkoXwp7k.js"),__vite__mapDeps([41,42])))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>L(()=>import("./fortran-free-form-BxgE0vQu.js"),[]))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>L(()=>import("./fsharp-CXgrBDvD.js"),__vite__mapDeps([43,40])))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>L(()=>import("./gdresource-BOOCDP_w.js"),__vite__mapDeps([44,45,46])))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>L(()=>import("./gdscript-C5YyOfLZ.js"),[]))},{id:"gdshader",name:"GDShader",import:(()=>L(()=>import("./gdshader-DkwncUOv.js"),[]))},{id:"genie",name:"Genie",import:(()=>L(()=>import("./genie-D0YGMca9.js"),[]))},{id:"gherkin",name:"Gherkin",import:(()=>L(()=>import("./gherkin-DyxjwDmM.js"),[]))},{id:"git-commit",name:"Git Commit Message",import:(()=>L(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([47,48])))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>L(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([49,28])))},{id:"gleam",name:"Gleam",import:(()=>L(()=>import("./gleam-BspZqrRM.js"),[]))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>L(()=>import("./glimmer-js-ByusRIyA.js"),__vite__mapDeps([50,2,11,3,1])))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>L(()=>import("./glimmer-ts-BfAWNZQY.js"),__vite__mapDeps([51,11,3,2,1])))},{id:"glsl",name:"GLSL",import:(()=>L(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([25,26])))},{id:"gn",name:"GN",import:(()=>L(()=>import("./gn-n2N0HUVH.js"),[]))},{id:"gnuplot",name:"Gnuplot",import:(()=>L(()=>import("./gnuplot-DdkO51Og.js"),[]))},{id:"go",name:"Go",import:(()=>L(()=>import("./go-C27-OAKa.js"),[]))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>L(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([35,2,11,36,13])))},{id:"groovy",name:"Groovy",import:(()=>L(()=>import("./groovy-gcz8RCvz.js"),[]))},{id:"hack",name:"Hack",import:(()=>L(()=>import("./hack-DbPARsA_.js"),__vite__mapDeps([52,1,2,3,16])))},{id:"haml",name:"Ruby Haml",import:(()=>L(()=>import("./haml-D5jkg6IW.js"),__vite__mapDeps([34,2,3])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>L(()=>import("./handlebars-BpdQsYii.js"),__vite__mapDeps([53,1,2,3,38])))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>L(()=>import("./haskell-Df6bDoY_.js"),[]))},{id:"haxe",name:"Haxe",import:(()=>L(()=>import("./haxe-CzTSHFRz.js"),[]))},{id:"hcl",name:"HashiCorp HCL",import:(()=>L(()=>import("./hcl-BWvSN4gD.js"),[]))},{id:"hjson",name:"Hjson",import:(()=>L(()=>import("./hjson-D5-asLiD.js"),[]))},{id:"hlsl",name:"HLSL",import:(()=>L(()=>import("./hlsl-D3lLCCz7.js"),[]))},{id:"html",name:"HTML",import:(()=>L(()=>import("./html-pp8916En.js"),__vite__mapDeps([1,2,3])))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>L(()=>import("./html-derivative-DlHx6ybY.js"),__vite__mapDeps([15,1,2,3])))},{id:"http",name:"HTTP",import:(()=>L(()=>import("./http-jrhK8wxY.js"),__vite__mapDeps([54,28,9,7,8,35,2,11,36,13])))},{id:"hurl",name:"Hurl",import:(()=>L(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([55,35,2,11,36,13,7,8,56])))},{id:"hxml",name:"HXML",import:(()=>L(()=>import("./hxml-Bvhsp5Yf.js"),__vite__mapDeps([57,58])))},{id:"hy",name:"Hy",import:(()=>L(()=>import("./hy-DFXneXwc.js"),[]))},{id:"imba",name:"Imba",import:(()=>L(()=>import("./imba-DGztddWO.js"),[]))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>L(()=>import("./ini-BEwlwnbL.js"),[]))},{id:"java",name:"Java",import:(()=>L(()=>import("./java-CylS5w8V.js"),[]))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>L(()=>import("./javascript-wDzz0qaB.js"),[]))},{id:"jinja",name:"Jinja",import:(()=>L(()=>import("./jinja-f2NsQr07.js"),__vite__mapDeps([59,1,2,3])))},{id:"jison",name:"Jison",import:(()=>L(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([60,2])))},{id:"json",name:"JSON",import:(()=>L(()=>import("./json-Cp-IABpG.js"),[]))},{id:"json5",name:"JSON5",import:(()=>L(()=>import("./json5-C9tS-k6U.js"),[]))},{id:"jsonc",name:"JSON with Comments",import:(()=>L(()=>import("./jsonc-Des-eS-w.js"),[]))},{id:"jsonl",name:"JSON Lines",import:(()=>L(()=>import("./jsonl-DcaNXYhu.js"),[]))},{id:"jsonnet",name:"Jsonnet",import:(()=>L(()=>import("./jsonnet-DFQXde-d.js"),[]))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>L(()=>import("./jssm-C2t-YnRu.js"),[]))},{id:"jsx",name:"JSX",import:(()=>L(()=>import("./jsx-g9-lgVsj.js"),[]))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>L(()=>import("./julia-D7OTSIA_.js"),__vite__mapDeps([61,23,24,25,26,16,20,2,62])))},{id:"just",name:"Just",import:(()=>L(()=>import("./just-CUsbIsdP.js"),__vite__mapDeps([63,28,2,11,64,1,3,7,8,16,20,33,34,35,36,13,23,24,25,26,37,38])))},{id:"kdl",name:"KDL",import:(()=>L(()=>import("./kdl-DV7GczEv.js"),[]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>L(()=>import("./kotlin-BdnUsdx6.js"),[]))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>L(()=>import("./kusto-wEQ09or8.js"),[]))},{id:"latex",name:"LaTeX",import:(()=>L(()=>import("./latex-CaSxy8MP.js"),__vite__mapDeps([65,66,62])))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>L(()=>import("./lean-BZvkOJ9d.js"),[]))},{id:"less",name:"Less",import:(()=>L(()=>import("./less-B1dDrJ26.js"),[]))},{id:"liquid",name:"Liquid",import:(()=>L(()=>import("./liquid-C0sCDyMI.js"),__vite__mapDeps([67,1,2,3,9])))},{id:"llvm",name:"LLVM IR",import:(()=>L(()=>import("./llvm-DjAJT7YJ.js"),[]))},{id:"log",name:"Log file",import:(()=>L(()=>import("./log-2UxHyX5q.js"),[]))},{id:"logo",name:"Logo",import:(()=>L(()=>import("./logo-BtOb2qkB.js"),[]))},{id:"lua",name:"Lua",import:(()=>L(()=>import("./lua-BaeVxFsk.js"),__vite__mapDeps([37,26])))},{id:"luau",name:"Luau",import:(()=>L(()=>import("./luau-KW6xsasC.js"),[]))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>L(()=>import("./make-CHLpvVh8.js"),[]))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>L(()=>import("./markdown-Cvjx9yec.js"),[]))},{id:"marko",name:"Marko",import:(()=>L(()=>import("./marko-DjSrsDqO.js"),__vite__mapDeps([68,3,69,5,11])))},{id:"matlab",name:"MATLAB",import:(()=>L(()=>import("./matlab-D7o27uSR.js"),[]))},{id:"mdc",name:"MDC",import:(()=>L(()=>import("./mdc-DTYItulj.js"),__vite__mapDeps([70,40,38,15,1,2,3])))},{id:"mdx",name:"MDX",import:(()=>L(()=>import("./mdx-Cmh6b_Ma.js"),[]))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>L(()=>import("./mermaid-mWjccvbQ.js"),[]))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>L(()=>import("./mipsasm-CKIfxQSi.js"),[]))},{id:"mojo",name:"Mojo",import:(()=>L(()=>import("./mojo-rZm6bMo-.js"),[]))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>L(()=>import("./moonbit-_H4v1dQx.js"),[]))},{id:"move",name:"Move",import:(()=>L(()=>import("./move-IF9eRakj.js"),[]))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>L(()=>import("./narrat-DRg8JJMk.js"),[]))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>L(()=>import("./nextflow-C-mBbutL.js"),__vite__mapDeps([71,72])))},{id:"nextflow-groovy",name:"Nextflow Groovy",import:(()=>L(()=>import("./nextflow-groovy-vE_lwT2v.js"),[]))},{id:"nginx",name:"Nginx",import:(()=>L(()=>import("./nginx-BpAMiNFr.js"),__vite__mapDeps([73,37,26])))},{id:"nim",name:"Nim",import:(()=>L(()=>import("./nim-BIad80T-.js"),__vite__mapDeps([74,26,1,2,3,7,8,25,40])))},{id:"nix",name:"Nix",import:(()=>L(()=>import("./nix-CwoSXNpI.js"),[]))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>L(()=>import("./nushell-Cz2AlsmD.js"),[]))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>L(()=>import("./objective-c-DXmwc3jG.js"),[]))},{id:"objective-cpp",name:"Objective-C++",import:(()=>L(()=>import("./objective-cpp-CLxacb5B.js"),[]))},{id:"ocaml",name:"OCaml",import:(()=>L(()=>import("./ocaml-C0hk2d4L.js"),[]))},{id:"odin",name:"Odin",import:(()=>L(()=>import("./odin-BBf5iR-q.js"),[]))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>L(()=>import("./openscad-C4EeE6gA.js"),[]))},{id:"pascal",name:"Pascal",import:(()=>L(()=>import("./pascal-D93ZcfNL.js"),[]))},{id:"perl",name:"Perl",import:(()=>L(()=>import("./perl-B9cMNwum.js"),__vite__mapDeps([64,1,2,3,7,8,16])))},{id:"php",name:"PHP",import:(()=>L(()=>import("./php-Csjmro_R.js"),__vite__mapDeps([75,1,2,3,7,8,16,9])))},{id:"pkl",name:"Pkl",import:(()=>L(()=>import("./pkl-u5AG7uiY.js"),[]))},{id:"plsql",name:"PL/SQL",import:(()=>L(()=>import("./plsql-ChMvpjG-.js"),[]))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>L(()=>import("./po-BTJTHyun.js"),[]))},{id:"polar",name:"Polar",import:(()=>L(()=>import("./polar-C0HS_06l.js"),[]))},{id:"postcss",name:"PostCSS",import:(()=>L(()=>import("./postcss-CXtECtnM.js"),[]))},{id:"powerquery",name:"PowerQuery",import:(()=>L(()=>import("./powerquery-CEu0bR-o.js"),[]))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:(()=>L(()=>import("./powershell-Dpen1YoG.js"),[]))},{id:"prisma",name:"Prisma",import:(()=>L(()=>import("./prisma-Dd19v3D-.js"),[]))},{id:"prolog",name:"Prolog",import:(()=>L(()=>import("./prolog-CbFg5uaA.js"),[]))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>L(()=>import("./proto-C7zT0LnQ.js"),[]))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>L(()=>import("./pug-DKIMFp6K.js"),__vite__mapDeps([76,2,3,1])))},{id:"puppet",name:"Puppet",import:(()=>L(()=>import("./puppet-BMWR74SV.js"),[]))},{id:"purescript",name:"PureScript",import:(()=>L(()=>import("./purescript-CklMAg4u.js"),[]))},{id:"python",name:"Python",aliases:["py"],import:(()=>L(()=>import("./python-B6aJPvgy.js"),[]))},{id:"qml",name:"QML",import:(()=>L(()=>import("./qml-3beO22l8.js"),__vite__mapDeps([77,2])))},{id:"qmldir",name:"QML Directory",import:(()=>L(()=>import("./qmldir-C8lEn-DE.js"),[]))},{id:"qss",name:"Qt Style Sheets",import:(()=>L(()=>import("./qss-IeuSbFQv.js"),[]))},{id:"r",name:"R",import:(()=>L(()=>import("./r-Dspwwk_N.js"),[]))},{id:"racket",name:"Racket",import:(()=>L(()=>import("./racket-BqYA7rlc.js"),[]))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>L(()=>import("./raku-DXvB9xmW.js"),[]))},{id:"razor",name:"ASP.NET Razor",import:(()=>L(()=>import("./razor-BjBPvh-w.js"),__vite__mapDeps([78,1,2,3,79])))},{id:"reg",name:"Windows Registry Script",import:(()=>L(()=>import("./reg-C-SQnVFl.js"),[]))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>L(()=>import("./regexp-CDVJQ6XC.js"),[]))},{id:"rel",name:"Rel",import:(()=>L(()=>import("./rel-C3B-1QV4.js"),[]))},{id:"riscv",name:"RISC-V",import:(()=>L(()=>import("./riscv-BM1_JUlF.js"),[]))},{id:"ron",name:"RON",import:(()=>L(()=>import("./ron-D8l8udqQ.js"),[]))},{id:"rosmsg",name:"ROS Interface",import:(()=>L(()=>import("./rosmsg-BJDFO7_C.js"),[]))},{id:"rst",name:"reStructuredText",import:(()=>L(()=>import("./rst-CpCqk9r5.js"),__vite__mapDeps([80,15,1,2,3,23,24,25,26,16,20,28,38,81,33,34,7,8,35,11,36,13,37])))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>L(()=>import("./ruby-DyJCeAvU.js"),__vite__mapDeps([33,1,2,3,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>L(()=>import("./rust-B1yitclQ.js"),[]))},{id:"sas",name:"SAS",import:(()=>L(()=>import("./sas-DEy46yEz.js"),__vite__mapDeps([82,16])))},{id:"sass",name:"Sass",import:(()=>L(()=>import("./sass-Cj5Yp3dK.js"),[]))},{id:"scala",name:"Scala",import:(()=>L(()=>import("./scala-C151Ov-r.js"),[]))},{id:"scheme",name:"Scheme",import:(()=>L(()=>import("./scheme-C98Dy4si.js"),[]))},{id:"scss",name:"SCSS",import:(()=>L(()=>import("./scss-D5BDwBP9.js"),__vite__mapDeps([5,3])))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>L(()=>import("./sdbl-DVxCFoDh.js"),[]))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>L(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([83,84])))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>L(()=>import("./shellscript-Yzrsuije.js"),[]))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>L(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([85,28])))},{id:"smalltalk",name:"Smalltalk",import:(()=>L(()=>import("./smalltalk-BERRCDM3.js"),[]))},{id:"solidity",name:"Solidity",import:(()=>L(()=>import("./solidity-rGO070M0.js"),[]))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>L(()=>import("./soy-8wufbnw4.js"),__vite__mapDeps([86,1,2,3])))},{id:"sparql",name:"SPARQL",import:(()=>L(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([87,88])))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>L(()=>import("./splunk-BtCnVYZw.js"),[]))},{id:"sql",name:"SQL",import:(()=>L(()=>import("./sql-CRqJ_cUM.js"),[]))},{id:"ssh-config",name:"SSH Config",import:(()=>L(()=>import("./ssh-config-_ykCGR6B.js"),[]))},{id:"stata",name:"Stata",import:(()=>L(()=>import("./stata-DI20mbqo.js"),__vite__mapDeps([89,16])))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>L(()=>import("./stylus-BEDo0Tqx.js"),[]))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>L(()=>import("./surrealql-Bq5Q-fJD.js"),__vite__mapDeps([90,2])))},{id:"svelte",name:"Svelte",import:(()=>L(()=>import("./svelte-Cy7k_4gC.js"),__vite__mapDeps([91,2,11,3,12])))},{id:"swift",name:"Swift",import:(()=>L(()=>import("./swift-D82vCrfD.js"),[]))},{id:"system-verilog",name:"SystemVerilog",import:(()=>L(()=>import("./system-verilog-CnnmHF94.js"),[]))},{id:"systemd",name:"Systemd Units",import:(()=>L(()=>import("./systemd-4A_iFExJ.js"),[]))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>L(()=>import("./talonscript-CkByrt1z.js"),[]))},{id:"tasl",name:"Tasl",import:(()=>L(()=>import("./tasl-QIJgUcNo.js"),[]))},{id:"tcl",name:"Tcl",import:(()=>L(()=>import("./tcl-dwOrl1Do.js"),[]))},{id:"templ",name:"Templ",import:(()=>L(()=>import("./templ-DhtptRzy.js"),__vite__mapDeps([92,93,2,3])))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>L(()=>import("./terraform-BETggiCN.js"),[]))},{id:"tex",name:"TeX",import:(()=>L(()=>import("./tex-idrVyKtj.js"),__vite__mapDeps([66,62])))},{id:"toml",name:"TOML",import:(()=>L(()=>import("./toml-vGWfd6FD.js"),[]))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>L(()=>import("./ts-tags-D351s5mN.js"),__vite__mapDeps([94,11,3,2,25,26,1,16,7,8])))},{id:"tsv",name:"TSV",import:(()=>L(()=>import("./tsv-B_m7g4N7.js"),[]))},{id:"tsx",name:"TSX",import:(()=>L(()=>import("./tsx-COt5Ahok.js"),[]))},{id:"turtle",name:"Turtle",import:(()=>L(()=>import("./turtle-BsS91CYL.js"),[]))},{id:"twig",name:"Twig",import:(()=>L(()=>import("./twig-CW1WmMYd.js"),__vite__mapDeps([95,3,2,5,75,1,7,8,16,9,20,33,34,35,11,36,13,23,24,25,26,28,37,38])))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>L(()=>import("./typescript-BPQ3VLAy.js"),[]))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>L(()=>import("./typespec-CAFt9gP4.js"),[]))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>L(()=>import("./typst-DHCkPAjA.js"),[]))},{id:"v",name:"V",import:(()=>L(()=>import("./v-BcVCzyr7.js"),[]))},{id:"vala",name:"Vala",import:(()=>L(()=>import("./vala-CsfeWuGM.js"),[]))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:(()=>L(()=>import("./vb-D17OF-Vu.js"),[]))},{id:"verilog",name:"Verilog",import:(()=>L(()=>import("./verilog-BQ8w6xss.js"),[]))},{id:"vhdl",name:"VHDL",import:(()=>L(()=>import("./vhdl-CeAyd5Ju.js"),[]))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>L(()=>import("./viml-CJc9bBzg.js"),[]))},{id:"vue",name:"Vue",import:(()=>L(()=>import("./vue-D2xRrEX4.js"),__vite__mapDeps([96,3,2,11,9,1,15])))},{id:"vue-html",name:"Vue HTML",import:(()=>L(()=>import("./vue-html-AaS7Mt5G.js"),__vite__mapDeps([97,2])))},{id:"vue-vine",name:"Vue Vine",import:(()=>L(()=>import("./vue-vine-BoDAl6tE.js"),__vite__mapDeps([98,3,5,69,99,12,2])))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>L(()=>import("./vyper-CDx5xZoG.js"),[]))},{id:"wasm",name:"WebAssembly",import:(()=>L(()=>import("./wasm-MzD3tlZU.js"),[]))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>L(()=>import("./wenyan-BV7otONQ.js"),[]))},{id:"wgsl",name:"WGSL",import:(()=>L(()=>import("./wgsl-Dx-B1_4e.js"),[]))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>L(()=>import("./wikitext-BhOHFoWU.js"),[]))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>L(()=>import("./wit-5i3qLPDT.js"),[]))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>L(()=>import("./wolfram-lXgVvXCa.js"),[]))},{id:"xml",name:"XML",import:(()=>L(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8])))},{id:"xsl",name:"XSL",import:(()=>L(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([100,7,8])))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>L(()=>import("./yaml-Buea-lGh.js"),[]))},{id:"zenscript",name:"ZenScript",import:(()=>L(()=>import("./zenscript-DVFEvuxE.js"),[]))},{id:"zig",name:"Zig",import:(()=>L(()=>import("./zig-VOosw3JB.js"),[]))}],U1=Object.fromEntries(Lf.map(e=>[e.id,e.import])),H1=Object.fromEntries(Lf.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),z1={...U1,...H1},F1=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>L(()=>import("./andromeeda-C4gqWexZ.js"),[]))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>L(()=>import("./aurora-x-D-2ljcwZ.js"),[]))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>L(()=>import("./ayu-dark-DYE7WIF3.js"),[]))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>L(()=>import("./ayu-light-BA47KaF1.js"),[]))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>L(()=>import("./ayu-mirage-32ctXXKs.js"),[]))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>L(()=>import("./catppuccin-frappe-DFWUc33u.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>L(()=>import("./catppuccin-latte-C9dUb6Cb.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>L(()=>import("./catppuccin-macchiato-DQyhUUbL.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>L(()=>import("./catppuccin-mocha-D87Tk5Gz.js"),[]))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>L(()=>import("./dark-plus-C3mMm8J8.js"),[]))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>L(()=>import("./dracula-BzJJZx-M.js"),[]))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>L(()=>import("./dracula-soft-BXkSAIEj.js"),[]))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>L(()=>import("./everforest-dark-BgDCqdQA.js"),[]))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>L(()=>import("./everforest-light-C8M2exoo.js"),[]))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>L(()=>import("./github-dark-DHJKELXO.js"),[]))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>L(()=>import("./github-dark-default-Cuk6v7N8.js"),[]))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>L(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>L(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>L(()=>import("./github-light-DAi9KRSo.js"),[]))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>L(()=>import("./github-light-default-D7oLnXFd.js"),[]))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>L(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>L(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>L(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>L(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>L(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>L(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>L(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>L(()=>import("./horizon-BUw7H-hv.js"),[]))},{id:"horizon-bright",displayName:"Horizon Bright",type:"light",import:(()=>L(()=>import("./horizon-bright-CUuTKBJd.js"),[]))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>L(()=>import("./houston-DnULxvSX.js"),[]))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>L(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>L(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>L(()=>import("./kanagawa-wave-DWedfzmr.js"),[]))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>L(()=>import("./laserwave-DUszq2jm.js"),[]))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>L(()=>import("./light-plus-B7mTdjB0.js"),[]))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>L(()=>import("./material-theme-D5KoaKCx.js"),[]))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>L(()=>import("./material-theme-darker-BfHTSMKl.js"),[]))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>L(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>L(()=>import("./material-theme-ocean-CyktbL80.js"),[]))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>L(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>L(()=>import("./min-dark-CafNBF8u.js"),[]))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>L(()=>import("./min-light-CTRr51gU.js"),[]))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>L(()=>import("./monokai-D4h5O-jR.js"),[]))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>L(()=>import("./night-owl-C39BiMTA.js"),[]))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>L(()=>import("./night-owl-light-CMTm3GFP.js"),[]))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>L(()=>import("./nord-Ddv68eIx.js"),[]))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>L(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>L(()=>import("./one-light-C3Wv6jpd.js"),[]))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>L(()=>import("./plastic-3e1v2bzS.js"),[]))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>L(()=>import("./poimandres-CS3Unz2-.js"),[]))},{id:"red",displayName:"Red",type:"dark",import:(()=>L(()=>import("./red-bN70gL4F.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>L(()=>import("./rose-pine-qdsjHGoJ.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>L(()=>import("./rose-pine-dawn-DHQR4-dF.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>L(()=>import("./rose-pine-moon-D4_iv3hh.js"),[]))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>L(()=>import("./slack-dark-BthQWCQV.js"),[]))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>L(()=>import("./slack-ochin-DqwNpetd.js"),[]))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>L(()=>import("./snazzy-light-Bw305WKR.js"),[]))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>L(()=>import("./solarized-dark-DXbdFlpD.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>L(()=>import("./solarized-light-L9t79GZl.js"),[]))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>L(()=>import("./synthwave-84-CbfX1IO0.js"),[]))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>L(()=>import("./tokyo-night-hegEt444.js"),[]))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>L(()=>import("./vesper-DRje8inN.js"),[]))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>L(()=>import("./vitesse-black-Bkuqu6BP.js"),[]))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>L(()=>import("./vitesse-dark-D0r3Knsf.js"),[]))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>L(()=>import("./vitesse-light-CVO1_9PV.js"),[]))}],$1=Object.fromEntries(F1.map(e=>[e.id,e.import]));var V1=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function kG(){return 2147483648}function NG(){return typeof performance<"u"?performance.now():Date.now()}const RG=(e,t)=>e+(t-e%t)%t;async function OG(e){let t,n;const r={};function i(E){n=E,r.HEAPU8=new Uint8Array(E),r.HEAPU32=new Uint32Array(E)}function o(E,T,S){r.HEAPU8.copyWithin(E,T,T+S)}function l(E){try{return t.grow(E-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function c(E){const T=r.HEAPU8.length;E=E>>>0;const S=kG();if(E>S)return!1;for(let A=1;A<=4;A*=2){let C=T*(1+.2/A);C=Math.min(C,E+100663296);const k=Math.min(S,RG(Math.max(E,C),65536));if(l(k))return!0}return!1}const d=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function h(E,T,S=1024){const A=T+S;let C=T;for(;E[C]&&!(C>=A);)++C;if(C-T>16&&E.buffer&&d)return d.decode(E.subarray(T,C));let k="";for(;T<C;){let N=E[T++];if(!(N&128)){k+=String.fromCharCode(N);continue}const M=E[T++]&63;if((N&224)===192){k+=String.fromCharCode((N&31)<<6|M);continue}const B=E[T++]&63;if((N&240)===224?N=(N&15)<<12|M<<6|B:N=(N&7)<<18|M<<12|B<<6|E[T++]&63,N<65536)k+=String.fromCharCode(N);else{const D=N-65536;k+=String.fromCharCode(55296|D>>10,56320|D&1023)}}return k}function p(E,T){return E?h(r.HEAPU8,E,T):""}const m={emscripten_get_now:NG,emscripten_memcpy_big:o,emscripten_resize_heap:c,fd_write:()=>0};async function _(){const T=await e({env:m,wasi_snapshot_preview1:m});t=T.memory,i(t.buffer),Object.assign(r,T),r.UTF8ToString=p}return await _(),r}var LG=Object.defineProperty,IG=(e,t,n)=>t in e?LG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ft=(e,t,n)=>IG(e,typeof t!="symbol"?t+"":t,n);let Wt=null;function DG(e){throw new V1(e.UTF8ToString(e.getLastOnigError()))}class If{constructor(t){Ft(this,"utf16Length"),Ft(this,"utf8Length"),Ft(this,"utf16Value"),Ft(this,"utf8Value"),Ft(this,"utf16OffsetToUtf8"),Ft(this,"utf8OffsetToUtf16");const n=t.length,r=If._utf8ByteLength(t),i=r!==n,o=i?new Uint32Array(n+1):null;i&&(o[n]=r);const l=i?new Uint32Array(r+1):null;i&&(l[r]=n);const c=new Uint8Array(r);let d=0;for(let h=0;h<n;h++){const p=t.charCodeAt(h);let m=p,_=!1;if(p>=55296&&p<=56319&&h+1<n){const E=t.charCodeAt(h+1);E>=56320&&E<=57343&&(m=(p-55296<<10)+65536|E-56320,_=!0)}i&&(o[h]=d,_&&(o[h+1]=d),m<=127?l[d+0]=h:m<=2047?(l[d+0]=h,l[d+1]=h):m<=65535?(l[d+0]=h,l[d+1]=h,l[d+2]=h):(l[d+0]=h,l[d+1]=h,l[d+2]=h,l[d+3]=h)),m<=127?c[d++]=m:m<=2047?(c[d++]=192|(m&1984)>>>6,c[d++]=128|(m&63)>>>0):m<=65535?(c[d++]=224|(m&61440)>>>12,c[d++]=128|(m&4032)>>>6,c[d++]=128|(m&63)>>>0):(c[d++]=240|(m&1835008)>>>18,c[d++]=128|(m&258048)>>>12,c[d++]=128|(m&4032)>>>6,c[d++]=128|(m&63)>>>0),_&&h++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=c,this.utf16OffsetToUtf8=o,this.utf8OffsetToUtf16=l}static _utf8ByteLength(t){let n=0;for(let r=0,i=t.length;r<i;r++){const o=t.charCodeAt(r);let l=o,c=!1;if(o>=55296&&o<=56319&&r+1<i){const d=t.charCodeAt(r+1);d>=56320&&d<=57343&&(l=(o-55296<<10)+65536|d-56320,c=!0)}l<=127?n+=1:l<=2047?n+=2:l<=65535?n+=3:n+=4,c&&r++}return n}createString(t){const n=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,n),n}}const Df=class Nr{constructor(t){if(Ft(this,"id",++Nr.LAST_ID),Ft(this,"_onigBinding"),Ft(this,"content"),Ft(this,"utf16Length"),Ft(this,"utf8Length"),Ft(this,"utf16OffsetToUtf8"),Ft(this,"utf8OffsetToUtf16"),Ft(this,"ptr"),!Wt)throw new V1("Must invoke loadWasm first.");this._onigBinding=Wt,this.content=t;const n=new If(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!Nr._sharedPtrInUse?(Nr._sharedPtr||(Nr._sharedPtr=Wt.omalloc(1e4)),Nr._sharedPtrInUse=!0,Wt.HEAPU8.set(n.utf8Value,Nr._sharedPtr),this.ptr=Nr._sharedPtr):this.ptr=n.createString(Wt)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===Nr._sharedPtr?Nr._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};Ft(Df,"LAST_ID",0);Ft(Df,"_sharedPtr",0);Ft(Df,"_sharedPtrInUse",!1);let aN=Df;class MG{constructor(t){if(Ft(this,"_onigBinding"),Ft(this,"_ptr"),!Wt)throw new V1("Must invoke loadWasm first.");const n=[],r=[];for(let c=0,d=t.length;c<d;c++){const h=new If(t[c]);n[c]=h.createString(Wt),r[c]=h.utf8Length}const i=Wt.omalloc(4*t.length);Wt.HEAPU32.set(n,i/4);const o=Wt.omalloc(4*t.length);Wt.HEAPU32.set(r,o/4);const l=Wt.createOnigScanner(i,o,t.length);for(let c=0,d=t.length;c<d;c++)Wt.ofree(n[c]);Wt.ofree(o),Wt.ofree(i),l===0&&DG(Wt),this._onigBinding=Wt,this._ptr=l}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,n,r){let i=0;if(typeof r=="number"&&(i=r),typeof t=="string"){t=new aN(t);const o=this._findNextMatchSync(t,n,!1,i);return t.dispose(),o}return this._findNextMatchSync(t,n,!1,i)}_findNextMatchSync(t,n,r,i){const o=this._onigBinding,l=o.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(n),i);if(l===0)return null;const c=o.HEAPU32;let d=l/4;const h=c[d++],p=c[d++],m=[];for(let _=0;_<p;_++){const E=t.convertUtf8OffsetToUtf16(c[d++]),T=t.convertUtf8OffsetToUtf16(c[d++]);m[_]={start:E,end:T,length:T-E}}return{index:h,captureIndices:m}}}function PG(e){return typeof e.instantiator=="function"}function BG(e){return typeof e.default=="function"}function jG(e){return typeof e.data<"u"}function UG(e){return typeof Response<"u"&&e instanceof Response}function HG(e){return typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<"u"&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&e instanceof Uint32Array}let rd;function G1(e){if(rd)return rd;async function t(){Wt=await OG(async n=>{let r=e;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),PG(r)?r=await r.instantiator(n):BG(r)?r=await r.default(n):(jG(r)&&(r=r.data),UG(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await zG(r)(n):r=await FG(r)(n):HG(r)?r=await Xp(r)(n):r instanceof WebAssembly.Module?r=await Xp(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await Xp(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return rd=t(),rd}function Xp(e){return t=>WebAssembly.instantiate(e,t)}function zG(e){return t=>WebAssembly.instantiateStreaming(e,t)}function FG(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}let iN;function $G(e){iN=e}function VG(){return iN}async function sN(e){return e&&await G1(e),{createScanner(t){return new MG(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new aN(t)}}}const GG=Object.freeze(Object.defineProperty({__proto__:null,createOnigurumaEngine:sN,getDefaultWasmLoader:VG,loadWasm:G1,setDefaultWasmLoader:$G},Symbol.toStringTag,{value:"Module"}));var oN=j1({});rN(oN,GG);var yt=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function qG(e){return q1(e)}function q1(e){return Array.isArray(e)?YG(e):e instanceof RegExp?e:typeof e=="object"?XG(e):e}function YG(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=q1(e[n]);return t}function XG(e){let t={};for(let n in e)t[n]=q1(e[n]);return t}function lN(e,...t){return t.forEach(n=>{for(let r in n)e[r]=n[r]}),e}function uN(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?uN(e.substring(0,e.length-1)):e.substr(~t+1)}var Qp=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,ad=class{static hasCaptures(e){return e===null?!1:(Qp.lastIndex=0,Qp.test(e))}static replaceCaptures(e,t,n){return e.replace(Qp,(r,i,o,l)=>{let c=n[parseInt(i||o,10)];if(c){let d=t.substring(c.start,c.end);for(;d[0]===".";)d=d.substring(1);switch(l){case"downcase":return d.toLowerCase();case"upcase":return d.toUpperCase();default:return d}}else return r})}};function cN(e,t){return e<t?-1:e>t?1:0}function dN(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let i=0;i<n;i++){let o=cN(e[i],t[i]);if(o!==0)return o}return 0}return n-r}function jv(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function fN(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var hN=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},zd=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(KG(e),t)}static createFromParsedTheme(e,t){return JG(e,t)}_cachedMatchRoot=new hN(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,r=this._cachedMatchRoot.get(t).find(i=>QG(e.parent,i.parentScopes));return r?new mN(r.fontStyle,r.foreground,r.background):null}},Wp=class yd{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const r of n)t=new yd(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new yd(n,t[r]);return n}push(t){return new yd(this,t)}getSegments(){let t=this;const n=[];for(;t;)n.push(t.scopeName),t=t.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){const n=[];let r=this;for(;r&&r!==t;)n.push(r.scopeName),r=r.parent;return r===t?n.reverse():void 0}};function QG(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===">"){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!WG(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function WG(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var mN=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function KG(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let i=0,o=t.length;i<o;i++){let l=t[i];if(!l.settings)continue;let c;if(typeof l.scope=="string"){let m=l.scope;m=m.replace(/^[,]+/,""),m=m.replace(/[,]+$/,""),c=m.split(",")}else Array.isArray(l.scope)?c=l.scope:c=[""];let d=-1;if(typeof l.settings.fontStyle=="string"){d=0;let m=l.settings.fontStyle.split(" ");for(let _=0,E=m.length;_<E;_++)switch(m[_]){case"italic":d=d|1;break;case"bold":d=d|2;break;case"underline":d=d|4;break;case"strikethrough":d=d|8;break}}let h=null;typeof l.settings.foreground=="string"&&jv(l.settings.foreground)&&(h=l.settings.foreground);let p=null;typeof l.settings.background=="string"&&jv(l.settings.background)&&(p=l.settings.background);for(let m=0,_=c.length;m<_;m++){let T=c[m].trim().split(" "),S=T[T.length-1],A=null;T.length>1&&(A=T.slice(0,T.length-1),A.reverse()),n[r++]=new ZG(S,A,i,d,h,p)}}return n}var ZG=class{constructor(e,t,n,r,i,o){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=o}},on=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))(on||{});function JG(e,t){e.sort((d,h)=>{let p=cN(d.scope,h.scope);return p!==0||(p=dN(d.parentScopes,h.parentScopes),p!==0)?p:d.index-h.index});let n=0,r="#000000",i="#ffffff";for(;e.length>=1&&e[0].scope==="";){let d=e.shift();d.fontStyle!==-1&&(n=d.fontStyle),d.foreground!==null&&(r=d.foreground),d.background!==null&&(i=d.background)}let o=new eq(t),l=new mN(n,o.getId(r),o.getId(i)),c=new nq(new W0(0,null,-1,0,0),[]);for(let d=0,h=e.length;d<h;d++){let p=e[d];c.insert(0,p.scope,p.parentScopes,p.fontStyle,o.getId(p.foreground),o.getId(p.background))}return new zd(o,l,c)}var eq=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},tq=Object.freeze([]),W0=class pN{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(t,n,r,i,o){this.scopeDepth=t,this.parentScopes=n||tq,this.fontStyle=r,this.foreground=i,this.background=o}clone(){return new pN(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let n=[];for(let r=0,i=t.length;r<i;r++)n[r]=t[r].clone();return n}acceptOverwrite(t,n,r,i){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),i!==0&&(this.background=i)}},nq=class K0{constructor(t,n=[],r={}){this._mainRule=t,this._children=r,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let r=0,i=0;for(;t.parentScopes[r]===">"&&r++,n.parentScopes[i]===">"&&i++,!(r>=t.parentScopes.length||i>=n.parentScopes.length);){const o=n.parentScopes[i].length-t.parentScopes[r].length;if(o!==0)return o;r++,i++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let r=t.indexOf("."),i,o;if(r===-1?(i=t,o=""):(i=t.substring(0,r),o=t.substring(r+1)),this._children.hasOwnProperty(i))return this._children[i].match(o)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(K0._cmpBySpecificity),n}insert(t,n,r,i,o,l){if(n===""){this._doInsertHere(t,r,i,o,l);return}let c=n.indexOf("."),d,h;c===-1?(d=n,h=""):(d=n.substring(0,c),h=n.substring(c+1));let p;this._children.hasOwnProperty(d)?p=this._children[d]:(p=new K0(this._mainRule.clone(),W0.cloneArr(this._rulesWithParentScopes)),this._children[d]=p),p.insert(t+1,h,r,i,o,l)}_doInsertHere(t,n,r,i,o){if(n===null){this._mainRule.acceptOverwrite(t,r,i,o);return}for(let l=0,c=this._rulesWithParentScopes.length;l<c;l++){let d=this._rulesWithParentScopes[l];if(dN(d.parentScopes,n)===0){d.acceptOverwrite(t,r,i,o);return}}r===-1&&(r=this._mainRule.fontStyle),i===0&&(i=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new W0(t,n,r,i,o))}},qi=class tr{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=tr.getLanguageId(t),r=tr.getTokenType(t),i=tr.getFontStyle(t),o=tr.getForeground(t),l=tr.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:o,background:l})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,n,r,i,o,l,c){let d=tr.getLanguageId(t),h=tr.getTokenType(t),p=tr.containsBalancedBrackets(t)?1:0,m=tr.getFontStyle(t),_=tr.getForeground(t),E=tr.getBackground(t);return n!==0&&(d=n),r!==8&&(h=r),i!==null&&(p=i?1:0),o!==-1&&(m=o),l!==0&&(_=l),c!==0&&(E=c),(d<<0|h<<8|p<<10|m<<11|_<<15|E<<24)>>>0}};function Fd(e,t){const n=[],r=rq(e);let i=r.next();for(;i!==null;){let d=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":d=1;break;case"L":d=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let h=l();if(n.push({matcher:h,priority:d}),i!==",")break;i=r.next()}return n;function o(){if(i==="-"){i=r.next();const d=o();return h=>!!d&&!d(h)}if(i==="("){i=r.next();const d=c();return i===")"&&(i=r.next()),d}if(Uv(i)){const d=[];do d.push(i),i=r.next();while(Uv(i));return h=>t(d,h)}return null}function l(){const d=[];let h=o();for(;h;)d.push(h),h=o();return p=>d.every(m=>m(p))}function c(){const d=[];let h=l();for(;h&&(d.push(h),i==="|"||i===",");){do i=r.next();while(i==="|"||i===",");h=l()}return p=>d.some(m=>m(p))}}function Uv(e){return!!e&&!!e.match(/[\w\.:]+/)}function rq(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const r=n[0];return n=t.exec(e),r}}}function gN(e){typeof e.dispose=="function"&&e.dispose()}var Zl=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},aq=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},iq=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},sq=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Zl(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new iq;for(const n of e)oq(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof Zl){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function oq(e,t,n,r){const i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const o=n.lookup(t);e instanceof Zl?_d({baseGrammar:o,selfGrammar:i},r):Z0(e.ruleName,{baseGrammar:o,selfGrammar:i,repository:i.repository},r);const l=n.injections(e.scopeName);if(l)for(const c of l)r.add(new Zl(c))}function Z0(e,t,n){if(t.repository&&t.repository[e]){const r=t.repository[e];$d([r],t,n)}}function _d(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&$d(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&$d(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function $d(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const i=r.repository?lN({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&$d(r.patterns,{...t,repository:i},n);const o=r.include;if(!o)continue;const l=bN(o);switch(l.kind){case 0:_d({...t,selfGrammar:t.baseGrammar},n);break;case 1:_d(t,n);break;case 2:Z0(l.ruleName,{...t,repository:i},n);break;case 3:case 4:const c=l.scopeName===t.selfGrammar.scopeName?t.selfGrammar:l.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(c){const d={baseGrammar:t.baseGrammar,selfGrammar:c,repository:i};l.kind===4?Z0(l.ruleName,d,n):_d(d,n)}else l.kind===4?n.add(new aq(l.scopeName,l.ruleName)):n.add(new Zl(l.scopeName));break}}}var lq=class{kind=0},uq=class{kind=1},cq=class{constructor(e){this.ruleName=e}kind=2},dq=class{constructor(e){this.scopeName=e}kind=3},fq=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function bN(e){if(e==="$base")return new lq;if(e==="$self")return new uq;const t=e.indexOf("#");if(t===-1)return new dq(e);if(t===0)return new cq(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new fq(n,r)}}var hq=/\\(\d+)/,Hv=/\\(\d+)/g,mq=-1,EN=-2;var _u=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=ad.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=ad.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${uN(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:ad.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:ad.replaceCaptures(this._contentName,e,t)}},pq=class extends _u{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,r){throw new Error("Not supported!")}},gq=class extends _u{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new Jl(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new eu,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},zv=class extends _u{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new eu,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},J0=class extends _u{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,o,l,c,d,h){super(e,t,n,r),this._begin=new Jl(i,this.id),this.beginCaptures=o,this._end=new Jl(l||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=c,this.applyEndPatternLast=d||!1,this.patterns=h.patterns,this.hasMissingPatterns=h.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new eu;for(const n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},Vd=class extends _u{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,o,l,c,d){super(e,t,n,r),this._begin=new Jl(i,this.id),this.beginCaptures=o,this.whileCaptures=c,this._while=new Jl(l,EN),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=d.patterns,this.hasMissingPatterns=d.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new eu;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new eu,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}},yN=class sn{static createCaptureRule(t,n,r,i,o){return t.registerRule(l=>new pq(n,l,r,i,o))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new gq(t.$vscodeTextmateLocation,t.id,t.name,t.match,sn._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=lN({},r,t.repository));let o=t.patterns;return typeof o>"u"&&t.include&&(o=[{include:t.include}]),new zv(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,sn._compilePatterns(o,n,r))}return t.while?new Vd(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,sn._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,sn._compileCaptures(t.whileCaptures||t.captures,n,r),sn._compilePatterns(t.patterns,n,r)):new J0(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,sn._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,sn._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,sn._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let o=0;for(const l in t){if(l==="$vscodeTextmateLocation")continue;const c=parseInt(l,10);c>o&&(o=c)}for(let l=0;l<=o;l++)i[l]=null;for(const l in t){if(l==="$vscodeTextmateLocation")continue;const c=parseInt(l,10);let d=0;t[l].patterns&&(d=sn.getCompiledRuleId(t[l],n,r)),i[c]=sn.createCaptureRule(n,t[l].$vscodeTextmateLocation,t[l].name,t[l].contentName,d)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let o=0,l=t.length;o<l;o++){const c=t[o];let d=-1;if(c.include){const h=bN(c.include);switch(h.kind){case 0:case 1:d=sn.getCompiledRuleId(r[c.include],n,r);break;case 2:let p=r[h.ruleName];p&&(d=sn.getCompiledRuleId(p,n,r));break;case 3:case 4:const m=h.scopeName,_=h.kind===4?h.ruleName:null,E=n.getExternalGrammar(m,r);if(E)if(_){let T=E.repository[_];T&&(d=sn.getCompiledRuleId(T,n,E.repository))}else d=sn.getCompiledRuleId(E.repository.$self,n,E.repository);break}}else d=sn.getCompiledRuleId(c,n,r);if(d!==-1){const h=n.getRule(d);let p=!1;if((h instanceof zv||h instanceof J0||h instanceof Vd)&&h.hasMissingPatterns&&h.patterns.length===0&&(p=!0),p)continue;i.push(d)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},Jl=class _N{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(t,n){if(t&&typeof t=="string"){const r=t.length;let i=0,o=[],l=!1;for(let c=0;c<r;c++)if(t.charAt(c)==="\\"&&c+1<r){const h=t.charAt(c+1);h==="z"?(o.push(t.substring(i,c)),o.push("$(?!\\n)(?<!\\n)"),i=c+2):(h==="A"||h==="G")&&(l=!0),c++}this.hasAnchor=l,i===0?this.source=t:(o.push(t.substring(i,r)),this.source=o.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=hq.test(this.source):this.hasBackReferences=!1}clone(){return new _N(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=n.map(i=>t.substring(i.start,i.end));return Hv.lastIndex=0,this.source.replace(Hv,(i,o)=>fN(r[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],n=[],r=[],i=[],o,l,c,d;for(o=0,l=this.source.length;o<l;o++)c=this.source.charAt(o),t[o]=c,n[o]=c,r[o]=c,i[o]=c,c==="\\"&&o+1<l&&(d=this.source.charAt(o+1),d==="A"?(t[o+1]="￿",n[o+1]="￿",r[o+1]="A",i[o+1]="A"):d==="G"?(t[o+1]="￿",n[o+1]="G",r[o+1]="￿",i[o+1]="G"):(t[o+1]=d,n[o+1]=d,r[o+1]=d,i[o+1]=d),o++);return{A0_G0:t.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:i.join("")}}resolveAnchors(t,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},eu=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(n=>n.source);this._cached=new Fv(e,t,this._items.map(n=>n.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let r=this._items.map(i=>i.resolveAnchors(t,n));return new Fv(e,r,this._items.map(i=>i.ruleId))}},Fv=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
180
+ `)}findNextMatchSync(e,t,n){const r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},Kp=class{constructor(e,t){this.languageId=e,this.tokenType=t}},bq=class eg{_defaultAttributes;_embeddedLanguagesMatcher;constructor(t,n){this._defaultAttributes=new Kp(t,8),this._embeddedLanguagesMatcher=new Eq(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?eg._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new Kp(0,0);_getBasicScopeAttributes=new hN(t=>{const n=this._scopeToLanguage(t),r=this._toStandardTokenType(t);return new Kp(n,r)});_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(eg.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},Eq=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([n,r])=>fN(n));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}},$v=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function xN(e,t,n,r,i,o,l,c){const d=t.content.length;let h=!1,p=-1;if(l){const E=yq(e,t,n,r,i,o);i=E.stack,r=E.linePos,n=E.isFirstLine,p=E.anchorPosition}const m=Date.now();for(;!h;){if(c!==0&&Date.now()-m>c)return new $v(i,!0);_()}return new $v(i,!1);function _(){const E=_q(e,t,n,r,i,p);if(!E){o.produce(i,d),h=!0;return}const T=E.captureIndices,S=E.matchedRuleId,A=T&&T.length>0?T[0].end>r:!1;if(S===mq){const C=i.getRule(e);o.produce(i,T[0].start),i=i.withContentNameScopesList(i.nameScopesList),Ml(e,t,n,i,o,C.endCaptures,T),o.produce(i,T[0].end);const k=i;if(i=i.parent,p=k.getAnchorPos(),!A&&k.getEnterPos()===r){i=k,o.produce(i,d),h=!0;return}}else{const C=e.getRule(S);o.produce(i,T[0].start);const k=i,N=C.getName(t.content,T),M=i.contentNameScopesList.pushAttributed(N,e);if(i=i.push(S,r,p,T[0].end===d,null,M,M),C instanceof J0){const B=C;Ml(e,t,n,i,o,B.beginCaptures,T),o.produce(i,T[0].end),p=T[0].end;const D=B.getContentName(t.content,T),z=M.pushAttributed(D,e);if(i=i.withContentNameScopesList(z),B.endHasBackReferences&&(i=i.withEndRule(B.getEndWithResolvedBackReferences(t.content,T))),!A&&k.hasSameRuleAs(i)){i=i.pop(),o.produce(i,d),h=!0;return}}else if(C instanceof Vd){const B=C;Ml(e,t,n,i,o,B.beginCaptures,T),o.produce(i,T[0].end),p=T[0].end;const D=B.getContentName(t.content,T),z=M.pushAttributed(D,e);if(i=i.withContentNameScopesList(z),B.whileHasBackReferences&&(i=i.withEndRule(B.getWhileWithResolvedBackReferences(t.content,T))),!A&&k.hasSameRuleAs(i)){i=i.pop(),o.produce(i,d),h=!0;return}}else if(Ml(e,t,n,i,o,C.captures,T),o.produce(i,T[0].end),i=i.pop(),!A){i=i.safePop(),o.produce(i,d),h=!0;return}}T[0].end>r&&(r=T[0].end,n=!1)}}function yq(e,t,n,r,i,o){let l=i.beginRuleCapturedEOL?0:-1;const c=[];for(let d=i;d;d=d.pop()){const h=d.getRule(e);h instanceof Vd&&c.push({rule:h,stack:d})}for(let d=c.pop();d;d=c.pop()){const{ruleScanner:h,findOptions:p}=vq(d.rule,e,d.stack.endRule,n,r===l),m=h.findNextMatchSync(t,r,p);if(m){if(m.ruleId!==EN){i=d.stack.pop();break}m.captureIndices&&m.captureIndices.length&&(o.produce(d.stack,m.captureIndices[0].start),Ml(e,t,n,d.stack,o,d.rule.whileCaptures,m.captureIndices),o.produce(d.stack,m.captureIndices[0].end),l=m.captureIndices[0].end,m.captureIndices[0].end>r&&(r=m.captureIndices[0].end,n=!1))}else{i=d.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:l,isFirstLine:n}}function _q(e,t,n,r,i,o){const l=xq(e,t,n,r,i,o),c=e.getInjections();if(c.length===0)return l;const d=Tq(c,e,t,n,r,i,o);if(!d)return l;if(!l)return d;const h=l.captureIndices[0].start,p=d.captureIndices[0].start;return p<h||d.priorityMatch&&p===h?d:l}function xq(e,t,n,r,i,o){const l=i.getRule(e),{ruleScanner:c,findOptions:d}=TN(l,e,i.endRule,n,r===o),h=c.findNextMatchSync(t,r,d);return h?{captureIndices:h.captureIndices,matchedRuleId:h.ruleId}:null}function Tq(e,t,n,r,i,o,l){let c=Number.MAX_VALUE,d=null,h,p=0;const m=o.contentNameScopesList.getScopeNames();for(let _=0,E=e.length;_<E;_++){const T=e[_];if(!T.matcher(m))continue;const S=t.getRule(T.ruleId),{ruleScanner:A,findOptions:C}=TN(S,t,null,r,i===l),k=A.findNextMatchSync(n,i,C);if(!k)continue;const N=k.captureIndices[0].start;if(!(N>=c)&&(c=N,d=k.captureIndices,h=k.ruleId,p=T.priority,c===i))break}return d?{priorityMatch:p===-1,captureIndices:d,matchedRuleId:h}:null}function TN(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function vq(e,t,n,r,i){return{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function Ml(e,t,n,r,i,o,l){if(o.length===0)return;const c=t.content,d=Math.min(o.length,l.length),h=[],p=l[0].end;for(let m=0;m<d;m++){const _=o[m];if(_===null)continue;const E=l[m];if(E.length===0)continue;if(E.start>p)break;for(;h.length>0&&h[h.length-1].endPos<=E.start;)i.produceFromScopes(h[h.length-1].scopes,h[h.length-1].endPos),h.pop();if(h.length>0?i.produceFromScopes(h[h.length-1].scopes,E.start):i.produce(r,E.start),_.retokenizeCapturedWithRuleId){const S=_.getName(c,l),A=r.contentNameScopesList.pushAttributed(S,e),C=_.getContentName(c,l),k=A.pushAttributed(C,e),N=r.push(_.retokenizeCapturedWithRuleId,E.start,-1,!1,null,A,k),M=e.createOnigString(c.substring(0,E.end));xN(e,M,n&&E.start===0,E.start,N,i,!1,0),gN(M);continue}const T=_.getName(c,l);if(T!==null){const A=(h.length>0?h[h.length-1].scopes:r.contentNameScopesList).pushAttributed(T,e);h.push(new Sq(A,E.end))}}for(;h.length>0;)i.produceFromScopes(h[h.length-1].scopes,h[h.length-1].endPos),h.pop()}var Sq=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function Aq(e,t,n,r,i,o,l,c){return new wq(e,t,n,r,i,o,l,c)}function Vv(e,t,n,r,i){const o=Fd(t,Gd),l=yN.getCompiledRuleId(n,r,i.repository);for(const c of o)e.push({debugSelector:t,matcher:c.matcher,ruleId:l,grammar:i,priority:c.priority})}function Gd(e,t){if(t.length<e.length)return!1;let n=0;return e.every(r=>{for(let i=n;i<t.length;i++)if(Cq(t[i],r))return n=i+1,!0;return!1})}function Cq(e,t){if(!e)return!1;if(e===t)return!0;const n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]==="."}var wq=class{constructor(e,t,n,r,i,o,l,c){if(this._rootScopeName=e,this.balancedBracketSelectors=o,this._onigLib=c,this._basicScopeAttributesProvider=new bq(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=l,this._grammar=Gv(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const d of Object.keys(i)){const h=Fd(d,Gd);for(const p of h)this._tokenTypeMatchers.push({matcher:p.matcher,type:i[d]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e={lookup:i=>i===this._rootScopeName?this._grammar:this.getExternalGrammar(i),injections:i=>this._grammarRepository.injections(i)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){const i=r.injections;if(i)for(let l in i)Vv(t,l,i[l],this,r);const o=this._grammarRepository.injections(n);o&&o.forEach(l=>{const c=this.getExternalGrammar(l);if(c){const d=c.injectionSelector;d&&Vv(t,d,c,this,c)}})}return t.sort((i,o)=>i.priority-o.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=Gv(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){const r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){const r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=yN.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===tg.NULL){i=!0;const h=this._basicScopeAttributesProvider.getDefaultAttributes(),p=this.themeProvider.getDefaults(),m=qi.set(0,h.languageId,h.tokenType,null,p.fontStyle,p.foregroundId,p.backgroundId),_=this.getRule(this._rootId).getName(null,null);let E;_?E=Gl.createRootAndLookUpScopeName(_,m,this):E=Gl.createRoot("unknown",m),t=new tg(null,this._rootId,-1,-1,!1,null,E,E)}else i=!1,t.reset();e=e+`
181
+ `;const o=this.createOnigString(e),l=o.content.length,c=new Nq(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),d=xN(this,o,i,0,t,c,!0,r);return gN(o),{lineLength:l,lineTokens:c,ruleStack:d.stack,stoppedEarly:d.stoppedEarly}}};function Gv(e,t){return e=qG(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var Gl=class Rr{constructor(t,n,r){this.parent=t,this.scopePath=n,this.tokenAttributes=r}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(const o of n)i=Wp.push(i,o.scopeNames),r=new Rr(r,i,o.encodedTokenAttributes);return r}static createRoot(t,n){return new Rr(null,new Wp(null,t),n)}static createRootAndLookUpScopeName(t,n,r){const i=r.getMetadataForScope(t),o=new Wp(null,t),l=r.themeProvider.themeMatch(o),c=Rr.mergeAttributes(n,i,l);return new Rr(null,o,c)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return Rr.equals(this,t)}static equals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.scopeName!==n.scopeName||t.tokenAttributes!==n.tokenAttributes)return!1;t=t.parent,n=n.parent}while(!0)}static mergeAttributes(t,n,r){let i=-1,o=0,l=0;return r!==null&&(i=r.fontStyle,o=r.foregroundId,l=r.backgroundId),qi.set(t,n.languageId,n.tokenType,null,i,o,l)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return Rr._pushAttributed(this,t,n);const r=t.split(/ /g);let i=this;for(const o of r)i=Rr._pushAttributed(i,o,n);return i}static _pushAttributed(t,n,r){const i=r.getMetadataForScope(n),o=t.scopePath.push(n),l=r.themeProvider.themeMatch(o),c=Rr.mergeAttributes(t.tokenAttributes,i,l);return new Rr(t,o,c)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){const n=[];let r=this;for(;r&&r!==t;)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(r.parent?.scopePath??null)}),r=r.parent;return r===t?n.reverse():void 0}},tg=class Bi{constructor(t,n,r,i,o,l,c,d){this.parent=t,this.ruleId=n,this.beginRuleCapturedEOL=o,this.endRule=l,this.nameScopesList=c,this.contentNameScopesList=d,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=i}_stackElementBrand=void 0;static NULL=new Bi(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:Bi._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?Gl.equals(t.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.depth!==n.depth||t.ruleId!==n.ruleId||t.endRule!==n.endRule)return!1;t=t.parent,n=n.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){Bi._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,o,l,c){return new Bi(this,t,n,r,i,o,l,c)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,n){return this.parent&&(n=this.parent._writeString(t,n)),t[n++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,n}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new Bi(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let n=this;for(;n&&n._enterPos===t._enterPos;){if(n.ruleId===t.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){const r=Gl.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new Bi(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Gl.fromExtension(r,n.contentNameScopesList))}},kq=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):Fd(n,Gd).map(r=>r.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>Fd(n,Gd).map(r=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},Nq=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let r=e?.tokenAttributes??0,i=!1;if(this.balancedBracketSelectors?.matchesAlways&&(i=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const o=e?.getScopeNames()??[];for(const l of this._tokenTypeOverrides)l.matcher(o)&&(r=qi.set(r,0,l.type,null,-1,0,0));this.balancedBracketSelectors&&(i=this.balancedBracketSelectors.match(o))}if(i&&(r=qi.set(r,0,8,i,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===r){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(r),this._lastTokenEndIndex=t;return}const n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let r=0,i=this._binaryTokens.length;r<i;r++)n[r]=this._binaryTokens[r];return n}},Rq=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let o=this._rawGrammars.get(e);if(!o)return null;this._grammars.set(e,Aq(e,o,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},Oq=class{_options;_syncRegistry;_ensureGrammarCache;constructor(t){this._options=t,this._syncRegistry=new Rq(zd.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,n){this._syncRegistry.setTheme(zd.createFromRawTheme(t,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,n,r){return this.loadGrammarWithConfiguration(t,n,{embeddedLanguages:r})}loadGrammarWithConfiguration(t,n,r){return this._loadGrammar(t,n,r.embeddedLanguages,r.tokenTypes,new kq(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,n,r,i,o){const l=new sq(this._syncRegistry,t);for(;l.Q.length>0;)l.Q.map(c=>this._loadSingleGrammar(c.scopeName)),l.processQueue();return this._grammarForScopeName(t,n,r,i,o)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const n=this._options.loadGrammar(t);if(n){const r=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(n,r)}}addGrammar(t,n=[],r=0,i=null){return this._syncRegistry.addGrammar(t,n),this._grammarForScopeName(t.scopeName,r,i)}_grammarForScopeName(t,n=0,r=null,i=null,o=null){return this._syncRegistry.grammarForScopeName(t,n,r,i,o)}},ng=tg.NULL;function qd(e,t){const n=typeof e=="string"?{}:{...e.colorReplacements},r=typeof e=="string"?e:e.name;for(const[i,o]of Object.entries(t?.colorReplacements||{}))typeof o=="string"?n[i]=o:i===r&&Object.assign(n,o);return n}function ei(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function Lq(e){return Array.isArray(e)?e:[e]}async function vN(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function Mf(e){return!e||["plaintext","txt","text","plain"].includes(e)}function SN(e){return e==="ansi"||Mf(e)}function Pf(e){return e==="none"}function AN(e){return Pf(e)}const Iq=/(\r?\n)/g;function Bf(e,t=!1){if(e.length===0)return[["",0]];const n=e.split(Iq);let r=0;const i=[];for(let o=0;o<n.length;o+=2){const l=t?n[o]+(n[o+1]||""):n[o];i.push([l,r]),r+=n[o].length,r+=n[o+1]?.length||0}return i}const qv={light:"#333333",dark:"#bbbbbb"},Yv={light:"#fffffe",dark:"#1e1e1e"},Xv="__shiki_resolved";function Y1(e){if(e?.[Xv])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||="dark",t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){const c=t.settings?t.settings.find(d=>!d.name&&!d.scope):void 0;c?.settings?.foreground&&(r=c.settings.foreground),c?.settings?.background&&(n=c.settings.background),!r&&t?.colors?.["editor.foreground"]&&(r=t.colors["editor.foreground"]),!n&&t?.colors?.["editor.background"]&&(n=t.colors["editor.background"]),r||(r=t.type==="light"?qv.light:qv.dark),n||(n=t.type==="light"?Yv.light:Yv.dark),t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0;const o=new Map;function l(c){if(o.has(c))return o.get(c);i+=1;const d=`#${i.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${d}`]?l(c):(o.set(c,d),d)}t.settings=t.settings.map(c=>{const d=c.settings?.foreground&&!c.settings.foreground.startsWith("#"),h=c.settings?.background&&!c.settings.background.startsWith("#");if(!d&&!h)return c;const p={...c,settings:{...c.settings}};if(d){const m=l(c.settings.foreground);t.colorReplacements[m]=c.settings.foreground,p.settings.foreground=m}if(h){const m=l(c.settings.background);t.colorReplacements[m]=c.settings.background,p.settings.background=m}return p});for(const c of Object.keys(t.colors||{}))if((c==="editor.foreground"||c==="editor.background"||c.startsWith("terminal.ansi"))&&!t.colors[c]?.startsWith("#")){const d=l(t.colors[c]);t.colorReplacements[d]=t.colors[c],t.colors[c]=d}return Object.defineProperty(t,Xv,{enumerable:!1,writable:!1,value:!0}),t}async function CN(e){return[...new Set((await Promise.all(e.filter(t=>!SN(t)).map(async t=>await vN(t).then(n=>Array.isArray(n)?n:[n])))).flat())]}async function wN(e){return(await Promise.all(e.map(async t=>AN(t)?null:Y1(await vN(t))))).filter(t=>!!t)}function kN(e,t){if(!t)return e;if(t[e]){const n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new yt(`Circular alias \`${[...n].join(" -> ")} -> ${e}\``);n.add(e)}}return e}var Dq=class extends Oq{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(i=>this.loadTheme(i)),this.loadLanguages(this._langs)}getTheme(e){return typeof e=="string"?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){const t=Y1(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=zd.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=kN(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;const t=new Set([...this._langMap.values()].filter(i=>i.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);const n={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);const r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(i=>{this._alias[i]=e.name}),this._loadedLanguagesCache=null,t.size)for(const i of t)this._resolvedGrammars.delete(i.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(i.scopeName),this._syncRegistry?._grammars?.delete(i.scopeName),this.loadLanguage(this._langMap.get(i.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(const r of e)this.resolveEmbeddedLanguages(r);const t=[...this._langGraph.entries()],n=t.filter(([r,i])=>!i);if(n.length){const r=t.filter(([i,o])=>o?(o.embeddedLanguages||o.embeddedLangs)?.some(l=>n.map(([c])=>c).includes(l)):!1).filter(i=>!n.includes(i));throw new yt(`Missing languages ${n.map(([i])=>`\`${i}\``).join(", ")}, required by ${r.map(([i])=>`\`${i}\``).join(", ")}`)}for(const[r,i]of t)this._resolver.addLanguage(i);for(const[r,i]of t)this.loadLanguage(i)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);const t=e.embeddedLanguages??e.embeddedLangs;if(t)for(const n of t)this._langGraph.set(n,this._langMap.get(n))}},Mq=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:n=>e.createScanner(n),createOnigString:n=>e.createString(n)},t.forEach(n=>this.addLanguage(n))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){const t=e.split(".");let n=[];for(let r=1;r<=t.length;r++){const i=t.slice(0,r).join(".");n=[...n,...this._injections.get(i)||[]]}return n}};let Nl=0;function Pq(e){Nl+=1,e.warnings!==!1&&Nl>=10&&Nl%10===0&&console.warn(`[Shiki] ${Nl} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new yt("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(Y1),i=new Dq(new Mq(e.engine,n),r,n,e.langAlias);let o;function l(k){return kN(k,e.langAlias)}function c(k){A();const N=i.getGrammar(typeof k=="string"?k:k.name);if(!N)throw new yt(`Language \`${k}\` not found, you may need to load it first`);return N}function d(k){if(k==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};A();const N=i.getTheme(k);if(!N)throw new yt(`Theme \`${k}\` not found, you may need to load it first`);return N}function h(k){A();const N=d(k);return o!==k&&(i.setTheme(N),o=k),{theme:N,colorMap:i.getColorMap()}}function p(){return A(),i.getLoadedThemes()}function m(){return A(),i.getLoadedLanguages()}function _(...k){A(),i.loadLanguages(k.flat(1))}async function E(...k){return _(await CN(k))}function T(...k){A();for(const N of k.flat(1))i.loadTheme(N)}async function S(...k){return A(),T(await wN(k))}function A(){if(t)throw new yt("Shiki instance has been disposed")}function C(){t||(t=!0,i.dispose(),Nl-=1)}return{setTheme:h,getTheme:d,getLanguage:c,getLoadedThemes:p,getLoadedLanguages:m,resolveLangAlias:l,loadLanguage:E,loadLanguageSync:_,loadTheme:S,loadThemeSync:T,dispose:C,[Symbol.dispose]:C}}async function Bq(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,r]=await Promise.all([wN(e.themes||[]),CN(e.langs||[]),e.engine]);return Pq({...e,themes:t,langs:n,engine:r})}const NN=new WeakMap;function jf(e,t){NN.set(e,t)}function tu(e){return NN.get(e)}var Uf=class RN{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new RN(Object.fromEntries(Lq(n).map(r=>[r,ng])),t)}constructor(...t){if(t.length===2){const[n,r]=t;this.lang=r,this._stacks=n}else{const[n,r,i]=t;this.lang=r,this._stacks={[i]:n}}}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return jq(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function jq(e){const t=[],n=new Set;function r(i){if(n.has(i))return;n.add(i);const o=i?.nameScopesList?.scopeName;o&&t.push(o),i.parent&&r(i.parent)}return r(e),t}function Uq(e,t){if(!(e instanceof Uf))throw new yt("Invalid grammar state");return e.getInternalStack(t)}const Hq=/,/,zq=/ /;function ON(e,t,n={}){const{theme:r=e.getLoadedThemes()[0]}=n;if(Mf(e.resolveLangAlias(n.lang||"text"))||Pf(r))return Bf(t).map(c=>[{content:c[0],offset:c[1]}]);const{theme:i,colorMap:o}=e.setTheme(r),l=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==l.name)throw new yt(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${l.name}"`);if(!n.grammarState.themes.includes(i.name))throw new yt(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return $q(t,l,i,o,n)}function Fq(...e){if(e.length===2)return tu(e[1]);const[t,n,r={}]=e,{lang:i="text",theme:o=t.getLoadedThemes()[0]}=r;if(Mf(i)||Pf(o))throw new yt("Plain language does not have grammar state");if(i==="ansi")throw new yt("ANSI language does not have grammar state");const{theme:l,colorMap:c}=t.setTheme(o),d=t.getLanguage(i);return new Uf(X1(n,d,l,c,r).stateStack,d.name,l.name)}function $q(e,t,n,r,i){const o=X1(e,t,n,r,i),l=new Uf(o.stateStack,t.name,n.name);return jf(o.tokens,l),o.tokens}function X1(e,t,n,r,i){const o=qd(n,i),{tokenizeMaxLineLength:l=0,tokenizeTimeLimit:c=500,includeExplanation:d=!1}=i,h=Bf(e);let p=i.grammarState?Uq(i.grammarState,n.name)??ng:i.grammarContextCode!=null?X1(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack:ng,m=[];const _=[];for(let E=0,T=h.length;E<T;E++){const[S,A]=h[E];if(S===""){m=[],_.push([]);continue}if(l>0&&S.length>=l){m=[],_.push([{content:S,offset:A,color:"",fontStyle:0}]);continue}let C,k,N;d&&d!=="tokenType"&&(C=t.tokenizeLine(S,p,c),k=C.tokens,N=0);const M=t.tokenizeLine2(S,p,c),B=M.tokens.length/2;for(let D=0;D<B;D++){const z=M.tokens[2*D],G=D+1<B?M.tokens[2*D+2]:S.length;if(z===G)continue;const ie=M.tokens[2*D+1],V=ei(r[qi.getForeground(ie)],o),X=qi.getFontStyle(ie),J={content:S.substring(z,G),offset:A+z,color:V,fontStyle:X};if(d==="tokenType")J.type=qi.getTokenType(ie);else if(d){const he=[];if(d!=="scopeName")for(const re of n.settings){let U;switch(typeof re.scope){case"string":U=re.scope.split(Hq).map(ee=>ee.trim());break;case"object":U=re.scope;break;default:continue}he.push({settings:re,selectors:U.map(ee=>ee.split(zq))})}J.explanation=[];let ue=0;for(;z+ue<G;){const re=k[N],U=S.substring(re.startIndex,re.endIndex);ue+=U.length,J.explanation.push({content:U,scopes:d==="scopeName"?Vq(re.scopes):Gq(he,re.scopes)}),N+=1}}m.push(J)}_.push(m),m=[],p=M.ruleStack}return{tokens:_,stateStack:p}}function Vq(e){return e.map(t=>({scopeName:t}))}function Gq(e,t){const n=[];for(let r=0,i=t.length;r<i;r++){const o=t[r];n[r]={scopeName:o,themeMatches:Yq(e,o,t.slice(0,r))}}return n}function Qv(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function qq(e,t,n){if(!Qv(e.at(-1),t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)Qv(e[r],n[i])&&(r-=1),i-=1;return r===-1}function Yq(e,t,n){const r=[];for(const{selectors:i,settings:o}of e)for(const l of i)if(qq(l,t,n)){r.push(o);break}return r}function LN(e,t,n,r=ON){const i=Object.entries(n.themes).filter(h=>h[1]).map(h=>({color:h[0],theme:h[1]})),o=i.map(h=>{const p=r(e,t,{...n,theme:h.theme});return{tokens:p,state:tu(p),theme:typeof h.theme=="string"?h.theme:h.theme.name}}),l=Xq(...o.map(h=>h.tokens)),c=l[0].map((h,p)=>h.map((m,_)=>{const E={content:m.content,variants:{},offset:m.offset};return"includeExplanation"in n&&n.includeExplanation&&(E.explanation=m.explanation),l.forEach((T,S)=>{const{content:A,explanation:C,offset:k,...N}=T[p][_];E.variants[i[S].color]=N}),E})),d=o[0].state?new Uf(Object.fromEntries(o.map(h=>[h.theme,h.state?.getInternalStack(h.theme)])),o[0].state.lang):void 0;return d&&jf(c,d),c}function Xq(...e){const t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){const i=e.map(d=>d[r]),o=t.map(()=>[]);t.forEach((d,h)=>d.push(o[h]));const l=i.map(()=>0),c=i.map(d=>d[0]);for(;c.every(d=>d);){const d=Math.min(...c.map(h=>h.content.length));for(let h=0;h<n;h++){const p=c[h];p.content.length===d?(o[h].push(p),l[h]+=1,c[h]=i[h][l[h]]):(o[h].push({...p,content:p.content.slice(0,d)}),c[h]={...p,content:p.content.slice(d),offset:p.offset+d})}}}return t}const Qq=/["&'<>`]/g,Wq=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Kq=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Zq=/[|\\{}()[\]^$+*?.]/g,Wv=new WeakMap;function Jq(e,t){if(e=e.replace(t.subset?eY(t.subset):Qq,r),t.subset||t.escapeOnly)return e;return e.replace(Wq,n).replace(Kq,r);function n(i,o,l){return t.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,l.charCodeAt(o+2),t)}function r(i,o,l){return t.format(i.charCodeAt(0),l.charCodeAt(o+1),t)}}function eY(e){let t=Wv.get(e);return t||(t=tY(e),Wv.set(e,t)),t}function tY(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(Zq,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const nY=/[\dA-Fa-f]/;function rY(e,t,n){const r="&#x"+e.toString(16).toUpperCase();return n&&t&&!nY.test(String.fromCharCode(t))?r:r+";"}const aY=/\d/;function iY(e,t,n){const r="&#"+String(e);return n&&t&&!aY.test(String.fromCharCode(t))?r:r+";"}const sY=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],Zp={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},oY=["cent","copy","divide","gt","lt","not","para","times"],IN={}.hasOwnProperty,rg={};let id;for(id in Zp)IN.call(Zp,id)&&(rg[Zp[id]]=id);const lY=/[^\dA-Za-z]/;function uY(e,t,n,r){const i=String.fromCharCode(e);if(IN.call(rg,i)){const o=rg[i],l="&"+o;return n&&sY.includes(o)&&!oY.includes(o)&&(!r||t&&t!==61&&lY.test(String.fromCharCode(t)))?l:l+";"}return""}function cY(e,t,n){let r=rY(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=uY(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){const o=iY(e,t,n.omitOptionalSemicolons);o.length<r.length&&(r=o)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function oo(e,t){return Jq(e,Object.assign({format:cY},t))}const dY=/^>|^->|<!--|-->|--!>|<!-$/g,fY=[">"],hY=["<",">"];function mY(e,t,n,r){return r.settings.bogusComments?"<?"+oo(e.value,Object.assign({},r.settings.characterReferences,{subset:fY}))+">":"<!--"+e.value.replace(dY,i)+"-->";function i(o){return oo(o,Object.assign({},r.settings.characterReferences,{subset:hY}))}}function pY(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}const Gt=MN(1),DN=MN(-1),gY=[];function MN(e){return t;function t(n,r,i){const o=n?n.children:gY;let l=(r||0)+e,c=o[l];if(!i)for(;c&&kf(c);)l+=e,c=o[l];return c}}const bY={}.hasOwnProperty;function PN(e){return t;function t(n,r,i){return bY.call(e,n.tagName)&&e[n.tagName](n,r,i)}}const Q1=PN({body:yY,caption:Jp,colgroup:Jp,dd:vY,dt:TY,head:Jp,html:EY,li:xY,optgroup:SY,option:AY,p:_Y,rp:Kv,rt:Kv,tbody:wY,td:Zv,tfoot:kY,th:Zv,thead:CY,tr:NY});function Jp(e,t,n){const r=Gt(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&kf(r.value.charAt(0)))}function EY(e,t,n){const r=Gt(n,t);return!r||r.type!=="comment"}function yY(e,t,n){const r=Gt(n,t);return!r||r.type!=="comment"}function _Y(e,t,n){const r=Gt(n,t);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function xY(e,t,n){const r=Gt(n,t);return!r||r.type==="element"&&r.tagName==="li"}function TY(e,t,n){const r=Gt(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function vY(e,t,n){const r=Gt(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function Kv(e,t,n){const r=Gt(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function SY(e,t,n){const r=Gt(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function AY(e,t,n){const r=Gt(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function CY(e,t,n){const r=Gt(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function wY(e,t,n){const r=Gt(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function kY(e,t,n){return!Gt(n,t)}function NY(e,t,n){const r=Gt(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function Zv(e,t,n){const r=Gt(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const RY=PN({body:IY,colgroup:DY,head:LY,html:OY,tbody:MY});function OY(e){const t=Gt(e,-1);return!t||t.type!=="comment"}function LY(e){const t=new Set;for(const r of e.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(t.has(r.tagName))return!1;t.add(r.tagName)}const n=e.children[0];return!n||n.type==="element"}function IY(e){const t=Gt(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&kf(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function DY(e,t,n){const r=DN(n,t),i=Gt(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&Q1(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function MY(e,t,n){const r=DN(n,t),i=Gt(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&Q1(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const sd={name:[[`
182
+ \f\r &/=>`.split(""),`
183
+ \f\r "&'/=>\``.split("")],[`\0
184
+ \f\r "&'/<=>`.split(""),`\0
185
+ \f\r "&'/<=>\``.split("")]],unquoted:[[`
186
+ \f\r &>`.split(""),`\0
187
+ \f\r "&'<=>\``.split("")],[`\0
188
+ \f\r "&'<=>\``.split(""),`\0
189
+ \f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function PY(e,t,n,r){const i=r.schema,o=i.space==="svg"?!1:r.settings.omitOptionalTags;let l=i.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase());const c=[];let d;i.space==="html"&&e.tagName==="svg"&&(r.schema=jr);const h=BY(r,e.properties),p=r.all(i.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=i,p&&(l=!1),(h||!o||!RY(e,t,n))&&(c.push("<",e.tagName,h?" "+h:""),l&&(i.space==="svg"||r.settings.closeSelfClosing)&&(d=h.charAt(h.length-1),(!r.settings.tightSelfClosing||d==="/"||d&&d!=='"'&&d!=="'")&&c.push(" "),c.push("/")),c.push(">")),c.push(p),!l&&(!o||!Q1(e,t,n))&&c.push("</"+e.tagName+">"),c.join("")}function BY(e,t){const n=[];let r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){const o=jY(e,i,t[i]);o&&n.push(o)}}for(;++r<n.length;){const o=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&o!=='"'&&o!=="'"&&(n[r]+=" ")}return n.join("")}function jY(e,t,n){const r=hu(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,o=e.settings.allowDangerousCharacters?0:1;let l=e.quote,c;if(r.overloadedBoolean&&(n===r.attribute||n==="")?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!="string"||n===r.attribute||n==="")&&(n=!!n),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";const d=oo(r.attribute,Object.assign({},e.settings.characterReferences,{subset:sd.name[i][o]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?Kg:Zg)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?d:(e.settings.preferUnquoted&&(c=oo(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:sd.unquoted[i][o]}))),c!==n&&(e.settings.quoteSmart&&Md(n,l)>Md(n,e.alternative)&&(l=e.alternative),c=l+oo(n,Object.assign({},e.settings.characterReferences,{subset:(l==="'"?sd.single:sd.double)[i][o],attribute:!0}))+l),d+(c&&"="+c))}const UY=["<","&"];function BN(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:oo(e.value,Object.assign({},r.settings.characterReferences,{subset:UY}))}function HY(e,t,n,r){return r.settings.allowDangerousHtml?e.value:BN(e,t,n,r)}function zY(e,t,n,r){return r.all(e)}const FY=e1("type",{invalid:$Y,unknown:VY,handlers:{comment:mY,doctype:pY,element:PY,raw:HY,root:zY,text:BN}});function $Y(e){throw new Error("Expected node, not `"+e+"`")}function VY(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const GY={},qY={},YY=[];function XY(e,t){const n=t||GY,r=n.quote||'"',i=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:QY,all:WY,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||vC,characterReferences:n.characterReferences||qY,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?jr:Eo,quote:r,alternative:i}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function QY(e,t,n){return FY(e,t,n,this)}function WY(e){const t=[],n=e&&e.children||YY;let r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}const Jv=/\s+/g;function jN(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class=="string"&&(e.properties.class=e.properties.class.split(Jv)),Array.isArray(e.properties.class)||(e.properties.class=[]);const n=Array.isArray(t)?t:t.split(Jv);for(const r of n)r&&!e.properties.class.includes(r)&&e.properties.class.push(r);return e}const KY=/:?lang=["']([^"']+)["']/g,ZY=/(?:```|~~~)([\w-]+)/g,JY=/\\begin\{([\w-]+)\}/g,eX=/<script\s+(?:type|lang)=["']([^"']+)["']/gi;function tX(e){const t=Bf(e,!0).map(([i])=>i);function n(i){if(i===e.length)return{line:t.length-1,character:t.at(-1).length};let o=i,l=0;for(const c of t){if(o<c.length)break;o-=c.length,l++}return{line:l,character:o}}function r(i,o){let l=0;for(let c=0;c<i;c++)l+=t[c].length;return l+=o,l}return{lines:t,indexToPos:n,posToIndex:r}}function nX(e,t,n){const r=new Set;for(const o of e.matchAll(KY)){const l=o[1].toLowerCase().trim();l&&r.add(l)}for(const o of e.matchAll(ZY)){const l=o[1].toLowerCase().trim();l&&r.add(l)}for(const o of e.matchAll(JY)){const l=o[1].toLowerCase().trim();l&&r.add(l)}for(const o of e.matchAll(eX)){const l=o[1].toLowerCase().trim(),c=l.includes("/")?l.split("/").pop():l;c&&r.add(c)}if(!n)return[...r];const i=n.getBundledLanguages();return[...r].filter(o=>o&&i[o])}const rX=["color","background-color"];function aX(e,t){let n=0;const r=[];for(const i of t)i>n&&r.push({...e,content:e.content.slice(n,i),offset:e.offset+n}),n=i;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function iX(e,t){const n=[...t instanceof Set?t:new Set(t)].sort((r,i)=>r-i);return n.length?e.map(r=>r.flatMap(i=>{const o=n.filter(l=>i.offset<l&&l<i.offset+i.content.length).map(l=>l-i.offset).sort((l,c)=>l-c);return o.length?aX(i,o):i})):e}function sX(e,t,n,r,i="css-vars"){const o={content:e.content,explanation:e.explanation,offset:e.offset},l=t.map(p=>Yd(e.variants[p])),c=new Set(l.flatMap(p=>Object.keys(p))),d={},h=(p,m)=>{const _=m==="color"?"":m==="background-color"?"-bg":`-${m}`;return n+t[p]+(m==="color"?"":_)};return l.forEach((p,m)=>{for(const _ of c){const E=p[_]||"inherit";if(m===0&&r&&rX.includes(_))if(r==="light-dark()"&&l.length>1){const T=t.findIndex(A=>A==="light"),S=t.findIndex(A=>A==="dark");if(T===-1||S===-1)throw new yt('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');d[_]=`light-dark(${l[T][_]||"inherit"}, ${l[S][_]||"inherit"})`,i==="css-vars"&&(d[h(m,_)]=E)}else d[_]=E;else i==="css-vars"&&(d[h(m,_)]=E)}}),o.htmlStyle=d,o}function Yd(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&on.Italic&&(t["font-style"]="italic"),e.fontStyle&on.Bold&&(t["font-weight"]="bold");const n=[];e.fontStyle&on.Underline&&n.push("underline"),e.fontStyle&on.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function ag(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}function oX(){const e=new WeakMap;function t(n){if(!e.has(n.meta)){let i=function(l){if(typeof l=="number"){if(l<0||l>n.source.length)throw new yt(`Invalid decoration offset: ${l}. Code length: ${n.source.length}`);return{...r.indexToPos(l),offset:l}}else{const c=r.lines[l.line];if(c===void 0)throw new yt(`Invalid decoration position ${JSON.stringify(l)}. Lines length: ${r.lines.length}`);let d=l.character;if(d<0&&(d=c.length+d),d<0||d>c.length)throw new yt(`Invalid decoration position ${JSON.stringify(l)}. Line ${l.line} length: ${c.length}`);return{...l,character:d,offset:r.posToIndex(l.line,d)}}};const r=tX(n.source),o=(n.options.decorations||[]).map(l=>({...l,start:i(l.start),end:i(l.end)}));lX(o),e.set(n.meta,{decorations:o,converter:r,source:n.source})}return e.get(n.meta)}return{name:"shiki:decorations",tokens(n){if(this.options.decorations?.length)return iX(n,t(this).decorations.flatMap(r=>[r.start.offset,r.end.offset]))},code(n){if(!this.options.decorations?.length)return;const r=t(this),i=[...n.children].filter(p=>p.type==="element"&&p.tagName==="span");if(i.length!==r.converter.lines.length)throw new yt(`Number of lines in code element (${i.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);function o(p,m,_,E){const T=i[p];let S="",A=-1,C=-1;if(m===0&&(A=0),_===0&&(C=0),_===Number.POSITIVE_INFINITY&&(C=T.children.length),A===-1||C===-1)for(let N=0;N<T.children.length;N++)S+=UN(T.children[N]),A===-1&&S.length===m&&(A=N+1),C===-1&&S.length===_&&(C=N+1);if(A===-1)throw new yt(`Failed to find start index for decoration ${JSON.stringify(E.start)}`);if(C===-1)throw new yt(`Failed to find end index for decoration ${JSON.stringify(E.end)}`);const k=T.children.slice(A,C);if(!E.alwaysWrap&&k.length===T.children.length)c(T,E,"line");else if(!E.alwaysWrap&&k.length===1&&k[0].type==="element")c(k[0],E,"token");else{const N={type:"element",tagName:"span",properties:{},children:k};c(N,E,"wrapper"),T.children.splice(A,k.length,N)}}function l(p,m){i[p]=c(i[p],m,"line")}function c(p,m,_){const E=m.properties||{},T=m.transform||(S=>S);return p.tagName=m.tagName||"span",p.properties={...p.properties,...E,class:p.properties.class},m.properties?.class&&jN(p,m.properties.class),p=T(p,_)||p,p}const d=[],h=r.decorations.sort((p,m)=>m.start.offset-p.start.offset||p.end.offset-m.end.offset);for(const p of h){const{start:m,end:_}=p;if(m.line===_.line)o(m.line,m.character,_.character,p);else if(m.line<_.line){o(m.line,m.character,Number.POSITIVE_INFINITY,p);for(let E=m.line+1;E<_.line;E++)d.unshift(()=>l(E,p));o(_.line,0,_.character,p)}}d.forEach(p=>p())}}}function lX(e){for(let t=0;t<e.length;t++){const n=e[t];if(n.start.offset>n.end.offset)throw new yt(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){const i=e[r],o=n.start.offset<=i.start.offset&&i.start.offset<n.end.offset,l=n.start.offset<i.end.offset&&i.end.offset<=n.end.offset,c=i.start.offset<=n.start.offset&&n.start.offset<i.end.offset,d=i.start.offset<n.end.offset&&n.end.offset<=i.end.offset;if(o||l||c||d){if(o&&l||c&&d||c&&n.start.offset===n.end.offset||l&&i.start.offset===i.end.offset)continue;throw new yt(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(i.start)} intersect.`)}}}}function UN(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(UN).join(""):""}const uX=[oX()];function Xd(e){const t=cX(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...uX]}function cX(e){const t=[],n=[],r=[];for(const i of e)switch(i.enforce){case"pre":t.push(i);break;case"post":n.push(i);break;default:r.push(i)}return{pre:t,post:n,normal:r}}var Fi=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],e0={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function dX(e,t){const n=e.indexOf("\x1B",t);if(n!==-1&&e[n+1]==="["){const r=e.indexOf("m",n);if(r!==-1)return{sequence:e.substring(n+2,r).split(";"),startPosition:n,position:r+1}}return{position:e.length}}function e2(e){const t=e.shift();if(t==="2"){const n=e.splice(0,3).map(r=>Number.parseInt(r));return n.length!==3||n.some(r=>Number.isNaN(r))?void 0:{type:"rgb",rgb:n}}else if(t==="5"){const n=e.shift();if(n)return{type:"table",index:Number(n)}}}function fX(e){const t=[];for(;e.length>0;){const n=e.shift();if(!n)continue;const r=Number.parseInt(n);if(!Number.isNaN(r))if(r===0)t.push({type:"resetAll"});else if(r<=9)e0[r]&&t.push({type:"setDecoration",value:e0[r]});else if(r<=29){const i=e0[r-20];i&&(t.push({type:"resetDecoration",value:i}),i==="dim"&&t.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)t.push({type:"setForegroundColor",value:{type:"named",name:Fi[r-30]}});else if(r===38){const i=e2(e);i&&t.push({type:"setForegroundColor",value:i})}else if(r===39)t.push({type:"resetForegroundColor"});else if(r<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:Fi[r-40]}});else if(r===48){const i=e2(e);i&&t.push({type:"setBackgroundColor",value:i})}else r===49?t.push({type:"resetBackgroundColor"}):r===53?t.push({type:"setDecoration",value:"overline"}):r===55?t.push({type:"resetDecoration",value:"overline"}):r>=90&&r<=97?t.push({type:"setForegroundColor",value:{type:"named",name:Fi[r-90+8]}}):r>=100&&r<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:Fi[r-100+8]}})}return t}function hX(){let e=null,t=null,n=new Set;return{parse(r){const i=[];let o=0;do{const l=dX(r,o),c=l.sequence?r.substring(o,l.startPosition):r.substring(o);if(c.length>0&&i.push({value:c,foreground:e,background:t,decorations:new Set(n)}),l.sequence){const d=fX(l.sequence);for(const h of d)h.type==="resetAll"?(e=null,t=null,n.clear()):h.type==="resetForegroundColor"?e=null:h.type==="resetBackgroundColor"?t=null:h.type==="resetDecoration"&&n.delete(h.value);for(const h of d)h.type==="setForegroundColor"?e=h.value:h.type==="setBackgroundColor"?t=h.value:h.type==="setDecoration"&&n.add(h.value)}o=l.position}while(o<r.length);return i}}}var mX={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function pX(e=mX){function t(c){return e[c]}function n(c){return`#${c.map(d=>Math.max(0,Math.min(d,255)).toString(16).padStart(2,"0")).join("")}`}let r;function i(){if(r)return r;r=[];for(let h=0;h<Fi.length;h++)r.push(t(Fi[h]));let c=[0,95,135,175,215,255];for(let h=0;h<6;h++)for(let p=0;p<6;p++)for(let m=0;m<6;m++)r.push(n([c[h],c[p],c[m]]));let d=8;for(let h=0;h<24;h++,d+=10)r.push(n([d,d,d]));return r}function o(c){return i()[c]}function l(c){switch(c.type){case"named":return t(c.name);case"rgb":return n(c.rgb);case"table":return o(c.index)}}return{value:l}}const gX=/#([0-9a-f]{3,8})/i,bX=/var\((--[\w-]+-ansi-[\w-]+)\)/,EX={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function yX(e,t,n){const r=qd(e,n),i=Bf(t),o=pX(Object.fromEntries(Fi.map(c=>{const d=`terminal.ansi${c[0].toUpperCase()}${c.substring(1)}`;return[c,e.colors?.[d]||EX[c]]}))),l=hX();return i.map(c=>l.parse(c[0]).map(d=>{let h,p;d.decorations.has("reverse")?(h=d.background?o.value(d.background):e.bg,p=d.foreground?o.value(d.foreground):e.fg):(h=d.foreground?o.value(d.foreground):e.fg,p=d.background?o.value(d.background):void 0),h=ei(h,r),p=ei(p,r),d.decorations.has("dim")&&(h=_X(h));let m=on.None;return d.decorations.has("bold")&&(m|=on.Bold),d.decorations.has("italic")&&(m|=on.Italic),d.decorations.has("underline")&&(m|=on.Underline),d.decorations.has("strikethrough")&&(m|=on.Strikethrough),{content:d.value,offset:c[1],color:h,bgColor:p,fontStyle:m}}))}function _X(e){const t=e.match(gX);if(t){const r=t[1];if(r.length===8){const i=Math.round(Number.parseInt(r.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${r.slice(0,6)}${i}`}else{if(r.length===6)return`#${r}80`;if(r.length===4){const i=r[0],o=r[1],l=r[2],c=r[3];return`#${i}${i}${o}${o}${l}${l}${Math.round(Number.parseInt(`${c}${c}`,16)/2).toString(16).padStart(2,"0")}`}else if(r.length===3){const i=r[0],o=r[1],l=r[2];return`#${i}${i}${o}${o}${l}${l}80`}}}const n=e.match(bX);return n?`var(${n[1]}-dim)`:e}function ig(e,t,n={}){const r=e.resolveLangAlias(n.lang||"text"),{theme:i=e.getLoadedThemes()[0]}=n;if(!Mf(r)&&!Pf(i)&&r==="ansi"){const{theme:o}=e.setTheme(i);return yX(o,t,n)}return ON(e,t,n)}function Qd(e,t,n){let r,i,o,l,c,d;if("themes"in n){const{defaultColor:h="light",cssVariablePrefix:p="--shiki-",colorsRendering:m="css-vars"}=n,_=Object.entries(n.themes).filter(C=>C[1]).map(C=>({color:C[0],theme:C[1]})).sort((C,k)=>C.color===h?-1:k.color===h?1:0);if(_.length===0)throw new yt("`themes` option must not be empty");const E=LN(e,t,n,ig);if(d=tu(E),h&&h!=="light-dark()"&&!_.some(C=>C.color===h))throw new yt(`\`themes\` option must contain the defaultColor key \`${h}\``);const T=_.map(C=>e.getTheme(C.theme)),S=_.map(C=>C.color);o=E.map(C=>C.map(k=>sX(k,S,p,h,m))),d&&jf(o,d);const A=_.map(C=>qd(C.theme,n));i=t2(_,T,A,p,h,"fg",m),r=t2(_,T,A,p,h,"bg",m),l=`shiki-themes ${T.map(C=>C.name).join(" ")}`,c=h?void 0:[i,r].join(";")}else if("theme"in n){const h=qd(n.theme,n);o=ig(e,t,n);const p=e.getTheme(n.theme);r=ei(p.bg,h),i=ei(p.fg,h),l=p.name,d=tu(o)}else throw new yt("Invalid options, either `theme` or `themes` must be provided");return{tokens:o,fg:i,bg:r,themeName:l,rootStyle:c,grammarState:d}}function t2(e,t,n,r,i,o,l){return e.map((c,d)=>{const h=ei(t[d][o],n[d])||"inherit",p=`${r+c.color}${o==="bg"?"-bg":""}:${h}`;if(d===0&&i){if(i==="light-dark()"&&e.length>1){const m=e.findIndex(E=>E.color==="light"),_=e.findIndex(E=>E.color==="dark");if(m===-1||_===-1)throw new yt('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${ei(t[m][o],n[m])||"inherit"}, ${ei(t[_][o],n[_])||"inherit"});${p}`}return h}return l==="css-vars"?p:null}).filter(c=>!!c).join(";")}const HN=/^\s+$/,xX=/^(\s*)(.*?)(\s*)$/;function Wd(e,t,n,r={meta:{},options:n,codeToHast:(i,o)=>Wd(e,i,o),codeToTokens:(i,o)=>Qd(e,i,o)}){let i=t;for(const T of Xd(n))i=T.preprocess?.call(r,i,n)||i;let{tokens:o,fg:l,bg:c,themeName:d,rootStyle:h,grammarState:p}=Qd(e,i,n);const{mergeWhitespaces:m=!0,mergeSameStyleTokens:_=!1}=n;m===!0?o=vX(o):m==="never"&&(o=SX(o)),_&&(o=AX(o));const E={...r,get source(){return i}};for(const T of Xd(n))o=T.tokens?.call(E,o)||o;return TX(o,{...n,fg:l,bg:c,themeName:d,rootStyle:n.rootStyle===!1?!1:n.rootStyle??h},E,p)}function TX(e,t,n,r=tu(e)){const i=Xd(t),o=[],l={type:"root",children:[]},{structure:c="classic",tabindex:d="0"}=t,h={class:`shiki ${t.themeName||""}`};t.rootStyle!==!1&&(t.rootStyle!=null?h.style=t.rootStyle:h.style=`background-color:${t.bg};color:${t.fg}`),d!==!1&&d!=null&&(h.tabindex=d.toString());for(const[S,A]of Object.entries(t.meta||{}))S.startsWith("_")||(h[S]=A);let p={type:"element",tagName:"pre",properties:h,children:[],data:t.data},m={type:"element",tagName:"code",properties:{},children:o};const _=[],E={...n,structure:c,addClassToHast:jN,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return l},get pre(){return p},get code(){return m},get lines(){return _}};if(e.forEach((S,A)=>{A&&(c==="inline"?l.children.push({type:"element",tagName:"br",properties:{},children:[]}):c==="classic"&&o.push({type:"text",value:`
190
+ `}));let C={type:"element",tagName:"span",properties:{class:"line"},children:[]},k=0;for(const N of S){let M={type:"element",tagName:"span",properties:{...N.htmlAttrs},children:[{type:"text",value:N.content}]};const B=ag(N.htmlStyle||Yd(N));B&&(M.properties.style=B);for(const D of i)M=D?.span?.call(E,M,A+1,k,C,N)||M;c==="inline"?l.children.push(M):c==="classic"&&C.children.push(M),k+=N.content.length}if(c==="classic"){for(const N of i)C=N?.line?.call(E,C,A+1)||C;_.push(C),o.push(C)}else c==="inline"&&_.push(C)}),c==="classic"){for(const S of i)m=S?.code?.call(E,m)||m;p.children.push(m);for(const S of i)p=S?.pre?.call(E,p)||p;l.children.push(p)}else if(c==="inline"){const S=[];let A={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const k of l.children)k.type==="element"&&k.tagName==="br"?(S.push(A),A={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(k.type==="element"||k.type==="text")&&A.children.push(k);S.push(A);let C={type:"element",tagName:"code",properties:{},children:S};for(const k of i)C=k?.code?.call(E,C)||C;l.children=[];for(let k=0;k<C.children.length;k++){k>0&&l.children.push({type:"element",tagName:"br",properties:{},children:[]});const N=C.children[k];N.type==="element"&&l.children.push(...N.children)}}let T=l;for(const S of i)T=S?.root?.call(E,T)||T;return r&&jf(T,r),T}function vX(e){return e.map(t=>{const n=[];let r="",i;return t.forEach((o,l)=>{const c=!(o.fontStyle&&(o.fontStyle&on.Underline||o.fontStyle&on.Strikethrough));c&&HN.test(o.content)&&t[l+1]?(i===void 0&&(i=o.offset),r+=o.content):r?(c?n.push({...o,offset:i,content:r+o.content}):n.push({content:r,offset:i},o),i=void 0,r=""):n.push(o)}),n})}function SX(e){return e.map(t=>t.flatMap(n=>{if(HN.test(n.content))return n;const r=n.content.match(xX);if(!r)return n;const[,i,o,l]=r;if(!i&&!l)return n;const c=[{...n,offset:n.offset+i.length,content:o}];return i&&c.unshift({content:i,offset:n.offset}),l&&c.push({content:l,offset:n.offset+i.length+o.length}),c}))}function AX(e){return e.map(t=>{const n=[];for(const r of t){if(n.length===0){n.push({...r});continue}const i=n.at(-1),o=ag(i.htmlStyle||Yd(i)),l=ag(r.htmlStyle||Yd(r)),c=i.fontStyle&&(i.fontStyle&on.Underline||i.fontStyle&on.Strikethrough),d=r.fontStyle&&(r.fontStyle&on.Underline||r.fontStyle&on.Strikethrough);!c&&!d&&o===l?i.content+=r.content:n.push({...r})}return n})}const CX=XY;function wX(e,t,n){const r={meta:{},options:n,codeToHast:(o,l)=>Wd(e,o,l),codeToTokens:(o,l)=>Qd(e,o,l)};let i=CX(Wd(e,t,n,r));for(const o of Xd(n))i=o.postprocess?.call(r,i,n)||i;return i}async function kX(e){const t=await Bq(e);return{getLastGrammarState:(...n)=>Fq(t,...n),codeToTokensBase:(n,r)=>ig(t,n,r),codeToTokensWithThemes:(n,r)=>LN(t,n,r),codeToTokens:(n,r)=>Qd(t,n,r),codeToHast:(n,r)=>Wd(t,n,r),codeToHtml:(n,r)=>wX(t,n,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function NX(e){const t=e.langs,n=e.themes,r=e.engine;async function i(o){function l(m){if(typeof m=="string"){if(m=o.langAlias?.[m]||m,SN(m))return[];const _=t[m];if(!_)throw new yt(`Language \`${m}\` is not included in this bundle. You may want to load it from external source.`);return _}return m}function c(m){if(AN(m))return"none";if(typeof m=="string"){const _=n[m];if(!_)throw new yt(`Theme \`${m}\` is not included in this bundle. You may want to load it from external source.`);return _}return m}const d=(o.themes??[]).map(m=>c(m)),h=(o.langs??[]).map(m=>l(m)),p=await kX({engine:o.engine??r(),...o,themes:d,langs:h});return{...p,loadLanguage(...m){return p.loadLanguage(...m.map(l))},loadTheme(...m){return p.loadTheme(...m.map(c))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return i}function RX(e){let t;async function n(r={}){if(t){const i=await t;return await Promise.all([i.loadTheme(...r.themes||[]),i.loadLanguage(...r.langs||[])]),i}else{t=e({...r,themes:[],langs:[]});const i=await t;return await Promise.all([i.loadTheme(...r.themes||[]),i.loadLanguage(...r.langs||[])]),i}}return n}function OX(e,t){const n=RX(e);async function r(i,o){const l=await n({langs:[o.lang],themes:"theme"in o?[o.theme]:Object.values(o.themes)}),c=await t?.guessEmbeddedLanguages?.(i,o.lang,l);return c&&await l.loadLanguage(...c),l}return{getSingletonHighlighter(i){return n(i)},async codeToHtml(i,o){return(await r(i,o)).codeToHtml(i,o)},async codeToHast(i,o){return(await r(i,o)).codeToHast(i,o)},async codeToTokens(i,o){return(await r(i,o)).codeToTokens(i,o)},async codeToTokensBase(i,o){return(await r(i,o)).codeToTokensBase(i,o)},async codeToTokensWithThemes(i,o){return(await r(i,o)).codeToTokensWithThemes(i,o)},async getLastGrammarState(i,o){return(await n({langs:[o.lang],themes:[o.theme]})).getLastGrammarState(i,o)}}}var LX=j1({bundledLanguages:()=>z1,bundledLanguagesAlias:()=>H1,bundledLanguagesBase:()=>U1,bundledLanguagesInfo:()=>Lf,bundledThemes:()=>$1,bundledThemesInfo:()=>F1,codeToHast:()=>zN,codeToHtml:()=>K1,codeToTokens:()=>FN,codeToTokensBase:()=>$N,codeToTokensWithThemes:()=>VN,createHighlighter:()=>W1,getLastGrammarState:()=>qN,getSingletonHighlighter:()=>GN});const W1=NX({langs:z1,themes:$1,engine:()=>(0,oN.createOnigurumaEngine)(L(()=>import("./wasm-CG6Dc4jp.js"),[]))}),{codeToHtml:K1,codeToHast:zN,codeToTokens:FN,codeToTokensBase:$N,codeToTokensWithThemes:VN,getSingletonHighlighter:GN,getLastGrammarState:qN}=OX(W1,{guessEmbeddedLanguages:nX}),n2=4294967295;var IX=class{patterns;options;regexps;constructor(e,t={}){this.patterns=e,this.options=t;const{forgiving:n=!1,cache:r,regexConstructor:i}=t;if(!i)throw new Error("Option `regexConstructor` is not provided");this.regexps=e.map(o=>{if(typeof o!="string")return o;const l=r?.get(o);if(l){if(l instanceof RegExp)return l;if(n)return null;throw l}try{const c=i(o);return r?.set(o,c),c}catch(c){if(r?.set(o,c),n)return null;throw c}})}findNextMatchSync(e,t,n){const r=typeof e=="string"?e:e.content,i=[];function o(l,c,d=0){return{index:l,captureIndices:c.indices.map(h=>h==null?{start:n2,end:n2,length:0}:{start:h[0]+d,end:h[1]+d,length:h[1]-h[0]})}}for(let l=0;l<this.regexps.length;l++){const c=this.regexps[l];if(c)try{c.lastIndex=t;const d=c.exec(r);if(!d)continue;if(d.index===t)return o(l,d,0);i.push([l,d,0])}catch(d){if(this.options.forgiving)continue;throw d}}if(i.length){const l=Math.min(...i.map(c=>c[1].index));for(const[c,d,h]of i)if(d.index===l)return o(c,d,h)}return null}};function So(e){if([...e].length!==1)throw new Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function DX(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}const Z1=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),Zt=String.raw;function Ao(e,t){if(e==null)throw new Error(t??"Value expected");return e}const YN=Zt`\[\^?`,XN=`c.? | C(?:-.?)?|${Zt`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${Zt`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${Zt`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${Zt`o\{[^\}]*\}?`}|${Zt`\d{1,3}`}`,J1=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,od=new RegExp(Zt`
191
+ \\ (?:
192
+ ${XN}
193
+ | [gk]<[^>]*>?
194
+ | [gk]'[^']*'?
195
+ | .
196
+ )
197
+ | \( (?:
198
+ \? (?:
199
+ [:=!>({]
200
+ | <[=!]
201
+ | <[^>]*>
202
+ | '[^']*'
203
+ | ~\|?
204
+ | #(?:[^)\\]|\\.?)*
205
+ | [^:)]*[:)]
206
+ )?
207
+ | \*[^\)]*\)?
208
+ )?
209
+ | (?:${J1.source})+
210
+ | ${YN}
211
+ | .
212
+ `.replace(/\s+/g,""),"gsu"),t0=new RegExp(Zt`
213
+ \\ (?:
214
+ ${XN}
215
+ | .
216
+ )
217
+ | \[:(?:\^?\p{Alpha}+|\^):\]
218
+ | ${YN}
219
+ | &&
220
+ | .
221
+ `.replace(/\s+/g,""),"gsu");function MX(e,t={}){const n={flags:"",...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if(typeof e!="string")throw new Error("String expected as pattern");const r=eQ(n.flags),i=[r.extended],o={captureGroup:n.rules.captureGroup,getCurrentModX(){return i.at(-1)},numOpenGroups:0,popModX(){i.pop()},pushModX(m){i.push(m)},replaceCurrentModX(m){i[i.length-1]=m},singleline:n.rules.singleline};let l=[],c;for(od.lastIndex=0;c=od.exec(e);){const m=PX(o,e,c[0],od.lastIndex);m.tokens?l.push(...m.tokens):m.token&&l.push(m.token),m.lastIndex!==void 0&&(od.lastIndex=m.lastIndex)}const d=[];let h=0;l.filter(m=>m.type==="GroupOpen").forEach(m=>{m.kind==="capturing"?m.number=++h:m.raw==="("&&d.push(m)}),h||d.forEach((m,_)=>{m.kind="capturing",m.number=_+1});const p=h||d.length;return{tokens:l.map(m=>m.type==="EscapedNumber"?nQ(m,p):m).flat(),flags:r}}function PX(e,t,n,r){const[i,o]=n;if(n==="["||n==="[^"){const l=BX(t,n,r);return{tokens:l.tokens,lastIndex:l.lastIndex}}if(i==="\\"){if("AbBGyYzZ".includes(o))return{token:r2(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:YX(n)}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:WN(n)}}if(o==="K")return{token:KN("keep",n)};if(o==="N"||o==="R")return{token:$i("newline",n,{negate:o==="N"})};if(o==="O")return{token:$i("any",n)};if(o==="X")return{token:$i("text_segment",n)};const l=QN(n,{inCharClass:!1});return Array.isArray(l)?{tokens:l}:{token:l}}if(i==="("){if(o==="*")return{token:KX(n)};if(n==="(?{")throw new Error(`Unsupported callout "${n}"`);if(n.startsWith("(?#")){if(t[r]!==")")throw new Error('Unclosed comment group "(?#"');return{lastIndex:r+1}}if(/^\(\?[-imx]+[:)]$/.test(n))return{token:WX(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,n==="("&&!e.captureGroup||n==="(?:")return{token:eo("group",n)};if(n==="(?>")return{token:eo("atomic",n)};if(n==="(?="||n==="(?!"||n==="(?<="||n==="(?<!")return{token:eo(n[2]==="<"?"lookbehind":"lookahead",n,{negate:n.endsWith("!")})};if(n==="("&&e.captureGroup||n.startsWith("(?<")&&n.endsWith(">")||n.startsWith("(?'")&&n.endsWith("'"))return{token:eo("capturing",n,{...n!=="("&&{name:n.slice(3,-1)}})};if(n.startsWith("(?~")){if(n==="(?~|")throw new Error(`Unsupported absence function kind "${n}"`);return{token:eo("absence_repeater",n)}}throw n==="(?("?new Error(`Unsupported conditional "${n}"`):new Error(`Invalid or unsupported group option "${n}"`)}if(n===")"){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw new Error('Unmatched ")"');return{token:VX(n)}}if(e.getCurrentModX()){if(n==="#"){const l=t.indexOf(`
222
+ `,r);return{lastIndex:l===-1?t.length:l}}if(/^\s$/.test(n)){const l=/\s+/y;return l.lastIndex=r,{lastIndex:l.exec(t)?l.lastIndex:r}}}if(n===".")return{token:$i("dot",n)};if(n==="^"||n==="$"){const l=e.singleline?{"^":Zt`\A`,$:Zt`\Z`}[n]:n;return{token:r2(l,n)}}return n==="|"?{token:UX(n)}:J1.test(n)?{tokens:rQ(n)}:{token:da(So(n),n)}}function BX(e,t,n){const r=[a2(t[1]==="^",t)];let i=1,o;for(t0.lastIndex=n;o=t0.exec(e);){const l=o[0];if(l[0]==="["&&l[1]!==":")i++,r.push(a2(l[1]==="^",l));else if(l==="]"){if(r.at(-1).type==="CharacterClassOpen")r.push(da(93,l));else if(i--,r.push(HX(l)),!i)break}else{const c=jX(l);Array.isArray(c)?r.push(...c):r.push(c)}}return{tokens:r,lastIndex:t0.lastIndex||e.length}}function jX(e){if(e[0]==="\\")return QN(e,{inCharClass:!0});if(e[0]==="["){const t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!Z1.has(t.groups.name))throw new Error(`Invalid POSIX class "${e}"`);return $i("posix",e,{value:t.groups.name,negate:!!t.groups.negate})}return e==="-"?zX(e):e==="&&"?FX(e):da(So(e),e)}function QN(e,{inCharClass:t}){const n=e[1];if(n==="c"||n==="C")return QX(e);if("dDhHsSwW".includes(n))return ZX(e);if(e.startsWith(Zt`\o{`))throw new Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw new Error(`Incomplete or invalid Unicode property "${e}"`);return JX(e)}if(new RegExp("^\\\\x[89A-Fa-f]\\p{AHex}","u").test(e))try{const r=e.split(/\\x/).slice(1).map(l=>parseInt(l,16)),i=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(r)),o=new TextEncoder;return[...i].map(l=>{const c=[...o.encode(l)].map(d=>`\\x${d.toString(16)}`).join("");return da(So(l),c)})}catch{throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(n==="u"||n==="x")return da(tQ(e),e);if(i2.has(n))return da(i2.get(n),e);if(/\d/.test(n))return $X(t,e);if(e==="\\")throw new Error(Zt`Incomplete escape "\"`);if(n==="M")throw new Error(`Unsupported meta "${e}"`);if([...e].length===2)return da(e.codePointAt(1),e);throw new Error(`Unexpected escape "${e}"`)}function UX(e){return{type:"Alternator",raw:e}}function r2(e,t){return{type:"Assertion",kind:e,raw:t}}function WN(e){return{type:"Backreference",raw:e}}function da(e,t){return{type:"Character",value:e,raw:t}}function HX(e){return{type:"CharacterClassClose",raw:e}}function zX(e){return{type:"CharacterClassHyphen",raw:e}}function FX(e){return{type:"CharacterClassIntersector",raw:e}}function a2(e,t){return{type:"CharacterClassOpen",negate:e,raw:t}}function $i(e,t,n={}){return{type:"CharacterSet",kind:e,...n,raw:t}}function KN(e,t,n={}){return e==="keep"?{type:"Directive",kind:e,raw:t}:{type:"Directive",kind:e,flags:Ao(n.flags),raw:t}}function $X(e,t){return{type:"EscapedNumber",inCharClass:e,raw:t}}function VX(e){return{type:"GroupClose",raw:e}}function eo(e,t,n={}){return{type:"GroupOpen",kind:e,...n,raw:t}}function GX(e,t,n,r){return{type:"NamedCallout",kind:e,tag:t,arguments:n,raw:r}}function qX(e,t,n,r){return{type:"Quantifier",kind:e,min:t,max:n,raw:r}}function YX(e){return{type:"Subroutine",raw:e}}const XX=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),i2=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function QX(e){const t=e[1]==="c"?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw new Error(`Unsupported control character "${e}"`);return da(So(t.toUpperCase())-64,e)}function WX(e,t){let{on:n,off:r}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;r??="";const i=(t.getCurrentModX()||n.includes("x"))&&!r.includes("x"),o=o2(n),l=o2(r),c={};if(o&&(c.enable=o),l&&(c.disable=l),e.endsWith(")"))return t.replaceCurrentModX(i),KN("flags",e,{flags:c});if(e.endsWith(":"))return t.pushModX(i),t.numOpenGroups++,eo("group",e,{...(o||l)&&{flags:c}});throw new Error(`Unexpected flag modifier "${e}"`)}function KX(e){const t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw new Error(`Incomplete or invalid named callout "${e}"`);const{name:n,tag:r,args:i}=t.groups;if(!n)throw new Error(`Invalid named callout "${e}"`);if(r==="")throw new Error(`Named callout tag with empty value not allowed "${e}"`);const o=i?i.split(",").filter(p=>p!=="").map(p=>/^[+-]?\d+$/.test(p)?+p:p):[],[l,c,d]=o,h=XX.has(n)?n.toLowerCase():"custom";switch(h){case"fail":case"mismatch":case"skip":if(o.length>0)throw new Error(`Named callout arguments not allowed "${o}"`);break;case"error":if(o.length>1)throw new Error(`Named callout allows only one argument "${o}"`);if(typeof l=="string")throw new Error(`Named callout argument must be a number "${l}"`);break;case"max":if(!o.length||o.length>2)throw new Error(`Named callout must have one or two arguments "${o}"`);if(typeof l=="string"&&!/^[A-Za-z_]\w*$/.test(l))throw new Error(`Named callout argument one must be a tag or number "${l}"`);if(o.length===2&&(typeof c=="number"||!/^[<>X]$/.test(c)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${c}"`);break;case"count":case"total_count":if(o.length>1)throw new Error(`Named callout allows only one argument "${o}"`);if(o.length===1&&(typeof l=="number"||!/^[<>X]$/.test(l)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${l}"`);break;case"cmp":if(o.length!==3)throw new Error(`Named callout must have three arguments "${o}"`);if(typeof l=="string"&&!/^[A-Za-z_]\w*$/.test(l))throw new Error(`Named callout argument one must be a tag or number "${l}"`);if(typeof c=="number"||!/^(?:[<>!=]=|[<>])$/.test(c))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${c}"`);if(typeof d=="string"&&!/^[A-Za-z_]\w*$/.test(d))throw new Error(`Named callout argument three must be a tag or number "${d}"`);break;case"custom":throw new Error(`Undefined callout name "${n}"`);default:throw new Error(`Unexpected named callout kind "${h}"`)}return GX(h,r??null,i?.split(",")??null,e)}function s2(e){let t=null,n,r;if(e[0]==="{"){const{minStr:i,maxStr:o}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,l=1e5;if(+i>l||o&&+o>l)throw new Error("Quantifier value unsupported in Oniguruma");if(n=+i,r=o===void 0?+i:o===""?1/0:+o,n>r&&(t="possessive",[n,r]=[r,n]),e.endsWith("?")){if(t==="possessive")throw new Error('Unsupported possessive interval quantifier chain with "?"');t="lazy"}else t||(t="greedy")}else n=e[0]==="+"?1:0,r=e[0]==="?"?1:1/0,t=e[1]==="+"?"possessive":e[1]==="?"?"lazy":"greedy";return qX(t,n,r,e)}function ZX(e){const t=e[1].toLowerCase();return $i({d:"digit",h:"hex",s:"space",w:"word"}[t],e,{negate:e[1]!==t})}function JX(e){const{p:t,neg:n,value:r}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return $i("property",e,{value:r,negate:t==="P"&&!n||t==="p"&&!!n})}function o2(e){const t={};return e.includes("i")&&(t.ignoreCase=!0),e.includes("m")&&(t.dotAll=!0),e.includes("x")&&(t.extended=!0),Object.keys(t).length?t:null}function eQ(e){const t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let n=0;n<e.length;n++){const r=e[n];if(!"imxDPSWy".includes(r))throw new Error(`Invalid flag "${r}"`);if(r==="y"){if(!/^y{[gw]}/.test(e.slice(n)))throw new Error('Invalid or unspecified flag "y" mode');t.textSegmentMode=e[n+2]==="g"?"grapheme":"word",n+=3;continue}t[{i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"}[r]]=!0}return t}function tQ(e){if(new RegExp("^(?:\\\\u(?!\\p{AHex}{4})|\\\\x(?!\\p{AHex}{1,2}|\\{\\p{AHex}{1,8}\\}))","u").test(e))throw new Error(`Incomplete or invalid escape "${e}"`);const t=e[2]==="{"?new RegExp("^\\\\x\\{\\s*(?<hex>\\p{AHex}+)","u").exec(e).groups.hex:e.slice(2);return parseInt(t,16)}function nQ(e,t){const{raw:n,inCharClass:r}=e,i=n.slice(1);if(!r&&(i!=="0"&&i.length===1||i[0]!=="0"&&+i<=t))return[WN(n)];const o=[],l=i.match(/^[0-7]+|\d/g);for(let c=0;c<l.length;c++){const d=l[c];let h;if(c===0&&d!=="8"&&d!=="9"){if(h=parseInt(d,8),h>127)throw new Error(Zt`Octal encoded byte above 177 unsupported "${n}"`)}else h=So(d);o.push(da(h,(c===0?"\\":"")+d))}return o}function rQ(e){const t=[],n=new RegExp(J1,"gy");let r;for(;r=n.exec(e);){const i=r[0];if(i[0]==="{"){const o=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(i);if(o){const{min:l,max:c}=o.groups;if(+l>+c&&i.endsWith("?")){n.lastIndex--,t.push(s2(i.slice(0,-1)));continue}}}t.push(s2(i))}return t}function ZN(e,t){if(!Array.isArray(e.body))throw new Error("Expected node with body array");if(e.body.length!==1)return!1;const n=e.body[0];return!t||Object.keys(t).every(r=>t[r]===n[r])}function aQ(e){return iQ.has(e.type)}const iQ=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function JN(e,t={}){const n={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},r=MX(e,{flags:n.flags,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}}),i=(_,E)=>{const T=r.tokens[o.nextIndex];switch(o.parent=_,o.nextIndex++,T.type){case"Alternator":return Zi();case"Assertion":return sQ(T);case"Backreference":return oQ(T,o);case"Character":return Hf(T.value,{useLastValid:!!E.isCheckingRangeEnd});case"CharacterClassHyphen":return lQ(T,o,E);case"CharacterClassOpen":return uQ(T,o,E);case"CharacterSet":return cQ(T,o);case"Directive":return gQ(T.kind,{flags:T.flags});case"GroupOpen":return dQ(T,o,E);case"NamedCallout":return EQ(T.kind,T.tag,T.arguments);case"Quantifier":return fQ(T,o);case"Subroutine":return hQ(T,o);default:throw new Error(`Unexpected token type "${T.type}"`)}},o={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:n.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:n.skipBackrefValidation,skipLookbehindValidation:n.skipLookbehindValidation,skipPropertyNameValidation:n.skipPropertyNameValidation,subroutines:[],tokens:r.tokens,unicodePropertyMap:n.unicodePropertyMap,walk:i},l=_Q(bQ(r.flags));let c=l.body[0];for(;o.nextIndex<r.tokens.length;){const _=i(c,{});_.type==="Alternative"?(l.body.push(_),c=_):c.body.push(_)}const{capturingGroups:d,hasNumberedRef:h,namedGroupsByName:p,subroutines:m}=o;if(h&&p.size&&!n.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(const{ref:_}of m)if(typeof _=="number"){if(_>d.length)throw new Error("Subroutine uses a group number that's not defined");_&&(d[_-1].isSubroutined=!0)}else if(p.has(_)){if(p.get(_).length>1)throw new Error(Zt`Subroutine uses a duplicate group name "\g<${_}>"`);p.get(_)[0].isSubroutined=!0}else throw new Error(Zt`Subroutine uses a group name that's not defined "\g<${_}>"`);return l}function sQ({kind:e}){return sg(Ao({"^":"line_start",$:"line_end","\\A":"string_start","\\b":"word_boundary","\\B":"word_boundary","\\G":"search_start","\\y":"text_segment_boundary","\\Y":"text_segment_boundary","\\z":"string_end","\\Z":"string_end_newline"}[e],`Unexpected assertion kind "${e}"`),{negate:e===Zt`\B`||e===Zt`\Y`})}function oQ({raw:e},t){const n=/^\\k[<']/.test(e),r=n?e.slice(3,-1):e.slice(1),i=(o,l=!1)=>{const c=t.capturingGroups.length;let d=!1;if(o>c)if(t.skipBackrefValidation)d=!0;else throw new Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,og(l?c+1-o:o,{orphan:d})};if(n){const o=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(r);if(o)return i(+o.groups.num,!!o.groups.sign);if(/[-+]/.test(r))throw new Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(r))throw new Error(`Group name not defined to the left "${e}"`);return og(r)}return i(+r)}function lQ(e,t,n){const{tokens:r,walk:i}=t,o=t.parent,l=o.body.at(-1),c=r[t.nextIndex];if(!n.isCheckingRangeEnd&&l&&l.type!=="CharacterClass"&&l.type!=="CharacterClassRange"&&c&&c.type!=="CharacterClassOpen"&&c.type!=="CharacterClassClose"&&c.type!=="CharacterClassIntersector"){const d=i(o,{...n,isCheckingRangeEnd:!0});if(l.type==="Character"&&d.type==="Character")return o.body.pop(),pQ(l,d);throw new Error("Invalid character class range")}return Hf(So("-"))}function uQ({negate:e},t,n){const{tokens:r,walk:i}=t,o=[xd()],l=r[t.nextIndex];let c=c2(l);for(;c.type!=="CharacterClassClose";){if(c.type==="CharacterClassIntersector")o.push(xd()),t.nextIndex++;else{const h=o.at(-1);h.body.push(i(h,n))}c=c2(r[t.nextIndex],l)}const d=xd({negate:e});return o.length===1?d.body=o[0].body:(d.kind="intersection",d.body=o.map(h=>h.body.length===1?h.body[0]:h)),t.nextIndex++,d}function cQ({kind:e,negate:t,value:n},r){const{normalizeUnknownPropertyNames:i,skipPropertyNameValidation:o,unicodePropertyMap:l}=r;if(e==="property"){const c=zf(n);if(Z1.has(c)&&!l?.has(c))e="posix",n=c;else return to(n,{negate:t,normalizeUnknownPropertyNames:i,skipPropertyNameValidation:o,unicodePropertyMap:l})}return e==="posix"?yQ(n,{negate:t}):lg(e,{negate:t})}function dQ(e,t,n){const{tokens:r,capturingGroups:i,namedGroupsByName:o,skipLookbehindValidation:l,walk:c}=t,d=xQ(e),h=d.type==="AbsenceFunction",p=u2(d),m=p&&d.negate;if(d.type==="CapturingGroup"&&(i.push(d),d.name&&DX(o,d.name,[]).push(d)),h&&n.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let _=d2(r[t.nextIndex]);for(;_.type!=="GroupClose";){if(_.type==="Alternator")d.body.push(Zi()),t.nextIndex++;else{const E=d.body.at(-1),T=c(E,{...n,isInAbsenceFunction:n.isInAbsenceFunction||h,isInLookbehind:n.isInLookbehind||p,isInNegLookbehind:n.isInNegLookbehind||m});if(E.body.push(T),(p||n.isInLookbehind)&&!l){const S="Lookbehind includes a pattern not allowed by Oniguruma";if(m||n.isInNegLookbehind){if(l2(T)||T.type==="CapturingGroup")throw new Error(S)}else if(l2(T)||u2(T)&&T.negate)throw new Error(S)}}_=d2(r[t.nextIndex])}return t.nextIndex++,d}function fQ({kind:e,min:t,max:n},r){const i=r.parent,o=i.body.at(-1);if(!o||!aQ(o))throw new Error("Quantifier requires a repeatable token");const l=t3(e,t,n,o);return i.body.pop(),l}function hQ({raw:e},t){const{capturingGroups:n,subroutines:r}=t;let i=e.slice(3,-1);const o=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(i);if(o){const c=+o.groups.num,d=n.length;if(t.hasNumberedRef=!0,i={"":c,"+":d+c,"-":d+1-c}[o.groups.sign],i<1)throw new Error("Invalid subroutine number")}else i==="0"&&(i=0);const l=n3(i);return r.push(l),l}function mQ(e,t){return{type:"AbsenceFunction",kind:e,body:xu(t?.body)}}function Zi(e){return{type:"Alternative",body:r3(e?.body)}}function sg(e,t){const n={type:"Assertion",kind:e};return(e==="word_boundary"||e==="text_segment_boundary")&&(n.negate=!!t?.negate),n}function og(e,t){const n=!!t?.orphan;return{type:"Backreference",ref:e,...n&&{orphan:n}}}function e3(e,t){const n={name:void 0,isSubroutined:!1,...t};if(n.name!==void 0&&!TQ(n.name))throw new Error(`Group name "${n.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:e,...n.name&&{name:n.name},...n.isSubroutined&&{isSubroutined:n.isSubroutined},body:xu(t?.body)}}function Hf(e,t){const n={useLastValid:!1,...t};if(e>1114111){const r=e.toString(16);if(n.useLastValid)e=1114111;else throw e>1310719?new Error(`Invalid code point out of range "\\x{${r}}"`):new Error(`Invalid code point out of range in JS "\\x{${r}}"`)}return{type:"Character",value:e}}function xd(e){const t={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:t.kind,negate:t.negate,body:r3(e?.body)}}function pQ(e,t){if(t.value<e.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:t}}function lg(e,t){const n=!!t?.negate,r={type:"CharacterSet",kind:e};return(e==="digit"||e==="hex"||e==="newline"||e==="space"||e==="word")&&(r.negate=n),(e==="text_segment"||e==="newline"&&!n)&&(r.variableLength=!0),r}function gQ(e,t={}){if(e==="keep")return{type:"Directive",kind:e};if(e==="flags")return{type:"Directive",kind:e,flags:Ao(t.flags)};throw new Error(`Unexpected directive kind "${e}"`)}function bQ(e){return{type:"Flags",...e}}function mr(e){const t=e?.atomic,n=e?.flags;if(t&&n)throw new Error("Atomic group cannot have flags");return{type:"Group",...t&&{atomic:t},...n&&{flags:n},body:xu(e?.body)}}function Hi(e){const t={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:t.behind?"lookbehind":"lookahead",negate:t.negate,body:xu(e?.body)}}function EQ(e,t,n){return{type:"NamedCallout",kind:e,tag:t,arguments:n}}function yQ(e,t){const n=!!t?.negate;if(!Z1.has(e))throw new Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:n}}function t3(e,t,n,r){if(t>n)throw new Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:e,min:t,max:n,body:r}}function _Q(e,t){return{type:"Regex",body:xu(t?.body),flags:e}}function n3(e){return{type:"Subroutine",ref:e}}function to(e,t){const n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t};let r=n.unicodePropertyMap?.get(zf(e));if(!r){if(n.normalizeUnknownPropertyNames)r=vQ(e);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw new Error(Zt`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:r??e,negate:n.negate}}function xQ({flags:e,kind:t,name:n,negate:r,number:i}){switch(t){case"absence_repeater":return mQ("repeater");case"atomic":return mr({atomic:!0});case"capturing":return e3(i,{name:n});case"group":return mr({flags:e});case"lookahead":case"lookbehind":return Hi({behind:t==="lookbehind",negate:r});default:throw new Error(`Unexpected group kind "${t}"`)}}function xu(e){if(e===void 0)e=[Zi()];else if(!Array.isArray(e)||!e.length||!e.every(t=>t.type==="Alternative"))throw new Error("Invalid body; expected array of one or more Alternative nodes");return e}function r3(e){if(e===void 0)e=[];else if(!Array.isArray(e)||!e.every(t=>!!t.type))throw new Error("Invalid body; expected array of nodes");return e}function l2(e){return e.type==="LookaroundAssertion"&&e.kind==="lookahead"}function u2(e){return e.type==="LookaroundAssertion"&&e.kind==="lookbehind"}function TQ(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function vQ(e){return e.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,t=>t[0].toUpperCase()+t.slice(1).toLowerCase())}function zf(e){return e.replace(/[- _]+/g,"").toLowerCase()}function c2(e,t){const n=t;return Ao(e,`Unclosed character class${n?.type==="Character"&&n.value===93&&n.raw==="]"?' (started with "]")':""}`)}function d2(e){return Ao(e,"Unclosed group")}function ql(e,t,n=null){function r(o,l){for(let c=0;c<o.length;c++){const d=i(o[c],l,c,o);c=Math.max(-1,c+d)}}function i(o,l=null,c=null,d=null){let h=0,p=!1;const m={node:o,parent:l,key:c,container:d,root:e,remove(){ld(d).splice(Math.max(0,Ks(c)+h),1),h--,p=!0},removeAllNextSiblings(){return ld(d).splice(Ks(c)+1)},removeAllPrevSiblings(){const C=Ks(c)+h;return h-=C,ld(d).splice(0,Math.max(0,C))},replaceWith(C,k={}){const N=!!k.traverse;d?d[Math.max(0,Ks(c)+h)]=C:Ao(l,"Can't replace root node")[c]=C,N&&i(C,l,c,d),p=!0},replaceWithMultiple(C,k={}){const N=!!k.traverse;if(ld(d).splice(Math.max(0,Ks(c)+h),1,...C),h+=C.length-1,N){let M=0;for(let B=0;B<C.length;B++)M+=i(C[B],l,Ks(c)+B+M,d)}p=!0},skip(){p=!0}},{type:_}=o,E=t["*"],T=t[_],S=typeof E=="function"?E:E?.enter,A=typeof T=="function"?T:T?.enter;if(S?.(m,n),A?.(m,n),!p)switch(_){case"AbsenceFunction":case"Alternative":case"CapturingGroup":case"CharacterClass":case"Group":case"LookaroundAssertion":r(o.body,o);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":i(o.min,o,"min"),i(o.max,o,"max");break;case"Quantifier":i(o.body,o,"body");break;case"Regex":r(o.body,o),i(o.flags,o,"flags");break;default:throw new Error(`Unexpected node type "${_}"`)}return T?.exit?.(m,n),E?.exit?.(m,n),h}return i(e),e}function ld(e){if(!Array.isArray(e))throw new Error("Container expected");return e}function Ks(e){if(typeof e!="number")throw new Error("Numeric key expected");return e}const SQ=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function AQ(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function CQ(e,t,n,r){return e.slice(0,t)+r+e.slice(t+n.length)}const sr=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function eb(e,t,n,r){const i=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,"gsu"),o=[!1];let l=0,c="";for(const d of e.matchAll(i)){const{0:h,groups:{$skip:p}}=d;if(!p&&(!r||r===sr.DEFAULT==!l)){n instanceof Function?c+=n(d,{context:l?sr.CHAR_CLASS:sr.DEFAULT,negated:o[o.length-1]}):c+=n;continue}h[0]==="["?(l++,o.push(h[1]==="^")):h==="]"&&l&&(l--,o.pop()),c+=h}return c}function a3(e,t,n,r){eb(e,t,n,r)}function wQ(e,t,n=0,r){if(!new RegExp(t,"su").test(e))return null;const i=new RegExp(`${t}|(?<$skip>\\\\?.)`,"gsu");i.lastIndex=n;let o=0,l;for(;l=i.exec(e);){const{0:c,groups:{$skip:d}}=l;if(!d&&(!r||r===sr.DEFAULT==!o))return l;c==="["?o++:c==="]"&&o&&o--,i.lastIndex==l.index&&i.lastIndex++}return null}function ud(e,t,n){return!!wQ(e,t,0,n)}function kQ(e,t){const n=/\\?./gsu;n.lastIndex=t;let r=e.length,i=0,o=1,l;for(;l=n.exec(e);){const[c]=l;if(c==="[")i++;else if(i)c==="]"&&i--;else if(c==="(")o++;else if(c===")"&&(o--,!o)){r=l.index;break}}return e.slice(t,r)}const f2=new RegExp(String.raw`(?<noncapturingStart>${SQ})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function NQ(e,t){const n=t?.hiddenCaptures??[];let r=t?.captureTransfers??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:r,hiddenCaptures:n};const i="(?>",o="(?:(?=(",l=[0],c=[];let d=0,h=0,p=NaN,m;do{m=!1;let _=0,E=0,T=!1,S;for(f2.lastIndex=Number.isNaN(p)?0:p+o.length;S=f2.exec(e);){const{0:A,index:C,groups:{capturingStart:k,noncapturingStart:N}}=S;if(A==="[")_++;else if(_)A==="]"&&_--;else if(A===i&&!T)p=C,T=!0;else if(T&&N)E++;else if(k)T?E++:(d++,l.push(d+h));else if(A===")"&&T){if(!E){h++;const M=d+h;if(e=`${e.slice(0,p)}${o}${e.slice(p+i.length,C)}))<$$${M}>)${e.slice(C+1)}`,m=!0,c.push(M),AQ(n,M),r.size){const B=new Map;r.forEach((D,z)=>{B.set(z>=M?z+1:z,D.map(G=>G>=M?G+1:G))}),r=B}break}E--}}}while(m);return n.push(...c),e=eb(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:_,groups:{backrefNum:E,wrappedBackrefNum:T}})=>{if(E){const S=+E;if(S>l.length-1)throw new Error(`Backref "${_}" greater than number of captures`);return`\\${l[S]}`}return`\\${T}`},sr.DEFAULT),{pattern:e,captureTransfers:r,hiddenCaptures:n}}const i3=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,n0=new RegExp(String.raw`
223
+ \\(?: \d+
224
+ | c[A-Za-z]
225
+ | [gk]<[^>]+>
226
+ | [pPu]\{[^\}]+\}
227
+ | u[A-Fa-f\d]{4}
228
+ | x[A-Fa-f\d]{2}
229
+ )
230
+ | \((?: \? (?: [:=!>]
231
+ | <(?:[=!]|[^>]+>)
232
+ | [A-Za-z\-]+:
233
+ | \(DEFINE\)
234
+ ))?
235
+ | (?<qBase>${i3})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
236
+ | \\?.
237
+ `.replace(/\s+/g,""),"gsu");function RQ(e){if(!new RegExp(`${i3}\\+`).test(e))return{pattern:e};const t=[];let n=null,r=null,i="",o=0,l;for(n0.lastIndex=0;l=n0.exec(e);){const{0:c,index:d,groups:{qBase:h,qMod:p,invalidQ:m}}=l;if(c==="[")o||(r=d),o++;else if(c==="]")o?o--:r=null;else if(!o)if(p==="+"&&i&&!i.startsWith("(")){if(m)throw new Error(`Invalid quantifier "${c}"`);let _=-1;if(/^\{\d+\}$/.test(h))e=CQ(e,d+h.length,p,"");else{if(i===")"||i==="]"){const E=i===")"?n:r;if(E===null)throw new Error(`Invalid unmatched "${i}"`);e=`${e.slice(0,E)}(?>${e.slice(E,d)}${h})${e.slice(d+c.length)}`}else e=`${e.slice(0,d-i.length)}(?>${i}${h})${e.slice(d+c.length)}`;_+=4}n0.lastIndex+=_}else c[0]==="("?t.push(d):c===")"&&(n=t.length?t.pop():null);i=c}return{pattern:e}}const ir=String.raw,OQ=ir`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,ug=ir`\(\?R=(?<rDepth>[^\)]+)\)|${OQ}`,Ff=ir`\(\?<(?![=!])(?<captureName>[^>]+)>`,s3=ir`${Ff}|(?<unnamed>\()(?!\?)`,Mi=new RegExp(ir`${Ff}|${ug}|\(\?|\\?.`,"gsu"),r0="Cannot use multiple overlapping recursions";function LQ(e,t){const{hiddenCaptures:n,mode:r}={hiddenCaptures:[],mode:"plugin",...t};let i=t?.captureTransfers??new Map;if(!new RegExp(ug,"su").test(e))return{pattern:e,captureTransfers:i,hiddenCaptures:n};if(r==="plugin"&&ud(e,ir`\(\?\(DEFINE\)`,sr.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");const o=[],l=ud(e,ir`\\[1-9]`,sr.DEFAULT),c=new Map,d=[];let h=!1,p=0,m=0,_;for(Mi.lastIndex=0;_=Mi.exec(e);){const{0:E,groups:{captureName:T,rDepth:S,gRNameOrNum:A,gRDepth:C}}=_;if(E==="[")p++;else if(p)E==="]"&&p--;else if(S){if(h2(S),h)throw new Error(r0);if(l)throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);const k=e.slice(0,_.index),N=e.slice(Mi.lastIndex);if(ud(N,ug,sr.DEFAULT))throw new Error(r0);const M=+S-1;e=m2(k,N,M,!1,n,o,m),i=g2(i,k,M,o.length,0,m);break}else if(A){h2(C);let k=!1;for(const J of d)if(J.name===A||J.num===+A){if(k=!0,J.hasRecursedWithin)throw new Error(r0);break}if(!k)throw new Error(ir`Recursive \g cannot be used outside the referenced group "${r==="external"?A:ir`\g<${A}&R=${C}>`}"`);const N=c.get(A),M=kQ(e,N);if(l&&ud(M,ir`${Ff}|\((?!\?)`,sr.DEFAULT))throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);const B=e.slice(N,_.index),D=M.slice(B.length+E.length),z=o.length,G=+C-1,ie=m2(B,D,G,!0,n,o,m);i=g2(i,B,G,o.length-z,z,m);const V=e.slice(0,N),X=e.slice(N+M.length);e=`${V}${ie}${X}`,Mi.lastIndex+=ie.length-E.length-B.length-D.length,d.forEach(J=>J.hasRecursedWithin=!0),h=!0}else if(T)m++,c.set(String(m),Mi.lastIndex),c.set(T,Mi.lastIndex),d.push({num:m,name:T});else if(E[0]==="("){const k=E==="(";k&&(m++,c.set(String(m),Mi.lastIndex)),d.push(k?{num:m}:{})}else E===")"&&d.pop()}return n.push(...o),{pattern:e,captureTransfers:i,hiddenCaptures:n}}function h2(e){const t=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e))throw new Error(t);if(e=+e,e<2||e>100)throw new Error(t)}function m2(e,t,n,r,i,o,l){const c=new Set;r&&a3(e+t,Ff,({groups:{captureName:h}})=>{c.add(h)},sr.DEFAULT);const d=[n,r?c:null,i,o,l];return`${e}${p2(`(?:${e}`,"forward",...d)}(?:)${p2(`${t})`,"backward",...d)}${t}`}function p2(e,t,n,r,i,o,l){const d=p=>t==="forward"?p+2:n-p+2-1;let h="";for(let p=0;p<n;p++){const m=d(p);h+=eb(e,ir`${s3}|\\k<(?<backref>[^>]+)>`,({0:_,groups:{captureName:E,unnamed:T,backref:S}})=>{if(S&&r&&!r.has(S))return _;const A=`_$${m}`;if(T||E){const C=l+o.length+1;return o.push(C),IQ(i,C),T?_:`(?<${E}${A}>`}return ir`\k<${S}${A}>`},sr.DEFAULT)}return h}function IQ(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function g2(e,t,n,r,i,o){if(e.size&&r){let l=0;a3(t,s3,()=>l++,sr.DEFAULT);const c=o-l+i,d=new Map;return e.forEach((h,p)=>{const m=(r-l*n)/n,_=l*n,E=p>c+l?p+r:p,T=[];for(const S of h)if(S<=c)T.push(S);else if(S>c+l+m)T.push(S+r);else if(S<=c+l)for(let A=0;A<=n;A++)T.push(S+l*A);else for(let A=0;A<=n;A++)T.push(S+_+m*A);d.set(E,T)}),d}return e}var $t=String.fromCodePoint,Pe=String.raw,gr={},$f=globalThis.RegExp;gr.flagGroups=(()=>{try{new $f("(?i:)")}catch{return!1}return!0})();gr.unicodeSets=(()=>{try{new $f("[[]]","v")}catch{return!1}return!0})();gr.bugFlagVLiteralHyphenIsRange=gr.unicodeSets?(()=>{try{new $f(Pe`[\d\-a]`,"v")}catch{return!0}return!1})():!1;gr.bugNestedClassIgnoresNegation=gr.unicodeSets&&new $f("[[^a]]","v").test("a");function Kd(e,{enable:t,disable:n}){return{dotAll:!n?.dotAll&&!!(t?.dotAll||e.dotAll),ignoreCase:!n?.ignoreCase&&!!(t?.ignoreCase||e.ignoreCase)}}function nu(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}function cg(e,t){return b2[e]>=b2[t]}function DQ(e,t){if(e==null)throw new Error(t??"Value expected");return e}var b2={ES2025:2025,ES2024:2024,ES2018:2018},MQ={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function o3(e={}){if({}.toString.call(e)!=="[object Object]")throw new Error("Unexpected options");if(e.target!==void 0&&!MQ[e.target])throw new Error(`Unexpected target "${e.target}"`);const t={accuracy:"default",avoidSubclass:!1,flags:"",global:!1,hasIndices:!1,lazyCompileLength:1/0,target:"auto",verbose:!1,...e,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...e.rules}};return t.target==="auto"&&(t.target=gr.flagGroups?"ES2025":gr.unicodeSets?"ES2024":"ES2018"),t}var PQ="[ -\r ]",BQ=new Set([$t(304),$t(305)]),la=Pe`[\p{L}\p{M}\p{N}\p{Pc}]`;function l3(e){if(BQ.has(e))return[e];const t=new Set,n=e.toLowerCase(),r=n.toUpperCase(),i=HQ.get(n),o=jQ.get(n),l=UQ.get(n);return[...r].length===1&&t.add(r),l&&t.add(l),i&&t.add(i),t.add(n),o&&t.add(o),[...t]}var tb=new Map(`C Other
238
+ Cc Control cntrl
239
+ Cf Format
240
+ Cn Unassigned
241
+ Co Private_Use
242
+ Cs Surrogate
243
+ L Letter
244
+ LC Cased_Letter
245
+ Ll Lowercase_Letter
246
+ Lm Modifier_Letter
247
+ Lo Other_Letter
248
+ Lt Titlecase_Letter
249
+ Lu Uppercase_Letter
250
+ M Mark Combining_Mark
251
+ Mc Spacing_Mark
252
+ Me Enclosing_Mark
253
+ Mn Nonspacing_Mark
254
+ N Number
255
+ Nd Decimal_Number digit
256
+ Nl Letter_Number
257
+ No Other_Number
258
+ P Punctuation punct
259
+ Pc Connector_Punctuation
260
+ Pd Dash_Punctuation
261
+ Pe Close_Punctuation
262
+ Pf Final_Punctuation
263
+ Pi Initial_Punctuation
264
+ Po Other_Punctuation
265
+ Ps Open_Punctuation
266
+ S Symbol
267
+ Sc Currency_Symbol
268
+ Sk Modifier_Symbol
269
+ Sm Math_Symbol
270
+ So Other_Symbol
271
+ Z Separator
272
+ Zl Line_Separator
273
+ Zp Paragraph_Separator
274
+ Zs Space_Separator
275
+ ASCII
276
+ ASCII_Hex_Digit AHex
277
+ Alphabetic Alpha
278
+ Any
279
+ Assigned
280
+ Bidi_Control Bidi_C
281
+ Bidi_Mirrored Bidi_M
282
+ Case_Ignorable CI
283
+ Cased
284
+ Changes_When_Casefolded CWCF
285
+ Changes_When_Casemapped CWCM
286
+ Changes_When_Lowercased CWL
287
+ Changes_When_NFKC_Casefolded CWKCF
288
+ Changes_When_Titlecased CWT
289
+ Changes_When_Uppercased CWU
290
+ Dash
291
+ Default_Ignorable_Code_Point DI
292
+ Deprecated Dep
293
+ Diacritic Dia
294
+ Emoji
295
+ Emoji_Component EComp
296
+ Emoji_Modifier EMod
297
+ Emoji_Modifier_Base EBase
298
+ Emoji_Presentation EPres
299
+ Extended_Pictographic ExtPict
300
+ Extender Ext
301
+ Grapheme_Base Gr_Base
302
+ Grapheme_Extend Gr_Ext
303
+ Hex_Digit Hex
304
+ IDS_Binary_Operator IDSB
305
+ IDS_Trinary_Operator IDST
306
+ ID_Continue IDC
307
+ ID_Start IDS
308
+ Ideographic Ideo
309
+ Join_Control Join_C
310
+ Logical_Order_Exception LOE
311
+ Lowercase Lower
312
+ Math
313
+ Noncharacter_Code_Point NChar
314
+ Pattern_Syntax Pat_Syn
315
+ Pattern_White_Space Pat_WS
316
+ Quotation_Mark QMark
317
+ Radical
318
+ Regional_Indicator RI
319
+ Sentence_Terminal STerm
320
+ Soft_Dotted SD
321
+ Terminal_Punctuation Term
322
+ Unified_Ideograph UIdeo
323
+ Uppercase Upper
324
+ Variation_Selector VS
325
+ White_Space space
326
+ XID_Continue XIDC
327
+ XID_Start XIDS`.split(/\s/).map(e=>[zf(e),e])),jQ=new Map([["s",$t(383)],[$t(383),"s"]]),UQ=new Map([[$t(223),$t(7838)],[$t(107),$t(8490)],[$t(229),$t(8491)],[$t(969),$t(8486)]]),HQ=new Map([Qa(453),Qa(456),Qa(459),Qa(498),...a0(8072,8079),...a0(8088,8095),...a0(8104,8111),Qa(8124),Qa(8140),Qa(8188)]),zQ=new Map([["alnum",Pe`[\p{Alpha}\p{Nd}]`],["alpha",Pe`\p{Alpha}`],["ascii",Pe`\p{ASCII}`],["blank",Pe`[\p{Zs}\t]`],["cntrl",Pe`\p{Cc}`],["digit",Pe`\p{Nd}`],["graph",Pe`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",Pe`\p{Lower}`],["print",Pe`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",Pe`[\p{P}\p{S}]`],["space",Pe`\p{space}`],["upper",Pe`\p{Upper}`],["word",Pe`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",Pe`\p{AHex}`]]);function FQ(e,t){const n=[];for(let r=e;r<=t;r++)n.push(r);return n}function Qa(e){const t=$t(e);return[t.toLowerCase(),t]}function a0(e,t){return FQ(e,t).map(n=>Qa(n))}var u3=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function $Q(e,t){const n={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...t};c3(e);const r={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:cg(n.bestEffortTarget,"ES2024"),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};ql(e,VQ,r);const i={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},o={currentFlags:i,prevFlags:null,globalFlags:i,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:r.subroutineRefMap};ql(e,GQ,o);const l={groupsByName:o.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:o.reffedNodesByReferencer};return ql(e,qQ,l),e._originMap=o.groupOriginByCopy,e._strategy=r.strategy,e}var VQ={AbsenceFunction({node:e,parent:t,replaceWith:n}){const{body:r,kind:i}=e;if(i==="repeater"){const o=mr();o.body[0].body.push(Hi({negate:!0,body:r}),to("Any"));const l=mr();l.body[0].body.push(t3("greedy",0,1/0,o)),n(Lt(l,t),{traverse:!0})}else throw new Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:e,parent:t,key:n},{flagDirectivesByAlt:r}){const i=e.body.filter(o=>o.kind==="flags");for(let o=n+1;o<t.body.length;o++){const l=t.body[o];nu(r,l,[]).push(...i)}},exit({node:e},{flagDirectivesByAlt:t}){if(t.get(e)?.length){const n=f3(t.get(e));if(n){const r=mr({flags:n});r.body[0].body=e.body,e.body=[Lt(r,e)]}}}},Assertion({node:e,parent:t,key:n,container:r,root:i,remove:o,replaceWith:l},c){const{kind:d,negate:h}=e,{asciiWordBoundaries:p,avoidSubclass:m,supportedGNodes:_,wordIsAscii:E}=c;if(d==="text_segment_boundary")throw new Error(`Unsupported text segment boundary "\\${h?"Y":"y"}"`);if(d==="line_end")l(Lt(Hi({body:[Zi({body:[sg("string_end")]}),Zi({body:[Hf(10)]})]}),t));else if(d==="line_start")l(Lt(ua(Pe`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(d==="search_start")if(_.has(e))i.flags.sticky=!0,o();else{const T=r[n-1];if(T&&ZQ(T))l(Lt(Hi({negate:!0}),t));else{if(m)throw new Error(Pe`Uses "\G" in a way that requires a subclass`);l(Wa(sg("string_start"),t)),c.strategy="clip_search"}}else if(!(d==="string_end"||d==="string_start"))if(d==="string_end_newline")l(Lt(ua(Pe`(?=\n?\z)`),t));else if(d==="word_boundary"){if(!E&&!p){const T=`(?:(?<=${la})(?!${la})|(?<!${la})(?=${la}))`,S=`(?:(?<=${la})(?=${la})|(?<!${la})(?!${la}))`;l(Lt(ua(h?S:T),t))}}else throw new Error(`Unexpected assertion kind "${d}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!s0(n)&&(n=i0(n,t),e.ref=n)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:r}=e;r&&!s0(r)&&(r=i0(r,t),e.name=r),n.set(e.number,e),r&&n.set(r,e)},CharacterClassRange({node:e,parent:t,replaceWith:n}){if(t.kind==="intersection"){const r=xd({body:[e]});n(Lt(r,t),{traverse:!0})}},CharacterSet({node:e,parent:t,replaceWith:n},{accuracy:r,minTargetEs2024:i,digitIsAscii:o,spaceIsAscii:l,wordIsAscii:c}){const{kind:d,negate:h,value:p}=e;if(o&&(d==="digit"||p==="digit")){n(Wa(lg("digit",{negate:h}),t));return}if(l&&(d==="space"||p==="space")){n(Lt(o0(ua(PQ),h),t));return}if(c&&(d==="word"||p==="word")){n(Wa(lg("word",{negate:h}),t));return}if(d==="any")n(Wa(to("Any"),t));else if(d==="digit")n(Wa(to("Nd",{negate:h}),t));else if(d!=="dot")if(d==="text_segment"){if(r==="strict")throw new Error(Pe`Use of "\X" requires non-strict accuracy`);const m="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",_=Pe`\p{RI}{2}|${m}(?:\u200D${m})*`;n(Lt(ua(Pe`(?>\r\n|${i?Pe`\p{RGI_Emoji}`:_}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(d==="hex")n(Wa(to("AHex",{negate:h}),t));else if(d==="newline")n(Lt(ua(h?`[^
328
+ ]`:`(?>\r
329
+ ?|[
330
+ \v\f…\u2028\u2029])`),t));else if(d==="posix")if(!i&&(p==="graph"||p==="print")){if(r==="strict")throw new Error(`POSIX class "${p}" requires min target ES2024 or non-strict accuracy`);let m={graph:"!-~",print:" -~"}[p];h&&(m=`\0-${$t(m.codePointAt(0)-1)}${$t(m.codePointAt(2)+1)}-􏿿`),n(Lt(ua(`[${m}]`),t))}else n(Lt(o0(ua(zQ.get(p)),h),t));else if(d==="property")tb.has(zf(p))||(e.key="sc");else if(d==="space")n(Wa(to("space",{negate:h}),t));else if(d==="word")n(Lt(o0(ua(la),h),t));else throw new Error(`Unexpected character set kind "${d}"`)},Directive({node:e,parent:t,root:n,remove:r,replaceWith:i,removeAllPrevSiblings:o,removeAllNextSiblings:l}){const{kind:c,flags:d}=e;if(c==="flags")if(!d.enable&&!d.disable)r();else{const h=mr({flags:d});h.body[0].body=l(),i(Lt(h,t),{traverse:!0})}else if(c==="keep"){const h=n.body[0],m=n.body.length===1&&ZN(h,{type:"Group"})&&h.body[0].body.length===1?h.body[0]:n;if(t.parent!==m||m.body.length>1)throw new Error(Pe`Uses "\K" in a way that's unsupported`);const _=Hi({behind:!0});_.body[0].body=o(),i(Lt(_,t))}else throw new Error(`Unexpected directive kind "${c}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw new Error('Unsupported flag "P"');if(e.textSegmentMode==="word")throw new Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(n=>delete e[n]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;const{enable:t,disable:n}=e.flags;t?.extended&&delete t.extended,n?.extended&&delete n.extended,t?.dotAll&&n?.dotAll&&delete t.dotAll,t?.ignoreCase&&n?.ignoreCase&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,n&&!Object.keys(n).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){const{kind:n}=e;n==="lookbehind"&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:n}){const{kind:r}=e;if(r==="fail")n(Lt(Hi({negate:!0}),t));else throw new Error(`Unsupported named callout "(*${r.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type==="Quantifier"){const t=mr();t.body[0].body.push(e.body),e.body=Lt(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){const n=[];let r=!1,i=!1;for(const o of e.body)if(o.body.length===1&&o.body[0].kind==="search_start")o.body.pop();else{const l=m3(o.body);l?(r=!0,Array.isArray(l)?n.push(...l):n.push(l)):i=!0}r&&!i&&n.forEach(o=>t.add(o))},exit(e,{accuracy:t,passedLookbehind:n,strategy:r}){if(t==="strict"&&n&&r)throw new Error(Pe`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!s0(n)&&(n=i0(n,t),e.ref=n)}},GQ={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){const{orphan:r,ref:i}=e;r||n.set(e,[...t.get(i).map(({node:o})=>o)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:r},{groupOriginByCopy:i,groupsByName:o,multiplexCapturesToLeftByRef:l,openRefs:c,reffedNodesByReferencer:d}){const h=i.get(e);if(h&&c.has(e.number)){const m=Wa(E2(e.number),t);d.set(m,c.get(e.number)),n(m);return}c.set(e.number,e),l.set(e.number,[]),e.name&&nu(l,e.name,[]);const p=l.get(e.name??e.number);for(let m=0;m<p.length;m++){const _=p[m];if(h===_.node||h&&h===_.origin||e===_.origin){p.splice(m,1);break}}if(l.get(e.number).push({node:e,origin:h}),e.name&&l.get(e.name).push({node:e,origin:h}),e.name){const m=nu(o,e.name,new Map);let _=!1;if(h)_=!0;else for(const E of m.values())if(!E.hasDuplicateNameToRemove){_=!0;break}o.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:_})}},exit({node:e},{openRefs:t}){t.get(e.number)===e&&t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=Kd(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:n},r){const{isRecursive:i,ref:o}=e;if(i){let p=t;for(;(p=p.parent)&&!(p.type==="CapturingGroup"&&(p.name===o||p.number===o)););r.reffedNodesByReferencer.set(e,p);return}const l=r.subroutineRefMap.get(o),c=o===0,d=c?E2(0):d3(l,r.groupOriginByCopy,null);let h=d;if(!c){const p=f3(QQ(l,_=>_.type==="Group"&&!!_.flags)),m=p?Kd(r.globalFlags,p):r.globalFlags;YQ(m,r.currentFlags)||(h=mr({flags:WQ(m)}),h.body[0].body.push(d))}n(Lt(h,t),{traverse:!c})}},qQ={Backreference({node:e,parent:t,replaceWith:n},r){if(e.orphan){r.highestOrphanBackref=Math.max(r.highestOrphanBackref,e.ref);return}const o=r.reffedNodesByReferencer.get(e).filter(l=>XQ(l,e));if(!o.length)n(Lt(Hi({negate:!0}),t));else if(o.length>1){const l=mr({atomic:!0,body:o.reverse().map(c=>Zi({body:[og(c.number)]}))});n(Lt(l,t))}else e.ref=o[0].number},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){const n=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let r=0;r<n;r++){const i=e3();e.body.at(-1).body.push(i)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function c3(e){ql(e,{"*"({node:t,parent:n}){t.parent=n}})}function YQ(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function XQ(e,t){let n=t;do{if(n.type==="Regex")return!1;if(n.type==="Alternative")continue;if(n===e)return!1;const r=h3(n.parent);for(const i of r){if(i===n)break;if(i===e||p3(i,e))return!0}}while(n=n.parent);throw new Error("Unexpected path")}function d3(e,t,n,r){const i=Array.isArray(e)?[]:{};for(const[o,l]of Object.entries(e))o==="parent"?i.parent=Array.isArray(n)?r:n:l&&typeof l=="object"?i[o]=d3(l,t,i,n):(o==="type"&&l==="CapturingGroup"&&t.set(i,t.get(e)??e),i[o]=l);return i}function E2(e){const t=n3(e);return t.isRecursive=!0,t}function QQ(e,t){const n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}function i0(e,t){if(t.has(e))return t.get(e);const n=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return t.set(e,n),n}function f3(e){const t=["dotAll","ignoreCase"],n={enable:{},disable:{}};return e.forEach(({flags:r})=>{t.forEach(i=>{r.enable?.[i]&&(delete n.disable[i],n.enable[i]=!0),r.disable?.[i]&&(n.disable[i]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable?n:null}function WQ({dotAll:e,ignoreCase:t}){const n={};return(e||t)&&(n.enable={},e&&(n.enable.dotAll=!0),t&&(n.enable.ignoreCase=!0)),(!e||!t)&&(n.disable={},!e&&(n.disable.dotAll=!0),!t&&(n.disable.ignoreCase=!0)),n}function h3(e){if(!e)throw new Error("Node expected");const{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function m3(e){const t=e.find(n=>n.kind==="search_start"||JQ(n,{negate:!1})||!KQ(n));if(!t)return null;if(t.kind==="search_start")return t;if(t.type==="LookaroundAssertion")return t.body[0].body[0];if(t.type==="CapturingGroup"||t.type==="Group"){const n=[];for(const r of t.body){const i=m3(r.body);if(!i)return null;Array.isArray(i)?n.push(...i):n.push(i)}return n}return null}function p3(e,t){const n=h3(e)??[];for(const r of n)if(r===t||p3(r,t))return!0;return!1}function KQ({type:e}){return e==="Assertion"||e==="Directive"||e==="LookaroundAssertion"}function ZQ(e){const t=["Character","CharacterClass","CharacterSet"];return t.includes(e.type)||e.type==="Quantifier"&&e.min&&t.includes(e.body.type)}function JQ(e,t){const n={negate:null,...t};return e.type==="LookaroundAssertion"&&(n.negate===null||e.negate===n.negate)&&e.body.length===1&&ZN(e.body[0],{type:"Assertion",kind:"search_start"})}function s0(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function ua(e,t){const r=JN(e,{...t,unicodePropertyMap:tb}).body;return r.length>1||r[0].body.length>1?mr({body:r}):r[0].body[0]}function o0(e,t){return e.negate=t,e}function Wa(e,t){return e.parent=t,e}function Lt(e,t){return c3(e),e.parent=t,e}function eW(e,t){const n=o3(t),r=cg(n.target,"ES2024"),i=cg(n.target,"ES2025"),o=n.rules.recursionLimit;if(!Number.isInteger(o)||o<2||o>20)throw new Error("Invalid recursionLimit; use 2-20");let l=null,c=null;if(!i){const E=[e.flags.ignoreCase];ql(e,tW,{getCurrentModI:()=>E.at(-1),popModI(){E.pop()},pushModI(T){E.push(T)},setHasCasedChar(){E.at(-1)?l=!0:c=!0}})}const d={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||l)&&!c)};let h=e;const p={accuracy:n.accuracy,appliedGlobalFlags:d,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:h,originMap:e._originMap,recursionLimit:o,useAppliedIgnoreCase:!!(!i&&l&&c),useFlagMods:i,useFlagV:r,verbose:n.verbose};function m(E){return p.lastNode=h,h=E,DQ(nW[E.type],`Unexpected node type "${E.type}"`)(E,p,m)}const _={pattern:e.body.map(m).join("|"),flags:m(e.flags),options:{...e.options}};return r||(delete _.options.force.v,_.options.disable.v=!0,_.options.unicodeSetsPlugin=null),_._captureTransfers=new Map,_._hiddenCaptures=[],p.captureMap.forEach((E,T)=>{E.hidden&&_._hiddenCaptures.push(T),E.transferTo&&nu(_._captureTransfers,E.transferTo,[]).push(T)}),_}var tW={"*":{enter({node:e},t){if(_2(e)){const n=t.getCurrentModI();t.pushModI(e.flags?Kd({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){_2(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){nb($t(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),g3(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind==="property"&&u3.has(e.value)&&t.setHasCasedChar()}},nW={Alternative({body:e},t,n){return e.map(n).join("")},Assertion({kind:e,negate:t}){if(e==="string_end")return"$";if(e==="string_start")return"^";if(e==="word_boundary")return t?Pe`\B`:Pe`\b`;throw new Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if(typeof e!="number")throw new Error("Unexpected named backref in transformed AST");if(!t.useFlagMods&&t.accuracy==="strict"&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+e},CapturingGroup(e,t,n){const{body:r,name:i,number:o}=e,l={ignoreCase:t.currentFlags.ignoreCase},c=t.originMap.get(e);return c&&(l.hidden=!0,o>c.number&&(l.transferTo=c.number)),t.captureMap.set(o,l),`(${i?`?<${i}>`:""}${r.map(n).join("|")})`},Character({value:e},t){const n=$t(e),r=Zs(e,{escDigit:t.lastNode.type==="Backreference",inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(r!==n)return r;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&nb(n)){const i=l3(n);return t.inCharClass?i.join(""):i.length>1?`[${i.join("")}]`:i[0]}return n},CharacterClass(e,t,n){const{kind:r,negate:i,parent:o}=e;let{body:l}=e;if(r==="intersection"&&!t.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");gr.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&l.some(x2)&&(l=[Hf(45),...l.filter(h=>!x2(h))]);const c=()=>`[${i?"^":""}${l.map(n).join(r==="intersection"?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||gr.bugNestedClassIgnoresNegation)&&!i){const p=l.filter(m=>m.type==="CharacterClass"&&m.kind==="union"&&m.negate);if(p.length){const m=mr(),_=m.body[0];return m.parent=o,_.parent=m,l=l.filter(E=>!p.includes(E)),e.body=l,l.length?(e.parent=_,_.body.push(e)):m.body.pop(),p.forEach(E=>{const T=Zi({body:[E]});E.parent=T,T.parent=m,m.body.push(T)}),n(m)}}t.inCharClass=!0;const h=c();return t.inCharClass=!1,h}const d=l[0];if(r==="union"&&!i&&d&&((!t.useFlagV||!t.verbose)&&o.kind==="union"&&!(gr.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&o.kind==="intersection"&&l.length===1&&d.type!=="CharacterClassRange"))return l.map(n).join("");if(!t.useFlagV&&o.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return c()},CharacterClassRange(e,t){const n=e.min.value,r=e.max.value,i={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},o=Zs(n,i),l=Zs(r,i),c=new Set;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase){const d=g3(e);oW(d).forEach(p=>{c.add(Array.isArray(p)?`${Zs(p[0],i)}-${Zs(p[1],i)}`:Zs(p,i))})}return`${o}-${l}${[...c].join("")}`},CharacterSet({kind:e,negate:t,value:n,key:r},i){if(e==="dot")return i.currentFlags.dotAll?i.appliedGlobalFlags.dotAll||i.useFlagMods?".":"[^]":Pe`[^\n]`;if(e==="digit")return t?Pe`\D`:Pe`\d`;if(e==="property"){if(i.useAppliedIgnoreCase&&i.currentFlags.ignoreCase&&u3.has(n))throw new Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?Pe`\P`:Pe`\p`}{${r?`${r}=`:""}${n}}`}if(e==="word")return t?Pe`\W`:Pe`\w`;throw new Error(`Unexpected character set kind "${e}"`)},Flags(e,t){return(t.appliedGlobalFlags.ignoreCase?"i":"")+(e.dotAll?"s":"")+(e.sticky?"y":"")},Group({atomic:e,body:t,flags:n,parent:r},i,o){const l=i.currentFlags;n&&(i.currentFlags=Kd(l,n));const c=t.map(o).join("|"),d=!i.verbose&&t.length===1&&r.type!=="Quantifier"&&!e&&(!i.useFlagMods||!n)?c:`(?${lW(e,n,i.useFlagMods)}${c})`;return i.currentFlags=l,d},LookaroundAssertion({body:e,kind:t,negate:n},r,i){return`(?${`${t==="lookahead"?"":"<"}${n?"!":"="}`}${e.map(i).join("|")})`},Quantifier(e,t,n){return n(e.body)+uW(e)},Subroutine({isRecursive:e,ref:t},n){if(!e)throw new Error("Unexpected non-recursive subroutine in transformed AST");const r=n.recursionLimit;return t===0?`(?R=${r})`:Pe`\g<${t}&R=${r}>`}},rW=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),aW=new Set(["-","\\","]","^","["]),iW=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),y2=new Map([[9,Pe`\t`],[10,Pe`\n`],[11,Pe`\v`],[12,Pe`\f`],[13,Pe`\r`],[8232,Pe`\u2028`],[8233,Pe`\u2029`],[65279,Pe`\uFEFF`]]),sW=new RegExp("^\\p{Cased}$","u");function nb(e){return sW.test(e)}function g3(e,t){const n=!!t?.firstOnly,r=e.min.value,i=e.max.value,o=[];if(r<65&&(i===65535||i>=131071)||r===65536&&i>=131071)return o;for(let l=r;l<=i;l++){const c=$t(l);if(!nb(c))continue;const d=l3(c).filter(h=>{const p=h.codePointAt(0);return p<r||p>i});if(d.length&&(o.push(...d),n))break}return o}function Zs(e,{escDigit:t,inCharClass:n,useFlagV:r}){if(y2.has(e))return y2.get(e);if(e<32||e>126&&e<160||e>262143||t&&cW(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;const i=n?r?iW:aW:rW,o=$t(e);return(i.has(o)?"\\":"")+o}function oW(e){const t=e.map(i=>i.codePointAt(0)).sort((i,o)=>i-o),n=[];let r=null;for(let i=0;i<t.length;i++)t[i+1]===t[i]+1?r??=t[i]:r===null?n.push(t[i]):(n.push([r,t[i]]),r=null);return n}function lW(e,t,n){if(e)return">";let r="";if(t&&n){const{enable:i,disable:o}=t;r=(i?.ignoreCase?"i":"")+(i?.dotAll?"s":"")+(o?"-":"")+(o?.ignoreCase?"i":"")+(o?.dotAll?"s":"")}return`${r}:`}function uW({kind:e,max:t,min:n}){let r;return!n&&t===1?r="?":!n&&t===1/0?r="*":n===1&&t===1/0?r="+":n===t?r=`{${n}}`:r=`{${n},${t===1/0?"":t}}`,r+{greedy:"",lazy:"?",possessive:"+"}[e]}function _2({type:e}){return e==="CapturingGroup"||e==="Group"||e==="LookaroundAssertion"}function cW(e){return e>47&&e<58}function x2({type:e,value:t}){return e==="Character"&&t===45}var dW=class dg extends RegExp{#t=new Map;#e=null;#r;#n=null;#a=null;rawOptions={};get source(){return this.#r||"(?:)"}constructor(t,n,r){const i=!!r?.lazyCompile;if(t instanceof RegExp){if(r)throw new Error("Cannot provide options when copying a regexp");const o=t;super(o,n),this.#r=o.source,o instanceof dg&&(this.#t=o.#t,this.#n=o.#n,this.#a=o.#a,this.rawOptions=o.rawOptions)}else{const o={hiddenCaptures:[],strategy:null,transfers:[],...r};super(i?"":t,n),this.#r=t,this.#t=hW(o.hiddenCaptures,o.transfers),this.#a=o.strategy,this.rawOptions=r??{}}i||(this.#e=this)}exec(t){if(!this.#e){const{lazyCompile:i,...o}=this.rawOptions;this.#e=new dg(this.#r,this.flags,o)}const n=this.global||this.sticky,r=this.lastIndex;if(this.#a==="clip_search"&&n&&r){this.lastIndex=0;const i=this.#i(t.slice(r));return i&&(fW(i,r,t,this.hasIndices),this.lastIndex+=r),i}return this.#i(t)}#i(t){this.#e.lastIndex=this.lastIndex;const n=super.exec.call(this.#e,t);if(this.lastIndex=this.#e.lastIndex,!n||!this.#t.size)return n;const r=[...n];n.length=1;let i;this.hasIndices&&(i=[...n.indices],n.indices.length=1);const o=[0];for(let l=1;l<r.length;l++){const{hidden:c,transferTo:d}=this.#t.get(l)??{};if(c?o.push(null):(o.push(n.length),n.push(r[l]),this.hasIndices&&n.indices.push(i[l])),d&&r[l]!==void 0){const h=o[d];if(!h)throw new Error(`Invalid capture transfer to "${h}"`);if(n[h]=r[l],this.hasIndices&&(n.indices[h]=i[l]),n.groups){this.#n||(this.#n=mW(this.source));const p=this.#n.get(d);p&&(n.groups[p]=r[l],this.hasIndices&&(n.indices.groups[p]=i[l]))}}}return n}};function fW(e,t,n,r){if(e.index+=t,e.input=n,r){const i=e.indices;for(let l=0;l<i.length;l++){const c=i[l];c&&(i[l]=[c[0]+t,c[1]+t])}const o=i.groups;o&&Object.keys(o).forEach(l=>{const c=o[l];c&&(o[l]=[c[0]+t,c[1]+t])})}}function hW(e,t){const n=new Map;for(const r of e)n.set(r,{hidden:!0});for(const[r,i]of t)for(const o of i)nu(n,o,{}).transferTo=r;return n}function mW(e){const t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,n=new Map;let r=0,i=0,o;for(;o=t.exec(e);){const{0:l,groups:{capture:c,name:d}}=o;l==="["?r++:r?l==="]"&&r--:c&&(i++,d&&n.set(i,d))}return n}function pW(e,t){const n=gW(e,t);return n.options?new dW(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function gW(e,t){const n=o3(t),r=JN(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:tb}),i=$Q(r,{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),o=eW(i,n),l=LQ(o.pattern,{captureTransfers:o._captureTransfers,hiddenCaptures:o._hiddenCaptures,mode:"external"}),c=RQ(l.pattern),d=NQ(c.pattern,{captureTransfers:l.captureTransfers,hiddenCaptures:l.hiddenCaptures}),h={pattern:d.pattern,flags:`${n.hasIndices?"d":""}${n.global?"g":""}${o.flags}${o.options.disable.v?"u":"v"}`};if(n.avoidSubclass){if(n.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{const p=d.hiddenCaptures.sort((T,S)=>T-S),m=Array.from(d.captureTransfers),_=i._strategy,E=h.pattern.length>=n.lazyCompileLength;(p.length||m.length||_||E)&&(h.options={...p.length&&{hiddenCaptures:p},...m.length&&{transfers:m},..._&&{strategy:_},...E&&{lazyCompile:E}})}return h}function b3(e,t){return pW(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function bW(e={}){const t={target:"auto",cache:new Map,...e};return t.regexConstructor||=n=>b3(n,{target:t.target}),{createScanner(n){return new IX(n,t)},createString(n){return{content:n}}}}rN(j1({bundledLanguages:()=>z1,bundledLanguagesAlias:()=>H1,bundledLanguagesBase:()=>U1,bundledLanguagesInfo:()=>Lf,bundledThemes:()=>$1,bundledThemesInfo:()=>F1,codeToHast:()=>zN,codeToHtml:()=>K1,codeToTokens:()=>FN,codeToTokensBase:()=>$N,codeToTokensWithThemes:()=>VN,createHighlighter:()=>W1,createJavaScriptRegexEngine:()=>bW,createOnigurumaEngine:()=>sN,defaultJavaScriptRegexConstructor:()=>b3,getLastGrammarState:()=>qN,getSingletonHighlighter:()=>GN,loadWasm:()=>G1}),LX);const EW=v.createContext({code:""}),yW={name:"line-numbers",line(e,t){e.children.unshift({type:"element",tagName:"span",properties:{className:["inline-block","min-w-10","mr-4","text-right","select-none","text-muted-foreground"]},children:[{type:"text",value:String(t)}]})}};async function _W(e,t,n=!1){return await K1(e,{lang:t,theme:"one-dark-pro",transformers:n?[yW]:[]})}const fg=({code:e,language:t,showLineNumbers:n=!1,className:r,children:i,...o})=>{const[l,c]=v.useState("");return v.useEffect(()=>{let d=!1;return _W(e,t,n).then(h=>{d||c(h)}),()=>{d=!0}},[e,t,n]),b.jsx(EW.Provider,{value:{code:e},children:b.jsx("div",{className:we("group relative w-full overflow-hidden rounded-md border bg-background text-foreground",r),...o,children:b.jsxs("div",{className:"relative",children:[b.jsx("div",{className:"overflow-auto [&>pre]:m-0 [&>pre]:bg-background! [&>pre]:p-4 [&>pre]:text-foreground! [&>pre]:text-sm [&_code]:font-mono [&_code]:text-sm",dangerouslySetInnerHTML:{__html:l}}),i&&b.jsx("div",{className:"absolute top-2 right-2 flex items-center gap-2",children:i})]})})})},xW=({className:e,...t})=>b.jsx(aC,{className:we("not-prose mb-4 w-full rounded-md border",e),...t}),TW=e=>{const t={"input-streaming":"Pending","input-available":"Running","output-available":"Completed","output-error":"Error",interrupted:"Interrupted"},n={"input-streaming":b.jsx(ML,{className:"size-4"}),"input-available":b.jsx(BL,{className:"size-4 animate-pulse"}),"output-available":b.jsx(NL,{className:"size-4 text-emerald-400"}),"output-error":b.jsx(U2,{className:"size-4 text-red-400"}),interrupted:b.jsx(j2,{className:"size-4 text-muted-foreground"})};return b.jsxs(nN,{className:"gap-1.5 rounded-full text-xs",variant:"secondary",children:[n[e],t[e]]})},vW=({className:e,title:t,state:n,...r})=>b.jsxs(iC,{className:we("group flex w-full items-center justify-between gap-4 p-3",e),...r,children:[b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(V2,{className:"size-4 text-muted-foreground"}),b.jsx("span",{className:"font-medium font-mono text-sm",children:t}),TW(n)]}),b.jsx(Jd,{className:"size-4 text-muted-foreground transition-transform group-data-[state=open]:rotate-180"})]}),SW=({className:e,...t})=>b.jsx(sC,{className:we("data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-popover-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...t}),AW=({className:e,input:t,...n})=>b.jsxs("div",{className:we("space-y-2 overflow-hidden p-4",e),...n,children:[b.jsx("h4",{className:"font-medium text-muted-foreground text-xs uppercase tracking-wide",children:"Parameters"}),b.jsx("div",{className:"rounded-md bg-muted/50",children:b.jsx(fg,{code:JSON.stringify(t,null,2),language:"json"})})]}),T2=({className:e,output:t,errorText:n,language:r="txt",...i})=>{if(!(t||n))return null;let o=b.jsx("div",{children:t});return typeof t=="object"&&!v.isValidElement(t)?o=b.jsx(fg,{code:JSON.stringify(t,null,2),language:"json"}):typeof t=="string"&&(o=b.jsx(fg,{code:t,language:r})),b.jsxs("div",{className:we("space-y-2 p-4",e),...i,children:[b.jsx("h4",{className:"font-medium text-muted-foreground text-xs uppercase tracking-wide",children:n?"Error":"Result"}),b.jsxs("div",{className:we("overflow-x-auto rounded-md text-xs [&_table]:w-full",n?"bg-destructive/10 text-destructive":"bg-muted/50 text-foreground"),children:[n&&b.jsx("div",{children:n}),o]})]})};function CW(e){if(e==="Agent")return"Subagent";const t=e.toLowerCase();if(t==="request_user_input"||t==="askuserquestion")return"Question";if(t==="tasklist")return"Task list";if(t==="taskoutput")return"Background output";if(t==="taskstop")return"Stop background command";if(t==="taskcreate"||t==="taskget"||t==="taskupdate")return"Task";if(t==="spawn_agent")return"Start subagent";if(t==="followup_task")return"Subagent follow-up";if(t==="wait_agent")return"Wait for subagents";if(t==="list_agents")return"Subagents";if(t==="interrupt_agent")return"Stop subagent";if(t==="sendmessage")return"Subagent follow-up";const n=e.startsWith("mcp__")?e.slice(5).split("__"):[];return n.length>=2?`${v2(n[0]??"MCP")} · ${v2(n.slice(1).join("__"))}`:e}function v2(e){return e.replace(/[_-]+/g," ").trim().replace(/\b\w/g,t=>t.toUpperCase())}function wW(e,t,n){return e!==void 0?e.isError===!0?"output-error":"output-available":t?"input-streaming":n?"input-available":"interrupted"}function E3({args:e,isSessionRunning:t=!0,isStreamingArgs:n=!1,name:r,onOpenSubagent:i,result:o,subagent:l}){const c=wW(o,n,t),d=o?.rendered.filter(_=>_.type==="text").map(_=>_.text).join(`
331
+
332
+ `)??"",h=o?.rendered.filter(_=>_.type==="image")??[],p=o?.isError===!0?o.display||"The tool reported an error.":void 0,m=d!==""?d:void 0;return b.jsxs(xW,{className:"mb-0 w-full",children:[b.jsx(vW,{state:c,title:CW(r)}),o!==void 0&&o.display!==""&&b.jsx("div",{className:"border-t px-3 py-2 font-mono text-muted-foreground text-xs",children:o.display}),l!==void 0&&i!==void 0&&b.jsxs("div",{className:"flex items-center justify-between gap-3 border-t px-3 py-2",children:[b.jsx("span",{className:"min-w-0 truncate text-xs text-muted-foreground",children:l.description}),b.jsxs(wt,{className:"shrink-0 gap-1.5",onClick:()=>i(l.id),size:"sm",type:"button",variant:"ghost",children:["View history",b.jsx(EL,{className:"size-3.5"})]})]}),b.jsxs(SW,{children:[b.jsx(AW,{className:"border-t",input:e}),p!==void 0?b.jsx(T2,{errorText:p,output:m}):m!==void 0&&b.jsx(T2,{output:m}),h.length>0&&b.jsx("div",{className:"flex flex-wrap gap-2 p-4 pt-0",children:h.map((_,E)=>b.jsx("img",{alt:`Tool result ${E+1}`,className:"max-h-64 rounded-md border object-contain",src:`data:${_.mediaType};base64,${_.data}`},E))})]})]})}function kW({isSessionRunning:e,message:t,onOpenSubagent:n,subagentsByToolCallId:r,toolResults:i}){const o=t.blocks.filter(l=>l.type!=="tool_result");return o.length===0?null:b.jsx($g,{from:"assistant",children:b.jsx(Vg,{className:"w-full gap-3",children:o.map((l,c)=>{switch(l.type){case"text":return b.jsx(B1,{children:l.text},c);case"image":return b.jsx(eM,{alt:"Image from the agent",base64:l.data,className:"max-w-sm",mediaType:l.mediaType},c);case"thinking":return b.jsxs(D1,{className:"mb-0",defaultOpen:!1,children:[b.jsx(M1,{}),b.jsx(P1,{children:l.thinking!==""?l.thinking:"The model's reasoning was redacted."})]},c);case"tool_call":return b.jsx(E3,{args:l.arguments,isSessionRunning:e,name:l.name,onOpenSubagent:n,result:i.get(l.id),subagent:r?.get(l.id)},l.id)}})})})}function y3(e){const t=new Map;for(const n of e)if(n.role==="agent")for(const r of n.blocks)r.type==="tool_result"&&t.set(r.toolCallId,r);return t}function _3({className:e,...t}){return b.jsx("textarea",{"data-slot":"textarea",className:we("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40",e),...t})}const x3=v.createContext(null),Tu=()=>{const e=v.useContext(x3);if(!e)throw new Error("usePromptInputAttachments must be used within a PromptInput");return e};function NW({data:e,className:t,...n}){const r=Tu(),i=e.filename||"",o=!!(e.mediaType?.startsWith("image/")&&e.url);return b.jsxs("div",{className:we("group relative size-14 overflow-hidden rounded-md border",t),...n,children:[o?b.jsx("img",{alt:i||"attachment",className:"size-full object-cover",height:56,src:e.url,width:56}):b.jsx("div",{className:"flex size-full items-center justify-center bg-muted text-muted-foreground",children:b.jsx(F2,{className:"size-4"})}),b.jsxs(wt,{"aria-label":"Remove attachment",className:"absolute top-0.5 right-0.5 size-5 rounded-full bg-background/80 p-0 opacity-0 backdrop-blur-sm transition-opacity hover:bg-background group-hover:opacity-100 [&>svg]:size-3",onClick:l=>{l.stopPropagation(),r.remove(e.id)},type:"button",variant:"ghost",children:[b.jsx(gg,{}),b.jsx("span",{className:"sr-only",children:"Remove"})]})]})}function RW({children:e,className:t,...n}){const r=Tu();return r.files.length?b.jsx("div",{className:we("flex w-full flex-wrap items-center gap-2 p-3 pb-0",t),...n,children:r.files.map(i=>b.jsx(v.Fragment,{children:e(i)},i.id))}):null}const OW=({label:e="Attach image",className:t,...n})=>{const r=Tu();return b.jsxs(BW,{"aria-label":e,className:t,onClick:i=>{i.preventDefault(),r.openFileDialog()},...n,children:[b.jsx(F2,{className:"size-4"}),b.jsx("span",{className:"sr-only",children:e})]})},LW=({className:e,accept:t,multiple:n,maxFiles:r,maxFileSize:i,onError:o,onSubmit:l,children:c,...d})=>{const h=v.useRef(null),p=v.useRef(null),[m,_]=v.useState([]),E=v.useRef(m);E.current=m;const T=v.useCallback(()=>{h.current?.click()},[]),S=v.useCallback(z=>!t||t.trim()===""?!0:t.split(",").map(ie=>ie.trim()).filter(Boolean).some(ie=>{if(ie.endsWith("/*")){const V=ie.slice(0,-1);return z.type.startsWith(V)}return z.type===ie}),[t]),A=v.useCallback(z=>{const G=Array.from(z),ie=G.filter(J=>S(J));if(G.length&&ie.length===0){o?.({code:"accept",message:"No files match the accepted types."});return}const V=J=>i?J.size<=i:!0,X=ie.filter(V);if(ie.length>0&&X.length===0){o?.({code:"max_file_size",message:"All files exceed the maximum size."});return}_(J=>{const he=typeof r=="number"?Math.max(0,r-J.length):void 0,ue=typeof he=="number"?X.slice(0,he):X;typeof he=="number"&&X.length>he&&o?.({code:"max_files",message:"Too many files. Some were not added."});const re=[];for(const U of ue)re.push({id:crypto.randomUUID(),type:"file",url:URL.createObjectURL(U),mediaType:U.type,filename:U.name});return J.concat(re)})},[S,r,i,o]),C=v.useCallback(z=>_(G=>{const ie=G.find(V=>V.id===z);return ie?.url&&URL.revokeObjectURL(ie.url),G.filter(V=>V.id!==z)}),[]),k=v.useCallback(()=>_(z=>{for(const G of z)G.url&&URL.revokeObjectURL(G.url);return[]}),[]);v.useEffect(()=>{const z=p.current;if(!z)return;const G=V=>{V.dataTransfer?.types?.includes("Files")&&V.preventDefault()},ie=V=>{V.dataTransfer?.types?.includes("Files")&&V.preventDefault(),V.dataTransfer?.files&&V.dataTransfer.files.length>0&&A(V.dataTransfer.files)};return z.addEventListener("dragover",G),z.addEventListener("drop",ie),()=>{z.removeEventListener("dragover",G),z.removeEventListener("drop",ie)}},[A]),v.useEffect(()=>()=>{for(const z of E.current)z.url&&URL.revokeObjectURL(z.url)},[]);const N=z=>{z.currentTarget.files&&A(z.currentTarget.files),z.currentTarget.value=""},M=async z=>{try{const ie=await(await fetch(z)).blob();return new Promise(V=>{const X=new FileReader;X.onloadend=()=>V(X.result),X.onerror=()=>V(null),X.readAsDataURL(ie)})}catch{return null}},B=v.useMemo(()=>({files:m,add:A,remove:C,clear:k,openFileDialog:T,fileInputRef:h}),[m,A,C,k,T]),D=z=>{z.preventDefault();const G=z.currentTarget,V=new FormData(G).get("message")||"";G.reset();const X=()=>{const J=G.elements.namedItem("message");if(!(J instanceof HTMLTextAreaElement)||J.value!=="")return;Object.getOwnPropertyDescriptor(HTMLTextAreaElement.prototype,"value")?.set?.call(J,V),J.dispatchEvent(new Event("input",{bubbles:!0}))};Promise.all(m.map(async({id:J,...he})=>{if(he.url?.startsWith("blob:")){const ue=await M(he.url);return{...he,url:ue??he.url}}return he})).then(J=>{try{const he=l({text:V,files:J},z);he instanceof Promise?he.then(()=>k()).catch(()=>{X()}):k()}catch{X()}}).catch(()=>{X()})};return b.jsxs(x3.Provider,{value:B,children:[b.jsx("input",{accept:t,"aria-label":"Upload files",className:"hidden",multiple:n,onChange:N,ref:h,title:"Upload files",type:"file"}),b.jsx("form",{className:we("relative flex w-full flex-col overflow-hidden rounded-xl border bg-background shadow-xs transition-[color,box-shadow] focus-within:border-ring focus-within:ring-[3px] focus-within:ring-ring/50",e),onSubmit:D,ref:p,...d,children:c})]})},IW=({className:e,...t})=>b.jsx("div",{className:we("contents",e),...t}),DW=({onChange:e,onKeyDown:t,className:n,placeholder:r="What would you like to know?",...i})=>{const o=Tu(),[l,c]=v.useState(!1),d=p=>{if(t?.(p),!p.defaultPrevented){if(p.key==="Enter"){if(l||p.nativeEvent.isComposing||p.shiftKey)return;p.preventDefault();const m=p.currentTarget.form;if(m?.querySelector('button[type="submit"]')?.disabled)return;m?.requestSubmit()}if(p.key==="Backspace"&&p.currentTarget.value===""&&o.files.length>0){p.preventDefault();const m=o.files.at(-1);m&&o.remove(m.id)}}},h=p=>{const m=p.clipboardData?.items;if(!m)return;const _=[];for(const E of m)if(E.kind==="file"){const T=E.getAsFile();T&&_.push(T)}_.length>0&&(p.preventDefault(),o.add(_))};return b.jsx(_3,{className:we("field-sizing-content max-h-48 min-h-16 w-full resize-none rounded-none border-none bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent",n),name:"message",onChange:e,onCompositionEnd:()=>c(!1),onCompositionStart:()=>c(!0),onKeyDown:d,onPaste:h,placeholder:r,...i})},MW=({className:e,...t})=>b.jsx("div",{className:we("flex items-center justify-between gap-1 p-1",e),...t}),PW=({className:e,...t})=>b.jsx("div",{className:we("flex items-center gap-1",e),...t}),BW=({variant:e="ghost",className:t,size:n,...r})=>{const i=n??(v.Children.count(r.children)>1?"sm":"icon-sm");return b.jsx(wt,{className:we("shrink-0 gap-1.5 rounded-lg",t),size:i,type:"button",variant:e,...r})},jW=({className:e,variant:t="default",size:n="icon-sm",status:r,children:i,...o})=>{let l=b.jsx(UL,{className:"size-4"});return r==="submitted"?l=b.jsx(ef,{className:"size-4 animate-spin"}):r==="streaming"?l=b.jsx($2,{className:"size-4"}):r==="error"&&(l=b.jsx(gg,{className:"size-4"})),b.jsx(wt,{"aria-label":"Submit",className:we("shrink-0 rounded-lg",e),size:n,type:"submit",variant:t,...o,children:i??l})};function UW(e){const t=e.url;if(t===void 0||!t.startsWith("data:"))return;const n=t.indexOf(",");if(n<0)return;const i=t.slice(5,n).split(";")[0]||e.mediaType||"";if(i.startsWith("image/"))return{type:"image",mediaType:i,data:t.slice(n+1)}}const T3="/api",HW=300;async function zW(e){try{const t=await e.text();if(t.length===0)return e.statusText;try{const n=JSON.parse(t);if(typeof n.error=="string")return n.error;if(typeof n.message=="string")return n.message}catch{}return t}catch{return e.statusText}}async function fi(e,t){const n=await fetch(`${T3}${e}`,t);if(!n.ok){const r=await zW(n);throw new Error(`Request to ${e} failed (${n.status}): ${r}`)}return await n.json()}function Co(e,t){return fi(e,{method:"POST",...t!==void 0?{body:JSON.stringify(t),headers:{"Content-Type":"application/json"}}:{}})}function Vf(e,t){return fi(e,{method:"PATCH",body:JSON.stringify(t),headers:{"Content-Type":"application/json"}})}function FW(){return fi("/health")}function $W(e){return fi("/sessions")}function S2(e){return fi(`/sessions/${encodeURIComponent(e)}/subagents`)}function VW(e,t,n=20,r){const i=new URLSearchParams({limit:String(n),query:t});return fi(`/sessions/${encodeURIComponent(e)}/files?${i.toString()}`,r===void 0?void 0:{signal:r})}function GW(e){return Co("/sessions",e)}function A2(e){return fi(`/sessions/${encodeURIComponent(e)}`)}function qW(e,t){return Co(`/sessions/${encodeURIComponent(e)}/messages`,t)}function YW(e){return Co(`/sessions/${encodeURIComponent(e)}/abort`)}function XW(e,t,n){return Co(`/sessions/${encodeURIComponent(e)}/user-input/${encodeURIComponent(t)}`,n)}function QW(e){return Co(`/sessions/${encodeURIComponent(e)}/reset`)}function WW(e,t){return Vf(`/sessions/${encodeURIComponent(e)}/model`,t)}function KW(e,t){return Vf(`/sessions/${encodeURIComponent(e)}/effort`,t)}function ZW(e,t){return Vf(`/sessions/${encodeURIComponent(e)}/permissions`,t)}function JW(e,t){return Co(`/sessions/${encodeURIComponent(e)}/goal`,t)}function eK(e,t){return Vf(`/sessions/${encodeURIComponent(e)}/goal`,t)}function tK(e){return fi(`/sessions/${encodeURIComponent(e)}/goal`,{method:"DELETE"})}function nK(e){const t=[];for(const n of e.split(`
333
+ `)){const r=n.endsWith("\r")?n.slice(0,-1):n;r.startsWith("data:")&&t.push(r.slice(5).trimStart())}if(t.length!==0)try{return JSON.parse(t.join(`
334
+ `))}catch{return}}function rK(e,t){return new Promise(n=>{if(t.aborted){n();return}const r=window.setTimeout(()=>{t.removeEventListener("abort",i),n()},e),i=()=>{window.clearTimeout(r),n()};t.addEventListener("abort",i,{once:!0})})}async function aK(e,t,n,r,i){let o=t;for(;!r.aborted;){let l=!1;try{const c=o!==void 0?`?after=${encodeURIComponent(o)}`:"",d=await fetch(`${T3}/sessions/${encodeURIComponent(e)}/stream${c}`,{headers:{Accept:"text/event-stream"},signal:r});if(d.status===409)o=i?.onCursorInvalid!==void 0?await i.onCursorInvalid():void 0;else{if(!d.ok||d.body===null)throw d.status>=400&&d.status<500&&(l=!0,i?.onStreamRejected?.(d.status)),new Error(`Stream request failed (${d.status})`);{const h=d.body.getReader(),p=new TextDecoder;let m="";for(;;){const{done:_,value:E}=await h.read();if(_)break;m+=p.decode(E,{stream:!0});let T=m.indexOf(`
335
+
336
+ `);for(;T!==-1;){const S=m.slice(0,T);m=m.slice(T+2);const A=nK(S);A!==void 0&&(o=A.id,n(A)),T=m.indexOf(`
337
+
338
+ `)}}}}}catch{}if(l||r.aborted)return;await rK(HW,r)}}function iK({files:e,id:t,isLoading:n,onSelect:r,selectedIndex:i}){return b.jsxs("div",{"aria-label":"Workspace files",className:"border-border/70 max-h-56 overflow-y-auto border-b bg-muted/25 p-1.5",id:t,role:"listbox",children:[e.map((o,l)=>{const c=o.path.lastIndexOf("/"),d=c===-1?"Workspace root":o.path.slice(0,c),h=l===i;return b.jsxs("button",{"aria-selected":h,className:we("flex w-full items-center gap-2 rounded-md px-2.5 py-1.5 text-left text-sm transition-colors",h?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/60"),id:`${t}-option-${l}`,onMouseDown:p=>p.preventDefault(),onClick:()=>r(o),role:"option",type:"button",children:[b.jsx(zL,{className:"size-3.5 shrink-0 text-muted-foreground"}),b.jsx("span",{className:"min-w-0 flex-1 truncate font-medium",children:o.fileName}),b.jsx("span",{className:"max-w-1/2 truncate text-muted-foreground text-xs",children:d})]},o.path)}),n&&e.length===0&&b.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-2 text-muted-foreground text-sm",children:[b.jsx(ef,{className:"size-3.5 animate-spin"}),b.jsx("span",{children:"Searching workspace files…"})]}),!n&&e.length===0&&b.jsx("p",{className:"px-2.5 py-2 text-muted-foreground text-sm",children:"No matching files found."})]})}function C2(e){return`${e.start}:${e.end}:${e.prefix}`}function sK(e,t){const n=e.slice(0,t),i=/(?:^|\s)(@"([^"]*))$/u.exec(n)??/(?:^|\s)(@([^\s"]*))$/u.exec(n);if(i?.[1]!==void 0)return{end:t,prefix:i[1],query:i[2]??"",start:t-i[1].length}}function oK(e){return/[\s"]/u.test(e)?`@"${e.replaceAll('"','\\"')}"`:`@${e}`}const lK=10,uK=80;function cK({disabled:e,onTextChange:t,placeholder:n,sessionId:r}){const i=v.useRef(null),o=v.useRef(void 0),l=v.useId(),[c,d]=v.useState([]),[h,p]=v.useState(!1),[m,_]=v.useState(void 0),[E,T]=v.useState(0),S=()=>{d([]),p(!1),_(void 0),T(0)},A=(B,D)=>{const z=sK(B,D);if(z===void 0){o.current=void 0,S();return}const G=C2(z);if(o.current===G){S();return}o.current=void 0,d([]),_(z),T(0)};v.useEffect(()=>{if(m===void 0||e)return;const B=new AbortController;p(!0);const D=window.setTimeout(()=>{VW(r,m.query,lK,B.signal).then(z=>{B.signal.aborted||(d(z.files),p(!1),T(0))},()=>{B.signal.aborted||(d([]),p(!1))})},uK);return()=>{window.clearTimeout(D),B.abort()}},[e,m,r]),v.useEffect(()=>{const B=i.current?.form;if(B!=null)return B.addEventListener("reset",S),()=>B.removeEventListener("reset",S)},[]);const C=B=>{const D=i.current;if(D===null||m===void 0)return;const z=D.value.slice(m.end),G=z.length===0||!/^\s/u.test(z)?" ":"";D.setRangeText(`${oK(B.path)}${G}`,m.start,m.end,"end"),D.dispatchEvent(new Event("input",{bubbles:!0})),D.focus(),o.current=void 0,S()},k=B=>{t(B.currentTarget.value.trim()!==""),A(B.currentTarget.value,B.currentTarget.selectionStart)},N=B=>{if(m!==void 0){if(B.key==="Escape"){B.preventDefault(),o.current=C2(m),S();return}if(c.length!==0){if(B.key==="ArrowUp"){B.preventDefault(),T(D=>(D+c.length-1)%c.length);return}if(B.key==="ArrowDown"){B.preventDefault(),T(D=>(D+1)%c.length);return}if(B.key==="Enter"||B.key==="Tab"){B.preventDefault();const D=c[E]??c[0];D!==void 0&&C(D)}}}},M=m!==void 0;return b.jsxs(b.Fragment,{children:[M&&b.jsx(iK,{files:c,id:l,isLoading:h,onSelect:C,selectedIndex:E}),b.jsx(DW,{"aria-activedescendant":c.length>0?`${l}-option-${E}`:void 0,"aria-controls":M?l:void 0,"aria-expanded":M,"aria-haspopup":"listbox",disabled:e,onChange:k,onKeyDown:N,onSelect:B=>A(B.currentTarget.value,B.currentTarget.selectionStart),placeholder:n,ref:i})]})}function dK({daemonReady:e,hasText:t,isAborting:n,isRunning:r,onAbort:i,readOnly:o}){const l=Tu();if(o)return b.jsx(wt,{"aria-label":"Subagent history is read-only",className:"rounded-lg",disabled:!0,size:"icon-sm",type:"button",variant:"outline",children:b.jsx(GL,{className:"size-4"})});if(r)return b.jsxs("div",{className:"flex items-center gap-1",children:[b.jsx("button",{"aria-hidden":!0,className:"hidden",disabled:!0,type:"submit"}),b.jsx(wt,{"aria-label":"Stop the run",className:"rounded-lg",disabled:n,onClick:i,size:"icon-sm",type:"button",variant:"outline",children:n?b.jsx(ef,{className:"size-4 animate-spin"}):b.jsx($2,{className:"size-4"})})]});const c=e&&(t||l.files.length>0);return b.jsx(jW,{disabled:!c})}function fK({daemonReady:e,isAborting:t,isRunning:n,onAbort:r,onSubmit:i,readOnly:o,sessionId:l}){const[c,d]=v.useState(!1),[h,p]=v.useState(void 0),m=v.useCallback(async E=>{if(n||o)return;const T=E.text.trim(),S=[];for(const C of E.files){const k=UW(C);k!==void 0&&S.push(k)}if(T===""&&S.length===0)return;if(d(!1),p(void 0),!await i(T,S))throw new Error("The message could not be sent.")},[n,i,o]),_=v.useCallback(E=>{p(E.code==="accept"?"Only image files can be attached.":E.message)},[]);return b.jsxs("div",{className:"flex flex-col gap-1.5",children:[b.jsxs(LW,{accept:"image/*",multiple:!0,onError:_,onSubmit:m,children:[b.jsxs(IW,{children:[b.jsx(RW,{children:E=>b.jsx(NW,{data:E})}),b.jsx(cK,{disabled:!e||o,onTextChange:d,placeholder:o?"Subagent history is read-only.":e?"Message the agent…":"Waiting for the daemon to become ready…",sessionId:l})]}),b.jsxs(MW,{children:[b.jsx(PW,{children:b.jsx(OW,{disabled:!e||o})}),b.jsx(dK,{daemonReady:e,hasText:c,isAborting:t,isRunning:n,onAbort:r,readOnly:o})]})]}),b.jsxs("div",{className:"flex items-center justify-between px-1",children:[b.jsx("p",{className:"text-muted-foreground/70 text-xs",children:o?"Subagent histories cannot receive follow-up messages.":"Enter to send · Shift+Enter for a new line · type @ to mention files"}),h!==void 0&&b.jsx("p",{className:"text-destructive text-xs",children:h})]})]})}function hK({partial:e}){const t=e.content.length-1;return b.jsx($g,{from:"assistant",children:b.jsx(Vg,{className:"w-full gap-3",children:e.content.map((n,r)=>{const i=r===t;switch(n.type){case"text":return b.jsx(B1,{children:n.text},r);case"thinking":return b.jsxs(D1,{className:"mb-0",defaultOpen:i,isStreaming:i,children:[b.jsx(M1,{}),b.jsx(P1,{children:n.thinking})]},r);case"toolCall":return b.jsx(E3,{args:n.arguments,isStreamingArgs:i,name:n.name,result:void 0},n.id!==""?n.id:r)}})})})}function l0(e){return b.jsxs("header",{className:"flex h-12 shrink-0 items-center gap-3 border-b border-border/60 px-4",children:[b.jsx(wt,{"aria-label":"Back to the parent conversation",className:"shrink-0",onClick:e.onBack,size:"icon-sm",type:"button",variant:"ghost",children:b.jsx(P2,{className:"size-4"})}),b.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[b.jsx(H2,{className:"size-4 shrink-0 text-muted-foreground"}),b.jsxs("div",{className:"min-w-0",children:[b.jsx("p",{className:"truncate text-[13px] font-medium",children:e.description}),b.jsxs("p",{className:"text-[11px] text-muted-foreground",children:["Subagent history · Level ",e.depth]})]})]})]})}function mK({message:e}){const t=e.id.startsWith("optimistic-"),n=e.blocks.filter(i=>i.type==="image"),r=e.blocks.filter(i=>i.type==="text").map(i=>i.text).join(`
339
+ `);return b.jsxs($g,{className:t?"opacity-70":void 0,from:"user",children:[n.length>0&&b.jsx("div",{className:"ml-auto flex flex-wrap justify-end gap-2",children:n.map((i,o)=>b.jsx("img",{alt:`Attached image ${o+1}`,className:"size-24 rounded-lg border object-cover",src:`data:${i.mediaType};base64,${i.data}`},o))}),r!==""&&b.jsx(Vg,{children:b.jsx("span",{className:"whitespace-pre-wrap break-words",children:r})})]})}function v3({className:e,type:t,...n}){return b.jsx("input",{type:t,"data-slot":"input",className:we("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30","focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",e),...n})}function pK(e){const[t,n]=v.useState({}),[r,i]=v.useState({}),[o,l]=v.useState(!1),[c,d]=v.useState(),h=v.useMemo(()=>{const E={};for(const T of e.request.questions){const S=r[T.id]?.trim();E[T.id]=[...t[T.id]??[],...S===void 0||S===""?[]:[S]]}return E},[r,e.request.questions,t]),p=e.request.questions.every(E=>(h[E.id]?.length??0)>0),m=(E,T,S)=>{n(A=>{const C=A[E]??[],k=S?C.includes(T)?C.filter(N=>N!==T):[...C,T]:[T];return{...A,[E]:k}}),S||i(A=>({...A,[E]:""}))},_=async()=>{if(!(!p||o)){l(!0),d(void 0);try{await e.onAnswer(e.request.requestId,{answers:h})}catch(E){d(E instanceof Error?E.message:"The answer could not be sent."),l(!1)}}};return b.jsxs("div",{className:"overflow-hidden rounded-xl border border-border/80 bg-card shadow-sm",children:[b.jsxs("div",{className:"border-b border-border/60 px-4 py-3",children:[b.jsx("p",{className:"text-[11px] font-semibold tracking-[0.14em] text-muted-foreground uppercase",children:"Rig needs your input"}),b.jsx("p",{className:"mt-1 text-sm text-foreground/90",children:"Choose an answer to continue the response."})]}),b.jsxs("div",{className:"max-h-[48vh] space-y-5 overflow-y-auto px-4 py-4",children:[e.request.questions.map((E,T)=>b.jsxs("fieldset",{className:"space-y-2.5",children:[b.jsxs("legend",{className:"w-full",children:[b.jsx("span",{className:"mr-2 rounded border border-border bg-muted/40 px-1.5 py-0.5 text-[10px] font-medium tracking-wide text-muted-foreground uppercase",children:E.header}),b.jsx("span",{className:"text-sm font-medium text-foreground",children:E.question}),e.request.questions.length>1&&b.jsxs("span",{className:"ml-2 text-xs text-muted-foreground",children:[T+1,"/",e.request.questions.length]})]}),b.jsx("div",{className:"grid gap-2 sm:grid-cols-2",children:E.options.map(S=>{const A=(t[E.id]??[]).includes(S.label);return b.jsxs("button",{"aria-pressed":A,className:we("rounded-lg border px-3 py-2.5 text-left transition-colors",A?"border-primary/60 bg-primary/10":"border-border/70 bg-background hover:border-border hover:bg-muted/30"),onClick:()=>m(E.id,S.label,E.multiSelect),type:"button",children:[b.jsxs("span",{className:"block text-xs font-medium text-foreground",children:[A?"✓ ":"",S.label]}),b.jsx("span",{className:"mt-0.5 block text-xs leading-relaxed text-muted-foreground",children:S.description})]},S.label)})}),b.jsx(v3,{"aria-label":`Another answer for ${E.question}`,className:"h-8 text-xs",onChange:S=>{const A=S.target.value;i(C=>({...C,[E.id]:A})),!E.multiSelect&&A.trim()!==""&&n(C=>({...C,[E.id]:[]}))},placeholder:"Type another answer",value:r[E.id]??""})]},E.id)),c!==void 0&&b.jsx("p",{className:"text-xs text-destructive",children:c})]}),b.jsxs("div",{className:"flex items-center justify-between border-t border-border/60 px-4 py-3",children:[b.jsx(wt,{disabled:e.isAborting||o,onClick:e.onAbort,size:"sm",type:"button",variant:"ghost",children:e.isAborting?"Stopping…":"Stop response"}),b.jsx(wt,{disabled:!p||o,onClick:()=>{_()},size:"sm",type:"button",children:o?"Sending…":"Continue"})]})]})}function gK(e){return e.reason==="crash"?"The daemon crashed during a run":"The daemon was shut down during a run"}function bK({activeSession:e,daemonReady:t,historyDepth:n,onBackToParent:r,onOpenSubagent:i,sessionId:o}){const l=v.useMemo(()=>y3(e.messages),[e.messages]),c=v.useMemo(()=>e.messages.filter(C=>C.role!=="system"),[e.messages]),d=v.useMemo(()=>new Map(e.subagents.flatMap(C=>C.parentToolCallId===void 0?[]:[[C.parentToolCallId,C]])),[e.subagents]);if(o===void 0)return b.jsxs("section",{className:"flex min-w-0 flex-1 flex-col items-center justify-center gap-3 p-8 text-center",children:[b.jsx(z2,{className:"size-6 text-muted-foreground"}),b.jsxs("div",{className:"space-y-1",children:[b.jsx("h2",{className:"font-medium text-sm",children:"No session selected"}),b.jsx("p",{className:"text-muted-foreground text-sm",children:"Pick a session from the list or create a new one to start chatting."})]})]});if(e.isLoading)return b.jsxs("section",{className:"flex min-w-0 flex-1 flex-col",children:[n>0&&b.jsx(l0,{depth:n,description:"Subagent history",onBack:r}),b.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-3",children:[b.jsx(Wx,{className:"text-muted-foreground",size:20}),b.jsx("p",{className:"text-muted-foreground text-sm",children:"Loading conversation…"})]})]});if(e.loadError!==void 0)return b.jsxs("section",{className:"flex min-w-0 flex-1 flex-col",children:[n>0&&b.jsx(l0,{depth:n,description:"Subagent history",onBack:r}),b.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-3 p-8 text-center",children:[b.jsx(d0,{className:"size-6 text-destructive"}),b.jsxs("div",{className:"space-y-1",children:[b.jsx("h2",{className:"font-medium text-sm",children:"The session could not be loaded"}),b.jsx("p",{className:"text-muted-foreground text-sm",children:e.loadError})]})]})]});const h=e.streamingPartial,p=h!==void 0&&h.content.length>0,m=e.session?.interruption,_=e.session,E=n>0||_?.agent.type==="subagent",T=e.pendingUserInputs[0],S=e.isRunning&&!p&&T===void 0,A=c.length===0&&!p&&!S&&e.runError===void 0&&e.streamError===void 0&&m===void 0&&T===void 0;return b.jsxs("section",{className:"flex min-w-0 flex-1 flex-col",children:[E&&_!==void 0&&b.jsx(l0,{depth:_.agent.depth,description:_.agent.description??_.title??"Delegated task",onBack:r}),A?b.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-3 p-8 text-center",children:[b.jsx(YL,{className:"size-6 text-muted-foreground"}),b.jsxs("div",{className:"space-y-1",children:[b.jsx("h2",{className:"font-medium text-sm",children:"No messages yet"}),b.jsx("p",{className:"text-muted-foreground text-sm",children:"Send a message below to start the conversation."})]})]}):b.jsxs(Q5,{className:"flex-1",initial:"instant",children:[b.jsxs(W5,{className:"mx-auto w-full max-w-3xl gap-6 px-6 py-8",children:[c.map(C=>C.role==="user"?b.jsx(mK,{message:C},C.id):b.jsx(kW,{isSessionRunning:e.isRunning,message:C,onOpenSubagent:i,subagentsByToolCallId:d,toolResults:l},C.id)),p&&b.jsx(hK,{partial:h}),S&&b.jsxs("div",{className:"flex items-center gap-2.5",children:[b.jsx(Wx,{className:"text-muted-foreground",size:14}),b.jsx(rC,{className:"text-sm",duration:1.5,children:"Working…"})]}),e.runError!==void 0&&b.jsxs("div",{className:"flex items-start gap-2.5 rounded-lg border border-destructive/40 bg-destructive/10 px-4 py-3 text-destructive text-sm",children:[b.jsx(d0,{className:"mt-0.5 size-4 shrink-0"}),b.jsxs("div",{className:"min-w-0",children:[b.jsx("p",{className:"font-medium",children:"The run failed"}),b.jsx("p",{className:"mt-0.5 break-words",children:e.runError})]})]}),e.streamError!==void 0&&b.jsxs("div",{className:"flex items-start gap-2.5 rounded-lg border border-amber-500/30 bg-amber-500/10 px-4 py-3 text-amber-400 text-sm",children:[b.jsx(cx,{className:"mt-0.5 size-4 shrink-0"}),b.jsxs("div",{className:"min-w-0",children:[b.jsx("p",{className:"font-medium",children:"Live updates stopped"}),b.jsxs("p",{className:"mt-0.5 break-words",children:[e.streamError," Refresh the page to reconnect."]})]})]}),m!==void 0&&b.jsxs("div",{className:"flex items-start gap-2.5 rounded-lg border border-amber-500/30 bg-amber-500/10 px-4 py-3 text-amber-400 text-sm",children:[b.jsx(cx,{className:"mt-0.5 size-4 shrink-0"}),b.jsxs("div",{className:"min-w-0",children:[b.jsx("p",{className:"font-medium",children:gK(m)}),b.jsx("p",{className:"mt-0.5 break-words",children:m.message})]})]})]}),b.jsx(K5,{})]}),b.jsx("div",{className:"border-border/60 border-t",children:b.jsx("div",{className:"mx-auto w-full max-w-3xl px-6 pt-4 pb-5",children:T!==void 0&&!E?b.jsx(pK,{isAborting:e.isAborting,onAbort:()=>{e.abort()},onAnswer:e.answerUserInput,request:T},T.requestId):b.jsx(fK,{daemonReady:t,isAborting:e.isAborting,isRunning:e.isRunning,onAbort:()=>{e.abort()},onSubmit:e.submit,readOnly:E,sessionId:o})})})]})}function Za({className:e,...t}){return b.jsx("div",{"data-slot":"skeleton",className:we("animate-pulse rounded-md bg-accent",e),...t})}function EK({className:e,orientation:t="horizontal",...n}){return b.jsx(X4,{"data-slot":"tabs","data-orientation":t,orientation:t,className:we("group/tabs flex gap-2 data-[orientation=horizontal]:flex-col",e),...n})}const yK=bg("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-[orientation=horizontal]/tabs:h-9 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col data-[variant=line]:rounded-none",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});function _K({className:e,variant:t="default",...n}){return b.jsx(Q4,{"data-slot":"tabs-list","data-variant":t,className:we(yK({variant:t}),e),...n})}function w2({className:e,...t}){return b.jsx(W4,{"data-slot":"tabs-trigger",className:we("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent","data-[state=active]:bg-background data-[state=active]:text-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 dark:data-[state=active]:text-foreground","after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100",e),...t})}function k2({className:e,...t}){return b.jsx(K4,{"data-slot":"tabs-content",className:we("flex-1 outline-none",e),...t})}function S3(e){switch(e.status){case"completed":return b.jsx(OL,{"aria-label":"Completed",className:"size-3.5 text-zinc-500"});case"error":return b.jsx(U2,{"aria-label":"Failed",className:"size-3.5 text-red-400"});case"interrupted":return b.jsx(j2,{"aria-label":"Interrupted",className:"size-3.5 text-zinc-500"});case"running":return b.jsx(ef,{"aria-label":"Running",className:"size-3.5 animate-spin text-emerald-400"})}}function xK(e){switch(e.status){case"completed":return"Completed";case"error":return"Failed";case"interrupted":return"Interrupted";case"running":return"Running…"}}function TK(e){if(e===void 0)return"No arguments";if(typeof e=="string")return e;try{return JSON.stringify(e,null,2)}catch{return String(e)}}function vK(e){const{entry:t}=e,n=t.result?.rendered.filter(i=>i.type==="text").map(i=>i.text).join(`
340
+ `)??"",r=t.result?.rendered.filter(i=>i.type==="image").length??0;return b.jsxs("div",{className:"flex flex-col gap-3 p-3",children:[b.jsx("div",{children:b.jsxs(wt,{className:"-ml-1 h-7 gap-1.5 px-2 text-xs text-muted-foreground",onClick:e.onBack,size:"sm",variant:"ghost",children:[b.jsx(P2,{className:"size-3.5"}),"All activity"]})}),b.jsxs("div",{className:"flex items-center gap-2 px-1",children:[b.jsx(S3,{status:t.status}),b.jsx("span",{className:"min-w-0 flex-1 truncate font-mono text-xs font-medium text-foreground",children:t.name}),b.jsx("span",{className:we("text-xs",t.status==="error"?"text-red-400":t.status==="running"?"text-emerald-400":"text-muted-foreground"),children:xK(t)})]}),b.jsxs("div",{className:"flex flex-col gap-1 px-1",children:[b.jsx("span",{className:"text-xs font-medium tracking-wide text-muted-foreground",children:"Arguments"}),b.jsx("pre",{className:"max-h-64 overflow-auto rounded-lg border border-border/60 bg-zinc-900/60 p-2.5 font-mono text-[11px] leading-relaxed whitespace-pre-wrap text-foreground/90",children:TK(t.arguments)})]}),b.jsxs("div",{className:"flex flex-col gap-1 px-1",children:[b.jsx("span",{className:"text-xs font-medium tracking-wide text-muted-foreground",children:"Result"}),t.result===void 0?b.jsx("p",{className:"text-xs text-muted-foreground",children:t.status==="running"?"Waiting for the tool to finish…":"No result was recorded."}):b.jsxs(b.Fragment,{children:[t.result.display!==""&&b.jsx("p",{className:we("text-xs leading-snug",t.result.isError===!0?"text-red-400":"text-foreground/90"),children:t.result.display}),n!==""&&b.jsx("pre",{className:"max-h-72 overflow-auto rounded-lg border border-border/60 bg-zinc-900/60 p-2.5 font-mono text-[11px] leading-relaxed whitespace-pre-wrap text-foreground/90",children:n}),r>0&&b.jsx("p",{className:"text-xs text-muted-foreground",children:r===1?"The result includes 1 image.":`The result includes ${r} images.`})]})]})]})}function SK(e){const{entry:t}=e,n=t.result!==void 0&&t.result.display!==""?t.result.display:t.status==="running"?"Running…":void 0;return b.jsxs("button",{className:"group flex w-full items-start gap-2.5 rounded-lg px-2.5 py-2 text-left transition-colors hover:bg-accent/60 focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none",onClick:()=>e.onSelect(t.id),type:"button",children:[b.jsx("span",{className:"mt-0.5 shrink-0",children:b.jsx(S3,{status:t.status})}),b.jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[b.jsx("span",{className:"truncate font-mono text-xs text-foreground/90",children:t.name}),n!==void 0&&b.jsx("span",{className:"line-clamp-2 text-xs leading-snug text-muted-foreground",children:n})]}),b.jsx(B2,{className:"mt-0.5 size-3.5 shrink-0 text-muted-foreground/40 transition-colors group-hover:text-muted-foreground"})]})}function AK(e){const[t,n]=v.useState(void 0),r=e.entries.find(i=>i.id===t);return r!==void 0?b.jsx(vK,{entry:r,onBack:()=>{n(void 0)}}):e.entries.length===0?b.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-2 p-6 text-center",children:[b.jsx(V2,{className:"size-5 text-muted-foreground/50"}),b.jsx("p",{className:"text-xs text-muted-foreground",children:"Tool calls made by the agent will appear here."})]}):b.jsx("div",{className:"flex flex-col gap-0.5 p-2",children:e.entries.map(i=>b.jsx(SK,{entry:i,onSelect:n},i.id))})}function CK(e,t,n){const r=y3(e),i=[],o=new Set;for(const l of e)if(l.role==="agent")for(const c of l.blocks){if(c.type!=="tool_call"||o.has(c.id))continue;o.add(c.id);const d=r.get(c.id);i.push({arguments:c.arguments,id:c.id,name:c.name,result:d,status:d===void 0?n?"running":"interrupted":d.isError===!0?"error":"completed"})}if(t!==void 0)for(const l of t.content)l.type!=="toolCall"||o.has(l.id)||(o.add(l.id),i.push({arguments:l.arguments,id:l.id,name:l.name,result:void 0,status:"running"}));return i}function cd({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return b.jsx(G4,{"data-slot":"separator",decorative:n,orientation:t,className:we("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...r})}function hg(e){if(e===void 0)return"No activity yet";const t=Math.max(0,Math.floor((Date.now()-e)/1e3));if(t<60)return"Just now";const n=Math.floor(t/60);if(n<60)return`${n} ${n===1?"minute":"minutes"} ago`;const r=Math.floor(n/60);if(r<24)return`${r} ${r===1?"hour":"hours"} ago`;const i=Math.floor(r/24);return`${i} ${i===1?"day":"days"} ago`}function dr(e){return b.jsxs("div",{className:"flex flex-col gap-1",children:[b.jsx("span",{className:"text-xs font-medium tracking-wide text-muted-foreground",children:e.label}),e.children]})}function ru({...e}){return b.jsx(JS,{"data-slot":"select",...e})}function wK({...e}){return b.jsx(mA,{"data-slot":"select-group",...e})}function au({...e}){return b.jsx(rA,{"data-slot":"select-value",...e})}function iu({className:e,size:t="default",children:n,...r}){return b.jsxs(tA,{"data-slot":"select-trigger","data-size":t,className:we("flex w-fit items-center justify-between gap-2 rounded-md border border-input bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",e),...r,children:[n,b.jsx(aA,{asChild:!0,children:b.jsx(Jd,{className:"size-4 opacity-50"})})]})}function su({className:e,children:t,position:n="item-aligned",align:r="center",...i}){return b.jsx(sA,{children:b.jsxs(oA,{"data-slot":"select-content",className:we("relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,align:r,...i,children:[b.jsx(NK,{}),b.jsx(fA,{className:we("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),b.jsx(RK,{})]})})}function kK({className:e,...t}){return b.jsx(gA,{"data-slot":"select-label",className:we("px-2 py-1.5 text-xs text-muted-foreground",e),...t})}function ti({className:e,children:t,...n}){return b.jsxs(EA,{"data-slot":"select-item",className:we("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...n,children:[b.jsx("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:b.jsx(xA,{children:b.jsx(TL,{className:"size-4"})})}),b.jsx(yA,{children:t})]})}function NK({className:e,...t}){return b.jsx(TA,{"data-slot":"select-scroll-up-button",className:we("flex cursor-default items-center justify-center py-1",e),...t,children:b.jsx(CL,{className:"size-4"})})}function RK({className:e,...t}){return b.jsx(vA,{"data-slot":"select-scroll-down-button",className:we("flex cursor-default items-center justify-center py-1",e),...t,children:b.jsx(Jd,{className:"size-4"})})}function u0(e){return e.replace(/[-_]+/g," ").replace(/\b([a-z])/g,t=>t.toUpperCase())}const c0="__model-default__";function OK(e){const[t,n]=v.useState(!1),[r,i]=v.useState(void 0),o=e.effort??c0,l=d=>{d!==o&&(n(!0),i(void 0),e.onChangeEffort(d===c0?void 0:d).catch(h=>{i(h instanceof Error?h.message:"The effort could not be changed.")}).finally(()=>{n(!1)}))},c=e.levels.length>0;return b.jsxs("div",{className:"flex flex-col gap-1",children:[b.jsxs(ru,{disabled:e.disabled||t||!c,onValueChange:l,value:o,children:[b.jsx(iu,{className:"h-8 w-full text-xs",size:"sm",children:b.jsx(au,{placeholder:e.effort!==void 0?u0(e.effort):"Model default"})}),b.jsxs(su,{position:"popper",children:[b.jsx(ti,{value:c0,children:"Model default"}),e.levels.map(d=>b.jsx(ti,{value:d,children:u0(d)},d)),e.effort!==void 0&&!e.levels.includes(e.effort)&&b.jsx(ti,{value:e.effort,children:u0(e.effort)})]})]}),r!==void 0&&b.jsx("p",{className:"text-xs text-red-400",children:r})]})}function ou(e){return(e.includes("/")?e.split("/").at(-1)??e:e).replace(/[-_]+/g," ").replace(/\bgpt\b/gi,"GPT").replace(/\bapi\b/gi,"API").replace(/\b([a-z])/g,n=>n.toUpperCase())}function lu(e,t){return JSON.stringify([e,t])}function A3(e){if(e.catalog.providers.length>1)return b.jsx(b.Fragment,{children:e.catalog.providers.map(i=>b.jsxs(wK,{children:[b.jsx(kK,{children:ou(i.providerId)}),i.models.map(o=>b.jsx(ti,{value:lu(i.providerId,o.id),children:o.name},`${i.providerId}:${o.id}`))]},i.providerId))});const t=e.catalog.providers[0],n=t?.providerId??e.catalog.defaultProviderId,r=t?.models??e.catalog.models;return b.jsx(b.Fragment,{children:r.map(i=>b.jsx(ti,{value:lu(n,i.id),children:i.name},`${n}:${i.id}`))})}function C3(e){try{const t=JSON.parse(e);if(Array.isArray(t)&&t.length===2&&typeof t[0]=="string"&&typeof t[1]=="string")return{providerId:t[0],modelId:t[1]}}catch{return}}function LK(e){const[t,n]=v.useState(!1),[r,i]=v.useState(void 0),o=e.catalog?.providers??[],l=new Set(o.flatMap(h=>h.models.map(p=>lu(h.providerId,p.id)))),c=lu(e.providerId,e.modelId),d=h=>{const p=C3(h);p===void 0||p.modelId===e.modelId&&p.providerId===e.providerId||(n(!0),i(void 0),e.onChangeModel(p.providerId,p.modelId).catch(m=>{i(m instanceof Error?m.message:"The model could not be changed.")}).finally(()=>{n(!1)}))};return b.jsxs("div",{className:"flex flex-col gap-1",children:[b.jsxs(ru,{disabled:e.disabled||t||e.catalog===void 0,onValueChange:d,value:c,children:[b.jsx(iu,{className:"h-8 w-full font-mono text-xs",size:"sm",children:b.jsx(au,{placeholder:ou(e.modelId)})}),b.jsxs(su,{position:"popper",children:[e.catalog!==void 0&&b.jsx(A3,{catalog:e.catalog}),!l.has(c)&&b.jsx(ti,{value:c,children:ou(e.modelId)})]})]}),r!==void 0&&b.jsx("p",{className:"text-xs text-red-400",children:r})]})}function IK(e){const[t,n]=v.useState(""),[r,i]=v.useState(!1),[o,l]=v.useState(void 0),c=h=>{i(!0),l(void 0),h().catch(p=>{l(p instanceof Error?p.message:"The goal could not be updated.")}).finally(()=>i(!1))};if(e.goal===void 0)return b.jsxs("div",{className:"space-y-2",children:[b.jsx(_3,{"aria-label":"Goal objective",disabled:r,onChange:h=>n(h.target.value),placeholder:"Describe the outcome to pursue across turns",rows:3,value:t}),b.jsx(wt,{className:"w-full",disabled:r||t.trim().length===0,onClick:()=>c(()=>e.set(t).then(()=>n(""))),size:"sm",children:"Start goal"}),o!==void 0&&b.jsx("p",{className:"text-xs leading-relaxed text-destructive",children:o})]});const d=e.goal.status==="paused"||e.goal.status==="blocked";return b.jsxs("div",{className:"space-y-2",children:[b.jsxs("div",{className:"rounded-md border border-border/60 px-2.5 py-2",children:[b.jsx("p",{className:"text-[11px] font-medium uppercase text-muted-foreground",children:DK(e.goal.status)}),b.jsx("p",{className:"mt-1 text-xs leading-relaxed text-foreground/90",children:e.goal.objective})]}),b.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[e.goal.status==="active"&&b.jsx(wt,{disabled:r,onClick:()=>c(()=>e.changeStatus("paused")),size:"sm",variant:"outline",children:"Pause"}),d&&b.jsx(wt,{disabled:r,onClick:()=>c(()=>e.changeStatus("active")),size:"sm",variant:"outline",children:"Resume"}),b.jsx(wt,{className:e.goal.status==="complete"?"col-span-2":void 0,disabled:r,onClick:()=>c(e.clear),size:"sm",variant:"ghost",children:"Clear"})]}),o!==void 0&&b.jsx("p",{className:"text-xs leading-relaxed text-destructive",children:o})]})}function DK(e){return e==="active"?"Active":e==="paused"?"Paused":e==="blocked"?"Blocked":"Complete"}const Zd=[{description:"Routine work proceeds automatically; risky actions ask for approval.",label:"Auto",value:"auto"},{description:"Writes stay in the working directory. Shell network access is blocked.",label:"Workspace write",value:"workspace_write"},{description:"Project files stay read only. Shell commands may write temporary files.",label:"Read only",value:"read_only"},{description:"Filesystem, shell, and network access are unrestricted.",label:"Full access",value:"full_access"}];function MK(e){const[t,n]=v.useState(!1),[r,i]=v.useState(),o=Zd.find(c=>c.value===e.permissionMode),l=c=>{c!==e.permissionMode&&(n(!0),i(void 0),e.onChangePermissionMode(c).catch(d=>{i(d instanceof Error?d.message:"The permission mode could not be changed.")}).finally(()=>n(!1)))};return b.jsxs("div",{className:"flex flex-col gap-1.5",children:[b.jsxs(ru,{disabled:e.disabled||t,onValueChange:c=>l(c),value:e.permissionMode,children:[b.jsx(iu,{className:"h-8 w-full text-xs",size:"sm",children:b.jsx(au,{placeholder:o?.label??"Workspace write"})}),b.jsx(su,{position:"popper",children:Zd.map(c=>b.jsx(ti,{value:c.value,children:c.label},c.value))})]}),b.jsx("p",{className:"text-xs leading-relaxed text-muted-foreground",children:o?.description??"Writes stay in the working directory."}),r!==void 0&&b.jsx("p",{className:"text-xs text-red-400",children:r})]})}function w3({...e}){return b.jsx(fS,{"data-slot":"dialog",...e})}function k3({...e}){return b.jsx(mS,{"data-slot":"dialog-trigger",...e})}function PK({...e}){return b.jsx(gS,{"data-slot":"dialog-portal",...e})}function BK({...e}){return b.jsx(sf,{"data-slot":"dialog-close",...e})}function jK({className:e,...t}){return b.jsx(bS,{"data-slot":"dialog-overlay",className:we("fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",e),...t})}function N3({className:e,children:t,showCloseButton:n=!0,...r}){return b.jsxs(PK,{"data-slot":"dialog-portal",children:[b.jsx(jK,{}),b.jsxs(ES,{"data-slot":"dialog-content",className:we("fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg",e),...r,children:[t,n&&b.jsxs(sf,{"data-slot":"dialog-close",className:"absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[b.jsx(gg,{}),b.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function R3({className:e,...t}){return b.jsx("div",{"data-slot":"dialog-header",className:we("flex flex-col gap-2 text-center sm:text-left",e),...t})}function O3({className:e,showCloseButton:t=!1,children:n,...r}){return b.jsxs("div",{"data-slot":"dialog-footer",className:we("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...r,children:[n,t&&b.jsx(sf,{asChild:!0,children:b.jsx(wt,{variant:"outline",children:"Close"})})]})}function L3({className:e,...t}){return b.jsx(xS,{"data-slot":"dialog-title",className:we("text-lg leading-none font-semibold",e),...t})}function I3({className:e,...t}){return b.jsx(vS,{"data-slot":"dialog-description",className:we("text-sm text-muted-foreground",e),...t})}function UK(e){const[t,n]=v.useState(!1),[r,i]=v.useState(!1),[o,l]=v.useState(void 0),c=h=>{n(h),h||l(void 0)},d=()=>{i(!0),l(void 0),e.onReset().then(()=>{n(!1)}).catch(h=>{l(h instanceof Error?h.message:"The conversation could not be reset.")}).finally(()=>{i(!1)})};return b.jsxs(w3,{onOpenChange:c,open:t,children:[b.jsx(k3,{asChild:!0,children:b.jsxs(wt,{className:"w-full justify-center gap-2",disabled:e.disabled,size:"sm",variant:"outline",children:[b.jsx(tI,{className:"size-3.5"}),"Reset conversation"]})}),b.jsxs(N3,{className:"sm:max-w-sm",children:[b.jsxs(R3,{children:[b.jsx(L3,{children:"Reset this conversation?"}),b.jsx(I3,{children:"All messages in this session will be cleared. The session itself, its working directory, and its model settings are kept."})]}),o!==void 0&&b.jsx("p",{className:"text-sm text-red-400",children:o}),b.jsxs(O3,{children:[b.jsx(BK,{asChild:!0,children:b.jsx(wt,{disabled:r,size:"sm",variant:"ghost",children:"Cancel"})}),b.jsx(wt,{disabled:r,onClick:d,size:"sm",variant:"destructive",children:r?"Resetting…":"Reset conversation"})]})]})]})}const HK={aborted:"bg-amber-400",completed:"bg-zinc-400",error:"bg-red-400",idle:"bg-zinc-500",queued:"bg-emerald-400/70 animate-pulse",running:"bg-emerald-400 animate-pulse"};function D3(e){return HK[e]}function M3(e){switch(e){case"aborted":return"Stopped";case"completed":return"Complete";case"error":return"Needs attention";case"idle":return"Idle";case"queued":return"Queued";case"running":return"Running"}}function zK(e){return b.jsxs(nN,{variant:"outline",className:"gap-1.5 border-border/80 text-muted-foreground",children:[b.jsx("span",{"aria-hidden":!0,className:we("size-1.5 rounded-full",D3(e.status))}),M3(e.status)]})}function P3(e){return b.jsx("span",{"aria-hidden":"true",className:we("inline-block size-1.5 shrink-0 rounded-full",D3(e.status),e.className)})}function FK(e){return e.subagents.length===0?null:b.jsxs("div",{className:"flex flex-col gap-2",children:[b.jsxs("div",{className:"flex items-center gap-1.5 text-muted-foreground",children:[b.jsx(H2,{className:"size-3.5"}),b.jsx("h3",{className:"text-xs font-medium uppercase tracking-wide",children:"Delegated work"})]}),b.jsx("div",{className:"overflow-hidden rounded-md border border-border/60",children:e.subagents.map(t=>b.jsxs("button",{className:"group flex w-full items-center gap-2.5 border-border/60 border-b px-3 py-2.5 text-left outline-none transition-colors last:border-b-0 hover:bg-accent/50 focus-visible:bg-accent/50",onClick:()=>e.onOpenSubagent(t.id),type:"button",children:[b.jsx(P3,{status:t.status}),b.jsxs("span",{className:"min-w-0 flex-1",children:[b.jsx("span",{className:"block truncate text-xs font-medium text-foreground/90",children:t.description}),b.jsxs("span",{className:"block truncate text-[11px] text-muted-foreground",children:["Level ",t.depth," · ",ou(t.modelId)]})]}),b.jsx(B2,{className:"size-3.5 shrink-0 text-muted-foreground transition-transform group-hover:translate-x-0.5"})]},t.id))})]})}function N2(e){return new Date(e).toLocaleString()}function $K(e){const{catalog:t,session:n,summary:r}=e,i=n.agent.type==="subagent",o=t?.models.find(l=>l.id===n.modelId)??n.models.find(l=>l.id===n.modelId);return b.jsxs("div",{className:"flex flex-col gap-4 p-4",children:[b.jsxs("div",{className:"flex flex-col gap-2",children:[b.jsx("h2",{className:"text-sm leading-snug font-medium break-words text-foreground",children:n.title!==void 0&&n.title!==""?n.title:"Untitled session"}),b.jsx(zK,{status:n.status}),i&&b.jsxs("p",{className:"text-xs text-muted-foreground",children:["Subagent history · Level ",n.agent.depth]})]}),b.jsx(cd,{className:"bg-border/60"}),b.jsx(dr,{label:"Working directory",children:b.jsx("p",{className:"font-mono text-xs leading-relaxed break-all text-foreground/90",children:n.cwd})}),b.jsxs(dr,{label:"Model",children:[b.jsx(LK,{catalog:t,disabled:n.modelLocked||i,modelId:n.modelId,onChangeModel:e.changeModel,providerId:n.providerId}),(n.modelLocked||i)&&b.jsx("p",{className:"text-xs text-muted-foreground",children:i?"The model cannot be changed for a completed subagent step.":"The model is locked for this session."})]}),b.jsx(dr,{label:"Reasoning effort",children:b.jsx(OK,{disabled:i,effort:n.effort,levels:o?.thinkingLevels??[],onChangeEffort:e.changeEffort})}),b.jsx(dr,{label:"Permissions",children:b.jsx(MK,{disabled:i,onChangePermissionMode:e.changePermissionMode,permissionMode:n.permissionMode})}),!i&&b.jsx(dr,{label:"Goal",children:b.jsx(IK,{changeStatus:e.changeGoalStatus,clear:e.clearGoal,goal:n.goal,set:e.setGoal})}),n.mcpServers.length>0&&b.jsx(dr,{label:"MCP servers",children:b.jsx("div",{className:"space-y-2",children:n.mcpServers.map(l=>b.jsxs("div",{className:"rounded-md border border-border/60 px-2.5 py-2",children:[b.jsxs("div",{className:"flex items-center justify-between gap-3",children:[b.jsx("span",{className:"truncate font-mono text-xs text-foreground/90",children:l.name}),b.jsx("span",{className:"text-xs text-muted-foreground",children:l.status==="connected"?`${l.toolCount} tool${l.toolCount===1?"":"s"}`:l.status==="disabled"?"Disabled":"Connection failed"})]}),l.errorMessage!==void 0&&b.jsx("p",{className:"mt-1 text-xs leading-relaxed text-destructive",children:l.errorMessage})]},l.name))})}),n.tasks.length>0&&b.jsx(dr,{label:"Tasks",children:b.jsx("div",{className:"space-y-2",children:n.tasks.map(l=>b.jsx("div",{className:"rounded-md border border-border/60 px-2.5 py-2",children:b.jsxs("div",{className:"flex items-start gap-2",children:[b.jsxs("span",{className:"mt-0.5 font-mono text-[10px] text-muted-foreground",children:["#",l.id]}),b.jsxs("div",{className:"min-w-0 flex-1",children:[b.jsx("p",{className:"text-xs leading-relaxed text-foreground/90",children:l.subject}),b.jsxs("p",{className:"text-[11px] text-muted-foreground",children:[l.status==="completed"?"Completed":l.status==="in_progress"?"In progress":"Pending",l.blockedBy.length>0?` · Blocked by ${l.blockedBy.map(c=>`#${c}`).join(", ")}`:""]})]})]})},l.id))})}),b.jsx(cd,{className:"bg-border/60"}),b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(dr,{label:"Created",children:b.jsx("p",{className:"text-xs text-foreground/90",title:r!==void 0?N2(r.createdAt):void 0,children:r!==void 0?hg(r.createdAt):"Not available yet"})}),b.jsx(dr,{label:"Last updated",children:b.jsx("p",{className:"text-xs text-foreground/90",title:r!==void 0?N2(r.updatedAt):void 0,children:r!==void 0?hg(r.updatedAt):"Not available yet"})}),b.jsx(dr,{label:"Messages",children:b.jsx("p",{className:"text-xs text-foreground/90",children:e.messageCount})}),b.jsx(dr,{label:"Tool calls",children:b.jsx("p",{className:"text-xs text-foreground/90",children:e.toolCallCount})})]}),b.jsx(cd,{className:"bg-border/60"}),e.subagents.length>0&&b.jsxs(b.Fragment,{children:[b.jsx(FK,{onOpenSubagent:e.onOpenSubagent,subagents:e.subagents}),b.jsx(cd,{className:"bg-border/60"})]}),i?b.jsx("p",{className:"text-xs leading-relaxed text-muted-foreground",children:"This subagent history is read-only and cannot be resumed or reset."}):b.jsx(UK,{disabled:e.isRunning,onReset:e.reset})]})}function dd(e){return b.jsx("aside",{className:"flex h-full w-[340px] shrink-0 flex-col border-l border-border/60 bg-background",children:e.children})}function R2(e){return b.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 p-6 text-center",children:[e.icon,b.jsx("p",{className:"text-xs text-muted-foreground",children:e.text})]})}function VK(e){const{activeSession:t}=e,{isRunning:n,messages:r,session:i,streamingPartial:o}=t,l=v.useMemo(()=>CK(r,o,n),[n,r,o]),c=v.useMemo(()=>r.filter(d=>d.role!=="system").length,[r]);return e.sessionId===void 0?b.jsx(dd,{children:b.jsx(R2,{icon:b.jsx(WL,{className:"size-5 text-muted-foreground/50"}),text:"Select a session to inspect its details and activity."})}):t.loadError!==void 0?b.jsx(dd,{children:b.jsx(R2,{icon:b.jsx(d0,{className:"size-5 text-red-400"}),text:t.loadError})}):t.isLoading||i===void 0?b.jsx(dd,{children:b.jsxs("div",{className:"flex flex-col gap-4 p-4",children:[b.jsx(Za,{className:"h-8 w-full"}),b.jsx(Za,{className:"h-4 w-2/3"}),b.jsx(Za,{className:"h-4 w-1/2"}),b.jsx(Za,{className:"h-8 w-full"}),b.jsx(Za,{className:"h-8 w-full"})]})}):b.jsx(dd,{children:b.jsxs(EK,{className:"flex h-full min-h-0 flex-col gap-0",defaultValue:"details",children:[b.jsx("div",{className:"shrink-0 border-b border-border/60 p-2",children:b.jsxs(_K,{className:"grid w-full grid-cols-2",children:[b.jsx(w2,{value:"details",children:"Details"}),b.jsx(w2,{value:"activity",children:l.length>0?`Activity (${l.length})`:"Activity"})]})}),b.jsx(k2,{className:"min-h-0 flex-1 overflow-y-auto",value:"details",children:b.jsx($K,{catalog:e.catalog,changeEffort:t.changeEffort,changeModel:t.changeModel,changePermissionMode:t.changePermissionMode,changeGoalStatus:t.changeGoalStatus,clearGoal:t.clearGoal,isRunning:t.isRunning,messageCount:c,onOpenSubagent:e.onOpenSubagent,reset:t.reset,setGoal:t.setGoal,session:i,subagents:t.subagents,summary:e.summary,toolCallCount:l.length})}),b.jsx(k2,{className:"min-h-0 flex-1 overflow-y-auto",value:"activity",children:b.jsx(AK,{entries:l})})]},e.sessionId)})}function GK(e){return e.healthError!==void 0?{dotClass:"bg-red-400",label:"Daemon unreachable"}:e.health?.ready===!0?{dotClass:"bg-emerald-400",label:"Daemon ready"}:e.health?.status==="error"?{dotClass:"bg-red-400",label:e.health.errorMessage??"Daemon failed to start"}:{dotClass:"bg-amber-400 animate-pulse",label:"Daemon starting…"}}function qK(e){const t=GK(e);return b.jsxs("div",{className:"flex items-center gap-2 border-t border-border/60 px-4 py-3",children:[b.jsx("span",{"aria-hidden":"true",className:we("size-1.5 shrink-0 rounded-full",t.dotClass)}),b.jsx("span",{className:"min-w-0 truncate text-xs text-muted-foreground",title:e.healthError??e.health?.errorMessage,children:t.label})]})}function YK(e){const{catalog:t,defaultCwd:n,onSessionCreated:r,refreshSessions:i}=e,[o,l]=v.useState(!1),[c,d]=v.useState(""),[h,p]=v.useState(""),[m,_]=v.useState("workspace_write"),[E,T]=v.useState(!1),[S,A]=v.useState(void 0),C=Zd.find(B=>B.value===m),k=v.useCallback(B=>{l(B),B&&(d(n??""),p(t===void 0?"":lu(t.defaultProviderId,t.defaultModelId)),A(void 0),T(!1),_("workspace_write"))},[t,n]),N=v.useCallback(async()=>{const B=c.trim();if(!(B.length===0||E)){T(!0),A(void 0);try{const D=C3(h),z=await GW({cwd:B,permissionMode:m,...D!==void 0?{modelId:D.modelId,providerId:D.providerId}:{}});l(!1),i(),r(z.session)}catch(D){A(D instanceof Error?D.message:"Could not create the session."),T(!1)}}},[c,E,h,r,m,i]),M=c.trim().length>0&&!E;return b.jsxs(w3,{open:o,onOpenChange:k,children:[b.jsx(k3,{asChild:!0,children:b.jsxs(wt,{variant:"ghost",size:"icon",className:"size-7 text-muted-foreground hover:text-foreground",disabled:!e.daemonReady,title:"New session",children:[b.jsx(JL,{className:"size-4"}),b.jsx("span",{className:"sr-only",children:"New session"})]})}),b.jsx(N3,{className:"sm:max-w-md",children:b.jsxs("form",{className:"contents",onSubmit:B=>{B.preventDefault(),N()},children:[b.jsxs(R3,{children:[b.jsx(L3,{children:"New session"}),b.jsx(I3,{children:"Start a fresh agent conversation in a working directory."})]}),b.jsxs("div",{className:"flex flex-col gap-4",children:[b.jsxs("div",{className:"flex flex-col gap-1.5",children:[b.jsx("label",{htmlFor:"new-session-cwd",className:"text-xs font-medium text-muted-foreground",children:"Working directory"}),b.jsx(v3,{id:"new-session-cwd",value:c,onChange:B=>d(B.target.value),placeholder:"/path/to/project",autoFocus:!0,spellCheck:!1,autoComplete:"off",className:"font-mono text-[13px]"})]}),b.jsxs("div",{className:"flex flex-col gap-1.5",children:[b.jsx("label",{htmlFor:"new-session-model",className:"text-xs font-medium text-muted-foreground",children:"Model"}),b.jsxs(ru,{...h!==""?{value:h}:{},onValueChange:p,children:[b.jsx(iu,{id:"new-session-model",className:"w-full",children:b.jsx(au,{placeholder:"Choose a model"})}),b.jsx(su,{children:t!==void 0&&b.jsx(A3,{catalog:t})})]})]}),b.jsxs("div",{className:"flex flex-col gap-1.5",children:[b.jsx("label",{htmlFor:"new-session-permissions",className:"text-xs font-medium text-muted-foreground",children:"Permissions"}),b.jsxs(ru,{onValueChange:B=>_(B),value:m,children:[b.jsx(iu,{id:"new-session-permissions",className:"w-full",children:b.jsx(au,{placeholder:"Workspace write"})}),b.jsx(su,{children:Zd.map(B=>b.jsx(ti,{value:B.value,children:B.label},B.value))})]}),b.jsx("p",{className:"text-xs leading-relaxed text-muted-foreground",children:C?.description??"Writes stay in the working directory."})]}),S!==void 0&&b.jsx("p",{className:"text-[13px] leading-5 text-destructive",children:S})]}),b.jsxs(O3,{children:[b.jsx(wt,{type:"button",variant:"ghost",onClick:()=>l(!1),disabled:E,children:"Cancel"}),b.jsx(wt,{type:"submit",disabled:!M,children:E?"Creating…":"Create session"})]})]})})]})}function XK(e){const{session:t}=e,n=t.title??"Untitled session";return b.jsxs("button",{type:"button",onClick:e.onSelect,title:`${n} — ${M3(t.status)}`,className:we("w-full rounded-lg px-2.5 py-2 text-left transition-colors outline-none","focus-visible:ring-2 focus-visible:ring-ring/60",e.isActive?"bg-accent text-accent-foreground":"text-foreground/90 hover:bg-accent/50"),children:[b.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[b.jsx("span",{className:"min-w-0 truncate text-[13px] leading-5 font-medium",children:n}),b.jsx("span",{className:"shrink-0 text-[11px] leading-5 text-muted-foreground",children:hg(t.lastMessageAt??t.updatedAt)})]}),b.jsxs("div",{className:"mt-0.5 flex items-center gap-1.5",children:[b.jsx(P3,{status:t.status}),b.jsx("span",{className:"min-w-0 truncate text-[11px] leading-4 text-muted-foreground",children:ou(t.modelId)})]})]})}function QK(e){return e.isLoading?b.jsxs("div",{className:"flex flex-col gap-2 p-2",children:[b.jsx(Za,{className:"h-10 w-full"}),b.jsx(Za,{className:"h-10 w-full"}),b.jsx(Za,{className:"h-10 w-full"})]}):e.listError!==void 0?b.jsx("div",{className:"px-4 py-10 text-center",children:b.jsx("p",{className:"text-xs text-red-400",children:"The session list could not be loaded."})}):b.jsxs("div",{className:"flex flex-col items-center gap-2 px-4 py-10 text-center",children:[b.jsx(z2,{className:"size-5 text-muted-foreground/60"}),b.jsx("p",{className:"text-xs text-muted-foreground",children:"No sessions yet. Create one to start chatting."})]})}function WK(e){return b.jsxs("aside",{className:"flex w-72 shrink-0 flex-col border-r border-border/60 bg-background",children:[b.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b border-border/60 pr-2 pl-4",children:[b.jsx("span",{className:"text-[13px] font-semibold tracking-tight",children:"Rig"}),b.jsx(YK,{catalog:e.health?.catalog,daemonReady:e.health?.ready===!0&&e.healthError===void 0,defaultCwd:e.sessions[0]?.cwd,onSessionCreated:e.onSessionCreated,refreshSessions:e.refreshSessions})]}),b.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto p-2",children:e.sessions.length===0?b.jsx(QK,{isLoading:e.isLoadingSessions,listError:e.sessionListError}):b.jsx("ul",{className:"flex flex-col gap-0.5",children:e.sessions.map(t=>b.jsx("li",{children:b.jsx(XK,{session:t,isActive:t.id===e.activeSessionId,onSelect:()=>e.onSelectSession(t.id)})},t.id))})}),b.jsx(qK,{health:e.health,healthError:e.healthError})]})}function KK(e,t){const n=e.findIndex(r=>r.id===t.id);return n<0?[...e,t].sort((r,i)=>r.createdAt-i.createdAt):e.map((r,i)=>i===n?t:r)}const Td={isAborting:!1,isLoading:!1,loadError:void 0,messages:[],optimistic:[],runError:void 0,session:void 0,streamError:void 0,streamingPartial:void 0,subagents:[],submittedRunIds:[]};function O2(e,t){return e.some(n=>n.id===t.id)?e:[...e,t]}function L2(e){return e.blocks.filter(t=>t.type==="text").map(t=>t.text).join(`
341
+ `)}function ZK(e,t,n){const r=e.filter(l=>l.runId!==t);if(r.length!==e.length)return r;const i=L2(n),o=r.findIndex(l=>l.runId===void 0&&L2(l.message)===i);return o===-1?r:r.filter((l,c)=>c!==o)}function JK(e,t){switch(t.type){case"session_created":return{...e,session:t.data.session};case"message_submitted":return{...e,messages:O2(e.messages,t.data.message),optimistic:ZK(e.optimistic,t.data.runId,t.data.message),submittedRunIds:[...e.submittedRunIds,t.data.runId]};case"run_started":return{...e,isAborting:!1,runError:void 0,session:e.session!==void 0?{...e.session,status:"running"}:void 0};case"agent_event":{const n=t.data.event;return n.type==="inference_iteration_start"?e:"partial"in n?{...e,streamingPartial:n.partial}:e}case"agent_message":return{...e,messages:O2(e.messages,t.data.message),streamingPartial:void 0};case"run_finished":return{...e,isAborting:!1,streamingPartial:void 0,session:e.session!==void 0?{...e.session,status:t.data.stopReason==="aborted"?"aborted":"completed"}:void 0};case"run_error":return e.isAborting?{...e,streamingPartial:void 0,session:e.session!==void 0?{...e.session,status:"aborted"}:void 0}:{...e,isAborting:!1,runError:t.data.errorMessage,streamingPartial:void 0,session:e.session!==void 0?{...e.session,status:"error"}:void 0};case"abort_requested":return{...e,isAborting:!0};case"session_reset":return{...e,messages:t.data.snapshot.messages,optimistic:[],runError:void 0,streamingPartial:void 0,session:e.session!==void 0?{...e.session,snapshot:t.data.snapshot}:void 0};case"session_title_changed":{if(e.session===void 0)return e;const n={...e.session,titleStatus:t.data.status};return t.data.title!==void 0&&(n.title=t.data.title),t.data.errorMessage!==void 0&&(n.titleError=t.data.errorMessage),{...e,session:n}}case"model_changed":case"effort_changed":{if(e.session===void 0)return e;const n={...e.session,modelId:t.data.modelId,snapshot:t.data.snapshot};return t.data.effort!==void 0?n.effort=t.data.effort:delete n.effort,{...e,session:n}}case"permission_mode_changed":return e.session===void 0?e:{...e,session:{...e.session,permissionMode:t.data.permissionMode}};case"user_input_requested":{if(e.session===void 0)return e;const n=e.session.pendingUserInputs.filter(r=>r.requestId!==t.data.requestId);return{...e,session:{...e.session,pendingUserInputs:[...n,t.data]}}}case"user_input_resolved":return e.session===void 0?e:{...e,session:{...e.session,pendingUserInputs:e.session.pendingUserInputs.filter(n=>n.requestId!==t.data.requestId)}};case"mcp_servers_changed":return e.session===void 0?e:{...e,session:{...e.session,mcpServers:t.data.servers}};case"tasks_changed":return e.session===void 0?e:{...e,session:{...e.session,tasks:t.data.tasks}};case"goal_changed":{if(e.session===void 0)return e;if(t.data.goal===null){const n={...e.session};return delete n.goal,{...e,session:n}}return{...e,session:{...e.session,goal:t.data.goal}}}case"subagent_changed":return{...e,subagents:KK(e.subagents,t.data.subagent)}}}function eZ(e,t){switch(t.type){case"reset_for_session":return{...Td,isLoading:!0};case"session_loaded":return{...Td,isLoading:!1,messages:t.session.snapshot.messages,session:t.session,subagents:t.subagents};case"load_failed":return{...Td,isLoading:!1,loadError:t.errorMessage};case"server_event":return JK(e,t.event);case"stream_rejected":return{...e,streamError:t.errorMessage};case"optimistic_added":return e.session?.id!==t.sessionId?e:{...e,optimistic:[...e.optimistic,{localId:t.localId,message:t.message,runId:void 0}],runError:void 0};case"optimistic_run_assigned":return e.session?.id!==t.sessionId?e:e.submittedRunIds.includes(t.runId)?{...e,optimistic:e.optimistic.filter(n=>n.localId!==t.localId)}:{...e,optimistic:e.optimistic.map(n=>n.localId===t.localId?{...n,runId:t.runId}:n)};case"optimistic_failed":return e.session?.id!==t.sessionId?e:{...e,optimistic:e.optimistic.filter(n=>n.localId!==t.localId),runError:t.errorMessage};case"session_replaced":return{...e,messages:t.session.snapshot.messages,optimistic:[],runError:void 0,session:t.session,streamingPartial:void 0};case"session_updated":return{...e,session:t.session}}}function I2(e,t){return e instanceof Error?e.message:t}function tZ(e){const[t,n]=v.useReducer(eZ,Td);v.useEffect(()=>{if(e===void 0){n({type:"reset_for_session"});return}const S=new AbortController;return n({type:"reset_for_session"}),(async()=>{let C;try{const[k,N]=await Promise.all([A2(e),S2(e)]);C=k.session,S.signal.aborted||n({type:"session_loaded",session:C,subagents:N.subagents})}catch(k){S.signal.aborted||n({type:"load_failed",errorMessage:I2(k,"The session could not be loaded.")});return}S.signal.aborted||await aK(e,C.lastEventId,k=>{n({type:"server_event",event:k})},S.signal,{onCursorInvalid:async()=>{const[k,N]=await Promise.all([A2(e),S2(e)]);if(!S.signal.aborted)return n({type:"session_loaded",session:k.session,subagents:N.subagents}),k.session.lastEventId},onStreamRejected:k=>{n({type:"stream_rejected",errorMessage:`The daemon rejected the event stream (HTTP ${k}).`})}})})(),()=>{S.abort()}},[e]);const r=v.useCallback(async(S,A)=>{if(e===void 0||t.session?.agent.type==="subagent")return!1;const C=`optimistic-${crypto.randomUUID()}`,k=[...A??[],...S!==""?[{type:"text",text:S}]:[]];n({type:"optimistic_added",localId:C,message:{role:"user",id:C,blocks:k},sessionId:e});try{const M=await qW(e,A!==void 0&&A.length>0?{text:S,content:k}:{text:S});return n({type:"optimistic_run_assigned",localId:C,runId:M.runId,sessionId:e}),!0}catch(M){return n({type:"optimistic_failed",localId:C,errorMessage:I2(M,"The message could not be sent."),sessionId:e}),!1}},[e,t.session?.agent.type]),i=v.useCallback(async()=>{e!==void 0&&await YW(e)},[e]),o=v.useCallback(async(S,A)=>{if(e===void 0)return;const C=await XW(e,S,A);n({type:"session_updated",session:C.session})},[e]),l=v.useCallback(async()=>{if(e===void 0)return;const S=await QW(e);n({type:"session_replaced",session:S.session})},[e]),c=v.useCallback(async(S,A,C)=>{if(e===void 0)return;const k=await WW(e,C!==void 0?{modelId:A,providerId:S,effort:C}:{modelId:A,providerId:S});n({type:"session_updated",session:k.session})},[e]),d=v.useCallback(async S=>{if(e===void 0)return;const A=await KW(e,S!==void 0?{effort:S}:{});n({type:"session_updated",session:A.session})},[e]),h=v.useCallback(async S=>{if(e===void 0)return;const A=await ZW(e,{permissionMode:S});n({type:"session_updated",session:A.session})},[e]),p=v.useCallback(async S=>{if(e===void 0)return;const A=await JW(e,{objective:S});n({type:"session_updated",session:A.session})},[e]),m=v.useCallback(async S=>{if(e===void 0)return;const A=await eK(e,{status:S});n({type:"session_updated",session:A.session})},[e]),_=v.useCallback(async()=>{if(e===void 0)return;const S=await tK(e);n({type:"session_updated",session:S.session})},[e]),E=v.useMemo(()=>t.optimistic.length===0?t.messages:[...t.messages,...t.optimistic.map(S=>S.message)],[t.messages,t.optimistic]),T=t.session!==void 0&&(t.session.status==="running"||t.session.status==="queued");return{abort:i,answerUserInput:o,changeEffort:d,changeModel:c,changePermissionMode:h,changeGoalStatus:m,clearGoal:_,isAborting:t.isAborting,isLoading:t.isLoading,isRunning:T,loadError:t.loadError,messages:E,pendingUserInputs:t.session?.pendingUserInputs??[],reset:l,setGoal:p,runError:t.runError,session:t.session,streamError:t.streamError,streamingPartial:t.streamingPartial,subagents:t.subagents,submit:r}}const nZ=5e3;function rZ(){const[e,t]=v.useState(void 0),[n,r]=v.useState(void 0);return v.useEffect(()=>{let i=!1;const o=async()=>{try{const c=await FW();i||(t(c),r(void 0))}catch(c){i||r(c instanceof Error?c.message:"The daemon could not be reached.")}};o();const l=window.setInterval(()=>{o()},nZ);return()=>{i=!0,window.clearInterval(l)}},[]),{error:n,health:e}}const aZ=5e3;function iZ(){const[e,t]=v.useState([]),[n,r]=v.useState(void 0),[i,o]=v.useState(!0),[l,c]=v.useState(0),d=v.useCallback(()=>{c(h=>h+1)},[]);return v.useEffect(()=>{let h=!1;const p=async()=>{try{const _=await $W();h||(t(_.sessions),r(void 0))}catch(_){h||r(_ instanceof Error?_.message:"The session list could not be loaded.")}finally{h||o(!1)}};p();const m=window.setInterval(()=>{p()},aZ);return()=>{h=!0,window.clearInterval(m)}},[l]),{error:n,isLoading:i,refresh:d,sessions:e}}function sZ(){const[e,t]=v.useState([]),n=e.at(-1),r=e.at(0),{health:i,error:o}=rZ(),l=iZ(),c=tZ(n),{refresh:d}=l,h=v.useCallback(A=>{t([A.id]),d()},[d]),p=v.useCallback(A=>{t([A])},[]),m=v.useCallback(A=>{t(C=>C.at(-1)===A?C:[...C,A])},[]),_=v.useCallback(()=>{t(A=>A.length>1?A.slice(0,-1):A)},[]),E=c.session?.title,T=c.session?.status;v.useEffect(()=>{d()},[E,T,d]);const S=l.sessions.find(A=>A.id===n);return b.jsxs("div",{className:"flex h-screen min-w-[1100px] bg-background text-foreground",children:[b.jsx(WK,{activeSessionId:r,health:i,healthError:o,isLoadingSessions:l.isLoading,onSelectSession:p,onSessionCreated:h,refreshSessions:d,sessionListError:l.error,sessions:l.sessions}),b.jsx(bK,{activeSession:c,daemonReady:i?.ready===!0&&o===void 0,historyDepth:Math.max(0,e.length-1),onBackToParent:_,onOpenSubagent:m,sessionId:n}),b.jsx(VK,{activeSession:c,catalog:i?.catalog,onOpenSubagent:m,sessionId:n,summary:S})]})}oL.createRoot(document.getElementById("root")).render(b.jsx(v.StrictMode,{children:b.jsx(sZ,{})}));const oZ=Object.freeze(Object.defineProperty({__proto__:null,Mermaid:eN},Symbol.toStringTag,{value:"Module"}));export{tV as A,hZ as L,Vn as R,b as j,v as r};