@coralai/sps-cli 0.55.13 → 0.56.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (428) hide show
  1. package/dist/commands/cardMarkComplete.d.ts.map +1 -1
  2. package/dist/commands/cardMarkComplete.js +6 -3
  3. package/dist/commands/cardMarkComplete.js.map +1 -1
  4. package/dist/commands/projectInit.d.ts +18 -16
  5. package/dist/commands/projectInit.d.ts.map +1 -1
  6. package/dist/commands/projectInit.js +59 -186
  7. package/dist/commands/projectInit.js.map +1 -1
  8. package/dist/commands/skillCommand.js +7 -4
  9. package/dist/commands/skillCommand.js.map +1 -1
  10. package/dist/commands/tick.d.ts +2 -20
  11. package/dist/commands/tick.d.ts.map +1 -1
  12. package/dist/commands/tick.js +58 -1
  13. package/dist/commands/tick.js.map +1 -1
  14. package/dist/console/index.d.ts.map +1 -1
  15. package/dist/console/index.js +4 -0
  16. package/dist/console/index.js.map +1 -1
  17. package/dist/console/routes/chat.d.ts.map +1 -1
  18. package/dist/console/routes/chat.js +121 -0
  19. package/dist/console/routes/chat.js.map +1 -1
  20. package/dist/console/routes/projects.d.ts +0 -6
  21. package/dist/console/routes/projects.d.ts.map +1 -1
  22. package/dist/console/routes/projects.js +11 -2
  23. package/dist/console/routes/projects.js.map +1 -1
  24. package/dist/console/routes/providers.d.ts +10 -0
  25. package/dist/console/routes/providers.d.ts.map +1 -0
  26. package/dist/console/routes/providers.js +63 -0
  27. package/dist/console/routes/providers.js.map +1 -0
  28. package/dist/console/routes/smartarrange.d.ts +4 -0
  29. package/dist/console/routes/smartarrange.d.ts.map +1 -0
  30. package/dist/console/routes/smartarrange.js +107 -0
  31. package/dist/console/routes/smartarrange.js.map +1 -0
  32. package/dist/console/routes/system.d.ts.map +1 -1
  33. package/dist/console/routes/system.js +28 -0
  34. package/dist/console/routes/system.js.map +1 -1
  35. package/dist/console/routes/workers.d.ts.map +1 -1
  36. package/dist/console/routes/workers.js +36 -4
  37. package/dist/console/routes/workers.js.map +1 -1
  38. package/dist/console-assets/assets/index-CWkYVI5d.js +600 -0
  39. package/dist/console-assets/assets/index-CnUBHNsN.css +10 -0
  40. package/dist/console-assets/index.html +2 -2
  41. package/dist/core/agents/AcpBackend.d.ts +24 -0
  42. package/dist/core/agents/AcpBackend.d.ts.map +1 -0
  43. package/dist/core/agents/AcpBackend.js +86 -0
  44. package/dist/core/agents/AcpBackend.js.map +1 -0
  45. package/dist/core/agents/AgentBackend.d.ts +53 -0
  46. package/dist/core/agents/AgentBackend.d.ts.map +1 -0
  47. package/dist/core/agents/AgentBackend.js +18 -0
  48. package/dist/core/agents/AgentBackend.js.map +1 -0
  49. package/dist/core/agents/ClaudeAcpBackend.d.ts +13 -0
  50. package/dist/core/agents/ClaudeAcpBackend.d.ts.map +1 -0
  51. package/dist/core/agents/ClaudeAcpBackend.js +14 -0
  52. package/dist/core/agents/ClaudeAcpBackend.js.map +1 -0
  53. package/dist/core/agents/ClaudeSdkBackend.d.ts +26 -0
  54. package/dist/core/agents/ClaudeSdkBackend.d.ts.map +1 -0
  55. package/dist/core/agents/ClaudeSdkBackend.js +102 -0
  56. package/dist/core/agents/ClaudeSdkBackend.js.map +1 -0
  57. package/dist/core/agents/CodexAppServerBackend.d.ts +33 -0
  58. package/dist/core/agents/CodexAppServerBackend.d.ts.map +1 -0
  59. package/dist/core/agents/CodexAppServerBackend.js +168 -0
  60. package/dist/core/agents/CodexAppServerBackend.js.map +1 -0
  61. package/dist/core/agents/OpenAiAgentBackend.d.ts +39 -0
  62. package/dist/core/agents/OpenAiAgentBackend.d.ts.map +1 -0
  63. package/dist/core/agents/OpenAiAgentBackend.js +132 -0
  64. package/dist/core/agents/OpenAiAgentBackend.js.map +1 -0
  65. package/dist/core/agents/agentsMd.d.ts +2 -0
  66. package/dist/core/agents/agentsMd.d.ts.map +1 -0
  67. package/dist/core/agents/agentsMd.js +22 -0
  68. package/dist/core/agents/agentsMd.js.map +1 -0
  69. package/dist/core/agents/localTracing.d.ts +3 -0
  70. package/dist/core/agents/localTracing.d.ts.map +1 -0
  71. package/dist/core/agents/localTracing.js +42 -0
  72. package/dist/core/agents/localTracing.js.map +1 -0
  73. package/dist/core/agents/resolveBackend.d.ts +26 -0
  74. package/dist/core/agents/resolveBackend.d.ts.map +1 -0
  75. package/dist/core/agents/resolveBackend.js +27 -0
  76. package/dist/core/agents/resolveBackend.js.map +1 -0
  77. package/dist/core/agents/workerOutputSink.d.ts +4 -0
  78. package/dist/core/agents/workerOutputSink.d.ts.map +1 -0
  79. package/dist/core/agents/workerOutputSink.js +39 -0
  80. package/dist/core/agents/workerOutputSink.js.map +1 -0
  81. package/dist/core/config.d.ts +6 -0
  82. package/dist/core/config.d.ts.map +1 -1
  83. package/dist/core/config.js +4 -0
  84. package/dist/core/config.js.map +1 -1
  85. package/dist/core/intel/RuntimeSession.d.ts +16 -0
  86. package/dist/core/intel/RuntimeSession.d.ts.map +1 -0
  87. package/dist/core/intel/RuntimeSession.js +89 -0
  88. package/dist/core/intel/RuntimeSession.js.map +1 -0
  89. package/dist/core/intel/agentsConfig.d.ts +20 -0
  90. package/dist/core/intel/agentsConfig.d.ts.map +1 -0
  91. package/dist/core/intel/agentsConfig.js +68 -0
  92. package/dist/core/intel/agentsConfig.js.map +1 -0
  93. package/dist/core/intel/planStore.d.ts +23 -0
  94. package/dist/core/intel/planStore.d.ts.map +1 -0
  95. package/dist/core/intel/planStore.js +67 -0
  96. package/dist/core/intel/planStore.js.map +1 -0
  97. package/dist/core/intel/types.d.ts +86 -0
  98. package/dist/core/intel/types.d.ts.map +1 -0
  99. package/dist/core/intel/types.js +8 -0
  100. package/dist/core/intel/types.js.map +1 -0
  101. package/dist/core/memoryIngest.d.ts +18 -0
  102. package/dist/core/memoryIngest.d.ts.map +1 -0
  103. package/dist/core/memoryIngest.js +56 -0
  104. package/dist/core/memoryIngest.js.map +1 -0
  105. package/dist/core/memoryProvider.d.ts +63 -0
  106. package/dist/core/memoryProvider.d.ts.map +1 -0
  107. package/dist/core/memoryProvider.js +205 -0
  108. package/dist/core/memoryProvider.js.map +1 -0
  109. package/dist/core/skillStore.d.ts.map +1 -1
  110. package/dist/core/skillStore.js +2 -1
  111. package/dist/core/skillStore.js.map +1 -1
  112. package/dist/core/skills/SkillsManager.d.ts +38 -0
  113. package/dist/core/skills/SkillsManager.d.ts.map +1 -0
  114. package/dist/core/skills/SkillsManager.js +231 -0
  115. package/dist/core/skills/SkillsManager.js.map +1 -0
  116. package/dist/core/skills/distribution.d.ts +64 -0
  117. package/dist/core/skills/distribution.d.ts.map +1 -0
  118. package/dist/core/skills/distribution.js +269 -0
  119. package/dist/core/skills/distribution.js.map +1 -0
  120. package/dist/core/skills/index.d.ts +13 -0
  121. package/dist/core/skills/index.d.ts.map +1 -0
  122. package/dist/core/skills/index.js +13 -0
  123. package/dist/core/skills/index.js.map +1 -0
  124. package/dist/core/skills/types.d.ts +44 -0
  125. package/dist/core/skills/types.d.ts.map +1 -0
  126. package/dist/core/skills/types.js +9 -0
  127. package/dist/core/skills/types.js.map +1 -0
  128. package/dist/core/taskPrompts.d.ts +0 -12
  129. package/dist/core/taskPrompts.d.ts.map +1 -1
  130. package/dist/core/taskPrompts.js +0 -14
  131. package/dist/core/taskPrompts.js.map +1 -1
  132. package/dist/core/transcriptIngest.d.ts +37 -0
  133. package/dist/core/transcriptIngest.d.ts.map +1 -0
  134. package/dist/core/transcriptIngest.js +137 -0
  135. package/dist/core/transcriptIngest.js.map +1 -0
  136. package/dist/core/wiki/types.d.ts +282 -745
  137. package/dist/core/wiki/types.d.ts.map +1 -1
  138. package/dist/core/wiki/types.js +1 -1
  139. package/dist/core/wiki/types.js.map +1 -1
  140. package/dist/engines/SmartArrangeEngine.d.ts +75 -0
  141. package/dist/engines/SmartArrangeEngine.d.ts.map +1 -0
  142. package/dist/engines/SmartArrangeEngine.js +112 -0
  143. package/dist/engines/SmartArrangeEngine.js.map +1 -0
  144. package/dist/engines/StageEngine.d.ts +3 -17
  145. package/dist/engines/StageEngine.d.ts.map +1 -1
  146. package/dist/engines/StageEngine.js +13 -91
  147. package/dist/engines/StageEngine.js.map +1 -1
  148. package/dist/engines/smartarrange/AcpWorkerExec.d.ts +35 -0
  149. package/dist/engines/smartarrange/AcpWorkerExec.d.ts.map +1 -0
  150. package/dist/engines/smartarrange/AcpWorkerExec.js +71 -0
  151. package/dist/engines/smartarrange/AcpWorkerExec.js.map +1 -0
  152. package/dist/engines/smartarrange/cardSink.d.ts +29 -0
  153. package/dist/engines/smartarrange/cardSink.d.ts.map +1 -0
  154. package/dist/engines/smartarrange/cardSink.js +43 -0
  155. package/dist/engines/smartarrange/cardSink.js.map +1 -0
  156. package/dist/engines/smartarrange/runner.d.ts +24 -0
  157. package/dist/engines/smartarrange/runner.d.ts.map +1 -0
  158. package/dist/engines/smartarrange/runner.js +116 -0
  159. package/dist/engines/smartarrange/runner.js.map +1 -0
  160. package/dist/engines/smartarrange/screenshot.d.ts +5 -0
  161. package/dist/engines/smartarrange/screenshot.d.ts.map +1 -0
  162. package/dist/engines/smartarrange/screenshot.js +117 -0
  163. package/dist/engines/smartarrange/screenshot.js.map +1 -0
  164. package/dist/main.js +127 -92
  165. package/dist/main.js.map +1 -1
  166. package/dist/manager/worker-manager-impl.d.ts.map +1 -1
  167. package/dist/manager/worker-manager-impl.js +7 -0
  168. package/dist/manager/worker-manager-impl.js.map +1 -1
  169. package/dist/providers/LLMClient.d.ts +32 -0
  170. package/dist/providers/LLMClient.d.ts.map +1 -0
  171. package/dist/providers/LLMClient.js +108 -0
  172. package/dist/providers/LLMClient.js.map +1 -0
  173. package/dist/providers/MarkdownTaskBackend.d.ts.map +1 -1
  174. package/dist/providers/MarkdownTaskBackend.js +3 -2
  175. package/dist/providers/MarkdownTaskBackend.js.map +1 -1
  176. package/dist/providers/llm/chatTools.d.ts +11 -0
  177. package/dist/providers/llm/chatTools.d.ts.map +1 -0
  178. package/dist/providers/llm/chatTools.js +57 -0
  179. package/dist/providers/llm/chatTools.js.map +1 -0
  180. package/dist/providers/llm/codexAuth.d.ts +8 -0
  181. package/dist/providers/llm/codexAuth.d.ts.map +1 -0
  182. package/dist/providers/llm/codexAuth.js +57 -0
  183. package/dist/providers/llm/codexAuth.js.map +1 -0
  184. package/dist/providers/llm/codexModel.d.ts +14 -0
  185. package/dist/providers/llm/codexModel.d.ts.map +1 -0
  186. package/dist/providers/llm/codexModel.js +96 -0
  187. package/dist/providers/llm/codexModel.js.map +1 -0
  188. package/dist/providers/llm/localSubscription.d.ts +15 -0
  189. package/dist/providers/llm/localSubscription.d.ts.map +1 -0
  190. package/dist/providers/llm/localSubscription.js +66 -0
  191. package/dist/providers/llm/localSubscription.js.map +1 -0
  192. package/dist/providers/llm/modelFactory.d.ts +14 -0
  193. package/dist/providers/llm/modelFactory.d.ts.map +1 -0
  194. package/dist/providers/llm/modelFactory.js +22 -0
  195. package/dist/providers/llm/modelFactory.js.map +1 -0
  196. package/dist/providers/llm/monitorSkills.d.ts +6 -0
  197. package/dist/providers/llm/monitorSkills.d.ts.map +1 -0
  198. package/dist/providers/llm/monitorSkills.js +37 -0
  199. package/dist/providers/llm/monitorSkills.js.map +1 -0
  200. package/dist/providers/llm/probeTools.d.ts +7 -0
  201. package/dist/providers/llm/probeTools.d.ts.map +1 -0
  202. package/dist/providers/llm/probeTools.js +84 -0
  203. package/dist/providers/llm/probeTools.js.map +1 -0
  204. package/dist/providers/llm/providers.d.ts +26 -0
  205. package/dist/providers/llm/providers.d.ts.map +1 -0
  206. package/dist/providers/llm/providers.js +68 -0
  207. package/dist/providers/llm/providers.js.map +1 -0
  208. package/dist/providers/llm/skillTools.d.ts +4 -0
  209. package/dist/providers/llm/skillTools.d.ts.map +1 -0
  210. package/dist/providers/llm/skillTools.js +42 -0
  211. package/dist/providers/llm/skillTools.js.map +1 -0
  212. package/dist/providers/llm/workerTools.d.ts +9 -0
  213. package/dist/providers/llm/workerTools.d.ts.map +1 -0
  214. package/dist/providers/llm/workerTools.js +111 -0
  215. package/dist/providers/llm/workerTools.js.map +1 -0
  216. package/dist/providers/mcp/spsMcpServer.d.ts +15 -0
  217. package/dist/providers/mcp/spsMcpServer.d.ts.map +1 -0
  218. package/dist/providers/mcp/spsMcpServer.js +67 -0
  219. package/dist/providers/mcp/spsMcpServer.js.map +1 -0
  220. package/dist/providers/mcp/spsMcpStdio.d.ts +2 -0
  221. package/dist/providers/mcp/spsMcpStdio.d.ts.map +1 -0
  222. package/dist/providers/mcp/spsMcpStdio.js +32 -0
  223. package/dist/providers/mcp/spsMcpStdio.js.map +1 -0
  224. package/dist/providers/mcp/spsMcpStdioConfig.d.ts +11 -0
  225. package/dist/providers/mcp/spsMcpStdioConfig.d.ts.map +1 -0
  226. package/dist/providers/mcp/spsMcpStdioConfig.js +19 -0
  227. package/dist/providers/mcp/spsMcpStdioConfig.js.map +1 -0
  228. package/dist/server.d.ts +23 -0
  229. package/dist/server.d.ts.map +1 -1
  230. package/dist/server.js +23 -0
  231. package/dist/server.js.map +1 -1
  232. package/dist/services/ChatService.d.ts +8 -0
  233. package/dist/services/ChatService.d.ts.map +1 -1
  234. package/dist/services/ChatService.js +2 -0
  235. package/dist/services/ChatService.js.map +1 -1
  236. package/dist/services/LogService.d.ts +1 -1
  237. package/dist/services/LogService.d.ts.map +1 -1
  238. package/dist/services/LogService.js +3 -2
  239. package/dist/services/LogService.js.map +1 -1
  240. package/dist/services/ProjectService.d.ts +12 -2
  241. package/dist/services/ProjectService.d.ts.map +1 -1
  242. package/dist/services/ProjectService.js +1 -0
  243. package/dist/services/ProjectService.js.map +1 -1
  244. package/dist/services/SkillService.js +11 -13
  245. package/dist/services/SkillService.js.map +1 -1
  246. package/dist/services/SmartArrangeService.d.ts +12 -0
  247. package/dist/services/SmartArrangeService.d.ts.map +1 -0
  248. package/dist/services/SmartArrangeService.js +37 -0
  249. package/dist/services/SmartArrangeService.js.map +1 -0
  250. package/dist/services/SystemService.d.ts +20 -0
  251. package/dist/services/SystemService.d.ts.map +1 -1
  252. package/dist/services/SystemService.js +93 -0
  253. package/dist/services/SystemService.js.map +1 -1
  254. package/dist/services/WorkerService.d.ts +8 -0
  255. package/dist/services/WorkerService.d.ts.map +1 -1
  256. package/dist/services/WorkerService.js +73 -3
  257. package/dist/services/WorkerService.js.map +1 -1
  258. package/dist/services/container.d.ts +2 -0
  259. package/dist/services/container.d.ts.map +1 -1
  260. package/dist/services/container.js +2 -0
  261. package/dist/services/container.js.map +1 -1
  262. package/dist/shared/localTime.d.ts +8 -0
  263. package/dist/shared/localTime.d.ts.map +1 -0
  264. package/dist/shared/localTime.js +11 -0
  265. package/dist/shared/localTime.js.map +1 -0
  266. package/dist/shared/runtimePaths.d.ts +1 -1
  267. package/dist/shared/runtimePaths.d.ts.map +1 -1
  268. package/dist/shared/runtimePaths.js +2 -2
  269. package/dist/shared/runtimePaths.js.map +1 -1
  270. package/dist/shared/runtimeSchemas.d.ts +74 -245
  271. package/dist/shared/runtimeSchemas.d.ts.map +1 -1
  272. package/dist/shared/runtimeSchemas.js +2 -2
  273. package/dist/shared/runtimeSchemas.js.map +1 -1
  274. package/monitor-skills/probe-playbook/SKILL.md +32 -0
  275. package/monitor-skills/visual-rubric/SKILL.md +34 -0
  276. package/package.json +8 -8
  277. package/project-template/.claude/hooks/stop.sh +3 -1
  278. package/dist/console-assets/assets/index-BvWWj69G.js +0 -557
  279. package/dist/console-assets/assets/index-Eo4PuNPl.css +0 -10
  280. package/dist/interfaces/ACPClient.d.ts +0 -107
  281. package/dist/interfaces/ACPClient.d.ts.map +0 -1
  282. package/dist/interfaces/ACPClient.js +0 -17
  283. package/dist/interfaces/ACPClient.js.map +0 -1
  284. package/dist/interfaces/AgentRuntime.d.ts +0 -40
  285. package/dist/interfaces/AgentRuntime.d.ts.map +0 -1
  286. package/dist/interfaces/AgentRuntime.js +0 -17
  287. package/dist/interfaces/AgentRuntime.js.map +0 -1
  288. package/dist/manager/agentmemory.d.ts +0 -6
  289. package/dist/manager/agentmemory.d.ts.map +0 -1
  290. package/dist/manager/agentmemory.js +0 -73
  291. package/dist/manager/agentmemory.js.map +0 -1
  292. package/dist/models/acp.d.ts +0 -64
  293. package/dist/models/acp.d.ts.map +0 -1
  294. package/dist/models/acp.js +0 -17
  295. package/dist/models/acp.js.map +0 -1
  296. package/dist/providers/LocalACPClient.d.ts +0 -27
  297. package/dist/providers/LocalACPClient.d.ts.map +0 -1
  298. package/dist/providers/LocalACPClient.js +0 -26
  299. package/dist/providers/LocalACPClient.js.map +0 -1
  300. package/dist/providers/adapters/AcpSdkAdapter.d.ts +0 -24
  301. package/dist/providers/adapters/AcpSdkAdapter.d.ts.map +0 -1
  302. package/dist/providers/adapters/AcpSdkAdapter.js +0 -439
  303. package/dist/providers/adapters/AcpSdkAdapter.js.map +0 -1
  304. package/dist/providers/adapters/acp-fs-handlers.d.ts +0 -26
  305. package/dist/providers/adapters/acp-fs-handlers.d.ts.map +0 -1
  306. package/dist/providers/adapters/acp-fs-handlers.js +0 -61
  307. package/dist/providers/adapters/acp-fs-handlers.js.map +0 -1
  308. package/dist/providers/adapters/acp-permissions.d.ts +0 -42
  309. package/dist/providers/adapters/acp-permissions.d.ts.map +0 -1
  310. package/dist/providers/adapters/acp-permissions.js +0 -76
  311. package/dist/providers/adapters/acp-permissions.js.map +0 -1
  312. package/dist/providers/adapters/acp-session-accumulator.d.ts +0 -55
  313. package/dist/providers/adapters/acp-session-accumulator.d.ts.map +0 -1
  314. package/dist/providers/adapters/acp-session-accumulator.js +0 -133
  315. package/dist/providers/adapters/acp-session-accumulator.js.map +0 -1
  316. package/dist/providers/adapters/acp-terminal-manager.d.ts +0 -56
  317. package/dist/providers/adapters/acp-terminal-manager.d.ts.map +0 -1
  318. package/dist/providers/adapters/acp-terminal-manager.js +0 -127
  319. package/dist/providers/adapters/acp-terminal-manager.js.map +0 -1
  320. package/project-template/logs/.gitkeep +0 -0
  321. package/skills/architecture-decision-records/SKILL.md +0 -207
  322. package/skills/backend/SKILL.md +0 -62
  323. package/skills/backend/references/api-design.md +0 -168
  324. package/skills/backend/references/caching.md +0 -181
  325. package/skills/backend/references/data-access.md +0 -173
  326. package/skills/backend/references/layering.md +0 -181
  327. package/skills/backend/references/observability.md +0 -190
  328. package/skills/backend/references/resilience.md +0 -201
  329. package/skills/backend/references/security.md +0 -186
  330. package/skills/backend-architect/SKILL.md +0 -119
  331. package/skills/code-reviewer/SKILL.md +0 -143
  332. package/skills/coding-standards/SKILL.md +0 -60
  333. package/skills/coding-standards/references/clean-code.md +0 -258
  334. package/skills/coding-standards/references/code-review.md +0 -192
  335. package/skills/coding-standards/references/commits-and-prs.md +0 -226
  336. package/skills/coding-standards/references/error-strategy.md +0 -193
  337. package/skills/coding-standards/references/naming.md +0 -185
  338. package/skills/coding-standards/references/tdd.md +0 -171
  339. package/skills/database/SKILL.md +0 -53
  340. package/skills/database/references/indexing.md +0 -190
  341. package/skills/database/references/migrations.md +0 -199
  342. package/skills/database/references/nosql.md +0 -185
  343. package/skills/database/references/queries.md +0 -295
  344. package/skills/database/references/scaling.md +0 -203
  345. package/skills/database/references/schema.md +0 -191
  346. package/skills/database-optimizer/SKILL.md +0 -168
  347. package/skills/debugging-workflow/SKILL.md +0 -244
  348. package/skills/dev-worker/SKILL.md +0 -40
  349. package/skills/dev-worker/references/architect.md +0 -139
  350. package/skills/dev-worker/references/backend.md +0 -163
  351. package/skills/dev-worker/references/frontend.md +0 -122
  352. package/skills/dev-worker/references/fullstack.md +0 -179
  353. package/skills/dev-worker/references/optimizer.md +0 -151
  354. package/skills/dev-worker/references/phaser.md +0 -109
  355. package/skills/dev-worker/references/prototyper.md +0 -171
  356. package/skills/dev-worker/references/reviewer.md +0 -122
  357. package/skills/dev-worker/references/security.md +0 -154
  358. package/skills/dev-worker/references/senior.md +0 -155
  359. package/skills/dev-worker/references/typescript.md +0 -65
  360. package/skills/dev-worker/references/writer.md +0 -201
  361. package/skills/devops/SKILL.md +0 -55
  362. package/skills/devops/references/ci-cd.md +0 -204
  363. package/skills/devops/references/containers.md +0 -272
  364. package/skills/devops/references/deploy.md +0 -201
  365. package/skills/devops/references/iac.md +0 -252
  366. package/skills/devops/references/observability.md +0 -228
  367. package/skills/devops/references/secrets.md +0 -178
  368. package/skills/devops-automator/SKILL.md +0 -164
  369. package/skills/frontend/SKILL.md +0 -52
  370. package/skills/frontend/references/accessibility.md +0 -222
  371. package/skills/frontend/references/components.md +0 -206
  372. package/skills/frontend/references/performance.md +0 -219
  373. package/skills/frontend/references/routing.md +0 -209
  374. package/skills/frontend/references/state.md +0 -190
  375. package/skills/frontend/references/testing.md +0 -216
  376. package/skills/frontend-developer/SKILL.md +0 -115
  377. package/skills/git-workflow/SKILL.md +0 -355
  378. package/skills/golang/SKILL.md +0 -49
  379. package/skills/golang/references/concurrency.md +0 -284
  380. package/skills/golang/references/errors.md +0 -241
  381. package/skills/golang/references/idioms.md +0 -285
  382. package/skills/golang/references/testing.md +0 -238
  383. package/skills/java/SKILL.md +0 -50
  384. package/skills/java/references/concurrency.md +0 -194
  385. package/skills/java/references/idioms.md +0 -283
  386. package/skills/java/references/testing.md +0 -228
  387. package/skills/kotlin/SKILL.md +0 -47
  388. package/skills/kotlin/references/coroutines.md +0 -240
  389. package/skills/kotlin/references/idioms.md +0 -268
  390. package/skills/kotlin/references/testing.md +0 -219
  391. package/skills/mobile/SKILL.md +0 -50
  392. package/skills/mobile/references/architecture.md +0 -204
  393. package/skills/mobile/references/navigation.md +0 -158
  394. package/skills/mobile/references/performance.md +0 -152
  395. package/skills/mobile/references/platform.md +0 -166
  396. package/skills/mobile/references/state-and-data.md +0 -174
  397. package/skills/python/SKILL.md +0 -51
  398. package/skills/python/THIRD_PARTY.md +0 -14
  399. package/skills/python/references/async.md +0 -218
  400. package/skills/python/references/error-handling.md +0 -254
  401. package/skills/python/references/idioms.md +0 -279
  402. package/skills/python/references/packaging.md +0 -233
  403. package/skills/python/references/testing.md +0 -269
  404. package/skills/python/references/typing.md +0 -292
  405. package/skills/qa-tester/SKILL.md +0 -186
  406. package/skills/rust/SKILL.md +0 -50
  407. package/skills/rust/references/async.md +0 -224
  408. package/skills/rust/references/errors.md +0 -240
  409. package/skills/rust/references/ownership.md +0 -263
  410. package/skills/rust/references/testing.md +0 -274
  411. package/skills/rust/references/traits.md +0 -250
  412. package/skills/security-engineer/SKILL.md +0 -157
  413. package/skills/sps-memory/SKILL.md +0 -213
  414. package/skills/sps-pipeline/SKILL.md +0 -476
  415. package/skills/swift/SKILL.md +0 -48
  416. package/skills/swift/references/concurrency.md +0 -280
  417. package/skills/swift/references/idioms.md +0 -334
  418. package/skills/swift/references/testing.md +0 -229
  419. package/skills/tax-worker/SKILL.md +0 -150
  420. package/skills/tax-worker/references/account-codes.md +0 -165
  421. package/skills/typescript/SKILL.md +0 -51
  422. package/skills/typescript/references/async.md +0 -241
  423. package/skills/typescript/references/errors.md +0 -208
  424. package/skills/typescript/references/idioms.md +0 -246
  425. package/skills/typescript/references/testing.md +0 -225
  426. package/skills/typescript/references/tooling.md +0 -208
  427. package/skills/typescript/references/types.md +0 -259
  428. package/skills/wiki-update/SKILL.md +0 -300
@@ -1,557 +0,0 @@
1
- var tN=Object.defineProperty;var gv=e=>{throw TypeError(e)};var nN=(e,t,n)=>t in e?tN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var bv=(e,t,n)=>nN(e,typeof t!="symbol"?t+"":t,n),sp=(e,t,n)=>t.has(e)||gv("Cannot "+n);var I=(e,t,n)=>(sp(e,t,"read from private field"),n?n.call(e):t.get(e)),je=(e,t,n)=>t.has(e)?gv("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),we=(e,t,n,a)=>(sp(e,t,"write to private field"),a?a.call(e,n):t.set(e,n),n),Ke=(e,t,n)=>(sp(e,t,"access private method"),n);var Gu=(e,t,n,a)=>({set _(s){we(e,t,s,n)},get _(){return I(e,t,a)}});(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))a(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&a(c)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function a(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();function Lm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var lp={exports:{}},qo={};/**
2
- * @license React
3
- * react-jsx-runtime.production.js
4
- *
5
- * Copyright (c) Meta Platforms, Inc. and affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var yv;function iN(){if(yv)return qo;yv=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(a,s,o){var c=null;if(o!==void 0&&(c=""+o),s.key!==void 0&&(c=""+s.key),"key"in s){o={};for(var d in s)d!=="key"&&(o[d]=s[d])}else o=s;return s=o.ref,{$$typeof:e,type:a,key:c,ref:s!==void 0?s:null,props:o}}return qo.Fragment=t,qo.jsx=n,qo.jsxs=n,qo}var xv;function aN(){return xv||(xv=1,lp.exports=iN()),lp.exports}var f=aN(),op={exports:{}},Ue={};/**
10
- * @license React
11
- * react.production.js
12
- *
13
- * Copyright (c) Meta Platforms, Inc. and affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var vv;function rN(){if(vv)return Ue;vv=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),v=Symbol.iterator;function x(R){return R===null||typeof R!="object"?null:(R=v&&R[v]||R["@@iterator"],typeof R=="function"?R:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,S={};function _(R,Q,j){this.props=R,this.context=Q,this.refs=S,this.updater=j||E}_.prototype.isReactComponent={},_.prototype.setState=function(R,Q){if(typeof R!="object"&&typeof R!="function"&&R!=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,R,Q,"setState")},_.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function A(){}A.prototype=_.prototype;function T(R,Q,j){this.props=R,this.context=Q,this.refs=S,this.updater=j||E}var D=T.prototype=new A;D.constructor=T,w(D,_.prototype),D.isPureReactComponent=!0;var B=Array.isArray;function M(){}var q={H:null,A:null,T:null,S:null},F=Object.prototype.hasOwnProperty;function ee(R,Q,j){var ge=j.ref;return{$$typeof:e,type:R,key:Q,ref:ge!==void 0?ge:null,props:j}}function P(R,Q){return ee(R.type,Q,R.props)}function X(R){return typeof R=="object"&&R!==null&&R.$$typeof===e}function J(R){var Q={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(j){return Q[j]})}var pe=/\/+/g;function ue(R,Q){return typeof R=="object"&&R!==null&&R.key!=null?J(""+R.key):Q.toString(36)}function te(R){switch(R.status){case"fulfilled":return R.value;case"rejected":throw R.reason;default:switch(typeof R.status=="string"?R.then(M,M):(R.status="pending",R.then(function(Q){R.status==="pending"&&(R.status="fulfilled",R.value=Q)},function(Q){R.status==="pending"&&(R.status="rejected",R.reason=Q)})),R.status){case"fulfilled":return R.value;case"rejected":throw R.reason}}throw R}function $(R,Q,j,ge,_e){var Y=typeof R;(Y==="undefined"||Y==="boolean")&&(R=null);var xe=!1;if(R===null)xe=!0;else switch(Y){case"bigint":case"string":case"number":xe=!0;break;case"object":switch(R.$$typeof){case e:case t:xe=!0;break;case b:return xe=R._init,$(xe(R._payload),Q,j,ge,_e)}}if(xe)return _e=_e(R),xe=ge===""?"."+ue(R,0):ge,B(_e)?(j="",xe!=null&&(j=xe.replace(pe,"$&/")+"/"),$(_e,Q,j,"",function(ye){return ye})):_e!=null&&(X(_e)&&(_e=P(_e,j+(_e.key==null||R&&R.key===_e.key?"":(""+_e.key).replace(pe,"$&/")+"/")+xe)),Q.push(_e)),1;xe=0;var V=ge===""?".":ge+":";if(B(R))for(var ae=0;ae<R.length;ae++)ge=R[ae],Y=V+ue(ge,ae),xe+=$(ge,Q,j,Y,_e);else if(ae=x(R),typeof ae=="function")for(R=ae.call(R),ae=0;!(ge=R.next()).done;)ge=ge.value,Y=V+ue(ge,ae++),xe+=$(ge,Q,j,Y,_e);else if(Y==="object"){if(typeof R.then=="function")return $(te(R),Q,j,ge,_e);throw Q=String(R),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.")}return xe}function ce(R,Q,j){if(R==null)return R;var ge=[],_e=0;return $(R,ge,"","",function(Y){return Q.call(j,Y,_e++)}),ge}function de(R){if(R._status===-1){var Q=R._result;Q=Q(),Q.then(function(j){(R._status===0||R._status===-1)&&(R._status=1,R._result=j)},function(j){(R._status===0||R._status===-1)&&(R._status=2,R._result=j)}),R._status===-1&&(R._status=0,R._result=Q)}if(R._status===1)return R._result.default;throw R._result}var re=typeof reportError=="function"?reportError:function(R){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof R=="object"&&R!==null&&typeof R.message=="string"?String(R.message):String(R),error:R});if(!window.dispatchEvent(Q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",R);return}console.error(R)},O={map:ce,forEach:function(R,Q,j){ce(R,function(){Q.apply(this,arguments)},j)},count:function(R){var Q=0;return ce(R,function(){Q++}),Q},toArray:function(R){return ce(R,function(Q){return Q})||[]},only:function(R){if(!X(R))throw Error("React.Children.only expected to receive a single React element child.");return R}};return Ue.Activity=g,Ue.Children=O,Ue.Component=_,Ue.Fragment=n,Ue.Profiler=s,Ue.PureComponent=T,Ue.StrictMode=a,Ue.Suspense=h,Ue.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=q,Ue.__COMPILER_RUNTIME={__proto__:null,c:function(R){return q.H.useMemoCache(R)}},Ue.cache=function(R){return function(){return R.apply(null,arguments)}},Ue.cacheSignal=function(){return null},Ue.cloneElement=function(R,Q,j){if(R==null)throw Error("The argument must be a React element, but you passed "+R+".");var ge=w({},R.props),_e=R.key;if(Q!=null)for(Y in Q.key!==void 0&&(_e=""+Q.key),Q)!F.call(Q,Y)||Y==="key"||Y==="__self"||Y==="__source"||Y==="ref"&&Q.ref===void 0||(ge[Y]=Q[Y]);var Y=arguments.length-2;if(Y===1)ge.children=j;else if(1<Y){for(var xe=Array(Y),V=0;V<Y;V++)xe[V]=arguments[V+2];ge.children=xe}return ee(R.type,_e,ge)},Ue.createContext=function(R){return R={$$typeof:c,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null},R.Provider=R,R.Consumer={$$typeof:o,_context:R},R},Ue.createElement=function(R,Q,j){var ge,_e={},Y=null;if(Q!=null)for(ge in Q.key!==void 0&&(Y=""+Q.key),Q)F.call(Q,ge)&&ge!=="key"&&ge!=="__self"&&ge!=="__source"&&(_e[ge]=Q[ge]);var xe=arguments.length-2;if(xe===1)_e.children=j;else if(1<xe){for(var V=Array(xe),ae=0;ae<xe;ae++)V[ae]=arguments[ae+2];_e.children=V}if(R&&R.defaultProps)for(ge in xe=R.defaultProps,xe)_e[ge]===void 0&&(_e[ge]=xe[ge]);return ee(R,Y,_e)},Ue.createRef=function(){return{current:null}},Ue.forwardRef=function(R){return{$$typeof:d,render:R}},Ue.isValidElement=X,Ue.lazy=function(R){return{$$typeof:b,_payload:{_status:-1,_result:R},_init:de}},Ue.memo=function(R,Q){return{$$typeof:p,type:R,compare:Q===void 0?null:Q}},Ue.startTransition=function(R){var Q=q.T,j={};q.T=j;try{var ge=R(),_e=q.S;_e!==null&&_e(j,ge),typeof ge=="object"&&ge!==null&&typeof ge.then=="function"&&ge.then(M,re)}catch(Y){re(Y)}finally{Q!==null&&j.types!==null&&(Q.types=j.types),q.T=Q}},Ue.unstable_useCacheRefresh=function(){return q.H.useCacheRefresh()},Ue.use=function(R){return q.H.use(R)},Ue.useActionState=function(R,Q,j){return q.H.useActionState(R,Q,j)},Ue.useCallback=function(R,Q){return q.H.useCallback(R,Q)},Ue.useContext=function(R){return q.H.useContext(R)},Ue.useDebugValue=function(){},Ue.useDeferredValue=function(R,Q){return q.H.useDeferredValue(R,Q)},Ue.useEffect=function(R,Q){return q.H.useEffect(R,Q)},Ue.useEffectEvent=function(R){return q.H.useEffectEvent(R)},Ue.useId=function(){return q.H.useId()},Ue.useImperativeHandle=function(R,Q,j){return q.H.useImperativeHandle(R,Q,j)},Ue.useInsertionEffect=function(R,Q){return q.H.useInsertionEffect(R,Q)},Ue.useLayoutEffect=function(R,Q){return q.H.useLayoutEffect(R,Q)},Ue.useMemo=function(R,Q){return q.H.useMemo(R,Q)},Ue.useOptimistic=function(R,Q){return q.H.useOptimistic(R,Q)},Ue.useReducer=function(R,Q,j){return q.H.useReducer(R,Q,j)},Ue.useRef=function(R){return q.H.useRef(R)},Ue.useState=function(R){return q.H.useState(R)},Ue.useSyncExternalStore=function(R,Q,j){return q.H.useSyncExternalStore(R,Q,j)},Ue.useTransition=function(){return q.H.useTransition()},Ue.version="19.2.5",Ue}var wv;function Im(){return wv||(wv=1,op.exports=rN()),op.exports}var C=Im(),cp={exports:{}},$o={},up={exports:{}},dp={};/**
18
- * @license React
19
- * scheduler.production.js
20
- *
21
- * Copyright (c) Meta Platforms, Inc. and affiliates.
22
- *
23
- * This source code is licensed under the MIT license found in the
24
- * LICENSE file in the root directory of this source tree.
25
- */var kv;function sN(){return kv||(kv=1,(function(e){function t($,ce){var de=$.length;$.push(ce);e:for(;0<de;){var re=de-1>>>1,O=$[re];if(0<s(O,ce))$[re]=ce,$[de]=O,de=re;else break e}}function n($){return $.length===0?null:$[0]}function a($){if($.length===0)return null;var ce=$[0],de=$.pop();if(de!==ce){$[0]=de;e:for(var re=0,O=$.length,R=O>>>1;re<R;){var Q=2*(re+1)-1,j=$[Q],ge=Q+1,_e=$[ge];if(0>s(j,de))ge<O&&0>s(_e,j)?($[re]=_e,$[ge]=de,re=ge):($[re]=j,$[Q]=de,re=Q);else if(ge<O&&0>s(_e,de))$[re]=_e,$[ge]=de,re=ge;else break e}}return ce}function s($,ce){var de=$.sortIndex-ce.sortIndex;return de!==0?de:$.id-ce.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 c=Date,d=c.now();e.unstable_now=function(){return c.now()-d}}var h=[],p=[],b=1,g=null,v=3,x=!1,E=!1,w=!1,S=!1,_=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function D($){for(var ce=n(p);ce!==null;){if(ce.callback===null)a(p);else if(ce.startTime<=$)a(p),ce.sortIndex=ce.expirationTime,t(h,ce);else break;ce=n(p)}}function B($){if(w=!1,D($),!E)if(n(h)!==null)E=!0,M||(M=!0,J());else{var ce=n(p);ce!==null&&te(B,ce.startTime-$)}}var M=!1,q=-1,F=5,ee=-1;function P(){return S?!0:!(e.unstable_now()-ee<F)}function X(){if(S=!1,M){var $=e.unstable_now();ee=$;var ce=!0;try{e:{E=!1,w&&(w=!1,A(q),q=-1),x=!0;var de=v;try{t:{for(D($),g=n(h);g!==null&&!(g.expirationTime>$&&P());){var re=g.callback;if(typeof re=="function"){g.callback=null,v=g.priorityLevel;var O=re(g.expirationTime<=$);if($=e.unstable_now(),typeof O=="function"){g.callback=O,D($),ce=!0;break t}g===n(h)&&a(h),D($)}else a(h);g=n(h)}if(g!==null)ce=!0;else{var R=n(p);R!==null&&te(B,R.startTime-$),ce=!1}}break e}finally{g=null,v=de,x=!1}ce=void 0}}finally{ce?J():M=!1}}}var J;if(typeof T=="function")J=function(){T(X)};else if(typeof MessageChannel<"u"){var pe=new MessageChannel,ue=pe.port2;pe.port1.onmessage=X,J=function(){ue.postMessage(null)}}else J=function(){_(X,0)};function te($,ce){q=_(function(){$(e.unstable_now())},ce)}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($){$.callback=null},e.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):F=0<$?Math.floor(1e3/$):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_next=function($){switch(v){case 1:case 2:case 3:var ce=3;break;default:ce=v}var de=v;v=ce;try{return $()}finally{v=de}},e.unstable_requestPaint=function(){S=!0},e.unstable_runWithPriority=function($,ce){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var de=v;v=$;try{return ce()}finally{v=de}},e.unstable_scheduleCallback=function($,ce,de){var re=e.unstable_now();switch(typeof de=="object"&&de!==null?(de=de.delay,de=typeof de=="number"&&0<de?re+de:re):de=re,$){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=de+O,$={id:b++,callback:ce,priorityLevel:$,startTime:de,expirationTime:O,sortIndex:-1},de>re?($.sortIndex=de,t(p,$),n(h)===null&&$===n(p)&&(w?(A(q),q=-1):w=!0,te(B,de-re))):($.sortIndex=O,t(h,$),E||x||(E=!0,M||(M=!0,J()))),$},e.unstable_shouldYield=P,e.unstable_wrapCallback=function($){var ce=v;return function(){var de=v;v=ce;try{return $.apply(this,arguments)}finally{v=de}}}})(dp)),dp}var Ev;function lN(){return Ev||(Ev=1,up.exports=sN()),up.exports}var fp={exports:{}},xn={};/**
26
- * @license React
27
- * react-dom.production.js
28
- *
29
- * Copyright (c) Meta Platforms, Inc. and affiliates.
30
- *
31
- * This source code is licensed under the MIT license found in the
32
- * LICENSE file in the root directory of this source tree.
33
- */var Sv;function oN(){if(Sv)return xn;Sv=1;var e=Im();function t(h){var p="https://react.dev/errors/"+h;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)p+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+h+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var a={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},s=Symbol.for("react.portal");function o(h,p,b){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:g==null?null:""+g,children:h,containerInfo:p,implementation:b}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(h,p){if(h==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return xn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,xn.createPortal=function(h,p){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(t(299));return o(h,p,null,b)},xn.flushSync=function(h){var p=c.T,b=a.p;try{if(c.T=null,a.p=2,h)return h()}finally{c.T=p,a.p=b,a.d.f()}},xn.preconnect=function(h,p){typeof h=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,a.d.C(h,p))},xn.prefetchDNS=function(h){typeof h=="string"&&a.d.D(h)},xn.preinit=function(h,p){if(typeof h=="string"&&p&&typeof p.as=="string"){var b=p.as,g=d(b,p.crossOrigin),v=typeof p.integrity=="string"?p.integrity:void 0,x=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;b==="style"?a.d.S(h,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:g,integrity:v,fetchPriority:x}):b==="script"&&a.d.X(h,{crossOrigin:g,integrity:v,fetchPriority:x,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},xn.preinitModule=function(h,p){if(typeof h=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var b=d(p.as,p.crossOrigin);a.d.M(h,{crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&a.d.M(h)},xn.preload=function(h,p){if(typeof h=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var b=p.as,g=d(b,p.crossOrigin);a.d.L(h,b,{crossOrigin:g,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},xn.preloadModule=function(h,p){if(typeof h=="string")if(p){var b=d(p.as,p.crossOrigin);a.d.m(h,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else a.d.m(h)},xn.requestFormReset=function(h){a.d.r(h)},xn.unstable_batchedUpdates=function(h,p){return h(p)},xn.useFormState=function(h,p,b){return c.H.useFormState(h,p,b)},xn.useFormStatus=function(){return c.H.useHostTransitionStatus()},xn.version="19.2.5",xn}var _v;function cN(){if(_v)return fp.exports;_v=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(),fp.exports=oN(),fp.exports}/**
34
- * @license React
35
- * react-dom-client.production.js
36
- *
37
- * Copyright (c) Meta Platforms, Inc. and affiliates.
38
- *
39
- * This source code is licensed under the MIT license found in the
40
- * LICENSE file in the root directory of this source tree.
41
- */var Nv;function uN(){if(Nv)return $o;Nv=1;var e=lN(),t=Im(),n=cN();function a(i){var r="https://react.dev/errors/"+i;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)r+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+i+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function o(i){var r=i,l=i;if(i.alternate)for(;r.return;)r=r.return;else{i=r;do r=i,(r.flags&4098)!==0&&(l=r.return),i=r.return;while(i)}return r.tag===3?l:null}function c(i){if(i.tag===13){var r=i.memoizedState;if(r===null&&(i=i.alternate,i!==null&&(r=i.memoizedState)),r!==null)return r.dehydrated}return null}function d(i){if(i.tag===31){var r=i.memoizedState;if(r===null&&(i=i.alternate,i!==null&&(r=i.memoizedState)),r!==null)return r.dehydrated}return null}function h(i){if(o(i)!==i)throw Error(a(188))}function p(i){var r=i.alternate;if(!r){if(r=o(i),r===null)throw Error(a(188));return r!==i?null:i}for(var l=i,u=r;;){var m=l.return;if(m===null)break;var y=m.alternate;if(y===null){if(u=m.return,u!==null){l=u;continue}break}if(m.child===y.child){for(y=m.child;y;){if(y===l)return h(m),i;if(y===u)return h(m),r;y=y.sibling}throw Error(a(188))}if(l.return!==u.return)l=m,u=y;else{for(var k=!1,N=m.child;N;){if(N===l){k=!0,l=m,u=y;break}if(N===u){k=!0,u=m,l=y;break}N=N.sibling}if(!k){for(N=y.child;N;){if(N===l){k=!0,l=y,u=m;break}if(N===u){k=!0,u=y,l=m;break}N=N.sibling}if(!k)throw Error(a(189))}}if(l.alternate!==u)throw Error(a(190))}if(l.tag!==3)throw Error(a(188));return l.stateNode.current===l?i:r}function b(i){var r=i.tag;if(r===5||r===26||r===27||r===6)return i;for(i=i.child;i!==null;){if(r=b(i),r!==null)return r;i=i.sibling}return null}var g=Object.assign,v=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),T=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),B=Symbol.for("react.suspense"),M=Symbol.for("react.suspense_list"),q=Symbol.for("react.memo"),F=Symbol.for("react.lazy"),ee=Symbol.for("react.activity"),P=Symbol.for("react.memo_cache_sentinel"),X=Symbol.iterator;function J(i){return i===null||typeof i!="object"?null:(i=X&&i[X]||i["@@iterator"],typeof i=="function"?i:null)}var pe=Symbol.for("react.client.reference");function ue(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===pe?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case w:return"Fragment";case _:return"Profiler";case S:return"StrictMode";case B:return"Suspense";case M:return"SuspenseList";case ee:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case E:return"Portal";case T:return i.displayName||"Context";case A:return(i._context.displayName||"Context")+".Consumer";case D:var r=i.render;return i=i.displayName,i||(i=r.displayName||r.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case q:return r=i.displayName||null,r!==null?r:ue(i.type)||"Memo";case F:r=i._payload,i=i._init;try{return ue(i(r))}catch{}}return null}var te=Array.isArray,$=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,de={pending:!1,data:null,method:null,action:null},re=[],O=-1;function R(i){return{current:i}}function Q(i){0>O||(i.current=re[O],re[O]=null,O--)}function j(i,r){O++,re[O]=i.current,i.current=r}var ge=R(null),_e=R(null),Y=R(null),xe=R(null);function V(i,r){switch(j(Y,r),j(_e,i),j(ge,null),r.nodeType){case 9:case 11:i=(i=r.documentElement)&&(i=i.namespaceURI)?Px(i):0;break;default:if(i=r.tagName,r=r.namespaceURI)r=Px(r),i=Ux(r,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}Q(ge),j(ge,i)}function ae(){Q(ge),Q(_e),Q(Y)}function ye(i){i.memoizedState!==null&&j(xe,i);var r=ge.current,l=Ux(r,i.type);r!==l&&(j(_e,i),j(ge,l))}function Pe(i){_e.current===i&&(Q(ge),Q(_e)),xe.current===i&&(Q(xe),Bo._currentValue=de)}var Ot,St;function on(i){if(Ot===void 0)try{throw Error()}catch(l){var r=l.stack.trim().match(/\n( *(at )?)/);Ot=r&&r[1]||"",St=-1<l.stack.indexOf(`
42
- at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
43
- `+Ot+i+St}var Ui=!1;function tt(i,r){if(!i||Ui)return"";Ui=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(r){var oe=function(){throw Error()};if(Object.defineProperty(oe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(oe,[])}catch(Z){var W=Z}Reflect.construct(i,[],oe)}else{try{oe.call()}catch(Z){W=Z}i.call(oe.prototype)}}else{try{throw Error()}catch(Z){W=Z}(oe=i())&&typeof oe.catch=="function"&&oe.catch(function(){})}}catch(Z){if(Z&&W&&typeof Z.stack=="string")return[Z.stack,W.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var m=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");m&&m.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var y=u.DetermineComponentFrameRoot(),k=y[0],N=y[1];if(k&&N){var L=k.split(`
44
- `),G=N.split(`
45
- `);for(m=u=0;u<L.length&&!L[u].includes("DetermineComponentFrameRoot");)u++;for(;m<G.length&&!G[m].includes("DetermineComponentFrameRoot");)m++;if(u===L.length||m===G.length)for(u=L.length-1,m=G.length-1;1<=u&&0<=m&&L[u]!==G[m];)m--;for(;1<=u&&0<=m;u--,m--)if(L[u]!==G[m]){if(u!==1||m!==1)do if(u--,m--,0>m||L[u]!==G[m]){var ie=`
46
- `+L[u].replace(" at new "," at ");return i.displayName&&ie.includes("<anonymous>")&&(ie=ie.replace("<anonymous>",i.displayName)),ie}while(1<=u&&0<=m);break}}}finally{Ui=!1,Error.prepareStackTrace=l}return(l=i?i.displayName||i.name:"")?on(l):""}function Ti(i,r){switch(i.tag){case 26:case 27:case 5:return on(i.type);case 16:return on("Lazy");case 13:return i.child!==r&&r!==null?on("Suspense Fallback"):on("Suspense");case 19:return on("SuspenseList");case 0:case 15:return tt(i.type,!1);case 11:return tt(i.type.render,!1);case 1:return tt(i.type,!0);case 31:return on("Activity");default:return""}}function ci(i){try{var r="",l=null;do r+=Ti(i,l),l=i,i=i.return;while(i);return r}catch(u){return`
47
- Error generating stack: `+u.message+`
48
- `+u.stack}}var Fi=Object.prototype.hasOwnProperty,na=e.unstable_scheduleCallback,Ar=e.unstable_cancelCallback,Ql=e.unstable_shouldYield,xs=e.unstable_requestPaint,zt=e.unstable_now,vs=e.unstable_getCurrentPriorityLevel,ne=e.unstable_ImmediatePriority,me=e.unstable_UserBlockingPriority,Me=e.unstable_NormalPriority,Qe=e.unstable_LowPriority,st=e.unstable_IdlePriority,_n=e.log,Ai=e.unstable_setDisableYieldValue,cn=null,Ft=null;function gn(i){if(typeof _n=="function"&&Ai(i),Ft&&typeof Ft.setStrictMode=="function")try{Ft.setStrictMode(cn,i)}catch{}}var dt=Math.clz32?Math.clz32:jc,qi=Math.log,Nn=Math.LN2;function jc(i){return i>>>=0,i===0?32:31-(qi(i)/Nn|0)|0}var jr=256,ws=262144,Or=4194304;function Ln(i){var r=i&42;if(r!==0)return r;switch(i&-i){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 i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function z(i,r,l){var u=i.pendingLanes;if(u===0)return 0;var m=0,y=i.suspendedLanes,k=i.pingedLanes;i=i.warmLanes;var N=u&134217727;return N!==0?(u=N&~y,u!==0?m=Ln(u):(k&=N,k!==0?m=Ln(k):l||(l=N&~i,l!==0&&(m=Ln(l))))):(N=u&~y,N!==0?m=Ln(N):k!==0?m=Ln(k):l||(l=u&~i,l!==0&&(m=Ln(l)))),m===0?0:r!==0&&r!==m&&(r&y)===0&&(y=m&-m,l=r&-r,y>=l||y===32&&(l&4194048)!==0)?r:m}function se(i,r){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&r)===0}function ve(i,r){switch(i){case 1:case 2:case 4:case 8:case 64:return r+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 r+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 Be(){var i=Or;return Or<<=1,(Or&62914560)===0&&(Or=4194304),i}function Ct(i){for(var r=[],l=0;31>l;l++)r.push(i);return r}function vt(i,r){i.pendingLanes|=r,r!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function Se(i,r,l,u,m,y){var k=i.pendingLanes;i.pendingLanes=l,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=l,i.entangledLanes&=l,i.errorRecoveryDisabledLanes&=l,i.shellSuspendCounter=0;var N=i.entanglements,L=i.expirationTimes,G=i.hiddenUpdates;for(l=k&~l;0<l;){var ie=31-dt(l),oe=1<<ie;N[ie]=0,L[ie]=-1;var W=G[ie];if(W!==null)for(G[ie]=null,ie=0;ie<W.length;ie++){var Z=W[ie];Z!==null&&(Z.lane&=-536870913)}l&=~oe}u!==0&&ke(i,u,0),y!==0&&m===0&&i.tag!==0&&(i.suspendedLanes|=y&~(k&~r))}function ke(i,r,l){i.pendingLanes|=r,i.suspendedLanes&=~r;var u=31-dt(r);i.entangledLanes|=r,i.entanglements[u]=i.entanglements[u]|1073741824|l&261930}function Ie(i,r){var l=i.entangledLanes|=r;for(i=i.entanglements;l;){var u=31-dt(l),m=1<<u;m&r|i[u]&r&&(i[u]|=r),l&=~m}}function Kt(i,r){var l=r&-r;return l=(l&42)!==0?1:Dt(l),(l&(i.suspendedLanes|r))!==0?0:l}function Dt(i){switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=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:i=128;break;case 268435456:i=134217728;break;default:i=0}return i}function ia(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function ks(){var i=ce.p;return i!==0?i:(i=window.event,i===void 0?32:cv(i.type))}function Es(i,r){var l=ce.p;try{return ce.p=i,r()}finally{ce.p=l}}var $i=Math.random().toString(36).slice(2),Gt="__reactFiber$"+$i,bn="__reactProps$"+$i,Ma="__reactContainer$"+$i,Yl="__reactEvents$"+$i,Oc="__reactListeners$"+$i,Ss="__reactHandles$"+$i,Dc="__reactResources$"+$i,Dr="__reactMarker$"+$i;function Vl(i){delete i[Gt],delete i[bn],delete i[Yl],delete i[Oc],delete i[Ss]}function Cn(i){var r=i[Gt];if(r)return r;for(var l=i.parentNode;l;){if(r=l[Ma]||l[Gt]){if(l=r.alternate,r.child!==null||l!==null&&l.child!==null)for(i=Qx(i);i!==null;){if(l=i[Gt])return l;i=Qx(i)}return r}i=l,l=i.parentNode}return null}function aa(i){if(i=i[Gt]||i[Ma]){var r=i.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return i}return null}function Ra(i){var r=i.tag;if(r===5||r===26||r===27||r===6)return i.stateNode;throw Error(a(33))}function La(i){var r=i[Dc];return r||(r=i[Dc]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function Wt(i){i[Dr]=!0}var Mc=new Set,Mr={};function ra(i,r){fe(i,r),fe(i+"Capture",r)}function fe(i,r){for(Mr[i]=r,i=0;i<r.length;i++)Mc.add(r[i])}var Ae=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]*$"),Ye={},ft={};function Qt(i){return Fi.call(ft,i)?!0:Fi.call(Ye,i)?!1:Ae.test(i)?ft[i]=!0:(Ye[i]=!0,!1)}function yn(i,r,l){if(Qt(r))if(l===null)i.removeAttribute(r);else{switch(typeof l){case"undefined":case"function":case"symbol":i.removeAttribute(r);return;case"boolean":var u=r.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){i.removeAttribute(r);return}}i.setAttribute(r,""+l)}}function Vn(i,r,l){if(l===null)i.removeAttribute(r);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(r);return}i.setAttribute(r,""+l)}}function In(i,r,l,u){if(u===null)i.removeAttribute(l);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(l);return}i.setAttributeNS(r,l,""+u)}}function _t(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Wn(i){var r=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function Rc(i,r,l){var u=Object.getOwnPropertyDescriptor(i.constructor.prototype,r);if(!i.hasOwnProperty(r)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var m=u.get,y=u.set;return Object.defineProperty(i,r,{configurable:!0,get:function(){return m.call(this)},set:function(k){l=""+k,y.call(this,k)}}),Object.defineProperty(i,r,{enumerable:u.enumerable}),{getValue:function(){return l},setValue:function(k){l=""+k},stopTracking:function(){i._valueTracker=null,delete i[r]}}}}function _s(i){if(!i._valueTracker){var r=Wn(i)?"checked":"value";i._valueTracker=Rc(i,r,""+i[r])}}function Wl(i){if(!i)return!1;var r=i._valueTracker;if(!r)return!0;var l=r.getValue(),u="";return i&&(u=Wn(i)?i.checked?"true":"false":i.value),i=u,i!==l?(r.setValue(i),!0):!1}function Ns(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var rf=/[\n"\\]/g;function zn(i){return i.replace(rf,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function Xl(i,r,l,u,m,y,k,N){i.name="",k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?i.type=k:i.removeAttribute("type"),r!=null?k==="number"?(r===0&&i.value===""||i.value!=r)&&(i.value=""+_t(r)):i.value!==""+_t(r)&&(i.value=""+_t(r)):k!=="submit"&&k!=="reset"||i.removeAttribute("value"),r!=null?Cs(i,k,_t(r)):l!=null?Cs(i,k,_t(l)):u!=null&&i.removeAttribute("value"),m==null&&y!=null&&(i.defaultChecked=!!y),m!=null&&(i.checked=m&&typeof m!="function"&&typeof m!="symbol"),N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"?i.name=""+_t(N):i.removeAttribute("name")}function Rr(i,r,l,u,m,y,k,N){if(y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(i.type=y),r!=null||l!=null){if(!(y!=="submit"&&y!=="reset"||r!=null)){_s(i);return}l=l!=null?""+_t(l):"",r=r!=null?""+_t(r):l,N||r===i.value||(i.value=r),i.defaultValue=r}u=u??m,u=typeof u!="function"&&typeof u!="symbol"&&!!u,i.checked=N?i.checked:!!u,i.defaultChecked=!!u,k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"&&(i.name=k),_s(i)}function Cs(i,r,l){r==="number"&&Ns(i.ownerDocument)===i||i.defaultValue===""+l||(i.defaultValue=""+l)}function un(i,r,l,u){if(i=i.options,r){r={};for(var m=0;m<l.length;m++)r["$"+l[m]]=!0;for(l=0;l<i.length;l++)m=r.hasOwnProperty("$"+i[l].value),i[l].selected!==m&&(i[l].selected=m),m&&u&&(i[l].defaultSelected=!0)}else{for(l=""+_t(l),r=null,m=0;m<i.length;m++){if(i[m].value===l){i[m].selected=!0,u&&(i[m].defaultSelected=!0);return}r!==null||i[m].disabled||(r=i[m])}r!==null&&(r.selected=!0)}}function Lc(i,r,l){if(r!=null&&(r=""+_t(r),r!==i.value&&(i.value=r),l==null)){i.defaultValue!==r&&(i.defaultValue=r);return}i.defaultValue=l!=null?""+_t(l):""}function Ts(i,r,l,u){if(r==null){if(u!=null){if(l!=null)throw Error(a(92));if(te(u)){if(1<u.length)throw Error(a(93));u=u[0]}l=u}l==null&&(l=""),r=l}l=_t(r),i.defaultValue=l,u=i.textContent,u===l&&u!==""&&u!==null&&(i.value=u),_s(i)}function Le(i,r){if(r){var l=i.firstChild;if(l&&l===i.lastChild&&l.nodeType===3){l.nodeValue=r;return}}i.textContent=r}var Ic=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 Xt(i,r,l){var u=r.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?u?i.setProperty(r,""):r==="float"?i.cssFloat="":i[r]="":u?i.setProperty(r,l):typeof l!="number"||l===0||Ic.has(r)?r==="float"?i.cssFloat=l:i[r]=(""+l).trim():i[r]=l+"px"}function ht(i,r,l){if(r!=null&&typeof r!="object")throw Error(a(62));if(i=i.style,l!=null){for(var u in l)!l.hasOwnProperty(u)||r!=null&&r.hasOwnProperty(u)||(u.indexOf("--")===0?i.setProperty(u,""):u==="float"?i.cssFloat="":i[u]="");for(var m in r)u=r[m],r.hasOwnProperty(m)&&l[m]!==u&&Xt(i,m,u)}else for(var y in r)r.hasOwnProperty(y)&&Xt(i,y,r[y])}function Ia(i){if(i.indexOf("-")===-1)return!1;switch(i){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 sa=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"]]),Zl=/^[\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 za(i){return Zl.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function be(){}var Ne=null;function qe(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Ze=null,Bt=null;function ui(i){var r=aa(i);if(r&&(i=r.stateNode)){var l=i[bn]||null;e:switch(i=r.stateNode,r.type){case"input":if(Xl(i,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),r=l.name,l.type==="radio"&&r!=null){for(l=i;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+zn(""+r)+'"][type="radio"]'),r=0;r<l.length;r++){var u=l[r];if(u!==i&&u.form===i.form){var m=u[bn]||null;if(!m)throw Error(a(90));Xl(u,m.value,m.defaultValue,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name)}}for(r=0;r<l.length;r++)u=l[r],u.form===i.form&&Wl(u)}break e;case"textarea":Lc(i,l.value,l.defaultValue);break e;case"select":r=l.value,r!=null&&un(i,!!l.multiple,r,!1)}}}var Jl=!1;function zc(i,r,l){if(Jl)return i(r,l);Jl=!0;try{var u=i(r);return u}finally{if(Jl=!1,(Ze!==null||Bt!==null)&&(Su(),Ze&&(r=Ze,i=Bt,Bt=Ze=null,ui(r),i)))for(r=0;r<i.length;r++)ui(i[r])}}function eo(i,r){var l=i.stateNode;if(l===null)return null;var u=l[bn]||null;if(u===null)return null;l=u[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(i=i.type,u=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!u;break e;default:i=!1}if(i)return null;if(l&&typeof l!="function")throw Error(a(231,r,typeof l));return l}var la=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),sf=!1;if(la)try{var to={};Object.defineProperty(to,"passive",{get:function(){sf=!0}}),window.addEventListener("test",to,to),window.removeEventListener("test",to,to)}catch{sf=!1}var Ba=null,lf=null,Bc=null;function Ug(){if(Bc)return Bc;var i,r=lf,l=r.length,u,m="value"in Ba?Ba.value:Ba.textContent,y=m.length;for(i=0;i<l&&r[i]===m[i];i++);var k=l-i;for(u=1;u<=k&&r[l-u]===m[y-u];u++);return Bc=m.slice(i,1<u?1-u:void 0)}function Pc(i){var r=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&r===13&&(i=13)):i=r,i===10&&(i=13),32<=i||i===13?i:0}function Uc(){return!0}function Fg(){return!1}function Bn(i){function r(l,u,m,y,k){this._reactName=l,this._targetInst=m,this.type=u,this.nativeEvent=y,this.target=k,this.currentTarget=null;for(var N in i)i.hasOwnProperty(N)&&(l=i[N],this[N]=l?l(y):y[N]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?Uc:Fg,this.isPropagationStopped=Fg,this}return g(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Uc)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Uc)},persist:function(){},isPersistent:Uc}),r}var Lr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Fc=Bn(Lr),no=g({},Lr,{view:0,detail:0}),J1=Bn(no),of,cf,io,qc=g({},no,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:df,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==io&&(io&&i.type==="mousemove"?(of=i.screenX-io.screenX,cf=i.screenY-io.screenY):cf=of=0,io=i),of)},movementY:function(i){return"movementY"in i?i.movementY:cf}}),qg=Bn(qc),eS=g({},qc,{dataTransfer:0}),tS=Bn(eS),nS=g({},no,{relatedTarget:0}),uf=Bn(nS),iS=g({},Lr,{animationName:0,elapsedTime:0,pseudoElement:0}),aS=Bn(iS),rS=g({},Lr,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),sS=Bn(rS),lS=g({},Lr,{data:0}),$g=Bn(lS),oS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},cS={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"},uS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function dS(i){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(i):(i=uS[i])?!!r[i]:!1}function df(){return dS}var fS=g({},no,{key:function(i){if(i.key){var r=oS[i.key]||i.key;if(r!=="Unidentified")return r}return i.type==="keypress"?(i=Pc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?cS[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:df,charCode:function(i){return i.type==="keypress"?Pc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Pc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),hS=Bn(fS),pS=g({},qc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Hg=Bn(pS),mS=g({},no,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:df}),gS=Bn(mS),bS=g({},Lr,{propertyName:0,elapsedTime:0,pseudoElement:0}),yS=Bn(bS),xS=g({},qc,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),vS=Bn(xS),wS=g({},Lr,{newState:0,oldState:0}),kS=Bn(wS),ES=[9,13,27,32],ff=la&&"CompositionEvent"in window,ao=null;la&&"documentMode"in document&&(ao=document.documentMode);var SS=la&&"TextEvent"in window&&!ao,Kg=la&&(!ff||ao&&8<ao&&11>=ao),Gg=" ",Qg=!1;function Yg(i,r){switch(i){case"keyup":return ES.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Vg(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var As=!1;function _S(i,r){switch(i){case"compositionend":return Vg(r);case"keypress":return r.which!==32?null:(Qg=!0,Gg);case"textInput":return i=r.data,i===Gg&&Qg?null:i;default:return null}}function NS(i,r){if(As)return i==="compositionend"||!ff&&Yg(i,r)?(i=Ug(),Bc=lf=Ba=null,As=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return Kg&&r.locale!=="ko"?null:r.data;default:return null}}var CS={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 Wg(i){var r=i&&i.nodeName&&i.nodeName.toLowerCase();return r==="input"?!!CS[i.type]:r==="textarea"}function Xg(i,r,l,u){Ze?Bt?Bt.push(u):Bt=[u]:Ze=u,r=Ou(r,"onChange"),0<r.length&&(l=new Fc("onChange","change",null,l,u),i.push({event:l,listeners:r}))}var ro=null,so=null;function TS(i){Mx(i,0)}function $c(i){var r=Ra(i);if(Wl(r))return i}function Zg(i,r){if(i==="change")return r}var Jg=!1;if(la){var hf;if(la){var pf="oninput"in document;if(!pf){var eb=document.createElement("div");eb.setAttribute("oninput","return;"),pf=typeof eb.oninput=="function"}hf=pf}else hf=!1;Jg=hf&&(!document.documentMode||9<document.documentMode)}function tb(){ro&&(ro.detachEvent("onpropertychange",nb),so=ro=null)}function nb(i){if(i.propertyName==="value"&&$c(so)){var r=[];Xg(r,so,i,qe(i)),zc(TS,r)}}function AS(i,r,l){i==="focusin"?(tb(),ro=r,so=l,ro.attachEvent("onpropertychange",nb)):i==="focusout"&&tb()}function jS(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return $c(so)}function OS(i,r){if(i==="click")return $c(r)}function DS(i,r){if(i==="input"||i==="change")return $c(r)}function MS(i,r){return i===r&&(i!==0||1/i===1/r)||i!==i&&r!==r}var Xn=typeof Object.is=="function"?Object.is:MS;function lo(i,r){if(Xn(i,r))return!0;if(typeof i!="object"||i===null||typeof r!="object"||r===null)return!1;var l=Object.keys(i),u=Object.keys(r);if(l.length!==u.length)return!1;for(u=0;u<l.length;u++){var m=l[u];if(!Fi.call(r,m)||!Xn(i[m],r[m]))return!1}return!0}function ib(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function ab(i,r){var l=ib(i);i=0;for(var u;l;){if(l.nodeType===3){if(u=i+l.textContent.length,i<=r&&u>=r)return{node:l,offset:r-i};i=u}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=ib(l)}}function rb(i,r){return i&&r?i===r?!0:i&&i.nodeType===3?!1:r&&r.nodeType===3?rb(i,r.parentNode):"contains"in i?i.contains(r):i.compareDocumentPosition?!!(i.compareDocumentPosition(r)&16):!1:!1}function sb(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var r=Ns(i.document);r instanceof i.HTMLIFrameElement;){try{var l=typeof r.contentWindow.location.href=="string"}catch{l=!1}if(l)i=r.contentWindow;else break;r=Ns(i.document)}return r}function mf(i){var r=i&&i.nodeName&&i.nodeName.toLowerCase();return r&&(r==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||r==="textarea"||i.contentEditable==="true")}var RS=la&&"documentMode"in document&&11>=document.documentMode,js=null,gf=null,oo=null,bf=!1;function lb(i,r,l){var u=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;bf||js==null||js!==Ns(u)||(u=js,"selectionStart"in u&&mf(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),oo&&lo(oo,u)||(oo=u,u=Ou(gf,"onSelect"),0<u.length&&(r=new Fc("onSelect","select",null,r,l),i.push({event:r,listeners:u}),r.target=js)))}function Ir(i,r){var l={};return l[i.toLowerCase()]=r.toLowerCase(),l["Webkit"+i]="webkit"+r,l["Moz"+i]="moz"+r,l}var Os={animationend:Ir("Animation","AnimationEnd"),animationiteration:Ir("Animation","AnimationIteration"),animationstart:Ir("Animation","AnimationStart"),transitionrun:Ir("Transition","TransitionRun"),transitionstart:Ir("Transition","TransitionStart"),transitioncancel:Ir("Transition","TransitionCancel"),transitionend:Ir("Transition","TransitionEnd")},yf={},ob={};la&&(ob=document.createElement("div").style,"AnimationEvent"in window||(delete Os.animationend.animation,delete Os.animationiteration.animation,delete Os.animationstart.animation),"TransitionEvent"in window||delete Os.transitionend.transition);function zr(i){if(yf[i])return yf[i];if(!Os[i])return i;var r=Os[i],l;for(l in r)if(r.hasOwnProperty(l)&&l in ob)return yf[i]=r[l];return i}var cb=zr("animationend"),ub=zr("animationiteration"),db=zr("animationstart"),LS=zr("transitionrun"),IS=zr("transitionstart"),zS=zr("transitioncancel"),fb=zr("transitionend"),hb=new Map,xf="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(" ");xf.push("scrollEnd");function ji(i,r){hb.set(i,r),ra(r,[i])}var Hc=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)},di=[],Ds=0,vf=0;function Kc(){for(var i=Ds,r=vf=Ds=0;r<i;){var l=di[r];di[r++]=null;var u=di[r];di[r++]=null;var m=di[r];di[r++]=null;var y=di[r];if(di[r++]=null,u!==null&&m!==null){var k=u.pending;k===null?m.next=m:(m.next=k.next,k.next=m),u.pending=m}y!==0&&pb(l,m,y)}}function Gc(i,r,l,u){di[Ds++]=i,di[Ds++]=r,di[Ds++]=l,di[Ds++]=u,vf|=u,i.lanes|=u,i=i.alternate,i!==null&&(i.lanes|=u)}function wf(i,r,l,u){return Gc(i,r,l,u),Qc(i)}function Br(i,r){return Gc(i,null,null,r),Qc(i)}function pb(i,r,l){i.lanes|=l;var u=i.alternate;u!==null&&(u.lanes|=l);for(var m=!1,y=i.return;y!==null;)y.childLanes|=l,u=y.alternate,u!==null&&(u.childLanes|=l),y.tag===22&&(i=y.stateNode,i===null||i._visibility&1||(m=!0)),i=y,y=y.return;return i.tag===3?(y=i.stateNode,m&&r!==null&&(m=31-dt(l),i=y.hiddenUpdates,u=i[m],u===null?i[m]=[r]:u.push(r),r.lane=l|536870912),y):null}function Qc(i){if(50<Oo)throw Oo=0,jh=null,Error(a(185));for(var r=i.return;r!==null;)i=r,r=i.return;return i.tag===3?i.stateNode:null}var Ms={};function BS(i,r,l,u){this.tag=i,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Zn(i,r,l,u){return new BS(i,r,l,u)}function kf(i){return i=i.prototype,!(!i||!i.isReactComponent)}function oa(i,r){var l=i.alternate;return l===null?(l=Zn(i.tag,r,i.key,i.mode),l.elementType=i.elementType,l.type=i.type,l.stateNode=i.stateNode,l.alternate=i,i.alternate=l):(l.pendingProps=r,l.type=i.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=i.flags&65011712,l.childLanes=i.childLanes,l.lanes=i.lanes,l.child=i.child,l.memoizedProps=i.memoizedProps,l.memoizedState=i.memoizedState,l.updateQueue=i.updateQueue,r=i.dependencies,l.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},l.sibling=i.sibling,l.index=i.index,l.ref=i.ref,l.refCleanup=i.refCleanup,l}function mb(i,r){i.flags&=65011714;var l=i.alternate;return l===null?(i.childLanes=0,i.lanes=r,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=l.childLanes,i.lanes=l.lanes,i.child=l.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=l.memoizedProps,i.memoizedState=l.memoizedState,i.updateQueue=l.updateQueue,i.type=l.type,r=l.dependencies,i.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),i}function Yc(i,r,l,u,m,y){var k=0;if(u=i,typeof i=="function")kf(i)&&(k=1);else if(typeof i=="string")k=$_(i,l,ge.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case ee:return i=Zn(31,l,r,m),i.elementType=ee,i.lanes=y,i;case w:return Pr(l.children,m,y,r);case S:k=8,m|=24;break;case _:return i=Zn(12,l,r,m|2),i.elementType=_,i.lanes=y,i;case B:return i=Zn(13,l,r,m),i.elementType=B,i.lanes=y,i;case M:return i=Zn(19,l,r,m),i.elementType=M,i.lanes=y,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case T:k=10;break e;case A:k=9;break e;case D:k=11;break e;case q:k=14;break e;case F:k=16,u=null;break e}k=29,l=Error(a(130,i===null?"null":typeof i,"")),u=null}return r=Zn(k,l,r,m),r.elementType=i,r.type=u,r.lanes=y,r}function Pr(i,r,l,u){return i=Zn(7,i,u,r),i.lanes=l,i}function Ef(i,r,l){return i=Zn(6,i,null,r),i.lanes=l,i}function gb(i){var r=Zn(18,null,null,0);return r.stateNode=i,r}function Sf(i,r,l){return r=Zn(4,i.children!==null?i.children:[],i.key,r),r.lanes=l,r.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},r}var bb=new WeakMap;function fi(i,r){if(typeof i=="object"&&i!==null){var l=bb.get(i);return l!==void 0?l:(r={value:i,source:r,stack:ci(r)},bb.set(i,r),r)}return{value:i,source:r,stack:ci(r)}}var Rs=[],Ls=0,Vc=null,co=0,hi=[],pi=0,Pa=null,Hi=1,Ki="";function ca(i,r){Rs[Ls++]=co,Rs[Ls++]=Vc,Vc=i,co=r}function yb(i,r,l){hi[pi++]=Hi,hi[pi++]=Ki,hi[pi++]=Pa,Pa=i;var u=Hi;i=Ki;var m=32-dt(u)-1;u&=~(1<<m),l+=1;var y=32-dt(r)+m;if(30<y){var k=m-m%5;y=(u&(1<<k)-1).toString(32),u>>=k,m-=k,Hi=1<<32-dt(r)+m|l<<m|u,Ki=y+i}else Hi=1<<y|l<<m|u,Ki=i}function _f(i){i.return!==null&&(ca(i,1),yb(i,1,0))}function Nf(i){for(;i===Vc;)Vc=Rs[--Ls],Rs[Ls]=null,co=Rs[--Ls],Rs[Ls]=null;for(;i===Pa;)Pa=hi[--pi],hi[pi]=null,Ki=hi[--pi],hi[pi]=null,Hi=hi[--pi],hi[pi]=null}function xb(i,r){hi[pi++]=Hi,hi[pi++]=Ki,hi[pi++]=Pa,Hi=r.id,Ki=r.overflow,Pa=i}var dn=null,Tt=null,nt=!1,Ua=null,mi=!1,Cf=Error(a(519));function Fa(i){var r=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw uo(fi(r,i)),Cf}function vb(i){var r=i.stateNode,l=i.type,u=i.memoizedProps;switch(r[Gt]=i,r[bn]=u,l){case"dialog":We("cancel",r),We("close",r);break;case"iframe":case"object":case"embed":We("load",r);break;case"video":case"audio":for(l=0;l<Mo.length;l++)We(Mo[l],r);break;case"source":We("error",r);break;case"img":case"image":case"link":We("error",r),We("load",r);break;case"details":We("toggle",r);break;case"input":We("invalid",r),Rr(r,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":We("invalid",r);break;case"textarea":We("invalid",r),Ts(r,u.value,u.defaultValue,u.children)}l=u.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||r.textContent===""+l||u.suppressHydrationWarning===!0||zx(r.textContent,l)?(u.popover!=null&&(We("beforetoggle",r),We("toggle",r)),u.onScroll!=null&&We("scroll",r),u.onScrollEnd!=null&&We("scrollend",r),u.onClick!=null&&(r.onclick=be),r=!0):r=!1,r||Fa(i,!0)}function wb(i){for(dn=i.return;dn;)switch(dn.tag){case 5:case 31:case 13:mi=!1;return;case 27:case 3:mi=!0;return;default:dn=dn.return}}function Is(i){if(i!==dn)return!1;if(!nt)return wb(i),nt=!0,!1;var r=i.tag,l;if((l=r!==3&&r!==27)&&((l=r===5)&&(l=i.type,l=!(l!=="form"&&l!=="button")||Kh(i.type,i.memoizedProps)),l=!l),l&&Tt&&Fa(i),wb(i),r===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(a(317));Tt=Gx(i)}else if(r===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(a(317));Tt=Gx(i)}else r===27?(r=Tt,tr(i.type)?(i=Wh,Wh=null,Tt=i):Tt=r):Tt=dn?bi(i.stateNode.nextSibling):null;return!0}function Ur(){Tt=dn=null,nt=!1}function Tf(){var i=Ua;return i!==null&&(qn===null?qn=i:qn.push.apply(qn,i),Ua=null),i}function uo(i){Ua===null?Ua=[i]:Ua.push(i)}var Af=R(null),Fr=null,ua=null;function qa(i,r,l){j(Af,r._currentValue),r._currentValue=l}function da(i){i._currentValue=Af.current,Q(Af)}function jf(i,r,l){for(;i!==null;){var u=i.alternate;if((i.childLanes&r)!==r?(i.childLanes|=r,u!==null&&(u.childLanes|=r)):u!==null&&(u.childLanes&r)!==r&&(u.childLanes|=r),i===l)break;i=i.return}}function Of(i,r,l,u){var m=i.child;for(m!==null&&(m.return=i);m!==null;){var y=m.dependencies;if(y!==null){var k=m.child;y=y.firstContext;e:for(;y!==null;){var N=y;y=m;for(var L=0;L<r.length;L++)if(N.context===r[L]){y.lanes|=l,N=y.alternate,N!==null&&(N.lanes|=l),jf(y.return,l,i),u||(k=null);break e}y=N.next}}else if(m.tag===18){if(k=m.return,k===null)throw Error(a(341));k.lanes|=l,y=k.alternate,y!==null&&(y.lanes|=l),jf(k,l,i),k=null}else k=m.child;if(k!==null)k.return=m;else for(k=m;k!==null;){if(k===i){k=null;break}if(m=k.sibling,m!==null){m.return=k.return,k=m;break}k=k.return}m=k}}function zs(i,r,l,u){i=null;for(var m=r,y=!1;m!==null;){if(!y){if((m.flags&524288)!==0)y=!0;else if((m.flags&262144)!==0)break}if(m.tag===10){var k=m.alternate;if(k===null)throw Error(a(387));if(k=k.memoizedProps,k!==null){var N=m.type;Xn(m.pendingProps.value,k.value)||(i!==null?i.push(N):i=[N])}}else if(m===xe.current){if(k=m.alternate,k===null)throw Error(a(387));k.memoizedState.memoizedState!==m.memoizedState.memoizedState&&(i!==null?i.push(Bo):i=[Bo])}m=m.return}i!==null&&Of(r,i,l,u),r.flags|=262144}function Wc(i){for(i=i.firstContext;i!==null;){if(!Xn(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function qr(i){Fr=i,ua=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function fn(i){return kb(Fr,i)}function Xc(i,r){return Fr===null&&qr(i),kb(i,r)}function kb(i,r){var l=r._currentValue;if(r={context:r,memoizedValue:l,next:null},ua===null){if(i===null)throw Error(a(308));ua=r,i.dependencies={lanes:0,firstContext:r},i.flags|=524288}else ua=ua.next=r;return l}var PS=typeof AbortController<"u"?AbortController:function(){var i=[],r=this.signal={aborted:!1,addEventListener:function(l,u){i.push(u)}};this.abort=function(){r.aborted=!0,i.forEach(function(l){return l()})}},US=e.unstable_scheduleCallback,FS=e.unstable_NormalPriority,Zt={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Df(){return{controller:new PS,data:new Map,refCount:0}}function fo(i){i.refCount--,i.refCount===0&&US(FS,function(){i.controller.abort()})}var ho=null,Mf=0,Bs=0,Ps=null;function qS(i,r){if(ho===null){var l=ho=[];Mf=0,Bs=Ih(),Ps={status:"pending",value:void 0,then:function(u){l.push(u)}}}return Mf++,r.then(Eb,Eb),r}function Eb(){if(--Mf===0&&ho!==null){Ps!==null&&(Ps.status="fulfilled");var i=ho;ho=null,Bs=0,Ps=null;for(var r=0;r<i.length;r++)(0,i[r])()}}function $S(i,r){var l=[],u={status:"pending",value:null,reason:null,then:function(m){l.push(m)}};return i.then(function(){u.status="fulfilled",u.value=r;for(var m=0;m<l.length;m++)(0,l[m])(r)},function(m){for(u.status="rejected",u.reason=m,m=0;m<l.length;m++)(0,l[m])(void 0)}),u}var Sb=$.S;$.S=function(i,r){lx=zt(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&qS(i,r),Sb!==null&&Sb(i,r)};var $r=R(null);function Rf(){var i=$r.current;return i!==null?i:wt.pooledCache}function Zc(i,r){r===null?j($r,$r.current):j($r,r.pool)}function _b(){var i=Rf();return i===null?null:{parent:Zt._currentValue,pool:i}}var Us=Error(a(460)),Lf=Error(a(474)),Jc=Error(a(542)),eu={then:function(){}};function Nb(i){return i=i.status,i==="fulfilled"||i==="rejected"}function Cb(i,r,l){switch(l=i[l],l===void 0?i.push(r):l!==r&&(r.then(be,be),r=l),r.status){case"fulfilled":return r.value;case"rejected":throw i=r.reason,Ab(i),i;default:if(typeof r.status=="string")r.then(be,be);else{if(i=wt,i!==null&&100<i.shellSuspendCounter)throw Error(a(482));i=r,i.status="pending",i.then(function(u){if(r.status==="pending"){var m=r;m.status="fulfilled",m.value=u}},function(u){if(r.status==="pending"){var m=r;m.status="rejected",m.reason=u}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw i=r.reason,Ab(i),i}throw Kr=r,Us}}function Hr(i){try{var r=i._init;return r(i._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Kr=l,Us):l}}var Kr=null;function Tb(){if(Kr===null)throw Error(a(459));var i=Kr;return Kr=null,i}function Ab(i){if(i===Us||i===Jc)throw Error(a(483))}var Fs=null,po=0;function tu(i){var r=po;return po+=1,Fs===null&&(Fs=[]),Cb(Fs,i,r)}function mo(i,r){r=r.props.ref,i.ref=r!==void 0?r:null}function nu(i,r){throw r.$$typeof===v?Error(a(525)):(i=Object.prototype.toString.call(r),Error(a(31,i==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":i)))}function jb(i){function r(H,U){if(i){var K=H.deletions;K===null?(H.deletions=[U],H.flags|=16):K.push(U)}}function l(H,U){if(!i)return null;for(;U!==null;)r(H,U),U=U.sibling;return null}function u(H){for(var U=new Map;H!==null;)H.key!==null?U.set(H.key,H):U.set(H.index,H),H=H.sibling;return U}function m(H,U){return H=oa(H,U),H.index=0,H.sibling=null,H}function y(H,U,K){return H.index=K,i?(K=H.alternate,K!==null?(K=K.index,K<U?(H.flags|=67108866,U):K):(H.flags|=67108866,U)):(H.flags|=1048576,U)}function k(H){return i&&H.alternate===null&&(H.flags|=67108866),H}function N(H,U,K,le){return U===null||U.tag!==6?(U=Ef(K,H.mode,le),U.return=H,U):(U=m(U,K),U.return=H,U)}function L(H,U,K,le){var Oe=K.type;return Oe===w?ie(H,U,K.props.children,le,K.key):U!==null&&(U.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===F&&Hr(Oe)===U.type)?(U=m(U,K.props),mo(U,K),U.return=H,U):(U=Yc(K.type,K.key,K.props,null,H.mode,le),mo(U,K),U.return=H,U)}function G(H,U,K,le){return U===null||U.tag!==4||U.stateNode.containerInfo!==K.containerInfo||U.stateNode.implementation!==K.implementation?(U=Sf(K,H.mode,le),U.return=H,U):(U=m(U,K.children||[]),U.return=H,U)}function ie(H,U,K,le,Oe){return U===null||U.tag!==7?(U=Pr(K,H.mode,le,Oe),U.return=H,U):(U=m(U,K),U.return=H,U)}function oe(H,U,K){if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return U=Ef(""+U,H.mode,K),U.return=H,U;if(typeof U=="object"&&U!==null){switch(U.$$typeof){case x:return K=Yc(U.type,U.key,U.props,null,H.mode,K),mo(K,U),K.return=H,K;case E:return U=Sf(U,H.mode,K),U.return=H,U;case F:return U=Hr(U),oe(H,U,K)}if(te(U)||J(U))return U=Pr(U,H.mode,K,null),U.return=H,U;if(typeof U.then=="function")return oe(H,tu(U),K);if(U.$$typeof===T)return oe(H,Xc(H,U),K);nu(H,U)}return null}function W(H,U,K,le){var Oe=U!==null?U.key:null;if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return Oe!==null?null:N(H,U,""+K,le);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case x:return K.key===Oe?L(H,U,K,le):null;case E:return K.key===Oe?G(H,U,K,le):null;case F:return K=Hr(K),W(H,U,K,le)}if(te(K)||J(K))return Oe!==null?null:ie(H,U,K,le,null);if(typeof K.then=="function")return W(H,U,tu(K),le);if(K.$$typeof===T)return W(H,U,Xc(H,K),le);nu(H,K)}return null}function Z(H,U,K,le,Oe){if(typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint")return H=H.get(K)||null,N(U,H,""+le,Oe);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case x:return H=H.get(le.key===null?K:le.key)||null,L(U,H,le,Oe);case E:return H=H.get(le.key===null?K:le.key)||null,G(U,H,le,Oe);case F:return le=Hr(le),Z(H,U,K,le,Oe)}if(te(le)||J(le))return H=H.get(K)||null,ie(U,H,le,Oe,null);if(typeof le.then=="function")return Z(H,U,K,tu(le),Oe);if(le.$$typeof===T)return Z(H,U,K,Xc(U,le),Oe);nu(U,le)}return null}function Ee(H,U,K,le){for(var Oe=null,lt=null,Ce=U,He=U=0,et=null;Ce!==null&&He<K.length;He++){Ce.index>He?(et=Ce,Ce=null):et=Ce.sibling;var ot=W(H,Ce,K[He],le);if(ot===null){Ce===null&&(Ce=et);break}i&&Ce&&ot.alternate===null&&r(H,Ce),U=y(ot,U,He),lt===null?Oe=ot:lt.sibling=ot,lt=ot,Ce=et}if(He===K.length)return l(H,Ce),nt&&ca(H,He),Oe;if(Ce===null){for(;He<K.length;He++)Ce=oe(H,K[He],le),Ce!==null&&(U=y(Ce,U,He),lt===null?Oe=Ce:lt.sibling=Ce,lt=Ce);return nt&&ca(H,He),Oe}for(Ce=u(Ce);He<K.length;He++)et=Z(Ce,H,He,K[He],le),et!==null&&(i&&et.alternate!==null&&Ce.delete(et.key===null?He:et.key),U=y(et,U,He),lt===null?Oe=et:lt.sibling=et,lt=et);return i&&Ce.forEach(function(sr){return r(H,sr)}),nt&&ca(H,He),Oe}function Re(H,U,K,le){if(K==null)throw Error(a(151));for(var Oe=null,lt=null,Ce=U,He=U=0,et=null,ot=K.next();Ce!==null&&!ot.done;He++,ot=K.next()){Ce.index>He?(et=Ce,Ce=null):et=Ce.sibling;var sr=W(H,Ce,ot.value,le);if(sr===null){Ce===null&&(Ce=et);break}i&&Ce&&sr.alternate===null&&r(H,Ce),U=y(sr,U,He),lt===null?Oe=sr:lt.sibling=sr,lt=sr,Ce=et}if(ot.done)return l(H,Ce),nt&&ca(H,He),Oe;if(Ce===null){for(;!ot.done;He++,ot=K.next())ot=oe(H,ot.value,le),ot!==null&&(U=y(ot,U,He),lt===null?Oe=ot:lt.sibling=ot,lt=ot);return nt&&ca(H,He),Oe}for(Ce=u(Ce);!ot.done;He++,ot=K.next())ot=Z(Ce,H,He,ot.value,le),ot!==null&&(i&&ot.alternate!==null&&Ce.delete(ot.key===null?He:ot.key),U=y(ot,U,He),lt===null?Oe=ot:lt.sibling=ot,lt=ot);return i&&Ce.forEach(function(eN){return r(H,eN)}),nt&&ca(H,He),Oe}function yt(H,U,K,le){if(typeof K=="object"&&K!==null&&K.type===w&&K.key===null&&(K=K.props.children),typeof K=="object"&&K!==null){switch(K.$$typeof){case x:e:{for(var Oe=K.key;U!==null;){if(U.key===Oe){if(Oe=K.type,Oe===w){if(U.tag===7){l(H,U.sibling),le=m(U,K.props.children),le.return=H,H=le;break e}}else if(U.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===F&&Hr(Oe)===U.type){l(H,U.sibling),le=m(U,K.props),mo(le,K),le.return=H,H=le;break e}l(H,U);break}else r(H,U);U=U.sibling}K.type===w?(le=Pr(K.props.children,H.mode,le,K.key),le.return=H,H=le):(le=Yc(K.type,K.key,K.props,null,H.mode,le),mo(le,K),le.return=H,H=le)}return k(H);case E:e:{for(Oe=K.key;U!==null;){if(U.key===Oe)if(U.tag===4&&U.stateNode.containerInfo===K.containerInfo&&U.stateNode.implementation===K.implementation){l(H,U.sibling),le=m(U,K.children||[]),le.return=H,H=le;break e}else{l(H,U);break}else r(H,U);U=U.sibling}le=Sf(K,H.mode,le),le.return=H,H=le}return k(H);case F:return K=Hr(K),yt(H,U,K,le)}if(te(K))return Ee(H,U,K,le);if(J(K)){if(Oe=J(K),typeof Oe!="function")throw Error(a(150));return K=Oe.call(K),Re(H,U,K,le)}if(typeof K.then=="function")return yt(H,U,tu(K),le);if(K.$$typeof===T)return yt(H,U,Xc(H,K),le);nu(H,K)}return typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint"?(K=""+K,U!==null&&U.tag===6?(l(H,U.sibling),le=m(U,K),le.return=H,H=le):(l(H,U),le=Ef(K,H.mode,le),le.return=H,H=le),k(H)):l(H,U)}return function(H,U,K,le){try{po=0;var Oe=yt(H,U,K,le);return Fs=null,Oe}catch(Ce){if(Ce===Us||Ce===Jc)throw Ce;var lt=Zn(29,Ce,null,H.mode);return lt.lanes=le,lt.return=H,lt}finally{}}}var Gr=jb(!0),Ob=jb(!1),$a=!1;function If(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function zf(i,r){i=i.updateQueue,r.updateQueue===i&&(r.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function Ha(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Ka(i,r,l){var u=i.updateQueue;if(u===null)return null;if(u=u.shared,(ct&2)!==0){var m=u.pending;return m===null?r.next=r:(r.next=m.next,m.next=r),u.pending=r,r=Qc(i),pb(i,null,l),r}return Gc(i,u,r,l),Qc(i)}function go(i,r,l){if(r=r.updateQueue,r!==null&&(r=r.shared,(l&4194048)!==0)){var u=r.lanes;u&=i.pendingLanes,l|=u,r.lanes=l,Ie(i,l)}}function Bf(i,r){var l=i.updateQueue,u=i.alternate;if(u!==null&&(u=u.updateQueue,l===u)){var m=null,y=null;if(l=l.firstBaseUpdate,l!==null){do{var k={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};y===null?m=y=k:y=y.next=k,l=l.next}while(l!==null);y===null?m=y=r:y=y.next=r}else m=y=r;l={baseState:u.baseState,firstBaseUpdate:m,lastBaseUpdate:y,shared:u.shared,callbacks:u.callbacks},i.updateQueue=l;return}i=l.lastBaseUpdate,i===null?l.firstBaseUpdate=r:i.next=r,l.lastBaseUpdate=r}var Pf=!1;function bo(){if(Pf){var i=Ps;if(i!==null)throw i}}function yo(i,r,l,u){Pf=!1;var m=i.updateQueue;$a=!1;var y=m.firstBaseUpdate,k=m.lastBaseUpdate,N=m.shared.pending;if(N!==null){m.shared.pending=null;var L=N,G=L.next;L.next=null,k===null?y=G:k.next=G,k=L;var ie=i.alternate;ie!==null&&(ie=ie.updateQueue,N=ie.lastBaseUpdate,N!==k&&(N===null?ie.firstBaseUpdate=G:N.next=G,ie.lastBaseUpdate=L))}if(y!==null){var oe=m.baseState;k=0,ie=G=L=null,N=y;do{var W=N.lane&-536870913,Z=W!==N.lane;if(Z?(Je&W)===W:(u&W)===W){W!==0&&W===Bs&&(Pf=!0),ie!==null&&(ie=ie.next={lane:0,tag:N.tag,payload:N.payload,callback:null,next:null});e:{var Ee=i,Re=N;W=r;var yt=l;switch(Re.tag){case 1:if(Ee=Re.payload,typeof Ee=="function"){oe=Ee.call(yt,oe,W);break e}oe=Ee;break e;case 3:Ee.flags=Ee.flags&-65537|128;case 0:if(Ee=Re.payload,W=typeof Ee=="function"?Ee.call(yt,oe,W):Ee,W==null)break e;oe=g({},oe,W);break e;case 2:$a=!0}}W=N.callback,W!==null&&(i.flags|=64,Z&&(i.flags|=8192),Z=m.callbacks,Z===null?m.callbacks=[W]:Z.push(W))}else Z={lane:W,tag:N.tag,payload:N.payload,callback:N.callback,next:null},ie===null?(G=ie=Z,L=oe):ie=ie.next=Z,k|=W;if(N=N.next,N===null){if(N=m.shared.pending,N===null)break;Z=N,N=Z.next,Z.next=null,m.lastBaseUpdate=Z,m.shared.pending=null}}while(!0);ie===null&&(L=oe),m.baseState=L,m.firstBaseUpdate=G,m.lastBaseUpdate=ie,y===null&&(m.shared.lanes=0),Wa|=k,i.lanes=k,i.memoizedState=oe}}function Db(i,r){if(typeof i!="function")throw Error(a(191,i));i.call(r)}function Mb(i,r){var l=i.callbacks;if(l!==null)for(i.callbacks=null,i=0;i<l.length;i++)Db(l[i],r)}var qs=R(null),iu=R(0);function Rb(i,r){i=va,j(iu,i),j(qs,r),va=i|r.baseLanes}function Uf(){j(iu,va),j(qs,qs.current)}function Ff(){va=iu.current,Q(qs),Q(iu)}var Jn=R(null),gi=null;function Ga(i){var r=i.alternate;j(Yt,Yt.current&1),j(Jn,i),gi===null&&(r===null||qs.current!==null||r.memoizedState!==null)&&(gi=i)}function qf(i){j(Yt,Yt.current),j(Jn,i),gi===null&&(gi=i)}function Lb(i){i.tag===22?(j(Yt,Yt.current),j(Jn,i),gi===null&&(gi=i)):Qa()}function Qa(){j(Yt,Yt.current),j(Jn,Jn.current)}function ei(i){Q(Jn),gi===i&&(gi=null),Q(Yt)}var Yt=R(0);function au(i){for(var r=i;r!==null;){if(r.tag===13){var l=r.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Yh(l)||Vh(l)))return r}else if(r.tag===19&&(r.memoizedProps.revealOrder==="forwards"||r.memoizedProps.revealOrder==="backwards"||r.memoizedProps.revealOrder==="unstable_legacy-backwards"||r.memoizedProps.revealOrder==="together")){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===i)break;for(;r.sibling===null;){if(r.return===null||r.return===i)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var fa=0,$e=null,gt=null,Jt=null,ru=!1,$s=!1,Qr=!1,su=0,xo=0,Hs=null,HS=0;function qt(){throw Error(a(321))}function $f(i,r){if(r===null)return!1;for(var l=0;l<r.length&&l<i.length;l++)if(!Xn(i[l],r[l]))return!1;return!0}function Hf(i,r,l,u,m,y){return fa=y,$e=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,$.H=i===null||i.memoizedState===null?yy:rh,Qr=!1,y=l(u,m),Qr=!1,$s&&(y=zb(r,l,u,m)),Ib(i),y}function Ib(i){$.H=ko;var r=gt!==null&&gt.next!==null;if(fa=0,Jt=gt=$e=null,ru=!1,xo=0,Hs=null,r)throw Error(a(300));i===null||en||(i=i.dependencies,i!==null&&Wc(i)&&(en=!0))}function zb(i,r,l,u){$e=i;var m=0;do{if($s&&(Hs=null),xo=0,$s=!1,25<=m)throw Error(a(301));if(m+=1,Jt=gt=null,i.updateQueue!=null){var y=i.updateQueue;y.lastEffect=null,y.events=null,y.stores=null,y.memoCache!=null&&(y.memoCache.index=0)}$.H=xy,y=r(l,u)}while($s);return y}function KS(){var i=$.H,r=i.useState()[0];return r=typeof r.then=="function"?vo(r):r,i=i.useState()[0],(gt!==null?gt.memoizedState:null)!==i&&($e.flags|=1024),r}function Kf(){var i=su!==0;return su=0,i}function Gf(i,r,l){r.updateQueue=i.updateQueue,r.flags&=-2053,i.lanes&=~l}function Qf(i){if(ru){for(i=i.memoizedState;i!==null;){var r=i.queue;r!==null&&(r.pending=null),i=i.next}ru=!1}fa=0,Jt=gt=$e=null,$s=!1,xo=su=0,Hs=null}function Tn(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Jt===null?$e.memoizedState=Jt=i:Jt=Jt.next=i,Jt}function Vt(){if(gt===null){var i=$e.alternate;i=i!==null?i.memoizedState:null}else i=gt.next;var r=Jt===null?$e.memoizedState:Jt.next;if(r!==null)Jt=r,gt=i;else{if(i===null)throw $e.alternate===null?Error(a(467)):Error(a(310));gt=i,i={memoizedState:gt.memoizedState,baseState:gt.baseState,baseQueue:gt.baseQueue,queue:gt.queue,next:null},Jt===null?$e.memoizedState=Jt=i:Jt=Jt.next=i}return Jt}function lu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function vo(i){var r=xo;return xo+=1,Hs===null&&(Hs=[]),i=Cb(Hs,i,r),r=$e,(Jt===null?r.memoizedState:Jt.next)===null&&(r=r.alternate,$.H=r===null||r.memoizedState===null?yy:rh),i}function ou(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return vo(i);if(i.$$typeof===T)return fn(i)}throw Error(a(438,String(i)))}function Yf(i){var r=null,l=$e.updateQueue;if(l!==null&&(r=l.memoCache),r==null){var u=$e.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(r={data:u.data.map(function(m){return m.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),l===null&&(l=lu(),$e.updateQueue=l),l.memoCache=r,l=r.data[r.index],l===void 0)for(l=r.data[r.index]=Array(i),u=0;u<i;u++)l[u]=P;return r.index++,l}function ha(i,r){return typeof r=="function"?r(i):r}function cu(i){var r=Vt();return Vf(r,gt,i)}function Vf(i,r,l){var u=i.queue;if(u===null)throw Error(a(311));u.lastRenderedReducer=l;var m=i.baseQueue,y=u.pending;if(y!==null){if(m!==null){var k=m.next;m.next=y.next,y.next=k}r.baseQueue=m=y,u.pending=null}if(y=i.baseState,m===null)i.memoizedState=y;else{r=m.next;var N=k=null,L=null,G=r,ie=!1;do{var oe=G.lane&-536870913;if(oe!==G.lane?(Je&oe)===oe:(fa&oe)===oe){var W=G.revertLane;if(W===0)L!==null&&(L=L.next={lane:0,revertLane:0,gesture:null,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null}),oe===Bs&&(ie=!0);else if((fa&W)===W){G=G.next,W===Bs&&(ie=!0);continue}else oe={lane:0,revertLane:G.revertLane,gesture:null,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null},L===null?(N=L=oe,k=y):L=L.next=oe,$e.lanes|=W,Wa|=W;oe=G.action,Qr&&l(y,oe),y=G.hasEagerState?G.eagerState:l(y,oe)}else W={lane:oe,revertLane:G.revertLane,gesture:G.gesture,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null},L===null?(N=L=W,k=y):L=L.next=W,$e.lanes|=oe,Wa|=oe;G=G.next}while(G!==null&&G!==r);if(L===null?k=y:L.next=N,!Xn(y,i.memoizedState)&&(en=!0,ie&&(l=Ps,l!==null)))throw l;i.memoizedState=y,i.baseState=k,i.baseQueue=L,u.lastRenderedState=y}return m===null&&(u.lanes=0),[i.memoizedState,u.dispatch]}function Wf(i){var r=Vt(),l=r.queue;if(l===null)throw Error(a(311));l.lastRenderedReducer=i;var u=l.dispatch,m=l.pending,y=r.memoizedState;if(m!==null){l.pending=null;var k=m=m.next;do y=i(y,k.action),k=k.next;while(k!==m);Xn(y,r.memoizedState)||(en=!0),r.memoizedState=y,r.baseQueue===null&&(r.baseState=y),l.lastRenderedState=y}return[y,u]}function Bb(i,r,l){var u=$e,m=Vt(),y=nt;if(y){if(l===void 0)throw Error(a(407));l=l()}else l=r();var k=!Xn((gt||m).memoizedState,l);if(k&&(m.memoizedState=l,en=!0),m=m.queue,Jf(Fb.bind(null,u,m,i),[i]),m.getSnapshot!==r||k||Jt!==null&&Jt.memoizedState.tag&1){if(u.flags|=2048,Ks(9,{destroy:void 0},Ub.bind(null,u,m,l,r),null),wt===null)throw Error(a(349));y||(fa&127)!==0||Pb(u,r,l)}return l}function Pb(i,r,l){i.flags|=16384,i={getSnapshot:r,value:l},r=$e.updateQueue,r===null?(r=lu(),$e.updateQueue=r,r.stores=[i]):(l=r.stores,l===null?r.stores=[i]:l.push(i))}function Ub(i,r,l,u){r.value=l,r.getSnapshot=u,qb(r)&&$b(i)}function Fb(i,r,l){return l(function(){qb(r)&&$b(i)})}function qb(i){var r=i.getSnapshot;i=i.value;try{var l=r();return!Xn(i,l)}catch{return!0}}function $b(i){var r=Br(i,2);r!==null&&$n(r,i,2)}function Xf(i){var r=Tn();if(typeof i=="function"){var l=i;if(i=l(),Qr){gn(!0);try{l()}finally{gn(!1)}}}return r.memoizedState=r.baseState=i,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ha,lastRenderedState:i},r}function Hb(i,r,l,u){return i.baseState=l,Vf(i,gt,typeof u=="function"?u:ha)}function GS(i,r,l,u,m){if(fu(i))throw Error(a(485));if(i=r.action,i!==null){var y={payload:m,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(k){y.listeners.push(k)}};$.T!==null?l(!0):y.isTransition=!1,u(y),l=r.pending,l===null?(y.next=r.pending=y,Kb(r,y)):(y.next=l.next,r.pending=l.next=y)}}function Kb(i,r){var l=r.action,u=r.payload,m=i.state;if(r.isTransition){var y=$.T,k={};$.T=k;try{var N=l(m,u),L=$.S;L!==null&&L(k,N),Gb(i,r,N)}catch(G){Zf(i,r,G)}finally{y!==null&&k.types!==null&&(y.types=k.types),$.T=y}}else try{y=l(m,u),Gb(i,r,y)}catch(G){Zf(i,r,G)}}function Gb(i,r,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(u){Qb(i,r,u)},function(u){return Zf(i,r,u)}):Qb(i,r,l)}function Qb(i,r,l){r.status="fulfilled",r.value=l,Yb(r),i.state=l,r=i.pending,r!==null&&(l=r.next,l===r?i.pending=null:(l=l.next,r.next=l,Kb(i,l)))}function Zf(i,r,l){var u=i.pending;if(i.pending=null,u!==null){u=u.next;do r.status="rejected",r.reason=l,Yb(r),r=r.next;while(r!==u)}i.action=null}function Yb(i){i=i.listeners;for(var r=0;r<i.length;r++)(0,i[r])()}function Vb(i,r){return r}function Wb(i,r){if(nt){var l=wt.formState;if(l!==null){e:{var u=$e;if(nt){if(Tt){t:{for(var m=Tt,y=mi;m.nodeType!==8;){if(!y){m=null;break t}if(m=bi(m.nextSibling),m===null){m=null;break t}}y=m.data,m=y==="F!"||y==="F"?m:null}if(m){Tt=bi(m.nextSibling),u=m.data==="F!";break e}}Fa(u)}u=!1}u&&(r=l[0])}}return l=Tn(),l.memoizedState=l.baseState=r,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vb,lastRenderedState:r},l.queue=u,l=my.bind(null,$e,u),u.dispatch=l,u=Xf(!1),y=ah.bind(null,$e,!1,u.queue),u=Tn(),m={state:r,dispatch:null,action:i,pending:null},u.queue=m,l=GS.bind(null,$e,m,y,l),m.dispatch=l,u.memoizedState=i,[r,l,!1]}function Xb(i){var r=Vt();return Zb(r,gt,i)}function Zb(i,r,l){if(r=Vf(i,r,Vb)[0],i=cu(ha)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var u=vo(r)}catch(k){throw k===Us?Jc:k}else u=r;r=Vt();var m=r.queue,y=m.dispatch;return l!==r.memoizedState&&($e.flags|=2048,Ks(9,{destroy:void 0},QS.bind(null,m,l),null)),[u,y,i]}function QS(i,r){i.action=r}function Jb(i){var r=Vt(),l=gt;if(l!==null)return Zb(r,l,i);Vt(),r=r.memoizedState,l=Vt();var u=l.queue.dispatch;return l.memoizedState=i,[r,u,!1]}function Ks(i,r,l,u){return i={tag:i,create:l,deps:u,inst:r,next:null},r=$e.updateQueue,r===null&&(r=lu(),$e.updateQueue=r),l=r.lastEffect,l===null?r.lastEffect=i.next=i:(u=l.next,l.next=i,i.next=u,r.lastEffect=i),i}function ey(){return Vt().memoizedState}function uu(i,r,l,u){var m=Tn();$e.flags|=i,m.memoizedState=Ks(1|r,{destroy:void 0},l,u===void 0?null:u)}function du(i,r,l,u){var m=Vt();u=u===void 0?null:u;var y=m.memoizedState.inst;gt!==null&&u!==null&&$f(u,gt.memoizedState.deps)?m.memoizedState=Ks(r,y,l,u):($e.flags|=i,m.memoizedState=Ks(1|r,y,l,u))}function ty(i,r){uu(8390656,8,i,r)}function Jf(i,r){du(2048,8,i,r)}function YS(i){$e.flags|=4;var r=$e.updateQueue;if(r===null)r=lu(),$e.updateQueue=r,r.events=[i];else{var l=r.events;l===null?r.events=[i]:l.push(i)}}function ny(i){var r=Vt().memoizedState;return YS({ref:r,nextImpl:i}),function(){if((ct&2)!==0)throw Error(a(440));return r.impl.apply(void 0,arguments)}}function iy(i,r){return du(4,2,i,r)}function ay(i,r){return du(4,4,i,r)}function ry(i,r){if(typeof r=="function"){i=i();var l=r(i);return function(){typeof l=="function"?l():r(null)}}if(r!=null)return i=i(),r.current=i,function(){r.current=null}}function sy(i,r,l){l=l!=null?l.concat([i]):null,du(4,4,ry.bind(null,r,i),l)}function eh(){}function ly(i,r){var l=Vt();r=r===void 0?null:r;var u=l.memoizedState;return r!==null&&$f(r,u[1])?u[0]:(l.memoizedState=[i,r],i)}function oy(i,r){var l=Vt();r=r===void 0?null:r;var u=l.memoizedState;if(r!==null&&$f(r,u[1]))return u[0];if(u=i(),Qr){gn(!0);try{i()}finally{gn(!1)}}return l.memoizedState=[u,r],u}function th(i,r,l){return l===void 0||(fa&1073741824)!==0&&(Je&261930)===0?i.memoizedState=r:(i.memoizedState=l,i=cx(),$e.lanes|=i,Wa|=i,l)}function cy(i,r,l,u){return Xn(l,r)?l:qs.current!==null?(i=th(i,l,u),Xn(i,r)||(en=!0),i):(fa&42)===0||(fa&1073741824)!==0&&(Je&261930)===0?(en=!0,i.memoizedState=l):(i=cx(),$e.lanes|=i,Wa|=i,r)}function uy(i,r,l,u,m){var y=ce.p;ce.p=y!==0&&8>y?y:8;var k=$.T,N={};$.T=N,ah(i,!1,r,l);try{var L=m(),G=$.S;if(G!==null&&G(N,L),L!==null&&typeof L=="object"&&typeof L.then=="function"){var ie=$S(L,u);wo(i,r,ie,ii(i))}else wo(i,r,u,ii(i))}catch(oe){wo(i,r,{then:function(){},status:"rejected",reason:oe},ii())}finally{ce.p=y,k!==null&&N.types!==null&&(k.types=N.types),$.T=k}}function VS(){}function nh(i,r,l,u){if(i.tag!==5)throw Error(a(476));var m=dy(i).queue;uy(i,m,r,de,l===null?VS:function(){return fy(i),l(u)})}function dy(i){var r=i.memoizedState;if(r!==null)return r;r={memoizedState:de,baseState:de,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ha,lastRenderedState:de},next:null};var l={};return r.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ha,lastRenderedState:l},next:null},i.memoizedState=r,i=i.alternate,i!==null&&(i.memoizedState=r),r}function fy(i){var r=dy(i);r.next===null&&(r=i.alternate.memoizedState),wo(i,r.next.queue,{},ii())}function ih(){return fn(Bo)}function hy(){return Vt().memoizedState}function py(){return Vt().memoizedState}function WS(i){for(var r=i.return;r!==null;){switch(r.tag){case 24:case 3:var l=ii();i=Ha(l);var u=Ka(r,i,l);u!==null&&($n(u,r,l),go(u,r,l)),r={cache:Df()},i.payload=r;return}r=r.return}}function XS(i,r,l){var u=ii();l={lane:u,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},fu(i)?gy(r,l):(l=wf(i,r,l,u),l!==null&&($n(l,i,u),by(l,r,u)))}function my(i,r,l){var u=ii();wo(i,r,l,u)}function wo(i,r,l,u){var m={lane:u,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(fu(i))gy(r,m);else{var y=i.alternate;if(i.lanes===0&&(y===null||y.lanes===0)&&(y=r.lastRenderedReducer,y!==null))try{var k=r.lastRenderedState,N=y(k,l);if(m.hasEagerState=!0,m.eagerState=N,Xn(N,k))return Gc(i,r,m,0),wt===null&&Kc(),!1}catch{}finally{}if(l=wf(i,r,m,u),l!==null)return $n(l,i,u),by(l,r,u),!0}return!1}function ah(i,r,l,u){if(u={lane:2,revertLane:Ih(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},fu(i)){if(r)throw Error(a(479))}else r=wf(i,l,u,2),r!==null&&$n(r,i,2)}function fu(i){var r=i.alternate;return i===$e||r!==null&&r===$e}function gy(i,r){$s=ru=!0;var l=i.pending;l===null?r.next=r:(r.next=l.next,l.next=r),i.pending=r}function by(i,r,l){if((l&4194048)!==0){var u=r.lanes;u&=i.pendingLanes,l|=u,r.lanes=l,Ie(i,l)}}var ko={readContext:fn,use:ou,useCallback:qt,useContext:qt,useEffect:qt,useImperativeHandle:qt,useLayoutEffect:qt,useInsertionEffect:qt,useMemo:qt,useReducer:qt,useRef:qt,useState:qt,useDebugValue:qt,useDeferredValue:qt,useTransition:qt,useSyncExternalStore:qt,useId:qt,useHostTransitionStatus:qt,useFormState:qt,useActionState:qt,useOptimistic:qt,useMemoCache:qt,useCacheRefresh:qt};ko.useEffectEvent=qt;var yy={readContext:fn,use:ou,useCallback:function(i,r){return Tn().memoizedState=[i,r===void 0?null:r],i},useContext:fn,useEffect:ty,useImperativeHandle:function(i,r,l){l=l!=null?l.concat([i]):null,uu(4194308,4,ry.bind(null,r,i),l)},useLayoutEffect:function(i,r){return uu(4194308,4,i,r)},useInsertionEffect:function(i,r){uu(4,2,i,r)},useMemo:function(i,r){var l=Tn();r=r===void 0?null:r;var u=i();if(Qr){gn(!0);try{i()}finally{gn(!1)}}return l.memoizedState=[u,r],u},useReducer:function(i,r,l){var u=Tn();if(l!==void 0){var m=l(r);if(Qr){gn(!0);try{l(r)}finally{gn(!1)}}}else m=r;return u.memoizedState=u.baseState=m,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:m},u.queue=i,i=i.dispatch=XS.bind(null,$e,i),[u.memoizedState,i]},useRef:function(i){var r=Tn();return i={current:i},r.memoizedState=i},useState:function(i){i=Xf(i);var r=i.queue,l=my.bind(null,$e,r);return r.dispatch=l,[i.memoizedState,l]},useDebugValue:eh,useDeferredValue:function(i,r){var l=Tn();return th(l,i,r)},useTransition:function(){var i=Xf(!1);return i=uy.bind(null,$e,i.queue,!0,!1),Tn().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,r,l){var u=$e,m=Tn();if(nt){if(l===void 0)throw Error(a(407));l=l()}else{if(l=r(),wt===null)throw Error(a(349));(Je&127)!==0||Pb(u,r,l)}m.memoizedState=l;var y={value:l,getSnapshot:r};return m.queue=y,ty(Fb.bind(null,u,y,i),[i]),u.flags|=2048,Ks(9,{destroy:void 0},Ub.bind(null,u,y,l,r),null),l},useId:function(){var i=Tn(),r=wt.identifierPrefix;if(nt){var l=Ki,u=Hi;l=(u&~(1<<32-dt(u)-1)).toString(32)+l,r="_"+r+"R_"+l,l=su++,0<l&&(r+="H"+l.toString(32)),r+="_"}else l=HS++,r="_"+r+"r_"+l.toString(32)+"_";return i.memoizedState=r},useHostTransitionStatus:ih,useFormState:Wb,useActionState:Wb,useOptimistic:function(i){var r=Tn();r.memoizedState=r.baseState=i;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=l,r=ah.bind(null,$e,!0,l),l.dispatch=r,[i,r]},useMemoCache:Yf,useCacheRefresh:function(){return Tn().memoizedState=WS.bind(null,$e)},useEffectEvent:function(i){var r=Tn(),l={impl:i};return r.memoizedState=l,function(){if((ct&2)!==0)throw Error(a(440));return l.impl.apply(void 0,arguments)}}},rh={readContext:fn,use:ou,useCallback:ly,useContext:fn,useEffect:Jf,useImperativeHandle:sy,useInsertionEffect:iy,useLayoutEffect:ay,useMemo:oy,useReducer:cu,useRef:ey,useState:function(){return cu(ha)},useDebugValue:eh,useDeferredValue:function(i,r){var l=Vt();return cy(l,gt.memoizedState,i,r)},useTransition:function(){var i=cu(ha)[0],r=Vt().memoizedState;return[typeof i=="boolean"?i:vo(i),r]},useSyncExternalStore:Bb,useId:hy,useHostTransitionStatus:ih,useFormState:Xb,useActionState:Xb,useOptimistic:function(i,r){var l=Vt();return Hb(l,gt,i,r)},useMemoCache:Yf,useCacheRefresh:py};rh.useEffectEvent=ny;var xy={readContext:fn,use:ou,useCallback:ly,useContext:fn,useEffect:Jf,useImperativeHandle:sy,useInsertionEffect:iy,useLayoutEffect:ay,useMemo:oy,useReducer:Wf,useRef:ey,useState:function(){return Wf(ha)},useDebugValue:eh,useDeferredValue:function(i,r){var l=Vt();return gt===null?th(l,i,r):cy(l,gt.memoizedState,i,r)},useTransition:function(){var i=Wf(ha)[0],r=Vt().memoizedState;return[typeof i=="boolean"?i:vo(i),r]},useSyncExternalStore:Bb,useId:hy,useHostTransitionStatus:ih,useFormState:Jb,useActionState:Jb,useOptimistic:function(i,r){var l=Vt();return gt!==null?Hb(l,gt,i,r):(l.baseState=i,[i,l.queue.dispatch])},useMemoCache:Yf,useCacheRefresh:py};xy.useEffectEvent=ny;function sh(i,r,l,u){r=i.memoizedState,l=l(u,r),l=l==null?r:g({},r,l),i.memoizedState=l,i.lanes===0&&(i.updateQueue.baseState=l)}var lh={enqueueSetState:function(i,r,l){i=i._reactInternals;var u=ii(),m=Ha(u);m.payload=r,l!=null&&(m.callback=l),r=Ka(i,m,u),r!==null&&($n(r,i,u),go(r,i,u))},enqueueReplaceState:function(i,r,l){i=i._reactInternals;var u=ii(),m=Ha(u);m.tag=1,m.payload=r,l!=null&&(m.callback=l),r=Ka(i,m,u),r!==null&&($n(r,i,u),go(r,i,u))},enqueueForceUpdate:function(i,r){i=i._reactInternals;var l=ii(),u=Ha(l);u.tag=2,r!=null&&(u.callback=r),r=Ka(i,u,l),r!==null&&($n(r,i,l),go(r,i,l))}};function vy(i,r,l,u,m,y,k){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(u,y,k):r.prototype&&r.prototype.isPureReactComponent?!lo(l,u)||!lo(m,y):!0}function wy(i,r,l,u){i=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(l,u),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(l,u),r.state!==i&&lh.enqueueReplaceState(r,r.state,null)}function Yr(i,r){var l=r;if("ref"in r){l={};for(var u in r)u!=="ref"&&(l[u]=r[u])}if(i=i.defaultProps){l===r&&(l=g({},l));for(var m in i)l[m]===void 0&&(l[m]=i[m])}return l}function ky(i){Hc(i)}function Ey(i){console.error(i)}function Sy(i){Hc(i)}function hu(i,r){try{var l=i.onUncaughtError;l(r.value,{componentStack:r.stack})}catch(u){setTimeout(function(){throw u})}}function _y(i,r,l){try{var u=i.onCaughtError;u(l.value,{componentStack:l.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(m){setTimeout(function(){throw m})}}function oh(i,r,l){return l=Ha(l),l.tag=3,l.payload={element:null},l.callback=function(){hu(i,r)},l}function Ny(i){return i=Ha(i),i.tag=3,i}function Cy(i,r,l,u){var m=l.type.getDerivedStateFromError;if(typeof m=="function"){var y=u.value;i.payload=function(){return m(y)},i.callback=function(){_y(r,l,u)}}var k=l.stateNode;k!==null&&typeof k.componentDidCatch=="function"&&(i.callback=function(){_y(r,l,u),typeof m!="function"&&(Xa===null?Xa=new Set([this]):Xa.add(this));var N=u.stack;this.componentDidCatch(u.value,{componentStack:N!==null?N:""})})}function ZS(i,r,l,u,m){if(l.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(r=l.alternate,r!==null&&zs(r,l,m,!0),l=Jn.current,l!==null){switch(l.tag){case 31:case 13:return gi===null?_u():l.alternate===null&&$t===0&&($t=3),l.flags&=-257,l.flags|=65536,l.lanes=m,u===eu?l.flags|=16384:(r=l.updateQueue,r===null?l.updateQueue=new Set([u]):r.add(u),Mh(i,u,m)),!1;case 22:return l.flags|=65536,u===eu?l.flags|=16384:(r=l.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([u])},l.updateQueue=r):(l=r.retryQueue,l===null?r.retryQueue=new Set([u]):l.add(u)),Mh(i,u,m)),!1}throw Error(a(435,l.tag))}return Mh(i,u,m),_u(),!1}if(nt)return r=Jn.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=m,u!==Cf&&(i=Error(a(422),{cause:u}),uo(fi(i,l)))):(u!==Cf&&(r=Error(a(423),{cause:u}),uo(fi(r,l))),i=i.current.alternate,i.flags|=65536,m&=-m,i.lanes|=m,u=fi(u,l),m=oh(i.stateNode,u,m),Bf(i,m),$t!==4&&($t=2)),!1;var y=Error(a(520),{cause:u});if(y=fi(y,l),jo===null?jo=[y]:jo.push(y),$t!==4&&($t=2),r===null)return!0;u=fi(u,l),l=r;do{switch(l.tag){case 3:return l.flags|=65536,i=m&-m,l.lanes|=i,i=oh(l.stateNode,u,i),Bf(l,i),!1;case 1:if(r=l.type,y=l.stateNode,(l.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(Xa===null||!Xa.has(y))))return l.flags|=65536,m&=-m,l.lanes|=m,m=Ny(m),Cy(m,i,l,u),Bf(l,m),!1}l=l.return}while(l!==null);return!1}var ch=Error(a(461)),en=!1;function hn(i,r,l,u){r.child=i===null?Ob(r,null,l,u):Gr(r,i.child,l,u)}function Ty(i,r,l,u,m){l=l.render;var y=r.ref;if("ref"in u){var k={};for(var N in u)N!=="ref"&&(k[N]=u[N])}else k=u;return qr(r),u=Hf(i,r,l,k,y,m),N=Kf(),i!==null&&!en?(Gf(i,r,m),pa(i,r,m)):(nt&&N&&_f(r),r.flags|=1,hn(i,r,u,m),r.child)}function Ay(i,r,l,u,m){if(i===null){var y=l.type;return typeof y=="function"&&!kf(y)&&y.defaultProps===void 0&&l.compare===null?(r.tag=15,r.type=y,jy(i,r,y,u,m)):(i=Yc(l.type,null,u,r,r.mode,m),i.ref=r.ref,i.return=r,r.child=i)}if(y=i.child,!bh(i,m)){var k=y.memoizedProps;if(l=l.compare,l=l!==null?l:lo,l(k,u)&&i.ref===r.ref)return pa(i,r,m)}return r.flags|=1,i=oa(y,u),i.ref=r.ref,i.return=r,r.child=i}function jy(i,r,l,u,m){if(i!==null){var y=i.memoizedProps;if(lo(y,u)&&i.ref===r.ref)if(en=!1,r.pendingProps=u=y,bh(i,m))(i.flags&131072)!==0&&(en=!0);else return r.lanes=i.lanes,pa(i,r,m)}return uh(i,r,l,u,m)}function Oy(i,r,l,u){var m=u.children,y=i!==null?i.memoizedState:null;if(i===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if((r.flags&128)!==0){if(y=y!==null?y.baseLanes|l:l,i!==null){for(u=r.child=i.child,m=0;u!==null;)m=m|u.lanes|u.childLanes,u=u.sibling;u=m&~y}else u=0,r.child=null;return Dy(i,r,y,l,u)}if((l&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},i!==null&&Zc(r,y!==null?y.cachePool:null),y!==null?Rb(r,y):Uf(),Lb(r);else return u=r.lanes=536870912,Dy(i,r,y!==null?y.baseLanes|l:l,l,u)}else y!==null?(Zc(r,y.cachePool),Rb(r,y),Qa(),r.memoizedState=null):(i!==null&&Zc(r,null),Uf(),Qa());return hn(i,r,m,l),r.child}function Eo(i,r){return i!==null&&i.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function Dy(i,r,l,u,m){var y=Rf();return y=y===null?null:{parent:Zt._currentValue,pool:y},r.memoizedState={baseLanes:l,cachePool:y},i!==null&&Zc(r,null),Uf(),Lb(r),i!==null&&zs(i,r,u,!0),r.childLanes=m,null}function pu(i,r){return r=gu({mode:r.mode,children:r.children},i.mode),r.ref=i.ref,i.child=r,r.return=i,r}function My(i,r,l){return Gr(r,i.child,null,l),i=pu(r,r.pendingProps),i.flags|=2,ei(r),r.memoizedState=null,i}function JS(i,r,l){var u=r.pendingProps,m=(r.flags&128)!==0;if(r.flags&=-129,i===null){if(nt){if(u.mode==="hidden")return i=pu(r,u),r.lanes=536870912,Eo(null,i);if(qf(r),(i=Tt)?(i=Kx(i,mi),i=i!==null&&i.data==="&"?i:null,i!==null&&(r.memoizedState={dehydrated:i,treeContext:Pa!==null?{id:Hi,overflow:Ki}:null,retryLane:536870912,hydrationErrors:null},l=gb(i),l.return=r,r.child=l,dn=r,Tt=null)):i=null,i===null)throw Fa(r);return r.lanes=536870912,null}return pu(r,u)}var y=i.memoizedState;if(y!==null){var k=y.dehydrated;if(qf(r),m)if(r.flags&256)r.flags&=-257,r=My(i,r,l);else if(r.memoizedState!==null)r.child=i.child,r.flags|=128,r=null;else throw Error(a(558));else if(en||zs(i,r,l,!1),m=(l&i.childLanes)!==0,en||m){if(u=wt,u!==null&&(k=Kt(u,l),k!==0&&k!==y.retryLane))throw y.retryLane=k,Br(i,k),$n(u,i,k),ch;_u(),r=My(i,r,l)}else i=y.treeContext,Tt=bi(k.nextSibling),dn=r,nt=!0,Ua=null,mi=!1,i!==null&&xb(r,i),r=pu(r,u),r.flags|=4096;return r}return i=oa(i.child,{mode:u.mode,children:u.children}),i.ref=r.ref,r.child=i,i.return=r,i}function mu(i,r){var l=r.ref;if(l===null)i!==null&&i.ref!==null&&(r.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(a(284));(i===null||i.ref!==l)&&(r.flags|=4194816)}}function uh(i,r,l,u,m){return qr(r),l=Hf(i,r,l,u,void 0,m),u=Kf(),i!==null&&!en?(Gf(i,r,m),pa(i,r,m)):(nt&&u&&_f(r),r.flags|=1,hn(i,r,l,m),r.child)}function Ry(i,r,l,u,m,y){return qr(r),r.updateQueue=null,l=zb(r,u,l,m),Ib(i),u=Kf(),i!==null&&!en?(Gf(i,r,y),pa(i,r,y)):(nt&&u&&_f(r),r.flags|=1,hn(i,r,l,y),r.child)}function Ly(i,r,l,u,m){if(qr(r),r.stateNode===null){var y=Ms,k=l.contextType;typeof k=="object"&&k!==null&&(y=fn(k)),y=new l(u,y),r.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,y.updater=lh,r.stateNode=y,y._reactInternals=r,y=r.stateNode,y.props=u,y.state=r.memoizedState,y.refs={},If(r),k=l.contextType,y.context=typeof k=="object"&&k!==null?fn(k):Ms,y.state=r.memoizedState,k=l.getDerivedStateFromProps,typeof k=="function"&&(sh(r,l,k,u),y.state=r.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(k=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),k!==y.state&&lh.enqueueReplaceState(y,y.state,null),yo(r,u,y,m),bo(),y.state=r.memoizedState),typeof y.componentDidMount=="function"&&(r.flags|=4194308),u=!0}else if(i===null){y=r.stateNode;var N=r.memoizedProps,L=Yr(l,N);y.props=L;var G=y.context,ie=l.contextType;k=Ms,typeof ie=="object"&&ie!==null&&(k=fn(ie));var oe=l.getDerivedStateFromProps;ie=typeof oe=="function"||typeof y.getSnapshotBeforeUpdate=="function",N=r.pendingProps!==N,ie||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(N||G!==k)&&wy(r,y,u,k),$a=!1;var W=r.memoizedState;y.state=W,yo(r,u,y,m),bo(),G=r.memoizedState,N||W!==G||$a?(typeof oe=="function"&&(sh(r,l,oe,u),G=r.memoizedState),(L=$a||vy(r,l,L,u,W,G,k))?(ie||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"&&(r.flags|=4194308)):(typeof y.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=u,r.memoizedState=G),y.props=u,y.state=G,y.context=k,u=L):(typeof y.componentDidMount=="function"&&(r.flags|=4194308),u=!1)}else{y=r.stateNode,zf(i,r),k=r.memoizedProps,ie=Yr(l,k),y.props=ie,oe=r.pendingProps,W=y.context,G=l.contextType,L=Ms,typeof G=="object"&&G!==null&&(L=fn(G)),N=l.getDerivedStateFromProps,(G=typeof N=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(k!==oe||W!==L)&&wy(r,y,u,L),$a=!1,W=r.memoizedState,y.state=W,yo(r,u,y,m),bo();var Z=r.memoizedState;k!==oe||W!==Z||$a||i!==null&&i.dependencies!==null&&Wc(i.dependencies)?(typeof N=="function"&&(sh(r,l,N,u),Z=r.memoizedState),(ie=$a||vy(r,l,ie,u,W,Z,L)||i!==null&&i.dependencies!==null&&Wc(i.dependencies))?(G||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(u,Z,L),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(u,Z,L)),typeof y.componentDidUpdate=="function"&&(r.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof y.componentDidUpdate!="function"||k===i.memoizedProps&&W===i.memoizedState||(r.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||k===i.memoizedProps&&W===i.memoizedState||(r.flags|=1024),r.memoizedProps=u,r.memoizedState=Z),y.props=u,y.state=Z,y.context=L,u=ie):(typeof y.componentDidUpdate!="function"||k===i.memoizedProps&&W===i.memoizedState||(r.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||k===i.memoizedProps&&W===i.memoizedState||(r.flags|=1024),u=!1)}return y=u,mu(i,r),u=(r.flags&128)!==0,y||u?(y=r.stateNode,l=u&&typeof l.getDerivedStateFromError!="function"?null:y.render(),r.flags|=1,i!==null&&u?(r.child=Gr(r,i.child,null,m),r.child=Gr(r,null,l,m)):hn(i,r,l,m),r.memoizedState=y.state,i=r.child):i=pa(i,r,m),i}function Iy(i,r,l,u){return Ur(),r.flags|=256,hn(i,r,l,u),r.child}var dh={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function fh(i){return{baseLanes:i,cachePool:_b()}}function hh(i,r,l){return i=i!==null?i.childLanes&~l:0,r&&(i|=ni),i}function zy(i,r,l){var u=r.pendingProps,m=!1,y=(r.flags&128)!==0,k;if((k=y)||(k=i!==null&&i.memoizedState===null?!1:(Yt.current&2)!==0),k&&(m=!0,r.flags&=-129),k=(r.flags&32)!==0,r.flags&=-33,i===null){if(nt){if(m?Ga(r):Qa(),(i=Tt)?(i=Kx(i,mi),i=i!==null&&i.data!=="&"?i:null,i!==null&&(r.memoizedState={dehydrated:i,treeContext:Pa!==null?{id:Hi,overflow:Ki}:null,retryLane:536870912,hydrationErrors:null},l=gb(i),l.return=r,r.child=l,dn=r,Tt=null)):i=null,i===null)throw Fa(r);return Vh(i)?r.lanes=32:r.lanes=536870912,null}var N=u.children;return u=u.fallback,m?(Qa(),m=r.mode,N=gu({mode:"hidden",children:N},m),u=Pr(u,m,l,null),N.return=r,u.return=r,N.sibling=u,r.child=N,u=r.child,u.memoizedState=fh(l),u.childLanes=hh(i,k,l),r.memoizedState=dh,Eo(null,u)):(Ga(r),ph(r,N))}var L=i.memoizedState;if(L!==null&&(N=L.dehydrated,N!==null)){if(y)r.flags&256?(Ga(r),r.flags&=-257,r=mh(i,r,l)):r.memoizedState!==null?(Qa(),r.child=i.child,r.flags|=128,r=null):(Qa(),N=u.fallback,m=r.mode,u=gu({mode:"visible",children:u.children},m),N=Pr(N,m,l,null),N.flags|=2,u.return=r,N.return=r,u.sibling=N,r.child=u,Gr(r,i.child,null,l),u=r.child,u.memoizedState=fh(l),u.childLanes=hh(i,k,l),r.memoizedState=dh,r=Eo(null,u));else if(Ga(r),Vh(N)){if(k=N.nextSibling&&N.nextSibling.dataset,k)var G=k.dgst;k=G,u=Error(a(419)),u.stack="",u.digest=k,uo({value:u,source:null,stack:null}),r=mh(i,r,l)}else if(en||zs(i,r,l,!1),k=(l&i.childLanes)!==0,en||k){if(k=wt,k!==null&&(u=Kt(k,l),u!==0&&u!==L.retryLane))throw L.retryLane=u,Br(i,u),$n(k,i,u),ch;Yh(N)||_u(),r=mh(i,r,l)}else Yh(N)?(r.flags|=192,r.child=i.child,r=null):(i=L.treeContext,Tt=bi(N.nextSibling),dn=r,nt=!0,Ua=null,mi=!1,i!==null&&xb(r,i),r=ph(r,u.children),r.flags|=4096);return r}return m?(Qa(),N=u.fallback,m=r.mode,L=i.child,G=L.sibling,u=oa(L,{mode:"hidden",children:u.children}),u.subtreeFlags=L.subtreeFlags&65011712,G!==null?N=oa(G,N):(N=Pr(N,m,l,null),N.flags|=2),N.return=r,u.return=r,u.sibling=N,r.child=u,Eo(null,u),u=r.child,N=i.child.memoizedState,N===null?N=fh(l):(m=N.cachePool,m!==null?(L=Zt._currentValue,m=m.parent!==L?{parent:L,pool:L}:m):m=_b(),N={baseLanes:N.baseLanes|l,cachePool:m}),u.memoizedState=N,u.childLanes=hh(i,k,l),r.memoizedState=dh,Eo(i.child,u)):(Ga(r),l=i.child,i=l.sibling,l=oa(l,{mode:"visible",children:u.children}),l.return=r,l.sibling=null,i!==null&&(k=r.deletions,k===null?(r.deletions=[i],r.flags|=16):k.push(i)),r.child=l,r.memoizedState=null,l)}function ph(i,r){return r=gu({mode:"visible",children:r},i.mode),r.return=i,i.child=r}function gu(i,r){return i=Zn(22,i,null,r),i.lanes=0,i}function mh(i,r,l){return Gr(r,i.child,null,l),i=ph(r,r.pendingProps.children),i.flags|=2,r.memoizedState=null,i}function By(i,r,l){i.lanes|=r;var u=i.alternate;u!==null&&(u.lanes|=r),jf(i.return,r,l)}function gh(i,r,l,u,m,y){var k=i.memoizedState;k===null?i.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:u,tail:l,tailMode:m,treeForkCount:y}:(k.isBackwards=r,k.rendering=null,k.renderingStartTime=0,k.last=u,k.tail=l,k.tailMode=m,k.treeForkCount=y)}function Py(i,r,l){var u=r.pendingProps,m=u.revealOrder,y=u.tail;u=u.children;var k=Yt.current,N=(k&2)!==0;if(N?(k=k&1|2,r.flags|=128):k&=1,j(Yt,k),hn(i,r,u,l),u=nt?co:0,!N&&i!==null&&(i.flags&128)!==0)e:for(i=r.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&By(i,l,r);else if(i.tag===19)By(i,l,r);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===r)break e;for(;i.sibling===null;){if(i.return===null||i.return===r)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}switch(m){case"forwards":for(l=r.child,m=null;l!==null;)i=l.alternate,i!==null&&au(i)===null&&(m=l),l=l.sibling;l=m,l===null?(m=r.child,r.child=null):(m=l.sibling,l.sibling=null),gh(r,!1,m,l,y,u);break;case"backwards":case"unstable_legacy-backwards":for(l=null,m=r.child,r.child=null;m!==null;){if(i=m.alternate,i!==null&&au(i)===null){r.child=m;break}i=m.sibling,m.sibling=l,l=m,m=i}gh(r,!0,l,null,y,u);break;case"together":gh(r,!1,null,null,void 0,u);break;default:r.memoizedState=null}return r.child}function pa(i,r,l){if(i!==null&&(r.dependencies=i.dependencies),Wa|=r.lanes,(l&r.childLanes)===0)if(i!==null){if(zs(i,r,l,!1),(l&r.childLanes)===0)return null}else return null;if(i!==null&&r.child!==i.child)throw Error(a(153));if(r.child!==null){for(i=r.child,l=oa(i,i.pendingProps),r.child=l,l.return=r;i.sibling!==null;)i=i.sibling,l=l.sibling=oa(i,i.pendingProps),l.return=r;l.sibling=null}return r.child}function bh(i,r){return(i.lanes&r)!==0?!0:(i=i.dependencies,!!(i!==null&&Wc(i)))}function e_(i,r,l){switch(r.tag){case 3:V(r,r.stateNode.containerInfo),qa(r,Zt,i.memoizedState.cache),Ur();break;case 27:case 5:ye(r);break;case 4:V(r,r.stateNode.containerInfo);break;case 10:qa(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,qf(r),null;break;case 13:var u=r.memoizedState;if(u!==null)return u.dehydrated!==null?(Ga(r),r.flags|=128,null):(l&r.child.childLanes)!==0?zy(i,r,l):(Ga(r),i=pa(i,r,l),i!==null?i.sibling:null);Ga(r);break;case 19:var m=(i.flags&128)!==0;if(u=(l&r.childLanes)!==0,u||(zs(i,r,l,!1),u=(l&r.childLanes)!==0),m){if(u)return Py(i,r,l);r.flags|=128}if(m=r.memoizedState,m!==null&&(m.rendering=null,m.tail=null,m.lastEffect=null),j(Yt,Yt.current),u)break;return null;case 22:return r.lanes=0,Oy(i,r,l,r.pendingProps);case 24:qa(r,Zt,i.memoizedState.cache)}return pa(i,r,l)}function Uy(i,r,l){if(i!==null)if(i.memoizedProps!==r.pendingProps)en=!0;else{if(!bh(i,l)&&(r.flags&128)===0)return en=!1,e_(i,r,l);en=(i.flags&131072)!==0}else en=!1,nt&&(r.flags&1048576)!==0&&yb(r,co,r.index);switch(r.lanes=0,r.tag){case 16:e:{var u=r.pendingProps;if(i=Hr(r.elementType),r.type=i,typeof i=="function")kf(i)?(u=Yr(i,u),r.tag=1,r=Ly(null,r,i,u,l)):(r.tag=0,r=uh(null,r,i,u,l));else{if(i!=null){var m=i.$$typeof;if(m===D){r.tag=11,r=Ty(null,r,i,u,l);break e}else if(m===q){r.tag=14,r=Ay(null,r,i,u,l);break e}}throw r=ue(i)||i,Error(a(306,r,""))}}return r;case 0:return uh(i,r,r.type,r.pendingProps,l);case 1:return u=r.type,m=Yr(u,r.pendingProps),Ly(i,r,u,m,l);case 3:e:{if(V(r,r.stateNode.containerInfo),i===null)throw Error(a(387));u=r.pendingProps;var y=r.memoizedState;m=y.element,zf(i,r),yo(r,u,null,l);var k=r.memoizedState;if(u=k.cache,qa(r,Zt,u),u!==y.cache&&Of(r,[Zt],l,!0),bo(),u=k.element,y.isDehydrated)if(y={element:u,isDehydrated:!1,cache:k.cache},r.updateQueue.baseState=y,r.memoizedState=y,r.flags&256){r=Iy(i,r,u,l);break e}else if(u!==m){m=fi(Error(a(424)),r),uo(m),r=Iy(i,r,u,l);break e}else{switch(i=r.stateNode.containerInfo,i.nodeType){case 9:i=i.body;break;default:i=i.nodeName==="HTML"?i.ownerDocument.body:i}for(Tt=bi(i.firstChild),dn=r,nt=!0,Ua=null,mi=!0,l=Ob(r,null,u,l),r.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(Ur(),u===m){r=pa(i,r,l);break e}hn(i,r,u,l)}r=r.child}return r;case 26:return mu(i,r),i===null?(l=Xx(r.type,null,r.pendingProps,null))?r.memoizedState=l:nt||(l=r.type,i=r.pendingProps,u=Du(Y.current).createElement(l),u[Gt]=r,u[bn]=i,pn(u,l,i),Wt(u),r.stateNode=u):r.memoizedState=Xx(r.type,i.memoizedProps,r.pendingProps,i.memoizedState),null;case 27:return ye(r),i===null&&nt&&(u=r.stateNode=Yx(r.type,r.pendingProps,Y.current),dn=r,mi=!0,m=Tt,tr(r.type)?(Wh=m,Tt=bi(u.firstChild)):Tt=m),hn(i,r,r.pendingProps.children,l),mu(i,r),i===null&&(r.flags|=4194304),r.child;case 5:return i===null&&nt&&((m=u=Tt)&&(u=j_(u,r.type,r.pendingProps,mi),u!==null?(r.stateNode=u,dn=r,Tt=bi(u.firstChild),mi=!1,m=!0):m=!1),m||Fa(r)),ye(r),m=r.type,y=r.pendingProps,k=i!==null?i.memoizedProps:null,u=y.children,Kh(m,y)?u=null:k!==null&&Kh(m,k)&&(r.flags|=32),r.memoizedState!==null&&(m=Hf(i,r,KS,null,null,l),Bo._currentValue=m),mu(i,r),hn(i,r,u,l),r.child;case 6:return i===null&&nt&&((i=l=Tt)&&(l=O_(l,r.pendingProps,mi),l!==null?(r.stateNode=l,dn=r,Tt=null,i=!0):i=!1),i||Fa(r)),null;case 13:return zy(i,r,l);case 4:return V(r,r.stateNode.containerInfo),u=r.pendingProps,i===null?r.child=Gr(r,null,u,l):hn(i,r,u,l),r.child;case 11:return Ty(i,r,r.type,r.pendingProps,l);case 7:return hn(i,r,r.pendingProps,l),r.child;case 8:return hn(i,r,r.pendingProps.children,l),r.child;case 12:return hn(i,r,r.pendingProps.children,l),r.child;case 10:return u=r.pendingProps,qa(r,r.type,u.value),hn(i,r,u.children,l),r.child;case 9:return m=r.type._context,u=r.pendingProps.children,qr(r),m=fn(m),u=u(m),r.flags|=1,hn(i,r,u,l),r.child;case 14:return Ay(i,r,r.type,r.pendingProps,l);case 15:return jy(i,r,r.type,r.pendingProps,l);case 19:return Py(i,r,l);case 31:return JS(i,r,l);case 22:return Oy(i,r,l,r.pendingProps);case 24:return qr(r),u=fn(Zt),i===null?(m=Rf(),m===null&&(m=wt,y=Df(),m.pooledCache=y,y.refCount++,y!==null&&(m.pooledCacheLanes|=l),m=y),r.memoizedState={parent:u,cache:m},If(r),qa(r,Zt,m)):((i.lanes&l)!==0&&(zf(i,r),yo(r,null,null,l),bo()),m=i.memoizedState,y=r.memoizedState,m.parent!==u?(m={parent:u,cache:u},r.memoizedState=m,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=m),qa(r,Zt,u)):(u=y.cache,qa(r,Zt,u),u!==m.cache&&Of(r,[Zt],l,!0))),hn(i,r,r.pendingProps.children,l),r.child;case 29:throw r.pendingProps}throw Error(a(156,r.tag))}function ma(i){i.flags|=4}function yh(i,r,l,u,m){if((r=(i.mode&32)!==0)&&(r=!1),r){if(i.flags|=16777216,(m&335544128)===m)if(i.stateNode.complete)i.flags|=8192;else if(hx())i.flags|=8192;else throw Kr=eu,Lf}else i.flags&=-16777217}function Fy(i,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!nv(r))if(hx())i.flags|=8192;else throw Kr=eu,Lf}function bu(i,r){r!==null&&(i.flags|=4),i.flags&16384&&(r=i.tag!==22?Be():536870912,i.lanes|=r,Vs|=r)}function So(i,r){if(!nt)switch(i.tailMode){case"hidden":r=i.tail;for(var l=null;r!==null;)r.alternate!==null&&(l=r),r=r.sibling;l===null?i.tail=null:l.sibling=null;break;case"collapsed":l=i.tail;for(var u=null;l!==null;)l.alternate!==null&&(u=l),l=l.sibling;u===null?r||i.tail===null?i.tail=null:i.tail.sibling=null:u.sibling=null}}function At(i){var r=i.alternate!==null&&i.alternate.child===i.child,l=0,u=0;if(r)for(var m=i.child;m!==null;)l|=m.lanes|m.childLanes,u|=m.subtreeFlags&65011712,u|=m.flags&65011712,m.return=i,m=m.sibling;else for(m=i.child;m!==null;)l|=m.lanes|m.childLanes,u|=m.subtreeFlags,u|=m.flags,m.return=i,m=m.sibling;return i.subtreeFlags|=u,i.childLanes=l,r}function t_(i,r,l){var u=r.pendingProps;switch(Nf(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return At(r),null;case 1:return At(r),null;case 3:return l=r.stateNode,u=null,i!==null&&(u=i.memoizedState.cache),r.memoizedState.cache!==u&&(r.flags|=2048),da(Zt),ae(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(i===null||i.child===null)&&(Is(r)?ma(r):i===null||i.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Tf())),At(r),null;case 26:var m=r.type,y=r.memoizedState;return i===null?(ma(r),y!==null?(At(r),Fy(r,y)):(At(r),yh(r,m,null,u,l))):y?y!==i.memoizedState?(ma(r),At(r),Fy(r,y)):(At(r),r.flags&=-16777217):(i=i.memoizedProps,i!==u&&ma(r),At(r),yh(r,m,i,u,l)),null;case 27:if(Pe(r),l=Y.current,m=r.type,i!==null&&r.stateNode!=null)i.memoizedProps!==u&&ma(r);else{if(!u){if(r.stateNode===null)throw Error(a(166));return At(r),null}i=ge.current,Is(r)?vb(r):(i=Yx(m,u,l),r.stateNode=i,ma(r))}return At(r),null;case 5:if(Pe(r),m=r.type,i!==null&&r.stateNode!=null)i.memoizedProps!==u&&ma(r);else{if(!u){if(r.stateNode===null)throw Error(a(166));return At(r),null}if(y=ge.current,Is(r))vb(r);else{var k=Du(Y.current);switch(y){case 1:y=k.createElementNS("http://www.w3.org/2000/svg",m);break;case 2:y=k.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;default:switch(m){case"svg":y=k.createElementNS("http://www.w3.org/2000/svg",m);break;case"math":y=k.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;case"script":y=k.createElement("div"),y.innerHTML="<script><\/script>",y=y.removeChild(y.firstChild);break;case"select":y=typeof u.is=="string"?k.createElement("select",{is:u.is}):k.createElement("select"),u.multiple?y.multiple=!0:u.size&&(y.size=u.size);break;default:y=typeof u.is=="string"?k.createElement(m,{is:u.is}):k.createElement(m)}}y[Gt]=r,y[bn]=u;e:for(k=r.child;k!==null;){if(k.tag===5||k.tag===6)y.appendChild(k.stateNode);else if(k.tag!==4&&k.tag!==27&&k.child!==null){k.child.return=k,k=k.child;continue}if(k===r)break e;for(;k.sibling===null;){if(k.return===null||k.return===r)break e;k=k.return}k.sibling.return=k.return,k=k.sibling}r.stateNode=y;e:switch(pn(y,m,u),m){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&ma(r)}}return At(r),yh(r,r.type,i===null?null:i.memoizedProps,r.pendingProps,l),null;case 6:if(i&&r.stateNode!=null)i.memoizedProps!==u&&ma(r);else{if(typeof u!="string"&&r.stateNode===null)throw Error(a(166));if(i=Y.current,Is(r)){if(i=r.stateNode,l=r.memoizedProps,u=null,m=dn,m!==null)switch(m.tag){case 27:case 5:u=m.memoizedProps}i[Gt]=r,i=!!(i.nodeValue===l||u!==null&&u.suppressHydrationWarning===!0||zx(i.nodeValue,l)),i||Fa(r,!0)}else i=Du(i).createTextNode(u),i[Gt]=r,r.stateNode=i}return At(r),null;case 31:if(l=r.memoizedState,i===null||i.memoizedState!==null){if(u=Is(r),l!==null){if(i===null){if(!u)throw Error(a(318));if(i=r.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(a(557));i[Gt]=r}else Ur(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;At(r),i=!1}else l=Tf(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=l),i=!0;if(!i)return r.flags&256?(ei(r),r):(ei(r),null);if((r.flags&128)!==0)throw Error(a(558))}return At(r),null;case 13:if(u=r.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(m=Is(r),u!==null&&u.dehydrated!==null){if(i===null){if(!m)throw Error(a(318));if(m=r.memoizedState,m=m!==null?m.dehydrated:null,!m)throw Error(a(317));m[Gt]=r}else Ur(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;At(r),m=!1}else m=Tf(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=m),m=!0;if(!m)return r.flags&256?(ei(r),r):(ei(r),null)}return ei(r),(r.flags&128)!==0?(r.lanes=l,r):(l=u!==null,i=i!==null&&i.memoizedState!==null,l&&(u=r.child,m=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(m=u.alternate.memoizedState.cachePool.pool),y=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(y=u.memoizedState.cachePool.pool),y!==m&&(u.flags|=2048)),l!==i&&l&&(r.child.flags|=8192),bu(r,r.updateQueue),At(r),null);case 4:return ae(),i===null&&Uh(r.stateNode.containerInfo),At(r),null;case 10:return da(r.type),At(r),null;case 19:if(Q(Yt),u=r.memoizedState,u===null)return At(r),null;if(m=(r.flags&128)!==0,y=u.rendering,y===null)if(m)So(u,!1);else{if($t!==0||i!==null&&(i.flags&128)!==0)for(i=r.child;i!==null;){if(y=au(i),y!==null){for(r.flags|=128,So(u,!1),i=y.updateQueue,r.updateQueue=i,bu(r,i),r.subtreeFlags=0,i=l,l=r.child;l!==null;)mb(l,i),l=l.sibling;return j(Yt,Yt.current&1|2),nt&&ca(r,u.treeForkCount),r.child}i=i.sibling}u.tail!==null&&zt()>ku&&(r.flags|=128,m=!0,So(u,!1),r.lanes=4194304)}else{if(!m)if(i=au(y),i!==null){if(r.flags|=128,m=!0,i=i.updateQueue,r.updateQueue=i,bu(r,i),So(u,!0),u.tail===null&&u.tailMode==="hidden"&&!y.alternate&&!nt)return At(r),null}else 2*zt()-u.renderingStartTime>ku&&l!==536870912&&(r.flags|=128,m=!0,So(u,!1),r.lanes=4194304);u.isBackwards?(y.sibling=r.child,r.child=y):(i=u.last,i!==null?i.sibling=y:r.child=y,u.last=y)}return u.tail!==null?(i=u.tail,u.rendering=i,u.tail=i.sibling,u.renderingStartTime=zt(),i.sibling=null,l=Yt.current,j(Yt,m?l&1|2:l&1),nt&&ca(r,u.treeForkCount),i):(At(r),null);case 22:case 23:return ei(r),Ff(),u=r.memoizedState!==null,i!==null?i.memoizedState!==null!==u&&(r.flags|=8192):u&&(r.flags|=8192),u?(l&536870912)!==0&&(r.flags&128)===0&&(At(r),r.subtreeFlags&6&&(r.flags|=8192)):At(r),l=r.updateQueue,l!==null&&bu(r,l.retryQueue),l=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(l=i.memoizedState.cachePool.pool),u=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(u=r.memoizedState.cachePool.pool),u!==l&&(r.flags|=2048),i!==null&&Q($r),null;case 24:return l=null,i!==null&&(l=i.memoizedState.cache),r.memoizedState.cache!==l&&(r.flags|=2048),da(Zt),At(r),null;case 25:return null;case 30:return null}throw Error(a(156,r.tag))}function n_(i,r){switch(Nf(r),r.tag){case 1:return i=r.flags,i&65536?(r.flags=i&-65537|128,r):null;case 3:return da(Zt),ae(),i=r.flags,(i&65536)!==0&&(i&128)===0?(r.flags=i&-65537|128,r):null;case 26:case 27:case 5:return Pe(r),null;case 31:if(r.memoizedState!==null){if(ei(r),r.alternate===null)throw Error(a(340));Ur()}return i=r.flags,i&65536?(r.flags=i&-65537|128,r):null;case 13:if(ei(r),i=r.memoizedState,i!==null&&i.dehydrated!==null){if(r.alternate===null)throw Error(a(340));Ur()}return i=r.flags,i&65536?(r.flags=i&-65537|128,r):null;case 19:return Q(Yt),null;case 4:return ae(),null;case 10:return da(r.type),null;case 22:case 23:return ei(r),Ff(),i!==null&&Q($r),i=r.flags,i&65536?(r.flags=i&-65537|128,r):null;case 24:return da(Zt),null;case 25:return null;default:return null}}function qy(i,r){switch(Nf(r),r.tag){case 3:da(Zt),ae();break;case 26:case 27:case 5:Pe(r);break;case 4:ae();break;case 31:r.memoizedState!==null&&ei(r);break;case 13:ei(r);break;case 19:Q(Yt);break;case 10:da(r.type);break;case 22:case 23:ei(r),Ff(),i!==null&&Q($r);break;case 24:da(Zt)}}function _o(i,r){try{var l=r.updateQueue,u=l!==null?l.lastEffect:null;if(u!==null){var m=u.next;l=m;do{if((l.tag&i)===i){u=void 0;var y=l.create,k=l.inst;u=y(),k.destroy=u}l=l.next}while(l!==m)}}catch(N){mt(r,r.return,N)}}function Ya(i,r,l){try{var u=r.updateQueue,m=u!==null?u.lastEffect:null;if(m!==null){var y=m.next;u=y;do{if((u.tag&i)===i){var k=u.inst,N=k.destroy;if(N!==void 0){k.destroy=void 0,m=r;var L=l,G=N;try{G()}catch(ie){mt(m,L,ie)}}}u=u.next}while(u!==y)}}catch(ie){mt(r,r.return,ie)}}function $y(i){var r=i.updateQueue;if(r!==null){var l=i.stateNode;try{Mb(r,l)}catch(u){mt(i,i.return,u)}}}function Hy(i,r,l){l.props=Yr(i.type,i.memoizedProps),l.state=i.memoizedState;try{l.componentWillUnmount()}catch(u){mt(i,r,u)}}function No(i,r){try{var l=i.ref;if(l!==null){switch(i.tag){case 26:case 27:case 5:var u=i.stateNode;break;case 30:u=i.stateNode;break;default:u=i.stateNode}typeof l=="function"?i.refCleanup=l(u):l.current=u}}catch(m){mt(i,r,m)}}function Gi(i,r){var l=i.ref,u=i.refCleanup;if(l!==null)if(typeof u=="function")try{u()}catch(m){mt(i,r,m)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(m){mt(i,r,m)}else l.current=null}function Ky(i){var r=i.type,l=i.memoizedProps,u=i.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":l.autoFocus&&u.focus();break e;case"img":l.src?u.src=l.src:l.srcSet&&(u.srcset=l.srcSet)}}catch(m){mt(i,i.return,m)}}function xh(i,r,l){try{var u=i.stateNode;S_(u,i.type,l,r),u[bn]=r}catch(m){mt(i,i.return,m)}}function Gy(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&tr(i.type)||i.tag===4}function vh(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||Gy(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&tr(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function wh(i,r,l){var u=i.tag;if(u===5||u===6)i=i.stateNode,r?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(i,r):(r=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,r.appendChild(i),l=l._reactRootContainer,l!=null||r.onclick!==null||(r.onclick=be));else if(u!==4&&(u===27&&tr(i.type)&&(l=i.stateNode,r=null),i=i.child,i!==null))for(wh(i,r,l),i=i.sibling;i!==null;)wh(i,r,l),i=i.sibling}function yu(i,r,l){var u=i.tag;if(u===5||u===6)i=i.stateNode,r?l.insertBefore(i,r):l.appendChild(i);else if(u!==4&&(u===27&&tr(i.type)&&(l=i.stateNode),i=i.child,i!==null))for(yu(i,r,l),i=i.sibling;i!==null;)yu(i,r,l),i=i.sibling}function Qy(i){var r=i.stateNode,l=i.memoizedProps;try{for(var u=i.type,m=r.attributes;m.length;)r.removeAttributeNode(m[0]);pn(r,u,l),r[Gt]=i,r[bn]=l}catch(y){mt(i,i.return,y)}}var ga=!1,tn=!1,kh=!1,Yy=typeof WeakSet=="function"?WeakSet:Set,sn=null;function i_(i,r){if(i=i.containerInfo,$h=Pu,i=sb(i),mf(i)){if("selectionStart"in i)var l={start:i.selectionStart,end:i.selectionEnd};else e:{l=(l=i.ownerDocument)&&l.defaultView||window;var u=l.getSelection&&l.getSelection();if(u&&u.rangeCount!==0){l=u.anchorNode;var m=u.anchorOffset,y=u.focusNode;u=u.focusOffset;try{l.nodeType,y.nodeType}catch{l=null;break e}var k=0,N=-1,L=-1,G=0,ie=0,oe=i,W=null;t:for(;;){for(var Z;oe!==l||m!==0&&oe.nodeType!==3||(N=k+m),oe!==y||u!==0&&oe.nodeType!==3||(L=k+u),oe.nodeType===3&&(k+=oe.nodeValue.length),(Z=oe.firstChild)!==null;)W=oe,oe=Z;for(;;){if(oe===i)break t;if(W===l&&++G===m&&(N=k),W===y&&++ie===u&&(L=k),(Z=oe.nextSibling)!==null)break;oe=W,W=oe.parentNode}oe=Z}l=N===-1||L===-1?null:{start:N,end:L}}else l=null}l=l||{start:0,end:0}}else l=null;for(Hh={focusedElem:i,selectionRange:l},Pu=!1,sn=r;sn!==null;)if(r=sn,i=r.child,(r.subtreeFlags&1028)!==0&&i!==null)i.return=r,sn=i;else for(;sn!==null;){switch(r=sn,y=r.alternate,i=r.flags,r.tag){case 0:if((i&4)!==0&&(i=r.updateQueue,i=i!==null?i.events:null,i!==null))for(l=0;l<i.length;l++)m=i[l],m.ref.impl=m.nextImpl;break;case 11:case 15:break;case 1:if((i&1024)!==0&&y!==null){i=void 0,l=r,m=y.memoizedProps,y=y.memoizedState,u=l.stateNode;try{var Ee=Yr(l.type,m);i=u.getSnapshotBeforeUpdate(Ee,y),u.__reactInternalSnapshotBeforeUpdate=i}catch(Re){mt(l,l.return,Re)}}break;case 3:if((i&1024)!==0){if(i=r.stateNode.containerInfo,l=i.nodeType,l===9)Qh(i);else if(l===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":Qh(i);break;default:i.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((i&1024)!==0)throw Error(a(163))}if(i=r.sibling,i!==null){i.return=r.return,sn=i;break}sn=r.return}}function Vy(i,r,l){var u=l.flags;switch(l.tag){case 0:case 11:case 15:ya(i,l),u&4&&_o(5,l);break;case 1:if(ya(i,l),u&4)if(i=l.stateNode,r===null)try{i.componentDidMount()}catch(k){mt(l,l.return,k)}else{var m=Yr(l.type,r.memoizedProps);r=r.memoizedState;try{i.componentDidUpdate(m,r,i.__reactInternalSnapshotBeforeUpdate)}catch(k){mt(l,l.return,k)}}u&64&&$y(l),u&512&&No(l,l.return);break;case 3:if(ya(i,l),u&64&&(i=l.updateQueue,i!==null)){if(r=null,l.child!==null)switch(l.child.tag){case 27:case 5:r=l.child.stateNode;break;case 1:r=l.child.stateNode}try{Mb(i,r)}catch(k){mt(l,l.return,k)}}break;case 27:r===null&&u&4&&Qy(l);case 26:case 5:ya(i,l),r===null&&u&4&&Ky(l),u&512&&No(l,l.return);break;case 12:ya(i,l);break;case 31:ya(i,l),u&4&&Zy(i,l);break;case 13:ya(i,l),u&4&&Jy(i,l),u&64&&(i=l.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(l=f_.bind(null,l),D_(i,l))));break;case 22:if(u=l.memoizedState!==null||ga,!u){r=r!==null&&r.memoizedState!==null||tn,m=ga;var y=tn;ga=u,(tn=r)&&!y?xa(i,l,(l.subtreeFlags&8772)!==0):ya(i,l),ga=m,tn=y}break;case 30:break;default:ya(i,l)}}function Wy(i){var r=i.alternate;r!==null&&(i.alternate=null,Wy(r)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(r=i.stateNode,r!==null&&Vl(r)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}var Mt=null,Pn=!1;function ba(i,r,l){for(l=l.child;l!==null;)Xy(i,r,l),l=l.sibling}function Xy(i,r,l){if(Ft&&typeof Ft.onCommitFiberUnmount=="function")try{Ft.onCommitFiberUnmount(cn,l)}catch{}switch(l.tag){case 26:tn||Gi(l,r),ba(i,r,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:tn||Gi(l,r);var u=Mt,m=Pn;tr(l.type)&&(Mt=l.stateNode,Pn=!1),ba(i,r,l),Lo(l.stateNode),Mt=u,Pn=m;break;case 5:tn||Gi(l,r);case 6:if(u=Mt,m=Pn,Mt=null,ba(i,r,l),Mt=u,Pn=m,Mt!==null)if(Pn)try{(Mt.nodeType===9?Mt.body:Mt.nodeName==="HTML"?Mt.ownerDocument.body:Mt).removeChild(l.stateNode)}catch(y){mt(l,r,y)}else try{Mt.removeChild(l.stateNode)}catch(y){mt(l,r,y)}break;case 18:Mt!==null&&(Pn?(i=Mt,$x(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,l.stateNode),il(i)):$x(Mt,l.stateNode));break;case 4:u=Mt,m=Pn,Mt=l.stateNode.containerInfo,Pn=!0,ba(i,r,l),Mt=u,Pn=m;break;case 0:case 11:case 14:case 15:Ya(2,l,r),tn||Ya(4,l,r),ba(i,r,l);break;case 1:tn||(Gi(l,r),u=l.stateNode,typeof u.componentWillUnmount=="function"&&Hy(l,r,u)),ba(i,r,l);break;case 21:ba(i,r,l);break;case 22:tn=(u=tn)||l.memoizedState!==null,ba(i,r,l),tn=u;break;default:ba(i,r,l)}}function Zy(i,r){if(r.memoizedState===null&&(i=r.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{il(i)}catch(l){mt(r,r.return,l)}}}function Jy(i,r){if(r.memoizedState===null&&(i=r.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{il(i)}catch(l){mt(r,r.return,l)}}function a_(i){switch(i.tag){case 31:case 13:case 19:var r=i.stateNode;return r===null&&(r=i.stateNode=new Yy),r;case 22:return i=i.stateNode,r=i._retryCache,r===null&&(r=i._retryCache=new Yy),r;default:throw Error(a(435,i.tag))}}function xu(i,r){var l=a_(i);r.forEach(function(u){if(!l.has(u)){l.add(u);var m=h_.bind(null,i,u);u.then(m,m)}})}function Un(i,r){var l=r.deletions;if(l!==null)for(var u=0;u<l.length;u++){var m=l[u],y=i,k=r,N=k;e:for(;N!==null;){switch(N.tag){case 27:if(tr(N.type)){Mt=N.stateNode,Pn=!1;break e}break;case 5:Mt=N.stateNode,Pn=!1;break e;case 3:case 4:Mt=N.stateNode.containerInfo,Pn=!0;break e}N=N.return}if(Mt===null)throw Error(a(160));Xy(y,k,m),Mt=null,Pn=!1,y=m.alternate,y!==null&&(y.return=null),m.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)ex(r,i),r=r.sibling}var Oi=null;function ex(i,r){var l=i.alternate,u=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:Un(r,i),Fn(i),u&4&&(Ya(3,i,i.return),_o(3,i),Ya(5,i,i.return));break;case 1:Un(r,i),Fn(i),u&512&&(tn||l===null||Gi(l,l.return)),u&64&&ga&&(i=i.updateQueue,i!==null&&(u=i.callbacks,u!==null&&(l=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=l===null?u:l.concat(u))));break;case 26:var m=Oi;if(Un(r,i),Fn(i),u&512&&(tn||l===null||Gi(l,l.return)),u&4){var y=l!==null?l.memoizedState:null;if(u=i.memoizedState,l===null)if(u===null)if(i.stateNode===null){e:{u=i.type,l=i.memoizedProps,m=m.ownerDocument||m;t:switch(u){case"title":y=m.getElementsByTagName("title")[0],(!y||y[Dr]||y[Gt]||y.namespaceURI==="http://www.w3.org/2000/svg"||y.hasAttribute("itemprop"))&&(y=m.createElement(u),m.head.insertBefore(y,m.querySelector("head > title"))),pn(y,u,l),y[Gt]=i,Wt(y),u=y;break e;case"link":var k=ev("link","href",m).get(u+(l.href||""));if(k){for(var N=0;N<k.length;N++)if(y=k[N],y.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&y.getAttribute("rel")===(l.rel==null?null:l.rel)&&y.getAttribute("title")===(l.title==null?null:l.title)&&y.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){k.splice(N,1);break t}}y=m.createElement(u),pn(y,u,l),m.head.appendChild(y);break;case"meta":if(k=ev("meta","content",m).get(u+(l.content||""))){for(N=0;N<k.length;N++)if(y=k[N],y.getAttribute("content")===(l.content==null?null:""+l.content)&&y.getAttribute("name")===(l.name==null?null:l.name)&&y.getAttribute("property")===(l.property==null?null:l.property)&&y.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&y.getAttribute("charset")===(l.charSet==null?null:l.charSet)){k.splice(N,1);break t}}y=m.createElement(u),pn(y,u,l),m.head.appendChild(y);break;default:throw Error(a(468,u))}y[Gt]=i,Wt(y),u=y}i.stateNode=u}else tv(m,i.type,i.stateNode);else i.stateNode=Jx(m,u,i.memoizedProps);else y!==u?(y===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):y.count--,u===null?tv(m,i.type,i.stateNode):Jx(m,u,i.memoizedProps)):u===null&&i.stateNode!==null&&xh(i,i.memoizedProps,l.memoizedProps)}break;case 27:Un(r,i),Fn(i),u&512&&(tn||l===null||Gi(l,l.return)),l!==null&&u&4&&xh(i,i.memoizedProps,l.memoizedProps);break;case 5:if(Un(r,i),Fn(i),u&512&&(tn||l===null||Gi(l,l.return)),i.flags&32){m=i.stateNode;try{Le(m,"")}catch(Ee){mt(i,i.return,Ee)}}u&4&&i.stateNode!=null&&(m=i.memoizedProps,xh(i,m,l!==null?l.memoizedProps:m)),u&1024&&(kh=!0);break;case 6:if(Un(r,i),Fn(i),u&4){if(i.stateNode===null)throw Error(a(162));u=i.memoizedProps,l=i.stateNode;try{l.nodeValue=u}catch(Ee){mt(i,i.return,Ee)}}break;case 3:if(Lu=null,m=Oi,Oi=Mu(r.containerInfo),Un(r,i),Oi=m,Fn(i),u&4&&l!==null&&l.memoizedState.isDehydrated)try{il(r.containerInfo)}catch(Ee){mt(i,i.return,Ee)}kh&&(kh=!1,tx(i));break;case 4:u=Oi,Oi=Mu(i.stateNode.containerInfo),Un(r,i),Fn(i),Oi=u;break;case 12:Un(r,i),Fn(i);break;case 31:Un(r,i),Fn(i),u&4&&(u=i.updateQueue,u!==null&&(i.updateQueue=null,xu(i,u)));break;case 13:Un(r,i),Fn(i),i.child.flags&8192&&i.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(wu=zt()),u&4&&(u=i.updateQueue,u!==null&&(i.updateQueue=null,xu(i,u)));break;case 22:m=i.memoizedState!==null;var L=l!==null&&l.memoizedState!==null,G=ga,ie=tn;if(ga=G||m,tn=ie||L,Un(r,i),tn=ie,ga=G,Fn(i),u&8192)e:for(r=i.stateNode,r._visibility=m?r._visibility&-2:r._visibility|1,m&&(l===null||L||ga||tn||Vr(i)),l=null,r=i;;){if(r.tag===5||r.tag===26){if(l===null){L=l=r;try{if(y=L.stateNode,m)k=y.style,typeof k.setProperty=="function"?k.setProperty("display","none","important"):k.display="none";else{N=L.stateNode;var oe=L.memoizedProps.style,W=oe!=null&&oe.hasOwnProperty("display")?oe.display:null;N.style.display=W==null||typeof W=="boolean"?"":(""+W).trim()}}catch(Ee){mt(L,L.return,Ee)}}}else if(r.tag===6){if(l===null){L=r;try{L.stateNode.nodeValue=m?"":L.memoizedProps}catch(Ee){mt(L,L.return,Ee)}}}else if(r.tag===18){if(l===null){L=r;try{var Z=L.stateNode;m?Hx(Z,!0):Hx(L.stateNode,!1)}catch(Ee){mt(L,L.return,Ee)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===i)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===i)break e;for(;r.sibling===null;){if(r.return===null||r.return===i)break e;l===r&&(l=null),r=r.return}l===r&&(l=null),r.sibling.return=r.return,r=r.sibling}u&4&&(u=i.updateQueue,u!==null&&(l=u.retryQueue,l!==null&&(u.retryQueue=null,xu(i,l))));break;case 19:Un(r,i),Fn(i),u&4&&(u=i.updateQueue,u!==null&&(i.updateQueue=null,xu(i,u)));break;case 30:break;case 21:break;default:Un(r,i),Fn(i)}}function Fn(i){var r=i.flags;if(r&2){try{for(var l,u=i.return;u!==null;){if(Gy(u)){l=u;break}u=u.return}if(l==null)throw Error(a(160));switch(l.tag){case 27:var m=l.stateNode,y=vh(i);yu(i,y,m);break;case 5:var k=l.stateNode;l.flags&32&&(Le(k,""),l.flags&=-33);var N=vh(i);yu(i,N,k);break;case 3:case 4:var L=l.stateNode.containerInfo,G=vh(i);wh(i,G,L);break;default:throw Error(a(161))}}catch(ie){mt(i,i.return,ie)}i.flags&=-3}r&4096&&(i.flags&=-4097)}function tx(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var r=i;tx(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),i=i.sibling}}function ya(i,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)Vy(i,r.alternate,r),r=r.sibling}function Vr(i){for(i=i.child;i!==null;){var r=i;switch(r.tag){case 0:case 11:case 14:case 15:Ya(4,r,r.return),Vr(r);break;case 1:Gi(r,r.return);var l=r.stateNode;typeof l.componentWillUnmount=="function"&&Hy(r,r.return,l),Vr(r);break;case 27:Lo(r.stateNode);case 26:case 5:Gi(r,r.return),Vr(r);break;case 22:r.memoizedState===null&&Vr(r);break;case 30:Vr(r);break;default:Vr(r)}i=i.sibling}}function xa(i,r,l){for(l=l&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var u=r.alternate,m=i,y=r,k=y.flags;switch(y.tag){case 0:case 11:case 15:xa(m,y,l),_o(4,y);break;case 1:if(xa(m,y,l),u=y,m=u.stateNode,typeof m.componentDidMount=="function")try{m.componentDidMount()}catch(G){mt(u,u.return,G)}if(u=y,m=u.updateQueue,m!==null){var N=u.stateNode;try{var L=m.shared.hiddenCallbacks;if(L!==null)for(m.shared.hiddenCallbacks=null,m=0;m<L.length;m++)Db(L[m],N)}catch(G){mt(u,u.return,G)}}l&&k&64&&$y(y),No(y,y.return);break;case 27:Qy(y);case 26:case 5:xa(m,y,l),l&&u===null&&k&4&&Ky(y),No(y,y.return);break;case 12:xa(m,y,l);break;case 31:xa(m,y,l),l&&k&4&&Zy(m,y);break;case 13:xa(m,y,l),l&&k&4&&Jy(m,y);break;case 22:y.memoizedState===null&&xa(m,y,l),No(y,y.return);break;case 30:break;default:xa(m,y,l)}r=r.sibling}}function Eh(i,r){var l=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(l=i.memoizedState.cachePool.pool),i=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(i=r.memoizedState.cachePool.pool),i!==l&&(i!=null&&i.refCount++,l!=null&&fo(l))}function Sh(i,r){i=null,r.alternate!==null&&(i=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==i&&(r.refCount++,i!=null&&fo(i))}function Di(i,r,l,u){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)nx(i,r,l,u),r=r.sibling}function nx(i,r,l,u){var m=r.flags;switch(r.tag){case 0:case 11:case 15:Di(i,r,l,u),m&2048&&_o(9,r);break;case 1:Di(i,r,l,u);break;case 3:Di(i,r,l,u),m&2048&&(i=null,r.alternate!==null&&(i=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==i&&(r.refCount++,i!=null&&fo(i)));break;case 12:if(m&2048){Di(i,r,l,u),i=r.stateNode;try{var y=r.memoizedProps,k=y.id,N=y.onPostCommit;typeof N=="function"&&N(k,r.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(L){mt(r,r.return,L)}}else Di(i,r,l,u);break;case 31:Di(i,r,l,u);break;case 13:Di(i,r,l,u);break;case 23:break;case 22:y=r.stateNode,k=r.alternate,r.memoizedState!==null?y._visibility&2?Di(i,r,l,u):Co(i,r):y._visibility&2?Di(i,r,l,u):(y._visibility|=2,Gs(i,r,l,u,(r.subtreeFlags&10256)!==0||!1)),m&2048&&Eh(k,r);break;case 24:Di(i,r,l,u),m&2048&&Sh(r.alternate,r);break;default:Di(i,r,l,u)}}function Gs(i,r,l,u,m){for(m=m&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var y=i,k=r,N=l,L=u,G=k.flags;switch(k.tag){case 0:case 11:case 15:Gs(y,k,N,L,m),_o(8,k);break;case 23:break;case 22:var ie=k.stateNode;k.memoizedState!==null?ie._visibility&2?Gs(y,k,N,L,m):Co(y,k):(ie._visibility|=2,Gs(y,k,N,L,m)),m&&G&2048&&Eh(k.alternate,k);break;case 24:Gs(y,k,N,L,m),m&&G&2048&&Sh(k.alternate,k);break;default:Gs(y,k,N,L,m)}r=r.sibling}}function Co(i,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var l=i,u=r,m=u.flags;switch(u.tag){case 22:Co(l,u),m&2048&&Eh(u.alternate,u);break;case 24:Co(l,u),m&2048&&Sh(u.alternate,u);break;default:Co(l,u)}r=r.sibling}}var To=8192;function Qs(i,r,l){if(i.subtreeFlags&To)for(i=i.child;i!==null;)ix(i,r,l),i=i.sibling}function ix(i,r,l){switch(i.tag){case 26:Qs(i,r,l),i.flags&To&&i.memoizedState!==null&&H_(l,Oi,i.memoizedState,i.memoizedProps);break;case 5:Qs(i,r,l);break;case 3:case 4:var u=Oi;Oi=Mu(i.stateNode.containerInfo),Qs(i,r,l),Oi=u;break;case 22:i.memoizedState===null&&(u=i.alternate,u!==null&&u.memoizedState!==null?(u=To,To=16777216,Qs(i,r,l),To=u):Qs(i,r,l));break;default:Qs(i,r,l)}}function ax(i){var r=i.alternate;if(r!==null&&(i=r.child,i!==null)){r.child=null;do r=i.sibling,i.sibling=null,i=r;while(i!==null)}}function Ao(i){var r=i.deletions;if((i.flags&16)!==0){if(r!==null)for(var l=0;l<r.length;l++){var u=r[l];sn=u,sx(u,i)}ax(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)rx(i),i=i.sibling}function rx(i){switch(i.tag){case 0:case 11:case 15:Ao(i),i.flags&2048&&Ya(9,i,i.return);break;case 3:Ao(i);break;case 12:Ao(i);break;case 22:var r=i.stateNode;i.memoizedState!==null&&r._visibility&2&&(i.return===null||i.return.tag!==13)?(r._visibility&=-3,vu(i)):Ao(i);break;default:Ao(i)}}function vu(i){var r=i.deletions;if((i.flags&16)!==0){if(r!==null)for(var l=0;l<r.length;l++){var u=r[l];sn=u,sx(u,i)}ax(i)}for(i=i.child;i!==null;){switch(r=i,r.tag){case 0:case 11:case 15:Ya(8,r,r.return),vu(r);break;case 22:l=r.stateNode,l._visibility&2&&(l._visibility&=-3,vu(r));break;default:vu(r)}i=i.sibling}}function sx(i,r){for(;sn!==null;){var l=sn;switch(l.tag){case 0:case 11:case 15:Ya(8,l,r);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var u=l.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:fo(l.memoizedState.cache)}if(u=l.child,u!==null)u.return=l,sn=u;else e:for(l=i;sn!==null;){u=sn;var m=u.sibling,y=u.return;if(Wy(u),u===l){sn=null;break e}if(m!==null){m.return=y,sn=m;break e}sn=y}}}var r_={getCacheForType:function(i){var r=fn(Zt),l=r.data.get(i);return l===void 0&&(l=i(),r.data.set(i,l)),l},cacheSignal:function(){return fn(Zt).controller.signal}},s_=typeof WeakMap=="function"?WeakMap:Map,ct=0,wt=null,Ve=null,Je=0,pt=0,ti=null,Va=!1,Ys=!1,_h=!1,va=0,$t=0,Wa=0,Wr=0,Nh=0,ni=0,Vs=0,jo=null,qn=null,Ch=!1,wu=0,lx=0,ku=1/0,Eu=null,Xa=null,an=0,Za=null,Ws=null,wa=0,Th=0,Ah=null,ox=null,Oo=0,jh=null;function ii(){return(ct&2)!==0&&Je!==0?Je&-Je:$.T!==null?Ih():ks()}function cx(){if(ni===0)if((Je&536870912)===0||nt){var i=ws;ws<<=1,(ws&3932160)===0&&(ws=262144),ni=i}else ni=536870912;return i=Jn.current,i!==null&&(i.flags|=32),ni}function $n(i,r,l){(i===wt&&(pt===2||pt===9)||i.cancelPendingCommit!==null)&&(Xs(i,0),Ja(i,Je,ni,!1)),vt(i,l),((ct&2)===0||i!==wt)&&(i===wt&&((ct&2)===0&&(Wr|=l),$t===4&&Ja(i,Je,ni,!1)),Qi(i))}function ux(i,r,l){if((ct&6)!==0)throw Error(a(327));var u=!l&&(r&127)===0&&(r&i.expiredLanes)===0||se(i,r),m=u?c_(i,r):Dh(i,r,!0),y=u;do{if(m===0){Ys&&!u&&Ja(i,r,0,!1);break}else{if(l=i.current.alternate,y&&!l_(l)){m=Dh(i,r,!1),y=!1;continue}if(m===2){if(y=r,i.errorRecoveryDisabledLanes&y)var k=0;else k=i.pendingLanes&-536870913,k=k!==0?k:k&536870912?536870912:0;if(k!==0){r=k;e:{var N=i;m=jo;var L=N.current.memoizedState.isDehydrated;if(L&&(Xs(N,k).flags|=256),k=Dh(N,k,!1),k!==2){if(_h&&!L){N.errorRecoveryDisabledLanes|=y,Wr|=y,m=4;break e}y=qn,qn=m,y!==null&&(qn===null?qn=y:qn.push.apply(qn,y))}m=k}if(y=!1,m!==2)continue}}if(m===1){Xs(i,0),Ja(i,r,0,!0);break}e:{switch(u=i,y=m,y){case 0:case 1:throw Error(a(345));case 4:if((r&4194048)!==r)break;case 6:Ja(u,r,ni,!Va);break e;case 2:qn=null;break;case 3:case 5:break;default:throw Error(a(329))}if((r&62914560)===r&&(m=wu+300-zt(),10<m)){if(Ja(u,r,ni,!Va),z(u,0,!0)!==0)break e;wa=r,u.timeoutHandle=Fx(dx.bind(null,u,l,qn,Eu,Ch,r,ni,Wr,Vs,Va,y,"Throttled",-0,0),m);break e}dx(u,l,qn,Eu,Ch,r,ni,Wr,Vs,Va,y,null,-0,0)}}break}while(!0);Qi(i)}function dx(i,r,l,u,m,y,k,N,L,G,ie,oe,W,Z){if(i.timeoutHandle=-1,oe=r.subtreeFlags,oe&8192||(oe&16785408)===16785408){oe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:be},ix(r,y,oe);var Ee=(y&62914560)===y?wu-zt():(y&4194048)===y?lx-zt():0;if(Ee=K_(oe,Ee),Ee!==null){wa=y,i.cancelPendingCommit=Ee(xx.bind(null,i,r,y,l,u,m,k,N,L,ie,oe,null,W,Z)),Ja(i,y,k,!G);return}}xx(i,r,y,l,u,m,k,N,L)}function l_(i){for(var r=i;;){var l=r.tag;if((l===0||l===11||l===15)&&r.flags&16384&&(l=r.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var u=0;u<l.length;u++){var m=l[u],y=m.getSnapshot;m=m.value;try{if(!Xn(y(),m))return!1}catch{return!1}}if(l=r.child,r.subtreeFlags&16384&&l!==null)l.return=r,r=l;else{if(r===i)break;for(;r.sibling===null;){if(r.return===null||r.return===i)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function Ja(i,r,l,u){r&=~Nh,r&=~Wr,i.suspendedLanes|=r,i.pingedLanes&=~r,u&&(i.warmLanes|=r),u=i.expirationTimes;for(var m=r;0<m;){var y=31-dt(m),k=1<<y;u[y]=-1,m&=~k}l!==0&&ke(i,l,r)}function Su(){return(ct&6)===0?(Do(0),!1):!0}function Oh(){if(Ve!==null){if(pt===0)var i=Ve.return;else i=Ve,ua=Fr=null,Qf(i),Fs=null,po=0,i=Ve;for(;i!==null;)qy(i.alternate,i),i=i.return;Ve=null}}function Xs(i,r){var l=i.timeoutHandle;l!==-1&&(i.timeoutHandle=-1,C_(l)),l=i.cancelPendingCommit,l!==null&&(i.cancelPendingCommit=null,l()),wa=0,Oh(),wt=i,Ve=l=oa(i.current,null),Je=r,pt=0,ti=null,Va=!1,Ys=se(i,r),_h=!1,Vs=ni=Nh=Wr=Wa=$t=0,qn=jo=null,Ch=!1,(r&8)!==0&&(r|=r&32);var u=i.entangledLanes;if(u!==0)for(i=i.entanglements,u&=r;0<u;){var m=31-dt(u),y=1<<m;r|=i[m],u&=~y}return va=r,Kc(),l}function fx(i,r){$e=null,$.H=ko,r===Us||r===Jc?(r=Tb(),pt=3):r===Lf?(r=Tb(),pt=4):pt=r===ch?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,ti=r,Ve===null&&($t=1,hu(i,fi(r,i.current)))}function hx(){var i=Jn.current;return i===null?!0:(Je&4194048)===Je?gi===null:(Je&62914560)===Je||(Je&536870912)!==0?i===gi:!1}function px(){var i=$.H;return $.H=ko,i===null?ko:i}function mx(){var i=$.A;return $.A=r_,i}function _u(){$t=4,Va||(Je&4194048)!==Je&&Jn.current!==null||(Ys=!0),(Wa&134217727)===0&&(Wr&134217727)===0||wt===null||Ja(wt,Je,ni,!1)}function Dh(i,r,l){var u=ct;ct|=2;var m=px(),y=mx();(wt!==i||Je!==r)&&(Eu=null,Xs(i,r)),r=!1;var k=$t;e:do try{if(pt!==0&&Ve!==null){var N=Ve,L=ti;switch(pt){case 8:Oh(),k=6;break e;case 3:case 2:case 9:case 6:Jn.current===null&&(r=!0);var G=pt;if(pt=0,ti=null,Zs(i,N,L,G),l&&Ys){k=0;break e}break;default:G=pt,pt=0,ti=null,Zs(i,N,L,G)}}o_(),k=$t;break}catch(ie){fx(i,ie)}while(!0);return r&&i.shellSuspendCounter++,ua=Fr=null,ct=u,$.H=m,$.A=y,Ve===null&&(wt=null,Je=0,Kc()),k}function o_(){for(;Ve!==null;)gx(Ve)}function c_(i,r){var l=ct;ct|=2;var u=px(),m=mx();wt!==i||Je!==r?(Eu=null,ku=zt()+500,Xs(i,r)):Ys=se(i,r);e:do try{if(pt!==0&&Ve!==null){r=Ve;var y=ti;t:switch(pt){case 1:pt=0,ti=null,Zs(i,r,y,1);break;case 2:case 9:if(Nb(y)){pt=0,ti=null,bx(r);break}r=function(){pt!==2&&pt!==9||wt!==i||(pt=7),Qi(i)},y.then(r,r);break e;case 3:pt=7;break e;case 4:pt=5;break e;case 7:Nb(y)?(pt=0,ti=null,bx(r)):(pt=0,ti=null,Zs(i,r,y,7));break;case 5:var k=null;switch(Ve.tag){case 26:k=Ve.memoizedState;case 5:case 27:var N=Ve;if(k?nv(k):N.stateNode.complete){pt=0,ti=null;var L=N.sibling;if(L!==null)Ve=L;else{var G=N.return;G!==null?(Ve=G,Nu(G)):Ve=null}break t}}pt=0,ti=null,Zs(i,r,y,5);break;case 6:pt=0,ti=null,Zs(i,r,y,6);break;case 8:Oh(),$t=6;break e;default:throw Error(a(462))}}u_();break}catch(ie){fx(i,ie)}while(!0);return ua=Fr=null,$.H=u,$.A=m,ct=l,Ve!==null?0:(wt=null,Je=0,Kc(),$t)}function u_(){for(;Ve!==null&&!Ql();)gx(Ve)}function gx(i){var r=Uy(i.alternate,i,va);i.memoizedProps=i.pendingProps,r===null?Nu(i):Ve=r}function bx(i){var r=i,l=r.alternate;switch(r.tag){case 15:case 0:r=Ry(l,r,r.pendingProps,r.type,void 0,Je);break;case 11:r=Ry(l,r,r.pendingProps,r.type.render,r.ref,Je);break;case 5:Qf(r);default:qy(l,r),r=Ve=mb(r,va),r=Uy(l,r,va)}i.memoizedProps=i.pendingProps,r===null?Nu(i):Ve=r}function Zs(i,r,l,u){ua=Fr=null,Qf(r),Fs=null,po=0;var m=r.return;try{if(ZS(i,m,r,l,Je)){$t=1,hu(i,fi(l,i.current)),Ve=null;return}}catch(y){if(m!==null)throw Ve=m,y;$t=1,hu(i,fi(l,i.current)),Ve=null;return}r.flags&32768?(nt||u===1?i=!0:Ys||(Je&536870912)!==0?i=!1:(Va=i=!0,(u===2||u===9||u===3||u===6)&&(u=Jn.current,u!==null&&u.tag===13&&(u.flags|=16384))),yx(r,i)):Nu(r)}function Nu(i){var r=i;do{if((r.flags&32768)!==0){yx(r,Va);return}i=r.return;var l=t_(r.alternate,r,va);if(l!==null){Ve=l;return}if(r=r.sibling,r!==null){Ve=r;return}Ve=r=i}while(r!==null);$t===0&&($t=5)}function yx(i,r){do{var l=n_(i.alternate,i);if(l!==null){l.flags&=32767,Ve=l;return}if(l=i.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!r&&(i=i.sibling,i!==null)){Ve=i;return}Ve=i=l}while(i!==null);$t=6,Ve=null}function xx(i,r,l,u,m,y,k,N,L){i.cancelPendingCommit=null;do Cu();while(an!==0);if((ct&6)!==0)throw Error(a(327));if(r!==null){if(r===i.current)throw Error(a(177));if(y=r.lanes|r.childLanes,y|=vf,Se(i,l,y,k,N,L),i===wt&&(Ve=wt=null,Je=0),Ws=r,Za=i,wa=l,Th=y,Ah=m,ox=u,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,p_(Me,function(){return Sx(),null})):(i.callbackNode=null,i.callbackPriority=0),u=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||u){u=$.T,$.T=null,m=ce.p,ce.p=2,k=ct,ct|=4;try{i_(i,r,l)}finally{ct=k,ce.p=m,$.T=u}}an=1,vx(),wx(),kx()}}function vx(){if(an===1){an=0;var i=Za,r=Ws,l=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||l){l=$.T,$.T=null;var u=ce.p;ce.p=2;var m=ct;ct|=4;try{ex(r,i);var y=Hh,k=sb(i.containerInfo),N=y.focusedElem,L=y.selectionRange;if(k!==N&&N&&N.ownerDocument&&rb(N.ownerDocument.documentElement,N)){if(L!==null&&mf(N)){var G=L.start,ie=L.end;if(ie===void 0&&(ie=G),"selectionStart"in N)N.selectionStart=G,N.selectionEnd=Math.min(ie,N.value.length);else{var oe=N.ownerDocument||document,W=oe&&oe.defaultView||window;if(W.getSelection){var Z=W.getSelection(),Ee=N.textContent.length,Re=Math.min(L.start,Ee),yt=L.end===void 0?Re:Math.min(L.end,Ee);!Z.extend&&Re>yt&&(k=yt,yt=Re,Re=k);var H=ab(N,Re),U=ab(N,yt);if(H&&U&&(Z.rangeCount!==1||Z.anchorNode!==H.node||Z.anchorOffset!==H.offset||Z.focusNode!==U.node||Z.focusOffset!==U.offset)){var K=oe.createRange();K.setStart(H.node,H.offset),Z.removeAllRanges(),Re>yt?(Z.addRange(K),Z.extend(U.node,U.offset)):(K.setEnd(U.node,U.offset),Z.addRange(K))}}}}for(oe=[],Z=N;Z=Z.parentNode;)Z.nodeType===1&&oe.push({element:Z,left:Z.scrollLeft,top:Z.scrollTop});for(typeof N.focus=="function"&&N.focus(),N=0;N<oe.length;N++){var le=oe[N];le.element.scrollLeft=le.left,le.element.scrollTop=le.top}}Pu=!!$h,Hh=$h=null}finally{ct=m,ce.p=u,$.T=l}}i.current=r,an=2}}function wx(){if(an===2){an=0;var i=Za,r=Ws,l=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||l){l=$.T,$.T=null;var u=ce.p;ce.p=2;var m=ct;ct|=4;try{Vy(i,r.alternate,r)}finally{ct=m,ce.p=u,$.T=l}}an=3}}function kx(){if(an===4||an===3){an=0,xs();var i=Za,r=Ws,l=wa,u=ox;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?an=5:(an=0,Ws=Za=null,Ex(i,i.pendingLanes));var m=i.pendingLanes;if(m===0&&(Xa=null),ia(l),r=r.stateNode,Ft&&typeof Ft.onCommitFiberRoot=="function")try{Ft.onCommitFiberRoot(cn,r,void 0,(r.current.flags&128)===128)}catch{}if(u!==null){r=$.T,m=ce.p,ce.p=2,$.T=null;try{for(var y=i.onRecoverableError,k=0;k<u.length;k++){var N=u[k];y(N.value,{componentStack:N.stack})}}finally{$.T=r,ce.p=m}}(wa&3)!==0&&Cu(),Qi(i),m=i.pendingLanes,(l&261930)!==0&&(m&42)!==0?i===jh?Oo++:(Oo=0,jh=i):Oo=0,Do(0)}}function Ex(i,r){(i.pooledCacheLanes&=r)===0&&(r=i.pooledCache,r!=null&&(i.pooledCache=null,fo(r)))}function Cu(){return vx(),wx(),kx(),Sx()}function Sx(){if(an!==5)return!1;var i=Za,r=Th;Th=0;var l=ia(wa),u=$.T,m=ce.p;try{ce.p=32>l?32:l,$.T=null,l=Ah,Ah=null;var y=Za,k=wa;if(an=0,Ws=Za=null,wa=0,(ct&6)!==0)throw Error(a(331));var N=ct;if(ct|=4,rx(y.current),nx(y,y.current,k,l),ct=N,Do(0,!1),Ft&&typeof Ft.onPostCommitFiberRoot=="function")try{Ft.onPostCommitFiberRoot(cn,y)}catch{}return!0}finally{ce.p=m,$.T=u,Ex(i,r)}}function _x(i,r,l){r=fi(l,r),r=oh(i.stateNode,r,2),i=Ka(i,r,2),i!==null&&(vt(i,2),Qi(i))}function mt(i,r,l){if(i.tag===3)_x(i,i,l);else for(;r!==null;){if(r.tag===3){_x(r,i,l);break}else if(r.tag===1){var u=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Xa===null||!Xa.has(u))){i=fi(l,i),l=Ny(2),u=Ka(r,l,2),u!==null&&(Cy(l,u,r,i),vt(u,2),Qi(u));break}}r=r.return}}function Mh(i,r,l){var u=i.pingCache;if(u===null){u=i.pingCache=new s_;var m=new Set;u.set(r,m)}else m=u.get(r),m===void 0&&(m=new Set,u.set(r,m));m.has(l)||(_h=!0,m.add(l),i=d_.bind(null,i,r,l),r.then(i,i))}function d_(i,r,l){var u=i.pingCache;u!==null&&u.delete(r),i.pingedLanes|=i.suspendedLanes&l,i.warmLanes&=~l,wt===i&&(Je&l)===l&&($t===4||$t===3&&(Je&62914560)===Je&&300>zt()-wu?(ct&2)===0&&Xs(i,0):Nh|=l,Vs===Je&&(Vs=0)),Qi(i)}function Nx(i,r){r===0&&(r=Be()),i=Br(i,r),i!==null&&(vt(i,r),Qi(i))}function f_(i){var r=i.memoizedState,l=0;r!==null&&(l=r.retryLane),Nx(i,l)}function h_(i,r){var l=0;switch(i.tag){case 31:case 13:var u=i.stateNode,m=i.memoizedState;m!==null&&(l=m.retryLane);break;case 19:u=i.stateNode;break;case 22:u=i.stateNode._retryCache;break;default:throw Error(a(314))}u!==null&&u.delete(r),Nx(i,l)}function p_(i,r){return na(i,r)}var Tu=null,Js=null,Rh=!1,Au=!1,Lh=!1,er=0;function Qi(i){i!==Js&&i.next===null&&(Js===null?Tu=Js=i:Js=Js.next=i),Au=!0,Rh||(Rh=!0,g_())}function Do(i,r){if(!Lh&&Au){Lh=!0;do for(var l=!1,u=Tu;u!==null;){if(i!==0){var m=u.pendingLanes;if(m===0)var y=0;else{var k=u.suspendedLanes,N=u.pingedLanes;y=(1<<31-dt(42|i)+1)-1,y&=m&~(k&~N),y=y&201326741?y&201326741|1:y?y|2:0}y!==0&&(l=!0,jx(u,y))}else y=Je,y=z(u,u===wt?y:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(y&3)===0||se(u,y)||(l=!0,jx(u,y));u=u.next}while(l);Lh=!1}}function m_(){Cx()}function Cx(){Au=Rh=!1;var i=0;er!==0&&N_()&&(i=er);for(var r=zt(),l=null,u=Tu;u!==null;){var m=u.next,y=Tx(u,r);y===0?(u.next=null,l===null?Tu=m:l.next=m,m===null&&(Js=l)):(l=u,(i!==0||(y&3)!==0)&&(Au=!0)),u=m}an!==0&&an!==5||Do(i),er!==0&&(er=0)}function Tx(i,r){for(var l=i.suspendedLanes,u=i.pingedLanes,m=i.expirationTimes,y=i.pendingLanes&-62914561;0<y;){var k=31-dt(y),N=1<<k,L=m[k];L===-1?((N&l)===0||(N&u)!==0)&&(m[k]=ve(N,r)):L<=r&&(i.expiredLanes|=N),y&=~N}if(r=wt,l=Je,l=z(i,i===r?l:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),u=i.callbackNode,l===0||i===r&&(pt===2||pt===9)||i.cancelPendingCommit!==null)return u!==null&&u!==null&&Ar(u),i.callbackNode=null,i.callbackPriority=0;if((l&3)===0||se(i,l)){if(r=l&-l,r===i.callbackPriority)return r;switch(u!==null&&Ar(u),ia(l)){case 2:case 8:l=me;break;case 32:l=Me;break;case 268435456:l=st;break;default:l=Me}return u=Ax.bind(null,i),l=na(l,u),i.callbackPriority=r,i.callbackNode=l,r}return u!==null&&u!==null&&Ar(u),i.callbackPriority=2,i.callbackNode=null,2}function Ax(i,r){if(an!==0&&an!==5)return i.callbackNode=null,i.callbackPriority=0,null;var l=i.callbackNode;if(Cu()&&i.callbackNode!==l)return null;var u=Je;return u=z(i,i===wt?u:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),u===0?null:(ux(i,u,r),Tx(i,zt()),i.callbackNode!=null&&i.callbackNode===l?Ax.bind(null,i):null)}function jx(i,r){if(Cu())return null;ux(i,r,!0)}function g_(){T_(function(){(ct&6)!==0?na(ne,m_):Cx()})}function Ih(){if(er===0){var i=Bs;i===0&&(i=jr,jr<<=1,(jr&261888)===0&&(jr=256)),er=i}return er}function Ox(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:za(""+i)}function Dx(i,r){var l=r.ownerDocument.createElement("input");return l.name=r.name,l.value=r.value,i.id&&l.setAttribute("form",i.id),r.parentNode.insertBefore(l,r),i=new FormData(i),l.parentNode.removeChild(l),i}function b_(i,r,l,u,m){if(r==="submit"&&l&&l.stateNode===m){var y=Ox((m[bn]||null).action),k=u.submitter;k&&(r=(r=k[bn]||null)?Ox(r.formAction):k.getAttribute("formAction"),r!==null&&(y=r,k=null));var N=new Fc("action","action",null,u,m);i.push({event:N,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(er!==0){var L=k?Dx(m,k):new FormData(m);nh(l,{pending:!0,data:L,method:m.method,action:y},null,L)}}else typeof y=="function"&&(N.preventDefault(),L=k?Dx(m,k):new FormData(m),nh(l,{pending:!0,data:L,method:m.method,action:y},y,L))},currentTarget:m}]})}}for(var zh=0;zh<xf.length;zh++){var Bh=xf[zh],y_=Bh.toLowerCase(),x_=Bh[0].toUpperCase()+Bh.slice(1);ji(y_,"on"+x_)}ji(cb,"onAnimationEnd"),ji(ub,"onAnimationIteration"),ji(db,"onAnimationStart"),ji("dblclick","onDoubleClick"),ji("focusin","onFocus"),ji("focusout","onBlur"),ji(LS,"onTransitionRun"),ji(IS,"onTransitionStart"),ji(zS,"onTransitionCancel"),ji(fb,"onTransitionEnd"),fe("onMouseEnter",["mouseout","mouseover"]),fe("onMouseLeave",["mouseout","mouseover"]),fe("onPointerEnter",["pointerout","pointerover"]),fe("onPointerLeave",["pointerout","pointerover"]),ra("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ra("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ra("onBeforeInput",["compositionend","keypress","textInput","paste"]),ra("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ra("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ra("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Mo="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(" "),v_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Mo));function Mx(i,r){r=(r&4)!==0;for(var l=0;l<i.length;l++){var u=i[l],m=u.event;u=u.listeners;e:{var y=void 0;if(r)for(var k=u.length-1;0<=k;k--){var N=u[k],L=N.instance,G=N.currentTarget;if(N=N.listener,L!==y&&m.isPropagationStopped())break e;y=N,m.currentTarget=G;try{y(m)}catch(ie){Hc(ie)}m.currentTarget=null,y=L}else for(k=0;k<u.length;k++){if(N=u[k],L=N.instance,G=N.currentTarget,N=N.listener,L!==y&&m.isPropagationStopped())break e;y=N,m.currentTarget=G;try{y(m)}catch(ie){Hc(ie)}m.currentTarget=null,y=L}}}}function We(i,r){var l=r[Yl];l===void 0&&(l=r[Yl]=new Set);var u=i+"__bubble";l.has(u)||(Rx(r,i,2,!1),l.add(u))}function Ph(i,r,l){var u=0;r&&(u|=4),Rx(l,i,u,r)}var ju="_reactListening"+Math.random().toString(36).slice(2);function Uh(i){if(!i[ju]){i[ju]=!0,Mc.forEach(function(l){l!=="selectionchange"&&(v_.has(l)||Ph(l,!1,i),Ph(l,!0,i))});var r=i.nodeType===9?i:i.ownerDocument;r===null||r[ju]||(r[ju]=!0,Ph("selectionchange",!1,r))}}function Rx(i,r,l,u){switch(cv(r)){case 2:var m=Y_;break;case 8:m=V_;break;default:m=tp}l=m.bind(null,r,l,i),m=void 0,!sf||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(m=!0),u?m!==void 0?i.addEventListener(r,l,{capture:!0,passive:m}):i.addEventListener(r,l,!0):m!==void 0?i.addEventListener(r,l,{passive:m}):i.addEventListener(r,l,!1)}function Fh(i,r,l,u,m){var y=u;if((r&1)===0&&(r&2)===0&&u!==null)e:for(;;){if(u===null)return;var k=u.tag;if(k===3||k===4){var N=u.stateNode.containerInfo;if(N===m)break;if(k===4)for(k=u.return;k!==null;){var L=k.tag;if((L===3||L===4)&&k.stateNode.containerInfo===m)return;k=k.return}for(;N!==null;){if(k=Cn(N),k===null)return;if(L=k.tag,L===5||L===6||L===26||L===27){u=y=k;continue e}N=N.parentNode}}u=u.return}zc(function(){var G=y,ie=qe(l),oe=[];e:{var W=hb.get(i);if(W!==void 0){var Z=Fc,Ee=i;switch(i){case"keypress":if(Pc(l)===0)break e;case"keydown":case"keyup":Z=hS;break;case"focusin":Ee="focus",Z=uf;break;case"focusout":Ee="blur",Z=uf;break;case"beforeblur":case"afterblur":Z=uf;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Z=qg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Z=tS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Z=gS;break;case cb:case ub:case db:Z=aS;break;case fb:Z=yS;break;case"scroll":case"scrollend":Z=J1;break;case"wheel":Z=vS;break;case"copy":case"cut":case"paste":Z=sS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Z=Hg;break;case"toggle":case"beforetoggle":Z=kS}var Re=(r&4)!==0,yt=!Re&&(i==="scroll"||i==="scrollend"),H=Re?W!==null?W+"Capture":null:W;Re=[];for(var U=G,K;U!==null;){var le=U;if(K=le.stateNode,le=le.tag,le!==5&&le!==26&&le!==27||K===null||H===null||(le=eo(U,H),le!=null&&Re.push(Ro(U,le,K))),yt)break;U=U.return}0<Re.length&&(W=new Z(W,Ee,null,l,ie),oe.push({event:W,listeners:Re}))}}if((r&7)===0){e:{if(W=i==="mouseover"||i==="pointerover",Z=i==="mouseout"||i==="pointerout",W&&l!==Ne&&(Ee=l.relatedTarget||l.fromElement)&&(Cn(Ee)||Ee[Ma]))break e;if((Z||W)&&(W=ie.window===ie?ie:(W=ie.ownerDocument)?W.defaultView||W.parentWindow:window,Z?(Ee=l.relatedTarget||l.toElement,Z=G,Ee=Ee?Cn(Ee):null,Ee!==null&&(yt=o(Ee),Re=Ee.tag,Ee!==yt||Re!==5&&Re!==27&&Re!==6)&&(Ee=null)):(Z=null,Ee=G),Z!==Ee)){if(Re=qg,le="onMouseLeave",H="onMouseEnter",U="mouse",(i==="pointerout"||i==="pointerover")&&(Re=Hg,le="onPointerLeave",H="onPointerEnter",U="pointer"),yt=Z==null?W:Ra(Z),K=Ee==null?W:Ra(Ee),W=new Re(le,U+"leave",Z,l,ie),W.target=yt,W.relatedTarget=K,le=null,Cn(ie)===G&&(Re=new Re(H,U+"enter",Ee,l,ie),Re.target=K,Re.relatedTarget=yt,le=Re),yt=le,Z&&Ee)t:{for(Re=w_,H=Z,U=Ee,K=0,le=H;le;le=Re(le))K++;le=0;for(var Oe=U;Oe;Oe=Re(Oe))le++;for(;0<K-le;)H=Re(H),K--;for(;0<le-K;)U=Re(U),le--;for(;K--;){if(H===U||U!==null&&H===U.alternate){Re=H;break t}H=Re(H),U=Re(U)}Re=null}else Re=null;Z!==null&&Lx(oe,W,Z,Re,!1),Ee!==null&&yt!==null&&Lx(oe,yt,Ee,Re,!0)}}e:{if(W=G?Ra(G):window,Z=W.nodeName&&W.nodeName.toLowerCase(),Z==="select"||Z==="input"&&W.type==="file")var lt=Zg;else if(Wg(W))if(Jg)lt=DS;else{lt=jS;var Ce=AS}else Z=W.nodeName,!Z||Z.toLowerCase()!=="input"||W.type!=="checkbox"&&W.type!=="radio"?G&&Ia(G.elementType)&&(lt=Zg):lt=OS;if(lt&&(lt=lt(i,G))){Xg(oe,lt,l,ie);break e}Ce&&Ce(i,W,G),i==="focusout"&&G&&W.type==="number"&&G.memoizedProps.value!=null&&Cs(W,"number",W.value)}switch(Ce=G?Ra(G):window,i){case"focusin":(Wg(Ce)||Ce.contentEditable==="true")&&(js=Ce,gf=G,oo=null);break;case"focusout":oo=gf=js=null;break;case"mousedown":bf=!0;break;case"contextmenu":case"mouseup":case"dragend":bf=!1,lb(oe,l,ie);break;case"selectionchange":if(RS)break;case"keydown":case"keyup":lb(oe,l,ie)}var He;if(ff)e:{switch(i){case"compositionstart":var et="onCompositionStart";break e;case"compositionend":et="onCompositionEnd";break e;case"compositionupdate":et="onCompositionUpdate";break e}et=void 0}else As?Yg(i,l)&&(et="onCompositionEnd"):i==="keydown"&&l.keyCode===229&&(et="onCompositionStart");et&&(Kg&&l.locale!=="ko"&&(As||et!=="onCompositionStart"?et==="onCompositionEnd"&&As&&(He=Ug()):(Ba=ie,lf="value"in Ba?Ba.value:Ba.textContent,As=!0)),Ce=Ou(G,et),0<Ce.length&&(et=new $g(et,i,null,l,ie),oe.push({event:et,listeners:Ce}),He?et.data=He:(He=Vg(l),He!==null&&(et.data=He)))),(He=SS?_S(i,l):NS(i,l))&&(et=Ou(G,"onBeforeInput"),0<et.length&&(Ce=new $g("onBeforeInput","beforeinput",null,l,ie),oe.push({event:Ce,listeners:et}),Ce.data=He)),b_(oe,i,G,l,ie)}Mx(oe,r)})}function Ro(i,r,l){return{instance:i,listener:r,currentTarget:l}}function Ou(i,r){for(var l=r+"Capture",u=[];i!==null;){var m=i,y=m.stateNode;if(m=m.tag,m!==5&&m!==26&&m!==27||y===null||(m=eo(i,l),m!=null&&u.unshift(Ro(i,m,y)),m=eo(i,r),m!=null&&u.push(Ro(i,m,y))),i.tag===3)return u;i=i.return}return[]}function w_(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function Lx(i,r,l,u,m){for(var y=r._reactName,k=[];l!==null&&l!==u;){var N=l,L=N.alternate,G=N.stateNode;if(N=N.tag,L!==null&&L===u)break;N!==5&&N!==26&&N!==27||G===null||(L=G,m?(G=eo(l,y),G!=null&&k.unshift(Ro(l,G,L))):m||(G=eo(l,y),G!=null&&k.push(Ro(l,G,L)))),l=l.return}k.length!==0&&i.push({event:r,listeners:k})}var k_=/\r\n?/g,E_=/\u0000|\uFFFD/g;function Ix(i){return(typeof i=="string"?i:""+i).replace(k_,`
49
- `).replace(E_,"")}function zx(i,r){return r=Ix(r),Ix(i)===r}function bt(i,r,l,u,m,y){switch(l){case"children":typeof u=="string"?r==="body"||r==="textarea"&&u===""||Le(i,u):(typeof u=="number"||typeof u=="bigint")&&r!=="body"&&Le(i,""+u);break;case"className":Vn(i,"class",u);break;case"tabIndex":Vn(i,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":Vn(i,l,u);break;case"style":ht(i,u,y);break;case"data":if(r!=="object"){Vn(i,"data",u);break}case"src":case"href":if(u===""&&(r!=="a"||l!=="href")){i.removeAttribute(l);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){i.removeAttribute(l);break}u=za(""+u),i.setAttribute(l,u);break;case"action":case"formAction":if(typeof u=="function"){i.setAttribute(l,"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"&&(l==="formAction"?(r!=="input"&&bt(i,r,"name",m.name,m,null),bt(i,r,"formEncType",m.formEncType,m,null),bt(i,r,"formMethod",m.formMethod,m,null),bt(i,r,"formTarget",m.formTarget,m,null)):(bt(i,r,"encType",m.encType,m,null),bt(i,r,"method",m.method,m,null),bt(i,r,"target",m.target,m,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){i.removeAttribute(l);break}u=za(""+u),i.setAttribute(l,u);break;case"onClick":u!=null&&(i.onclick=be);break;case"onScroll":u!=null&&We("scroll",i);break;case"onScrollEnd":u!=null&&We("scrollend",i);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(a(61));if(l=u.__html,l!=null){if(m.children!=null)throw Error(a(60));i.innerHTML=l}}break;case"multiple":i.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":i.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){i.removeAttribute("xlink:href");break}l=za(""+u),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?i.setAttribute(l,""+u):i.removeAttribute(l);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":u&&typeof u!="function"&&typeof u!="symbol"?i.setAttribute(l,""):i.removeAttribute(l);break;case"capture":case"download":u===!0?i.setAttribute(l,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?i.setAttribute(l,u):i.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?i.setAttribute(l,u):i.removeAttribute(l);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?i.removeAttribute(l):i.setAttribute(l,u);break;case"popover":We("beforetoggle",i),We("toggle",i),yn(i,"popover",u);break;case"xlinkActuate":In(i,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":In(i,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":In(i,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":In(i,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":In(i,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":In(i,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":In(i,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":In(i,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":In(i,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":yn(i,"is",u);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=sa.get(l)||l,yn(i,l,u))}}function qh(i,r,l,u,m,y){switch(l){case"style":ht(i,u,y);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(a(61));if(l=u.__html,l!=null){if(m.children!=null)throw Error(a(60));i.innerHTML=l}}break;case"children":typeof u=="string"?Le(i,u):(typeof u=="number"||typeof u=="bigint")&&Le(i,""+u);break;case"onScroll":u!=null&&We("scroll",i);break;case"onScrollEnd":u!=null&&We("scrollend",i);break;case"onClick":u!=null&&(i.onclick=be);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Mr.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(m=l.endsWith("Capture"),r=l.slice(2,m?l.length-7:void 0),y=i[bn]||null,y=y!=null?y[l]:null,typeof y=="function"&&i.removeEventListener(r,y,m),typeof u=="function")){typeof y!="function"&&y!==null&&(l in i?i[l]=null:i.hasAttribute(l)&&i.removeAttribute(l)),i.addEventListener(r,u,m);break e}l in i?i[l]=u:u===!0?i.setAttribute(l,""):yn(i,l,u)}}}function pn(i,r,l){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":We("error",i),We("load",i);var u=!1,m=!1,y;for(y in l)if(l.hasOwnProperty(y)){var k=l[y];if(k!=null)switch(y){case"src":u=!0;break;case"srcSet":m=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:bt(i,r,y,k,l,null)}}m&&bt(i,r,"srcSet",l.srcSet,l,null),u&&bt(i,r,"src",l.src,l,null);return;case"input":We("invalid",i);var N=y=k=m=null,L=null,G=null;for(u in l)if(l.hasOwnProperty(u)){var ie=l[u];if(ie!=null)switch(u){case"name":m=ie;break;case"type":k=ie;break;case"checked":L=ie;break;case"defaultChecked":G=ie;break;case"value":y=ie;break;case"defaultValue":N=ie;break;case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(a(137,r));break;default:bt(i,r,u,ie,l,null)}}Rr(i,y,N,L,G,k,m,!1);return;case"select":We("invalid",i),u=k=y=null;for(m in l)if(l.hasOwnProperty(m)&&(N=l[m],N!=null))switch(m){case"value":y=N;break;case"defaultValue":k=N;break;case"multiple":u=N;default:bt(i,r,m,N,l,null)}r=y,l=k,i.multiple=!!u,r!=null?un(i,!!u,r,!1):l!=null&&un(i,!!u,l,!0);return;case"textarea":We("invalid",i),y=m=u=null;for(k in l)if(l.hasOwnProperty(k)&&(N=l[k],N!=null))switch(k){case"value":u=N;break;case"defaultValue":m=N;break;case"children":y=N;break;case"dangerouslySetInnerHTML":if(N!=null)throw Error(a(91));break;default:bt(i,r,k,N,l,null)}Ts(i,u,m,y);return;case"option":for(L in l)if(l.hasOwnProperty(L)&&(u=l[L],u!=null))switch(L){case"selected":i.selected=u&&typeof u!="function"&&typeof u!="symbol";break;default:bt(i,r,L,u,l,null)}return;case"dialog":We("beforetoggle",i),We("toggle",i),We("cancel",i),We("close",i);break;case"iframe":case"object":We("load",i);break;case"video":case"audio":for(u=0;u<Mo.length;u++)We(Mo[u],i);break;case"image":We("error",i),We("load",i);break;case"details":We("toggle",i);break;case"embed":case"source":case"link":We("error",i),We("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(G in l)if(l.hasOwnProperty(G)&&(u=l[G],u!=null))switch(G){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:bt(i,r,G,u,l,null)}return;default:if(Ia(r)){for(ie in l)l.hasOwnProperty(ie)&&(u=l[ie],u!==void 0&&qh(i,r,ie,u,l,void 0));return}}for(N in l)l.hasOwnProperty(N)&&(u=l[N],u!=null&&bt(i,r,N,u,l,null))}function S_(i,r,l,u){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var m=null,y=null,k=null,N=null,L=null,G=null,ie=null;for(Z in l){var oe=l[Z];if(l.hasOwnProperty(Z)&&oe!=null)switch(Z){case"checked":break;case"value":break;case"defaultValue":L=oe;default:u.hasOwnProperty(Z)||bt(i,r,Z,null,u,oe)}}for(var W in u){var Z=u[W];if(oe=l[W],u.hasOwnProperty(W)&&(Z!=null||oe!=null))switch(W){case"type":y=Z;break;case"name":m=Z;break;case"checked":G=Z;break;case"defaultChecked":ie=Z;break;case"value":k=Z;break;case"defaultValue":N=Z;break;case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(a(137,r));break;default:Z!==oe&&bt(i,r,W,Z,u,oe)}}Xl(i,k,N,L,G,ie,y,m);return;case"select":Z=k=N=W=null;for(y in l)if(L=l[y],l.hasOwnProperty(y)&&L!=null)switch(y){case"value":break;case"multiple":Z=L;default:u.hasOwnProperty(y)||bt(i,r,y,null,u,L)}for(m in u)if(y=u[m],L=l[m],u.hasOwnProperty(m)&&(y!=null||L!=null))switch(m){case"value":W=y;break;case"defaultValue":N=y;break;case"multiple":k=y;default:y!==L&&bt(i,r,m,y,u,L)}r=N,l=k,u=Z,W!=null?un(i,!!l,W,!1):!!u!=!!l&&(r!=null?un(i,!!l,r,!0):un(i,!!l,l?[]:"",!1));return;case"textarea":Z=W=null;for(N in l)if(m=l[N],l.hasOwnProperty(N)&&m!=null&&!u.hasOwnProperty(N))switch(N){case"value":break;case"children":break;default:bt(i,r,N,null,u,m)}for(k in u)if(m=u[k],y=l[k],u.hasOwnProperty(k)&&(m!=null||y!=null))switch(k){case"value":W=m;break;case"defaultValue":Z=m;break;case"children":break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(a(91));break;default:m!==y&&bt(i,r,k,m,u,y)}Lc(i,W,Z);return;case"option":for(var Ee in l)if(W=l[Ee],l.hasOwnProperty(Ee)&&W!=null&&!u.hasOwnProperty(Ee))switch(Ee){case"selected":i.selected=!1;break;default:bt(i,r,Ee,null,u,W)}for(L in u)if(W=u[L],Z=l[L],u.hasOwnProperty(L)&&W!==Z&&(W!=null||Z!=null))switch(L){case"selected":i.selected=W&&typeof W!="function"&&typeof W!="symbol";break;default:bt(i,r,L,W,u,Z)}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 Re in l)W=l[Re],l.hasOwnProperty(Re)&&W!=null&&!u.hasOwnProperty(Re)&&bt(i,r,Re,null,u,W);for(G in u)if(W=u[G],Z=l[G],u.hasOwnProperty(G)&&W!==Z&&(W!=null||Z!=null))switch(G){case"children":case"dangerouslySetInnerHTML":if(W!=null)throw Error(a(137,r));break;default:bt(i,r,G,W,u,Z)}return;default:if(Ia(r)){for(var yt in l)W=l[yt],l.hasOwnProperty(yt)&&W!==void 0&&!u.hasOwnProperty(yt)&&qh(i,r,yt,void 0,u,W);for(ie in u)W=u[ie],Z=l[ie],!u.hasOwnProperty(ie)||W===Z||W===void 0&&Z===void 0||qh(i,r,ie,W,u,Z);return}}for(var H in l)W=l[H],l.hasOwnProperty(H)&&W!=null&&!u.hasOwnProperty(H)&&bt(i,r,H,null,u,W);for(oe in u)W=u[oe],Z=l[oe],!u.hasOwnProperty(oe)||W===Z||W==null&&Z==null||bt(i,r,oe,W,u,Z)}function Bx(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function __(){if(typeof performance.getEntriesByType=="function"){for(var i=0,r=0,l=performance.getEntriesByType("resource"),u=0;u<l.length;u++){var m=l[u],y=m.transferSize,k=m.initiatorType,N=m.duration;if(y&&N&&Bx(k)){for(k=0,N=m.responseEnd,u+=1;u<l.length;u++){var L=l[u],G=L.startTime;if(G>N)break;var ie=L.transferSize,oe=L.initiatorType;ie&&Bx(oe)&&(L=L.responseEnd,k+=ie*(L<N?1:(N-G)/(L-G)))}if(--u,r+=8*(y+k)/(m.duration/1e3),i++,10<i)break}}if(0<i)return r/i/1e6}return navigator.connection&&(i=navigator.connection.downlink,typeof i=="number")?i:5}var $h=null,Hh=null;function Du(i){return i.nodeType===9?i:i.ownerDocument}function Px(i){switch(i){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Ux(i,r){if(i===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&r==="foreignObject"?0:i}function Kh(i,r){return i==="textarea"||i==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var Gh=null;function N_(){var i=window.event;return i&&i.type==="popstate"?i===Gh?!1:(Gh=i,!0):(Gh=null,!1)}var Fx=typeof setTimeout=="function"?setTimeout:void 0,C_=typeof clearTimeout=="function"?clearTimeout:void 0,qx=typeof Promise=="function"?Promise:void 0,T_=typeof queueMicrotask=="function"?queueMicrotask:typeof qx<"u"?function(i){return qx.resolve(null).then(i).catch(A_)}:Fx;function A_(i){setTimeout(function(){throw i})}function tr(i){return i==="head"}function $x(i,r){var l=r,u=0;do{var m=l.nextSibling;if(i.removeChild(l),m&&m.nodeType===8)if(l=m.data,l==="/$"||l==="/&"){if(u===0){i.removeChild(m),il(r);return}u--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")u++;else if(l==="html")Lo(i.ownerDocument.documentElement);else if(l==="head"){l=i.ownerDocument.head,Lo(l);for(var y=l.firstChild;y;){var k=y.nextSibling,N=y.nodeName;y[Dr]||N==="SCRIPT"||N==="STYLE"||N==="LINK"&&y.rel.toLowerCase()==="stylesheet"||l.removeChild(y),y=k}}else l==="body"&&Lo(i.ownerDocument.body);l=m}while(l);il(r)}function Hx(i,r){var l=i;i=0;do{var u=l.nextSibling;if(l.nodeType===1?r?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(r?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),u&&u.nodeType===8)if(l=u.data,l==="/$"){if(i===0)break;i--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||i++;l=u}while(l)}function Qh(i){var r=i.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var l=r;switch(r=r.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Qh(l),Vl(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}i.removeChild(l)}}function j_(i,r,l,u){for(;i.nodeType===1;){var m=l;if(i.nodeName.toLowerCase()!==r.toLowerCase()){if(!u&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(u){if(!i[Dr])switch(r){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(y=i.getAttribute("rel"),y==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(y!==m.rel||i.getAttribute("href")!==(m.href==null||m.href===""?null:m.href)||i.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin)||i.getAttribute("title")!==(m.title==null?null:m.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(y=i.getAttribute("src"),(y!==(m.src==null?null:m.src)||i.getAttribute("type")!==(m.type==null?null:m.type)||i.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin))&&y&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(r==="input"&&i.type==="hidden"){var y=m.name==null?null:""+m.name;if(m.type==="hidden"&&i.getAttribute("name")===y)return i}else return i;if(i=bi(i.nextSibling),i===null)break}return null}function O_(i,r,l){if(r==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!l||(i=bi(i.nextSibling),i===null))return null;return i}function Kx(i,r){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!r||(i=bi(i.nextSibling),i===null))return null;return i}function Yh(i){return i.data==="$?"||i.data==="$~"}function Vh(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function D_(i,r){var l=i.ownerDocument;if(i.data==="$~")i._reactRetry=r;else if(i.data!=="$?"||l.readyState!=="loading")r();else{var u=function(){r(),l.removeEventListener("DOMContentLoaded",u)};l.addEventListener("DOMContentLoaded",u),i._reactRetry=u}}function bi(i){for(;i!=null;i=i.nextSibling){var r=i.nodeType;if(r===1||r===3)break;if(r===8){if(r=i.data,r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"||r==="F!"||r==="F")break;if(r==="/$"||r==="/&")return null}}return i}var Wh=null;function Gx(i){i=i.nextSibling;for(var r=0;i;){if(i.nodeType===8){var l=i.data;if(l==="/$"||l==="/&"){if(r===0)return bi(i.nextSibling);r--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||r++}i=i.nextSibling}return null}function Qx(i){i=i.previousSibling;for(var r=0;i;){if(i.nodeType===8){var l=i.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(r===0)return i;r--}else l!=="/$"&&l!=="/&"||r++}i=i.previousSibling}return null}function Yx(i,r,l){switch(r=Du(l),i){case"html":if(i=r.documentElement,!i)throw Error(a(452));return i;case"head":if(i=r.head,!i)throw Error(a(453));return i;case"body":if(i=r.body,!i)throw Error(a(454));return i;default:throw Error(a(451))}}function Lo(i){for(var r=i.attributes;r.length;)i.removeAttributeNode(r[0]);Vl(i)}var yi=new Map,Vx=new Set;function Mu(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var ka=ce.d;ce.d={f:M_,r:R_,D:L_,C:I_,L:z_,m:B_,X:U_,S:P_,M:F_};function M_(){var i=ka.f(),r=Su();return i||r}function R_(i){var r=aa(i);r!==null&&r.tag===5&&r.type==="form"?fy(r):ka.r(i)}var el=typeof document>"u"?null:document;function Wx(i,r,l){var u=el;if(u&&typeof r=="string"&&r){var m=zn(r);m='link[rel="'+i+'"][href="'+m+'"]',typeof l=="string"&&(m+='[crossorigin="'+l+'"]'),Vx.has(m)||(Vx.add(m),i={rel:i,crossOrigin:l,href:r},u.querySelector(m)===null&&(r=u.createElement("link"),pn(r,"link",i),Wt(r),u.head.appendChild(r)))}}function L_(i){ka.D(i),Wx("dns-prefetch",i,null)}function I_(i,r){ka.C(i,r),Wx("preconnect",i,r)}function z_(i,r,l){ka.L(i,r,l);var u=el;if(u&&i&&r){var m='link[rel="preload"][as="'+zn(r)+'"]';r==="image"&&l&&l.imageSrcSet?(m+='[imagesrcset="'+zn(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(m+='[imagesizes="'+zn(l.imageSizes)+'"]')):m+='[href="'+zn(i)+'"]';var y=m;switch(r){case"style":y=tl(i);break;case"script":y=nl(i)}yi.has(y)||(i=g({rel:"preload",href:r==="image"&&l&&l.imageSrcSet?void 0:i,as:r},l),yi.set(y,i),u.querySelector(m)!==null||r==="style"&&u.querySelector(Io(y))||r==="script"&&u.querySelector(zo(y))||(r=u.createElement("link"),pn(r,"link",i),Wt(r),u.head.appendChild(r)))}}function B_(i,r){ka.m(i,r);var l=el;if(l&&i){var u=r&&typeof r.as=="string"?r.as:"script",m='link[rel="modulepreload"][as="'+zn(u)+'"][href="'+zn(i)+'"]',y=m;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":y=nl(i)}if(!yi.has(y)&&(i=g({rel:"modulepreload",href:i},r),yi.set(y,i),l.querySelector(m)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(zo(y)))return}u=l.createElement("link"),pn(u,"link",i),Wt(u),l.head.appendChild(u)}}}function P_(i,r,l){ka.S(i,r,l);var u=el;if(u&&i){var m=La(u).hoistableStyles,y=tl(i);r=r||"default";var k=m.get(y);if(!k){var N={loading:0,preload:null};if(k=u.querySelector(Io(y)))N.loading=5;else{i=g({rel:"stylesheet",href:i,"data-precedence":r},l),(l=yi.get(y))&&Xh(i,l);var L=k=u.createElement("link");Wt(L),pn(L,"link",i),L._p=new Promise(function(G,ie){L.onload=G,L.onerror=ie}),L.addEventListener("load",function(){N.loading|=1}),L.addEventListener("error",function(){N.loading|=2}),N.loading|=4,Ru(k,r,u)}k={type:"stylesheet",instance:k,count:1,state:N},m.set(y,k)}}}function U_(i,r){ka.X(i,r);var l=el;if(l&&i){var u=La(l).hoistableScripts,m=nl(i),y=u.get(m);y||(y=l.querySelector(zo(m)),y||(i=g({src:i,async:!0},r),(r=yi.get(m))&&Zh(i,r),y=l.createElement("script"),Wt(y),pn(y,"link",i),l.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},u.set(m,y))}}function F_(i,r){ka.M(i,r);var l=el;if(l&&i){var u=La(l).hoistableScripts,m=nl(i),y=u.get(m);y||(y=l.querySelector(zo(m)),y||(i=g({src:i,async:!0,type:"module"},r),(r=yi.get(m))&&Zh(i,r),y=l.createElement("script"),Wt(y),pn(y,"link",i),l.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},u.set(m,y))}}function Xx(i,r,l,u){var m=(m=Y.current)?Mu(m):null;if(!m)throw Error(a(446));switch(i){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(r=tl(l.href),l=La(m).hoistableStyles,u=l.get(r),u||(u={type:"style",instance:null,count:0,state:null},l.set(r,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){i=tl(l.href);var y=La(m).hoistableStyles,k=y.get(i);if(k||(m=m.ownerDocument||m,k={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},y.set(i,k),(y=m.querySelector(Io(i)))&&!y._p&&(k.instance=y,k.state.loading=5),yi.has(i)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},yi.set(i,l),y||q_(m,i,l,k.state))),r&&u===null)throw Error(a(528,""));return k}if(r&&u!==null)throw Error(a(529,""));return null;case"script":return r=l.async,l=l.src,typeof l=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=nl(l),l=La(m).hoistableScripts,u=l.get(r),u||(u={type:"script",instance:null,count:0,state:null},l.set(r,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,i))}}function tl(i){return'href="'+zn(i)+'"'}function Io(i){return'link[rel="stylesheet"]['+i+"]"}function Zx(i){return g({},i,{"data-precedence":i.precedence,precedence:null})}function q_(i,r,l,u){i.querySelector('link[rel="preload"][as="style"]['+r+"]")?u.loading=1:(r=i.createElement("link"),u.preload=r,r.addEventListener("load",function(){return u.loading|=1}),r.addEventListener("error",function(){return u.loading|=2}),pn(r,"link",l),Wt(r),i.head.appendChild(r))}function nl(i){return'[src="'+zn(i)+'"]'}function zo(i){return"script[async]"+i}function Jx(i,r,l){if(r.count++,r.instance===null)switch(r.type){case"style":var u=i.querySelector('style[data-href~="'+zn(l.href)+'"]');if(u)return r.instance=u,Wt(u),u;var m=g({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return u=(i.ownerDocument||i).createElement("style"),Wt(u),pn(u,"style",m),Ru(u,l.precedence,i),r.instance=u;case"stylesheet":m=tl(l.href);var y=i.querySelector(Io(m));if(y)return r.state.loading|=4,r.instance=y,Wt(y),y;u=Zx(l),(m=yi.get(m))&&Xh(u,m),y=(i.ownerDocument||i).createElement("link"),Wt(y);var k=y;return k._p=new Promise(function(N,L){k.onload=N,k.onerror=L}),pn(y,"link",u),r.state.loading|=4,Ru(y,l.precedence,i),r.instance=y;case"script":return y=nl(l.src),(m=i.querySelector(zo(y)))?(r.instance=m,Wt(m),m):(u=l,(m=yi.get(y))&&(u=g({},l),Zh(u,m)),i=i.ownerDocument||i,m=i.createElement("script"),Wt(m),pn(m,"link",u),i.head.appendChild(m),r.instance=m);case"void":return null;default:throw Error(a(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(u=r.instance,r.state.loading|=4,Ru(u,l.precedence,i));return r.instance}function Ru(i,r,l){for(var u=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),m=u.length?u[u.length-1]:null,y=m,k=0;k<u.length;k++){var N=u[k];if(N.dataset.precedence===r)y=N;else if(y!==m)break}y?y.parentNode.insertBefore(i,y.nextSibling):(r=l.nodeType===9?l.head:l,r.insertBefore(i,r.firstChild))}function Xh(i,r){i.crossOrigin==null&&(i.crossOrigin=r.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=r.referrerPolicy),i.title==null&&(i.title=r.title)}function Zh(i,r){i.crossOrigin==null&&(i.crossOrigin=r.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=r.referrerPolicy),i.integrity==null&&(i.integrity=r.integrity)}var Lu=null;function ev(i,r,l){if(Lu===null){var u=new Map,m=Lu=new Map;m.set(l,u)}else m=Lu,u=m.get(l),u||(u=new Map,m.set(l,u));if(u.has(i))return u;for(u.set(i,null),l=l.getElementsByTagName(i),m=0;m<l.length;m++){var y=l[m];if(!(y[Dr]||y[Gt]||i==="link"&&y.getAttribute("rel")==="stylesheet")&&y.namespaceURI!=="http://www.w3.org/2000/svg"){var k=y.getAttribute(r)||"";k=i+k;var N=u.get(k);N?N.push(y):u.set(k,[y])}}return u}function tv(i,r,l){i=i.ownerDocument||i,i.head.insertBefore(l,r==="title"?i.querySelector("head > title"):null)}function $_(i,r,l){if(l===1||r.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;switch(r.rel){case"stylesheet":return i=r.disabled,typeof r.precedence=="string"&&i==null;default:return!0}case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function nv(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function H_(i,r,l,u){if(l.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var m=tl(u.href),y=r.querySelector(Io(m));if(y){r=y._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(i.count++,i=Iu.bind(i),r.then(i,i)),l.state.loading|=4,l.instance=y,Wt(y);return}y=r.ownerDocument||r,u=Zx(u),(m=yi.get(m))&&Xh(u,m),y=y.createElement("link"),Wt(y);var k=y;k._p=new Promise(function(N,L){k.onload=N,k.onerror=L}),pn(y,"link",u),l.instance=y}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(l,r),(r=l.state.preload)&&(l.state.loading&3)===0&&(i.count++,l=Iu.bind(i),r.addEventListener("load",l),r.addEventListener("error",l))}}var Jh=0;function K_(i,r){return i.stylesheets&&i.count===0&&Bu(i,i.stylesheets),0<i.count||0<i.imgCount?function(l){var u=setTimeout(function(){if(i.stylesheets&&Bu(i,i.stylesheets),i.unsuspend){var y=i.unsuspend;i.unsuspend=null,y()}},6e4+r);0<i.imgBytes&&Jh===0&&(Jh=62500*__());var m=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&Bu(i,i.stylesheets),i.unsuspend)){var y=i.unsuspend;i.unsuspend=null,y()}},(i.imgBytes>Jh?50:800)+r);return i.unsuspend=l,function(){i.unsuspend=null,clearTimeout(u),clearTimeout(m)}}:null}function Iu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Bu(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var zu=null;function Bu(i,r){i.stylesheets=null,i.unsuspend!==null&&(i.count++,zu=new Map,r.forEach(G_,i),zu=null,Iu.call(i))}function G_(i,r){if(!(r.state.loading&4)){var l=zu.get(i);if(l)var u=l.get(null);else{l=new Map,zu.set(i,l);for(var m=i.querySelectorAll("link[data-precedence],style[data-precedence]"),y=0;y<m.length;y++){var k=m[y];(k.nodeName==="LINK"||k.getAttribute("media")!=="not all")&&(l.set(k.dataset.precedence,k),u=k)}u&&l.set(null,u)}m=r.instance,k=m.getAttribute("data-precedence"),y=l.get(k)||u,y===u&&l.set(null,m),l.set(k,m),this.count++,u=Iu.bind(this),m.addEventListener("load",u),m.addEventListener("error",u),y?y.parentNode.insertBefore(m,y.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(m,i.firstChild)),r.state.loading|=4}}var Bo={$$typeof:T,Provider:null,Consumer:null,_currentValue:de,_currentValue2:de,_threadCount:0};function Q_(i,r,l,u,m,y,k,N,L){this.tag=1,this.containerInfo=i,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=Ct(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ct(0),this.hiddenUpdates=Ct(null),this.identifierPrefix=u,this.onUncaughtError=m,this.onCaughtError=y,this.onRecoverableError=k,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=L,this.incompleteTransitions=new Map}function iv(i,r,l,u,m,y,k,N,L,G,ie,oe){return i=new Q_(i,r,l,k,L,G,ie,oe,N),r=1,y===!0&&(r|=24),y=Zn(3,null,null,r),i.current=y,y.stateNode=i,r=Df(),r.refCount++,i.pooledCache=r,r.refCount++,y.memoizedState={element:u,isDehydrated:l,cache:r},If(y),i}function av(i){return i?(i=Ms,i):Ms}function rv(i,r,l,u,m,y){m=av(m),u.context===null?u.context=m:u.pendingContext=m,u=Ha(r),u.payload={element:l},y=y===void 0?null:y,y!==null&&(u.callback=y),l=Ka(i,u,r),l!==null&&($n(l,i,r),go(l,i,r))}function sv(i,r){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var l=i.retryLane;i.retryLane=l!==0&&l<r?l:r}}function ep(i,r){sv(i,r),(i=i.alternate)&&sv(i,r)}function lv(i){if(i.tag===13||i.tag===31){var r=Br(i,67108864);r!==null&&$n(r,i,67108864),ep(i,67108864)}}function ov(i){if(i.tag===13||i.tag===31){var r=ii();r=Dt(r);var l=Br(i,r);l!==null&&$n(l,i,r),ep(i,r)}}var Pu=!0;function Y_(i,r,l,u){var m=$.T;$.T=null;var y=ce.p;try{ce.p=2,tp(i,r,l,u)}finally{ce.p=y,$.T=m}}function V_(i,r,l,u){var m=$.T;$.T=null;var y=ce.p;try{ce.p=8,tp(i,r,l,u)}finally{ce.p=y,$.T=m}}function tp(i,r,l,u){if(Pu){var m=np(u);if(m===null)Fh(i,r,u,Uu,l),uv(i,u);else if(X_(m,i,r,l,u))u.stopPropagation();else if(uv(i,u),r&4&&-1<W_.indexOf(i)){for(;m!==null;){var y=aa(m);if(y!==null)switch(y.tag){case 3:if(y=y.stateNode,y.current.memoizedState.isDehydrated){var k=Ln(y.pendingLanes);if(k!==0){var N=y;for(N.pendingLanes|=2,N.entangledLanes|=2;k;){var L=1<<31-dt(k);N.entanglements[1]|=L,k&=~L}Qi(y),(ct&6)===0&&(ku=zt()+500,Do(0))}}break;case 31:case 13:N=Br(y,2),N!==null&&$n(N,y,2),Su(),ep(y,2)}if(y=np(u),y===null&&Fh(i,r,u,Uu,l),y===m)break;m=y}m!==null&&u.stopPropagation()}else Fh(i,r,u,null,l)}}function np(i){return i=qe(i),ip(i)}var Uu=null;function ip(i){if(Uu=null,i=Cn(i),i!==null){var r=o(i);if(r===null)i=null;else{var l=r.tag;if(l===13){if(i=c(r),i!==null)return i;i=null}else if(l===31){if(i=d(r),i!==null)return i;i=null}else if(l===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;i=null}else r!==i&&(i=null)}}return Uu=i,null}function cv(i){switch(i){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(vs()){case ne:return 2;case me:return 8;case Me:case Qe:return 32;case st:return 268435456;default:return 32}default:return 32}}var ap=!1,nr=null,ir=null,ar=null,Po=new Map,Uo=new Map,rr=[],W_="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 uv(i,r){switch(i){case"focusin":case"focusout":nr=null;break;case"dragenter":case"dragleave":ir=null;break;case"mouseover":case"mouseout":ar=null;break;case"pointerover":case"pointerout":Po.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":Uo.delete(r.pointerId)}}function Fo(i,r,l,u,m,y){return i===null||i.nativeEvent!==y?(i={blockedOn:r,domEventName:l,eventSystemFlags:u,nativeEvent:y,targetContainers:[m]},r!==null&&(r=aa(r),r!==null&&lv(r)),i):(i.eventSystemFlags|=u,r=i.targetContainers,m!==null&&r.indexOf(m)===-1&&r.push(m),i)}function X_(i,r,l,u,m){switch(r){case"focusin":return nr=Fo(nr,i,r,l,u,m),!0;case"dragenter":return ir=Fo(ir,i,r,l,u,m),!0;case"mouseover":return ar=Fo(ar,i,r,l,u,m),!0;case"pointerover":var y=m.pointerId;return Po.set(y,Fo(Po.get(y)||null,i,r,l,u,m)),!0;case"gotpointercapture":return y=m.pointerId,Uo.set(y,Fo(Uo.get(y)||null,i,r,l,u,m)),!0}return!1}function dv(i){var r=Cn(i.target);if(r!==null){var l=o(r);if(l!==null){if(r=l.tag,r===13){if(r=c(l),r!==null){i.blockedOn=r,Es(i.priority,function(){ov(l)});return}}else if(r===31){if(r=d(l),r!==null){i.blockedOn=r,Es(i.priority,function(){ov(l)});return}}else if(r===3&&l.stateNode.current.memoizedState.isDehydrated){i.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}i.blockedOn=null}function Fu(i){if(i.blockedOn!==null)return!1;for(var r=i.targetContainers;0<r.length;){var l=np(i.nativeEvent);if(l===null){l=i.nativeEvent;var u=new l.constructor(l.type,l);Ne=u,l.target.dispatchEvent(u),Ne=null}else return r=aa(l),r!==null&&lv(r),i.blockedOn=l,!1;r.shift()}return!0}function fv(i,r,l){Fu(i)&&l.delete(r)}function Z_(){ap=!1,nr!==null&&Fu(nr)&&(nr=null),ir!==null&&Fu(ir)&&(ir=null),ar!==null&&Fu(ar)&&(ar=null),Po.forEach(fv),Uo.forEach(fv)}function qu(i,r){i.blockedOn===r&&(i.blockedOn=null,ap||(ap=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Z_)))}var $u=null;function hv(i){$u!==i&&($u=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){$u===i&&($u=null);for(var r=0;r<i.length;r+=3){var l=i[r],u=i[r+1],m=i[r+2];if(typeof u!="function"){if(ip(u||l)===null)continue;break}var y=aa(l);y!==null&&(i.splice(r,3),r-=3,nh(y,{pending:!0,data:m,method:l.method,action:u},u,m))}}))}function il(i){function r(L){return qu(L,i)}nr!==null&&qu(nr,i),ir!==null&&qu(ir,i),ar!==null&&qu(ar,i),Po.forEach(r),Uo.forEach(r);for(var l=0;l<rr.length;l++){var u=rr[l];u.blockedOn===i&&(u.blockedOn=null)}for(;0<rr.length&&(l=rr[0],l.blockedOn===null);)dv(l),l.blockedOn===null&&rr.shift();if(l=(i.ownerDocument||i).$$reactFormReplay,l!=null)for(u=0;u<l.length;u+=3){var m=l[u],y=l[u+1],k=m[bn]||null;if(typeof y=="function")k||hv(l);else if(k){var N=null;if(y&&y.hasAttribute("formAction")){if(m=y,k=y[bn]||null)N=k.formAction;else if(ip(m)!==null)continue}else N=k.action;typeof N=="function"?l[u+1]=N:(l.splice(u,3),u-=3),hv(l)}}}function pv(){function i(y){y.canIntercept&&y.info==="react-transition"&&y.intercept({handler:function(){return new Promise(function(k){return m=k})},focusReset:"manual",scroll:"manual"})}function r(){m!==null&&(m(),m=null),u||setTimeout(l,20)}function l(){if(!u&&!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 u=!1,m=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(l,100),function(){u=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),m!==null&&(m(),m=null)}}}function rp(i){this._internalRoot=i}Hu.prototype.render=rp.prototype.render=function(i){var r=this._internalRoot;if(r===null)throw Error(a(409));var l=r.current,u=ii();rv(l,u,i,r,null,null)},Hu.prototype.unmount=rp.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var r=i.containerInfo;rv(i.current,2,null,i,null,null),Su(),r[Ma]=null}};function Hu(i){this._internalRoot=i}Hu.prototype.unstable_scheduleHydration=function(i){if(i){var r=ks();i={blockedOn:null,target:i,priority:r};for(var l=0;l<rr.length&&r!==0&&r<rr[l].priority;l++);rr.splice(l,0,i),l===0&&dv(i)}};var mv=t.version;if(mv!=="19.2.5")throw Error(a(527,mv,"19.2.5"));ce.findDOMNode=function(i){var r=i._reactInternals;if(r===void 0)throw typeof i.render=="function"?Error(a(188)):(i=Object.keys(i).join(","),Error(a(268,i)));return i=p(r),i=i!==null?b(i):null,i=i===null?null:i.stateNode,i};var J_={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:$,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ku=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ku.isDisabled&&Ku.supportsFiber)try{cn=Ku.inject(J_),Ft=Ku}catch{}}return $o.createRoot=function(i,r){if(!s(i))throw Error(a(299));var l=!1,u="",m=ky,y=Ey,k=Sy;return r!=null&&(r.unstable_strictMode===!0&&(l=!0),r.identifierPrefix!==void 0&&(u=r.identifierPrefix),r.onUncaughtError!==void 0&&(m=r.onUncaughtError),r.onCaughtError!==void 0&&(y=r.onCaughtError),r.onRecoverableError!==void 0&&(k=r.onRecoverableError)),r=iv(i,1,!1,null,null,l,u,null,m,y,k,pv),i[Ma]=r.current,Uh(i),new rp(r)},$o.hydrateRoot=function(i,r,l){if(!s(i))throw Error(a(299));var u=!1,m="",y=ky,k=Ey,N=Sy,L=null;return l!=null&&(l.unstable_strictMode===!0&&(u=!0),l.identifierPrefix!==void 0&&(m=l.identifierPrefix),l.onUncaughtError!==void 0&&(y=l.onUncaughtError),l.onCaughtError!==void 0&&(k=l.onCaughtError),l.onRecoverableError!==void 0&&(N=l.onRecoverableError),l.formState!==void 0&&(L=l.formState)),r=iv(i,1,!0,r,l??null,u,m,L,y,k,N,pv),r.context=av(null),l=r.current,u=ii(),u=Dt(u),m=Ha(u),m.callback=null,Ka(l,m,u),l=u,r.current.lanes=l,vt(r,l),Qi(r),i[Ma]=r.current,Uh(i),new Hu(r)},$o.version="19.2.5",$o}var Cv;function dN(){if(Cv)return cp.exports;Cv=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=uN(),cp.exports}var fN=dN(),Ml=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ns,fr,yl,f0,hN=(f0=class extends Ml{constructor(){super();je(this,ns);je(this,fr);je(this,yl);we(this,yl,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){I(this,fr)||this.setEventListener(I(this,yl))}onUnsubscribe(){var t;this.hasListeners()||((t=I(this,fr))==null||t.call(this),we(this,fr,void 0))}setEventListener(t){var n;we(this,yl,t),(n=I(this,fr))==null||n.call(this),we(this,fr,t(a=>{typeof a=="boolean"?this.setFocused(a):this.onFocus()}))}setFocused(t){I(this,ns)!==t&&(we(this,ns,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof I(this,ns)=="boolean"?I(this,ns):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ns=new WeakMap,fr=new WeakMap,yl=new WeakMap,f0),zm=new hN,pN={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},hr,Rm,h0,mN=(h0=class{constructor(){je(this,hr,pN);je(this,Rm,!1)}setTimeoutProvider(e){we(this,hr,e)}setTimeout(e,t){return I(this,hr).setTimeout(e,t)}clearTimeout(e){I(this,hr).clearTimeout(e)}setInterval(e,t){return I(this,hr).setInterval(e,t)}clearInterval(e){I(this,hr).clearInterval(e)}},hr=new WeakMap,Rm=new WeakMap,h0),Zr=new mN;function gN(e){setTimeout(e,0)}var bN=typeof window>"u"||"Deno"in globalThis;function On(){}function yN(e,t){return typeof e=="function"?e(t):e}function Vp(e){return typeof e=="number"&&e>=0&&e!==1/0}function E0(e,t){return Math.max(e+(t||0)-Date.now(),0)}function wr(e,t){return typeof e=="function"?e(t):e}function vi(e,t){return typeof e=="function"?e(t):e}function Tv(e,t){const{type:n="all",exact:a,fetchStatus:s,predicate:o,queryKey:c,stale:d}=e;if(c){if(a){if(t.queryHash!==Bm(c,t.options))return!1}else if(!ic(t.queryKey,c))return!1}if(n!=="all"){const h=t.isActive();if(n==="active"&&!h||n==="inactive"&&h)return!1}return!(typeof d=="boolean"&&t.isStale()!==d||s&&s!==t.state.fetchStatus||o&&!o(t))}function Av(e,t){const{exact:n,status:a,predicate:s,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(ds(t.options.mutationKey)!==ds(o))return!1}else if(!ic(t.options.mutationKey,o))return!1}return!(a&&t.state.status!==a||s&&!s(t))}function Bm(e,t){return((t==null?void 0:t.queryKeyHashFn)||ds)(e)}function ds(e){return JSON.stringify(e,(t,n)=>Wp(n)?Object.keys(n).sort().reduce((a,s)=>(a[s]=n[s],a),{}):n)}function ic(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>ic(e[n],t[n])):!1}var xN=Object.prototype.hasOwnProperty;function S0(e,t,n=0){if(e===t)return e;if(n>500)return t;const a=jv(e)&&jv(t);if(!a&&!(Wp(e)&&Wp(t)))return t;const o=(a?e:Object.keys(e)).length,c=a?t:Object.keys(t),d=c.length,h=a?new Array(d):{};let p=0;for(let b=0;b<d;b++){const g=a?b:c[b],v=e[g],x=t[g];if(v===x){h[g]=v,(a?b<o:xN.call(e,g))&&p++;continue}if(v===null||x===null||typeof v!="object"||typeof x!="object"){h[g]=x;continue}const E=S0(v,x,n+1);h[g]=E,E===v&&p++}return o===d&&p===o?e:h}function yd(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function jv(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Wp(e){if(!Ov(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Ov(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Ov(e){return Object.prototype.toString.call(e)==="[object Object]"}function vN(e){return new Promise(t=>{Zr.setTimeout(t,e)})}function Xp(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?S0(e,t):t}function wN(e,t,n=0){const a=[...e,t];return n&&a.length>n?a.slice(1):a}function kN(e,t,n=0){const a=[t,...e];return n&&a.length>n?a.slice(0,-1):a}var Pm=Symbol();function _0(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Pm?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Um(e,t){return typeof e=="function"?e(...t):!!e}function EN(e,t,n){let a=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??(s=t()),a||(a=!0,s.aborted?n():s.addEventListener("abort",n,{once:!0})),s)}),e}var ac=(()=>{let e=()=>bN;return{isServer(){return e()},setIsServer(t){e=t}}})();function Zp(){let e,t;const n=new Promise((s,o)=>{e=s,t=o});n.status="pending",n.catch(()=>{});function a(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{a({status:"fulfilled",value:s}),e(s)},n.reject=s=>{a({status:"rejected",reason:s}),t(s)},n}var SN=gN;function _N(){let e=[],t=0,n=d=>{d()},a=d=>{d()},s=SN;const o=d=>{t?e.push(d):s(()=>{n(d)})},c=()=>{const d=e;e=[],d.length&&s(()=>{a(()=>{d.forEach(h=>{n(h)})})})};return{batch:d=>{let h;t++;try{h=d()}finally{t--,t||c()}return h},batchCalls:d=>(...h)=>{o(()=>{d(...h)})},schedule:o,setNotifyFunction:d=>{n=d},setBatchNotifyFunction:d=>{a=d},setScheduler:d=>{s=d}}}var rn=_N(),xl,pr,vl,p0,NN=(p0=class extends Ml{constructor(){super();je(this,xl,!0);je(this,pr);je(this,vl);we(this,vl,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),a=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",a,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",a)}}})}onSubscribe(){I(this,pr)||this.setEventListener(I(this,vl))}onUnsubscribe(){var t;this.hasListeners()||((t=I(this,pr))==null||t.call(this),we(this,pr,void 0))}setEventListener(t){var n;we(this,vl,t),(n=I(this,pr))==null||n.call(this),we(this,pr,t(this.setOnline.bind(this)))}setOnline(t){I(this,xl)!==t&&(we(this,xl,t),this.listeners.forEach(a=>{a(t)}))}isOnline(){return I(this,xl)}},xl=new WeakMap,pr=new WeakMap,vl=new WeakMap,p0),xd=new NN;function CN(e){return Math.min(1e3*2**e,3e4)}function N0(e){return(e??"online")==="online"?xd.isOnline():!0}var Jp=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function C0(e){let t=!1,n=0,a;const s=Zp(),o=()=>s.status!=="pending",c=w=>{var S;if(!o()){const _=new Jp(w);v(_),(S=e.onCancel)==null||S.call(e,_)}},d=()=>{t=!0},h=()=>{t=!1},p=()=>zm.isFocused()&&(e.networkMode==="always"||xd.isOnline())&&e.canRun(),b=()=>N0(e.networkMode)&&e.canRun(),g=w=>{o()||(a==null||a(),s.resolve(w))},v=w=>{o()||(a==null||a(),s.reject(w))},x=()=>new Promise(w=>{var S;a=_=>{(o()||p())&&w(_)},(S=e.onPause)==null||S.call(e)}).then(()=>{var w;a=void 0,o()||(w=e.onContinue)==null||w.call(e)}),E=()=>{if(o())return;let w;const S=n===0?e.initialPromise:void 0;try{w=S??e.fn()}catch(_){w=Promise.reject(_)}Promise.resolve(w).then(g).catch(_=>{var M;if(o())return;const A=e.retry??(ac.isServer()?0:3),T=e.retryDelay??CN,D=typeof T=="function"?T(n,_):T,B=A===!0||typeof A=="number"&&n<A||typeof A=="function"&&A(n,_);if(t||!B){v(_);return}n++,(M=e.onFail)==null||M.call(e,n,_),vN(D).then(()=>p()?void 0:x()).then(()=>{t?v(_):E()})})};return{promise:s,status:()=>s.status,cancel:c,continue:()=>(a==null||a(),s),cancelRetry:d,continueRetry:h,canStart:b,start:()=>(b()?E():x().then(E),s)}}var is,m0,T0=(m0=class{constructor(){je(this,is)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Vp(this.gcTime)&&we(this,is,Zr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ac.isServer()?1/0:300*1e3))}clearGcTimeout(){I(this,is)!==void 0&&(Zr.clearTimeout(I(this,is)),we(this,is,void 0))}},is=new WeakMap,m0),as,wl,xi,rs,ln,pc,ss,ri,A0,Ea,g0,TN=(g0=class extends T0{constructor(t){super();je(this,ri);je(this,as);je(this,wl);je(this,xi);je(this,rs);je(this,ln);je(this,pc);je(this,ss);we(this,ss,!1),we(this,pc,t.defaultOptions),this.setOptions(t.options),this.observers=[],we(this,rs,t.client),we(this,xi,I(this,rs).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,we(this,as,Mv(this.options)),this.state=t.state??I(this,as),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=I(this,ln))==null?void 0:t.promise}setOptions(t){if(this.options={...I(this,pc),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=Mv(this.options);n.data!==void 0&&(this.setState(Dv(n.data,n.dataUpdatedAt)),we(this,as,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&I(this,xi).remove(this)}setData(t,n){const a=Xp(this.state.data,t,this.options);return Ke(this,ri,Ea).call(this,{data:a,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),a}setState(t,n){Ke(this,ri,Ea).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var a,s;const n=(a=I(this,ln))==null?void 0:a.promise;return(s=I(this,ln))==null||s.cancel(t),n?n.then(On).catch(On):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return I(this,as)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>vi(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Pm||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>wr(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!E0(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(a=>a.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=I(this,ln))==null||n.continue()}onOnline(){var n;const t=this.observers.find(a=>a.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=I(this,ln))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),I(this,xi).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(I(this,ln)&&(I(this,ss)||Ke(this,ri,A0).call(this)?I(this,ln).cancel({revert:!0}):I(this,ln).cancelRetry()),this.scheduleGc()),I(this,xi).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ke(this,ri,Ea).call(this,{type:"invalidate"})}async fetch(t,n){var h,p,b,g,v,x,E,w,S,_,A,T;if(this.state.fetchStatus!=="idle"&&((h=I(this,ln))==null?void 0:h.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(I(this,ln))return I(this,ln).continueRetry(),I(this,ln).promise}if(t&&this.setOptions(t),!this.options.queryFn){const D=this.observers.find(B=>B.options.queryFn);D&&this.setOptions(D.options)}const a=new AbortController,s=D=>{Object.defineProperty(D,"signal",{enumerable:!0,get:()=>(we(this,ss,!0),a.signal)})},o=()=>{const D=_0(this.options,n),M=(()=>{const q={client:I(this,rs),queryKey:this.queryKey,meta:this.meta};return s(q),q})();return we(this,ss,!1),this.options.persister?this.options.persister(D,M,this):D(M)},d=(()=>{const D={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:I(this,rs),state:this.state,fetchFn:o};return s(D),D})();(p=this.options.behavior)==null||p.onFetch(d,this),we(this,wl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((b=d.fetchOptions)==null?void 0:b.meta))&&Ke(this,ri,Ea).call(this,{type:"fetch",meta:(g=d.fetchOptions)==null?void 0:g.meta}),we(this,ln,C0({initialPromise:n==null?void 0:n.initialPromise,fn:d.fetchFn,onCancel:D=>{D instanceof Jp&&D.revert&&this.setState({...I(this,wl),fetchStatus:"idle"}),a.abort()},onFail:(D,B)=>{Ke(this,ri,Ea).call(this,{type:"failed",failureCount:D,error:B})},onPause:()=>{Ke(this,ri,Ea).call(this,{type:"pause"})},onContinue:()=>{Ke(this,ri,Ea).call(this,{type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode,canRun:()=>!0}));try{const D=await I(this,ln).start();if(D===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(D),(x=(v=I(this,xi).config).onSuccess)==null||x.call(v,D,this),(w=(E=I(this,xi).config).onSettled)==null||w.call(E,D,this.state.error,this),D}catch(D){if(D instanceof Jp){if(D.silent)return I(this,ln).promise;if(D.revert){if(this.state.data===void 0)throw D;return this.state.data}}throw Ke(this,ri,Ea).call(this,{type:"error",error:D}),(_=(S=I(this,xi).config).onError)==null||_.call(S,D,this),(T=(A=I(this,xi).config).onSettled)==null||T.call(A,this.state.data,D,this),D}finally{this.scheduleGc()}}},as=new WeakMap,wl=new WeakMap,xi=new WeakMap,rs=new WeakMap,ln=new WeakMap,pc=new WeakMap,ss=new WeakMap,ri=new WeakSet,A0=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Ea=function(t){const n=a=>{switch(t.type){case"failed":return{...a,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...a,fetchStatus:"paused"};case"continue":return{...a,fetchStatus:"fetching"};case"fetch":return{...a,...j0(a.data,this.options),fetchMeta:t.meta??null};case"success":const s={...a,...Dv(t.data,t.dataUpdatedAt),dataUpdateCount:a.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return we(this,wl,t.manual?s:void 0),s;case"error":const o=t.error;return{...a,error:o,errorUpdateCount:a.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:a.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...a,isInvalidated:!0};case"setState":return{...a,...t.state}}};this.state=n(this.state),rn.batch(()=>{this.observers.forEach(a=>{a.onQueryUpdate()}),I(this,xi).notify({query:this,type:"updated",action:t})})},g0);function j0(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:N0(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Dv(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Mv(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,a=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Kn,it,mc,An,ls,kl,Sa,mr,gc,El,Sl,os,cs,gr,_l,ut,Xo,em,tm,nm,im,am,rm,sm,O0,b0,AN=(b0=class extends Ml{constructor(t,n){super();je(this,ut);je(this,Kn);je(this,it);je(this,mc);je(this,An);je(this,ls);je(this,kl);je(this,Sa);je(this,mr);je(this,gc);je(this,El);je(this,Sl);je(this,os);je(this,cs);je(this,gr);je(this,_l,new Set);this.options=n,we(this,Kn,t),we(this,mr,null),we(this,Sa,Zp()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(I(this,it).addObserver(this),Rv(I(this,it),this.options)?Ke(this,ut,Xo).call(this):this.updateResult(),Ke(this,ut,im).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return lm(I(this,it),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return lm(I(this,it),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ke(this,ut,am).call(this),Ke(this,ut,rm).call(this),I(this,it).removeObserver(this)}setOptions(t){const n=this.options,a=I(this,it);if(this.options=I(this,Kn).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof vi(this.options.enabled,I(this,it))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ke(this,ut,sm).call(this),I(this,it).setOptions(this.options),n._defaulted&&!yd(this.options,n)&&I(this,Kn).getQueryCache().notify({type:"observerOptionsUpdated",query:I(this,it),observer:this});const s=this.hasListeners();s&&Lv(I(this,it),a,this.options,n)&&Ke(this,ut,Xo).call(this),this.updateResult(),s&&(I(this,it)!==a||vi(this.options.enabled,I(this,it))!==vi(n.enabled,I(this,it))||wr(this.options.staleTime,I(this,it))!==wr(n.staleTime,I(this,it)))&&Ke(this,ut,em).call(this);const o=Ke(this,ut,tm).call(this);s&&(I(this,it)!==a||vi(this.options.enabled,I(this,it))!==vi(n.enabled,I(this,it))||o!==I(this,gr))&&Ke(this,ut,nm).call(this,o)}getOptimisticResult(t){const n=I(this,Kn).getQueryCache().build(I(this,Kn),t),a=this.createResult(n,t);return ON(this,a)&&(we(this,An,a),we(this,kl,this.options),we(this,ls,I(this,it).state)),a}getCurrentResult(){return I(this,An)}trackResult(t,n){return new Proxy(t,{get:(a,s)=>(this.trackProp(s),n==null||n(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&I(this,Sa).status==="pending"&&I(this,Sa).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(a,s))})}trackProp(t){I(this,_l).add(t)}getCurrentQuery(){return I(this,it)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=I(this,Kn).defaultQueryOptions(t),a=I(this,Kn).getQueryCache().build(I(this,Kn),n);return a.fetch().then(()=>this.createResult(a,n))}fetch(t){return Ke(this,ut,Xo).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),I(this,An)))}createResult(t,n){var ee;const a=I(this,it),s=this.options,o=I(this,An),c=I(this,ls),d=I(this,kl),p=t!==a?t.state:I(this,mc),{state:b}=t;let g={...b},v=!1,x;if(n._optimisticResults){const P=this.hasListeners(),X=!P&&Rv(t,n),J=P&&Lv(t,a,n,s);(X||J)&&(g={...g,...j0(b.data,t.options)}),n._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:E,errorUpdatedAt:w,status:S}=g;x=g.data;let _=!1;if(n.placeholderData!==void 0&&x===void 0&&S==="pending"){let P;o!=null&&o.isPlaceholderData&&n.placeholderData===(d==null?void 0:d.placeholderData)?(P=o.data,_=!0):P=typeof n.placeholderData=="function"?n.placeholderData((ee=I(this,Sl))==null?void 0:ee.state.data,I(this,Sl)):n.placeholderData,P!==void 0&&(S="success",x=Xp(o==null?void 0:o.data,P,n),v=!0)}if(n.select&&x!==void 0&&!_)if(o&&x===(c==null?void 0:c.data)&&n.select===I(this,gc))x=I(this,El);else try{we(this,gc,n.select),x=n.select(x),x=Xp(o==null?void 0:o.data,x,n),we(this,El,x),we(this,mr,null)}catch(P){we(this,mr,P)}I(this,mr)&&(E=I(this,mr),x=I(this,El),w=Date.now(),S="error");const A=g.fetchStatus==="fetching",T=S==="pending",D=S==="error",B=T&&A,M=x!==void 0,F={status:S,fetchStatus:g.fetchStatus,isPending:T,isSuccess:S==="success",isError:D,isInitialLoading:B,isLoading:B,data:x,dataUpdatedAt:g.dataUpdatedAt,error:E,errorUpdatedAt:w,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:g.dataUpdateCount>p.dataUpdateCount||g.errorUpdateCount>p.errorUpdateCount,isFetching:A,isRefetching:A&&!T,isLoadingError:D&&!M,isPaused:g.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:D&&M,isStale:Fm(t,n),refetch:this.refetch,promise:I(this,Sa),isEnabled:vi(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const P=F.data!==void 0,X=F.status==="error"&&!P,J=te=>{X?te.reject(F.error):P&&te.resolve(F.data)},pe=()=>{const te=we(this,Sa,F.promise=Zp());J(te)},ue=I(this,Sa);switch(ue.status){case"pending":t.queryHash===a.queryHash&&J(ue);break;case"fulfilled":(X||F.data!==ue.value)&&pe();break;case"rejected":(!X||F.error!==ue.reason)&&pe();break}}return F}updateResult(){const t=I(this,An),n=this.createResult(I(this,it),this.options);if(we(this,ls,I(this,it).state),we(this,kl,this.options),I(this,ls).data!==void 0&&we(this,Sl,I(this,it)),yd(n,t))return;we(this,An,n);const a=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,o=typeof s=="function"?s():s;if(o==="all"||!o&&!I(this,_l).size)return!0;const c=new Set(o??I(this,_l));return this.options.throwOnError&&c.add("error"),Object.keys(I(this,An)).some(d=>{const h=d;return I(this,An)[h]!==t[h]&&c.has(h)})};Ke(this,ut,O0).call(this,{listeners:a()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ke(this,ut,im).call(this)}},Kn=new WeakMap,it=new WeakMap,mc=new WeakMap,An=new WeakMap,ls=new WeakMap,kl=new WeakMap,Sa=new WeakMap,mr=new WeakMap,gc=new WeakMap,El=new WeakMap,Sl=new WeakMap,os=new WeakMap,cs=new WeakMap,gr=new WeakMap,_l=new WeakMap,ut=new WeakSet,Xo=function(t){Ke(this,ut,sm).call(this);let n=I(this,it).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(On)),n},em=function(){Ke(this,ut,am).call(this);const t=wr(this.options.staleTime,I(this,it));if(ac.isServer()||I(this,An).isStale||!Vp(t))return;const a=E0(I(this,An).dataUpdatedAt,t)+1;we(this,os,Zr.setTimeout(()=>{I(this,An).isStale||this.updateResult()},a))},tm=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(I(this,it)):this.options.refetchInterval)??!1},nm=function(t){Ke(this,ut,rm).call(this),we(this,gr,t),!(ac.isServer()||vi(this.options.enabled,I(this,it))===!1||!Vp(I(this,gr))||I(this,gr)===0)&&we(this,cs,Zr.setInterval(()=>{(this.options.refetchIntervalInBackground||zm.isFocused())&&Ke(this,ut,Xo).call(this)},I(this,gr)))},im=function(){Ke(this,ut,em).call(this),Ke(this,ut,nm).call(this,Ke(this,ut,tm).call(this))},am=function(){I(this,os)!==void 0&&(Zr.clearTimeout(I(this,os)),we(this,os,void 0))},rm=function(){I(this,cs)!==void 0&&(Zr.clearInterval(I(this,cs)),we(this,cs,void 0))},sm=function(){const t=I(this,Kn).getQueryCache().build(I(this,Kn),this.options);if(t===I(this,it))return;const n=I(this,it);we(this,it,t),we(this,mc,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},O0=function(t){rn.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(I(this,An))}),I(this,Kn).getQueryCache().notify({query:I(this,it),type:"observerResultsUpdated"})})},b0);function jN(e,t){return vi(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Rv(e,t){return jN(e,t)||e.state.data!==void 0&&lm(e,t,t.refetchOnMount)}function lm(e,t,n){if(vi(t.enabled,e)!==!1&&wr(t.staleTime,e)!=="static"){const a=typeof n=="function"?n(e):n;return a==="always"||a!==!1&&Fm(e,t)}return!1}function Lv(e,t,n,a){return(e!==t||vi(a.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Fm(e,n)}function Fm(e,t){return vi(t.enabled,e)!==!1&&e.isStaleByTime(wr(t.staleTime,e))}function ON(e,t){return!yd(e.getCurrentResult(),t)}function Iv(e){return{onFetch:(t,n)=>{var b,g,v,x,E;const a=t.options,s=(v=(g=(b=t.fetchOptions)==null?void 0:b.meta)==null?void 0:g.fetchMore)==null?void 0:v.direction,o=((x=t.state.data)==null?void 0:x.pages)||[],c=((E=t.state.data)==null?void 0:E.pageParams)||[];let d={pages:[],pageParams:[]},h=0;const p=async()=>{let w=!1;const S=T=>{EN(T,()=>t.signal,()=>w=!0)},_=_0(t.options,t.fetchOptions),A=async(T,D,B)=>{if(w)return Promise.reject();if(D==null&&T.pages.length)return Promise.resolve(T);const q=(()=>{const X={client:t.client,queryKey:t.queryKey,pageParam:D,direction:B?"backward":"forward",meta:t.options.meta};return S(X),X})(),F=await _(q),{maxPages:ee}=t.options,P=B?kN:wN;return{pages:P(T.pages,F,ee),pageParams:P(T.pageParams,D,ee)}};if(s&&o.length){const T=s==="backward",D=T?DN:zv,B={pages:o,pageParams:c},M=D(a,B);d=await A(B,M,T)}else{const T=e??o.length;do{const D=h===0?c[0]??a.initialPageParam:zv(a,d);if(h>0&&D==null)break;d=await A(d,D),h++}while(h<T)}return d};t.options.persister?t.fetchFn=()=>{var w,S;return(S=(w=t.options).persister)==null?void 0:S.call(w,p,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=p}}}function zv(e,{pages:t,pageParams:n}){const a=t.length-1;return t.length>0?e.getNextPageParam(t[a],t,n[a],n):void 0}function DN(e,{pages:t,pageParams:n}){var a;return t.length>0?(a=e.getPreviousPageParam)==null?void 0:a.call(e,t[0],t,n[0],n):void 0}var bc,Wi,vn,us,Xi,ur,y0,MN=(y0=class extends T0{constructor(t){super();je(this,Xi);je(this,bc);je(this,Wi);je(this,vn);je(this,us);we(this,bc,t.client),this.mutationId=t.mutationId,we(this,vn,t.mutationCache),we(this,Wi,[]),this.state=t.state||D0(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){I(this,Wi).includes(t)||(I(this,Wi).push(t),this.clearGcTimeout(),I(this,vn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){we(this,Wi,I(this,Wi).filter(n=>n!==t)),this.scheduleGc(),I(this,vn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){I(this,Wi).length||(this.state.status==="pending"?this.scheduleGc():I(this,vn).remove(this))}continue(){var t;return((t=I(this,us))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var c,d,h,p,b,g,v,x,E,w,S,_,A,T,D,B,M,q;const n=()=>{Ke(this,Xi,ur).call(this,{type:"continue"})},a={client:I(this,bc),meta:this.options.meta,mutationKey:this.options.mutationKey};we(this,us,C0({fn:()=>this.options.mutationFn?this.options.mutationFn(t,a):Promise.reject(new Error("No mutationFn found")),onFail:(F,ee)=>{Ke(this,Xi,ur).call(this,{type:"failed",failureCount:F,error:ee})},onPause:()=>{Ke(this,Xi,ur).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>I(this,vn).canRun(this)}));const s=this.state.status==="pending",o=!I(this,us).canStart();try{if(s)n();else{Ke(this,Xi,ur).call(this,{type:"pending",variables:t,isPaused:o}),I(this,vn).config.onMutate&&await I(this,vn).config.onMutate(t,this,a);const ee=await((d=(c=this.options).onMutate)==null?void 0:d.call(c,t,a));ee!==this.state.context&&Ke(this,Xi,ur).call(this,{type:"pending",context:ee,variables:t,isPaused:o})}const F=await I(this,us).start();return await((p=(h=I(this,vn).config).onSuccess)==null?void 0:p.call(h,F,t,this.state.context,this,a)),await((g=(b=this.options).onSuccess)==null?void 0:g.call(b,F,t,this.state.context,a)),await((x=(v=I(this,vn).config).onSettled)==null?void 0:x.call(v,F,null,this.state.variables,this.state.context,this,a)),await((w=(E=this.options).onSettled)==null?void 0:w.call(E,F,null,t,this.state.context,a)),Ke(this,Xi,ur).call(this,{type:"success",data:F}),F}catch(F){try{await((_=(S=I(this,vn).config).onError)==null?void 0:_.call(S,F,t,this.state.context,this,a))}catch(ee){Promise.reject(ee)}try{await((T=(A=this.options).onError)==null?void 0:T.call(A,F,t,this.state.context,a))}catch(ee){Promise.reject(ee)}try{await((B=(D=I(this,vn).config).onSettled)==null?void 0:B.call(D,void 0,F,this.state.variables,this.state.context,this,a))}catch(ee){Promise.reject(ee)}try{await((q=(M=this.options).onSettled)==null?void 0:q.call(M,void 0,F,t,this.state.context,a))}catch(ee){Promise.reject(ee)}throw Ke(this,Xi,ur).call(this,{type:"error",error:F}),F}finally{I(this,vn).runNext(this)}}},bc=new WeakMap,Wi=new WeakMap,vn=new WeakMap,us=new WeakMap,Xi=new WeakSet,ur=function(t){const n=a=>{switch(t.type){case"failed":return{...a,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...a,isPaused:!0};case"continue":return{...a,isPaused:!1};case"pending":return{...a,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...a,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...a,data:void 0,error:t.error,failureCount:a.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),rn.batch(()=>{I(this,Wi).forEach(a=>{a.onMutationUpdate(t)}),I(this,vn).notify({mutation:this,type:"updated",action:t})})},y0);function D0(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var _a,Ri,yc,x0,RN=(x0=class extends Ml{constructor(t={}){super();je(this,_a);je(this,Ri);je(this,yc);this.config=t,we(this,_a,new Set),we(this,Ri,new Map),we(this,yc,0)}build(t,n,a){const s=new MN({client:t,mutationCache:this,mutationId:++Gu(this,yc)._,options:t.defaultMutationOptions(n),state:a});return this.add(s),s}add(t){I(this,_a).add(t);const n=Qu(t);if(typeof n=="string"){const a=I(this,Ri).get(n);a?a.push(t):I(this,Ri).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(I(this,_a).delete(t)){const n=Qu(t);if(typeof n=="string"){const a=I(this,Ri).get(n);if(a)if(a.length>1){const s=a.indexOf(t);s!==-1&&a.splice(s,1)}else a[0]===t&&I(this,Ri).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Qu(t);if(typeof n=="string"){const a=I(this,Ri).get(n),s=a==null?void 0:a.find(o=>o.state.status==="pending");return!s||s===t}else return!0}runNext(t){var a;const n=Qu(t);if(typeof n=="string"){const s=(a=I(this,Ri).get(n))==null?void 0:a.find(o=>o!==t&&o.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){rn.batch(()=>{I(this,_a).forEach(t=>{this.notify({type:"removed",mutation:t})}),I(this,_a).clear(),I(this,Ri).clear()})}getAll(){return Array.from(I(this,_a))}find(t){const n={exact:!0,...t};return this.getAll().find(a=>Av(n,a))}findAll(t={}){return this.getAll().filter(n=>Av(t,n))}notify(t){rn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return rn.batch(()=>Promise.all(t.map(n=>n.continue().catch(On))))}},_a=new WeakMap,Ri=new WeakMap,yc=new WeakMap,x0);function Qu(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Na,br,Gn,Ca,ja,ud,om,v0,LN=(v0=class extends Ml{constructor(n,a){super();je(this,ja);je(this,Na);je(this,br);je(this,Gn);je(this,Ca);we(this,Na,n),this.setOptions(a),this.bindMethods(),Ke(this,ja,ud).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var s;const a=this.options;this.options=I(this,Na).defaultMutationOptions(n),yd(this.options,a)||I(this,Na).getMutationCache().notify({type:"observerOptionsUpdated",mutation:I(this,Gn),observer:this}),a!=null&&a.mutationKey&&this.options.mutationKey&&ds(a.mutationKey)!==ds(this.options.mutationKey)?this.reset():((s=I(this,Gn))==null?void 0:s.state.status)==="pending"&&I(this,Gn).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=I(this,Gn))==null||n.removeObserver(this)}onMutationUpdate(n){Ke(this,ja,ud).call(this),Ke(this,ja,om).call(this,n)}getCurrentResult(){return I(this,br)}reset(){var n;(n=I(this,Gn))==null||n.removeObserver(this),we(this,Gn,void 0),Ke(this,ja,ud).call(this),Ke(this,ja,om).call(this)}mutate(n,a){var s;return we(this,Ca,a),(s=I(this,Gn))==null||s.removeObserver(this),we(this,Gn,I(this,Na).getMutationCache().build(I(this,Na),this.options)),I(this,Gn).addObserver(this),I(this,Gn).execute(n)}},Na=new WeakMap,br=new WeakMap,Gn=new WeakMap,Ca=new WeakMap,ja=new WeakSet,ud=function(){var a;const n=((a=I(this,Gn))==null?void 0:a.state)??D0();we(this,br,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},om=function(n){rn.batch(()=>{var a,s,o,c,d,h,p,b;if(I(this,Ca)&&this.hasListeners()){const g=I(this,br).variables,v=I(this,br).context,x={client:I(this,Na),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(s=(a=I(this,Ca)).onSuccess)==null||s.call(a,n.data,g,v,x)}catch(E){Promise.reject(E)}try{(c=(o=I(this,Ca)).onSettled)==null||c.call(o,n.data,null,g,v,x)}catch(E){Promise.reject(E)}}else if((n==null?void 0:n.type)==="error"){try{(h=(d=I(this,Ca)).onError)==null||h.call(d,n.error,g,v,x)}catch(E){Promise.reject(E)}try{(b=(p=I(this,Ca)).onSettled)==null||b.call(p,void 0,n.error,g,v,x)}catch(E){Promise.reject(E)}}}this.listeners.forEach(g=>{g(I(this,br))})})},v0),Zi,w0,IN=(w0=class extends Ml{constructor(t={}){super();je(this,Zi);this.config=t,we(this,Zi,new Map)}build(t,n,a){const s=n.queryKey,o=n.queryHash??Bm(s,n);let c=this.get(o);return c||(c=new TN({client:t,queryKey:s,queryHash:o,options:t.defaultQueryOptions(n),state:a,defaultOptions:t.getQueryDefaults(s)}),this.add(c)),c}add(t){I(this,Zi).has(t.queryHash)||(I(this,Zi).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=I(this,Zi).get(t.queryHash);n&&(t.destroy(),n===t&&I(this,Zi).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){rn.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return I(this,Zi).get(t)}getAll(){return[...I(this,Zi).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(a=>Tv(n,a))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(a=>Tv(t,a)):n}notify(t){rn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){rn.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){rn.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Zi=new WeakMap,w0),Ht,yr,xr,Nl,Cl,vr,Tl,Al,k0,zN=(k0=class{constructor(e={}){je(this,Ht);je(this,yr);je(this,xr);je(this,Nl);je(this,Cl);je(this,vr);je(this,Tl);je(this,Al);we(this,Ht,e.queryCache||new IN),we(this,yr,e.mutationCache||new RN),we(this,xr,e.defaultOptions||{}),we(this,Nl,new Map),we(this,Cl,new Map),we(this,vr,0)}mount(){Gu(this,vr)._++,I(this,vr)===1&&(we(this,Tl,zm.subscribe(async e=>{e&&(await this.resumePausedMutations(),I(this,Ht).onFocus())})),we(this,Al,xd.subscribe(async e=>{e&&(await this.resumePausedMutations(),I(this,Ht).onOnline())})))}unmount(){var e,t;Gu(this,vr)._--,I(this,vr)===0&&((e=I(this,Tl))==null||e.call(this),we(this,Tl,void 0),(t=I(this,Al))==null||t.call(this),we(this,Al,void 0))}isFetching(e){return I(this,Ht).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return I(this,yr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=I(this,Ht).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=I(this,Ht).build(this,t),a=n.state.data;return a===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(wr(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(a))}getQueriesData(e){return I(this,Ht).findAll(e).map(({queryKey:t,state:n})=>{const a=n.data;return[t,a]})}setQueryData(e,t,n){const a=this.defaultQueryOptions({queryKey:e}),s=I(this,Ht).get(a.queryHash),o=s==null?void 0:s.state.data,c=yN(t,o);if(c!==void 0)return I(this,Ht).build(this,a).setData(c,{...n,manual:!0})}setQueriesData(e,t,n){return rn.batch(()=>I(this,Ht).findAll(e).map(({queryKey:a})=>[a,this.setQueryData(a,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=I(this,Ht).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=I(this,Ht);rn.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=I(this,Ht);return rn.batch(()=>(n.findAll(e).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},a=rn.batch(()=>I(this,Ht).findAll(e).map(s=>s.cancel(n)));return Promise.all(a).then(On).catch(On)}invalidateQueries(e,t={}){return rn.batch(()=>(I(this,Ht).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},a=rn.batch(()=>I(this,Ht).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let o=s.fetch(void 0,n);return n.throwOnError||(o=o.catch(On)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(a).then(On)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=I(this,Ht).build(this,t);return n.isStaleByTime(wr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(On).catch(On)}fetchInfiniteQuery(e){return e.behavior=Iv(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(On).catch(On)}ensureInfiniteQueryData(e){return e.behavior=Iv(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return xd.isOnline()?I(this,yr).resumePausedMutations():Promise.resolve()}getQueryCache(){return I(this,Ht)}getMutationCache(){return I(this,yr)}getDefaultOptions(){return I(this,xr)}setDefaultOptions(e){we(this,xr,e)}setQueryDefaults(e,t){I(this,Nl).set(ds(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...I(this,Nl).values()],n={};return t.forEach(a=>{ic(e,a.queryKey)&&Object.assign(n,a.defaultOptions)}),n}setMutationDefaults(e,t){I(this,Cl).set(ds(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...I(this,Cl).values()],n={};return t.forEach(a=>{ic(e,a.mutationKey)&&Object.assign(n,a.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...I(this,xr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Bm(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Pm&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...I(this,xr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){I(this,Ht).clear(),I(this,yr).clear()}},Ht=new WeakMap,yr=new WeakMap,xr=new WeakMap,Nl=new WeakMap,Cl=new WeakMap,vr=new WeakMap,Tl=new WeakMap,Al=new WeakMap,k0),M0=C.createContext(void 0),En=e=>{const t=C.useContext(M0);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},BN=({client:e,children:t})=>(C.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),f.jsx(M0.Provider,{value:e,children:t})),R0=C.createContext(!1),PN=()=>C.useContext(R0);R0.Provider;function UN(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var FN=C.createContext(UN()),qN=()=>C.useContext(FN),$N=(e,t,n)=>{const a=n!=null&&n.state.error&&typeof e.throwOnError=="function"?Um(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||a)&&(t.isReset()||(e.retryOnMount=!1))},HN=e=>{C.useEffect(()=>{e.clearReset()},[e])},KN=({result:e,errorResetBoundary:t,throwOnError:n,query:a,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&a&&(s&&e.data===void 0||Um(n,[e.error,a])),GN=e=>{if(e.suspense){const n=s=>s==="static"?s:Math.max(s??1e3,1e3),a=e.staleTime;e.staleTime=typeof a=="function"?(...s)=>n(a(...s)):n(a),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},QN=(e,t)=>e.isLoading&&e.isFetching&&!t,YN=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Bv=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function VN(e,t,n){var v,x,E,w;const a=PN(),s=qN(),o=En(),c=o.defaultQueryOptions(e);(x=(v=o.getDefaultOptions().queries)==null?void 0:v._experimental_beforeQuery)==null||x.call(v,c);const d=o.getQueryCache().get(c.queryHash);c._optimisticResults=a?"isRestoring":"optimistic",GN(c),$N(c,s,d),HN(s);const h=!o.getQueryCache().get(c.queryHash),[p]=C.useState(()=>new t(o,c)),b=p.getOptimisticResult(c),g=!a&&e.subscribed!==!1;if(C.useSyncExternalStore(C.useCallback(S=>{const _=g?p.subscribe(rn.batchCalls(S)):On;return p.updateResult(),_},[p,g]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),C.useEffect(()=>{p.setOptions(c)},[c,p]),YN(c,b))throw Bv(c,p,s);if(KN({result:b,errorResetBoundary:s,throwOnError:c.throwOnError,query:d,suspense:c.suspense}))throw b.error;if((w=(E=o.getDefaultOptions().queries)==null?void 0:E._experimental_afterQuery)==null||w.call(E,c,b),c.experimental_prefetchInRender&&!ac.isServer()&&QN(b,a)){const S=h?Bv(c,p,s):d==null?void 0:d.promise;S==null||S.catch(On).finally(()=>{p.updateResult()})}return c.notifyOnChangeProps?b:p.trackResult(b)}function rt(e,t){return VN(e,AN)}function Mn(e,t){const n=En(),[a]=C.useState(()=>new LN(n,e));C.useEffect(()=>{a.setOptions(e)},[a,e]);const s=C.useSyncExternalStore(C.useCallback(c=>a.subscribe(rn.batchCalls(c)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),o=C.useCallback((c,d)=>{a.mutate(c,d).catch(On)},[a]);if(s.error&&Um(a.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:o,mutateAsync:s.mutate}}/**
50
- * react-router v7.14.2
51
- *
52
- * Copyright (c) Remix Software Inc.
53
- *
54
- * This source code is licensed under the MIT license found in the
55
- * LICENSE.md file in the root directory of this source tree.
56
- *
57
- * @license MIT
58
- */var Pv="popstate";function Uv(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function WN(e={}){function t(a,s){var p;let o=(p=s.state)==null?void 0:p.masked,{pathname:c,search:d,hash:h}=o||a.location;return cm("",{pathname:c,search:d,hash:h},s.state&&s.state.usr||null,s.state&&s.state.key||"default",o?{pathname:a.location.pathname,search:a.location.search,hash:a.location.hash}:void 0)}function n(a,s){return typeof s=="string"?s:rc(s)}return ZN(t,n,null,e)}function Rt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ei(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function XN(){return Math.random().toString(36).substring(2,10)}function Fv(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function cm(e,t,n=null,a,s){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Rl(t):t,state:n,key:t&&t.key||a||XN(),unstable_mask:s}}function rc({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Rl(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let a=e.indexOf("?");a>=0&&(t.search=e.substring(a),e=e.substring(0,a)),e&&(t.pathname=e)}return t}function ZN(e,t,n,a={}){let{window:s=document.defaultView,v5Compat:o=!1}=a,c=s.history,d="POP",h=null,p=b();p==null&&(p=0,c.replaceState({...c.state,idx:p},""));function b(){return(c.state||{idx:null}).idx}function g(){d="POP";let S=b(),_=S==null?null:S-p;p=S,h&&h({action:d,location:w.location,delta:_})}function v(S,_){d="PUSH";let A=Uv(S)?S:cm(w.location,S,_);p=b()+1;let T=Fv(A,p),D=w.createHref(A.unstable_mask||A);try{c.pushState(T,"",D)}catch(B){if(B instanceof DOMException&&B.name==="DataCloneError")throw B;s.location.assign(D)}o&&h&&h({action:d,location:w.location,delta:1})}function x(S,_){d="REPLACE";let A=Uv(S)?S:cm(w.location,S,_);p=b();let T=Fv(A,p),D=w.createHref(A.unstable_mask||A);c.replaceState(T,"",D),o&&h&&h({action:d,location:w.location,delta:0})}function E(S){return JN(S)}let w={get action(){return d},get location(){return e(s,c)},listen(S){if(h)throw new Error("A history only accepts one active listener");return s.addEventListener(Pv,g),h=S,()=>{s.removeEventListener(Pv,g),h=null}},createHref(S){return t(s,S)},createURL:E,encodeLocation(S){let _=E(S);return{pathname:_.pathname,search:_.search,hash:_.hash}},push:v,replace:x,go(S){return c.go(S)}};return w}function JN(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Rt(n,"No window.location.(origin|href) available to create URL");let a=typeof e=="string"?e:rc(e);return a=a.replace(/ $/,"%20"),!t&&a.startsWith("//")&&(a=n+a),new URL(a,n)}function L0(e,t,n="/"){return eC(e,t,n,!1)}function eC(e,t,n,a){let s=typeof t=="string"?Rl(t):t,o=Oa(s.pathname||"/",n);if(o==null)return null;let c=I0(e);tC(c);let d=null;for(let h=0;d==null&&h<c.length;++h){let p=fC(o);d=uC(c[h],p,a)}return d}function I0(e,t=[],n=[],a="",s=!1){let o=(c,d,h=s,p)=>{let b={relativePath:p===void 0?c.path||"":p,caseSensitive:c.caseSensitive===!0,childrenIndex:d,route:c};if(b.relativePath.startsWith("/")){if(!b.relativePath.startsWith(a)&&h)return;Rt(b.relativePath.startsWith(a),`Absolute route path "${b.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),b.relativePath=b.relativePath.slice(a.length)}let g=Li([a,b.relativePath]),v=n.concat(b);c.children&&c.children.length>0&&(Rt(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${g}".`),I0(c.children,t,v,g,h)),!(c.path==null&&!c.index)&&t.push({path:g,score:oC(g,c.index),routesMeta:v})};return e.forEach((c,d)=>{var h;if(c.path===""||!((h=c.path)!=null&&h.includes("?")))o(c,d);else for(let p of z0(c.path))o(c,d,!0,p)}),t}function z0(e){let t=e.split("/");if(t.length===0)return[];let[n,...a]=t,s=n.endsWith("?"),o=n.replace(/\?$/,"");if(a.length===0)return s?[o,""]:[o];let c=z0(a.join("/")),d=[];return d.push(...c.map(h=>h===""?o:[o,h].join("/"))),s&&d.push(...c),d.map(h=>e.startsWith("/")&&h===""?"/":h)}function tC(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:cC(t.routesMeta.map(a=>a.childrenIndex),n.routesMeta.map(a=>a.childrenIndex)))}var nC=/^:[\w-]+$/,iC=3,aC=2,rC=1,sC=10,lC=-2,qv=e=>e==="*";function oC(e,t){let n=e.split("/"),a=n.length;return n.some(qv)&&(a+=lC),t&&(a+=aC),n.filter(s=>!qv(s)).reduce((s,o)=>s+(nC.test(o)?iC:o===""?rC:sC),a)}function cC(e,t){return e.length===t.length&&e.slice(0,-1).every((a,s)=>a===t[s])?e[e.length-1]-t[t.length-1]:0}function uC(e,t,n=!1){let{routesMeta:a}=e,s={},o="/",c=[];for(let d=0;d<a.length;++d){let h=a[d],p=d===a.length-1,b=o==="/"?t:t.slice(o.length)||"/",g=vd({path:h.relativePath,caseSensitive:h.caseSensitive,end:p},b),v=h.route;if(!g&&p&&n&&!a[a.length-1].route.index&&(g=vd({path:h.relativePath,caseSensitive:h.caseSensitive,end:!1},b)),!g)return null;Object.assign(s,g.params),c.push({params:s,pathname:Li([o,g.pathname]),pathnameBase:gC(Li([o,g.pathnameBase])),route:v}),g.pathnameBase!=="/"&&(o=Li([o,g.pathnameBase]))}return c}function vd(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,a]=dC(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let o=s[0],c=o.replace(/(.)\/+$/,"$1"),d=s.slice(1);return{params:a.reduce((p,{paramName:b,isOptional:g},v)=>{if(b==="*"){let E=d[v]||"";c=o.slice(0,o.length-E.length).replace(/(.)\/+$/,"$1")}const x=d[v];return g&&!x?p[b]=void 0:p[b]=(x||"").replace(/%2F/g,"/"),p},{}),pathname:o,pathnameBase:c,pattern:e}}function dC(e,t=!1,n=!0){Ei(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let a=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,d,h,p,b)=>{if(a.push({paramName:d,isOptional:h!=null}),h){let g=b.charAt(p+c.length);return g&&g!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),a]}function fC(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Ei(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Oa(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,a=e.charAt(n);return a&&a!=="/"?null:e.slice(n)||"/"}var hC=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function pC(e,t="/"){let{pathname:n,search:a="",hash:s=""}=typeof e=="string"?Rl(e):e,o;return n?(n=B0(n),n.startsWith("/")?o=$v(n.substring(1),"/"):o=$v(n,t)):o=t,{pathname:o,search:bC(a),hash:yC(s)}}function $v(e,t){let n=wd(t).split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function hp(e,t,n,a){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function mC(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function qm(e){let t=mC(e);return t.map((n,a)=>a===t.length-1?n.pathname:n.pathnameBase)}function Rd(e,t,n,a=!1){let s;typeof e=="string"?s=Rl(e):(s={...e},Rt(!s.pathname||!s.pathname.includes("?"),hp("?","pathname","search",s)),Rt(!s.pathname||!s.pathname.includes("#"),hp("#","pathname","hash",s)),Rt(!s.search||!s.search.includes("#"),hp("#","search","hash",s)));let o=e===""||s.pathname==="",c=o?"/":s.pathname,d;if(c==null)d=n;else{let g=t.length-1;if(!a&&c.startsWith("..")){let v=c.split("/");for(;v[0]==="..";)v.shift(),g-=1;s.pathname=v.join("/")}d=g>=0?t[g]:"/"}let h=pC(s,d),p=c&&c!=="/"&&c.endsWith("/"),b=(o||c===".")&&n.endsWith("/");return!h.pathname.endsWith("/")&&(p||b)&&(h.pathname+="/"),h}var B0=e=>e.replace(/\/\/+/g,"/"),Li=e=>B0(e.join("/")),wd=e=>e.replace(/\/+$/,""),gC=e=>wd(e).replace(/^\/*/,"/"),bC=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,yC=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,xC=class{constructor(e,t,n,a=!1){this.status=e,this.statusText=t||"",this.internal=a,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function vC(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function wC(e){let t=e.map(n=>n.route.path).filter(Boolean);return Li(t)||"/"}var P0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function U0(e,t){let n=e;if(typeof n!="string"||!hC.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let a=n,s=!1;if(P0)try{let o=new URL(window.location.href),c=n.startsWith("//")?new URL(o.protocol+n):new URL(n),d=Oa(c.pathname,t);c.origin===o.origin&&d!=null?n=d+c.search+c.hash:s=!0}catch{Ei(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:s,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var F0=["POST","PUT","PATCH","DELETE"];new Set(F0);var kC=["GET",...F0];new Set(kC);var Ll=C.createContext(null);Ll.displayName="DataRouter";var Ld=C.createContext(null);Ld.displayName="DataRouterState";var q0=C.createContext(!1);function EC(){return C.useContext(q0)}var $0=C.createContext({isTransitioning:!1});$0.displayName="ViewTransition";var SC=C.createContext(new Map);SC.displayName="Fetchers";var _C=C.createContext(null);_C.displayName="Await";var oi=C.createContext(null);oi.displayName="Navigation";var xc=C.createContext(null);xc.displayName="Location";var Ni=C.createContext({outlet:null,matches:[],isDataRoute:!1});Ni.displayName="Route";var $m=C.createContext(null);$m.displayName="RouteError";var H0="REACT_ROUTER_ERROR",NC="REDIRECT",CC="ROUTE_ERROR_RESPONSE";function TC(e){if(e.startsWith(`${H0}:${NC}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function AC(e){if(e.startsWith(`${H0}:${CC}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new xC(t.status,t.statusText,t.data)}catch{}}function jC(e,{relative:t}={}){Rt(Il(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:a}=C.useContext(oi),{hash:s,pathname:o,search:c}=vc(e,{relative:t}),d=o;return n!=="/"&&(d=o==="/"?n:Li([n,o])),a.createHref({pathname:d,search:c,hash:s})}function Il(){return C.useContext(xc)!=null}function zi(){return Rt(Il(),"useLocation() may be used only in the context of a <Router> component."),C.useContext(xc).location}var K0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function G0(e){C.useContext(oi).static||C.useLayoutEffect(e)}function _r(){let{isDataRoute:e}=C.useContext(Ni);return e?KC():OC()}function OC(){Rt(Il(),"useNavigate() may be used only in the context of a <Router> component.");let e=C.useContext(Ll),{basename:t,navigator:n}=C.useContext(oi),{matches:a}=C.useContext(Ni),{pathname:s}=zi(),o=JSON.stringify(qm(a)),c=C.useRef(!1);return G0(()=>{c.current=!0}),C.useCallback((h,p={})=>{if(Ei(c.current,K0),!c.current)return;if(typeof h=="number"){n.go(h);return}let b=Rd(h,JSON.parse(o),s,p.relative==="path");e==null&&t!=="/"&&(b.pathname=b.pathname==="/"?t:Li([t,b.pathname])),(p.replace?n.replace:n.push)(b,p.state,p)},[t,n,o,s,e])}var DC=C.createContext(null);function MC(e){let t=C.useContext(Ni).outlet;return C.useMemo(()=>t&&C.createElement(DC.Provider,{value:e},t),[t,e])}function Q0(){let{matches:e}=C.useContext(Ni),t=e[e.length-1];return(t==null?void 0:t.params)??{}}function vc(e,{relative:t}={}){let{matches:n}=C.useContext(Ni),{pathname:a}=zi(),s=JSON.stringify(qm(n));return C.useMemo(()=>Rd(e,JSON.parse(s),a,t==="path"),[e,s,a,t])}function RC(e,t){return Y0(e,t)}function Y0(e,t,n){var S;Rt(Il(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=C.useContext(oi),{matches:s}=C.useContext(Ni),o=s[s.length-1],c=o?o.params:{},d=o?o.pathname:"/",h=o?o.pathnameBase:"/",p=o&&o.route;{let _=p&&p.path||"";W0(d,!p||_.endsWith("*")||_.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${_}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
59
-
60
- Please change the parent <Route path="${_}"> to <Route path="${_==="/"?"*":`${_}/*`}">.`)}let b=zi(),g;if(t){let _=typeof t=="string"?Rl(t):t;Rt(h==="/"||((S=_.pathname)==null?void 0:S.startsWith(h)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${h}" but pathname "${_.pathname}" was given in the \`location\` prop.`),g=_}else g=b;let v=g.pathname||"/",x=v;if(h!=="/"){let _=h.replace(/^\//,"").split("/");x="/"+v.replace(/^\//,"").split("/").slice(_.length).join("/")}let E=L0(e,{pathname:x});Ei(p||E!=null,`No routes matched location "${g.pathname}${g.search}${g.hash}" `),Ei(E==null||E[E.length-1].route.element!==void 0||E[E.length-1].route.Component!==void 0||E[E.length-1].route.lazy!==void 0,`Matched leaf route at location "${g.pathname}${g.search}${g.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let w=PC(E&&E.map(_=>Object.assign({},_,{params:Object.assign({},c,_.params),pathname:Li([h,a.encodeLocation?a.encodeLocation(_.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?h:Li([h,a.encodeLocation?a.encodeLocation(_.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathnameBase])})),s,n);return t&&w?C.createElement(xc.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...g},navigationType:"POP"}},w):w}function LC(){let e=HC(),t=vC(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:a},o={padding:"2px 4px",backgroundColor:a},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=C.createElement(C.Fragment,null,C.createElement("p",null,"💿 Hey developer 👋"),C.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",C.createElement("code",{style:o},"ErrorBoundary")," or"," ",C.createElement("code",{style:o},"errorElement")," prop on your route.")),C.createElement(C.Fragment,null,C.createElement("h2",null,"Unexpected Application Error!"),C.createElement("h3",{style:{fontStyle:"italic"}},t),n?C.createElement("pre",{style:s},n):null,c)}var IC=C.createElement(LC,null),V0=class extends C.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=AC(e.digest);n&&(e=n)}let t=e!==void 0?C.createElement(Ni.Provider,{value:this.props.routeContext},C.createElement($m.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?C.createElement(zC,{error:e},t):t}};V0.contextType=q0;var pp=new WeakMap;function zC({children:e,error:t}){let{basename:n}=C.useContext(oi);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let a=TC(t.digest);if(a){let s=pp.get(t);if(s)throw s;let o=U0(a.location,n);if(P0&&!pp.get(t))if(o.isExternal||a.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:a.replace}));throw pp.set(t,c),c}return C.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function BC({routeContext:e,match:t,children:n}){let a=C.useContext(Ll);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),C.createElement(Ni.Provider,{value:e},n)}function PC(e,t=[],n){let a=n==null?void 0:n.state;if(e==null){if(!a)return null;if(a.errors)e=a.matches;else if(t.length===0&&!a.initialized&&a.matches.length>0)e=a.matches;else return null}let s=e,o=a==null?void 0:a.errors;if(o!=null){let b=s.findIndex(g=>g.route.id&&(o==null?void 0:o[g.route.id])!==void 0);Rt(b>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),s=s.slice(0,Math.min(s.length,b+1))}let c=!1,d=-1;if(n&&a){c=a.renderFallback;for(let b=0;b<s.length;b++){let g=s[b];if((g.route.HydrateFallback||g.route.hydrateFallbackElement)&&(d=b),g.route.id){let{loaderData:v,errors:x}=a,E=g.route.loader&&!v.hasOwnProperty(g.route.id)&&(!x||x[g.route.id]===void 0);if(g.route.lazy||E){n.isStatic&&(c=!0),d>=0?s=s.slice(0,d+1):s=[s[0]];break}}}}let h=n==null?void 0:n.onError,p=a&&h?(b,g)=>{var v,x;h(b,{location:a.location,params:((x=(v=a.matches)==null?void 0:v[0])==null?void 0:x.params)??{},unstable_pattern:wC(a.matches),errorInfo:g})}:void 0;return s.reduceRight((b,g,v)=>{let x,E=!1,w=null,S=null;a&&(x=o&&g.route.id?o[g.route.id]:void 0,w=g.route.errorElement||IC,c&&(d<0&&v===0?(W0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),E=!0,S=null):d===v&&(E=!0,S=g.route.hydrateFallbackElement||null)));let _=t.concat(s.slice(0,v+1)),A=()=>{let T;return x?T=w:E?T=S:g.route.Component?T=C.createElement(g.route.Component,null):g.route.element?T=g.route.element:T=b,C.createElement(BC,{match:g,routeContext:{outlet:b,matches:_,isDataRoute:a!=null},children:T})};return a&&(g.route.ErrorBoundary||g.route.errorElement||v===0)?C.createElement(V0,{location:a.location,revalidation:a.revalidation,component:w,error:x,children:A(),routeContext:{outlet:null,matches:_,isDataRoute:!0},onError:p}):A()},null)}function Hm(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function UC(e){let t=C.useContext(Ll);return Rt(t,Hm(e)),t}function FC(e){let t=C.useContext(Ld);return Rt(t,Hm(e)),t}function qC(e){let t=C.useContext(Ni);return Rt(t,Hm(e)),t}function Km(e){let t=qC(e),n=t.matches[t.matches.length-1];return Rt(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function $C(){return Km("useRouteId")}function HC(){var a;let e=C.useContext($m),t=FC("useRouteError"),n=Km("useRouteError");return e!==void 0?e:(a=t.errors)==null?void 0:a[n]}function KC(){let{router:e}=UC("useNavigate"),t=Km("useNavigate"),n=C.useRef(!1);return G0(()=>{n.current=!0}),C.useCallback(async(s,o={})=>{Ei(n.current,K0),n.current&&(typeof s=="number"?await e.navigate(s):await e.navigate(s,{fromRouteId:t,...o}))},[e,t])}var Hv={};function W0(e,t,n){!t&&!Hv[e]&&(Hv[e]=!0,Ei(!1,n))}C.memo(GC);function GC({routes:e,future:t,state:n,isStatic:a,onError:s}){return Y0(e,void 0,{state:n,isStatic:a,onError:s})}function QC({to:e,replace:t,state:n,relative:a}){Rt(Il(),"<Navigate> may be used only in the context of a <Router> component.");let{static:s}=C.useContext(oi);Ei(!s,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:o}=C.useContext(Ni),{pathname:c}=zi(),d=_r(),h=Rd(e,qm(o),c,a==="path"),p=JSON.stringify(h);return C.useEffect(()=>{d(JSON.parse(p),{replace:t,state:n,relative:a})},[d,p,a,t,n]),null}function YC(e){return MC(e.context)}function mn(e){Rt(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function VC({basename:e="/",children:t=null,location:n,navigationType:a="POP",navigator:s,static:o=!1,unstable_useTransitions:c}){Rt(!Il(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=e.replace(/^\/*/,"/"),h=C.useMemo(()=>({basename:d,navigator:s,static:o,unstable_useTransitions:c,future:{}}),[d,s,o,c]);typeof n=="string"&&(n=Rl(n));let{pathname:p="/",search:b="",hash:g="",state:v=null,key:x="default",unstable_mask:E}=n,w=C.useMemo(()=>{let S=Oa(p,d);return S==null?null:{location:{pathname:S,search:b,hash:g,state:v,key:x,unstable_mask:E},navigationType:a}},[d,p,b,g,v,x,a,E]);return Ei(w!=null,`<Router basename="${d}"> is not able to match the URL "${p}${b}${g}" because it does not start with the basename, so the <Router> won't render anything.`),w==null?null:C.createElement(oi.Provider,{value:h},C.createElement(xc.Provider,{children:t,value:w}))}function WC({children:e,location:t}){return RC(um(e),t)}function um(e,t=[]){let n=[];return C.Children.forEach(e,(a,s)=>{if(!C.isValidElement(a))return;let o=[...t,s];if(a.type===C.Fragment){n.push.apply(n,um(a.props.children,o));return}Rt(a.type===mn,`[${typeof a.type=="string"?a.type:a.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Rt(!a.props.index||!a.props.children,"An index route cannot have child routes.");let c={id:a.props.id||o.join("-"),caseSensitive:a.props.caseSensitive,element:a.props.element,Component:a.props.Component,index:a.props.index,path:a.props.path,middleware:a.props.middleware,loader:a.props.loader,action:a.props.action,hydrateFallbackElement:a.props.hydrateFallbackElement,HydrateFallback:a.props.HydrateFallback,errorElement:a.props.errorElement,ErrorBoundary:a.props.ErrorBoundary,hasErrorBoundary:a.props.hasErrorBoundary===!0||a.props.ErrorBoundary!=null||a.props.errorElement!=null,shouldRevalidate:a.props.shouldRevalidate,handle:a.props.handle,lazy:a.props.lazy};a.props.children&&(c.children=um(a.props.children,o)),n.push(c)}),n}var dd="get",fd="application/x-www-form-urlencoded";function Id(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function XC(e){return Id(e)&&e.tagName.toLowerCase()==="button"}function ZC(e){return Id(e)&&e.tagName.toLowerCase()==="form"}function JC(e){return Id(e)&&e.tagName.toLowerCase()==="input"}function e2(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function t2(e,t){return e.button===0&&(!t||t==="_self")&&!e2(e)}function dm(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let a=e[n];return t.concat(Array.isArray(a)?a.map(s=>[n,s]):[[n,a]])},[]))}function n2(e,t){let n=dm(e);return t&&t.forEach((a,s)=>{n.has(s)||t.getAll(s).forEach(o=>{n.append(s,o)})}),n}var Yu=null;function i2(){if(Yu===null)try{new FormData(document.createElement("form"),0),Yu=!1}catch{Yu=!0}return Yu}var a2=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function mp(e){return e!=null&&!a2.has(e)?(Ei(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${fd}"`),null):e}function r2(e,t){let n,a,s,o,c;if(ZC(e)){let d=e.getAttribute("action");a=d?Oa(d,t):null,n=e.getAttribute("method")||dd,s=mp(e.getAttribute("enctype"))||fd,o=new FormData(e)}else if(XC(e)||JC(e)&&(e.type==="submit"||e.type==="image")){let d=e.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let h=e.getAttribute("formaction")||d.getAttribute("action");if(a=h?Oa(h,t):null,n=e.getAttribute("formmethod")||d.getAttribute("method")||dd,s=mp(e.getAttribute("formenctype"))||mp(d.getAttribute("enctype"))||fd,o=new FormData(d,e),!i2()){let{name:p,type:b,value:g}=e;if(b==="image"){let v=p?`${p}.`:"";o.append(`${v}x`,"0"),o.append(`${v}y`,"0")}else p&&o.append(p,g)}}else{if(Id(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=dd,a=null,s=fd,c=e}return o&&s==="text/plain"&&(c=o,o=void 0),{action:a,method:n.toLowerCase(),encType:s,formData:o,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Gm(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function X0(e,t,n,a){let s=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${a}`:s.pathname=`${s.pathname}.${a}`:s.pathname==="/"?s.pathname=`_root.${a}`:t&&Oa(s.pathname,t)==="/"?s.pathname=`${wd(t)}/_root.${a}`:s.pathname=`${wd(s.pathname)}.${a}`,s}async function s2(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function l2(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function o2(e,t,n){let a=await Promise.all(e.map(async s=>{let o=t.routes[s.route.id];if(o){let c=await s2(o,n);return c.links?c.links():[]}return[]}));return f2(a.flat(1).filter(l2).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function Kv(e,t,n,a,s,o){let c=(h,p)=>n[p]?h.route.id!==n[p].route.id:!0,d=(h,p)=>{var b;return n[p].pathname!==h.pathname||((b=n[p].route.path)==null?void 0:b.endsWith("*"))&&n[p].params["*"]!==h.params["*"]};return o==="assets"?t.filter((h,p)=>c(h,p)||d(h,p)):o==="data"?t.filter((h,p)=>{var g;let b=a.routes[h.route.id];if(!b||!b.hasLoader)return!1;if(c(h,p)||d(h,p))return!0;if(h.route.shouldRevalidate){let v=h.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:((g=n[0])==null?void 0:g.params)||{},nextUrl:new URL(e,window.origin),nextParams:h.params,defaultShouldRevalidate:!0});if(typeof v=="boolean")return v}return!0}):[]}function c2(e,t,{includeHydrateFallback:n}={}){return u2(e.map(a=>{let s=t.routes[a.route.id];if(!s)return[];let o=[s.module];return s.clientActionModule&&(o=o.concat(s.clientActionModule)),s.clientLoaderModule&&(o=o.concat(s.clientLoaderModule)),n&&s.hydrateFallbackModule&&(o=o.concat(s.hydrateFallbackModule)),s.imports&&(o=o.concat(s.imports)),o}).flat(1))}function u2(e){return[...new Set(e)]}function d2(e){let t={},n=Object.keys(e).sort();for(let a of n)t[a]=e[a];return t}function f2(e,t){let n=new Set;return new Set(t),e.reduce((a,s)=>{let o=JSON.stringify(d2(s));return n.has(o)||(n.add(o),a.push({key:o,link:s})),a},[])}function Qm(){let e=C.useContext(Ll);return Gm(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function h2(){let e=C.useContext(Ld);return Gm(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Ym=C.createContext(void 0);Ym.displayName="FrameworkContext";function Vm(){let e=C.useContext(Ym);return Gm(e,"You must render this element inside a <HydratedRouter> element"),e}function p2(e,t){let n=C.useContext(Ym),[a,s]=C.useState(!1),[o,c]=C.useState(!1),{onFocus:d,onBlur:h,onMouseEnter:p,onMouseLeave:b,onTouchStart:g}=t,v=C.useRef(null);C.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let w=_=>{_.forEach(A=>{c(A.isIntersecting)})},S=new IntersectionObserver(w,{threshold:.5});return v.current&&S.observe(v.current),()=>{S.disconnect()}}},[e]),C.useEffect(()=>{if(a){let w=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(w)}}},[a]);let x=()=>{s(!0)},E=()=>{s(!1),c(!1)};return n?e!=="intent"?[o,v,{}]:[o,v,{onFocus:Ho(d,x),onBlur:Ho(h,E),onMouseEnter:Ho(p,x),onMouseLeave:Ho(b,E),onTouchStart:Ho(g,x)}]:[!1,v,{}]}function Ho(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function m2({page:e,...t}){let n=EC(),{router:a}=Qm(),s=C.useMemo(()=>L0(a.routes,e,a.basename),[a.routes,e,a.basename]);return s?n?C.createElement(b2,{page:e,matches:s,...t}):C.createElement(y2,{page:e,matches:s,...t}):null}function g2(e){let{manifest:t,routeModules:n}=Vm(),[a,s]=C.useState([]);return C.useEffect(()=>{let o=!1;return o2(e,t,n).then(c=>{o||s(c)}),()=>{o=!0}},[e,t,n]),a}function b2({page:e,matches:t,...n}){let a=zi(),{future:s}=Vm(),{basename:o}=Qm(),c=C.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let d=X0(e,o,s.unstable_trailingSlashAwareDataRequests,"rsc"),h=!1,p=[];for(let b of t)typeof b.route.shouldRevalidate=="function"?h=!0:p.push(b.route.id);return h&&p.length>0&&d.searchParams.set("_routes",p.join(",")),[d.pathname+d.search]},[o,s.unstable_trailingSlashAwareDataRequests,e,a,t]);return C.createElement(C.Fragment,null,c.map(d=>C.createElement("link",{key:d,rel:"prefetch",as:"fetch",href:d,...n})))}function y2({page:e,matches:t,...n}){let a=zi(),{future:s,manifest:o,routeModules:c}=Vm(),{basename:d}=Qm(),{loaderData:h,matches:p}=h2(),b=C.useMemo(()=>Kv(e,t,p,o,a,"data"),[e,t,p,o,a]),g=C.useMemo(()=>Kv(e,t,p,o,a,"assets"),[e,t,p,o,a]),v=C.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let w=new Set,S=!1;if(t.forEach(A=>{var D;let T=o.routes[A.route.id];!T||!T.hasLoader||(!b.some(B=>B.route.id===A.route.id)&&A.route.id in h&&((D=c[A.route.id])!=null&&D.shouldRevalidate)||T.hasClientLoader?S=!0:w.add(A.route.id))}),w.size===0)return[];let _=X0(e,d,s.unstable_trailingSlashAwareDataRequests,"data");return S&&w.size>0&&_.searchParams.set("_routes",t.filter(A=>w.has(A.route.id)).map(A=>A.route.id).join(",")),[_.pathname+_.search]},[d,s.unstable_trailingSlashAwareDataRequests,h,a,o,b,t,e,c]),x=C.useMemo(()=>c2(g,o),[g,o]),E=g2(g);return C.createElement(C.Fragment,null,v.map(w=>C.createElement("link",{key:w,rel:"prefetch",as:"fetch",href:w,...n})),x.map(w=>C.createElement("link",{key:w,rel:"modulepreload",href:w,...n})),E.map(({key:w,link:S})=>C.createElement("link",{key:w,nonce:n.nonce,...S,crossOrigin:S.crossOrigin??n.crossOrigin})))}function x2(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var v2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{v2&&(window.__reactRouterVersion="7.14.2")}catch{}function w2({basename:e,children:t,unstable_useTransitions:n,window:a}){let s=C.useRef();s.current==null&&(s.current=WN({window:a,v5Compat:!0}));let o=s.current,[c,d]=C.useState({action:o.action,location:o.location}),h=C.useCallback(p=>{n===!1?d(p):C.startTransition(()=>d(p))},[n]);return C.useLayoutEffect(()=>o.listen(h),[o,h]),C.createElement(VC,{basename:e,children:t,location:c.location,navigationType:c.action,navigator:o,unstable_useTransitions:n})}var Z0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ps=C.forwardRef(function({onClick:t,discover:n="render",prefetch:a="none",relative:s,reloadDocument:o,replace:c,unstable_mask:d,state:h,target:p,to:b,preventScrollReset:g,viewTransition:v,unstable_defaultShouldRevalidate:x,...E},w){let{basename:S,navigator:_,unstable_useTransitions:A}=C.useContext(oi),T=typeof b=="string"&&Z0.test(b),D=U0(b,S);b=D.to;let B=jC(b,{relative:s}),M=zi(),q=null;if(d){let te=Rd(d,[],M.unstable_mask?M.unstable_mask.pathname:"/",!0);S!=="/"&&(te.pathname=te.pathname==="/"?S:Li([S,te.pathname])),q=_.createHref(te)}let[F,ee,P]=p2(a,E),X=S2(b,{replace:c,unstable_mask:d,state:h,target:p,preventScrollReset:g,relative:s,viewTransition:v,unstable_defaultShouldRevalidate:x,unstable_useTransitions:A});function J(te){t&&t(te),te.defaultPrevented||X(te)}let pe=!(D.isExternal||o),ue=C.createElement("a",{...E,...P,href:(pe?q:void 0)||D.absoluteURL||B,onClick:pe?J:t,ref:x2(w,ee),target:p,"data-discover":!T&&n==="render"?"true":void 0});return F&&!T?C.createElement(C.Fragment,null,ue,C.createElement(m2,{page:B})):ue});ps.displayName="Link";var J0=C.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:a="",end:s=!1,style:o,to:c,viewTransition:d,children:h,...p},b){let g=vc(c,{relative:p.relative}),v=zi(),x=C.useContext(Ld),{navigator:E,basename:w}=C.useContext(oi),S=x!=null&&A2(g)&&d===!0,_=E.encodeLocation?E.encodeLocation(g).pathname:g.pathname,A=v.pathname,T=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;n||(A=A.toLowerCase(),T=T?T.toLowerCase():null,_=_.toLowerCase()),T&&w&&(T=Oa(T,w)||T);const D=_!=="/"&&_.endsWith("/")?_.length-1:_.length;let B=A===_||!s&&A.startsWith(_)&&A.charAt(D)==="/",M=T!=null&&(T===_||!s&&T.startsWith(_)&&T.charAt(_.length)==="/"),q={isActive:B,isPending:M,isTransitioning:S},F=B?t:void 0,ee;typeof a=="function"?ee=a(q):ee=[a,B?"active":null,M?"pending":null,S?"transitioning":null].filter(Boolean).join(" ");let P=typeof o=="function"?o(q):o;return C.createElement(ps,{...p,"aria-current":F,className:ee,ref:b,style:P,to:c,viewTransition:d},typeof h=="function"?h(q):h)});J0.displayName="NavLink";var k2=C.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:a,replace:s,state:o,method:c=dd,action:d,onSubmit:h,relative:p,preventScrollReset:b,viewTransition:g,unstable_defaultShouldRevalidate:v,...x},E)=>{let{unstable_useTransitions:w}=C.useContext(oi),S=C2(),_=T2(d,{relative:p}),A=c.toLowerCase()==="get"?"get":"post",T=typeof d=="string"&&Z0.test(d),D=B=>{if(h&&h(B),B.defaultPrevented)return;B.preventDefault();let M=B.nativeEvent.submitter,q=(M==null?void 0:M.getAttribute("formmethod"))||c,F=()=>S(M||B.currentTarget,{fetcherKey:t,method:q,navigate:n,replace:s,state:o,relative:p,preventScrollReset:b,viewTransition:g,unstable_defaultShouldRevalidate:v});w&&n!==!1?C.startTransition(()=>F()):F()};return C.createElement("form",{ref:E,method:A,action:_,onSubmit:a?h:D,...x,"data-discover":!T&&e==="render"?"true":void 0})});k2.displayName="Form";function E2(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ek(e){let t=C.useContext(Ll);return Rt(t,E2(e)),t}function S2(e,{target:t,replace:n,unstable_mask:a,state:s,preventScrollReset:o,relative:c,viewTransition:d,unstable_defaultShouldRevalidate:h,unstable_useTransitions:p}={}){let b=_r(),g=zi(),v=vc(e,{relative:c});return C.useCallback(x=>{if(t2(x,t)){x.preventDefault();let E=n!==void 0?n:rc(g)===rc(v),w=()=>b(e,{replace:E,unstable_mask:a,state:s,preventScrollReset:o,relative:c,viewTransition:d,unstable_defaultShouldRevalidate:h});p?C.startTransition(()=>w()):w()}},[g,b,v,n,a,s,t,e,o,c,d,h,p])}function tk(e){Ei(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=C.useRef(dm(e)),n=C.useRef(!1),a=zi(),s=C.useMemo(()=>n2(a.search,n.current?null:t.current),[a.search]),o=_r(),c=C.useCallback((d,h)=>{const p=dm(typeof d=="function"?d(new URLSearchParams(s)):d);n.current=!0,o("?"+p,h)},[o,s]);return[s,c]}var _2=0,N2=()=>`__${String(++_2)}__`;function C2(){let{router:e}=ek("useSubmit"),{basename:t}=C.useContext(oi),n=$C(),a=e.fetch,s=e.navigate;return C.useCallback(async(o,c={})=>{let{action:d,method:h,encType:p,formData:b,body:g}=r2(o,t);if(c.navigate===!1){let v=c.fetcherKey||N2();await a(v,n,c.action||d,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:b,body:g,formMethod:c.method||h,formEncType:c.encType||p,flushSync:c.flushSync})}else await s(c.action||d,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:b,body:g,formMethod:c.method||h,formEncType:c.encType||p,replace:c.replace,state:c.state,fromRouteId:n,flushSync:c.flushSync,viewTransition:c.viewTransition})},[a,s,t,n])}function T2(e,{relative:t}={}){let{basename:n}=C.useContext(oi),a=C.useContext(Ni);Rt(a,"useFormAction must be used inside a RouteContext");let[s]=a.matches.slice(-1),o={...vc(e||".",{relative:t})},c=zi();if(e==null){o.search=c.search;let d=new URLSearchParams(o.search),h=d.getAll("index");if(h.some(b=>b==="")){d.delete("index"),h.filter(g=>g).forEach(g=>d.append("index",g));let b=d.toString();o.search=b?`?${b}`:""}}return(!e||e===".")&&s.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(o.pathname=o.pathname==="/"?n:Li([n,o.pathname])),rc(o)}function A2(e,{relative:t}={}){let n=C.useContext($0);Rt(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=ek("useViewTransitionState"),s=vc(e,{relative:t});if(!n.isTransitioning)return!1;let o=Oa(n.currentLocation.pathname,a)||n.currentLocation.pathname,c=Oa(n.nextLocation.pathname,a)||n.nextLocation.pathname;return vd(s.pathname,c)!=null||vd(s.pathname,o)!=null}/**
61
- * @license lucide-react v0.544.0 - ISC
62
- *
63
- * This source code is licensed under the ISC license.
64
- * See the LICENSE file in the root directory of this source tree.
65
- */const j2=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),O2=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,a)=>a?a.toUpperCase():n.toLowerCase()),Gv=e=>{const t=O2(e);return t.charAt(0).toUpperCase()+t.slice(1)},nk=(...e)=>e.filter((t,n,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===n).join(" ").trim(),D2=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
66
- * @license lucide-react v0.544.0 - ISC
67
- *
68
- * This source code is licensed under the ISC license.
69
- * See the LICENSE file in the root directory of this source tree.
70
- */var M2={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"};/**
71
- * @license lucide-react v0.544.0 - ISC
72
- *
73
- * This source code is licensed under the ISC license.
74
- * See the LICENSE file in the root directory of this source tree.
75
- */const R2=C.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:a,className:s="",children:o,iconNode:c,...d},h)=>C.createElement("svg",{ref:h,...M2,width:t,height:t,stroke:e,strokeWidth:a?Number(n)*24/Number(t):n,className:nk("lucide",s),...!o&&!D2(d)&&{"aria-hidden":"true"},...d},[...c.map(([p,b])=>C.createElement(p,b)),...Array.isArray(o)?o:[o]]));/**
76
- * @license lucide-react v0.544.0 - ISC
77
- *
78
- * This source code is licensed under the ISC license.
79
- * See the LICENSE file in the root directory of this source tree.
80
- */const Te=(e,t)=>{const n=C.forwardRef(({className:a,...s},o)=>C.createElement(R2,{ref:o,iconNode:t,className:nk(`lucide-${j2(Gv(e))}`,`lucide-${e}`,a),...s}));return n.displayName=Gv(e),n};/**
81
- * @license lucide-react v0.544.0 - ISC
82
- *
83
- * This source code is licensed under the ISC license.
84
- * See the LICENSE file in the root directory of this source tree.
85
- */const L2=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],zd=Te("activity",L2);/**
86
- * @license lucide-react v0.544.0 - ISC
87
- *
88
- * This source code is licensed under the ISC license.
89
- * See the LICENSE file in the root directory of this source tree.
90
- */const I2=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],ik=Te("arrow-left",I2);/**
91
- * @license lucide-react v0.544.0 - ISC
92
- *
93
- * This source code is licensed under the ISC license.
94
- * See the LICENSE file in the root directory of this source tree.
95
- */const z2=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],B2=Te("arrow-up",z2);/**
96
- * @license lucide-react v0.544.0 - ISC
97
- *
98
- * This source code is licensed under the ISC license.
99
- * See the LICENSE file in the root directory of this source tree.
100
- */const P2=[["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"}]],U2=Te("brain",P2);/**
101
- * @license lucide-react v0.544.0 - ISC
102
- *
103
- * This source code is licensed under the ISC license.
104
- * See the LICENSE file in the root directory of this source tree.
105
- */const F2=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],q2=Te("check",F2);/**
106
- * @license lucide-react v0.544.0 - ISC
107
- *
108
- * This source code is licensed under the ISC license.
109
- * See the LICENSE file in the root directory of this source tree.
110
- */const $2=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],wc=Te("chevron-down",$2);/**
111
- * @license lucide-react v0.544.0 - ISC
112
- *
113
- * This source code is licensed under the ISC license.
114
- * See the LICENSE file in the root directory of this source tree.
115
- */const H2=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Bd=Te("chevron-right",H2);/**
116
- * @license lucide-react v0.544.0 - ISC
117
- *
118
- * This source code is licensed under the ISC license.
119
- * See the LICENSE file in the root directory of this source tree.
120
- */const K2=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],G2=Te("chevron-up",K2);/**
121
- * @license lucide-react v0.544.0 - ISC
122
- *
123
- * This source code is licensed under the ISC license.
124
- * See the LICENSE file in the root directory of this source tree.
125
- */const Q2=[["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"}]],sc=Te("circle-alert",Q2);/**
126
- * @license lucide-react v0.544.0 - ISC
127
- *
128
- * This source code is licensed under the ISC license.
129
- * See the LICENSE file in the root directory of this source tree.
130
- */const Y2=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],fm=Te("circle-check-big",Y2);/**
131
- * @license lucide-react v0.544.0 - ISC
132
- *
133
- * This source code is licensed under the ISC license.
134
- * See the LICENSE file in the root directory of this source tree.
135
- */const V2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],lc=Te("circle-check",V2);/**
136
- * @license lucide-react v0.544.0 - ISC
137
- *
138
- * This source code is licensed under the ISC license.
139
- * See the LICENSE file in the root directory of this source tree.
140
- */const W2=[["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"}]],ak=Te("circle-x",W2);/**
141
- * @license lucide-react v0.544.0 - ISC
142
- *
143
- * This source code is licensed under the ISC license.
144
- * See the LICENSE file in the root directory of this source tree.
145
- */const X2=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Z2=Te("clock",X2);/**
146
- * @license lucide-react v0.544.0 - ISC
147
- *
148
- * This source code is licensed under the ISC license.
149
- * See the LICENSE file in the root directory of this source tree.
150
- */const J2=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],eT=Te("copy",J2);/**
151
- * @license lucide-react v0.544.0 - ISC
152
- *
153
- * This source code is licensed under the ISC license.
154
- * See the LICENSE file in the root directory of this source tree.
155
- */const tT=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],rk=Te("cpu",tT);/**
156
- * @license lucide-react v0.544.0 - ISC
157
- *
158
- * This source code is licensed under the ISC license.
159
- * See the LICENSE file in the root directory of this source tree.
160
- */const nT=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],sk=Te("download",nT);/**
161
- * @license lucide-react v0.544.0 - ISC
162
- *
163
- * This source code is licensed under the ISC license.
164
- * See the LICENSE file in the root directory of this source tree.
165
- */const iT=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],aT=Te("eye",iT);/**
166
- * @license lucide-react v0.544.0 - ISC
167
- *
168
- * This source code is licensed under the ISC license.
169
- * See the LICENSE file in the root directory of this source tree.
170
- */const rT=[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]],Qv=Te("file-code",rT);/**
171
- * @license lucide-react v0.544.0 - ISC
172
- *
173
- * This source code is licensed under the ISC license.
174
- * See the LICENSE file in the root directory of this source tree.
175
- */const sT=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],kc=Te("file-text",sT);/**
176
- * @license lucide-react v0.544.0 - ISC
177
- *
178
- * This source code is licensed under the ISC license.
179
- * See the LICENSE file in the root directory of this source tree.
180
- */const lT=[["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["path",{d:"M18 19c-2.8 0-5-2.2-5-5v8",key:"pkpw2h"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]],oT=Te("folder-git-2",lT);/**
181
- * @license lucide-react v0.544.0 - ISC
182
- *
183
- * This source code is licensed under the ISC license.
184
- * See the LICENSE file in the root directory of this source tree.
185
- */const cT=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],lk=Te("folder-open",cT);/**
186
- * @license lucide-react v0.544.0 - ISC
187
- *
188
- * This source code is licensed under the ISC license.
189
- * See the LICENSE file in the root directory of this source tree.
190
- */const uT=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],oc=Te("folder",uT);/**
191
- * @license lucide-react v0.544.0 - ISC
192
- *
193
- * This source code is licensed under the ISC license.
194
- * See the LICENSE file in the root directory of this source tree.
195
- */const dT=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],fT=Te("funnel",dT);/**
196
- * @license lucide-react v0.544.0 - ISC
197
- *
198
- * This source code is licensed under the ISC license.
199
- * See the LICENSE file in the root directory of this source tree.
200
- */const hT=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],pT=Te("git-branch",hT);/**
201
- * @license lucide-react v0.544.0 - ISC
202
- *
203
- * This source code is licensed under the ISC license.
204
- * See the LICENSE file in the root directory of this source tree.
205
- */const mT=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],gT=Te("globe",mT);/**
206
- * @license lucide-react v0.544.0 - ISC
207
- *
208
- * This source code is licensed under the ISC license.
209
- * See the LICENSE file in the root directory of this source tree.
210
- */const bT=[["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"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],yT=Te("history",bT);/**
211
- * @license lucide-react v0.544.0 - ISC
212
- *
213
- * This source code is licensed under the ISC license.
214
- * See the LICENSE file in the root directory of this source tree.
215
- */const xT=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],vT=Te("house",xT);/**
216
- * @license lucide-react v0.544.0 - ISC
217
- *
218
- * This source code is licensed under the ISC license.
219
- * See the LICENSE file in the root directory of this source tree.
220
- */const wT=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],kT=Te("image",wT);/**
221
- * @license lucide-react v0.544.0 - ISC
222
- *
223
- * This source code is licensed under the ISC license.
224
- * See the LICENSE file in the root directory of this source tree.
225
- */const ET=[["path",{d:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]],ST=Te("kanban",ET);/**
226
- * @license lucide-react v0.544.0 - ISC
227
- *
228
- * This source code is licensed under the ISC license.
229
- * See the LICENSE file in the root directory of this source tree.
230
- */const _T=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],NT=Te("layout-grid",_T);/**
231
- * @license lucide-react v0.544.0 - ISC
232
- *
233
- * This source code is licensed under the ISC license.
234
- * See the LICENSE file in the root directory of this source tree.
235
- */const CT=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],jt=Te("loader-circle",CT);/**
236
- * @license lucide-react v0.544.0 - ISC
237
- *
238
- * This source code is licensed under the ISC license.
239
- * See the LICENSE file in the root directory of this source tree.
240
- */const TT=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],Yv=Te("message-circle",TT);/**
241
- * @license lucide-react v0.544.0 - ISC
242
- *
243
- * This source code is licensed under the ISC license.
244
- * See the LICENSE file in the root directory of this source tree.
245
- */const AT=[["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"}]],jT=Te("message-square",AT);/**
246
- * @license lucide-react v0.544.0 - ISC
247
- *
248
- * This source code is licensed under the ISC license.
249
- * See the LICENSE file in the root directory of this source tree.
250
- */const OT=[["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"}]],DT=Te("paperclip",OT);/**
251
- * @license lucide-react v0.544.0 - ISC
252
- *
253
- * This source code is licensed under the ISC license.
254
- * See the LICENSE file in the root directory of this source tree.
255
- */const MT=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],RT=Te("pause",MT);/**
256
- * @license lucide-react v0.544.0 - ISC
257
- *
258
- * This source code is licensed under the ISC license.
259
- * See the LICENSE file in the root directory of this source tree.
260
- */const LT=[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],Wm=Te("pen-line",LT);/**
261
- * @license lucide-react v0.544.0 - ISC
262
- *
263
- * This source code is licensed under the ISC license.
264
- * See the LICENSE file in the root directory of this source tree.
265
- */const IT=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Xm=Te("play",IT);/**
266
- * @license lucide-react v0.544.0 - ISC
267
- *
268
- * This source code is licensed under the ISC license.
269
- * See the LICENSE file in the root directory of this source tree.
270
- */const zT=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Bi=Te("plus",zT);/**
271
- * @license lucide-react v0.544.0 - ISC
272
- *
273
- * This source code is licensed under the ISC license.
274
- * See the LICENSE file in the root directory of this source tree.
275
- */const BT=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],ok=Te("radio",BT);/**
276
- * @license lucide-react v0.544.0 - ISC
277
- *
278
- * This source code is licensed under the ISC license.
279
- * See the LICENSE file in the root directory of this source tree.
280
- */const PT=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Er=Te("refresh-cw",PT);/**
281
- * @license lucide-react v0.544.0 - ISC
282
- *
283
- * This source code is licensed under the ISC license.
284
- * See the LICENSE file in the root directory of this source tree.
285
- */const UT=[["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"}]],ck=Te("rotate-ccw",UT);/**
286
- * @license lucide-react v0.544.0 - ISC
287
- *
288
- * This source code is licensed under the ISC license.
289
- * See the LICENSE file in the root directory of this source tree.
290
- */const FT=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],Pd=Te("save",FT);/**
291
- * @license lucide-react v0.544.0 - ISC
292
- *
293
- * This source code is licensed under the ISC license.
294
- * See the LICENSE file in the root directory of this source tree.
295
- */const qT=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],uk=Te("scroll-text",qT);/**
296
- * @license lucide-react v0.544.0 - ISC
297
- *
298
- * This source code is licensed under the ISC license.
299
- * See the LICENSE file in the root directory of this source tree.
300
- */const $T=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],kd=Te("search",$T);/**
301
- * @license lucide-react v0.544.0 - ISC
302
- *
303
- * This source code is licensed under the ISC license.
304
- * See the LICENSE file in the root directory of this source tree.
305
- */const HT=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],KT=Te("send",HT);/**
306
- * @license lucide-react v0.544.0 - ISC
307
- *
308
- * This source code is licensed under the ISC license.
309
- * See the LICENSE file in the root directory of this source tree.
310
- */const GT=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],dk=Te("settings",GT);/**
311
- * @license lucide-react v0.544.0 - ISC
312
- *
313
- * This source code is licensed under the ISC license.
314
- * See the LICENSE file in the root directory of this source tree.
315
- */const QT=[["path",{d:"m12.5 17-.5-1-.5 1h1z",key:"3me087"}],["path",{d:"M15 22a1 1 0 0 0 1-1v-1a2 2 0 0 0 1.56-3.25 8 8 0 1 0-11.12 0A2 2 0 0 0 8 20v1a1 1 0 0 0 1 1z",key:"1o5pge"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}]],YT=Te("skull",QT);/**
316
- * @license lucide-react v0.544.0 - ISC
317
- *
318
- * This source code is licensed under the ISC license.
319
- * See the LICENSE file in the root directory of this source tree.
320
- */const VT=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],fk=Te("square",VT);/**
321
- * @license lucide-react v0.544.0 - ISC
322
- *
323
- * This source code is licensed under the ISC license.
324
- * See the LICENSE file in the root directory of this source tree.
325
- */const WT=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],hk=Te("terminal",WT);/**
326
- * @license lucide-react v0.544.0 - ISC
327
- *
328
- * This source code is licensed under the ISC license.
329
- * See the LICENSE file in the root directory of this source tree.
330
- */const XT=[["path",{d:"M10 2h4",key:"n1abiw"}],["path",{d:"M12 14v-4",key:"1evpnu"}],["path",{d:"M4 13a8 8 0 0 1 8-7 8 8 0 1 1-5.3 14L4 17.6",key:"1ts96g"}],["path",{d:"M9 17H4v5",key:"8t5av"}]],ZT=Te("timer-reset",XT);/**
331
- * @license lucide-react v0.544.0 - ISC
332
- *
333
- * This source code is licensed under the ISC license.
334
- * See the LICENSE file in the root directory of this source tree.
335
- */const JT=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],zl=Te("trash-2",JT);/**
336
- * @license lucide-react v0.544.0 - ISC
337
- *
338
- * This source code is licensed under the ISC license.
339
- * See the LICENSE file in the root directory of this source tree.
340
- */const eA=[["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"}]],tA=Te("triangle-alert",eA);/**
341
- * @license lucide-react v0.544.0 - ISC
342
- *
343
- * This source code is licensed under the ISC license.
344
- * See the LICENSE file in the root directory of this source tree.
345
- */const nA=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],pk=Te("users",nA);/**
346
- * @license lucide-react v0.544.0 - ISC
347
- *
348
- * This source code is licensed under the ISC license.
349
- * See the LICENSE file in the root directory of this source tree.
350
- */const iA=[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]],mk=Te("workflow",iA);/**
351
- * @license lucide-react v0.544.0 - ISC
352
- *
353
- * This source code is licensed under the ISC license.
354
- * See the LICENSE file in the root directory of this source tree.
355
- */const aA=[["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"}]],gk=Te("wrench",aA);/**
356
- * @license lucide-react v0.544.0 - ISC
357
- *
358
- * This source code is licensed under the ISC license.
359
- * See the LICENSE file in the root directory of this source tree.
360
- */const rA=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Si=Te("x",rA);/**
361
- * @license lucide-react v0.544.0 - ISC
362
- *
363
- * This source code is licensed under the ISC license.
364
- * See the LICENSE file in the root directory of this source tree.
365
- */const sA=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],lA=Te("zap",sA),oA={"app.title":"SPS Console","nav.chat":"Chat","nav.projects":"Projects","nav.board":"Board","nav.workers":"Workers","nav.logs":"Logs","nav.skills":"Skills","nav.system":"System","nav.processes":"Processes","nav.audit":"Audit Log","nav.memory":"Memory","nav.aria":"Main navigation","memory.sub":"Cross-project memory · agentmemory proxied behind console auth","memory.searchPlaceholder":"Search memory… (e.g. how to fix the art race)","memory.search":"Search","memory.results":"Results","memory.rawHint":"(raw observation · distilled lessons appear after live capture + compression)","memory.sessions":"Recent sessions","memory.empty":"No memory yet · accumulates after live capture (P1)","processes.title":"Processes","processes.subtitle":"Claude processes launched by SPS ACP (others, e.g. your own session, are not shown)","processes.refresh":"Refresh","processes.aliveCount":"{n} running","processes.col.kind":"Type","processes.col.slot":"Slot","processes.col.project":"Project","processes.col.state":"State","processes.col.memory":"Memory","processes.col.action":"Action","processes.empty":"No SPS processes","processes.filter.all":"All","processes.filter.alive":"Running","processes.filter.offline":"Offline","processes.kind.all":"All types","processes.kind.worker":"Worker","processes.kind.chat":"Chat","processes.kill":"Kill","processes.killConfirm":"Kill process {slot}?","audit.title":"Audit Log","audit.subtitle":"Project lifecycle: create / modify / delete","audit.refresh":"Refresh","audit.filter.all":"All","audit.action.create":"Create","audit.action.modify":"Modify","audit.action.delete":"Delete","audit.action.daemon":"Daemon","audit.col.time":"Time","audit.col.action":"Action","audit.col.project":"Project","audit.col.detail":"Detail","audit.empty":"No audit records","lang.toggle.aria":"Switch interface language","lang.en":"EN","lang.zh":"中","status.server":"server","status.offline":"offline","status.sse.open":"SSE","status.sse.connecting":"SSE·connect","status.sse.down":"SSE·down","status.pipelines.tooltip":"Active pipelines","status.workers.tooltip":"Active workers","status.pipeline.unit":"pipeline","status.worker.unit":"worker","common.save":"Save","common.cancel":"Cancel","common.delete":"Delete","common.confirm":"Confirm","common.create":"Create","common.edit":"Edit","common.close":"Close","common.loading":"Loading…","common.error":"Error","common.retry":"Retry","common.empty":"Nothing here yet","common.search":"Search","common.refresh":"Refresh","common.copy":"Copy","common.copied":"Copied","common.yes":"Yes","common.no":"No","common.required":"Required","common.optional":"Optional","common.ok":"OK","projects.title":"Projects 🎯","projects.count":"{count} local project(s)","projects.refresh.hint":"Click refresh to retry","projects.new":"New project","projects.load.failed":"Failed to load","projects.empty.title":"No projects yet ✨","projects.empty.hint":"Run {cmd} to create your first project.","newProject.title":"New project","newProject.subtitle":"Set up a project; the worker will run automatically","newProject.field.name":"Project name","newProject.field.name.help":"Lowercase letters, digits, _ and - only","newProject.field.dir":"Project directory","newProject.field.dir.help":"Absolute path; will be created if missing","newProject.field.branch":"Merge target branch","newProject.field.branch.help":"Default: main","newProject.field.maxWorkers":"Max concurrent workers","newProject.field.maxWorkers.help":"Per-project worker count (1 recommended)","newProject.field.ackTimeout":"ACK timeout (seconds)","newProject.field.ackTimeout.help":"How long to wait for the worker to ACK (default 300)","newProject.field.gitlabProject":"GitLab/GitHub remote","newProject.field.gitlabProject.help":"Format: user/repo (optional)","newProject.field.matrixRoom":"Matrix room ID","newProject.field.matrixRoom.help":"Optional, falls back to global default","newProject.field.git":"Enable git","newProject.field.git.help":"Off → non-code project, no commit/push/MR steps","newProject.field.wiki":"Enable Wiki knowledge base","newProject.field.wiki.help":"v0.51+: scaffold wiki/ in the project, inject 5-layer retrieval into worker prompts","newProject.submit":"Create project","newProject.creating":"Creating…","newProject.created":"Project created","newProject.error.dirRequired":"Project directory is required","newProject.dir.browse":"Browse","newProject.dir.browseAria":"Pick directory","newProject.back":"Back","newProject.back.aria":"Back to projects","newProject.field.name.placeholder":"e.g. acme-web","newProject.field.name.example":"Letters, digits, underscore, hyphen. e.g. acme-web","newProject.field.name.invalid":"Name only allows a-z A-Z 0-9 _ -","newProject.field.dir.long":"Absolute path on this machine (code or docs). Independent of git toggle.","newProject.field.dir.placeholder":"/home/you/code/acme","newProject.field.dir.createIfMissing":"Auto-create if missing (recommended — otherwise .claude/ and wiki/ install gets skipped)","newProject.field.dir.pickerTitle":"Pick project directory","newProject.field.maxWorkers.short":"Max workers","newProject.field.ackTimeout.minutes":"ACK timeout (min)","newProject.field.ackTimeout.minutes.help":"How long after dispatch before the worker is considered failed if no ACK","newProject.field.git.label":"Enable Git (worker auto commit + push)","newProject.field.git.detail":"When off, the worker only does the task, no version control — fits docs / data-processing non-code projects.","newProject.field.git.branch":"Merge branch","newProject.field.gitlabProject.label":"Git remote project path","newProject.field.gitlabProject.help2":"Like user/repo. Empty = skip remote API (commit/push local only)","newProject.field.gitlabProject.placeholder":"user/repo","newProject.field.gitlabProjectId":"GitLab project ID","newProject.field.gitlabProjectId.help":"Number; leave blank for GitHub","newProject.field.gitlabProjectId.placeholder":"42","newProject.field.wiki.label":"Enable Wiki knowledge base (per-project, doc-28)","newProject.field.wiki.detail":"Scaffolds {wikiCode} and injects 5-layer retrieval + wiki-update hints into the worker prompt. You can also run {wikiInit} later.","newProject.section.notifications":"Notifications","newProject.field.matrixRoom.label":"Matrix room ID","newProject.field.matrixRoom.help2":"Empty = use global config; blank = no notifications","newProject.field.matrixRoom.placeholder":"!abc:matrix.example.com","newProject.error.create.title":"Create failed","projectDetail.tab.pipeline":"Pipeline","projectDetail.tab.conf":"Conf","projectDetail.tab.delete":"Delete project","projectDetail.delete.title":"Delete this project","projectDetail.delete.warn":"This will remove the project conf, runtime, and worktrees. The repository under {repoDir} is untouched.","projectDetail.delete.confirmLabel":"Type the project name to confirm","projectDetail.delete.button":"Delete project","projectDetail.delete.deleting":"Deleting…","projectDetail.lastActivity":"Last activity","projectDetail.notFound":"Project not found","projectDetail.notFoundHint":"It may have been deleted or renamed.","projectDetail.backToList":"Back to projects","pipeline.editor.title":"Pipeline YAML","pipeline.editor.savedAt":"Saved {time}","pipeline.editor.unsaved":"Unsaved changes","pipeline.editor.save":"Save","pipeline.editor.saving":"Saving…","pipeline.editor.reload":"Reload from disk","pipeline.editor.discard.title":"Discard unsaved changes?","pipeline.editor.discard.body":"Your edits will be lost.","pipeline.editor.errors":"YAML parse errors","pipeline.editor.list":"Pipelines","pipeline.editor.list.add":"New pipeline","pipeline.editor.list.delete":"Delete pipeline","pipeline.editor.list.use":"Use as active","pipeline.editor.list.activeBadge":"active","pipeline.editor.list.sample":"sample","pipeline.editor.delete.confirm.title":"Delete pipeline {name}?","pipeline.editor.delete.confirm.body":"This action cannot be undone.","pipeline.newDialog.title":"New pipeline","pipeline.newDialog.field.filename":"Filename","pipeline.newDialog.field.filename.help":"Letters, digits, _ and - only; .yaml will be appended","pipeline.newDialog.field.copyFrom":"Copy from","pipeline.newDialog.copyFrom.sample":"sample template","pipeline.newDialog.copyFrom.active":"current active","pipeline.newDialog.create":"Create","projectDetail.tab.overview":"Overview","projectDetail.tab.config":"Config","projectDetail.tab.pipelines":"Pipelines","projectDetail.tab.danger":"Danger zone","projectDetail.openBoard":"Board","projectDetail.overview.repoDir":"Repo path","projectDetail.overview.pmBackend":"PM backend","projectDetail.overview.agent":"Agent","projectDetail.overview.cards":"Cards","projectDetail.overview.cards.value":"{total} total · {inprogress} in progress · {done} done","projectDetail.overview.workers":"Workers","projectDetail.overview.workers.value":"{total} total ({active} active)","projectDetail.overview.pipeline":"Pipeline","projectDetail.overview.lastActivity":"Last activity","projectDetail.overview.notFound":"Project {name} not found or unreadable.","projectDetail.config.confDirty":"● Unsaved changes","projectDetail.config.reload":"Reload","projectDetail.config.save":"Save","projectDetail.config.saveAria":"Save config","projectDetail.config.editorAria":"conf file editor","projectDetail.config.error.conflict.title":"Config was modified elsewhere","projectDetail.config.error.conflict.body":"The conf file was changed while you were editing. Click Reload, then re-edit.","projectDetail.config.error.save.title":"Save failed","projectDetail.config.error.load":"Load failed: {detail}","projectDetail.pipelines.title":"Pipelines","projectDetail.pipelines.add":"New pipeline","projectDetail.pipelines.empty":'No pipeline files yet. Click "New pipeline" to start.',"projectDetail.pipelines.activeBadge":"active","projectDetail.pipelines.edit":"Edit","projectDetail.pipelines.editAria":"Edit {name}","projectDetail.pipelines.switch":"Switch","projectDetail.pipelines.switchAria":"Switch to {name}","projectDetail.pipelines.switch.confirm.title":"Switch to {name}","projectDetail.pipelines.switch.confirm.body":"The current project.yaml will be overwritten with the contents of {name}. Continue?","projectDetail.pipelines.switch.confirm.button":"Switch","projectDetail.pipelines.switch.error":"Switch failed","projectDetail.pipelines.delete.confirm.title":"Delete {name}","projectDetail.pipelines.delete.confirm.body":"This pipeline file will be permanently deleted.","projectDetail.pipelines.delete.error":"Delete failed","projectDetail.pipelines.deleteAria":"Delete {name}","projectDetail.pipelines.create.error":"Create failed","projectDetail.danger.title":"Delete project","projectDetail.danger.body":"This clears {path} (all cards, runtime, logs).","projectDetail.danger.includeClaude.label":"Also clear repo's .claude/","projectDetail.danger.includeClaude.note":"The repo itself is untouched; only this directory is cleaned.","projectDetail.danger.confirmPrompt":"Type the project name {name} to confirm:","projectDetail.danger.deleteAria":"Permanently delete project","projectDetail.danger.deleteButton":"Permanently delete","projectDetail.danger.deleted.title":"Deleted","projectDetail.danger.deleted.bodyWithList":`Project deleted. Also cleaned up:
366
- {paths}`,"projectDetail.danger.deleted.body":"Project deleted.","projectDetail.danger.error":"Delete failed","pipelineEditor.close":"Close","pipelineEditor.error.conflict.title":"File was modified elsewhere","pipelineEditor.error.yaml.title":"YAML syntax error","pipelineEditor.error.save.title":"Save failed","pipelineEditor.error.serialize.title":"YAML serialize failed","pipelineEditor.error.load":"Load failed: {detail}","pipelineEditor.mode.structured":"Structured","pipelineEditor.mode.yaml":"Raw YAML","pipelineEditor.parseError.prefix":"YAML parse: {detail}","pipelineEditor.activeWarning":"⚠ This is the active pipeline — saving will take effect on the next tick","pipelineEditor.yamlAria":"pipeline YAML editor","pipelineEditor.status.unsaved":"● Unsaved","pipelineEditor.status.saved":"Saved","pipelineEditor.status.noChanges":"No changes","pipelineEditor.reload":"Reload","pipelineEditor.save":"Save","pipelineEditor.saveAria":"Save pipeline","pipelineEditor.activeBadge":"active","pipelineEditor.modeHint":"project = event-driven pipeline (default) · steps = sequential script","pipelineEditor.stages.heading":"Stages ({count})","pipelineEditor.stages.add":"Add stage","pipelineEditor.stages.empty":'No stages yet. Click "Add stage" to start.',"pipelineEditor.stage.name.hint":"Unique stage name","pipelineEditor.stage.profile.hint":"skill profile, may be empty","pipelineEditor.stage.cardState.hint":"Card state during this stage","pipelineEditor.stage.timeout.hint":"Optional, e.g. 30m 2h","pipelineEditor.stage.trigger.hint":"Trigger condition, blank uses default","pipelineEditor.stage.onComplete.hint":"Action on success","pipelineEditor.stage.onFail.action.hint":"Action on failure, e.g. label NEEDS-FIX","pipelineEditor.stage.onFail.comment.hint":"Comment written on the card","pipelineEditor.stage.halt.note":"(stops pipeline on failure; uncheck to continue with next card)","pipelineEditor.stage.moveUp":"Move up","pipelineEditor.stage.moveDown":"Move down","pipelineEditor.stage.remove":"Remove stage","newPipelineDialog.title":"New pipeline","newPipelineDialog.field.filename.label":"Filename","newPipelineDialog.field.filename.placeholder":"e.g. ci","newPipelineDialog.field.filename.help":"Will be saved as {filename}. Only a-z A-Z 0-9 _ - allowed; an existing file errors 409.","newPipelineDialog.section.template":"Initial content","newPipelineDialog.template.blank.label":"Blank template","newPipelineDialog.template.blank.desc":"Minimal 1-stage pipeline (develop → Done)","newPipelineDialog.template.sample.label":"Tutorial template","newPipelineDialog.template.sample.desc":"Copied from sample.yaml.example (annotated, every field explained)","newPipelineDialog.template.sample.unavailable":"sample.yaml.example does not exist","newPipelineDialog.template.active.label":"Copy current active","newPipelineDialog.template.active.desc":"Copied from project.yaml (build on the current config)","newPipelineDialog.template.active.unavailable":"project.yaml does not exist","newPipelineDialog.create.aria":"Create pipeline","newPipelineDialog.cancel":"Cancel","board.title":"Board ✨","board.title.bare":"Board","board.subtitle":"{name} · {cards} cards · {workers} workers active","board.pickPrompt.title":"Pick a project 🎯","board.pickPrompt.body":"The board is per-project. Pick one to start:","board.action.start":"Start","board.action.stop":"Stop","board.action.startAria":"Start pipeline","board.action.stopAria":"Stop pipeline","board.action.startError":"Failed to start pipeline","board.action.stopError":"Failed to stop pipeline","board.action.reset":"Reset","board.action.resetError":"Reset failed","board.action.reset.confirm.title":"Reset the entire pipeline","board.action.reset.confirm.body":"This clears all cards’ run state, worker markers, and branches. Cannot be undone.","board.action.reset.confirm.button":"Reset all","board.action.newCard":"New card","board.action.newCard.error":"Failed to create card","board.action.moveCard.error":"Failed to move card","board.search.placeholder":"Search title / skill / label…","board.search.aria":"Search cards","board.filter.clear":"Clear","board.filter.clearAria":"Clear filters","board.filter.aria":"Filter by {label}","board.filter.clearSelection":"Clear selection","board.error.loadCards":"Failed to load cards","board.col.planning":"Planning","board.col.backlog":"Backlog","board.col.todo":"Todo","board.col.inprogress":"Inprogress","board.col.qa":"QA / Review","board.col.done":"Done","kanban.checklist.label":"Checklist {done}/{total}","kanban.checklist.more":"… {count} more","kanban.column.empty":"— empty —","kanban.time.justNow":"just now","kanban.time.minutes":"{n}m ago","kanban.time.hours":"{n}h ago","kanban.time.days":"{n}d ago","newCard.title":"New card","newCard.field.title":"Title *","newCard.field.title.placeholder":"e.g. Add GitHub OAuth login","newCard.field.title.help":"Short, clear goal (<200 chars)","newCard.field.description":"Description","newCard.field.description.placeholder":"User story, requirements, acceptance criteria, references… Claude reads this when starting","newCard.field.description.help":"Markdown supported. If empty, Claude only sees the title.","newCard.field.skills":"Skills","newCard.field.skills.help":"Pick which skills get loaded (via frontmatter `skills:`). Optional — worker falls back to project-level skills.","newCard.field.skills.loading":"Loading skills…","newCard.field.skills.error":"Failed to load skills (creation still works): {detail}","newCard.field.skills.selected":"{count} selected: {names}","newCard.field.dispatch":"Dispatch","newCard.field.dispatch.label":"Dispatch immediately (go straight to Backlog)","newCard.field.dispatch.help":"Default off: card lands in Planning to wait; drag to Backlog when ready. On: skip Planning, the next tick assigns a worker.","newCard.create.aria":"Create card","cardDetail.loading":"Loading…","cardDetail.error.load":"Failed to load card","cardDetail.tabs.overview":"Overview","cardDetail.tabs.body":"Description","cardDetail.tabs.checklist":"Checklist","cardDetail.tabs.history":"History","cardDetail.tabs.actions":"Actions","cardDetail.field.state":"State","cardDetail.field.skills":"Skills","cardDetail.field.labels":"Labels","cardDetail.field.branch":"Branch","cardDetail.field.assignee":"Assignee","cardDetail.field.created":"Created","cardDetail.field.updated":"Updated","cardDetail.field.empty":"—","cardDetail.actions.delete":"Delete card","cardDetail.actions.delete.confirm.title":"Delete card #{seq}","cardDetail.actions.delete.confirm.body":"This card will be permanently deleted.","cardDetail.actions.delete.error":"Delete failed","cardDetail.actions.update.error":"Update failed","cardDetail.body.empty":"No description","cardDetail.checklist.empty":"No checklist","cardDetail.checklist.progress":"Progress {done}/{total}","cardDetail.history.empty":"No history","cardDetail.notFound":"Card #{seq} not found","cardDetail.copy.aria":"Copy seq","cardDetail.close.aria":"Close","cardDetail.save":"Save","cardDetail.saving":"Saving…","workers.title":"Workers 👷","workers.summary":"Across {projects} projects · {running} running · {starting} starting · {stuck} stuck · {crashed} crashed · {idle} idle","workers.summary.stuck":"{n} stuck","workers.summary.crashed":"{n} crashed","workers.refresh.aria":"Refresh","workers.refresh":"Refresh","workers.error.load":"Load failed: {detail}","workers.empty.hint":"Click a project / worker to see details","logs.title":"Logs 📜","logs.subtitle.allProjects":"All projects","logs.subtitle.project":"{name} live tail","logs.filter.errors":"Errors only","logs.filter.errors.aria":"Show errors only","logs.filter.search.placeholder":"Filter messages…","logs.empty":"No logs yet — waiting for events","logs.error.load":"Failed to load logs","logs.refresh":"Refresh","logs.refresh.aria":"Refresh logs","logs.scroll.bottom.aria":"Scroll to bottom","logs.scroll.pause":"Paused (autoscroll off)","logs.scroll.resume":"Resume autoscroll","logs.subtitle.allProjectsCount":"All projects ({count})","logs.poll.5s":"5s polling","logs.paused":"⏸ PAUSED","logs.mode.live":"Live","logs.mode.history":"History","logs.history.startAria":"Query start time","logs.history.queryAria":"Query","logs.history.query":"Query","logs.filter.project.aria":"Filter project","logs.filter.project.all":"All projects","logs.filter.keyword.placeholder":"Filter keyword…","logs.filter.keyword.aria":"Filter logs","logs.empty.match":"No matching logs","skills.title":"Skills 🧠","skills.subtitle":"Skills shared across projects (managed via `sps skill ...`)","skills.empty.title":"No skills yet","skills.empty.hint":"Run {cmd} to sync the bundled skills.","skills.linked.tooltip":"linked into this project","skills.frozen.tooltip":"frozen (per-project copy)","skills.category.all":"All","skills.category.language":"language","skills.category.end":"end","skills.category.persona":"persona","skills.category.workflow":"workflow","skills.category.other":"other","skills.subtitleCount":"{count} user-level skill(s)","skills.search.placeholder":"Search skill…","skills.search.aria":"Search skill","skillDetail.actionFailed":"{label} failed","skillDetail.unfreezeAction":"Unfreeze","skillDetail.freezeAction":"Freeze","skillDetail.removeAction":"Remove","skillDetail.removeConfirm.title":"Remove {name} from {project}","skillDetail.removeConfirm.body":"The skill link will be removed; the project will not see this skill on next run.","skillDetail.removeConfirm.button":"Remove","skillDetail.unfreezeConfirm.title":"Unfreeze {name} @ {project}","skillDetail.unfreezeConfirm.body":"Local changes to this skill will be overwritten with the latest shared version.","skillDetail.unfreezeConfirm.button":"Unfreeze","skillDetail.close.aria":"Close","skillDetail.loading":"Loading…","skillDetail.error.load":"Load failed: {detail}","skillDetail.section.projects":"Per-project link status","skillDetail.section.empty":"No projects yet. Create one first.","skillDetail.section.preview":"SKILL.md preview","skillDetail.toggleSection.aria":"{action} {file}","skillDetail.expand":"Expand","skillDetail.collapse":"Collapse","system.title":"System 🛠","system.subtitle":"Global config + diagnostics + upgrades","system.section.env":"Global env","system.section.env.help":"Stored in ~/.coral/env (mode 600). Used by all projects.","system.section.env.save":"Save env","system.section.env.error.conflict":"env was modified elsewhere","system.section.env.error.save":"Failed to save env","system.section.env.error.load":"Failed to load env","system.section.env.dirtyDot":"● Unsaved","system.section.env.aria":"env editor","system.section.env.reload":"Reload","system.section.upgrade":"Upgrade","system.section.upgrade.current":"Current: v{version}","system.section.upgrade.latest":"Latest on npm: v{version}","system.section.upgrade.uptodate":"Up to date","system.section.upgrade.update":"Upgrade now","system.section.upgrade.upgrading":"Upgrading…","system.section.upgrade.checking":"Checking npm…","system.section.upgrade.checkError":"Check failed: {detail}","system.section.upgrade.upgradeError":"Upgrade failed: {detail}","system.section.upgrade.upgradeError.title":"Upgrade failed","system.section.upgrade.command":"Or run in terminal: {cmd}","system.section.upgrade.runningPipelines":"Pipelines running — stop them first: {projects}","system.section.diagnostics":"Diagnostics","system.section.diagnostics.help":"Run sps doctor across all projects, see failures at a glance","system.section.diagnostics.run":"Run diagnostics","system.section.diagnostics.running":"Running…","system.section.diagnostics.empty":"No projects","system.section.diagnostics.checkAria":"Check {project}","system.section.diagnostics.statusOk":"OK","system.section.diagnostics.statusFail":"Issues","system.section.diagnostics.error":"Diagnostic failed: {detail}","system.h1":"System ⚙️","system.runtime":"Runtime","system.env.title.code":"~/.coral/env","system.env.title.prefix":"Global config ","system.env.edit.aria":"Edit env file","system.env.edit.button":"Edit","system.env.editing.label":"⚠ Editing","system.env.empty.before":'env file does not exist. Click "Edit" or run ',"system.env.empty.after":" in the terminal.","system.env.warning":"⚠ This file contains plaintext credentials. Keep mode 0600 on save.","system.env.aria":"env editor","system.env.dirtyMark":" · ● Unsaved","system.env.cancel":"Cancel","system.env.save":"Save","system.env.save.aria":"Save env","system.env.error.conflict.title":"env was modified elsewhere","system.env.error.save.title":"Save failed","system.env.error.conflict.body":"Cancel and reopen the editor.","system.upgrade.title":"Version","system.upgrade.checkLatest.aria":"Check latest version","system.upgrade.checkUpdate":"Check update","system.upgrade.label.current":"sps-cli (current)","system.upgrade.label.latest":"npm (latest)","system.upgrade.latestPill":"latest","system.upgrade.button.upgradeAria":"Upgrade to latest","system.upgrade.button.upgrade":"Upgrade","system.upgrade.button.copyAria":"Copy upgrade command","system.upgrade.button.copyTitle":"Copy command (run manually if auto upgrade fails)","system.upgrade.button.copy":"Copy command","system.upgrade.label.installed":"Installed","system.upgrade.installed.ok":"Active (restart console to see)","system.upgrade.installed.fail":"Upgrade not effective","system.upgrade.label.check":"Check","system.upgrade.confirm.title":"Upgrade sps-cli","system.upgrade.confirm.body":"Current {current}, upgrade to {latest}. Requires all pipelines stopped. Restart sps console after upgrade.","system.upgrade.confirm.button":"Upgrade","system.upgrade.success.title":"Upgrade complete","system.upgrade.success.body":'Installed v{version}. Run `pkill -f "sps console"` and restart to see it.',"system.upgrade.notEffective.title":"Upgrade not effective","system.upgrade.notEffective.same":"npm finished but the version did not change (still {version}) — likely a permissions or registry issue. Copy the command below to run manually.","system.upgrade.notEffective.notInstalled":"npm did not install a new version. Copy the command to run manually, or check the log below.","system.upgrade.error.title":"Upgrade failed","system.upgrade.copy.success.title":"Command copied","system.upgrade.copy.success.body":`Paste it into a terminal:
367
- {cmd}`,"system.upgrade.copy.fail.title":"Copy failed","system.upgrade.copy.fail.body":`Copy manually:
368
- {cmd}`,"system.diagnostics.title":"Project health check","system.diagnostics.checkAll":"Check all","system.diagnostics.empty":"No projects yet.","system.diagnostics.expandAria":"Expand","system.diagnostics.collapseAria":"Collapse","system.diagnostics.never":'Click "Check" to run sps doctor',"system.diagnostics.checkAria":"Check","system.diagnostics.check":"Check","system.diagnostics.noFixesNeeded":"Nothing to fix","system.diagnostics.fix.tip":"Run sps doctor <proj> --fix: auto-create .claude/hooks/stop.sh, state.json, etc.","system.diagnostics.fixAria":"Auto fix","system.diagnostics.fix":"Fix","system.diagnostics.fixed":"Fixed","system.diagnostics.error.fix":"doctor fix failed","system.diagnostics.error.check":"doctor check failed","chat.title":"Chat 💬","chat.empty.title":"Chat 💬","chat.empty.hint":'Click "New chat" on the left to start a session, or just type below — a session will be auto-created.',"chat.empty.shortcuts":"Enter to send · Shift+Enter for newline · streamed reply","chat.list.heading":"History {count}","chat.list.new":"New chat","chat.list.empty":"No chats yet. Click above to start.","chat.list.delete.aria":"Delete chat","chat.list.deleteCli.aria":"Remove this CLI session from the Console (does not affect Claude jsonl history)","chat.list.openAria":"Open chat {title}{cwd}","chat.list.cwdSuffix":" (cwd: {cwd})","chat.list.msgs":"{count} msg · {time}","chat.delete.confirm.title":"Delete chat","chat.delete.confirm.body.cli":"Will be removed from the Console list (the daemon session is stopped). The Claude CLI history under ~/.claude/projects is preserved — to continue, run `sps agent --chat --name <name>` in a terminal.","chat.delete.confirm.body.console":"Chat history will be permanently deleted.","chat.delete.confirm.button":"Delete","chat.cli.banner.bold":"CLI session","chat.cli.banner":"This session was created by sps agent. The Console only shows history. To continue, run in a terminal:","chat.input.placeholder":"Say something… (Enter to send, Shift+Enter for newline, drag files / paste images)","chat.input.dragOver":"Drop to attach…","chat.input.aria":"Message input","chat.input.attach.aria":"Attach a local file","chat.input.attach.title":"Attach a local file (also drag / paste images)","chat.input.send":"Send","chat.input.send.aria":"Send","chat.input.interrupt":"Stop","chat.input.interrupt.aria":"Stop generation","chat.input.uploading":"Uploading…","chat.input.removeAttachment":"Remove {name}","chat.error.interrupt.title":"Interrupt failed","chat.cliBadge":"CLI","chat.cliBadge.tooltip":"Created by sps agent CLI; history is read live from Claude jsonl (read-only).","chat.session.title":"{title}","chat.session.id":"{id}","chat.session.empty":"Type a question below to start · Enter to send · Shift+Enter for newline","notFound.title":"404","notFound.body":"This page does not exist.","notFound.home":"Back to home","workers.active.empty":"No workers running.","workers.alerts.allHealthy":"All workers healthy","workers.alerts.pidDead":"PID dead.","workers.alerts.markerStale":"marker stale {ago}.","workers.capacity.col.project":"Project","workers.capacity.col.usage":"Usage","workers.capacity.col.other":"Other","workers.capacity.detailHint":"details →","workers.panel.boardLink":"Board →","workers.panel.loading":"Loading workers…","workers.panel.empty.slots":"This project has no worker slots.","workers.panel.empty.noWorker":"No workers","workers.panel.empty.pickOne":"Pick a worker","workers.panel.idle.short":"idle","workers.panel.section.currentCard":"Current card","workers.panel.idle.full":"Slot idle, no current card.","workers.panel.section.claudeOutput":"Claude output · last {n} lines","workers.panel.output.loading":"Loading…","workers.panel.output.empty":"No session output yet. The worker needs a few seconds to start.","workers.panel.section.heartbeat":"Supervisor heartbeat · last {n} lines","workers.panel.heartbeat.fullLog":"View full log →","workers.panel.action.restart":"Restart","workers.panel.action.restart.confirm.title":"Restart worker-{slot}","workers.panel.action.restart.confirm.body":"Kill the process, then re-launch onto #{seq}","workers.panel.action.restart.confirm.button":"Restart","workers.panel.action.restart.error":"Restart failed","workers.panel.action.kill":"Kill","workers.panel.action.kill.confirm.title":"Kill worker-{slot}","workers.panel.action.kill.confirm.body":"The current task will be force-aborted.","workers.panel.action.kill.confirm.button":"Kill","workers.panel.action.kill.error":"Kill failed","dialog.confirm.default":"OK","dialog.alert.default":"Got it","dialog.cancel.default":"Cancel","dirPicker.title.default":"Pick a directory","dirPicker.close.aria":"Close","dirPicker.up.aria":"Parent directory","dirPicker.up.title":"Parent directory","dirPicker.home.aria":"Back to home","dirPicker.home.title":"Back to home","dirPicker.loading":"Loading…","dirPicker.error.title":"Read failed","dirPicker.empty":"— empty —","dirPicker.enter.aria":"Enter {name}/","dirPicker.pickFile.aria":"Pick {name} (double-click to confirm)","dirPicker.fileLocked":"File not selectable","dirPicker.cancel":"Cancel","dirPicker.useFile":"Use this file","dirPicker.useFile.tooltip.empty":"Click a file first","dirPicker.useDir":"Use this directory","errorBoundary.title":"💥 UI crashed","errorBoundary.refresh":"Refresh page","chat.error.create.title":"Failed to create chat","chat.error.send.title":"Send failed","chat.error.fileTooBig.title":"File too large","chat.error.fileTooBig.body":"Per-file limit is 50 MB; this is {size} MB ({name})","chat.error.uploadAttachment.title":"Attachment upload failed","chat.placeholder.attachment":"(attachment)","chat.placeholder.viewAttachment":"(see attachment)","chat.placeholder.attachmentTitle":"Attachment","chat.attachment.previewTooltip":`{name}
369
- {path}
370
- Click to preview`,"chat.attachment.previewSimpleTooltip":`{name}
371
- Click to zoom`,"chat.attachment.preview.aria":"Preview {name}","chat.attachment.close.aria":"Close","chat.attachment.readErr":"Read failed: {detail}","chat.attachment.loading":"Loading…","chat.attachment.unsupported":"This file type cannot be previewed inline.","chat.attachment.download":"Download","chat.message.role.you":"You","chat.message.role.error":"Error","chat.message.role.assistant":"assistant","chat.message.truncated":"⚠ Output exceeded 10MB and was truncated","chat.filePicker.title":"Pick attachment file","chat.newSession.title":"New chat","chat.newSession.title.aria":"New chat","chat.newSession.close.aria":"Close","chat.newSession.field.title":"Title (optional)","chat.newSession.field.title.placeholder":"Empty = auto-generate from first message","chat.newSession.field.cwd":"Working directory (optional)","chat.newSession.field.cwd.browse":"Browse","chat.newSession.field.cwd.browseAria":"Pick directory","chat.newSession.field.cwd.title":"Pick directory","chat.newSession.field.cwd.help1":"The agent reads/writes files here. Absolute path; must exist.","chat.newSession.field.cwd.help2":"Empty = use the daemon’s startup cwd.","chat.newSession.cancel":"Cancel","chat.newSession.create":"Create","cardModal.editing":"⚠ Editing","cardModal.title.aria":"Card title","cardModal.editAria":"Edit card","cardModal.edit":"Edit","cardModal.close.aria":"Close","cardModal.error.save.title":"Save failed","cardModal.error.load":"Load failed: {detail}","cardModal.skills.loading":"Loading skill list…","cardModal.label.removeAria":"Remove {label}","cardModal.label.addPlaceholder":"+ Add label","cardModal.label.addAria":"Add label","cardModal.label.note":"Note: AI-PIPELINE / STARTED-* / COMPLETED-* / NEEDS-FIX are managed by the pipeline; manual changes may be overwritten","cardModal.section.description":"Description","cardModal.section.empty":"(empty)","cardModal.section.checklist":"Checklist","cardModal.checklist.empty":"No checklist items. Add `- [ ] item` syntax in the description.","cardModal.section.log":"Log","cardModal.body.aria":"Card description","cardModal.body.replaceNote":'Only replaces the "## Description" section; checklist and log sections are untouched.',"cardModal.action.launch":"Launch worker","cardModal.action.launch.disabledDone":"Card is done; drag back to Todo to launch","cardModal.action.launch.disabledRunning":"Pipeline is running — supervisor dispatches automatically, no manual launch needed","cardModal.action.launch.error":"Launch worker failed","cardModal.action.reset":"Reset card","cardModal.action.reset.confirm.title":"Reset card #{seq}","cardModal.action.reset.confirm.body":"Card state goes back to initial; checklist progress is cleared.","cardModal.action.reset.confirm.button":"Reset","cardModal.action.reset.error":"Reset failed","cardModal.action.delete":"Delete card","cardModal.action.delete.confirm1.title":"Delete card #{seq}","cardModal.action.delete.confirm1.body":'About to delete "{title}". This cannot be undone (the md file is physically removed). Continue?',"cardModal.action.delete.confirm1.button":"Continue","cardModal.action.delete.confirm2.title":"Final confirmation","cardModal.action.delete.confirm2.body":"Please re-confirm deleting card #{seq}."},cA={"app.title":"SPS 控制台","nav.chat":"对话","nav.projects":"项目","nav.board":"看板","nav.workers":"Workers","nav.logs":"日志","nav.skills":"技能","nav.system":"系统","nav.processes":"进程","nav.audit":"审计日志","nav.memory":"记忆","nav.aria":"主导航","memory.sub":"跨项目记忆 · 经 console 鉴权代理 agentmemory","memory.searchPlaceholder":"搜索记忆…(如:三消美术竞态怎么修)","memory.search":"搜索","memory.results":"召回结果","memory.rawHint":"(原始观察 · 接入实时捕获+压缩后这里会显示提炼的教训)","memory.sessions":"最近会话","memory.empty":"暂无记忆 · 接入实时捕获(P1)后自动累积","processes.title":"进程监控","processes.subtitle":"SPS ACP 启动的 claude 进程(其它途径启动的,如你自己的会话,不显示)","processes.refresh":"刷新","processes.aliveCount":"运行中 {n}","processes.col.kind":"类型","processes.col.slot":"会话槽","processes.col.project":"项目","processes.col.state":"状态","processes.col.memory":"内存","processes.col.action":"操作","processes.empty":"没有 SPS 进程","processes.filter.all":"全部","processes.filter.alive":"运行中","processes.filter.offline":"离线","processes.kind.all":"全部类型","processes.kind.worker":"构建 Worker","processes.kind.chat":"对话","processes.kill":"关闭","processes.killConfirm":"确定关闭进程 {slot}?","audit.title":"审计日志","audit.subtitle":"项目生命周期:创建 / 修改 / 删除","audit.refresh":"刷新","audit.filter.all":"全部","audit.action.create":"创建","audit.action.modify":"修改","audit.action.delete":"删除","audit.action.daemon":"Daemon","audit.col.time":"时间","audit.col.action":"动作","audit.col.project":"项目","audit.col.detail":"详情","audit.empty":"暂无审计记录","lang.toggle.aria":"切换界面语言","lang.en":"EN","lang.zh":"中","status.server":"服务","status.offline":"离线","status.sse.open":"SSE","status.sse.connecting":"SSE·连接中","status.sse.down":"SSE·断开","status.pipelines.tooltip":"活跃流水线数","status.workers.tooltip":"活跃 Worker 数","status.pipeline.unit":"流水线","status.worker.unit":"Worker","common.save":"保存","common.cancel":"取消","common.delete":"删除","common.confirm":"确认","common.create":"创建","common.edit":"编辑","common.close":"关闭","common.loading":"加载中…","common.error":"出错","common.retry":"重试","common.empty":"暂无内容","common.search":"搜索","common.refresh":"刷新","common.copy":"复制","common.copied":"已复制","common.yes":"是","common.no":"否","common.required":"必填","common.optional":"可选","common.ok":"好","projects.title":"项目 🎯","projects.count":"本机有 {count} 个项目","projects.refresh.hint":"点击刷新重试","projects.new":"新建项目","projects.load.failed":"加载失败","projects.empty.title":"还没有项目 ✨","projects.empty.hint":"运行 {cmd} 创建第一个项目。","newProject.title":"新建项目","newProject.subtitle":"配置一个项目,worker 自动开跑","newProject.field.name":"项目名","newProject.field.name.help":"只允许小写字母、数字、_ 和 -","newProject.field.dir":"项目目录","newProject.field.dir.help":"绝对路径;不存在会自动创建","newProject.field.branch":"合并目标分支","newProject.field.branch.help":"默认 main","newProject.field.maxWorkers":"最大并发 Worker 数","newProject.field.maxWorkers.help":"单项目并发数(推荐 1)","newProject.field.ackTimeout":"ACK 超时(秒)","newProject.field.ackTimeout.help":"Worker 响应等待秒数(默认 300)","newProject.field.gitlabProject":"GitLab/GitHub 远程","newProject.field.gitlabProject.help":"格式:用户名/仓库(可选)","newProject.field.matrixRoom":"Matrix 房间 ID","newProject.field.matrixRoom.help":"可选;不填则用全局默认","newProject.field.git":"启用 git","newProject.field.git.help":"关闭 → 非代码项目,跳过 commit/push/MR","newProject.field.wiki":"启用 Wiki 知识库","newProject.field.wiki.help":"v0.51+:在项目下生成 wiki/ 骨架,Worker prompt 自动注入 5 层检索","newProject.submit":"创建项目","newProject.creating":"创建中…","newProject.created":"项目已创建","newProject.error.dirRequired":"项目目录必填","newProject.dir.browse":"浏览","newProject.dir.browseAria":"选择目录","newProject.back":"返回","newProject.back.aria":"返回项目列表","newProject.field.name.placeholder":"例如:acme-web","newProject.field.name.example":"只能用字母、数字、下划线、连字符。例如 acme-web","newProject.field.name.invalid":"名称只能包含 a-z A-Z 0-9 _ -","newProject.field.dir.long":"本机绝对路径(代码或文档都可)。和是否启用 git 无关。","newProject.field.dir.placeholder":"/home/you/code/acme","newProject.field.dir.createIfMissing":"目录不存在时自动创建(推荐 —— 否则 .claude/ 和 wiki/ 安装会被跳过)","newProject.field.dir.pickerTitle":"选择项目目录","newProject.field.maxWorkers.short":"最大 Worker 数","newProject.field.ackTimeout.minutes":"ACK 超时(分钟)","newProject.field.ackTimeout.minutes.help":"Worker 启动后多久没 ACK 视为失败","newProject.field.git.label":"启用 Git(Worker 自动 commit + push)","newProject.field.git.detail":"关闭后 Worker 只做任务、不做版本控制;适合文档/数据处理等非代码项目。","newProject.field.git.branch":"合并分支","newProject.field.gitlabProject.label":"Git 远程项目路径","newProject.field.gitlabProject.help2":"如 user/repo,空则跳过远程 API(只本地 commit/push)","newProject.field.gitlabProject.placeholder":"user/repo","newProject.field.gitlabProjectId":"GitLab 项目 ID","newProject.field.gitlabProjectId.help":"数字;GitHub 用户留空","newProject.field.gitlabProjectId.placeholder":"42","newProject.field.wiki.label":"启用 Wiki 知识库(per-project,doc-28)","newProject.field.wiki.detail":"开启后自动 scaffold {wikiCode} 目录,并向 Worker prompt 注入 5 层检索上下文与 wiki-update 提示。可后续 {wikiInit} 补办。","newProject.section.notifications":"通知","newProject.field.matrixRoom.label":"Matrix 房间 ID","newProject.field.matrixRoom.help2":"空则使用全局配置;不填 = 不通知","newProject.field.matrixRoom.placeholder":"!abc:matrix.example.com","newProject.error.create.title":"创建失败","projectDetail.tab.pipeline":"流水线","projectDetail.tab.conf":"配置","projectDetail.tab.delete":"删除项目","projectDetail.delete.title":"删除该项目","projectDetail.delete.warn":"会删除项目配置、运行时和 worktree。{repoDir} 下的代码仓库不动。","projectDetail.delete.confirmLabel":"输入项目名以确认","projectDetail.delete.button":"删除项目","projectDetail.delete.deleting":"删除中…","projectDetail.lastActivity":"最后活跃","projectDetail.notFound":"项目不存在","projectDetail.notFoundHint":"可能已被删除或重命名。","projectDetail.backToList":"返回项目列表","pipeline.editor.title":"流水线 YAML","pipeline.editor.savedAt":"{time} 已保存","pipeline.editor.unsaved":"有未保存的修改","pipeline.editor.save":"保存","pipeline.editor.saving":"保存中…","pipeline.editor.reload":"从磁盘重新加载","pipeline.editor.discard.title":"放弃未保存的修改?","pipeline.editor.discard.body":"你的编辑会丢失。","pipeline.editor.errors":"YAML 解析错误","pipeline.editor.list":"流水线","pipeline.editor.list.add":"新建流水线","pipeline.editor.list.delete":"删除流水线","pipeline.editor.list.use":"设为当前","pipeline.editor.list.activeBadge":"当前","pipeline.editor.list.sample":"示例","pipeline.editor.delete.confirm.title":"删除流水线 {name}?","pipeline.editor.delete.confirm.body":"此操作不可撤销。","pipeline.newDialog.title":"新建流水线","pipeline.newDialog.field.filename":"文件名","pipeline.newDialog.field.filename.help":"只允许字母、数字、_ 和 -;自动追加 .yaml","pipeline.newDialog.field.copyFrom":"复制自","pipeline.newDialog.copyFrom.sample":"示例模板","pipeline.newDialog.copyFrom.active":"当前活动","pipeline.newDialog.create":"创建","projectDetail.tab.overview":"概览","projectDetail.tab.config":"配置","projectDetail.tab.pipelines":"流水线","projectDetail.tab.danger":"危险操作","projectDetail.openBoard":"看板","projectDetail.overview.repoDir":"仓库路径","projectDetail.overview.pmBackend":"PM 后端","projectDetail.overview.agent":"Agent","projectDetail.overview.cards":"卡片","projectDetail.overview.cards.value":"共 {total} 张 · {inprogress} 进行中 · {done} 完成","projectDetail.overview.workers":"Worker","projectDetail.overview.workers.value":"共 {total} 个({active} 活跃)","projectDetail.overview.pipeline":"Pipeline","projectDetail.overview.lastActivity":"最近活动","projectDetail.overview.notFound":"项目 {name} 不存在或无法读取。","projectDetail.config.confDirty":"● 未保存的修改","projectDetail.config.reload":"重新加载","projectDetail.config.save":"保存","projectDetail.config.saveAria":"保存配置","projectDetail.config.editorAria":"conf 文件编辑器","projectDetail.config.error.conflict.title":"配置已被其他地方修改","projectDetail.config.error.conflict.body":'conf 文件在你编辑期间被改过。点"重新加载"后再编辑。',"projectDetail.config.error.save.title":"保存失败","projectDetail.config.error.load":"加载失败:{detail}","projectDetail.pipelines.title":"流水线","projectDetail.pipelines.add":"新建流水线","projectDetail.pipelines.empty":'还没有流水线文件。点"新建流水线"开始。',"projectDetail.pipelines.activeBadge":"当前","projectDetail.pipelines.edit":"编辑","projectDetail.pipelines.editAria":"编辑 {name}","projectDetail.pipelines.switch":"切换","projectDetail.pipelines.switchAria":"切换到 {name}","projectDetail.pipelines.switch.confirm.title":"切换到 {name}","projectDetail.pipelines.switch.confirm.body":"当前 project.yaml 会被 {name} 的内容覆盖。继续?","projectDetail.pipelines.switch.confirm.button":"切换","projectDetail.pipelines.switch.error":"切换失败","projectDetail.pipelines.delete.confirm.title":"删除 {name}","projectDetail.pipelines.delete.confirm.body":"这个流水线文件会被永久删除。","projectDetail.pipelines.delete.error":"删除失败","projectDetail.pipelines.deleteAria":"删除 {name}","projectDetail.pipelines.create.error":"创建失败","projectDetail.danger.title":"删除项目","projectDetail.danger.body":"这会清理 {path}(包括所有卡片、runtime、logs)。","projectDetail.danger.includeClaude.label":"同时清理 repo 的 .claude/","projectDetail.danger.includeClaude.note":"repo 本身不动,只清这个目录。","projectDetail.danger.confirmPrompt":"输入项目名 {name} 确认:","projectDetail.danger.deleteAria":"永久删除项目","projectDetail.danger.deleteButton":"永久删除","projectDetail.danger.deleted.title":"已删除","projectDetail.danger.deleted.bodyWithList":`项目已删除。同时清理了:
372
- {paths}`,"projectDetail.danger.deleted.body":"项目已删除。","projectDetail.danger.error":"删除失败","pipelineEditor.close":"关闭","pipelineEditor.error.conflict.title":"文件已被其他地方修改","pipelineEditor.error.yaml.title":"YAML 语法错误","pipelineEditor.error.save.title":"保存失败","pipelineEditor.error.serialize.title":"YAML 序列化失败","pipelineEditor.error.load":"加载失败:{detail}","pipelineEditor.mode.structured":"结构化","pipelineEditor.mode.yaml":"原始 YAML","pipelineEditor.parseError.prefix":"YAML 解析:{detail}","pipelineEditor.activeWarning":"⚠ 这是当前激活的流水线,保存后下一轮 tick 生效","pipelineEditor.yamlAria":"pipeline YAML 编辑器","pipelineEditor.status.unsaved":"● 未保存","pipelineEditor.status.saved":"已保存","pipelineEditor.status.noChanges":"无变化","pipelineEditor.reload":"重新加载","pipelineEditor.save":"保存","pipelineEditor.saveAria":"保存 pipeline","pipelineEditor.activeBadge":"当前","pipelineEditor.modeHint":"project = 事件驱动流水线(默认) · steps = 顺序脚本","pipelineEditor.stages.heading":"Stages({count})","pipelineEditor.stages.add":"添加 stage","pipelineEditor.stages.empty":'还没 stage。点"添加 stage"开始。',"pipelineEditor.stage.name.hint":"stage 唯一名","pipelineEditor.stage.profile.hint":"skill 画像,可空","pipelineEditor.stage.cardState.hint":"本 stage 期间卡片状态","pipelineEditor.stage.timeout.hint":"可选,如 30m 2h","pipelineEditor.stage.trigger.hint":"触发条件,可空走默认","pipelineEditor.stage.onComplete.hint":"成功后动作","pipelineEditor.stage.onFail.action.hint":"失败时动作,如 label NEEDS-FIX","pipelineEditor.stage.onFail.comment.hint":"写进卡片的注释","pipelineEditor.stage.halt.note":"(失败后停流水线;去掉则继续下一张卡)","pipelineEditor.stage.moveUp":"上移","pipelineEditor.stage.moveDown":"下移","pipelineEditor.stage.remove":"删除 stage","newPipelineDialog.title":"新建流水线","newPipelineDialog.field.filename.label":"文件名","newPipelineDialog.field.filename.placeholder":"例如 ci","newPipelineDialog.field.filename.help":"实际会保存为 {filename}。只允许 a-z A-Z 0-9 _ -;已有同名文件会 409 报错。","newPipelineDialog.section.template":"初始内容","newPipelineDialog.template.blank.label":"空白模板","newPipelineDialog.template.blank.desc":"最简 1 stage(develop → Done)","newPipelineDialog.template.sample.label":"教学模板","newPipelineDialog.template.sample.desc":"从 sample.yaml.example 复制(带注释,讲解所有字段)","newPipelineDialog.template.sample.unavailable":"sample.yaml.example 不存在","newPipelineDialog.template.active.label":"复制当前活动的","newPipelineDialog.template.active.desc":"从 project.yaml 复制(基于目前的配置改)","newPipelineDialog.template.active.unavailable":"project.yaml 不存在","newPipelineDialog.create.aria":"创建 pipeline","newPipelineDialog.cancel":"取消","board.title":"看板 ✨","board.title.bare":"看板","board.subtitle":"{name} · {cards} 张卡片 · {workers} workers 活跃","board.pickPrompt.title":"选择一个项目 🎯","board.pickPrompt.body":"看板按项目分。挑一个开始:","board.action.start":"启动","board.action.stop":"停止","board.action.startAria":"启动 pipeline","board.action.stopAria":"停止 pipeline","board.action.startError":"启动 pipeline 失败","board.action.stopError":"停止 pipeline 失败","board.action.reset":"重置","board.action.resetError":"重置失败","board.action.reset.confirm.title":"重置整个流水线","board.action.reset.confirm.body":"这会清空所有卡片的运行状态、worker marker、分支。不可撤销。","board.action.reset.confirm.button":"重置全部","board.action.newCard":"新卡片","board.action.newCard.error":"新建卡片失败","board.action.moveCard.error":"移动卡片失败","board.search.placeholder":"搜索标题 / skill / label…","board.search.aria":"搜索卡片","board.filter.clear":"清空","board.filter.clearAria":"清空筛选","board.filter.aria":"按 {label} 筛选","board.filter.clearSelection":"清空选择","board.error.loadCards":"加载卡片失败","board.col.planning":"Planning","board.col.backlog":"Backlog","board.col.todo":"Todo","board.col.inprogress":"Inprogress","board.col.qa":"QA / Review","board.col.done":"Done","kanban.checklist.label":"检查清单 {done}/{total}","kanban.checklist.more":"… 还有 {count} 条","kanban.column.empty":"— 空 —","kanban.time.justNow":"刚才","kanban.time.minutes":"{n} 分钟前","kanban.time.hours":"{n} 小时前","kanban.time.days":"{n} 天前","newCard.title":"新建卡片","newCard.field.title":"标题 *","newCard.field.title.placeholder":"例如:接入 GitHub OAuth 登录","newCard.field.title.help":"写简短明了的目标(<200 字符)","newCard.field.description":"描述","newCard.field.description.placeholder":"用户故事、需求、验收标准、参考资料… Claude 启动时会读这里的内容","newCard.field.description.help":"支持 markdown。空的话就只有 title,Claude 只能靠 title 推断要做啥。","newCard.field.skills":"技能","newCard.field.skills.help":"勾选哪些 skill 会被加载(走 frontmatter `skills:`)。不选也行,Worker 默认加载项目级 skills。","newCard.field.skills.loading":"加载 skill 列表…","newCard.field.skills.error":"skill 列表加载失败,不影响创建:{detail}","newCard.field.skills.selected":"已选 {count} 个:{names}","newCard.field.dispatch":"派发","newCard.field.dispatch.label":"立即派发执行(直接进 Backlog)","newCard.field.dispatch.help":"默认不勾:卡进 Planning 暂存,等你看板上拖到 Backlog 再开工。勾上:跳过暂存,下次 tick 直接派 worker 跑。","newCard.create.aria":"创建卡片","cardDetail.loading":"加载中…","cardDetail.error.load":"卡片加载失败","cardDetail.tabs.overview":"概览","cardDetail.tabs.body":"描述","cardDetail.tabs.checklist":"检查清单","cardDetail.tabs.history":"历史","cardDetail.tabs.actions":"操作","cardDetail.field.state":"状态","cardDetail.field.skills":"技能","cardDetail.field.labels":"标签","cardDetail.field.branch":"分支","cardDetail.field.assignee":"处理人","cardDetail.field.created":"创建时间","cardDetail.field.updated":"更新时间","cardDetail.field.empty":"—","cardDetail.actions.delete":"删除卡片","cardDetail.actions.delete.confirm.title":"删除卡片 #{seq}","cardDetail.actions.delete.confirm.body":"该卡片会被永久删除。","cardDetail.actions.delete.error":"删除失败","cardDetail.actions.update.error":"更新失败","cardDetail.body.empty":"没有描述","cardDetail.checklist.empty":"没有检查清单","cardDetail.checklist.progress":"进度 {done}/{total}","cardDetail.history.empty":"没有历史记录","cardDetail.notFound":"卡片 #{seq} 不存在","cardDetail.copy.aria":"复制 seq","cardDetail.close.aria":"关闭","cardDetail.save":"保存","cardDetail.saving":"保存中…","workers.title":"Workers 👷","workers.summary":"跨 {projects} 项目 · {running} 跑 · {starting} 启动 · {stuck} 卡 · {crashed} 崩 · {idle} 闲","workers.summary.stuck":"{n} 卡","workers.summary.crashed":"{n} 崩","workers.refresh.aria":"刷新","workers.refresh":"刷新","workers.error.load":"加载失败:{detail}","workers.empty.hint":"点击项目 / worker 查看详情","logs.title":"日志 📜","logs.subtitle.allProjects":"全部项目","logs.subtitle.project":"{name} 实时日志","logs.filter.errors":"只看错误","logs.filter.errors.aria":"只显示错误","logs.filter.search.placeholder":"过滤消息…","logs.empty":"还没有日志 —— 等待事件中","logs.error.load":"日志加载失败","logs.refresh":"刷新","logs.refresh.aria":"刷新日志","logs.scroll.bottom.aria":"滚动到底部","logs.scroll.pause":"已暂停(自动滚动关闭)","logs.scroll.resume":"恢复自动滚动","logs.subtitle.allProjectsCount":"全部项目({count})","logs.poll.5s":"5s 轮询","logs.paused":"⏸ 已暂停","logs.mode.live":"实时","logs.mode.history":"历史","logs.history.startAria":"查询起始时间","logs.history.queryAria":"查询","logs.history.query":"查询","logs.filter.project.aria":"筛选项目","logs.filter.project.all":"全部项目","logs.filter.keyword.placeholder":"过滤关键字…","logs.filter.keyword.aria":"过滤日志","logs.empty.match":"没有匹配的日志","skills.title":"技能 🧠","skills.subtitle":"跨项目共用的 skill(用 `sps skill ...` 管理)","skills.empty.title":"还没有 skill","skills.empty.hint":"运行 {cmd} 同步 bundled skills。","skills.linked.tooltip":"已链接到该项目","skills.frozen.tooltip":"已冻结(项目独立副本)","skills.category.all":"全部","skills.category.language":"语言","skills.category.end":"终端","skills.category.persona":"角色","skills.category.workflow":"流程","skills.category.other":"其它","skills.subtitleCount":"{count} 个 user-level skill","skills.search.placeholder":"搜索 skill…","skills.search.aria":"搜索 skill","skillDetail.actionFailed":"{label}失败","skillDetail.unfreezeAction":"解冻","skillDetail.freezeAction":"冻结","skillDetail.removeAction":"移除","skillDetail.removeConfirm.title":"从 {project} 移除 {name}","skillDetail.removeConfirm.body":"skill 链接会被解除,项目后续运行时将无法使用该 skill。","skillDetail.removeConfirm.button":"移除","skillDetail.unfreezeConfirm.title":"解冻 {name} @ {project}","skillDetail.unfreezeConfirm.body":"本地对这个 skill 的改动会被覆盖,回到最新共享版本。","skillDetail.unfreezeConfirm.button":"解冻","skillDetail.close.aria":"关闭","skillDetail.loading":"加载中…","skillDetail.error.load":"加载失败:{detail}","skillDetail.section.projects":"项目链接状态","skillDetail.section.empty":"还没有任何项目。先去创建一个项目。","skillDetail.section.preview":"SKILL.md 预览","skillDetail.toggleSection.aria":"{action} {file}","skillDetail.expand":"展开","skillDetail.collapse":"收起","system.title":"系统 🛠","system.subtitle":"全局配置 + 诊断 + 升级","system.section.env":"全局 env","system.section.env.help":"存储在 ~/.coral/env(mode 600)。所有项目共用。","system.section.env.save":"保存 env","system.section.env.error.conflict":"env 已被其它地方修改","system.section.env.error.save":"保存 env 失败","system.section.env.error.load":"加载 env 失败","system.section.env.dirtyDot":"● 未保存","system.section.env.aria":"env 编辑器","system.section.env.reload":"重新加载","system.section.upgrade":"升级","system.section.upgrade.current":"当前:v{version}","system.section.upgrade.latest":"npm 最新:v{version}","system.section.upgrade.uptodate":"已是最新","system.section.upgrade.update":"立即升级","system.section.upgrade.upgrading":"升级中…","system.section.upgrade.checking":"正在查询 npm…","system.section.upgrade.checkError":"查询失败:{detail}","system.section.upgrade.upgradeError":"升级失败:{detail}","system.section.upgrade.upgradeError.title":"升级失败","system.section.upgrade.command":"或在终端执行:{cmd}","system.section.upgrade.runningPipelines":"有 pipeline 在跑,先停止:{projects}","system.section.diagnostics":"诊断","system.section.diagnostics.help":"一次性跑所有项目的 sps doctor,看哪些项目出问题","system.section.diagnostics.run":"运行诊断","system.section.diagnostics.running":"运行中…","system.section.diagnostics.empty":"没有项目","system.section.diagnostics.checkAria":"检查 {project}","system.section.diagnostics.statusOk":"正常","system.section.diagnostics.statusFail":"有问题","system.section.diagnostics.error":"诊断失败:{detail}","system.h1":"系统 ⚙️","system.runtime":"运行时","system.env.title.code":"~/.coral/env","system.env.title.prefix":"全局配置 ","system.env.edit.aria":"编辑 env 文件","system.env.edit.button":"编辑","system.env.editing.label":"⚠ 编辑模式","system.env.empty.before":'env 文件不存在。点"编辑"或者终端运行 ',"system.env.empty.after":"。","system.env.warning":"⚠ 文件包含凭证明文。保存时保持 0600 权限。","system.env.aria":"env 文件编辑器","system.env.dirtyMark":" · ● 未保存","system.env.cancel":"取消","system.env.save":"保存","system.env.save.aria":"保存 env","system.env.error.conflict.title":"env 被其他地方修改了","system.env.error.save.title":"保存失败","system.env.error.conflict.body":"请点取消后重开编辑。","system.upgrade.title":"版本","system.upgrade.checkLatest.aria":"检查最新版本","system.upgrade.checkUpdate":"检查更新","system.upgrade.label.current":"sps-cli(当前)","system.upgrade.label.latest":"npm(最新)","system.upgrade.latestPill":"最新","system.upgrade.button.upgradeAria":"升级到最新版本","system.upgrade.button.upgrade":"升级","system.upgrade.button.copyAria":"复制升级命令","system.upgrade.button.copyTitle":"自动升级失败时手动跑","system.upgrade.button.copy":"复制命令","system.upgrade.label.installed":"已安装","system.upgrade.installed.ok":"已生效(重启 console 后可见)","system.upgrade.installed.fail":"未升级成功","system.upgrade.label.check":"检查","system.upgrade.confirm.title":"升级 sps-cli","system.upgrade.confirm.body":"当前 {current},升级到 {latest}。要求所有 pipeline 已停止。升级后请重启 sps console 生效。","system.upgrade.confirm.button":"升级","system.upgrade.success.title":"升级完成","system.upgrade.success.body":'装上了 v{version}。请 `pkill -f "sps console"` 再重启以生效。',"system.upgrade.notEffective.title":"升级未生效","system.upgrade.notEffective.same":"npm 执行完毕但版本没变(仍 {version})——多半是权限或 registry 问题。可复制下面的命令在终端手动跑。","system.upgrade.notEffective.notInstalled":"npm 没装上新版本。可复制命令手动跑,或看下面日志定位。","system.upgrade.error.title":"升级失败","system.upgrade.copy.success.title":"命令已复制","system.upgrade.copy.success.body":`粘贴到终端运行即可:
373
- {cmd}`,"system.upgrade.copy.fail.title":"复制失败","system.upgrade.copy.fail.body":`请手动复制:
374
- {cmd}`,"system.diagnostics.title":"项目健康检查","system.diagnostics.checkAll":"检查全部","system.diagnostics.empty":"还没有项目。","system.diagnostics.expandAria":"展开","system.diagnostics.collapseAria":"折叠","system.diagnostics.never":'点 "检查" 运行 sps doctor',"system.diagnostics.checkAria":"检查","system.diagnostics.check":"检查","system.diagnostics.noFixesNeeded":"已无可修问题","system.diagnostics.fix.tip":"调 sps doctor <proj> --fix:自动创建 .claude/hooks/stop.sh、state.json 等","system.diagnostics.fixAria":"自动修复","system.diagnostics.fix":"修复","system.diagnostics.fixed":"已修复","system.diagnostics.error.fix":"doctor 修复失败","system.diagnostics.error.check":"doctor 检查失败","chat.title":"对话 💬","chat.empty.title":"对话 💬","chat.empty.hint":'点左上角"新建对话"开始一个 session。或直接在下方输入,会自动建 session。',"chat.empty.shortcuts":"Enter 发送 · Shift+Enter 换行 · 内容流式返回","chat.list.heading":"历史 {count}","chat.list.new":"新建对话","chat.list.empty":"还没对话。点上面新建。","chat.list.delete.aria":"删除对话","chat.list.deleteCli.aria":"从 Console 移除该 CLI 会话(不影响 Claude jsonl 存档)","chat.list.openAria":"打开对话 {title}{cwd}","chat.list.cwdSuffix":"(工作目录 {cwd})","chat.list.msgs":"{count} 条 · {time}","chat.delete.confirm.title":"删除对话","chat.delete.confirm.body.cli":"会从 Console 列表移除(停 daemon 会话)。Claude CLI 在 ~/.claude/projects 下的对话存档会保留 —— 想恢复到终端继续聊就重新跑 sps agent --chat --name <名>。","chat.delete.confirm.body.console":"对话记录会永久删除,不可恢复。","chat.delete.confirm.button":"删除","chat.cli.banner.bold":"CLI 会话","chat.cli.banner":"这是 CLI 会话(由 sps agent 创建),Console 仅展示历史。续聊请在终端运行:","chat.input.placeholder":"说点什么… (Enter 发送,Shift+Enter 换行,可拖入文件 / 粘贴图片)","chat.input.dragOver":"松开鼠标以附加文件…","chat.input.aria":"消息输入","chat.input.attach.aria":"附加本地文件","chat.input.attach.title":"附加本地文件(也可拖拽 / 粘贴图片)","chat.input.send":"发送","chat.input.send.aria":"发送","chat.input.interrupt":"中断","chat.input.interrupt.aria":"中断生成","chat.input.uploading":"上传中…","chat.input.removeAttachment":"移除 {name}","chat.error.interrupt.title":"中断失败","chat.cliBadge":"CLI","chat.cliBadge.tooltip":"该会话由 sps agent CLI 创建,从 Claude jsonl 实时读取(只读)","chat.session.title":"{title}","chat.session.id":"{id}","chat.session.empty":"下方输入问题开始对话 · Enter 发送 · Shift+Enter 换行","notFound.title":"404","notFound.body":"这个页面不存在。","notFound.home":"回到首页","workers.active.empty":"没有 worker 在运行。","workers.alerts.allHealthy":"全部 worker 健康","workers.alerts.pidDead":"PID 已死。","workers.alerts.markerStale":"marker 停 {ago}。","workers.capacity.col.project":"项目","workers.capacity.col.usage":"占用","workers.capacity.col.other":"其它","workers.capacity.detailHint":"详情 →","workers.panel.boardLink":"看板 →","workers.panel.loading":"加载 workers…","workers.panel.empty.slots":"该项目没有 worker slot。","workers.panel.empty.noWorker":"无 worker","workers.panel.empty.pickOne":"请选择一个 worker","workers.panel.idle.short":"空闲","workers.panel.section.currentCard":"当前卡片","workers.panel.idle.full":"slot 空闲,没有当前卡片。","workers.panel.section.claudeOutput":"Claude 输出 · 最近 {n} 行","workers.panel.output.loading":"加载中…","workers.panel.output.empty":"还没收到 session 输出。Worker 刚启动时需要几秒。","workers.panel.section.heartbeat":"Supervisor 心跳 · 最近 {n} 行","workers.panel.heartbeat.fullLog":"查看完整 log →","workers.panel.action.restart":"重启","workers.panel.action.restart.confirm.title":"重启 worker-{slot}","workers.panel.action.restart.confirm.body":"先杀进程,再重新 launch 到 #{seq}","workers.panel.action.restart.confirm.button":"重启","workers.panel.action.restart.error":"重启失败","workers.panel.action.kill":"终止","workers.panel.action.kill.confirm.title":"终止 worker-{slot}","workers.panel.action.kill.confirm.body":"当前任务强制中断。","workers.panel.action.kill.confirm.button":"终止","workers.panel.action.kill.error":"终止失败","dialog.confirm.default":"确定","dialog.alert.default":"知道了","dialog.cancel.default":"取消","dirPicker.title.default":"选择目录","dirPicker.close.aria":"关闭","dirPicker.up.aria":"上级目录","dirPicker.up.title":"上级目录","dirPicker.home.aria":"回到 Home","dirPicker.home.title":"回到 Home","dirPicker.loading":"加载中...","dirPicker.error.title":"读取失败","dirPicker.empty":"— 空目录 —","dirPicker.enter.aria":"进入 {name}/","dirPicker.pickFile.aria":"选择 {name}(双击直接确认)","dirPicker.fileLocked":"文件不可选","dirPicker.cancel":"取消","dirPicker.useFile":"使用此文件","dirPicker.useFile.tooltip.empty":"请先点选一个文件","dirPicker.useDir":"选此目录","errorBoundary.title":"💥 UI 崩了","errorBoundary.refresh":"刷新页面","chat.error.create.title":"新建对话失败","chat.error.send.title":"发送失败","chat.error.fileTooBig.title":"文件超过上限","chat.error.fileTooBig.body":"单文件上限 50 MB;当前 {size} MB({name})","chat.error.uploadAttachment.title":"附件上传失败","chat.placeholder.attachment":"(附件)","chat.placeholder.viewAttachment":"(请查看附件)","chat.placeholder.attachmentTitle":"附件","chat.attachment.previewTooltip":`{name}
375
- {path}
376
- 点击预览`,"chat.attachment.previewSimpleTooltip":`{name}
377
- 点击放大`,"chat.attachment.preview.aria":"预览 {name}","chat.attachment.close.aria":"关闭","chat.attachment.readErr":"读取失败:{detail}","chat.attachment.loading":"加载中...","chat.attachment.unsupported":"此文件类型不支持内联预览。","chat.attachment.download":"下载","chat.message.role.you":"你","chat.message.role.error":"错误","chat.message.role.assistant":"assistant","chat.message.truncated":"⚠ 输出超过 10MB,已截断","chat.filePicker.title":"选择附件文件","chat.newSession.title":"新建对话","chat.newSession.title.aria":"新建对话","chat.newSession.close.aria":"关闭","chat.newSession.field.title":"标题(可选)","chat.newSession.field.title.placeholder":"留空 = 自动用首条消息生成","chat.newSession.field.cwd":"工作目录(可选)","chat.newSession.field.cwd.browse":"浏览","chat.newSession.field.cwd.browseAria":"浏览选择目录","chat.newSession.field.cwd.title":"选择目录","chat.newSession.field.cwd.help1":"Agent 在该目录下读写文件。绝对路径,必须存在。","chat.newSession.field.cwd.help2":"留空则用 daemon 启动时的目录。","chat.newSession.cancel":"取消","chat.newSession.create":"创建","cardModal.editing":"⚠ 编辑中","cardModal.title.aria":"卡片标题","cardModal.editAria":"编辑卡片","cardModal.edit":"编辑","cardModal.close.aria":"关闭","cardModal.error.save.title":"保存失败","cardModal.error.load":"加载失败:{detail}","cardModal.skills.loading":"加载 skill 列表…","cardModal.label.removeAria":"删除 {label}","cardModal.label.addPlaceholder":"+ 添加 label","cardModal.label.addAria":"添加 label","cardModal.label.note":"注意:AI-PIPELINE / STARTED-* / COMPLETED-* / NEEDS-FIX 由流水线自动管理,手动改可能被覆盖","cardModal.section.description":"描述","cardModal.section.empty":"(空)","cardModal.section.checklist":"检查清单","cardModal.checklist.empty":"暂无清单项。在描述里用 `- [ ] 项` 语法添加。","cardModal.section.log":"日志","cardModal.body.aria":"卡片描述","cardModal.body.replaceNote":'只替换 "## 描述" 段的内容;检查清单和日志段不动。',"cardModal.action.launch":"启动 worker","cardModal.action.launch.disabledDone":"卡片已完成;先拖回 Todo 再启动","cardModal.action.launch.disabledRunning":"Pipeline 正在跑——supervisor 会自动 dispatch,无需手动启动","cardModal.action.launch.error":"启动 worker 失败","cardModal.action.reset":"重置卡片","cardModal.action.reset.confirm.title":"重置卡片 #{seq}","cardModal.action.reset.confirm.body":"卡片状态会回到初始,已做的 checklist 会清空。","cardModal.action.reset.confirm.button":"重置","cardModal.action.reset.error":"重置失败","cardModal.action.delete":"删除卡片","cardModal.action.delete.confirm1.title":"删除卡片 #{seq}","cardModal.action.delete.confirm1.body":'即将删除 "{title}"。此操作不可恢复(md 文件将被物理删除)。是否继续?',"cardModal.action.delete.confirm1.button":"继续","cardModal.action.delete.confirm2.title":"最终确认","cardModal.action.delete.confirm2.body":"请再次确认删除卡片 #{seq}。"},bk=C.createContext(null),yk="sps-console-lang";function uA(){if(typeof window>"u")return"en";try{const e=window.localStorage.getItem(yk);if(e==="en"||e==="zh")return e}catch{}return"en"}function dA(e){try{window.localStorage.setItem(yk,e)}catch{}}function fA({children:e}){const[t,n]=C.useState(()=>uA());C.useEffect(()=>{typeof document<"u"&&(document.documentElement.lang=t==="zh"?"zh-CN":"en")},[t]);const a=C.useCallback(c=>{n(c),dA(c)},[]),s=C.useMemo(()=>{const c=t==="zh"?cA:oA;return(d,h)=>{let p=c[d]??d;if(h)for(const[b,g]of Object.entries(h))g!==void 0&&(p=p.replace(`{${b}}`,String(g)));return p}},[t]),o=C.useMemo(()=>({lang:t,setLang:a,t:s}),[t,a,s]);return f.jsx(bk.Provider,{value:o,children:e})}function xk(){const e=C.useContext(bk);if(!e)throw new Error("useLang must be used inside I18nProvider");return e}function ze(){return xk().t}function hA(){const{lang:e,setLang:t,t:n}=xk();return f.jsxs("div",{role:"group","aria-label":n("lang.toggle.aria"),className:"flex border-2 border-[var(--color-text)] rounded-lg overflow-hidden shadow-[2px_2px_0_var(--color-text)]",children:[f.jsx(Vv,{active:e==="en",onClick:()=>t("en"),label:n("lang.en"),ariaLabel:"English"}),f.jsx(Vv,{active:e==="zh",onClick:()=>t("zh"),label:n("lang.zh"),ariaLabel:"中文"})]})}function Vv({active:e,onClick:t,label:n,ariaLabel:a}){return f.jsx("button",{type:"button",onClick:t,"aria-label":a,"aria-pressed":e,className:["flex-1 py-1.5 text-xs font-bold font-[family-name:var(--font-mono)] cursor-pointer transition-colors",e?"bg-[var(--color-accent-mint)] text-[var(--color-text)]":"bg-[var(--color-bg)] text-[var(--color-text-muted)] hover:bg-[var(--color-bg-cream)]"].join(" "),children:n})}const pA=[{to:"/chat",labelKey:"nav.chat",icon:jT},{to:"/projects",labelKey:"nav.projects",icon:NT},{to:"/board",labelKey:"nav.board",icon:ST},{to:"/workers",labelKey:"nav.workers",icon:pk},{to:"/logs",labelKey:"nav.logs",icon:kc},{to:"/skills",labelKey:"nav.skills",icon:gT},{to:"/system",labelKey:"nav.system",icon:dk},{to:"/processes",labelKey:"nav.processes",icon:rk},{to:"/audit",labelKey:"nav.audit",icon:uk},{to:"/memory",labelKey:"nav.memory",icon:U2}];function mA(){const e=ze();return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"font-[family-name:var(--font-heading)] font-bold text-lg px-3 pt-2 pb-4 flex items-center gap-3 text-[var(--color-text)]",children:[f.jsx("span",{className:"w-5 h-5 rounded-md bg-[var(--color-accent-mint)] border-2 border-[var(--color-text)] shadow-[2px_2px_0_var(--color-text)]"}),e("app.title")]}),f.jsx("nav",{className:"flex flex-col gap-1.5 mt-2","aria-label":e("nav.aria"),children:pA.map(t=>{const n=t.icon;return f.jsxs(J0,{to:t.to,className:({isActive:a})=>["flex items-center gap-3 px-3 py-2.5 rounded-xl font-semibold text-sm cursor-pointer transition-transform duration-150","border-2 border-transparent",a?"bg-[var(--color-accent-mint)] border-[var(--color-text)] shadow-[3px_3px_0_var(--color-text)] font-bold":"text-[var(--color-text)] hover:bg-[var(--color-bg-cream)] hover:border-[var(--color-text)] hover:shadow-[3px_3px_0_var(--color-text)] hover:-translate-x-px hover:-translate-y-px"].join(" "),children:[f.jsx(n,{size:18,strokeWidth:2.5}),e(t.labelKey)]},t.to)})}),f.jsx("div",{className:"mt-auto pt-3",children:f.jsx(hA,{})})]})}class vk extends Error{constructor(t,n,a){super(n),this.status=t,this.detail=a,this.name="ApiError"}}async function It(e){const t=await fetch(e,{headers:{Accept:"application/json"}});if(!t.ok){let n;try{n=await t.json()}catch{n=await t.text()}throw new vk(t.status,`${t.status} ${t.statusText}`,n)}return await t.json()}async function gA(e,t){const n=await fetch(e,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:void 0});if(!n.ok){let a;try{a=await n.json()}catch{a=await n.text()}throw new vk(n.status,`${n.status} ${n.statusText}`,a)}return await n.json()}function wk(){return It("/api/system/info")}function bA(){return It("/api/system/env")}function yA(){return It("/api/system/env/raw")}async function xA(e,t){const n=await fetch("/api/system/env",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:e,etag:t})});if(!n.ok){const a=await n.text(),s=new Error(`${n.status}: ${a}`);throw s.status=n.status,s}return n.json()}function vA(){return It("/api/system/latest-version")}async function wA(){const e=await fetch("/api/system/upgrade",{method:"POST"});if(!e.ok&&e.status!==409)throw new Error(`${e.status}: ${await e.text()}`);return e.json()}async function kA(e,t=!1){const n=t?"?fix=1":"",a=await fetch(`/api/system/doctor/${encodeURIComponent(e)}${n}`,{method:"POST"});if(!a.ok)throw new Error(`${a.status}: ${await a.text()}`);return a.json()}function Nr(){return It("/api/projects")}function EA(e){return It(`/api/projects/${encodeURIComponent(e)}`)}async function SA(e){const t=await fetch("/api/projects",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok){const n=await t.text();throw new Error(`${t.status}: ${n}`)}return t.json()}function _A(e){return It(`/api/projects/${encodeURIComponent(e)}/conf`)}async function NA(e,t,n){const a=await fetch(`/api/projects/${encodeURIComponent(e)}/conf`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:t,etag:n})});if(!a.ok){const s=await a.text(),o=new Error(`${a.status}: ${s}`);throw o.status=a.status,o}return a.json()}async function CA(e,t={}){const n=await fetch(`/api/projects/${encodeURIComponent(e)}`,{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){const a=await n.text();throw new Error(`${n.status}: ${a}`)}return n.json()}function TA(e){return It(`/api/projects/${encodeURIComponent(e)}/pipelines`)}async function AA(e,t){const n=await fetch(`/api/projects/${encodeURIComponent(e)}/pipeline`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({pipeline:t})});if(!n.ok){const a=await n.text();throw new Error(`${n.status}: ${a}`)}return n.json()}function jA(e,t){return It(`/api/projects/${encodeURIComponent(e)}/pipelines/${encodeURIComponent(t)}`)}async function OA(e,t,n,a){const s=await fetch(`/api/projects/${encodeURIComponent(e)}/pipelines/${encodeURIComponent(t)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:n,etag:a})});if(!s.ok){const o=await s.text(),c=new Error(`${s.status}: ${o}`);throw c.status=s.status,c}return s.json()}async function DA(e,t,n="blank"){const a=await fetch(`/api/projects/${encodeURIComponent(e)}/pipelines`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:t,template:n})});if(!a.ok){const s=await a.text();throw new Error(`${a.status}: ${s}`)}return a.json()}async function MA(e,t){const n=await fetch(`/api/projects/${encodeURIComponent(e)}/pipelines/${encodeURIComponent(t)}`,{method:"DELETE"});if(!n.ok){const a=await n.text();throw new Error(`${n.status}: ${a}`)}}function RA(){var h;const e=ze(),t=rt({queryKey:["system-info"],queryFn:wk,refetchInterval:3e4}),n=rt({queryKey:["projects"],queryFn:Nr,refetchInterval:1e4}),a=IA(),s=!t.isError,o=((h=n.data)==null?void 0:h.data)??[],c=o.filter(p=>p.pipelineStatus==="running").length,d=o.reduce((p,b)=>p+b.workers.active,0);return f.jsxs("div",{className:"h-10 flex items-center gap-3 px-6 font-[family-name:var(--font-mono)] text-[11px] text-[var(--color-text-muted)]",children:[f.jsx("span",{className:"nb-status",style:{background:s?"var(--color-running-bg)":"var(--color-crashed-bg)",color:s?"var(--color-running)":"var(--color-crashed)",padding:"2px 8px 2px 7px"},children:e(s?"status.server":"status.offline")}),f.jsx(LA,{state:a}),f.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),f.jsxs("span",{className:"flex items-center gap-1",title:e("status.pipelines.tooltip"),children:[f.jsx(zd,{size:10,strokeWidth:2.5}),f.jsx("span",{className:"font-bold text-[var(--color-text)]",children:c})," ",e("status.pipeline.unit")]}),f.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),f.jsxs("span",{className:"flex items-center gap-1",title:e("status.workers.tooltip"),children:[f.jsx(ok,{size:10,strokeWidth:2.5}),f.jsx("span",{className:"font-bold text-[var(--color-text)]",children:d})," ",e("status.worker.unit")]}),f.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),f.jsxs("span",{children:["localhost:",window.location.port]}),t.data&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),f.jsxs("span",{children:["v",t.data.version]}),f.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),f.jsxs("span",{children:["node ",t.data.nodeVersion]})]})]})}function LA({state:e}){const t=ze();return e==="open"?f.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)",padding:"2px 8px 2px 7px"},children:t("status.sse.open")}):e==="connecting"?f.jsx("span",{className:"nb-status",style:{background:"var(--color-stuck-bg)",color:"var(--color-stuck)",padding:"2px 8px 2px 7px"},children:t("status.sse.connecting")}):f.jsxs("span",{className:"nb-status",style:{background:"var(--color-crashed-bg)",color:"var(--color-crashed)",padding:"2px 8px 2px 7px"},children:[f.jsx(sc,{size:9,strokeWidth:2.5}),t("status.sse.down")]})}function IA(){const[e,t]=C.useState("connecting");return C.useEffect(()=>{let n=null,a=null,s=!1;const o=()=>{s||(n=new EventSource("/stream/heartbeat"),n.addEventListener("server.heartbeat",()=>t("open")),n.addEventListener("open",()=>t("open")),n.addEventListener("error",()=>{(n==null?void 0:n.readyState)===EventSource.CLOSED?(t("closed"),a==null&&(a=setTimeout(()=>{a=null,n==null||n.close(),o()},1e4))):t("connecting")}))};return o(),()=>{s=!0,a!=null&&clearTimeout(a),n==null||n.close()}},[]),e}function zA(){return f.jsxs("div",{className:"grid grid-cols-[240px_1fr] grid-rows-[1fr_40px] h-screen",children:[f.jsx("aside",{className:"row-span-1 row-start-1 border-r-[3px] border-[var(--color-text)] bg-[var(--color-bg)] p-4 flex flex-col",children:f.jsx(mA,{})}),f.jsx("main",{className:"row-start-1 overflow-auto p-6 flex flex-col gap-4",children:f.jsx(YC,{})}),f.jsx("footer",{className:"col-span-2 row-start-2 border-t-[3px] border-[var(--color-text)] bg-[var(--color-bg)]",children:f.jsx(RA,{})})]})}function hm(e,t){try{const n=JSON.stringify({message:(e instanceof Error?e.message:String(e)).slice(0,1e3),stack:(e instanceof Error?e.stack??"":"").slice(0,4e3),url:typeof window<"u"?window.location.href:"",ua:typeof navigator<"u"?navigator.userAgent:"",ts:new Date().toISOString(),context:t==null?void 0:t.slice(0,200)});fetch("/api/system/client-errors",{method:"POST",headers:{"Content-Type":"application/json"},body:n,keepalive:!0}).catch(()=>{})}catch{}}function BA(){typeof window>"u"||(window.addEventListener("error",e=>{hm(e.error??e.message??"unknown error","window.error")}),window.addEventListener("unhandledrejection",e=>{const t=e.reason;hm(t instanceof Error?t:String(t),"unhandledrejection")}))}class PA extends C.Component{constructor(){super(...arguments);bv(this,"state",{error:null})}static getDerivedStateFromError(n){return{error:n}}componentDidCatch(n,a){var s;hm(n,`ErrorBoundary: ${((s=a.componentStack)==null?void 0:s.slice(0,200))??""}`),console.error("[ErrorBoundary]",n,a)}render(){if(this.state.error){const n=(()=>{try{return window.localStorage.getItem("sps-console-lang")==="zh"?"zh":"en"}catch{return"en"}})(),a=n==="zh"?"💥 UI 崩了":"💥 UI crashed",s=n==="zh"?"刷新页面":"Refresh page";return f.jsx("div",{className:"p-6",children:f.jsxs("div",{className:"nb-card max-w-2xl bg-[var(--color-crashed-bg)]",children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold mb-2",children:a}),f.jsx("p",{className:"text-sm mb-3 text-[var(--color-text-muted)]",children:this.state.error.message}),f.jsxs("details",{className:"text-xs mb-4",children:[f.jsx("summary",{className:"cursor-pointer font-semibold",children:"stack"}),f.jsx("pre",{className:"mt-2 font-[family-name:var(--font-mono)] overflow-auto max-h-60 bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded-md p-3",children:this.state.error.stack??"(no stack)"})]}),f.jsx("button",{className:"nb-btn nb-btn-mint",type:"button",onClick:()=>{this.setState({error:null}),window.location.reload()},children:s})]})})}return this.props.children}}function UA(){const e=ze(),t=_r(),{data:n,isLoading:a,isError:s,error:o,refetch:c}=rt({queryKey:["projects"],queryFn:Nr});return f.jsxs("div",{className:"flex flex-col gap-6 max-w-6xl",children:[f.jsxs("header",{className:"flex items-center justify-between",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:e("projects.title")}),f.jsx("p",{className:"text-[var(--color-text-muted)] text-sm mt-1",children:n?e("projects.count",{count:n.data.length}):e(a?"common.loading":"projects.refresh.hint")})]}),f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsxs("button",{className:"nb-btn nb-btn-yellow",onClick:()=>c(),type:"button",children:[f.jsx(zd,{size:16,strokeWidth:2.5}),e("common.refresh")]}),f.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",onClick:()=>t("/projects/new"),"aria-label":e("projects.new"),children:[f.jsx(Bi,{size:16,strokeWidth:3}),e("projects.new")]})]})]}),a&&f.jsx($A,{}),s&&f.jsxs("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-2",children:e("projects.load.failed")}),f.jsx("p",{className:"text-sm text-[var(--color-text)]",children:o instanceof Error?o.message:String(o)}),f.jsx("button",{className:"nb-btn mt-4",onClick:()=>c(),type:"button",children:e("common.retry")})]}),n&&n.data.length===0&&f.jsx(HA,{}),n&&n.data.length>0&&f.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:n.data.map(d=>f.jsx(FA,{project:d},d.name))})]})}function FA({project:e}){const t=e.pipelineStatus==="running";return f.jsxs(ps,{to:`/projects/${encodeURIComponent(e.name)}`,className:"nb-card nb-card-interactive block no-underline text-[var(--color-text)]",children:[f.jsxs("div",{className:"flex items-center justify-between mb-3",children:[f.jsx("h3",{className:"font-[family-name:var(--font-heading)] font-bold text-xl truncate",children:e.name}),f.jsx(qA,{status:e.pipelineStatus})]}),e.repoDir&&f.jsx("p",{className:"text-xs font-[family-name:var(--font-mono)] text-[var(--color-text-muted)] truncate mb-3",children:e.repoDir}),f.jsxs("div",{className:"grid grid-cols-3 gap-2 text-sm mt-4 pt-3 border-t-[1.5px] border-dashed border-[var(--color-border-light)]",children:[f.jsx(gp,{label:"cards",value:e.cards.total,accent:"purple"}),f.jsx(gp,{label:"inprogress",value:e.cards.inprogress,accent:e.cards.inprogress>0?"yellow":"idle"}),f.jsx(gp,{label:"workers",value:`${e.workers.active}/${e.workers.total}`,accent:t?"mint":"idle"})]})]})}function gp({label:e,value:t,accent:n}){const a={purple:"var(--color-accent-purple)",yellow:"var(--color-accent-yellow)",mint:"var(--color-accent-mint)",idle:"var(--color-bg-cream)"};return f.jsxs("div",{className:"flex flex-col items-center justify-center py-2 rounded-lg border-2 border-[var(--color-text)]",style:{background:a[n]},children:[f.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold text-lg",children:t}),f.jsx("span",{className:"text-[10px] uppercase tracking-wider text-[var(--color-text-muted)] font-semibold",children:e})]})}function qA({status:e}){const t={running:{bg:"var(--color-running-bg)",label:"running"},idle:{bg:"var(--color-idle-bg)",label:"idle"},stopping:{bg:"var(--color-stuck-bg)",label:"stopping"},error:{bg:"var(--color-crashed-bg)",label:"error"}},{bg:n,label:a}=t[e],s=e==="running"?"var(--color-running)":e==="error"?"var(--color-crashed)":e==="stopping"?"var(--color-stuck)":"var(--color-idle)";return f.jsx("span",{className:"nb-status",style:{background:n,color:s},children:a})}function $A(){return f.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[0,1,2].map(e=>f.jsxs("div",{className:"nb-card opacity-60 animate-pulse",children:[f.jsx("div",{className:"h-6 w-32 bg-[var(--color-border-light)] rounded-md mb-3"}),f.jsx("div",{className:"h-3 w-full bg-[var(--color-border-light)] rounded-md mb-2"}),f.jsx("div",{className:"h-3 w-2/3 bg-[var(--color-border-light)] rounded-md"})]},e))})}function HA(){const e=ze(),t=e("projects.empty.hint",{cmd:"__CMD__"}),[n,a]=t.split("__CMD__");return f.jsxs("div",{className:"nb-card bg-[var(--color-accent-yellow)] flex items-center gap-6 p-8",children:[f.jsx("div",{className:"w-20 h-20 rounded-2xl bg-[var(--color-accent-mint)] border-[3px] border-[var(--color-text)] shadow-[3px_3px_0_var(--color-text)] flex items-center justify-center",children:f.jsx(pk,{size:32,strokeWidth:2.5})}),f.jsxs("div",{className:"flex-1",children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold mb-2",children:e("projects.empty.title")}),f.jsxs("p",{className:"text-sm text-[var(--color-text)] mb-4",children:[n,f.jsx("code",{className:"bg-[var(--color-bg)] border-2 border-[var(--color-text)] px-2 py-0.5 rounded-md font-[family-name:var(--font-mono)]",children:"sps project init <name>"}),a]}),f.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",children:[f.jsx(Bi,{size:16,strokeWidth:3}),e("projects.new")]})]})]})}function KA(e){const t=e?`?path=${encodeURIComponent(e)}`:"";return It(`/api/fs/browse${t}`)}const kk=50*1024*1024;async function GA(e,t){if(t.size>kk)throw new Error(`文件超过 50 MB 上限(当前 ${(t.size/1024/1024).toFixed(2)} MB)`);const n=new FormData;n.append("sessionId",e),n.append("file",t,t.name);const a=await fetch("/api/fs/upload",{method:"POST",body:n});if(!a.ok){const s=await a.text();throw new Error(`${a.status}: ${s}`)}return await a.json()}function pm(e,t){return`/api/fs/file?${new URLSearchParams({path:t,sessionId:e}).toString()}`}function Zm({initialPath:e,onCancel:t,onSelect:n,title:a,mode:s="directory"}){var w,S,_;const o=ze(),c=a??o("dirPicker.title.default"),[d,h]=C.useState(e??null),[p,b]=C.useState(null),g=rt({queryKey:["fs-browse",d],queryFn:()=>KA(d??void 0),staleTime:0,gcTime:0}),v=((w=g.data)==null?void 0:w.path)??d??"",x=((S=g.data)==null?void 0:S.parent)??null,E=((_=g.data)==null?void 0:_.home)??null;return C.useEffect(()=>{const A=T=>{T.key==="Escape"&&(T.preventDefault(),t())};return window.addEventListener("keydown",A),()=>window.removeEventListener("keydown",A)},[t]),f.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-[rgba(45,55,72,0.5)] p-4",role:"presentation",children:f.jsxs("div",{className:"nb-card bg-[var(--color-bg)] max-w-lg w-full p-5 flex flex-col",style:{maxHeight:"70vh"},role:"dialog","aria-modal":"true","aria-label":c,children:[f.jsxs("header",{className:"flex items-center justify-between mb-3 shrink-0",children:[f.jsx("h3",{className:"font-[family-name:var(--font-heading)] font-bold text-base",children:c}),f.jsx("button",{type:"button",className:"p-1 hover:bg-[var(--color-bg-cream)] rounded",onClick:t,"aria-label":o("dirPicker.close.aria"),children:f.jsx(Si,{size:14,strokeWidth:3})})]}),f.jsxs("div",{className:"flex items-center gap-2 mb-3 shrink-0",children:[f.jsx("button",{type:"button",className:"nb-btn flex-shrink-0",style:{padding:"4px 10px",fontSize:12},onClick:()=>x&&h(x),disabled:!x||g.isLoading,"aria-label":o("dirPicker.up.aria"),title:o("dirPicker.up.title"),children:f.jsx(B2,{size:12,strokeWidth:3})}),f.jsx("button",{type:"button",className:"nb-btn flex-shrink-0",style:{padding:"4px 10px",fontSize:12},onClick:()=>E&&h(E),disabled:!E||g.isLoading,"aria-label":o("dirPicker.home.aria"),title:o("dirPicker.home.title"),children:f.jsx(vT,{size:12,strokeWidth:3})}),f.jsx("div",{className:"flex-1 min-w-0 nb-input font-[family-name:var(--font-mono)] text-xs px-2 py-1.5 truncate",title:v,dir:"rtl",children:v||"..."})]}),f.jsxs("div",{className:"flex-1 overflow-y-auto border-2 border-[var(--color-text)] rounded-lg bg-[var(--color-bg-cream)] min-h-0",children:[g.isLoading&&f.jsxs("div",{className:"flex items-center justify-center py-12 text-[var(--color-text-muted)]",children:[f.jsx(jt,{size:16,strokeWidth:3,className:"animate-spin mr-2"}),o("dirPicker.loading")]}),g.isError&&f.jsxs("div",{className:"p-4 text-sm text-[var(--color-crashed)]",children:[f.jsx("p",{className:"font-bold mb-1",children:o("dirPicker.error.title")}),f.jsx("p",{className:"text-xs font-[family-name:var(--font-mono)] break-all",children:g.error instanceof Error?g.error.message:String(g.error)})]}),g.data&&f.jsxs("ul",{className:"divide-y-2 divide-[var(--color-text)]/20",children:[g.data.entries.length===0&&f.jsx("li",{className:"p-4 text-xs text-[var(--color-text-subtle)] italic text-center",children:o("dirPicker.empty")}),g.data.entries.map(A=>{const T=(()=>{const M=v.endsWith("/")||v.endsWith("\\")?"":"/";return`${v}${M}${A.name}`})(),D=s==="file"&&p===T,B=A.isDirectory||s==="file";return f.jsx("li",{children:f.jsxs("button",{type:"button",className:["w-full flex items-center gap-2 px-3 py-2 text-left text-sm font-[family-name:var(--font-mono)]","disabled:opacity-50 disabled:cursor-not-allowed",D?"bg-[var(--color-accent-mint)] font-bold":"hover:bg-[var(--color-accent-mint)]"].join(" "),disabled:!B,onClick:()=>{A.isDirectory?(b(null),h(T)):s==="file"&&b(T)},onDoubleClick:()=>{s==="file"&&!A.isDirectory&&n(T)},title:A.isDirectory?o("dirPicker.enter.aria",{name:A.name}):s==="file"?o("dirPicker.pickFile.aria",{name:A.name}):o("dirPicker.fileLocked"),children:[A.isDirectory?f.jsx(oc,{size:14,strokeWidth:2.5,className:"flex-shrink-0 text-[var(--color-text)]"}):f.jsx("span",{className:"w-3.5 h-3.5 flex-shrink-0"}),f.jsx("span",{className:"truncate",children:A.name}),A.isDirectory&&f.jsx(Bd,{size:12,strokeWidth:2.5,className:"ml-auto flex-shrink-0 text-[var(--color-text-muted)]"})]})},A.name)})]})]}),f.jsxs("div",{className:"flex gap-2 justify-end pt-3 shrink-0",children:[f.jsx("button",{type:"button",className:"nb-btn",onClick:t,children:o("dirPicker.cancel")}),s==="file"?f.jsxs("button",{type:"button",className:"nb-btn nb-btn-primary",onClick:()=>p&&n(p),disabled:!p||g.isLoading||g.isError,title:p??o("dirPicker.useFile.tooltip.empty"),children:[f.jsx(lc,{size:14,strokeWidth:3}),o("dirPicker.useFile")]}):f.jsxs("button",{type:"button",className:"nb-btn nb-btn-primary",onClick:()=>n(v),disabled:!v||g.isLoading||g.isError,children:[f.jsx(lc,{size:14,strokeWidth:3}),o("dirPicker.useDir")]})]})]})})}function QA({title:e,body:t,confirm:n,cancel:a,onConfirm:s,onCancel:o,danger:c}){const d=ze();return C.useEffect(()=>{const h=p=>{p.key==="Escape"&&o()};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[o]),f.jsx("div",{role:"dialog","aria-modal":"true","aria-labelledby":"confirm-title",className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/30",children:f.jsxs("div",{className:"nb-card max-w-md w-full",children:[f.jsx("h2",{id:"confirm-title",className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-2",children:e}),f.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mb-5",children:t}),f.jsxs("div",{className:"flex gap-3 justify-end",children:[f.jsx("button",{className:"nb-btn",onClick:o,type:"button",children:a??d("dialog.cancel.default")}),f.jsx("button",{className:c?"nb-btn nb-btn-danger":"nb-btn nb-btn-yellow",onClick:async()=>{await s()},type:"button",children:n})]})]})})}const Ek=C.createContext(null);function YA({children:e}){const t=ze(),[n,a]=C.useState(null),s=C.useCallback(d=>new Promise(h=>{a({kind:"confirm",opts:d,resolve:p=>{a(null),h(p)}})}),[]),o=C.useCallback(d=>new Promise(h=>{a({kind:"alert",opts:d,resolve:()=>{a(null),h()}})}),[]),c=C.useCallback(d=>new Promise(h=>{a({kind:"prompt",opts:d,resolve:p=>{a(null),h(p)}})}),[]);return f.jsxs(Ek.Provider,{value:{confirm:s,alert:o,prompt:c},children:[e,(n==null?void 0:n.kind)==="confirm"&&f.jsx(QA,{title:n.opts.title,body:n.opts.body,confirm:n.opts.confirm??t("dialog.confirm.default"),cancel:n.opts.cancel,danger:n.opts.danger,onConfirm:()=>n.resolve(!0),onCancel:()=>n.resolve(!1)}),(n==null?void 0:n.kind)==="alert"&&f.jsx(VA,{title:n.opts.title,body:n.opts.body,confirm:n.opts.confirm??t("dialog.alert.default"),onClose:()=>n.resolve()}),(n==null?void 0:n.kind)==="prompt"&&f.jsx(WA,{title:n.opts.title,body:n.opts.body,placeholder:n.opts.placeholder,defaultValue:n.opts.defaultValue,confirm:n.opts.confirm??t("dialog.confirm.default"),cancel:n.opts.cancel??t("dialog.cancel.default"),onConfirm:d=>n.resolve(d),onCancel:()=>n.resolve(null)})]})}function Ci(){const e=C.useContext(Ek);if(!e)throw new Error("useDialog must be used inside <DialogProvider>");return e}function VA({title:e,body:t,confirm:n,onClose:a}){return C.useEffect(()=>{const s=o=>{(o.key==="Escape"||o.key==="Enter")&&a()};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[a]),f.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/30",children:f.jsxs("div",{className:"nb-card max-w-md w-full",children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-2",children:e}),f.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mb-5 whitespace-pre-wrap break-words",children:t}),f.jsx("div",{className:"flex gap-3 justify-end",children:f.jsx("button",{className:"nb-btn nb-btn-primary",onClick:a,type:"button",autoFocus:!0,children:n})})]})})}function WA({title:e,body:t,placeholder:n,defaultValue:a,confirm:s,cancel:o,onConfirm:c,onCancel:d}){const[h,p]=C.useState(a??""),b=C.useRef(null);C.useEffect(()=>{var x,E;(x=b.current)==null||x.focus(),(E=b.current)==null||E.select();const v=w=>{w.key==="Escape"&&d()};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[d]);const g=()=>{const v=h.trim();v&&c(v)};return f.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/30",children:f.jsxs("div",{className:"nb-card max-w-md w-full",children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-2",children:e}),t&&f.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mb-3 whitespace-pre-wrap break-words",children:t}),f.jsx("input",{ref:b,type:"text",className:"nb-input w-full mb-5",placeholder:n,value:h,onChange:v=>p(v.target.value),onKeyDown:v=>{v.key==="Enter"&&!v.nativeEvent.isComposing&&(v.preventDefault(),g())}}),f.jsxs("div",{className:"flex gap-3 justify-end",children:[f.jsx("button",{className:"nb-btn",onClick:d,type:"button",children:o}),f.jsx("button",{className:"nb-btn nb-btn-primary",onClick:g,type:"button",disabled:!h.trim(),children:s})]})]})})}function XA(){const e=ze(),t=_r(),n=En(),{alert:a}=Ci(),[s,o]=C.useState({name:"",projectDir:"",enableGit:!0,createIfMissing:!0,mergeBranch:"main",maxWorkers:"1",ackTimeoutMin:"5"}),[c,d]=C.useState(!1),h=Mn({mutationFn:x=>SA(x),onSuccess:x=>{n.invalidateQueries({queryKey:["projects"]}),t(`/projects/${encodeURIComponent(x.name)}`)},onError:x=>{a({title:e("newProject.error.create.title"),body:x instanceof Error?x.message:String(x)})}}),p=/^[a-zA-Z0-9_-]+$/.test(s.name),b=p&&s.projectDir.trim()!==""&&!h.isPending,v=e("newProject.field.wiki.detail",{wikiCode:"__WIKI_CODE__",wikiInit:"__WIKI_INIT__"}).split(/__WIKI_(?:CODE|INIT)__/);return f.jsxs("div",{className:"flex flex-col gap-5 max-w-2xl",children:[f.jsxs("header",{className:"flex items-center gap-3",children:[f.jsxs("button",{type:"button",onClick:()=>t("/projects"),className:"nb-btn",style:{padding:"6px 12px"},"aria-label":e("newProject.back.aria"),children:[f.jsx(ik,{size:14,strokeWidth:3}),e("newProject.back")]}),f.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-3xl font-bold",children:e("newProject.title")})]}),f.jsx("div",{className:"nb-card",children:f.jsxs("form",{onSubmit:x=>{x.preventDefault(),b&&h.mutate(s)},className:"flex flex-col gap-5",children:[f.jsxs(lr,{label:e("newProject.field.name"),hint:e("newProject.field.name.example"),children:[f.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:e("newProject.field.name.placeholder"),value:s.name,onChange:x=>o({...s,name:x.target.value}),autoFocus:!0,required:!0}),s.name&&!p&&f.jsx("p",{className:"text-xs text-[var(--color-crashed)] mt-1",children:e("newProject.field.name.invalid")})]}),f.jsxs(lr,{label:e("newProject.field.dir"),hint:e("newProject.field.dir.long"),children:[f.jsxs("div",{className:"flex gap-2",children:[f.jsx("input",{type:"text",className:"nb-input flex-1 font-[family-name:var(--font-mono)]",placeholder:e("newProject.field.dir.placeholder"),value:s.projectDir,onChange:x=>o({...s,projectDir:x.target.value}),required:!0}),f.jsxs("button",{type:"button",className:"nb-btn flex-shrink-0",onClick:()=>d(!0),"aria-label":e("newProject.dir.browseAria"),title:e("newProject.dir.browseAria"),children:[f.jsx(lk,{size:14,strokeWidth:2.5}),e("newProject.dir.browse")]})]}),f.jsxs("label",{className:"flex items-center gap-2 mt-2 cursor-pointer select-none",children:[f.jsx("input",{type:"checkbox",checked:s.createIfMissing!==!1,onChange:x=>o({...s,createIfMissing:x.target.checked}),className:"w-4 h-4 cursor-pointer"}),f.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:e("newProject.field.dir.createIfMissing")})]})]}),f.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[f.jsx(lr,{label:e("newProject.field.maxWorkers.short"),children:f.jsx("input",{type:"number",min:"1",max:"8",className:"nb-input w-full font-[family-name:var(--font-mono)]",value:s.maxWorkers,onChange:x=>o({...s,maxWorkers:x.target.value})})}),f.jsx(lr,{label:e("newProject.field.ackTimeout.minutes"),hint:e("newProject.field.ackTimeout.minutes.help"),children:f.jsx("input",{type:"number",min:"1",max:"30",className:"nb-input w-full font-[family-name:var(--font-mono)]",value:s.ackTimeoutMin??"5",onChange:x=>o({...s,ackTimeoutMin:x.target.value})})})]}),f.jsxs("div",{className:"pt-3 border-t-2 border-[var(--color-text)] border-dashed",children:[f.jsxs("label",{className:"flex items-center gap-3 mb-3 cursor-pointer select-none",children:[f.jsx("input",{type:"checkbox",checked:s.enableGit??!0,onChange:x=>o({...s,enableGit:x.target.checked}),className:"w-4 h-4 cursor-pointer"}),f.jsx("span",{className:"text-sm font-bold",children:e("newProject.field.git.label")})]}),f.jsx("p",{className:"text-xs text-[var(--color-text-muted)] mb-3",children:e("newProject.field.git.detail")}),s.enableGit!==!1&&f.jsxs("div",{className:"flex flex-col gap-4 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg p-4",children:[f.jsx(lr,{label:e("newProject.field.git.branch"),children:f.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",value:s.mergeBranch??"main",onChange:x=>o({...s,mergeBranch:x.target.value})})}),f.jsx(lr,{label:e("newProject.field.gitlabProject.label"),hint:e("newProject.field.gitlabProject.help2"),children:f.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:e("newProject.field.gitlabProject.placeholder"),value:s.gitlabProject??"",onChange:x=>o({...s,gitlabProject:x.target.value})})}),s.gitlabProject&&f.jsx(lr,{label:e("newProject.field.gitlabProjectId"),hint:e("newProject.field.gitlabProjectId.help"),children:f.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:e("newProject.field.gitlabProjectId.placeholder"),value:s.gitlabProjectId??"",onChange:x=>o({...s,gitlabProjectId:x.target.value})})})]})]}),f.jsxs("div",{className:"pt-3 border-t-2 border-[var(--color-text)] border-dashed",children:[f.jsxs("label",{className:"flex items-center gap-3 mb-3 cursor-pointer select-none",children:[f.jsx("input",{type:"checkbox",checked:s.enableWiki===!0,onChange:x=>o({...s,enableWiki:x.target.checked}),className:"w-4 h-4 cursor-pointer"}),f.jsx("span",{className:"text-sm font-bold",children:e("newProject.field.wiki.label")})]}),f.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:[v[0],f.jsx("code",{className:"font-mono",children:"wiki/"}),v[1],f.jsx("code",{className:"font-mono",children:"sps wiki init"}),v[2]]})]}),f.jsxs("div",{className:"pt-3 border-t-2 border-[var(--color-text)] border-dashed",children:[f.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold uppercase tracking-wider mb-3 text-[var(--color-text-muted)]",children:e("newProject.section.notifications")}),f.jsx(lr,{label:e("newProject.field.matrixRoom.label"),hint:e("newProject.field.matrixRoom.help2"),children:f.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:e("newProject.field.matrixRoom.placeholder"),value:s.matrixRoomId??"",onChange:x=>o({...s,matrixRoomId:x.target.value})})})]}),f.jsxs("div",{className:"flex gap-3 justify-end pt-3",children:[f.jsx("button",{type:"button",className:"nb-btn",onClick:()=>t("/projects"),disabled:h.isPending,children:e("common.cancel")}),f.jsx("button",{type:"submit",className:"nb-btn nb-btn-primary",disabled:!b,"aria-label":e("newProject.submit"),children:h.isPending?f.jsxs(f.Fragment,{children:[f.jsx(jt,{size:14,strokeWidth:3,className:"animate-spin"}),e("newProject.creating")]}):f.jsxs(f.Fragment,{children:[f.jsx(Bi,{size:14,strokeWidth:3}),e("common.create")]})})]})]})}),c&&f.jsx(Zm,{title:e("newProject.field.dir.pickerTitle"),initialPath:s.projectDir.trim()||void 0,onCancel:()=>d(!1),onSelect:x=>{o({...s,projectDir:x}),d(!1)}})]})}function lr({label:e,hint:t,children:n}){return f.jsxs("label",{className:"flex flex-col gap-1.5",children:[f.jsx("span",{className:"text-sm font-bold",children:e}),n,t&&f.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:t})]})}const Jm=Symbol.for("yaml.alias"),mm=Symbol.for("yaml.document"),kr=Symbol.for("yaml.map"),Sk=Symbol.for("yaml.pair"),ea=Symbol.for("yaml.scalar"),Bl=Symbol.for("yaml.seq"),_i=Symbol.for("yaml.node.type"),Cr=e=>!!e&&typeof e=="object"&&e[_i]===Jm,ms=e=>!!e&&typeof e=="object"&&e[_i]===mm,Pl=e=>!!e&&typeof e=="object"&&e[_i]===kr,Lt=e=>!!e&&typeof e=="object"&&e[_i]===Sk,Et=e=>!!e&&typeof e=="object"&&e[_i]===ea,Ul=e=>!!e&&typeof e=="object"&&e[_i]===Bl;function Pt(e){if(e&&typeof e=="object")switch(e[_i]){case kr:case Bl:return!0}return!1}function Ut(e){if(e&&typeof e=="object")switch(e[_i]){case Jm:case kr:case ea:case Bl:return!0}return!1}const _k=e=>(Et(e)||Pt(e))&&!!e.anchor,Qn=Symbol("break visit"),Nk=Symbol("skip children"),Ji=Symbol("remove node");function gs(e,t){const n=Ck(t);ms(e)?dl(null,e.contents,n,Object.freeze([e]))===Ji&&(e.contents=null):dl(null,e,n,Object.freeze([]))}gs.BREAK=Qn;gs.SKIP=Nk;gs.REMOVE=Ji;function dl(e,t,n,a){const s=Tk(e,t,n,a);if(Ut(s)||Lt(s))return Ak(e,a,s),dl(e,s,n,a);if(typeof s!="symbol"){if(Pt(t)){a=Object.freeze(a.concat(t));for(let o=0;o<t.items.length;++o){const c=dl(o,t.items[o],n,a);if(typeof c=="number")o=c-1;else{if(c===Qn)return Qn;c===Ji&&(t.items.splice(o,1),o-=1)}}}else if(Lt(t)){a=Object.freeze(a.concat(t));const o=dl("key",t.key,n,a);if(o===Qn)return Qn;o===Ji&&(t.key=null);const c=dl("value",t.value,n,a);if(c===Qn)return Qn;c===Ji&&(t.value=null)}}return s}async function Ud(e,t){const n=Ck(t);ms(e)?await fl(null,e.contents,n,Object.freeze([e]))===Ji&&(e.contents=null):await fl(null,e,n,Object.freeze([]))}Ud.BREAK=Qn;Ud.SKIP=Nk;Ud.REMOVE=Ji;async function fl(e,t,n,a){const s=await Tk(e,t,n,a);if(Ut(s)||Lt(s))return Ak(e,a,s),fl(e,s,n,a);if(typeof s!="symbol"){if(Pt(t)){a=Object.freeze(a.concat(t));for(let o=0;o<t.items.length;++o){const c=await fl(o,t.items[o],n,a);if(typeof c=="number")o=c-1;else{if(c===Qn)return Qn;c===Ji&&(t.items.splice(o,1),o-=1)}}}else if(Lt(t)){a=Object.freeze(a.concat(t));const o=await fl("key",t.key,n,a);if(o===Qn)return Qn;o===Ji&&(t.key=null);const c=await fl("value",t.value,n,a);if(c===Qn)return Qn;c===Ji&&(t.value=null)}}return s}function Ck(e){return typeof e=="object"&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function Tk(e,t,n,a){var s,o,c,d,h;if(typeof n=="function")return n(e,t,a);if(Pl(t))return(s=n.Map)==null?void 0:s.call(n,e,t,a);if(Ul(t))return(o=n.Seq)==null?void 0:o.call(n,e,t,a);if(Lt(t))return(c=n.Pair)==null?void 0:c.call(n,e,t,a);if(Et(t))return(d=n.Scalar)==null?void 0:d.call(n,e,t,a);if(Cr(t))return(h=n.Alias)==null?void 0:h.call(n,e,t,a)}function Ak(e,t,n){const a=t[t.length-1];if(Pt(a))a.items[e]=n;else if(Lt(a))e==="key"?a.key=n:a.value=n;else if(ms(a))a.contents=n;else{const s=Cr(a)?"alias":"scalar";throw new Error(`Cannot replace node with ${s} parent`)}}const ZA={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},JA=e=>e.replace(/[!,[\]{}]/g,t=>ZA[t]);class Dn{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},Dn.defaultYaml,t),this.tags=Object.assign({},Dn.defaultTags,n)}clone(){const t=new Dn(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){const t=new Dn(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:Dn.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},Dn.defaultTags);break}return t}add(t,n){this.atNextDocument&&(this.yaml={explicit:Dn.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},Dn.defaultTags),this.atNextDocument=!1);const a=t.trim().split(/[ \t]+/),s=a.shift();switch(s){case"%TAG":{if(a.length!==2&&(n(0,"%TAG directive should contain exactly two parts"),a.length<2))return!1;const[o,c]=a;return this.tags[o]=c,!0}case"%YAML":{if(this.yaml.explicit=!0,a.length!==1)return n(0,"%YAML directive should contain exactly one part"),!1;const[o]=a;if(o==="1.1"||o==="1.2")return this.yaml.version=o,!0;{const c=/^\d+\.\d+$/.test(o);return n(6,`Unsupported YAML version ${o}`,c),!1}}default:return n(0,`Unknown directive ${s}`,!0),!1}}tagName(t,n){if(t==="!")return"!";if(t[0]!=="!")return n(`Not a valid tag: ${t}`),null;if(t[1]==="<"){const c=t.slice(2,-1);return c==="!"||c==="!!"?(n(`Verbatim tags aren't resolved, so ${t} is invalid.`),null):(t[t.length-1]!==">"&&n("Verbatim tags must end with a >"),c)}const[,a,s]=t.match(/^(.*!)([^!]*)$/s);s||n(`The ${t} tag has no suffix`);const o=this.tags[a];if(o)try{return o+decodeURIComponent(s)}catch(c){return n(String(c)),null}return a==="!"?t:(n(`Could not resolve tag: ${t}`),null)}tagString(t){for(const[n,a]of Object.entries(this.tags))if(t.startsWith(a))return n+JA(t.substring(a.length));return t[0]==="!"?t:`!<${t}>`}toString(t){const n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],a=Object.entries(this.tags);let s;if(t&&a.length>0&&Ut(t.contents)){const o={};gs(t.contents,(c,d)=>{Ut(d)&&d.tag&&(o[d.tag]=!0)}),s=Object.keys(o)}else s=[];for(const[o,c]of a)o==="!!"&&c==="tag:yaml.org,2002:"||(!t||s.some(d=>d.startsWith(c)))&&n.push(`%TAG ${o} ${c}`);return n.join(`
378
- `)}}Dn.defaultYaml={explicit:!1,version:"1.2"};Dn.defaultTags={"!!":"tag:yaml.org,2002:"};function jk(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw new Error(n)}return!0}function Ok(e){const t=new Set;return gs(e,{Value(n,a){a.anchor&&t.add(a.anchor)}}),t}function Dk(e,t){for(let n=1;;++n){const a=`${e}${n}`;if(!t.has(a))return a}}function ej(e,t){const n=[],a=new Map;let s=null;return{onAnchor:o=>{n.push(o),s??(s=Ok(e));const c=Dk(t,s);return s.add(c),c},setAnchors:()=>{for(const o of n){const c=a.get(o);if(typeof c=="object"&&c.anchor&&(Et(c.node)||Pt(c.node)))c.node.anchor=c.anchor;else{const d=new Error("Failed to resolve repeated object (this should not happen)");throw d.source=o,d}}},sourceObjects:a}}function hl(e,t,n,a){if(a&&typeof a=="object")if(Array.isArray(a))for(let s=0,o=a.length;s<o;++s){const c=a[s],d=hl(e,a,String(s),c);d===void 0?delete a[s]:d!==c&&(a[s]=d)}else if(a instanceof Map)for(const s of Array.from(a.keys())){const o=a.get(s),c=hl(e,a,s,o);c===void 0?a.delete(s):c!==o&&a.set(s,c)}else if(a instanceof Set)for(const s of Array.from(a)){const o=hl(e,a,s,s);o===void 0?a.delete(s):o!==s&&(a.delete(s),a.add(o))}else for(const[s,o]of Object.entries(a)){const c=hl(e,a,s,o);c===void 0?delete a[s]:c!==o&&(a[s]=c)}return e.call(t,n,a)}function ki(e,t,n){if(Array.isArray(e))return e.map((a,s)=>ki(a,String(s),n));if(e&&typeof e.toJSON=="function"){if(!n||!_k(e))return e.toJSON(t,n);const a={aliasCount:0,count:1,res:void 0};n.anchors.set(e,a),n.onCreate=o=>{a.res=o,delete n.onCreate};const s=e.toJSON(t,n);return n.onCreate&&n.onCreate(s),s}return typeof e=="bigint"&&!(n!=null&&n.keep)?Number(e):e}class eg{constructor(t){Object.defineProperty(this,_i,{value:t})}clone(){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(t.range=this.range.slice()),t}toJS(t,{mapAsMap:n,maxAliasCount:a,onAnchor:s,reviver:o}={}){if(!ms(t))throw new TypeError("A document argument is required");const c={anchors:new Map,doc:t,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof a=="number"?a:100},d=ki(this,"",c);if(typeof s=="function")for(const{count:h,res:p}of c.anchors.values())s(p,h);return typeof o=="function"?hl(o,{"":d},"",d):d}}class Fd extends eg{constructor(t){super(Jm),this.source=t,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(t,n){let a;n!=null&&n.aliasResolveCache?a=n.aliasResolveCache:(a=[],gs(t,{Node:(o,c)=>{(Cr(c)||_k(c))&&a.push(c)}}),n&&(n.aliasResolveCache=a));let s;for(const o of a){if(o===this)break;o.anchor===this.source&&(s=o)}return s}toJSON(t,n){if(!n)return{source:this.source};const{anchors:a,doc:s,maxAliasCount:o}=n,c=this.resolve(s,n);if(!c){const h=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(h)}let d=a.get(c);if(d||(ki(c,null,n),d=a.get(c)),(d==null?void 0:d.res)===void 0){const h="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(h)}if(o>=0&&(d.count+=1,d.aliasCount===0&&(d.aliasCount=hd(s,c,a)),d.count*d.aliasCount>o)){const h="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(h)}return d.res}toString(t,n,a){const s=`*${this.source}`;if(t){if(jk(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){const o=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(o)}if(t.implicitKey)return`${s} `}return s}}function hd(e,t,n){if(Cr(t)){const a=t.resolve(e),s=n&&a&&n.get(a);return s?s.count*s.aliasCount:0}else if(Pt(t)){let a=0;for(const s of t.items){const o=hd(e,s,n);o>a&&(a=o)}return a}else if(Lt(t)){const a=hd(e,t.key,n),s=hd(e,t.value,n);return Math.max(a,s)}return 1}const Mk=e=>!e||typeof e!="function"&&typeof e!="object";class Fe extends eg{constructor(t){super(ea),this.value=t}toJSON(t,n){return n!=null&&n.keep?this.value:ki(this.value,t,n)}toString(){return String(this.value)}}Fe.BLOCK_FOLDED="BLOCK_FOLDED";Fe.BLOCK_LITERAL="BLOCK_LITERAL";Fe.PLAIN="PLAIN";Fe.QUOTE_DOUBLE="QUOTE_DOUBLE";Fe.QUOTE_SINGLE="QUOTE_SINGLE";const tj="tag:yaml.org,2002:";function nj(e,t,n){if(t){const a=n.filter(o=>o.tag===t),s=a.find(o=>!o.format)??a[0];if(!s)throw new Error(`Tag ${t} not found`);return s}return n.find(a=>{var s;return((s=a.identify)==null?void 0:s.call(a,e))&&!a.format})}function cc(e,t,n){var g,v,x;if(ms(e)&&(e=e.contents),Ut(e))return e;if(Lt(e)){const E=(v=(g=n.schema[kr]).createNode)==null?void 0:v.call(g,n.schema,null,n);return E.items.push(e),E}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)&&(e=e.valueOf());const{aliasDuplicateObjects:a,onAnchor:s,onTagObj:o,schema:c,sourceObjects:d}=n;let h;if(a&&e&&typeof e=="object"){if(h=d.get(e),h)return h.anchor??(h.anchor=s(e)),new Fd(h.anchor);h={anchor:null,node:null},d.set(e,h)}t!=null&&t.startsWith("!!")&&(t=tj+t.slice(2));let p=nj(e,t,c.tags);if(!p){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){const E=new Fe(e);return h&&(h.node=E),E}p=e instanceof Map?c[kr]:Symbol.iterator in Object(e)?c[Bl]:c[kr]}o&&(o(p),delete n.onTagObj);const b=p!=null&&p.createNode?p.createNode(n.schema,e,n):typeof((x=p==null?void 0:p.nodeClass)==null?void 0:x.from)=="function"?p.nodeClass.from(n.schema,e,n):new Fe(e);return t?b.tag=t:p.default||(b.tag=p.tag),h&&(h.node=b),b}function Ed(e,t,n){let a=n;for(let s=t.length-1;s>=0;--s){const o=t[s];if(typeof o=="number"&&Number.isInteger(o)&&o>=0){const c=[];c[o]=a,a=c}else a=new Map([[o,a]])}return cc(a,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}const Zo=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done;class Rk extends eg{constructor(t,n){super(t),Object.defineProperty(this,"schema",{value:n,configurable:!0,enumerable:!1,writable:!0})}clone(t){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return t&&(n.schema=t),n.items=n.items.map(a=>Ut(a)||Lt(a)?a.clone(t):a),this.range&&(n.range=this.range.slice()),n}addIn(t,n){if(Zo(t))this.add(n);else{const[a,...s]=t,o=this.get(a,!0);if(Pt(o))o.addIn(s,n);else if(o===void 0&&this.schema)this.set(a,Ed(this.schema,s,n));else throw new Error(`Expected YAML collection at ${a}. Remaining path: ${s}`)}}deleteIn(t){const[n,...a]=t;if(a.length===0)return this.delete(n);const s=this.get(n,!0);if(Pt(s))return s.deleteIn(a);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${a}`)}getIn(t,n){const[a,...s]=t,o=this.get(a,!0);return s.length===0?!n&&Et(o)?o.value:o:Pt(o)?o.getIn(s,n):void 0}hasAllNullValues(t){return this.items.every(n=>{if(!Lt(n))return!1;const a=n.value;return a==null||t&&Et(a)&&a.value==null&&!a.commentBefore&&!a.comment&&!a.tag})}hasIn(t){const[n,...a]=t;if(a.length===0)return this.has(n);const s=this.get(n,!0);return Pt(s)?s.hasIn(a):!1}setIn(t,n){const[a,...s]=t;if(s.length===0)this.set(a,n);else{const o=this.get(a,!0);if(Pt(o))o.setIn(s,n);else if(o===void 0&&this.schema)this.set(a,Ed(this.schema,s,n));else throw new Error(`Expected YAML collection at ${a}. Remaining path: ${s}`)}}}const ij=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function Ta(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}const Jr=(e,t,n)=>e.endsWith(`
379
- `)?Ta(n,t):n.includes(`
380
- `)?`
381
- `+Ta(n,t):(e.endsWith(" ")?"":" ")+n,Lk="flow",gm="block",pd="quoted";function qd(e,t,n="flow",{indentAtStart:a,lineWidth:s=80,minContentWidth:o=20,onFold:c,onOverflow:d}={}){if(!s||s<0)return e;s<o&&(o=0);const h=Math.max(1+o,1+s-t.length);if(e.length<=h)return e;const p=[],b={};let g=s-t.length;typeof a=="number"&&(a>s-Math.max(2,o)?p.push(0):g=s-a);let v,x,E=!1,w=-1,S=-1,_=-1;n===gm&&(w=Wv(e,w,t.length),w!==-1&&(g=w+h));for(let T;T=e[w+=1];){if(n===pd&&T==="\\"){switch(S=w,e[w+1]){case"x":w+=3;break;case"u":w+=5;break;case"U":w+=9;break;default:w+=1}_=w}if(T===`
382
- `)n===gm&&(w=Wv(e,w,t.length)),g=w+t.length+h,v=void 0;else{if(T===" "&&x&&x!==" "&&x!==`
383
- `&&x!==" "){const D=e[w+1];D&&D!==" "&&D!==`
384
- `&&D!==" "&&(v=w)}if(w>=g)if(v)p.push(v),g=v+h,v=void 0;else if(n===pd){for(;x===" "||x===" ";)x=T,T=e[w+=1],E=!0;const D=w>_+1?w-2:S-1;if(b[D])return e;p.push(D),b[D]=!0,g=D+h,v=void 0}else E=!0}x=T}if(E&&d&&d(),p.length===0)return e;c&&c();let A=e.slice(0,p[0]);for(let T=0;T<p.length;++T){const D=p[T],B=p[T+1]||e.length;D===0?A=`
385
- ${t}${e.slice(0,B)}`:(n===pd&&b[D]&&(A+=`${e[D]}\\`),A+=`
386
- ${t}${e.slice(D+1,B)}`)}return A}function Wv(e,t,n){let a=t,s=t+1,o=e[s];for(;o===" "||o===" ";)if(t<s+n)o=e[++t];else{do o=e[++t];while(o&&o!==`
387
- `);a=t,s=t+1,o=e[s]}return a}const $d=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),Hd=e=>/^(%|---|\.\.\.)/m.test(e);function aj(e,t,n){if(!t||t<0)return!1;const a=t-n,s=e.length;if(s<=a)return!1;for(let o=0,c=0;o<s;++o)if(e[o]===`
388
- `){if(o-c>a)return!0;if(c=o+1,s-c<=a)return!1}return!0}function Jo(e,t){const n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;const{implicitKey:a}=t,s=t.options.doubleQuotedMinMultiLineLength,o=t.indent||(Hd(e)?" ":"");let c="",d=0;for(let h=0,p=n[h];p;p=n[++h])if(p===" "&&n[h+1]==="\\"&&n[h+2]==="n"&&(c+=n.slice(d,h)+"\\ ",h+=1,d=h,p="\\"),p==="\\")switch(n[h+1]){case"u":{c+=n.slice(d,h);const b=n.substr(h+2,4);switch(b){case"0000":c+="\\0";break;case"0007":c+="\\a";break;case"000b":c+="\\v";break;case"001b":c+="\\e";break;case"0085":c+="\\N";break;case"00a0":c+="\\_";break;case"2028":c+="\\L";break;case"2029":c+="\\P";break;default:b.substr(0,2)==="00"?c+="\\x"+b.substr(2):c+=n.substr(h,6)}h+=5,d=h+1}break;case"n":if(a||n[h+2]==='"'||n.length<s)h+=1;else{for(c+=n.slice(d,h)+`
389
-
390
- `;n[h+2]==="\\"&&n[h+3]==="n"&&n[h+4]!=='"';)c+=`
391
- `,h+=2;c+=o,n[h+2]===" "&&(c+="\\"),h+=1,d=h+1}break;default:h+=1}return c=d?c+n.slice(d):n,a?c:qd(c,o,pd,$d(t,!1))}function bm(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
392
- `)||/[ \t]\n|\n[ \t]/.test(e))return Jo(e,t);const n=t.indent||(Hd(e)?" ":""),a="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
393
- ${n}`)+"'";return t.implicitKey?a:qd(a,n,Lk,$d(t,!1))}function pl(e,t){const{singleQuote:n}=t.options;let a;if(n===!1)a=Jo;else{const s=e.includes('"'),o=e.includes("'");s&&!o?a=bm:o&&!s?a=Jo:a=n?bm:Jo}return a(e,t)}let ym;try{ym=new RegExp(`(^|(?<!
394
- ))
395
- +(?!
396
- |$)`,"g")}catch{ym=/\n+(?!\n|$)/g}function md({comment:e,type:t,value:n},a,s,o){const{blockQuote:c,commentString:d,lineWidth:h}=a.options;if(!c||/\n[\t ]+$/.test(n))return pl(n,a);const p=a.indent||(a.forceBlockIndent||Hd(n)?" ":""),b=c==="literal"?!0:c==="folded"||t===Fe.BLOCK_FOLDED?!1:t===Fe.BLOCK_LITERAL?!0:!aj(n,h,p.length);if(!n)return b?`|
397
- `:`>
398
- `;let g,v;for(v=n.length;v>0;--v){const B=n[v-1];if(B!==`
399
- `&&B!==" "&&B!==" ")break}let x=n.substring(v);const E=x.indexOf(`
400
- `);E===-1?g="-":n===x||E!==x.length-1?(g="+",o&&o()):g="",x&&(n=n.slice(0,-x.length),x[x.length-1]===`
401
- `&&(x=x.slice(0,-1)),x=x.replace(ym,`$&${p}`));let w=!1,S,_=-1;for(S=0;S<n.length;++S){const B=n[S];if(B===" ")w=!0;else if(B===`
402
- `)_=S;else break}let A=n.substring(0,_<S?_+1:S);A&&(n=n.substring(A.length),A=A.replace(/\n+/g,`$&${p}`));let D=(w?p?"2":"1":"")+g;if(e&&(D+=" "+d(e.replace(/ ?[\r\n]+/g," ")),s&&s()),!b){const B=n.replace(/\n+/g,`
403
- $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${p}`);let M=!1;const q=$d(a,!0);c!=="folded"&&t!==Fe.BLOCK_FOLDED&&(q.onOverflow=()=>{M=!0});const F=qd(`${A}${B}${x}`,p,gm,q);if(!M)return`>${D}
404
- ${p}${F}`}return n=n.replace(/\n+/g,`$&${p}`),`|${D}
405
- ${p}${A}${n}${x}`}function rj(e,t,n,a){const{type:s,value:o}=e,{actualString:c,implicitKey:d,indent:h,indentStep:p,inFlow:b}=t;if(d&&o.includes(`
406
- `)||b&&/[[\]{},]/.test(o))return pl(o,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return d||b||!o.includes(`
407
- `)?pl(o,t):md(e,t,n,a);if(!d&&!b&&s!==Fe.PLAIN&&o.includes(`
408
- `))return md(e,t,n,a);if(Hd(o)){if(h==="")return t.forceBlockIndent=!0,md(e,t,n,a);if(d&&h===p)return pl(o,t)}const g=o.replace(/\n+/g,`$&
409
- ${h}`);if(c){const v=w=>{var S;return w.default&&w.tag!=="tag:yaml.org,2002:str"&&((S=w.test)==null?void 0:S.test(g))},{compat:x,tags:E}=t.doc.schema;if(E.some(v)||x!=null&&x.some(v))return pl(o,t)}return d?g:qd(g,h,Lk,$d(t,!1))}function Ec(e,t,n,a){const{implicitKey:s,inFlow:o}=t,c=typeof e.value=="string"?e:Object.assign({},e,{value:String(e.value)});let{type:d}=e;d!==Fe.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(c.value)&&(d=Fe.QUOTE_DOUBLE);const h=b=>{switch(b){case Fe.BLOCK_FOLDED:case Fe.BLOCK_LITERAL:return s||o?pl(c.value,t):md(c,t,n,a);case Fe.QUOTE_DOUBLE:return Jo(c.value,t);case Fe.QUOTE_SINGLE:return bm(c.value,t);case Fe.PLAIN:return rj(c,t,n,a);default:return null}};let p=h(d);if(p===null){const{defaultKeyType:b,defaultStringType:g}=t.options,v=s&&b||g;if(p=h(v),p===null)throw new Error(`Unsupported default string type ${v}`)}return p}function Ik(e,t){const n=Object.assign({blockQuote:!0,commentString:ij,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);let a;switch(n.collectionStyle){case"block":a=!1;break;case"flow":a=!0;break;default:a=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent=="number"?" ".repeat(n.indent):" ",inFlow:a,options:n}}function sj(e,t){var s;if(t.tag){const o=e.filter(c=>c.tag===t.tag);if(o.length>0)return o.find(c=>c.format===t.format)??o[0]}let n,a;if(Et(t)){a=t.value;let o=e.filter(c=>{var d;return(d=c.identify)==null?void 0:d.call(c,a)});if(o.length>1){const c=o.filter(d=>d.test);c.length>0&&(o=c)}n=o.find(c=>c.format===t.format)??o.find(c=>!c.format)}else a=t,n=e.find(o=>o.nodeClass&&a instanceof o.nodeClass);if(!n){const o=((s=a==null?void 0:a.constructor)==null?void 0:s.name)??(a===null?"null":typeof a);throw new Error(`Tag not resolved for ${o} value`)}return n}function lj(e,t,{anchors:n,doc:a}){if(!a.directives)return"";const s=[],o=(Et(e)||Pt(e))&&e.anchor;o&&jk(o)&&(n.add(o),s.push(`&${o}`));const c=e.tag??(t.default?null:t.tag);return c&&s.push(a.directives.tagString(c)),s.join(" ")}function jl(e,t,n,a){var h;if(Lt(e))return e.toString(t,n,a);if(Cr(e)){if(t.doc.directives)return e.toString(t);if((h=t.resolvedAliases)!=null&&h.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let s;const o=Ut(e)?e:t.doc.createNode(e,{onTagObj:p=>s=p});s??(s=sj(t.doc.schema.tags,o));const c=lj(o,s,t);c.length>0&&(t.indentAtStart=(t.indentAtStart??0)+c.length+1);const d=typeof s.stringify=="function"?s.stringify(o,t,n,a):Et(o)?Ec(o,t,n,a):o.toString(t,n,a);return c?Et(o)||d[0]==="{"||d[0]==="["?`${c} ${d}`:`${c}
410
- ${t.indent}${d}`:d}function oj({key:e,value:t},n,a,s){const{allNullValues:o,doc:c,indent:d,indentStep:h,options:{commentString:p,indentSeq:b,simpleKeys:g}}=n;let v=Ut(e)&&e.comment||null;if(g){if(v)throw new Error("With simple keys, key nodes cannot have comments");if(Pt(e)||!Ut(e)&&typeof e=="object"){const q="With simple keys, collection cannot be used as a key value";throw new Error(q)}}let x=!g&&(!e||v&&t==null&&!n.inFlow||Pt(e)||(Et(e)?e.type===Fe.BLOCK_FOLDED||e.type===Fe.BLOCK_LITERAL:typeof e=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!x&&(g||!o),indent:d+h});let E=!1,w=!1,S=jl(e,n,()=>E=!0,()=>w=!0);if(!x&&!n.inFlow&&S.length>1024){if(g)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");x=!0}if(n.inFlow){if(o||t==null)return E&&a&&a(),S===""?"?":x?`? ${S}`:S}else if(o&&!g||t==null&&x)return S=`? ${S}`,v&&!E?S+=Jr(S,n.indent,p(v)):w&&s&&s(),S;E&&(v=null),x?(v&&(S+=Jr(S,n.indent,p(v))),S=`? ${S}
411
- ${d}:`):(S=`${S}:`,v&&(S+=Jr(S,n.indent,p(v))));let _,A,T;Ut(t)?(_=!!t.spaceBefore,A=t.commentBefore,T=t.comment):(_=!1,A=null,T=null,t&&typeof t=="object"&&(t=c.createNode(t))),n.implicitKey=!1,!x&&!v&&Et(t)&&(n.indentAtStart=S.length+1),w=!1,!b&&h.length>=2&&!n.inFlow&&!x&&Ul(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let D=!1;const B=jl(t,n,()=>D=!0,()=>w=!0);let M=" ";if(v||_||A){if(M=_?`
412
- `:"",A){const q=p(A);M+=`
413
- ${Ta(q,n.indent)}`}B===""&&!n.inFlow?M===`
414
- `&&T&&(M=`
415
-
416
- `):M+=`
417
- ${n.indent}`}else if(!x&&Pt(t)){const q=B[0],F=B.indexOf(`
418
- `),ee=F!==-1,P=n.inFlow??t.flow??t.items.length===0;if(ee||!P){let X=!1;if(ee&&(q==="&"||q==="!")){let J=B.indexOf(" ");q==="&"&&J!==-1&&J<F&&B[J+1]==="!"&&(J=B.indexOf(" ",J+1)),(J===-1||F<J)&&(X=!0)}X||(M=`
419
- ${n.indent}`)}}else(B===""||B[0]===`
420
- `)&&(M="");return S+=M+B,n.inFlow?D&&a&&a():T&&!D?S+=Jr(S,n.indent,p(T)):w&&s&&s(),S}function zk(e,t){(e==="debug"||e==="warn")&&console.warn(t)}const Vu="<<",Aa={identify:e=>e===Vu||typeof e=="symbol"&&e.description===Vu,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new Fe(Symbol(Vu)),{addToJSMap:Bk}),stringify:()=>Vu},cj=(e,t)=>(Aa.identify(t)||Et(t)&&(!t.type||t.type===Fe.PLAIN)&&Aa.identify(t.value))&&(e==null?void 0:e.doc.schema.tags.some(n=>n.tag===Aa.tag&&n.default));function Bk(e,t,n){if(n=e&&Cr(n)?n.resolve(e.doc):n,Ul(n))for(const a of n.items)bp(e,t,a);else if(Array.isArray(n))for(const a of n)bp(e,t,a);else bp(e,t,n)}function bp(e,t,n){const a=e&&Cr(n)?n.resolve(e.doc):n;if(!Pl(a))throw new Error("Merge sources must be maps or map aliases");const s=a.toJSON(null,e,Map);for(const[o,c]of s)t instanceof Map?t.has(o)||t.set(o,c):t instanceof Set?t.add(o):Object.prototype.hasOwnProperty.call(t,o)||Object.defineProperty(t,o,{value:c,writable:!0,enumerable:!0,configurable:!0});return t}function Pk(e,t,{key:n,value:a}){if(Ut(n)&&n.addToJSMap)n.addToJSMap(e,t,a);else if(cj(e,n))Bk(e,t,a);else{const s=ki(n,"",e);if(t instanceof Map)t.set(s,ki(a,s,e));else if(t instanceof Set)t.add(s);else{const o=uj(n,s,e),c=ki(a,o,e);o in t?Object.defineProperty(t,o,{value:c,writable:!0,enumerable:!0,configurable:!0}):t[o]=c}}return t}function uj(e,t,n){if(t===null)return"";if(typeof t!="object")return String(t);if(Ut(e)&&(n!=null&&n.doc)){const a=Ik(n.doc,{});a.anchors=new Set;for(const o of n.anchors.keys())a.anchors.add(o.anchor);a.inFlow=!0,a.inStringifyKey=!0;const s=e.toString(a);if(!n.mapKeyWarned){let o=JSON.stringify(s);o.length>40&&(o=o.substring(0,36)+'..."'),zk(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${o}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return s}return JSON.stringify(t)}function tg(e,t,n){const a=cc(e,void 0,n),s=cc(t,void 0,n);return new kn(a,s)}class kn{constructor(t,n=null){Object.defineProperty(this,_i,{value:Sk}),this.key=t,this.value=n}clone(t){let{key:n,value:a}=this;return Ut(n)&&(n=n.clone(t)),Ut(a)&&(a=a.clone(t)),new kn(n,a)}toJSON(t,n){const a=n!=null&&n.mapAsMap?new Map:{};return Pk(n,a,this)}toString(t,n,a){return t!=null&&t.doc?oj(this,t,n,a):JSON.stringify(this)}}function Uk(e,t,n){return(t.inFlow??e.flow?fj:dj)(e,t,n)}function dj({comment:e,items:t},n,{blockItemPrefix:a,flowChars:s,itemIndent:o,onChompKeep:c,onComment:d}){const{indent:h,options:{commentString:p}}=n,b=Object.assign({},n,{indent:o,type:null});let g=!1;const v=[];for(let E=0;E<t.length;++E){const w=t[E];let S=null;if(Ut(w))!g&&w.spaceBefore&&v.push(""),Sd(n,v,w.commentBefore,g),w.comment&&(S=w.comment);else if(Lt(w)){const A=Ut(w.key)?w.key:null;A&&(!g&&A.spaceBefore&&v.push(""),Sd(n,v,A.commentBefore,g))}g=!1;let _=jl(w,b,()=>S=null,()=>g=!0);S&&(_+=Jr(_,o,p(S))),g&&S&&(g=!1),v.push(a+_)}let x;if(v.length===0)x=s.start+s.end;else{x=v[0];for(let E=1;E<v.length;++E){const w=v[E];x+=w?`
421
- ${h}${w}`:`
422
- `}}return e?(x+=`
423
- `+Ta(p(e),h),d&&d()):g&&c&&c(),x}function fj({items:e},t,{flowChars:n,itemIndent:a}){const{indent:s,indentStep:o,flowCollectionPadding:c,options:{commentString:d}}=t;a+=o;const h=Object.assign({},t,{indent:a,inFlow:!0,type:null});let p=!1,b=0;const g=[];for(let E=0;E<e.length;++E){const w=e[E];let S=null;if(Ut(w))w.spaceBefore&&g.push(""),Sd(t,g,w.commentBefore,!1),w.comment&&(S=w.comment);else if(Lt(w)){const A=Ut(w.key)?w.key:null;A&&(A.spaceBefore&&g.push(""),Sd(t,g,A.commentBefore,!1),A.comment&&(p=!0));const T=Ut(w.value)?w.value:null;T?(T.comment&&(S=T.comment),T.commentBefore&&(p=!0)):w.value==null&&(A!=null&&A.comment)&&(S=A.comment)}S&&(p=!0);let _=jl(w,h,()=>S=null);p||(p=g.length>b||_.includes(`
424
- `)),E<e.length-1?_+=",":t.options.trailingComma&&(t.options.lineWidth>0&&(p||(p=g.reduce((A,T)=>A+T.length+2,2)+(_.length+2)>t.options.lineWidth)),p&&(_+=",")),S&&(_+=Jr(_,a,d(S))),g.push(_),b=g.length}const{start:v,end:x}=n;if(g.length===0)return v+x;if(!p){const E=g.reduce((w,S)=>w+S.length+2,2);p=t.options.lineWidth>0&&E>t.options.lineWidth}if(p){let E=v;for(const w of g)E+=w?`
425
- ${o}${s}${w}`:`
426
- `;return`${E}
427
- ${s}${x}`}else return`${v}${c}${g.join(" ")}${c}${x}`}function Sd({indent:e,options:{commentString:t}},n,a,s){if(a&&s&&(a=a.replace(/^\n+/,"")),a){const o=Ta(t(a),e);n.push(o.trimStart())}}function es(e,t){const n=Et(t)?t.value:t;for(const a of e)if(Lt(a)&&(a.key===t||a.key===n||Et(a.key)&&a.key.value===n))return a}class si extends Rk{static get tagName(){return"tag:yaml.org,2002:map"}constructor(t){super(kr,t),this.items=[]}static from(t,n,a){const{keepUndefined:s,replacer:o}=a,c=new this(t),d=(h,p)=>{if(typeof o=="function")p=o.call(n,h,p);else if(Array.isArray(o)&&!o.includes(h))return;(p!==void 0||s)&&c.items.push(tg(h,p,a))};if(n instanceof Map)for(const[h,p]of n)d(h,p);else if(n&&typeof n=="object")for(const h of Object.keys(n))d(h,n[h]);return typeof t.sortMapEntries=="function"&&c.items.sort(t.sortMapEntries),c}add(t,n){var c;let a;Lt(t)?a=t:!t||typeof t!="object"||!("key"in t)?a=new kn(t,t==null?void 0:t.value):a=new kn(t.key,t.value);const s=es(this.items,a.key),o=(c=this.schema)==null?void 0:c.sortMapEntries;if(s){if(!n)throw new Error(`Key ${a.key} already set`);Et(s.value)&&Mk(a.value)?s.value.value=a.value:s.value=a.value}else if(o){const d=this.items.findIndex(h=>o(a,h)<0);d===-1?this.items.push(a):this.items.splice(d,0,a)}else this.items.push(a)}delete(t){const n=es(this.items,t);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(t,n){const a=es(this.items,t),s=a==null?void 0:a.value;return(!n&&Et(s)?s.value:s)??void 0}has(t){return!!es(this.items,t)}set(t,n){this.add(new kn(t,n),!0)}toJSON(t,n,a){const s=a?new a:n!=null&&n.mapAsMap?new Map:{};n!=null&&n.onCreate&&n.onCreate(s);for(const o of this.items)Pk(n,s,o);return s}toString(t,n,a){if(!t)return JSON.stringify(this);for(const s of this.items)if(!Lt(s))throw new Error(`Map items must all be pairs; found ${JSON.stringify(s)} instead`);return!t.allNullValues&&this.hasAllNullValues(!1)&&(t=Object.assign({},t,{allNullValues:!0})),Uk(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:a,onComment:n})}}const Fl={collection:"map",default:!0,nodeClass:si,tag:"tag:yaml.org,2002:map",resolve(e,t){return Pl(e)||t("Expected a mapping for this tag"),e},createNode:(e,t,n)=>si.from(e,t,n)};class Sr extends Rk{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(t){super(Bl,t),this.items=[]}add(t){this.items.push(t)}delete(t){const n=Wu(t);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(t,n){const a=Wu(t);if(typeof a!="number")return;const s=this.items[a];return!n&&Et(s)?s.value:s}has(t){const n=Wu(t);return typeof n=="number"&&n<this.items.length}set(t,n){const a=Wu(t);if(typeof a!="number")throw new Error(`Expected a valid index, not ${t}.`);const s=this.items[a];Et(s)&&Mk(n)?s.value=n:this.items[a]=n}toJSON(t,n){const a=[];n!=null&&n.onCreate&&n.onCreate(a);let s=0;for(const o of this.items)a.push(ki(o,String(s++),n));return a}toString(t,n,a){return t?Uk(this,t,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(t.indent||"")+" ",onChompKeep:a,onComment:n}):JSON.stringify(this)}static from(t,n,a){const{replacer:s}=a,o=new this(t);if(n&&Symbol.iterator in Object(n)){let c=0;for(let d of n){if(typeof s=="function"){const h=n instanceof Set?d:String(c++);d=s.call(n,h,d)}o.items.push(cc(d,void 0,a))}}return o}}function Wu(e){let t=Et(e)?e.value:e;return t&&typeof t=="string"&&(t=Number(t)),typeof t=="number"&&Number.isInteger(t)&&t>=0?t:null}const ql={collection:"seq",default:!0,nodeClass:Sr,tag:"tag:yaml.org,2002:seq",resolve(e,t){return Ul(e)||t("Expected a sequence for this tag"),e},createNode:(e,t,n)=>Sr.from(e,t,n)},Kd={identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify(e,t,n,a){return t=Object.assign({actualString:!0},t),Ec(e,t,n,a)}},Gd={identify:e=>e==null,createNode:()=>new Fe(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new Fe(null),stringify:({source:e},t)=>typeof e=="string"&&Gd.test.test(e)?e:t.options.nullStr},ng={identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new Fe(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},n){if(e&&ng.test.test(e)){const a=e[0]==="t"||e[0]==="T";if(t===a)return e}return t?n.options.trueStr:n.options.falseStr}};function Pi({format:e,minFractionDigits:t,tag:n,value:a}){if(typeof a=="bigint")return String(a);const s=typeof a=="number"?a:Number(a);if(!isFinite(s))return isNaN(s)?".nan":s<0?"-.inf":".inf";let o=Object.is(a,-0)?"-0":JSON.stringify(a);if(!e&&t&&(!n||n==="tag:yaml.org,2002:float")&&/^\d/.test(o)){let c=o.indexOf(".");c<0&&(c=o.length,o+=".");let d=t-(o.length-c-1);for(;d-- >0;)o+="0"}return o}const Fk={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Pi},qk={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():Pi(e)}},$k={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){const t=new Fe(parseFloat(e)),n=e.indexOf(".");return n!==-1&&e[e.length-1]==="0"&&(t.minFractionDigits=e.length-n-1),t},stringify:Pi},Qd=e=>typeof e=="bigint"||Number.isInteger(e),ig=(e,t,n,{intAsBigInt:a})=>a?BigInt(e):parseInt(e.substring(t),n);function Hk(e,t,n){const{value:a}=e;return Qd(a)&&a>=0?n+a.toString(t):Pi(e)}const Kk={identify:e=>Qd(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,n)=>ig(e,2,8,n),stringify:e=>Hk(e,8,"0o")},Gk={identify:Qd,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>ig(e,0,10,n),stringify:Pi},Qk={identify:e=>Qd(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>ig(e,2,16,n),stringify:e=>Hk(e,16,"0x")},hj=[Fl,ql,Kd,Gd,ng,Kk,Gk,Qk,Fk,qk,$k];function Xv(e){return typeof e=="bigint"||Number.isInteger(e)}const Xu=({value:e})=>JSON.stringify(e),pj=[{identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:Xu},{identify:e=>e==null,createNode:()=>new Fe(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Xu},{identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>e==="true",stringify:Xu},{identify:Xv,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>Xv(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:Xu}],mj={default:!0,tag:"",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},gj=[Fl,ql].concat(pj,mj),ag={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if(typeof atob=="function"){const n=atob(e.replace(/[\n\r]/g,"")),a=new Uint8Array(n.length);for(let s=0;s<n.length;++s)a[s]=n.charCodeAt(s);return a}else return t("This environment does not support reading binary tags; either Buffer or atob is required"),e},stringify({comment:e,type:t,value:n},a,s,o){if(!n)return"";const c=n;let d;if(typeof btoa=="function"){let h="";for(let p=0;p<c.length;++p)h+=String.fromCharCode(c[p]);d=btoa(h)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(t??(t=Fe.BLOCK_LITERAL),t!==Fe.QUOTE_DOUBLE){const h=Math.max(a.options.lineWidth-a.indent.length,a.options.minContentWidth),p=Math.ceil(d.length/h),b=new Array(p);for(let g=0,v=0;g<p;++g,v+=h)b[g]=d.substr(v,h);d=b.join(t===Fe.BLOCK_LITERAL?`
428
- `:" ")}return Ec({comment:e,type:t,value:d},a,s,o)}};function Yk(e,t){if(Ul(e))for(let n=0;n<e.items.length;++n){let a=e.items[n];if(!Lt(a)){if(Pl(a)){a.items.length>1&&t("Each pair must have its own sequence indicator");const s=a.items[0]||new kn(new Fe(null));if(a.commentBefore&&(s.key.commentBefore=s.key.commentBefore?`${a.commentBefore}
429
- ${s.key.commentBefore}`:a.commentBefore),a.comment){const o=s.value??s.key;o.comment=o.comment?`${a.comment}
430
- ${o.comment}`:a.comment}a=s}e.items[n]=Lt(a)?a:new kn(a)}}else t("Expected a sequence for this tag");return e}function Vk(e,t,n){const{replacer:a}=n,s=new Sr(e);s.tag="tag:yaml.org,2002:pairs";let o=0;if(t&&Symbol.iterator in Object(t))for(let c of t){typeof a=="function"&&(c=a.call(t,String(o++),c));let d,h;if(Array.isArray(c))if(c.length===2)d=c[0],h=c[1];else throw new TypeError(`Expected [key, value] tuple: ${c}`);else if(c&&c instanceof Object){const p=Object.keys(c);if(p.length===1)d=p[0],h=c[d];else throw new TypeError(`Expected tuple with one key, not ${p.length} keys`)}else d=c;s.items.push(tg(d,h,n))}return s}const rg={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Yk,createNode:Vk};class ml extends Sr{constructor(){super(),this.add=si.prototype.add.bind(this),this.delete=si.prototype.delete.bind(this),this.get=si.prototype.get.bind(this),this.has=si.prototype.has.bind(this),this.set=si.prototype.set.bind(this),this.tag=ml.tag}toJSON(t,n){if(!n)return super.toJSON(t);const a=new Map;n!=null&&n.onCreate&&n.onCreate(a);for(const s of this.items){let o,c;if(Lt(s)?(o=ki(s.key,"",n),c=ki(s.value,o,n)):o=ki(s,"",n),a.has(o))throw new Error("Ordered maps must not include duplicate keys");a.set(o,c)}return a}static from(t,n,a){const s=Vk(t,n,a),o=new this;return o.items=s.items,o}}ml.tag="tag:yaml.org,2002:omap";const sg={collection:"seq",identify:e=>e instanceof Map,nodeClass:ml,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){const n=Yk(e,t),a=[];for(const{key:s}of n.items)Et(s)&&(a.includes(s.value)?t(`Ordered maps must not include duplicate keys: ${s.value}`):a.push(s.value));return Object.assign(new ml,n)},createNode:(e,t,n)=>ml.from(e,t,n)};function Wk({value:e,source:t},n){return t&&(e?Xk:Zk).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}const Xk={identify:e=>e===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new Fe(!0),stringify:Wk},Zk={identify:e=>e===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new Fe(!1),stringify:Wk},bj={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Pi},yj={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():Pi(e)}},xj={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){const t=new Fe(parseFloat(e.replace(/_/g,""))),n=e.indexOf(".");if(n!==-1){const a=e.substring(n+1).replace(/_/g,"");a[a.length-1]==="0"&&(t.minFractionDigits=a.length)}return t},stringify:Pi},Sc=e=>typeof e=="bigint"||Number.isInteger(e);function Yd(e,t,n,{intAsBigInt:a}){const s=e[0];if((s==="-"||s==="+")&&(t+=1),e=e.substring(t).replace(/_/g,""),a){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}const c=BigInt(e);return s==="-"?BigInt(-1)*c:c}const o=parseInt(e,n);return s==="-"?-1*o:o}function lg(e,t,n){const{value:a}=e;if(Sc(a)){const s=a.toString(t);return a<0?"-"+n+s.substr(1):n+s}return Pi(e)}const vj={identify:Sc,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>Yd(e,2,2,n),stringify:e=>lg(e,2,"0b")},wj={identify:Sc,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>Yd(e,1,8,n),stringify:e=>lg(e,8,"0")},kj={identify:Sc,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>Yd(e,0,10,n),stringify:Pi},Ej={identify:Sc,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>Yd(e,2,16,n),stringify:e=>lg(e,16,"0x")};class gl extends si{constructor(t){super(t),this.tag=gl.tag}add(t){let n;Lt(t)?n=t:t&&typeof t=="object"&&"key"in t&&"value"in t&&t.value===null?n=new kn(t.key,null):n=new kn(t,null),es(this.items,n.key)||this.items.push(n)}get(t,n){const a=es(this.items,t);return!n&&Lt(a)?Et(a.key)?a.key.value:a.key:a}set(t,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);const a=es(this.items,t);a&&!n?this.items.splice(this.items.indexOf(a),1):!a&&n&&this.items.push(new kn(t))}toJSON(t,n){return super.toJSON(t,n,Set)}toString(t,n,a){if(!t)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},t,{allNullValues:!0}),n,a);throw new Error("Set items must all have null values")}static from(t,n,a){const{replacer:s}=a,o=new this(t);if(n&&Symbol.iterator in Object(n))for(let c of n)typeof s=="function"&&(c=s.call(n,c,c)),o.items.push(tg(c,null,a));return o}}gl.tag="tag:yaml.org,2002:set";const og={collection:"map",identify:e=>e instanceof Set,nodeClass:gl,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,n)=>gl.from(e,t,n),resolve(e,t){if(Pl(e)){if(e.hasAllNullValues(!0))return Object.assign(new gl,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};function cg(e,t){const n=e[0],a=n==="-"||n==="+"?e.substring(1):e,s=c=>t?BigInt(c):Number(c),o=a.replace(/_/g,"").split(":").reduce((c,d)=>c*s(60)+s(d),s(0));return n==="-"?s(-1)*o:o}function Jk(e){let{value:t}=e,n=c=>c;if(typeof t=="bigint")n=c=>BigInt(c);else if(isNaN(t)||!isFinite(t))return Pi(e);let a="";t<0&&(a="-",t*=n(-1));const s=n(60),o=[t%s];return t<60?o.unshift(0):(t=(t-o[0])/s,o.unshift(t%s),t>=60&&(t=(t-o[0])/s,o.unshift(t))),a+o.map(c=>String(c).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const eE={identify:e=>typeof e=="bigint"||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:n})=>cg(e,n),stringify:Jk},tE={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>cg(e,!1),stringify:Jk},Vd={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){const t=e.match(Vd.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,n,a,s,o,c,d]=t.map(Number),h=t[7]?Number((t[7]+"00").substr(1,3)):0;let p=Date.UTC(n,a-1,s,o||0,c||0,d||0,h);const b=t[8];if(b&&b!=="Z"){let g=cg(b,!1);Math.abs(g)<30&&(g*=60),p-=6e4*g}return new Date(p)},stringify:({value:e})=>(e==null?void 0:e.toISOString().replace(/(T00:00:00)?\.000Z$/,""))??""},Zv=[Fl,ql,Kd,Gd,Xk,Zk,vj,wj,kj,Ej,bj,yj,xj,ag,Aa,sg,rg,og,eE,tE,Vd],Jv=new Map([["core",hj],["failsafe",[Fl,ql,Kd]],["json",gj],["yaml11",Zv],["yaml-1.1",Zv]]),ew={binary:ag,bool:ng,float:$k,floatExp:qk,floatNaN:Fk,floatTime:tE,int:Gk,intHex:Qk,intOct:Kk,intTime:eE,map:Fl,merge:Aa,null:Gd,omap:sg,pairs:rg,seq:ql,set:og,timestamp:Vd},Sj={"tag:yaml.org,2002:binary":ag,"tag:yaml.org,2002:merge":Aa,"tag:yaml.org,2002:omap":sg,"tag:yaml.org,2002:pairs":rg,"tag:yaml.org,2002:set":og,"tag:yaml.org,2002:timestamp":Vd};function yp(e,t,n){const a=Jv.get(t);if(a&&!e)return n&&!a.includes(Aa)?a.concat(Aa):a.slice();let s=a;if(!s)if(Array.isArray(e))s=[];else{const o=Array.from(Jv.keys()).filter(c=>c!=="yaml11").map(c=>JSON.stringify(c)).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${o} or define customTags array`)}if(Array.isArray(e))for(const o of e)s=s.concat(o);else typeof e=="function"&&(s=e(s.slice()));return n&&(s=s.concat(Aa)),s.reduce((o,c)=>{const d=typeof c=="string"?ew[c]:c;if(!d){const h=JSON.stringify(c),p=Object.keys(ew).map(b=>JSON.stringify(b)).join(", ");throw new Error(`Unknown custom tag ${h}; use one of ${p}`)}return o.includes(d)||o.push(d),o},[])}const _j=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;let nE=class iE{constructor({compat:t,customTags:n,merge:a,resolveKnownTags:s,schema:o,sortMapEntries:c,toStringDefaults:d}){this.compat=Array.isArray(t)?yp(t,"compat"):t?yp(null,t):null,this.name=typeof o=="string"&&o||"core",this.knownTags=s?Sj:{},this.tags=yp(n,this.name,a),this.toStringOptions=d??null,Object.defineProperty(this,kr,{value:Fl}),Object.defineProperty(this,ea,{value:Kd}),Object.defineProperty(this,Bl,{value:ql}),this.sortMapEntries=typeof c=="function"?c:c===!0?_j:null}clone(){const t=Object.create(iE.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}};function Nj(e,t){var h;const n=[];let a=t.directives===!0;if(t.directives!==!1&&e.directives){const p=e.directives.toString(e);p?(n.push(p),a=!0):e.directives.docStart&&(a=!0)}a&&n.push("---");const s=Ik(e,t),{commentString:o}=s.options;if(e.commentBefore){n.length!==1&&n.unshift("");const p=o(e.commentBefore);n.unshift(Ta(p,""))}let c=!1,d=null;if(e.contents){if(Ut(e.contents)){if(e.contents.spaceBefore&&a&&n.push(""),e.contents.commentBefore){const g=o(e.contents.commentBefore);n.push(Ta(g,""))}s.forceBlockIndent=!!e.comment,d=e.contents.comment}const p=d?void 0:()=>c=!0;let b=jl(e.contents,s,()=>d=null,p);d&&(b+=Jr(b,"",o(d))),(b[0]==="|"||b[0]===">")&&n[n.length-1]==="---"?n[n.length-1]=`--- ${b}`:n.push(b)}else n.push(jl(e.contents,s));if((h=e.directives)!=null&&h.docEnd)if(e.comment){const p=o(e.comment);p.includes(`
431
- `)?(n.push("..."),n.push(Ta(p,""))):n.push(`... ${p}`)}else n.push("...");else{let p=e.comment;p&&c&&(p=p.replace(/^\n+/,"")),p&&((!c||d)&&n[n.length-1]!==""&&n.push(""),n.push(Ta(o(p),"")))}return n.join(`
432
- `)+`
433
- `}class $l{constructor(t,n,a){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,_i,{value:mm});let s=null;typeof n=="function"||Array.isArray(n)?s=n:a===void 0&&n&&(a=n,n=void 0);const o=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},a);this.options=o;let{version:c}=o;a!=null&&a._directives?(this.directives=a._directives.atDocument(),this.directives.yaml.explicit&&(c=this.directives.yaml.version)):this.directives=new Dn({version:c}),this.setSchema(c,a),this.contents=t===void 0?null:this.createNode(t,s,a)}clone(){const t=Object.create($l.prototype,{[_i]:{value:mm}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=Ut(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(t){al(this.contents)&&this.contents.add(t)}addIn(t,n){al(this.contents)&&this.contents.addIn(t,n)}createAlias(t,n){if(!t.anchor){const a=Ok(this);t.anchor=!n||a.has(n)?Dk(n||"a",a):n}return new Fd(t.anchor)}createNode(t,n,a){let s;if(typeof n=="function")t=n.call({"":t},"",t),s=n;else if(Array.isArray(n)){const S=A=>typeof A=="number"||A instanceof String||A instanceof Number,_=n.filter(S).map(String);_.length>0&&(n=n.concat(_)),s=n}else a===void 0&&n&&(a=n,n=void 0);const{aliasDuplicateObjects:o,anchorPrefix:c,flow:d,keepUndefined:h,onTagObj:p,tag:b}=a??{},{onAnchor:g,setAnchors:v,sourceObjects:x}=ej(this,c||"a"),E={aliasDuplicateObjects:o??!0,keepUndefined:h??!1,onAnchor:g,onTagObj:p,replacer:s,schema:this.schema,sourceObjects:x},w=cc(t,b,E);return d&&Pt(w)&&(w.flow=!0),v(),w}createPair(t,n,a={}){const s=this.createNode(t,null,a),o=this.createNode(n,null,a);return new kn(s,o)}delete(t){return al(this.contents)?this.contents.delete(t):!1}deleteIn(t){return Zo(t)?this.contents==null?!1:(this.contents=null,!0):al(this.contents)?this.contents.deleteIn(t):!1}get(t,n){return Pt(this.contents)?this.contents.get(t,n):void 0}getIn(t,n){return Zo(t)?!n&&Et(this.contents)?this.contents.value:this.contents:Pt(this.contents)?this.contents.getIn(t,n):void 0}has(t){return Pt(this.contents)?this.contents.has(t):!1}hasIn(t){return Zo(t)?this.contents!==void 0:Pt(this.contents)?this.contents.hasIn(t):!1}set(t,n){this.contents==null?this.contents=Ed(this.schema,[t],n):al(this.contents)&&this.contents.set(t,n)}setIn(t,n){Zo(t)?this.contents=n:this.contents==null?this.contents=Ed(this.schema,Array.from(t),n):al(this.contents)&&this.contents.setIn(t,n)}setSchema(t,n={}){typeof t=="number"&&(t=String(t));let a;switch(t){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Dn({version:"1.1"}),a={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=t:this.directives=new Dn({version:t}),a={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,a=null;break;default:{const s=JSON.stringify(t);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${s}`)}}if(n.schema instanceof Object)this.schema=n.schema;else if(a)this.schema=new nE(Object.assign(a,n));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:t,jsonArg:n,mapAsMap:a,maxAliasCount:s,onAnchor:o,reviver:c}={}){const d={anchors:new Map,doc:this,keep:!t,mapAsMap:a===!0,mapKeyWarned:!1,maxAliasCount:typeof s=="number"?s:100},h=ki(this.contents,n??"",d);if(typeof o=="function")for(const{count:p,res:b}of d.anchors.values())o(b,p);return typeof c=="function"?hl(c,{"":h},"",h):h}toJSON(t,n){return this.toJS({json:!0,jsonArg:t,mapAsMap:!1,onAnchor:n})}toString(t={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in t&&(!Number.isInteger(t.indent)||Number(t.indent)<=0)){const n=JSON.stringify(t.indent);throw new Error(`"indent" option must be a positive integer, not ${n}`)}return Nj(this,t)}}function al(e){if(Pt(e))return!0;throw new Error("Expected a YAML collection as document contents")}class ug extends Error{constructor(t,n,a,s){super(),this.name=t,this.code=a,this.message=s,this.pos=n}}class ts extends ug{constructor(t,n,a){super("YAMLParseError",t,n,a)}}class aE extends ug{constructor(t,n,a){super("YAMLWarning",t,n,a)}}const _d=(e,t)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(d=>t.linePos(d));const{line:a,col:s}=n.linePos[0];n.message+=` at line ${a}, column ${s}`;let o=s-1,c=e.substring(t.lineStarts[a-1],t.lineStarts[a]).replace(/[\n\r]+$/,"");if(o>=60&&c.length>80){const d=Math.min(o-39,c.length-79);c="…"+c.substring(d),o-=d-1}if(c.length>80&&(c=c.substring(0,79)+"…"),a>1&&/^ *$/.test(c.substring(0,o))){let d=e.substring(t.lineStarts[a-2],t.lineStarts[a-1]);d.length>80&&(d=d.substring(0,79)+`…
434
- `),c=d+c}if(/[^ ]/.test(c)){let d=1;const h=n.linePos[1];(h==null?void 0:h.line)===a&&h.col>s&&(d=Math.max(1,Math.min(h.col-s,80-o)));const p=" ".repeat(o)+"^".repeat(d);n.message+=`:
435
-
436
- ${c}
437
- ${p}
438
- `}};function Ol(e,{flow:t,indicator:n,next:a,offset:s,onError:o,parentIndent:c,startOnNewline:d}){let h=!1,p=d,b=d,g="",v="",x=!1,E=!1,w=null,S=null,_=null,A=null,T=null,D=null,B=null;for(const F of e)switch(E&&(F.type!=="space"&&F.type!=="newline"&&F.type!=="comma"&&o(F.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),E=!1),w&&(p&&F.type!=="comment"&&F.type!=="newline"&&o(w,"TAB_AS_INDENT","Tabs are not allowed as indentation"),w=null),F.type){case"space":!t&&(n!=="doc-start"||(a==null?void 0:a.type)!=="flow-collection")&&F.source.includes(" ")&&(w=F),b=!0;break;case"comment":{b||o(F,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const ee=F.source.substring(1)||" ";g?g+=v+ee:g=ee,v="",p=!1;break}case"newline":p?g?g+=F.source:(!D||n!=="seq-item-ind")&&(h=!0):v+=F.source,p=!0,x=!0,(S||_)&&(A=F),b=!0;break;case"anchor":S&&o(F,"MULTIPLE_ANCHORS","A node can have at most one anchor"),F.source.endsWith(":")&&o(F.offset+F.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),S=F,B??(B=F.offset),p=!1,b=!1,E=!0;break;case"tag":{_&&o(F,"MULTIPLE_TAGS","A node can have at most one tag"),_=F,B??(B=F.offset),p=!1,b=!1,E=!0;break}case n:(S||_)&&o(F,"BAD_PROP_ORDER",`Anchors and tags must be after the ${F.source} indicator`),D&&o(F,"UNEXPECTED_TOKEN",`Unexpected ${F.source} in ${t??"collection"}`),D=F,p=n==="seq-item-ind"||n==="explicit-key-ind",b=!1;break;case"comma":if(t){T&&o(F,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),T=F,p=!1,b=!1;break}default:o(F,"UNEXPECTED_TOKEN",`Unexpected ${F.type} token`),p=!1,b=!1}const M=e[e.length-1],q=M?M.offset+M.source.length:s;return E&&a&&a.type!=="space"&&a.type!=="newline"&&a.type!=="comma"&&(a.type!=="scalar"||a.source!=="")&&o(a.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),w&&(p&&w.indent<=c||(a==null?void 0:a.type)==="block-map"||(a==null?void 0:a.type)==="block-seq")&&o(w,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:T,found:D,spaceBefore:h,comment:g,hasNewline:x,anchor:S,tag:_,newlineAfterProp:A,end:q,start:B??q}}function uc(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes(`
439
- `))return!0;if(e.end){for(const t of e.end)if(t.type==="newline")return!0}return!1;case"flow-collection":for(const t of e.items){for(const n of t.start)if(n.type==="newline")return!0;if(t.sep){for(const n of t.sep)if(n.type==="newline")return!0}if(uc(t.key)||uc(t.value))return!0}return!1;default:return!0}}function xm(e,t,n){if((t==null?void 0:t.type)==="flow-collection"){const a=t.end[0];a.indent===e&&(a.source==="]"||a.source==="}")&&uc(t)&&n(a,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function rE(e,t,n){const{uniqueKeys:a}=e.options;if(a===!1)return!1;const s=typeof a=="function"?a:(o,c)=>o===c||Et(o)&&Et(c)&&o.value===c.value;return t.some(o=>s(o.key,n))}const tw="All mapping items must start at the same column";function Cj({composeNode:e,composeEmptyNode:t},n,a,s,o){var b;const c=(o==null?void 0:o.nodeClass)??si,d=new c(n.schema);n.atRoot&&(n.atRoot=!1);let h=a.offset,p=null;for(const g of a.items){const{start:v,key:x,sep:E,value:w}=g,S=Ol(v,{indicator:"explicit-key-ind",next:x??(E==null?void 0:E[0]),offset:h,onError:s,parentIndent:a.indent,startOnNewline:!0}),_=!S.found;if(_){if(x&&(x.type==="block-seq"?s(h,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in x&&x.indent!==a.indent&&s(h,"BAD_INDENT",tw)),!S.anchor&&!S.tag&&!E){p=S.end,S.comment&&(d.comment?d.comment+=`
440
- `+S.comment:d.comment=S.comment);continue}(S.newlineAfterProp||uc(x))&&s(x??v[v.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((b=S.found)==null?void 0:b.indent)!==a.indent&&s(h,"BAD_INDENT",tw);n.atKey=!0;const A=S.end,T=x?e(n,x,S,s):t(n,A,v,null,S,s);n.schema.compat&&xm(a.indent,x,s),n.atKey=!1,rE(n,d.items,T)&&s(A,"DUPLICATE_KEY","Map keys must be unique");const D=Ol(E??[],{indicator:"map-value-ind",next:w,offset:T.range[2],onError:s,parentIndent:a.indent,startOnNewline:!x||x.type==="block-scalar"});if(h=D.end,D.found){_&&((w==null?void 0:w.type)==="block-map"&&!D.hasNewline&&s(h,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&S.start<D.found.offset-1024&&s(T.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const B=w?e(n,w,D,s):t(n,h,E,null,D,s);n.schema.compat&&xm(a.indent,w,s),h=B.range[2];const M=new kn(T,B);n.options.keepSourceTokens&&(M.srcToken=g),d.items.push(M)}else{_&&s(T.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),D.comment&&(T.comment?T.comment+=`
441
- `+D.comment:T.comment=D.comment);const B=new kn(T);n.options.keepSourceTokens&&(B.srcToken=g),d.items.push(B)}}return p&&p<h&&s(p,"IMPOSSIBLE","Map comment with trailing content"),d.range=[a.offset,h,p??h],d}function Tj({composeNode:e,composeEmptyNode:t},n,a,s,o){const c=(o==null?void 0:o.nodeClass)??Sr,d=new c(n.schema);n.atRoot&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let h=a.offset,p=null;for(const{start:b,value:g}of a.items){const v=Ol(b,{indicator:"seq-item-ind",next:g,offset:h,onError:s,parentIndent:a.indent,startOnNewline:!0});if(!v.found)if(v.anchor||v.tag||g)(g==null?void 0:g.type)==="block-seq"?s(v.end,"BAD_INDENT","All sequence items must start at the same column"):s(h,"MISSING_CHAR","Sequence item without - indicator");else{p=v.end,v.comment&&(d.comment=v.comment);continue}const x=g?e(n,g,v,s):t(n,v.end,b,null,v,s);n.schema.compat&&xm(a.indent,g,s),h=x.range[2],d.items.push(x)}return d.range=[a.offset,h,p??h],d}function _c(e,t,n,a){let s="";if(e){let o=!1,c="";for(const d of e){const{source:h,type:p}=d;switch(p){case"space":o=!0;break;case"comment":{n&&!o&&a(d,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const b=h.substring(1)||" ";s?s+=c+b:s=b,c="";break}case"newline":s&&(c+=h),o=!0;break;default:a(d,"UNEXPECTED_TOKEN",`Unexpected ${p} at node end`)}t+=h.length}}return{comment:s,offset:t}}const xp="Block collections are not allowed within flow collections",vp=e=>e&&(e.type==="block-map"||e.type==="block-seq");function Aj({composeNode:e,composeEmptyNode:t},n,a,s,o){var S;const c=a.start.source==="{",d=c?"flow map":"flow sequence",h=(o==null?void 0:o.nodeClass)??(c?si:Sr),p=new h(n.schema);p.flow=!0;const b=n.atRoot;b&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let g=a.offset+a.start.source.length;for(let _=0;_<a.items.length;++_){const A=a.items[_],{start:T,key:D,sep:B,value:M}=A,q=Ol(T,{flow:d,indicator:"explicit-key-ind",next:D??(B==null?void 0:B[0]),offset:g,onError:s,parentIndent:a.indent,startOnNewline:!1});if(!q.found){if(!q.anchor&&!q.tag&&!B&&!M){_===0&&q.comma?s(q.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${d}`):_<a.items.length-1&&s(q.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${d}`),q.comment&&(p.comment?p.comment+=`
442
- `+q.comment:p.comment=q.comment),g=q.end;continue}!c&&n.options.strict&&uc(D)&&s(D,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(_===0)q.comma&&s(q.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${d}`);else if(q.comma||s(q.start,"MISSING_CHAR",`Missing , between ${d} items`),q.comment){let F="";e:for(const ee of T)switch(ee.type){case"comma":case"space":break;case"comment":F=ee.source.substring(1);break e;default:break e}if(F){let ee=p.items[p.items.length-1];Lt(ee)&&(ee=ee.value??ee.key),ee.comment?ee.comment+=`
443
- `+F:ee.comment=F,q.comment=q.comment.substring(F.length+1)}}if(!c&&!B&&!q.found){const F=M?e(n,M,q,s):t(n,q.end,B,null,q,s);p.items.push(F),g=F.range[2],vp(M)&&s(F.range,"BLOCK_IN_FLOW",xp)}else{n.atKey=!0;const F=q.end,ee=D?e(n,D,q,s):t(n,F,T,null,q,s);vp(D)&&s(ee.range,"BLOCK_IN_FLOW",xp),n.atKey=!1;const P=Ol(B??[],{flow:d,indicator:"map-value-ind",next:M,offset:ee.range[2],onError:s,parentIndent:a.indent,startOnNewline:!1});if(P.found){if(!c&&!q.found&&n.options.strict){if(B)for(const pe of B){if(pe===P.found)break;if(pe.type==="newline"){s(pe,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}q.start<P.found.offset-1024&&s(P.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else M&&("source"in M&&((S=M.source)==null?void 0:S[0])===":"?s(M,"MISSING_CHAR",`Missing space after : in ${d}`):s(P.start,"MISSING_CHAR",`Missing , or : between ${d} items`));const X=M?e(n,M,P,s):P.found?t(n,P.end,B,null,P,s):null;X?vp(M)&&s(X.range,"BLOCK_IN_FLOW",xp):P.comment&&(ee.comment?ee.comment+=`
444
- `+P.comment:ee.comment=P.comment);const J=new kn(ee,X);if(n.options.keepSourceTokens&&(J.srcToken=A),c){const pe=p;rE(n,pe.items,ee)&&s(F,"DUPLICATE_KEY","Map keys must be unique"),pe.items.push(J)}else{const pe=new si(n.schema);pe.flow=!0,pe.items.push(J);const ue=(X??ee).range;pe.range=[ee.range[0],ue[1],ue[2]],p.items.push(pe)}g=X?X.range[2]:P.end}}const v=c?"}":"]",[x,...E]=a.end;let w=g;if((x==null?void 0:x.source)===v)w=x.offset+x.source.length;else{const _=d[0].toUpperCase()+d.substring(1),A=b?`${_} must end with a ${v}`:`${_} in block collection must be sufficiently indented and end with a ${v}`;s(g,b?"MISSING_CHAR":"BAD_INDENT",A),x&&x.source.length!==1&&E.unshift(x)}if(E.length>0){const _=_c(E,w,n.options.strict,s);_.comment&&(p.comment?p.comment+=`
445
- `+_.comment:p.comment=_.comment),p.range=[a.offset,w,_.offset]}else p.range=[a.offset,w,w];return p}function wp(e,t,n,a,s,o){const c=n.type==="block-map"?Cj(e,t,n,a,o):n.type==="block-seq"?Tj(e,t,n,a,o):Aj(e,t,n,a,o),d=c.constructor;return s==="!"||s===d.tagName?(c.tag=d.tagName,c):(s&&(c.tag=s),c)}function jj(e,t,n,a,s){var v;const o=a.tag,c=o?t.directives.tagName(o.source,x=>s(o,"TAG_RESOLVE_FAILED",x)):null;if(n.type==="block-seq"){const{anchor:x,newlineAfterProp:E}=a,w=x&&o?x.offset>o.offset?x:o:x??o;w&&(!E||E.offset<w.offset)&&s(w,"MISSING_CHAR","Missing newline after block sequence props")}const d=n.type==="block-map"?"map":n.type==="block-seq"?"seq":n.start.source==="{"?"map":"seq";if(!o||!c||c==="!"||c===si.tagName&&d==="map"||c===Sr.tagName&&d==="seq")return wp(e,t,n,s,c);let h=t.schema.tags.find(x=>x.tag===c&&x.collection===d);if(!h){const x=t.schema.knownTags[c];if((x==null?void 0:x.collection)===d)t.schema.tags.push(Object.assign({},x,{default:!1})),h=x;else return x?s(o,"BAD_COLLECTION_TYPE",`${x.tag} used for ${d} collection, but expects ${x.collection??"scalar"}`,!0):s(o,"TAG_RESOLVE_FAILED",`Unresolved tag: ${c}`,!0),wp(e,t,n,s,c)}const p=wp(e,t,n,s,c,h),b=((v=h.resolve)==null?void 0:v.call(h,p,x=>s(o,"TAG_RESOLVE_FAILED",x),t.options))??p,g=Ut(b)?b:new Fe(b);return g.range=p.range,g.tag=c,h!=null&&h.format&&(g.format=h.format),g}function sE(e,t,n){const a=t.offset,s=Oj(t,e.options.strict,n);if(!s)return{value:"",type:null,comment:"",range:[a,a,a]};const o=s.mode===">"?Fe.BLOCK_FOLDED:Fe.BLOCK_LITERAL,c=t.source?Dj(t.source):[];let d=c.length;for(let w=c.length-1;w>=0;--w){const S=c[w][1];if(S===""||S==="\r")d=w;else break}if(d===0){const w=s.chomp==="+"&&c.length>0?`
446
- `.repeat(Math.max(1,c.length-1)):"";let S=a+s.length;return t.source&&(S+=t.source.length),{value:w,type:o,comment:s.comment,range:[a,S,S]}}let h=t.indent+s.indent,p=t.offset+s.length,b=0;for(let w=0;w<d;++w){const[S,_]=c[w];if(_===""||_==="\r")s.indent===0&&S.length>h&&(h=S.length);else{S.length<h&&n(p+S.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),s.indent===0&&(h=S.length),b=w,h===0&&!e.atRoot&&n(p,"BAD_INDENT","Block scalar values in collections must be indented");break}p+=S.length+_.length+1}for(let w=c.length-1;w>=d;--w)c[w][0].length>h&&(d=w+1);let g="",v="",x=!1;for(let w=0;w<b;++w)g+=c[w][0].slice(h)+`
447
- `;for(let w=b;w<d;++w){let[S,_]=c[w];p+=S.length+_.length+1;const A=_[_.length-1]==="\r";if(A&&(_=_.slice(0,-1)),_&&S.length<h){const D=`Block scalar lines must not be less indented than their ${s.indent?"explicit indentation indicator":"first line"}`;n(p-_.length-(A?2:1),"BAD_INDENT",D),S=""}o===Fe.BLOCK_LITERAL?(g+=v+S.slice(h)+_,v=`
448
- `):S.length>h||_[0]===" "?(v===" "?v=`
449
- `:!x&&v===`
450
- `&&(v=`
451
-
452
- `),g+=v+S.slice(h)+_,v=`
453
- `,x=!0):_===""?v===`
454
- `?g+=`
455
- `:v=`
456
- `:(g+=v+_,v=" ",x=!1)}switch(s.chomp){case"-":break;case"+":for(let w=d;w<c.length;++w)g+=`
457
- `+c[w][0].slice(h);g[g.length-1]!==`
458
- `&&(g+=`
459
- `);break;default:g+=`
460
- `}const E=a+s.length+t.source.length;return{value:g,type:o,comment:s.comment,range:[a,E,E]}}function Oj({offset:e,props:t},n,a){if(t[0].type!=="block-scalar-header")return a(t[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:s}=t[0],o=s[0];let c=0,d="",h=-1;for(let v=1;v<s.length;++v){const x=s[v];if(!d&&(x==="-"||x==="+"))d=x;else{const E=Number(x);!c&&E?c=E:h===-1&&(h=e+v)}}h!==-1&&a(h,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${s}`);let p=!1,b="",g=s.length;for(let v=1;v<t.length;++v){const x=t[v];switch(x.type){case"space":p=!0;case"newline":g+=x.source.length;break;case"comment":n&&!p&&a(x,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),g+=x.source.length,b=x.source.substring(1);break;case"error":a(x,"UNEXPECTED_TOKEN",x.message),g+=x.source.length;break;default:{const E=`Unexpected token in block scalar header: ${x.type}`;a(x,"UNEXPECTED_TOKEN",E);const w=x.source;w&&typeof w=="string"&&(g+=w.length)}}}return{mode:o,indent:c,chomp:d,comment:b,length:g}}function Dj(e){const t=e.split(/\n( *)/),n=t[0],a=n.match(/^( *)/),o=[a!=null&&a[1]?[a[1],n.slice(a[1].length)]:["",n]];for(let c=1;c<t.length;c+=2)o.push([t[c],t[c+1]]);return o}function lE(e,t,n){const{offset:a,type:s,source:o,end:c}=e;let d,h;const p=(v,x,E)=>n(a+v,x,E);switch(s){case"scalar":d=Fe.PLAIN,h=Mj(o,p);break;case"single-quoted-scalar":d=Fe.QUOTE_SINGLE,h=Rj(o,p);break;case"double-quoted-scalar":d=Fe.QUOTE_DOUBLE,h=Lj(o,p);break;default:return n(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${s}`),{value:"",type:null,comment:"",range:[a,a+o.length,a+o.length]}}const b=a+o.length,g=_c(c,b,t,n);return{value:h,type:d,comment:g.comment,range:[a,b,g.offset]}}function Mj(e,t){let n="";switch(e[0]){case" ":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":{n=`block scalar indicator ${e[0]}`;break}case"@":case"`":{n=`reserved character ${e[0]}`;break}}return n&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),oE(e)}function Rj(e,t){return(e[e.length-1]!=="'"||e.length===1)&&t(e.length,"MISSING_CHAR","Missing closing 'quote"),oE(e.slice(1,-1)).replace(/''/g,"'")}function oE(e){let t,n;try{t=new RegExp(`(.*?)(?<![ ])[ ]*\r?
461
- `,"sy"),n=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
462
- `,"sy")}catch{t=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let a=t.exec(e);if(!a)return e;let s=a[1],o=" ",c=t.lastIndex;for(n.lastIndex=c;a=n.exec(e);)a[1]===""?o===`
463
- `?s+=o:o=`
464
- `:(s+=o+a[1],o=" "),c=n.lastIndex;const d=/[ \t]*(.*)/sy;return d.lastIndex=c,a=d.exec(e),s+o+((a==null?void 0:a[1])??"")}function Lj(e,t){let n="";for(let a=1;a<e.length-1;++a){const s=e[a];if(!(s==="\r"&&e[a+1]===`
465
- `))if(s===`
466
- `){const{fold:o,offset:c}=Ij(e,a);n+=o,a=c}else if(s==="\\"){let o=e[++a];const c=zj[o];if(c)n+=c;else if(o===`
467
- `)for(o=e[a+1];o===" "||o===" ";)o=e[++a+1];else if(o==="\r"&&e[a+1]===`
468
- `)for(o=e[++a+1];o===" "||o===" ";)o=e[++a+1];else if(o==="x"||o==="u"||o==="U"){const d={x:2,u:4,U:8}[o];n+=Bj(e,a+1,d,t),a+=d}else{const d=e.substr(a-1,2);t(a-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${d}`),n+=d}}else if(s===" "||s===" "){const o=a;let c=e[a+1];for(;c===" "||c===" ";)c=e[++a+1];c!==`
469
- `&&!(c==="\r"&&e[a+2]===`
470
- `)&&(n+=a>o?e.slice(o,a+1):s)}else n+=s}return(e[e.length-1]!=='"'||e.length===1)&&t(e.length,"MISSING_CHAR",'Missing closing "quote'),n}function Ij(e,t){let n="",a=e[t+1];for(;(a===" "||a===" "||a===`
471
- `||a==="\r")&&!(a==="\r"&&e[t+2]!==`
472
- `);)a===`
473
- `&&(n+=`
474
- `),t+=1,a=e[t+1];return n||(n=" "),{fold:n,offset:t}}const zj={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
475
- `,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function Bj(e,t,n,a){const s=e.substr(t,n),c=s.length===n&&/^[0-9a-fA-F]+$/.test(s)?parseInt(s,16):NaN;if(isNaN(c)){const d=e.substr(t-2,n+2);return a(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${d}`),d}return String.fromCodePoint(c)}function cE(e,t,n,a){const{value:s,type:o,comment:c,range:d}=t.type==="block-scalar"?sE(e,t,a):lE(t,e.options.strict,a),h=n?e.directives.tagName(n.source,g=>a(n,"TAG_RESOLVE_FAILED",g)):null;let p;e.options.stringKeys&&e.atKey?p=e.schema[ea]:h?p=Pj(e.schema,s,h,n,a):t.type==="scalar"?p=Uj(e,s,t,a):p=e.schema[ea];let b;try{const g=p.resolve(s,v=>a(n??t,"TAG_RESOLVE_FAILED",v),e.options);b=Et(g)?g:new Fe(g)}catch(g){const v=g instanceof Error?g.message:String(g);a(n??t,"TAG_RESOLVE_FAILED",v),b=new Fe(s)}return b.range=d,b.source=s,o&&(b.type=o),h&&(b.tag=h),p.format&&(b.format=p.format),c&&(b.comment=c),b}function Pj(e,t,n,a,s){var d;if(n==="!")return e[ea];const o=[];for(const h of e.tags)if(!h.collection&&h.tag===n)if(h.default&&h.test)o.push(h);else return h;for(const h of o)if((d=h.test)!=null&&d.test(t))return h;const c=e.knownTags[n];return c&&!c.collection?(e.tags.push(Object.assign({},c,{default:!1,test:void 0})),c):(s(a,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,n!=="tag:yaml.org,2002:str"),e[ea])}function Uj({atKey:e,directives:t,schema:n},a,s,o){const c=n.tags.find(d=>{var h;return(d.default===!0||e&&d.default==="key")&&((h=d.test)==null?void 0:h.test(a))})||n[ea];if(n.compat){const d=n.compat.find(h=>{var p;return h.default&&((p=h.test)==null?void 0:p.test(a))})??n[ea];if(c.tag!==d.tag){const h=t.tagString(c.tag),p=t.tagString(d.tag),b=`Value may be parsed as either ${h} or ${p}`;o(s,"TAG_RESOLVE_FAILED",b,!0)}}return c}function Fj(e,t,n){if(t){n??(n=t.length);for(let a=n-1;a>=0;--a){let s=t[a];switch(s.type){case"space":case"comment":case"newline":e-=s.source.length;continue}for(s=t[++a];(s==null?void 0:s.type)==="space";)e+=s.source.length,s=t[++a];break}}return e}const qj={composeNode:uE,composeEmptyNode:dg};function uE(e,t,n,a){const s=e.atKey,{spaceBefore:o,comment:c,anchor:d,tag:h}=n;let p,b=!0;switch(t.type){case"alias":p=$j(e,t,a),(d||h)&&a(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":p=cE(e,t,h,a),d&&(p.anchor=d.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{p=jj(qj,e,t,n,a),d&&(p.anchor=d.source.substring(1))}catch(g){const v=g instanceof Error?g.message:String(g);a(t,"RESOURCE_EXHAUSTION",v)}break;default:{const g=t.type==="error"?t.message:`Unsupported token (type: ${t.type})`;a(t,"UNEXPECTED_TOKEN",g),b=!1}}return p??(p=dg(e,t.offset,void 0,null,n,a)),d&&p.anchor===""&&a(d,"BAD_ALIAS","Anchor cannot be an empty string"),s&&e.options.stringKeys&&(!Et(p)||typeof p.value!="string"||p.tag&&p.tag!=="tag:yaml.org,2002:str")&&a(h??t,"NON_STRING_KEY","With stringKeys, all keys must be strings"),o&&(p.spaceBefore=!0),c&&(t.type==="scalar"&&t.source===""?p.comment=c:p.commentBefore=c),e.options.keepSourceTokens&&b&&(p.srcToken=t),p}function dg(e,t,n,a,{spaceBefore:s,comment:o,anchor:c,tag:d,end:h},p){const b={type:"scalar",offset:Fj(t,n,a),indent:-1,source:""},g=cE(e,b,d,p);return c&&(g.anchor=c.source.substring(1),g.anchor===""&&p(c,"BAD_ALIAS","Anchor cannot be an empty string")),s&&(g.spaceBefore=!0),o&&(g.comment=o,g.range[2]=h),g}function $j({options:e},{offset:t,source:n,end:a},s){const o=new Fd(n.substring(1));o.source===""&&s(t,"BAD_ALIAS","Alias cannot be an empty string"),o.source.endsWith(":")&&s(t+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const c=t+n.length,d=_c(a,c,e.strict,s);return o.range=[t,c,d.offset],d.comment&&(o.comment=d.comment),o}function Hj(e,t,{offset:n,start:a,value:s,end:o},c){const d=Object.assign({_directives:t},e),h=new $l(void 0,d),p={atKey:!1,atRoot:!0,directives:h.directives,options:h.options,schema:h.schema},b=Ol(a,{indicator:"doc-start",next:s??(o==null?void 0:o[0]),offset:n,onError:c,parentIndent:0,startOnNewline:!0});b.found&&(h.directives.docStart=!0,s&&(s.type==="block-map"||s.type==="block-seq")&&!b.hasNewline&&c(b.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),h.contents=s?uE(p,s,b,c):dg(p,b.end,a,null,b,c);const g=h.contents.range[2],v=_c(o,g,!1,c);return v.comment&&(h.comment=v.comment),h.range=[n,g,v.offset],h}function Ko(e){if(typeof e=="number")return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];const{offset:t,source:n}=e;return[t,t+(typeof n=="string"?n.length:1)]}function nw(e){var s;let t="",n=!1,a=!1;for(let o=0;o<e.length;++o){const c=e[o];switch(c[0]){case"#":t+=(t===""?"":a?`
476
-
477
- `:`
478
- `)+(c.substring(1)||" "),n=!0,a=!1;break;case"%":((s=e[o+1])==null?void 0:s[0])!=="#"&&(o+=1),n=!1;break;default:n||(a=!0),n=!1}}return{comment:t,afterEmptyLine:a}}class fg{constructor(t={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(n,a,s,o)=>{const c=Ko(n);o?this.warnings.push(new aE(c,a,s)):this.errors.push(new ts(c,a,s))},this.directives=new Dn({version:t.version||"1.2"}),this.options=t}decorate(t,n){const{comment:a,afterEmptyLine:s}=nw(this.prelude);if(a){const o=t.contents;if(n)t.comment=t.comment?`${t.comment}
479
- ${a}`:a;else if(s||t.directives.docStart||!o)t.commentBefore=a;else if(Pt(o)&&!o.flow&&o.items.length>0){let c=o.items[0];Lt(c)&&(c=c.key);const d=c.commentBefore;c.commentBefore=d?`${a}
480
- ${d}`:a}else{const c=o.commentBefore;o.commentBefore=c?`${a}
481
- ${c}`:a}}n?(Array.prototype.push.apply(t.errors,this.errors),Array.prototype.push.apply(t.warnings,this.warnings)):(t.errors=this.errors,t.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:nw(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(t,n=!1,a=-1){for(const s of t)yield*this.next(s);yield*this.end(n,a)}*next(t){switch(t.type){case"directive":this.directives.add(t.source,(n,a,s)=>{const o=Ko(t);o[0]+=n,this.onError(o,"BAD_DIRECTIVE",a,s)}),this.prelude.push(t.source),this.atDirectives=!0;break;case"document":{const n=Hj(this.options,this.directives,t,this.onError);this.atDirectives&&!n.directives.docStart&&this.onError(t,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(n,!1),this.doc&&(yield this.doc),this.doc=n,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(t.source);break;case"error":{const n=t.source?`${t.message}: ${JSON.stringify(t.source)}`:t.message,a=new ts(Ko(t),"UNEXPECTED_TOKEN",n);this.atDirectives||!this.doc?this.errors.push(a):this.doc.errors.push(a);break}case"doc-end":{if(!this.doc){const a="Unexpected doc-end without preceding document";this.errors.push(new ts(Ko(t),"UNEXPECTED_TOKEN",a));break}this.doc.directives.docEnd=!0;const n=_c(t.end,t.offset+t.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),n.comment){const a=this.doc.comment;this.doc.comment=a?`${a}
482
- ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new ts(Ko(t),"UNEXPECTED_TOKEN",`Unsupported token ${t.type}`))}}*end(t=!1,n=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(t){const a=Object.assign({_directives:this.directives},this.options),s=new $l(void 0,a);this.atDirectives&&this.onError(n,"MISSING_CHAR","Missing directives-end indicator line"),s.range=[0,n,n],this.decorate(s,!1),yield s}}}function Kj(e,t=!0,n){if(e){const a=(s,o,c)=>{const d=typeof s=="number"?s:Array.isArray(s)?s[0]:s.offset;if(n)n(d,o,c);else throw new ts([d,d+1],o,c)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return lE(e,t,a);case"block-scalar":return sE({options:{strict:t}},e,a)}}return null}function Gj(e,t){const{implicitKey:n=!1,indent:a,inFlow:s=!1,offset:o=-1,type:c="PLAIN"}=t,d=Ec({type:c,value:e},{implicitKey:n,indent:a>0?" ".repeat(a):"",inFlow:s,options:{blockQuote:!0,lineWidth:-1}}),h=t.end??[{type:"newline",offset:-1,indent:a,source:`
483
- `}];switch(d[0]){case"|":case">":{const p=d.indexOf(`
484
- `),b=d.substring(0,p),g=d.substring(p+1)+`
485
- `,v=[{type:"block-scalar-header",offset:o,indent:a,source:b}];return dE(v,h)||v.push({type:"newline",offset:-1,indent:a,source:`
486
- `}),{type:"block-scalar",offset:o,indent:a,props:v,source:g}}case'"':return{type:"double-quoted-scalar",offset:o,indent:a,source:d,end:h};case"'":return{type:"single-quoted-scalar",offset:o,indent:a,source:d,end:h};default:return{type:"scalar",offset:o,indent:a,source:d,end:h}}}function Qj(e,t,n={}){let{afterKey:a=!1,implicitKey:s=!1,inFlow:o=!1,type:c}=n,d="indent"in e?e.indent:null;if(a&&typeof d=="number"&&(d+=2),!c)switch(e.type){case"single-quoted-scalar":c="QUOTE_SINGLE";break;case"double-quoted-scalar":c="QUOTE_DOUBLE";break;case"block-scalar":{const p=e.props[0];if(p.type!=="block-scalar-header")throw new Error("Invalid block scalar header");c=p.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:c="PLAIN"}const h=Ec({type:c,value:t},{implicitKey:s||d===null,indent:d!==null&&d>0?" ".repeat(d):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}});switch(h[0]){case"|":case">":Yj(e,h);break;case'"':kp(e,h,"double-quoted-scalar");break;case"'":kp(e,h,"single-quoted-scalar");break;default:kp(e,h,"scalar")}}function Yj(e,t){const n=t.indexOf(`
487
- `),a=t.substring(0,n),s=t.substring(n+1)+`
488
- `;if(e.type==="block-scalar"){const o=e.props[0];if(o.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o.source=a,e.source=s}else{const{offset:o}=e,c="indent"in e?e.indent:-1,d=[{type:"block-scalar-header",offset:o,indent:c,source:a}];dE(d,"end"in e?e.end:void 0)||d.push({type:"newline",offset:-1,indent:c,source:`
489
- `});for(const h of Object.keys(e))h!=="type"&&h!=="offset"&&delete e[h];Object.assign(e,{type:"block-scalar",indent:c,props:d,source:s})}}function dE(e,t){if(t)for(const n of t)switch(n.type){case"space":case"comment":e.push(n);break;case"newline":return e.push(n),!0}return!1}function kp(e,t,n){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=n,e.source=t;break;case"block-scalar":{const a=e.props.slice(1);let s=t.length;e.props[0].type==="block-scalar-header"&&(s-=e.props[0].source.length);for(const o of a)o.offset+=s;delete e.props,Object.assign(e,{type:n,source:t,end:a});break}case"block-map":case"block-seq":{const s={type:"newline",offset:e.offset+t.length,indent:e.indent,source:`
490
- `};delete e.items,Object.assign(e,{type:n,source:t,end:[s]});break}default:{const a="indent"in e?e.indent:-1,s="end"in e&&Array.isArray(e.end)?e.end.filter(o=>o.type==="space"||o.type==="comment"||o.type==="newline"):[];for(const o of Object.keys(e))o!=="type"&&o!=="offset"&&delete e[o];Object.assign(e,{type:n,indent:a,source:t,end:s})}}}const Vj=e=>"type"in e?Nd(e):gd(e);function Nd(e){switch(e.type){case"block-scalar":{let t="";for(const n of e.props)t+=Nd(n);return t+e.source}case"block-map":case"block-seq":{let t="";for(const n of e.items)t+=gd(n);return t}case"flow-collection":{let t=e.start.source;for(const n of e.items)t+=gd(n);for(const n of e.end)t+=n.source;return t}case"document":{let t=gd(e);if(e.end)for(const n of e.end)t+=n.source;return t}default:{let t=e.source;if("end"in e&&e.end)for(const n of e.end)t+=n.source;return t}}}function gd({start:e,key:t,sep:n,value:a}){let s="";for(const o of e)s+=o.source;if(t&&(s+=Nd(t)),n)for(const o of n)s+=o.source;return a&&(s+=Nd(a)),s}const vm=Symbol("break visit"),Wj=Symbol("skip children"),fE=Symbol("remove item");function fs(e,t){"type"in e&&e.type==="document"&&(e={start:e.start,value:e.value}),hE(Object.freeze([]),e,t)}fs.BREAK=vm;fs.SKIP=Wj;fs.REMOVE=fE;fs.itemAtPath=(e,t)=>{let n=e;for(const[a,s]of t){const o=n==null?void 0:n[a];if(o&&"items"in o)n=o.items[s];else return}return n};fs.parentCollection=(e,t)=>{const n=fs.itemAtPath(e,t.slice(0,-1)),a=t[t.length-1][0],s=n==null?void 0:n[a];if(s&&"items"in s)return s;throw new Error("Parent collection not found")};function hE(e,t,n){let a=n(t,e);if(typeof a=="symbol")return a;for(const s of["key","value"]){const o=t[s];if(o&&"items"in o){for(let c=0;c<o.items.length;++c){const d=hE(Object.freeze(e.concat([[s,c]])),o.items[c],n);if(typeof d=="number")c=d-1;else{if(d===vm)return vm;d===fE&&(o.items.splice(c,1),c-=1)}}typeof a=="function"&&s==="key"&&(a=a(t,e))}}return typeof a=="function"?a(t,e):a}const Wd="\uFEFF",Xd="",Zd="",dc="",Xj=e=>!!e&&"items"in e,Zj=e=>!!e&&(e.type==="scalar"||e.type==="single-quoted-scalar"||e.type==="double-quoted-scalar"||e.type==="block-scalar");function Jj(e){switch(e){case Wd:return"<BOM>";case Xd:return"<DOC>";case Zd:return"<FLOW_END>";case dc:return"<SCALAR>";default:return JSON.stringify(e)}}function pE(e){switch(e){case Wd:return"byte-order-mark";case Xd:return"doc-mode";case Zd:return"flow-error-end";case dc:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
491
- `:case`\r
492
- `:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}const eO=Object.freeze(Object.defineProperty({__proto__:null,BOM:Wd,DOCUMENT:Xd,FLOW_END:Zd,SCALAR:dc,createScalarToken:Gj,isCollection:Xj,isScalar:Zj,prettyToken:Jj,resolveAsScalar:Kj,setScalarValue:Qj,stringify:Vj,tokenType:pE,visit:fs},Symbol.toStringTag,{value:"Module"}));function Mi(e){switch(e){case void 0:case" ":case`
493
- `:case"\r":case" ":return!0;default:return!1}}const iw=new Set("0123456789ABCDEFabcdef"),tO=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Zu=new Set(",[]{}"),nO=new Set(` ,[]{}
494
- \r `),Ep=e=>!e||nO.has(e);class mE{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(t,n=!1){if(t){if(typeof t!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+t:t,this.lineEndPos=null}this.atEnd=!n;let a=this.next??"stream";for(;a&&(n||this.hasChars(1));)a=yield*this.parseNext(a)}atLineEnd(){let t=this.pos,n=this.buffer[t];for(;n===" "||n===" ";)n=this.buffer[++t];return!n||n==="#"||n===`
495
- `?!0:n==="\r"?this.buffer[t+1]===`
496
- `:!1}charAt(t){return this.buffer[this.pos+t]}continueScalar(t){let n=this.buffer[t];if(this.indentNext>0){let a=0;for(;n===" ";)n=this.buffer[++a+t];if(n==="\r"){const s=this.buffer[a+t+1];if(s===`
497
- `||!s&&!this.atEnd)return t+a+1}return n===`
498
- `||a>=this.indentNext||!n&&!this.atEnd?t+a:-1}if(n==="-"||n==="."){const a=this.buffer.substr(t,3);if((a==="---"||a==="...")&&Mi(this.buffer[t+3]))return-1}return t}getLine(){let t=this.lineEndPos;return(typeof t!="number"||t!==-1&&t<this.pos)&&(t=this.buffer.indexOf(`
499
- `,this.pos),this.lineEndPos=t),t===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[t-1]==="\r"&&(t-=1),this.buffer.substring(this.pos,t))}hasChars(t){return this.pos+t<=this.buffer.length}setNext(t){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=t,null}peek(t){return this.buffer.substr(this.pos,t)}*parseNext(t){switch(t){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let t=this.getLine();if(t===null)return this.setNext("stream");if(t[0]===Wd&&(yield*this.pushCount(1),t=t.substring(1)),t[0]==="%"){let n=t.length,a=t.indexOf("#");for(;a!==-1;){const o=t[a-1];if(o===" "||o===" "){n=a-1;break}else a=t.indexOf("#",a+1)}for(;;){const o=t[n-1];if(o===" "||o===" ")n-=1;else break}const s=(yield*this.pushCount(n))+(yield*this.pushSpaces(!0));return yield*this.pushCount(t.length-s),this.pushNewline(),"stream"}if(this.atLineEnd()){const n=yield*this.pushSpaces(!0);return yield*this.pushCount(t.length-n),yield*this.pushNewline(),"stream"}return yield Xd,yield*this.parseLineStart()}*parseLineStart(){const t=this.charAt(0);if(!t&&!this.atEnd)return this.setNext("line-start");if(t==="-"||t==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const n=this.peek(3);if((n==="---"||n==="...")&&Mi(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,n==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!Mi(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[t,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext("block-start");if((t==="-"||t==="?"||t===":")&&Mi(n)){const a=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=a,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const t=this.getLine();if(t===null)return this.setNext("doc");let n=yield*this.pushIndicators();switch(t[n]){case"#":yield*this.pushCount(t.length-n);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(Ep),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return n+=yield*this.parseBlockScalarHeader(),n+=yield*this.pushSpaces(!0),yield*this.pushCount(t.length-n),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let t,n,a=-1;do t=yield*this.pushNewline(),t>0?(n=yield*this.pushSpaces(!1),this.indentValue=a=n):n=0,n+=yield*this.pushSpaces(!0);while(t+n>0);const s=this.getLine();if(s===null)return this.setNext("flow");if((a!==-1&&a<this.indentNext&&s[0]!=="#"||a===0&&(s.startsWith("---")||s.startsWith("..."))&&Mi(s[3]))&&!(a===this.indentNext-1&&this.flowLevel===1&&(s[0]==="]"||s[0]==="}")))return this.flowLevel=0,yield Zd,yield*this.parseLineStart();let o=0;for(;s[o]===",";)o+=yield*this.pushCount(1),o+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(o+=yield*this.pushIndicators(),s[o]){case void 0:return"flow";case"#":return yield*this.pushCount(s.length-o),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(Ep),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const c=this.charAt(1);if(this.flowKey||Mi(c)||c===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const t=this.charAt(0);let n=this.buffer.indexOf(t,this.pos+1);if(t==="'")for(;n!==-1&&this.buffer[n+1]==="'";)n=this.buffer.indexOf("'",n+2);else for(;n!==-1;){let o=0;for(;this.buffer[n-1-o]==="\\";)o+=1;if(o%2===0)break;n=this.buffer.indexOf('"',n+1)}const a=this.buffer.substring(0,n);let s=a.indexOf(`
500
- `,this.pos);if(s!==-1){for(;s!==-1;){const o=this.continueScalar(s+1);if(o===-1)break;s=a.indexOf(`
501
- `,o)}s!==-1&&(n=s-(a[s-1]==="\r"?2:1))}if(n===-1){if(!this.atEnd)return this.setNext("quoted-scalar");n=this.buffer.length}return yield*this.pushToIndex(n+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let t=this.pos;for(;;){const n=this.buffer[++t];if(n==="+")this.blockScalarKeep=!0;else if(n>"0"&&n<="9")this.blockScalarIndent=Number(n)-1;else if(n!=="-")break}return yield*this.pushUntil(n=>Mi(n)||n==="#")}*parseBlockScalar(){let t=this.pos-1,n=0,a;e:for(let o=this.pos;a=this.buffer[o];++o)switch(a){case" ":n+=1;break;case`
502
- `:t=o,n=0;break;case"\r":{const c=this.buffer[o+1];if(!c&&!this.atEnd)return this.setNext("block-scalar");if(c===`
503
- `)break}default:break e}if(!a&&!this.atEnd)return this.setNext("block-scalar");if(n>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=n:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{const o=this.continueScalar(t+1);if(o===-1)break;t=this.buffer.indexOf(`
504
- `,o)}while(t!==-1);if(t===-1){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}let s=t+1;for(a=this.buffer[s];a===" ";)a=this.buffer[++s];if(a===" "){for(;a===" "||a===" "||a==="\r"||a===`
505
- `;)a=this.buffer[++s];t=s-1}else if(!this.blockScalarKeep)do{let o=t-1,c=this.buffer[o];c==="\r"&&(c=this.buffer[--o]);const d=o;for(;c===" ";)c=this.buffer[--o];if(c===`
506
- `&&o>=this.pos&&o+1+n>d)t=o;else break}while(!0);return yield dc,yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const t=this.flowLevel>0;let n=this.pos-1,a=this.pos-1,s;for(;s=this.buffer[++a];)if(s===":"){const o=this.buffer[a+1];if(Mi(o)||t&&Zu.has(o))break;n=a}else if(Mi(s)){let o=this.buffer[a+1];if(s==="\r"&&(o===`
507
- `?(a+=1,s=`
508
- `,o=this.buffer[a+1]):n=a),o==="#"||t&&Zu.has(o))break;if(s===`
509
- `){const c=this.continueScalar(a+1);if(c===-1)break;a=Math.max(a,c-2)}}else{if(t&&Zu.has(s))break;n=a}return!s&&!this.atEnd?this.setNext("plain-scalar"):(yield dc,yield*this.pushToIndex(n+1,!0),t?"flow":"doc")}*pushCount(t){return t>0?(yield this.buffer.substr(this.pos,t),this.pos+=t,t):0}*pushToIndex(t,n){const a=this.buffer.slice(this.pos,t);return a?(yield a,this.pos+=a.length,a.length):(n&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(Ep))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const t=this.flowLevel>0,n=this.charAt(1);if(Mi(n)||t&&Zu.has(n))return t?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let t=this.pos+2,n=this.buffer[t];for(;!Mi(n)&&n!==">";)n=this.buffer[++t];return yield*this.pushToIndex(n===">"?t+1:t,!1)}else{let t=this.pos+1,n=this.buffer[t];for(;n;)if(tO.has(n))n=this.buffer[++t];else if(n==="%"&&iw.has(this.buffer[t+1])&&iw.has(this.buffer[t+2]))n=this.buffer[t+=3];else break;return yield*this.pushToIndex(t,!1)}}*pushNewline(){const t=this.buffer[this.pos];return t===`
510
- `?yield*this.pushCount(1):t==="\r"&&this.charAt(1)===`
511
- `?yield*this.pushCount(2):0}*pushSpaces(t){let n=this.pos-1,a;do a=this.buffer[++n];while(a===" "||t&&a===" ");const s=n-this.pos;return s>0&&(yield this.buffer.substr(this.pos,s),this.pos=n),s}*pushUntil(t){let n=this.pos,a=this.buffer[n];for(;!t(a);)a=this.buffer[++n];return yield*this.pushToIndex(n,!1)}}class gE{constructor(){this.lineStarts=[],this.addNewLine=t=>this.lineStarts.push(t),this.linePos=t=>{let n=0,a=this.lineStarts.length;for(;n<a;){const o=n+a>>1;this.lineStarts[o]<t?n=o+1:a=o}if(this.lineStarts[n]===t)return{line:n+1,col:1};if(n===0)return{line:0,col:t};const s=this.lineStarts[n-1];return{line:n,col:t-s+1}}}}function dr(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function aw(e){for(let t=0;t<e.length;++t)switch(e[t].type){case"space":case"comment":case"newline":break;default:return t}return-1}function bE(e){switch(e==null?void 0:e.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Ju(e){switch(e.type){case"document":return e.start;case"block-map":{const t=e.items[e.items.length-1];return t.sep??t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function rl(e){var n;if(e.length===0)return[];let t=e.length;e:for(;--t>=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((n=e[++t])==null?void 0:n.type)==="space";);return e.splice(t,e.length)}function rw(e){if(e.start.type==="flow-seq-start")for(const t of e.items)t.sep&&!t.value&&!dr(t.start,"explicit-key-ind")&&!dr(t.sep,"map-value-ind")&&(t.key&&(t.value=t.key),delete t.key,bE(t.value)?t.value.end?Array.prototype.push.apply(t.value.end,t.sep):t.value.end=t.sep:Array.prototype.push.apply(t.start,t.sep),delete t.sep)}class hg{constructor(t){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new mE,this.onNewLine=t}*parse(t,n=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const a of this.lexer.lex(t,n))yield*this.next(a);n||(yield*this.end())}*next(t){if(this.source=t,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=t.length;return}const n=pE(t);if(n)if(n==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=n,yield*this.step(),n){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+t.length);break;case"space":this.atNewLine&&t[0]===" "&&(this.indent+=t.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=t.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=t.length}else{const a=`Not a YAML token: ${t}`;yield*this.pop({type:"error",offset:this.offset,message:a,source:t}),this.offset+=t.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const t=this.peek(1);if(this.type==="doc-end"&&(t==null?void 0:t.type)!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!t)return yield*this.stream();switch(t.type){case"document":return yield*this.document(t);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(t);case"block-scalar":return yield*this.blockScalar(t);case"block-map":return yield*this.blockMap(t);case"block-seq":return yield*this.blockSequence(t);case"flow-collection":return yield*this.flowCollection(t);case"doc-end":return yield*this.documentEnd(t)}yield*this.pop()}peek(t){return this.stack[this.stack.length-t]}*pop(t){const n=t??this.stack.pop();if(!n)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield n;else{const a=this.peek(1);switch(n.type==="block-scalar"?n.indent="indent"in a?a.indent:0:n.type==="flow-collection"&&a.type==="document"&&(n.indent=0),n.type==="flow-collection"&&rw(n),a.type){case"document":a.value=n;break;case"block-scalar":a.props.push(n);break;case"block-map":{const s=a.items[a.items.length-1];if(s.value){a.items.push({start:[],key:n,sep:[]}),this.onKeyLine=!0;return}else if(s.sep)s.value=n;else{Object.assign(s,{key:n,sep:[]}),this.onKeyLine=!s.explicitKey;return}break}case"block-seq":{const s=a.items[a.items.length-1];s.value?a.items.push({start:[],value:n}):s.value=n;break}case"flow-collection":{const s=a.items[a.items.length-1];!s||s.value?a.items.push({start:[],key:n,sep:[]}):s.sep?s.value=n:Object.assign(s,{key:n,sep:[]});return}default:yield*this.pop(),yield*this.pop(n)}if((a.type==="document"||a.type==="block-map"||a.type==="block-seq")&&(n.type==="block-map"||n.type==="block-seq")){const s=n.items[n.items.length-1];s&&!s.sep&&!s.value&&s.start.length>0&&aw(s.start)===-1&&(n.indent===0||s.start.every(o=>o.type!=="comment"||o.indent<n.indent))&&(a.type==="document"?a.end=s.start:a.items.push({start:s.start}),n.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{const t={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&t.start.push(this.sourceToken),this.stack.push(t);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(t){if(t.value)return yield*this.lineEnd(t);switch(this.type){case"doc-start":{aw(t.start)!==-1?(yield*this.pop(),yield*this.step()):t.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":t.start.push(this.sourceToken);return}const n=this.startBlockValue(t);n?this.stack.push(n):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(t){if(this.type==="map-value-ind"){const n=Ju(this.peek(2)),a=rl(n);let s;t.end?(s=t.end,s.push(this.sourceToken),delete t.end):s=[this.sourceToken];const o={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:a,key:t,sep:s}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(t)}*blockScalar(t){switch(this.type){case"space":case"comment":case"newline":t.props.push(this.sourceToken);return;case"scalar":if(t.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let n=this.source.indexOf(`
512
- `)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
513
- `,n)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(t){var a;const n=t.items[t.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,n.value){const s="end"in n.value?n.value.end:void 0,o=Array.isArray(s)?s[s.length-1]:void 0;(o==null?void 0:o.type)==="comment"?s==null||s.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)t.items.push({start:[this.sourceToken]});else if(n.sep)n.sep.push(this.sourceToken);else{if(this.atIndentedComment(n.start,t.indent)){const s=t.items[t.items.length-2],o=(a=s==null?void 0:s.value)==null?void 0:a.end;if(Array.isArray(o)){Array.prototype.push.apply(o,n.start),o.push(this.sourceToken),t.items.pop();return}}n.start.push(this.sourceToken)}return}if(this.indent>=t.indent){const s=!this.onKeyLine&&this.indent===t.indent,o=s&&(n.sep||n.explicitKey)&&this.type!=="seq-item-ind";let c=[];if(o&&n.sep&&!n.value){const d=[];for(let h=0;h<n.sep.length;++h){const p=n.sep[h];switch(p.type){case"newline":d.push(h);break;case"space":break;case"comment":p.indent>t.indent&&(d.length=0);break;default:d.length=0}}d.length>=2&&(c=n.sep.splice(d[1]))}switch(this.type){case"anchor":case"tag":o||n.value?(c.push(this.sourceToken),t.items.push({start:c}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"explicit-key-ind":!n.sep&&!n.explicitKey?(n.start.push(this.sourceToken),n.explicitKey=!0):o||n.value?(c.push(this.sourceToken),t.items.push({start:c,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(n.explicitKey)if(n.sep)if(n.value)t.items.push({start:[],key:null,sep:[this.sourceToken]});else if(dr(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:c,key:null,sep:[this.sourceToken]}]});else if(bE(n.key)&&!dr(n.sep,"newline")){const d=rl(n.start),h=n.key,p=n.sep;p.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:d,key:h,sep:p}]})}else c.length>0?n.sep=n.sep.concat(c,this.sourceToken):n.sep.push(this.sourceToken);else if(dr(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{const d=rl(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:d,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||o?t.items.push({start:c,key:null,sep:[this.sourceToken]}):dr(n.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const d=this.flowScalar(this.type);o||n.value?(t.items.push({start:c,key:d,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(d):(Object.assign(n,{key:d,sep:[]}),this.onKeyLine=!0);return}default:{const d=this.startBlockValue(t);if(d){if(d.type==="block-seq"){if(!n.explicitKey&&n.sep&&!dr(n.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else s&&t.items.push({start:c});this.stack.push(d);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(t){var a;const n=t.items[t.items.length-1];switch(this.type){case"newline":if(n.value){const s="end"in n.value?n.value.end:void 0,o=Array.isArray(s)?s[s.length-1]:void 0;(o==null?void 0:o.type)==="comment"?s==null||s.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)t.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,t.indent)){const s=t.items[t.items.length-2],o=(a=s==null?void 0:s.value)==null?void 0:a.end;if(Array.isArray(o)){Array.prototype.push.apply(o,n.start),o.push(this.sourceToken),t.items.pop();return}}n.start.push(this.sourceToken)}return;case"anchor":case"tag":if(n.value||this.indent<=t.indent)break;n.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==t.indent)break;n.value||dr(n.start,"seq-item-ind")?t.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return}if(this.indent>t.indent){const s=this.startBlockValue(t);if(s){this.stack.push(s);return}}yield*this.pop(),yield*this.step()}*flowCollection(t){const n=t.items[t.items.length-1];if(this.type==="flow-error-end"){let a;do yield*this.pop(),a=this.peek(1);while((a==null?void 0:a.type)==="flow-collection")}else if(t.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!n||n.sep?t.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return;case"map-value-ind":!n||n.value?t.items.push({start:[],key:null,sep:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!n||n.value?t.items.push({start:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const s=this.flowScalar(this.type);!n||n.value?t.items.push({start:[],key:s,sep:[]}):n.sep?this.stack.push(s):Object.assign(n,{key:s,sep:[]});return}case"flow-map-end":case"flow-seq-end":t.end.push(this.sourceToken);return}const a=this.startBlockValue(t);a?this.stack.push(a):(yield*this.pop(),yield*this.step())}else{const a=this.peek(2);if(a.type==="block-map"&&(this.type==="map-value-ind"&&a.indent===t.indent||this.type==="newline"&&!a.items[a.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&a.type!=="flow-collection"){const s=Ju(a),o=rl(s);rw(t);const c=t.end.splice(1,t.end.length);c.push(this.sourceToken);const d={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:o,key:t,sep:c}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=d}else yield*this.lineEnd(t)}}flowScalar(t){if(this.onNewLine){let n=this.source.indexOf(`
514
- `)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
515
- `,n)+1}return{type:t,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(t){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const n=Ju(t),a=rl(n);return a.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const n=Ju(t),a=rl(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(t,n){return this.type!=="comment"||this.indent<=n?!1:t.every(a=>a.type==="newline"||a.type==="space")}*documentEnd(t){this.type!=="doc-mode"&&(t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(t){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function yE(e){const t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new gE||null,prettyErrors:t}}function iO(e,t={}){const{lineCounter:n,prettyErrors:a}=yE(t),s=new hg(n==null?void 0:n.addNewLine),o=new fg(t),c=Array.from(o.compose(s.parse(e)));if(a&&n)for(const d of c)d.errors.forEach(_d(e,n)),d.warnings.forEach(_d(e,n));return c.length>0?c:Object.assign([],{empty:!0},o.streamInfo())}function xE(e,t={}){const{lineCounter:n,prettyErrors:a}=yE(t),s=new hg(n==null?void 0:n.addNewLine),o=new fg(t);let c=null;for(const d of o.compose(s.parse(e),!0,e.length))if(!c)c=d;else if(c.options.logLevel!=="silent"){c.errors.push(new ts(d.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return a&&n&&(c.errors.forEach(_d(e,n)),c.warnings.forEach(_d(e,n))),c}function aO(e,t,n){let a;typeof t=="function"?a=t:n===void 0&&t&&typeof t=="object"&&(n=t);const s=xE(e,n);if(!s)return null;if(s.warnings.forEach(o=>zk(s.options.logLevel,o)),s.errors.length>0){if(s.options.logLevel!=="silent")throw s.errors[0];s.errors=[]}return s.toJS(Object.assign({reviver:a},n))}function rO(e,t,n){let a=null;if(typeof t=="function"||Array.isArray(t)?a=t:n===void 0&&t&&(n=t),typeof n=="string"&&(n=n.length),typeof n=="number"){const s=Math.round(n);n=s<1?void 0:s>8?{indent:8}:{indent:s}}if(e===void 0){const{keepUndefined:s}=n??t??{};if(!s)return}return ms(e)&&!a?e.toString(n):new $l(e,a,n).toString(n)}const sw=Object.freeze(Object.defineProperty({__proto__:null,Alias:Fd,CST:eO,Composer:fg,Document:$l,Lexer:mE,LineCounter:gE,Pair:kn,Parser:hg,Scalar:Fe,Schema:nE,YAMLError:ug,YAMLMap:si,YAMLParseError:ts,YAMLSeq:Sr,YAMLWarning:aE,isAlias:Cr,isCollection:Pt,isDocument:ms,isMap:Pl,isNode:Ut,isPair:Lt,isScalar:Et,isSeq:Ul,parse:aO,parseAllDocuments:iO,parseDocument:xE,stringify:rO,visit:gs,visitAsync:Ud},Symbol.toStringTag,{value:"Module"}));function sO({projectName:e,file:t,onClose:n,onSaved:a}){const s=ze(),o=En(),{alert:c}=Ci(),{data:d,isLoading:h,isError:p,error:b,refetch:g}=rt({queryKey:["pipeline-file",e,t],queryFn:()=>jA(e,t)}),[v,x]=C.useState("structured"),[E,w]=C.useState(null),[S,_]=C.useState(null);C.useEffect(()=>{d&&E===null&&(w(d.content),_(d.etag),d.parseError&&x("yaml"))},[d,E]),C.useEffect(()=>{const q=F=>{F.key==="Escape"&&n()};return window.addEventListener("keydown",q),()=>window.removeEventListener("keydown",q)},[n]);const A=Mn({mutationFn:()=>{if(E===null||S===null)throw new Error("no draft");return OA(e,t,E,S)},onSuccess:q=>{_(q.etag),o.invalidateQueries({queryKey:["pipeline-file",e,t]}),o.invalidateQueries({queryKey:["project-pipelines",e]}),a()},onError:q=>{const F=q.status;c({title:s(F===409?"pipelineEditor.error.conflict.title":F===422?"pipelineEditor.error.yaml.title":"pipelineEditor.error.save.title"),body:q instanceof Error?q.message:String(q)})}}),T=E!==null&&d&&E!==d.content,{parsed:D,parseError:B}=C.useMemo(()=>{if(E===null)return{parsed:null,parseError:null};try{return{parsed:sw.parse(E)??{},parseError:null}}catch(q){return{parsed:null,parseError:q instanceof Error?q.message:String(q)}}},[E]),M=q=>{try{const F=sw.stringify(q,{lineWidth:0});w(F)}catch(F){c({title:s("pipelineEditor.error.serialize.title"),body:F instanceof Error?F.message:String(F)})}};return f.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-40 flex items-start justify-center p-6 bg-black/30 overflow-auto",children:f.jsxs("div",{className:"nb-card mt-8 w-full max-w-4xl flex flex-col",style:{maxHeight:"calc(100vh - 64px)"},children:[f.jsxs("header",{className:"flex items-start justify-between gap-3 mb-3 flex-shrink-0",children:[f.jsxs("div",{children:[f.jsxs("h2",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold flex items-center gap-2",children:[f.jsx(Qv,{size:20,strokeWidth:2.5}),f.jsx("code",{className:"font-[family-name:var(--font-mono)] text-lg",children:t}),(d==null?void 0:d.isActive)&&f.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)",padding:"2px 8px"},children:s("pipelineEditor.activeBadge")})]}),f.jsxs("p",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] mt-1",children:[e,"/pipelines/",t,S&&` · etag ${S}`]})]}),f.jsx("button",{className:"nb-btn nb-btn-mint p-2",onClick:n,type:"button","aria-label":s("pipelineEditor.close"),children:f.jsx(Si,{size:14,strokeWidth:3})})]}),h&&f.jsx("p",{className:"text-[var(--color-text-muted)]",children:s("common.loading")}),p&&f.jsx("p",{className:"text-[var(--color-crashed)]",children:s("pipelineEditor.error.load",{detail:b instanceof Error?b.message:String(b)})}),d&&E!==null&&f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"flex items-center gap-3 mb-3 flex-shrink-0 flex-wrap",children:[f.jsxs("div",{className:"flex gap-1 p-1 bg-[var(--color-bg)] border-[2px] border-[var(--color-text)] rounded-full shadow-[2px_2px_0_var(--color-text)]",children:[f.jsxs("button",{type:"button",onClick:()=>x("structured"),"aria-pressed":v==="structured",disabled:!!B,className:["px-3 py-1 rounded-full text-xs font-bold flex items-center gap-1.5",v==="structured"?"bg-[var(--color-primary)] text-[var(--color-text)] shadow-[1px_1px_0_var(--color-text)]":"text-[var(--color-text-muted)]",B?"opacity-50 cursor-not-allowed":""].join(" "),title:B??void 0,children:[f.jsx(kc,{size:11,strokeWidth:2.5}),s("pipelineEditor.mode.structured")]}),f.jsxs("button",{type:"button",onClick:()=>x("yaml"),"aria-pressed":v==="yaml",className:["px-3 py-1 rounded-full text-xs font-bold flex items-center gap-1.5",v==="yaml"?"bg-[var(--color-primary)] text-[var(--color-text)] shadow-[1px_1px_0_var(--color-text)]":"text-[var(--color-text-muted)]"].join(" "),children:[f.jsx(Qv,{size:11,strokeWidth:2.5}),s("pipelineEditor.mode.yaml")]})]}),B&&f.jsxs("div",{className:"flex items-center gap-1 text-xs text-[var(--color-crashed)] font-bold",children:[f.jsx(sc,{size:12,strokeWidth:2.5}),s("pipelineEditor.parseError.prefix",{detail:B})]}),(d==null?void 0:d.isActive)&&f.jsx("span",{className:"text-xs text-[var(--color-stuck)] font-bold ml-auto",children:s("pipelineEditor.activeWarning")})]}),f.jsxs("div",{className:"flex-1 overflow-auto",children:[v==="structured"&&D&&f.jsx(lO,{parsed:D,onChange:M}),v==="yaml"&&f.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",style:{minHeight:400,resize:"vertical"},value:E,onChange:q=>w(q.target.value),spellCheck:!1,"aria-label":s("pipelineEditor.yamlAria")})]}),f.jsxs("div",{className:"flex items-center justify-between mt-3 pt-3 border-t-2 border-dashed border-[var(--color-text)] flex-shrink-0",children:[f.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:T?f.jsx("span",{className:"text-[var(--color-stuck)] font-bold",children:s("pipelineEditor.status.unsaved")}):A.isSuccess?f.jsxs("span",{className:"text-[var(--color-running)] font-bold flex items-center gap-1",children:[f.jsx(lc,{size:12,strokeWidth:2.5})," ",s("pipelineEditor.status.saved")]}):s("pipelineEditor.status.noChanges")}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx("button",{className:"nb-btn",style:{padding:"6px 14px"},onClick:()=>{w(null),g()},disabled:A.isPending,type:"button",children:s("pipelineEditor.reload")}),f.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 14px"},onClick:()=>A.mutate(),disabled:!T||A.isPending,type:"button","aria-label":s("pipelineEditor.saveAria"),children:[A.isPending?f.jsx(jt,{size:13,strokeWidth:3,className:"animate-spin"}):f.jsx(Pd,{size:13,strokeWidth:3}),s("pipelineEditor.save")]})]})]})]})]})})}function lO({parsed:e,onChange:t}){const n=ze(),a=e.stages??[],s=p=>{t({...e,stages:p})},o=()=>{s([...a,{name:`stage-${a.length+1}`,on_complete:"move_card Done"}])},c=p=>{s(a.filter((b,g)=>g!==p))},d=(p,b)=>{const g=[...a],v=p+b;v<0||v>=g.length||([g[p],g[v]]=[g[v],g[p]],s(g))},h=(p,b)=>{s(a.map((g,v)=>v===p?{...g,...b}:g))};return f.jsxs("div",{className:"flex flex-col gap-4",children:[f.jsxs("div",{className:"flex items-center gap-3 p-3 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg",children:[f.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[f.jsx("span",{className:"font-bold",children:"mode:"}),f.jsxs("select",{className:"nb-input",style:{padding:"4px 10px",fontSize:12},value:e.mode??"project",onChange:p=>t({...e,mode:p.target.value}),children:[f.jsx("option",{value:"project",children:"project"}),f.jsx("option",{value:"steps",children:"steps"})]})]}),f.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:n("pipelineEditor.modeHint")})]}),f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center justify-between mb-2",children:[f.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold uppercase tracking-wider",children:n("pipelineEditor.stages.heading",{count:a.length})}),f.jsxs("button",{type:"button",className:"nb-btn nb-btn-mint",style:{padding:"4px 12px",fontSize:12},onClick:o,"aria-label":n("pipelineEditor.stages.add"),children:[f.jsx(Bi,{size:11,strokeWidth:3})," ",n("pipelineEditor.stages.add")]})]}),a.length===0?f.jsx("p",{className:"text-sm text-[var(--color-text-muted)] italic p-4 border-2 border-dashed border-[var(--color-text)] rounded-lg text-center",children:n("pipelineEditor.stages.empty")}):f.jsx("div",{className:"flex flex-col gap-3",children:a.map((p,b)=>f.jsx(oO,{stage:p,index:b,total:a.length,onChange:g=>h(b,g),onRemove:()=>c(b),onMoveUp:()=>d(b,-1),onMoveDown:()=>d(b,1)},b))})]})]})}function oO({stage:e,index:t,total:n,onChange:a,onRemove:s,onMoveUp:o,onMoveDown:c}){const d=ze(),h=e.on_fail??{};return f.jsxs("div",{className:"nb-card bg-[var(--color-bg-cream)] p-4",children:[f.jsxs("div",{className:"flex items-center justify-between mb-3",children:[f.jsxs("h4",{className:"font-[family-name:var(--font-heading)] font-bold text-sm",children:["Stage #",t+1,e.name&&f.jsx("code",{className:"ml-2 text-xs font-[family-name:var(--font-mono)] bg-[var(--color-bg)] border-2 border-[var(--color-text)] px-2 py-0.5 rounded",children:e.name})]}),f.jsxs("div",{className:"flex gap-1",children:[f.jsx("button",{type:"button",className:"nb-btn",style:{padding:"3px 8px"},onClick:o,disabled:t===0,"aria-label":d("pipelineEditor.stage.moveUp"),children:f.jsx(G2,{size:12,strokeWidth:3})}),f.jsx("button",{type:"button",className:"nb-btn",style:{padding:"3px 8px"},onClick:c,disabled:t===n-1,"aria-label":d("pipelineEditor.stage.moveDown"),children:f.jsx(wc,{size:12,strokeWidth:3})}),f.jsx("button",{type:"button",className:"nb-btn nb-btn-danger",style:{padding:"3px 8px"},onClick:s,"aria-label":d("pipelineEditor.stage.remove"),children:f.jsx(zl,{size:12,strokeWidth:3})})]})]}),f.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[f.jsx(or,{label:"name",hint:d("pipelineEditor.stage.name.hint"),children:f.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.name??"",onChange:p=>a({name:p.target.value}),placeholder:"develop"})}),f.jsx(or,{label:"profile",hint:d("pipelineEditor.stage.profile.hint"),children:f.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.profile??"",onChange:p=>a({profile:p.target.value||void 0}),placeholder:"fullstack"})}),f.jsx(or,{label:"card_state",hint:d("pipelineEditor.stage.cardState.hint"),children:f.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.card_state??"",onChange:p=>a({card_state:p.target.value||void 0}),placeholder:"Inprogress"})}),f.jsx(or,{label:"timeout",hint:d("pipelineEditor.stage.timeout.hint"),children:f.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.timeout??"",onChange:p=>a({timeout:p.target.value||void 0}),placeholder:"2h"})}),f.jsx(or,{label:"trigger",hint:d("pipelineEditor.stage.trigger.hint"),children:f.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.trigger??"",onChange:p=>a({trigger:p.target.value||void 0}),placeholder:"card_enters 'Todo'"})}),f.jsx(or,{label:"on_complete",hint:d("pipelineEditor.stage.onComplete.hint"),children:f.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.on_complete??"",onChange:p=>a({on_complete:p.target.value}),placeholder:"move_card Done"})})]}),f.jsxs("div",{className:"mt-4 pt-3 border-t-2 border-dashed border-[var(--color-text)]",children:[f.jsx("h5",{className:"text-xs font-bold uppercase tracking-wider mb-2 text-[var(--color-text-muted)]",children:"on_fail"}),f.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[f.jsx(or,{label:"action",hint:d("pipelineEditor.stage.onFail.action.hint"),children:f.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:h.action??"",onChange:p=>a({on_fail:{...h,action:p.target.value||void 0}}),placeholder:"label NEEDS-FIX"})}),f.jsx(or,{label:"comment",hint:d("pipelineEditor.stage.onFail.comment.hint"),children:f.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:h.comment??"",onChange:p=>a({on_fail:{...h,comment:p.target.value||void 0}}),placeholder:"Worker failed. Check logs."})})]}),f.jsxs("label",{className:"flex items-center gap-2 mt-3 text-sm cursor-pointer",children:[f.jsx("input",{type:"checkbox",checked:h.halt??!0,onChange:p=>a({on_fail:{...h,halt:p.target.checked}})}),f.jsx("span",{className:"font-bold",children:"halt"}),f.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:d("pipelineEditor.stage.halt.note")})]})]})]})}function or({label:e,hint:t,children:n}){return f.jsxs("label",{className:"flex flex-col gap-1",children:[f.jsx("span",{className:"text-xs font-bold font-[family-name:var(--font-mono)]",children:e}),n,t&&f.jsx("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:t})]})}function cO({onCancel:e,onCreate:t,hasActive:n,hasSample:a,isPending:s}){const o=ze(),[c,d]=C.useState(""),[h,p]=C.useState("blank");C.useEffect(()=>{const S=_=>{_.key==="Escape"&&e()};return window.addEventListener("keydown",S),()=>window.removeEventListener("keydown",S)},[e]);const b=c.trim(),g=b.endsWith(".yaml")?b:b?`${b}.yaml`:"",v=g&&/^[a-zA-Z0-9_.-]+\.yaml$/.test(g),x=()=>{!v||s||t(g,h)},w=o("newPipelineDialog.field.filename.help",{filename:"__FN__"}).split("__FN__");return f.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/30",children:f.jsxs("div",{className:"nb-card max-w-md w-full",children:[f.jsxs("header",{className:"flex items-start justify-between mb-4",children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold",children:o("newPipelineDialog.title")}),f.jsx("button",{className:"nb-btn nb-btn-mint p-2",onClick:e,type:"button","aria-label":o("common.close"),children:f.jsx(Si,{size:14,strokeWidth:3})})]}),f.jsxs("form",{onSubmit:S=>{S.preventDefault(),x()},className:"flex flex-col gap-4",children:[f.jsxs("label",{className:"flex flex-col gap-1.5",children:[f.jsx("span",{className:"text-sm font-bold",children:o("newPipelineDialog.field.filename.label")}),f.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:o("newPipelineDialog.field.filename.placeholder"),value:c,onChange:S=>d(S.target.value),autoFocus:!0}),f.jsxs("span",{className:"text-xs text-[var(--color-text-muted)]",children:[w[0],f.jsx("code",{className:"font-[family-name:var(--font-mono)]",children:g||"xxx.yaml"}),w[1]]})]}),f.jsxs("fieldset",{className:"flex flex-col gap-2",children:[f.jsx("legend",{className:"text-sm font-bold mb-1",children:o("newPipelineDialog.section.template")}),f.jsx(Sp,{value:"blank",current:h,label:o("newPipelineDialog.template.blank.label"),desc:o("newPipelineDialog.template.blank.desc"),onSelect:p}),f.jsx(Sp,{value:"sample",current:h,label:o("newPipelineDialog.template.sample.label"),desc:o("newPipelineDialog.template.sample.desc"),onSelect:p,disabled:!a,disabledReason:o("newPipelineDialog.template.sample.unavailable")}),f.jsx(Sp,{value:"active",current:h,label:o("newPipelineDialog.template.active.label"),desc:o("newPipelineDialog.template.active.desc"),onSelect:p,disabled:!n,disabledReason:o("newPipelineDialog.template.active.unavailable")})]}),f.jsxs("div",{className:"flex gap-3 justify-end pt-2",children:[f.jsx("button",{className:"nb-btn",onClick:e,type:"button",disabled:s,children:o("common.cancel")}),f.jsxs("button",{className:"nb-btn nb-btn-primary",type:"submit",disabled:!v||s,"aria-label":o("newPipelineDialog.create.aria"),children:[s?f.jsx(jt,{size:13,strokeWidth:3,className:"animate-spin"}):f.jsx(Bi,{size:13,strokeWidth:3}),o("common.create")]})]})]})]})})}function Sp({value:e,current:t,label:n,desc:a,onSelect:s,disabled:o,disabledReason:c}){const d=t===e;return f.jsxs("label",{className:["flex items-start gap-2 p-2 rounded-lg border-2 cursor-pointer",o?"border-[var(--color-border-light)] opacity-50 cursor-not-allowed":d?"bg-[var(--color-accent-mint)] border-[var(--color-text)] shadow-[2px_2px_0_var(--color-text)]":"border-[var(--color-border-light)] hover:bg-[var(--color-bg-cream)] hover:border-[var(--color-text)]"].join(" "),children:[f.jsx("input",{type:"radio",name:"pipeline-template",value:e,checked:d,disabled:o,onChange:()=>s(e),className:"mt-1 flex-shrink-0"}),f.jsxs("div",{className:"flex-1",children:[f.jsx("div",{className:"text-sm font-bold",children:n}),f.jsx("div",{className:"text-xs text-[var(--color-text-muted)]",children:o?c:a})]})]})}function uO(){var c;const e=ze(),{name:t=""}=Q0(),n=_r(),[a,s]=C.useState("overview"),o=rt({queryKey:["project",t],queryFn:()=>EA(t),enabled:!!t});return f.jsxs("div",{className:"flex flex-col gap-5 max-w-4xl",children:[f.jsxs("header",{className:"flex items-center gap-3",children:[f.jsxs("button",{type:"button",onClick:()=>n("/projects"),className:"nb-btn",style:{padding:"6px 12px"},"aria-label":e("newProject.back.aria"),children:[f.jsx(ik,{size:14,strokeWidth:3}),e("newProject.back")]}),f.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-3xl font-bold flex-1",children:t}),f.jsx(ps,{to:`/board?project=${encodeURIComponent(t)}`,className:"nb-btn nb-btn-mint",children:e("projectDetail.openBoard")})]}),f.jsxs("nav",{className:"flex gap-2 flex-wrap",children:[f.jsx(ed,{current:a,value:"overview",onSelect:s,icon:oT,children:e("projectDetail.tab.overview")}),f.jsx(ed,{current:a,value:"config",onSelect:s,icon:dk,children:e("projectDetail.tab.config")}),f.jsx(ed,{current:a,value:"pipelines",onSelect:s,icon:mk,children:e("projectDetail.tab.pipelines")}),f.jsx(ed,{current:a,value:"danger",onSelect:s,icon:zl,children:e("projectDetail.tab.danger")})]}),a==="overview"&&f.jsx(dO,{name:t,data:o.data,loading:o.isLoading}),a==="config"&&f.jsx(fO,{name:t}),a==="pipelines"&&f.jsx(hO,{name:t}),a==="danger"&&f.jsx(pO,{name:t,repoDir:((c=o.data)==null?void 0:c.repoDir)??null})]})}function ed({current:e,value:t,onSelect:n,icon:a,children:s}){const o=e===t;return f.jsxs("button",{type:"button",onClick:()=>n(t),"aria-current":o?"page":void 0,className:["nb-btn",o?"nb-btn-primary":""].join(" "),style:{padding:"6px 14px",fontSize:13},children:[f.jsx(a,{size:13,strokeWidth:2.5}),s]})}function dO({name:e,data:t,loading:n}){const a=ze();return n?f.jsx("div",{className:"nb-card",children:f.jsx("p",{className:"text-[var(--color-text-muted)]",children:a("common.loading")})}):t?f.jsx("div",{className:"nb-card",children:f.jsxs("dl",{className:"grid grid-cols-[160px_1fr] gap-y-3 text-sm",children:[f.jsx("dt",{className:"font-bold",children:a("projectDetail.overview.repoDir")}),f.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.repoDir??"—"}),f.jsx("dt",{className:"font-bold",children:a("projectDetail.overview.pmBackend")}),f.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.pmBackend}),f.jsx("dt",{className:"font-bold",children:a("projectDetail.overview.agent")}),f.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.agentProvider}),f.jsx("dt",{className:"font-bold",children:a("projectDetail.overview.cards")}),f.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:a("projectDetail.overview.cards.value",{total:t.cards.total,inprogress:t.cards.inprogress,done:t.cards.done})}),f.jsx("dt",{className:"font-bold",children:a("projectDetail.overview.workers")}),f.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:a("projectDetail.overview.workers.value",{total:t.workers.total,active:t.workers.active})}),f.jsx("dt",{className:"font-bold",children:a("projectDetail.overview.pipeline")}),f.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.pipelineStatus}),f.jsx("dt",{className:"font-bold",children:a("projectDetail.overview.lastActivity")}),f.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.lastActivityAt?new Date(t.lastActivityAt).toLocaleString():"—"})]})}):f.jsx("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:f.jsx("p",{children:a("projectDetail.overview.notFound",{name:e})})})}function fO({name:e}){const t=ze(),n=En(),{alert:a}=Ci(),{data:s,isLoading:o,isError:c,error:d,refetch:h}=rt({queryKey:["project-conf",e],queryFn:()=>_A(e)}),[p,b]=C.useState(null),[g,v]=C.useState(null);C.useEffect(()=>{s&&p===null&&(b(s.content),v(s.etag))},[s,p]);const x=p!==null&&s!==void 0&&p!==s.content,E=Mn({mutationFn:()=>{if(p===null||g===null)throw new Error("no draft");return NA(e,p,g)},onSuccess:w=>{v(w.etag),n.invalidateQueries({queryKey:["project-conf",e]}),n.invalidateQueries({queryKey:["project",e]})},onError:w=>{const S=w.status;a({title:t(S===409?"projectDetail.config.error.conflict.title":"projectDetail.config.error.save.title"),body:S===409?t("projectDetail.config.error.conflict.body"):w instanceof Error?w.message:String(w)})}});return o?f.jsx("div",{className:"nb-card",children:f.jsx("p",{className:"text-[var(--color-text-muted)]",children:t("common.loading")})}):c?f.jsx("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:f.jsx("p",{children:t("projectDetail.config.error.load",{detail:d instanceof Error?d.message:String(d)})})}):f.jsxs("div",{className:"nb-card",children:[f.jsxs("div",{className:"flex items-center justify-between mb-3",children:[f.jsxs("div",{children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-lg font-bold",children:f.jsxs("code",{className:"font-[family-name:var(--font-mono)] text-sm bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] px-2 py-0.5 rounded",children:["~/.coral/projects/",e,"/conf"]})}),g&&f.jsxs("p",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] mt-1",children:["etag: ",g]})]}),f.jsxs("div",{className:"flex gap-2",children:[f.jsxs("button",{type:"button",className:"nb-btn",style:{padding:"6px 12px"},onClick:()=>{b(null),h()},disabled:E.isPending,"aria-label":t("projectDetail.config.reload"),children:[f.jsx(Er,{size:13,strokeWidth:2.5}),t("projectDetail.config.reload")]}),f.jsxs("button",{type:"button",className:"nb-btn nb-btn-primary",style:{padding:"6px 12px"},onClick:()=>E.mutate(),disabled:!x||E.isPending,"aria-label":t("projectDetail.config.saveAria"),children:[E.isPending?f.jsx(jt,{size:13,strokeWidth:3,className:"animate-spin"}):E.isSuccess&&!x?f.jsx(q2,{size:13,strokeWidth:3}):f.jsx(Pd,{size:13,strokeWidth:3}),t("projectDetail.config.save")]})]})]}),f.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",style:{minHeight:480,resize:"vertical"},value:p??"",onChange:w=>b(w.target.value),spellCheck:!1,"aria-label":t("projectDetail.config.editorAria")}),x&&f.jsx("p",{className:"text-xs text-[var(--color-stuck)] mt-2 font-bold",children:t("projectDetail.config.confDirty")})]})}function hO({name:e}){const t=ze(),n=En(),{confirm:a,alert:s}=Ci(),{data:o,isLoading:c}=rt({queryKey:["project-pipelines",e],queryFn:()=>TA(e)}),[d,h]=C.useState(null),[p,b]=C.useState(!1),g=Mn({mutationFn:w=>AA(e,w),onSuccess:()=>n.invalidateQueries({queryKey:["project-pipelines",e]}),onError:w=>{s({title:t("projectDetail.pipelines.switch.error"),body:w instanceof Error?w.message:String(w)})}}),v=Mn({mutationFn:w=>MA(e,w),onSuccess:()=>n.invalidateQueries({queryKey:["project-pipelines",e]}),onError:w=>{s({title:t("projectDetail.pipelines.delete.error"),body:w instanceof Error?w.message:String(w)})}}),x=Mn({mutationFn:w=>DA(e,w.name,w.template),onSuccess:w=>{n.invalidateQueries({queryKey:["project-pipelines",e]}),b(!1),h(w.name)},onError:w=>{s({title:t("projectDetail.pipelines.create.error"),body:w instanceof Error?w.message:String(w)})}});if(c)return f.jsx("div",{className:"nb-card",children:f.jsx("p",{className:"text-[var(--color-text-muted)]",children:t("common.loading")})});const E=[];o!=null&&o.active&&E.push({name:o.active,isActive:!0});for(const w of(o==null?void 0:o.available)??[])E.push({name:w.name,isActive:!1});return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"nb-card",children:[f.jsxs("div",{className:"flex items-center justify-between mb-3",children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-lg font-bold",children:t("projectDetail.pipelines.title")}),f.jsxs("button",{type:"button",className:"nb-btn nb-btn-mint",style:{padding:"6px 12px",fontSize:12},onClick:()=>b(!0),disabled:x.isPending,"aria-label":t("projectDetail.pipelines.add"),children:[f.jsx(Bi,{size:12,strokeWidth:3}),t("projectDetail.pipelines.add")]})]}),E.length===0?f.jsx("p",{className:"text-sm text-[var(--color-text-muted)] italic p-4 border-2 border-dashed border-[var(--color-text)] rounded-lg text-center",children:t("projectDetail.pipelines.empty")}):f.jsx("ul",{className:"flex flex-col gap-2",children:E.map(w=>f.jsxs("li",{className:"flex items-center gap-3 p-3 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg",children:[f.jsx(mk,{size:16,strokeWidth:2.5}),f.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold flex-1",children:w.name}),w.isActive&&f.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:t("projectDetail.pipelines.activeBadge")}),f.jsxs("div",{className:"flex gap-1",children:[f.jsxs("button",{type:"button",className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>h(w.name),"aria-label":t("projectDetail.pipelines.editAria",{name:w.name}),children:[f.jsx(Wm,{size:11,strokeWidth:2.5}),t("projectDetail.pipelines.edit")]}),!w.isActive&&f.jsxs(f.Fragment,{children:[f.jsx("button",{type:"button",className:"nb-btn nb-btn-primary",style:{padding:"4px 10px",fontSize:11},onClick:async()=>{await a({title:t("projectDetail.pipelines.switch.confirm.title",{name:w.name}),body:t("projectDetail.pipelines.switch.confirm.body",{name:w.name}),confirm:t("projectDetail.pipelines.switch.confirm.button")})&&g.mutate(w.name)},disabled:g.isPending,"aria-label":t("projectDetail.pipelines.switchAria",{name:w.name}),children:t("projectDetail.pipelines.switch")}),f.jsx("button",{type:"button",className:"nb-btn nb-btn-danger",style:{padding:"4px 10px",fontSize:11},onClick:async()=>{await a({title:t("projectDetail.pipelines.delete.confirm.title",{name:w.name}),body:t("projectDetail.pipelines.delete.confirm.body"),confirm:t("common.delete"),danger:!0})&&v.mutate(w.name)},disabled:v.isPending,"aria-label":t("projectDetail.pipelines.deleteAria",{name:w.name}),children:f.jsx(zl,{size:11,strokeWidth:2.5})})]})]})]},w.name))})]}),d&&f.jsx(sO,{projectName:e,file:d,onClose:()=>h(null),onSaved:()=>{n.invalidateQueries({queryKey:["project-pipelines",e]})}}),p&&f.jsx(cO,{hasActive:!!(o!=null&&o.active),hasSample:!0,isPending:x.isPending,onCancel:()=>b(!1),onCreate:(w,S)=>x.mutate({name:w,template:S})})]})}function pO({name:e,repoDir:t}){const n=ze(),a=_r(),s=En(),{alert:o}=Ci(),[c,d]=C.useState(""),[h,p]=C.useState(!0),b=Mn({mutationFn:()=>CA(e,{includeClaudeDir:h}),onSuccess:w=>{s.invalidateQueries({queryKey:["projects"]});const S=w.claudeRemoved.filter(_=>_.ok).map(_=>_.path);o({title:n("projectDetail.danger.deleted.title"),body:S.length>0?n("projectDetail.danger.deleted.bodyWithList",{paths:S.join(`
516
- `)}):n("projectDetail.danger.deleted.body")}).then(()=>a("/projects"))},onError:w=>{o({title:n("projectDetail.danger.error"),body:w instanceof Error?w.message:String(w)})}}),v=n("projectDetail.danger.body",{path:"__PATH__"}).split("__PATH__"),E=n("projectDetail.danger.confirmPrompt",{name:"__NAME__"}).split("__NAME__");return f.jsxs("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-lg font-bold mb-2 text-[var(--color-crashed)]",children:n("projectDetail.danger.title")}),f.jsxs("p",{className:"text-sm mb-4",children:[v[0],f.jsxs("code",{className:"font-[family-name:var(--font-mono)] bg-[var(--color-bg)] border-2 border-[var(--color-text)] px-1.5 py-0.5 rounded",children:["~/.coral/projects/",e,"/"]}),v[1]]}),t&&f.jsxs("label",{className:"flex items-start gap-2 mb-4 p-3 bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded-lg cursor-pointer",children:[f.jsx("input",{type:"checkbox",checked:h,onChange:w=>p(w.target.checked),className:"mt-0.5"}),f.jsxs("div",{className:"flex-1",children:[f.jsx("div",{className:"text-sm font-bold",children:n("projectDetail.danger.includeClaude.label")}),f.jsxs("div",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)]",children:[t,"/.claude/"]}),f.jsx("div",{className:"text-xs text-[var(--color-text-muted)] mt-1",children:n("projectDetail.danger.includeClaude.note")})]})]}),f.jsx("div",{className:"mb-4",children:f.jsxs("label",{className:"flex flex-col gap-1.5",children:[f.jsxs("span",{className:"text-sm font-bold",children:[E[0],f.jsx("code",{className:"font-[family-name:var(--font-mono)] text-xs",children:e}),E[1]]}),f.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",value:c,onChange:w=>d(w.target.value),placeholder:e})]})}),f.jsxs("button",{type:"button",className:"nb-btn nb-btn-danger",disabled:c!==e||b.isPending,onClick:()=>b.mutate(),"aria-label":n("projectDetail.danger.deleteAria"),children:[b.isPending?f.jsx(jt,{size:14,strokeWidth:3,className:"animate-spin"}):f.jsx(zl,{size:14,strokeWidth:3}),n("projectDetail.danger.deleteButton")]})]})}function pg(e){const t=e?`?project=${encodeURIComponent(e)}`:"";return It(`/api/skills${t}`)}function mO(e){return It(`/api/skills/${encodeURIComponent(e)}`)}function gO(e,t){return It(`/api/skills/${encodeURIComponent(e)}/references/${encodeURIComponent(t)}`)}async function bO(e,t){const n=await fetch(e,{method:"POST",headers:void 0,body:void 0});if(!n.ok)throw new Error(`${n.status}: ${await n.text()}`);return n.json().catch(()=>({}))}function yO(){return bO("/api/skills/sync")}function xO({project:e,isPending:t,onCancel:n,onCreate:a}){var T;const s=ze(),[o,c]=C.useState(""),[d,h]=C.useState(""),[p,b]=C.useState(new Set),[g,v]=C.useState(!1),x=rt({queryKey:["skills-all",e],queryFn:()=>pg(e)});C.useEffect(()=>{const D=B=>{B.key==="Escape"&&n()};return window.addEventListener("keydown",D),()=>window.removeEventListener("keydown",D)},[n]);const w=o.trim().length>0&&o.trim().length<=200&&!t,S=D=>{const B=new Set(p);B.has(D)?B.delete(D):B.add(D),b(B)},_=()=>{w&&a({title:o.trim(),description:d.trim(),skills:[...p],labels:["AI-PIPELINE"],initialState:g?"Backlog":"Planning"})},A=((T=x.data)==null?void 0:T.data)??[];return f.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-40 flex items-start justify-center p-6 bg-black/30 overflow-auto",children:f.jsxs("div",{className:"nb-card mt-8 w-full max-w-xl flex flex-col",style:{maxHeight:"calc(100vh - 64px)"},children:[f.jsxs("header",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold",children:s("newCard.title")}),f.jsx("button",{className:"nb-btn nb-btn-mint p-2",onClick:n,type:"button","aria-label":s("common.close"),children:f.jsx(Si,{size:14,strokeWidth:3})})]}),f.jsxs("form",{onSubmit:D=>{D.preventDefault(),_()},className:"flex flex-col gap-4 overflow-auto",children:[f.jsxs("label",{className:"flex flex-col gap-1.5",children:[f.jsx("span",{className:"text-sm font-bold",children:s("newCard.field.title")}),f.jsx("input",{type:"text",className:"nb-input w-full",placeholder:s("newCard.field.title.placeholder"),value:o,onChange:D=>c(D.target.value),maxLength:200,autoFocus:!0,required:!0}),f.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:s("newCard.field.title.help")})]}),f.jsxs("label",{className:"flex flex-col gap-1.5",children:[f.jsx("span",{className:"text-sm font-bold",children:s("newCard.field.description")}),f.jsx("textarea",{className:"nb-input w-full",style:{minHeight:120,resize:"vertical"},placeholder:s("newCard.field.description.placeholder"),value:d,onChange:D=>h(D.target.value)}),f.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:s("newCard.field.description.help")})]}),f.jsxs("div",{className:"flex flex-col gap-2",children:[f.jsx("span",{className:"text-sm font-bold",children:s("newCard.field.skills")}),f.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:s("newCard.field.skills.help")}),x.isLoading&&f.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:s("newCard.field.skills.loading")}),x.isError&&f.jsx("p",{className:"text-xs text-[var(--color-crashed)]",children:s("newCard.field.skills.error",{detail:x.error instanceof Error?x.error.message:String(x.error)})}),A.length>0&&f.jsx("div",{className:"flex flex-wrap gap-2",children:A.map(D=>{const B=p.has(D.name);return f.jsx("button",{type:"button",onClick:()=>S(D.name),className:["px-2.5 py-1 text-xs font-[family-name:var(--font-mono)] rounded-full border-2 transition-all",B?"bg-[var(--color-accent-mint)] border-[var(--color-text)] shadow-[2px_2px_0_var(--color-text)] font-bold":"bg-[var(--color-bg)] border-[var(--color-border-light)] hover:border-[var(--color-text)]"].join(" "),"aria-pressed":B,children:D.name},D.name)})}),p.size>0&&f.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:s("newCard.field.skills.selected",{count:p.size,names:[...p].join(", ")})})]}),f.jsxs("div",{className:"flex flex-col gap-2",children:[f.jsx("span",{className:"text-sm font-bold",children:s("newCard.field.dispatch")}),f.jsxs("label",{className:"flex items-center gap-3 cursor-pointer select-none p-3 border-[2px] border-[var(--color-text)] rounded-lg bg-[var(--color-bg-cream)]",children:[f.jsx("input",{type:"checkbox",className:"w-4 h-4 accent-[var(--color-cta)] cursor-pointer",checked:g,onChange:D=>v(D.target.checked)}),f.jsxs("div",{className:"flex-1",children:[f.jsx("div",{className:"text-sm font-bold",children:s("newCard.field.dispatch.label")}),f.jsx("div",{className:"text-xs text-[var(--color-text-muted)] mt-0.5",children:s("newCard.field.dispatch.help")})]})]})]})]}),f.jsxs("div",{className:"flex gap-2 justify-end mt-4 pt-3 border-t-2 border-dashed border-[var(--color-text)] flex-shrink-0",children:[f.jsx("button",{className:"nb-btn",style:{padding:"6px 14px"},onClick:n,disabled:t,type:"button",children:s("common.cancel")}),f.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 14px"},onClick:_,disabled:!w,type:"button","aria-label":s("newCard.create.aria"),children:[t?f.jsx(jt,{size:13,strokeWidth:3,className:"animate-spin"}):f.jsx(Bi,{size:13,strokeWidth:3}),s("common.create")]})]})]})})}function vO(e){return It(`/api/projects/${encodeURIComponent(e)}/cards`)}function wO(e,t){return It(`/api/projects/${encodeURIComponent(e)}/cards/${t}`)}async function Hl(e,t){const n=await fetch(e,{method:"POST",headers:t?{"Content-Type":"application/json"}:void 0,body:t?JSON.stringify(t):void 0});if(!n.ok){const a=await n.text();throw new Error(`${n.status} ${n.statusText}: ${a}`)}return n.json().catch(()=>({}))}function kO(e,t){return Hl(`/api/projects/${encodeURIComponent(e)}/cards/${t}/reset`)}async function EO(e,t){const n=await fetch(`/api/projects/${encodeURIComponent(e)}/cards/${t}`,{method:"DELETE"});if(!n.ok){const a=await n.text();throw new Error(`${n.status}: ${a}`)}}function SO(e,t){return Hl(`/api/projects/${encodeURIComponent(e)}/cards/${t}/launch`)}function _O(e,t){const n=typeof t=="string"?{title:t}:t;return Hl(`/api/projects/${encodeURIComponent(e)}/cards`,n)}async function NO(e,t,n){const a=await fetch(`/api/projects/${encodeURIComponent(e)}/cards/${t}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({state:n})});if(!a.ok){const s=await a.text();throw new Error(`${a.status}: ${s}`)}}async function CO(e,t,n){const a=await fetch(`/api/projects/${encodeURIComponent(e)}/cards/${t}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!a.ok){const s=await a.text();throw new Error(`${a.status}: ${s}`)}return a.json()}function TO(e){return Hl(`/api/projects/${encodeURIComponent(e)}/pipeline/start`)}function AO(e){return Hl(`/api/projects/${encodeURIComponent(e)}/pipeline/stop`)}function jO(e,t){return Hl(`/api/projects/${encodeURIComponent(e)}/pipeline/reset`,t??{})}function OO(e){const t=En();C.useEffect(()=>{if(!e)return;const n=`/stream/projects/${encodeURIComponent(e)}`,a=new EventSource(n),s=d=>{try{const h=JSON.parse(d.data);t.invalidateQueries({queryKey:["cards",h.project]}),t.invalidateQueries({queryKey:["card",h.project,h.seq]}),t.invalidateQueries({queryKey:["projects"]})}catch{}},o=d=>{try{const h=JSON.parse(d.data);t.invalidateQueries({queryKey:["workers",h.project]}),t.invalidateQueries({queryKey:["projects"]})}catch{}},c=d=>{try{const h=JSON.parse(d.data);t.invalidateQueries({queryKey:["pipeline-status",h.project]}),t.invalidateQueries({queryKey:["projects"]})}catch{}};return a.addEventListener("card.created",s),a.addEventListener("card.updated",s),a.addEventListener("card.moved",s),a.addEventListener("card.deleted",s),a.addEventListener("worker.updated",o),a.addEventListener("worker.added",o),a.addEventListener("worker.deleted",o),a.addEventListener("pipeline.status",c),a.addEventListener("pipeline.started",c),a.addEventListener("pipeline.stopped",c),()=>a.close()},[e,t])}const DO=new Set(["python","typescript","golang","rust","kotlin","swift","java"]),MO=new Set(["frontend","backend","mobile","database","devops"]),RO=new Set(["backend-architect","frontend-developer","code-reviewer","database-optimizer","devops-automator","security-engineer","qa-tester","security","qa","architect","db-opt"]),LO=new Set(["coding-standards","tdd-workflow","git-workflow","architecture-decision-records","debugging-workflow"]);function IO(e){return DO.has(e)?"lang":MO.has(e)?"end":RO.has(e)?"persona":LO.has(e)?"workflow":"other"}const zO={lang:"var(--color-accent-purple)",end:"var(--color-secondary)",persona:"var(--color-primary)",workflow:"var(--color-accent-mint)",other:"var(--color-bg)"};function vE({name:e}){const t=zO[IO(e)];return f.jsx("span",{className:"nb-badge",style:{background:t},children:e})}function wE({label:e,kind:t="default"}){const n=t==="warn"?"var(--color-accent-pink)":t==="accent"?"var(--color-accent-yellow)":"var(--color-bg-cream)";return f.jsx("span",{className:"nb-badge",style:{background:n},children:e})}function BO({card:e,onClick:t,done:n,draggable:a}){const s=ze(),o=e.labels.some(c=>c.startsWith("STARTED-"))&&!n;return f.jsxs("article",{onClick:t,onKeyDown:c=>{(c.key==="Enter"||c.key===" ")&&(c.preventDefault(),t())},draggable:a,onDragStart:c=>{c.dataTransfer.setData("application/x-sps-card-seq",String(e.seq)),c.dataTransfer.effectAllowed="move"},tabIndex:0,role:"button","aria-label":`Card #${e.seq}: ${e.title}`,className:["bg-[var(--color-bg)] border-[3px] border-[var(--color-text)] rounded-xl p-3","shadow-[3px_3px_0_var(--color-text)] cursor-pointer","transition-[transform,box-shadow] duration-[180ms] ease-out","hover:-translate-x-0.5 hover:-translate-y-0.5 hover:shadow-[5px_5px_0_var(--color-text)]","focus:outline-none focus-visible:ring-[3px] focus-visible:ring-offset-2 focus-visible:ring-[var(--color-text)]",n?"opacity-60":"",a?"active:cursor-grabbing":""].join(" "),children:[f.jsxs("div",{className:"flex items-center justify-between gap-2 mb-2",children:[f.jsxs("span",{className:"font-[family-name:var(--font-mono)] font-bold text-[11px] px-2 py-0.5 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-full",children:["#",e.seq]}),o&&f.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"running"})]}),f.jsx("p",{className:`font-bold text-sm leading-5 mb-2 line-clamp-2 ${n?"line-through decoration-2":""}`,children:e.title}),(e.skills.length>0||e.labels.length>0)&&f.jsxs("div",{className:"flex flex-wrap gap-1 mb-2",children:[e.skills.slice(0,3).map(c=>f.jsx(vE,{name:c},c)),e.labels.filter(c=>c==="NEEDS-FIX").map(c=>f.jsx(wE,{label:c,kind:"warn"},c))]}),e.checklist&&e.checklist.total>0&&f.jsx(PO,{stats:e.checklist}),f.jsxs("div",{className:"pt-2 border-t-[1.5px] border-dashed border-[var(--color-border-light)] flex items-center gap-2 text-[11px] font-[family-name:var(--font-mono)] text-[var(--color-text-subtle)]",children:[f.jsx("span",{children:UO(e.updatedAt??e.createdAt,s)}),e.branch&&f.jsxs("span",{className:"truncate",children:["· ",e.branch]})]})]})}function PO({stats:e}){const t=ze();return f.jsxs("div",{className:"mb-2",children:[f.jsxs("div",{className:"flex items-center justify-between text-[11px] font-[family-name:var(--font-mono)] mb-1",children:[f.jsx("span",{className:"font-bold",children:t("kanban.checklist.label",{done:e.done,total:e.total})}),f.jsxs("span",{className:"text-[var(--color-text-subtle)]",children:[e.percent,"%"]})]}),f.jsx("div",{className:"w-full h-1.5 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-full overflow-hidden mb-1.5",children:f.jsx("div",{className:"h-full bg-[var(--color-cta)] transition-[width] duration-200",style:{width:`${e.percent}%`}})}),f.jsxs("ul",{className:"text-[11px] space-y-0.5",children:[e.items.slice(0,3).map((n,a)=>f.jsxs("li",{className:`flex items-start gap-1 ${n.done?"opacity-60 line-through":""}`,children:[f.jsx("span",{className:"flex-shrink-0 mt-0.5",children:n.done?"✓":"○"}),f.jsx("span",{className:"line-clamp-1",children:n.text})]},a)),e.items.length>3&&f.jsx("li",{className:"text-[var(--color-text-subtle)] italic pl-3",children:t("kanban.checklist.more",{count:e.items.length-3})})]})]})}function UO(e,t){if(!e)return"—";const n=new Date(e),a=Date.now()-n.getTime();return a<6e4?t("kanban.time.justNow"):a<36e5?t("kanban.time.minutes",{n:Math.floor(a/6e4)}):a<864e5?t("kanban.time.hours",{n:Math.floor(a/36e5)}):n.toLocaleDateString()}function FO({label:e,bg:t,cards:n,onCardClick:a,onDropCard:s}){const o=ze(),[c,d]=C.useState(!1);return f.jsxs("div",{className:["flex flex-col p-3 rounded-2xl border-[3px] min-h-[280px] h-full min-h-0 overflow-hidden","transition-all",c?"border-[var(--color-cta)] shadow-[4px_4px_0_var(--color-cta)]":"border-[var(--color-text)]"].join(" "),style:{background:t},onDragOver:h=>{!s||!h.dataTransfer.types.includes("application/x-sps-card-seq")||(h.preventDefault(),h.dataTransfer.dropEffect="move",c||d(!0))},onDragLeave:()=>d(!1),onDrop:h=>{if(d(!1),!s)return;const p=h.dataTransfer.getData("application/x-sps-card-seq"),b=Number.parseInt(p,10);Number.isFinite(b)&&(h.preventDefault(),s(b))},children:[f.jsxs("div",{className:"flex items-center justify-between px-1 pb-2 mb-2 border-b-2 border-[var(--color-text)] shrink-0",children:[f.jsx("span",{className:"font-[family-name:var(--font-heading)] font-bold text-sm uppercase tracking-wider",children:e}),f.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold text-xs px-2 py-0.5 bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded-full",children:n.length})]}),f.jsxs("div",{className:"flex flex-col gap-2 flex-1 min-h-0 overflow-y-auto pr-1 -mr-1",style:{scrollbarWidth:"thin",scrollbarColor:"var(--color-text) transparent"},children:[n.length===0&&f.jsx("div",{className:"text-xs text-[var(--color-text-muted)] text-center py-6 italic",children:o("kanban.column.empty")}),n.map(h=>f.jsx(BO,{card:h,onClick:()=>a(h),done:e==="Done",draggable:!!s},h.seq))]})]})}function wm(e,t){if(!e)return"";const n=e.split(`
517
- `),a=new RegExp(`^##\\s+${t}\\s*$`),s=n.findIndex(c=>a.test(c));if(s===-1)return"";let o=n.length;for(let c=s+1;c<n.length;c++)if(/^##\s+/.test(n[c]??"")){o=c;break}return n.slice(s+1,o).join(`
518
- `).trim()}function _p(e){return wm(e,"描述")}function qO({project:e,seq:t,onClose:n,onChanged:a}){var ce,de,re,O,R,Q,j,ge,_e,Y,xe;const s=ze(),o=En(),{confirm:c,alert:d}=Ci(),{data:h,isLoading:p,isError:b,error:g,refetch:v}=rt({queryKey:["card",e,t],queryFn:()=>wO(e,t)}),[x,E]=C.useState(!1),[w,S]=C.useState(""),[_,A]=C.useState(""),[T,D]=C.useState(new Set),[B,M]=C.useState([]),[q,F]=C.useState(""),ee=rt({queryKey:["skills-all",e],queryFn:()=>pg(e),enabled:x}),X=((de=(ce=rt({queryKey:["projects"],queryFn:Nr,refetchInterval:1e4}).data)==null?void 0:ce.data.find(V=>V.name===e))==null?void 0:de.pipelineStatus)==="running";C.useEffect(()=>{x&&h&&(S(h.title),A(_p(h.body)),D(new Set(h.skills)),M([...h.labels]))},[x,h]),C.useEffect(()=>{const V=ae=>{ae.key==="Escape"&&(x?E(!1):n())};return window.addEventListener("keydown",V),()=>window.removeEventListener("keydown",V)},[n,x]);const J=Mn({mutationFn:()=>{if(!h)throw new Error("no data");const V={},ae=w.trim();ae&&ae!==h.title&&(V.title=ae);const ye=_p(h.body);_!==ye&&(V.description=_);const Pe=[...T].sort(),Ot=[...h.skills].sort();return JSON.stringify(Pe)!==JSON.stringify(Ot)&&(V.skills=Pe),JSON.stringify(B)!==JSON.stringify(h.labels)&&(V.labels=B),Object.keys(V).length===0?Promise.resolve({ok:!0,noop:!0}):CO(e,t,V)},onSuccess:()=>{o.invalidateQueries({queryKey:["card",e,t]}),o.invalidateQueries({queryKey:["cards",e]}),E(!1),a()},onError:V=>{d({title:s("cardModal.error.save.title"),body:V instanceof Error?V.message:String(V)})}}),pe=C.useMemo(()=>{if(!x||!h)return!1;if(w.trim()!==h.title||_!==_p(h.body))return!0;const V=[...T].sort(),ae=[...h.skills].sort();return JSON.stringify(V)!==JSON.stringify(ae)||JSON.stringify(B)!==JSON.stringify(h.labels)},[x,h,w,_,T,B]),ue=V=>{const ae=new Set(T);ae.has(V)?ae.delete(V):ae.add(V),D(ae)},te=()=>{const V=q.trim();if(V){if(B.includes(V)){F("");return}M([...B,V]),F("")}},$=V=>{M(B.filter(ae=>ae!==V))};return f.jsx("div",{role:"dialog","aria-modal":"true","aria-labelledby":"card-modal-title",className:"fixed inset-0 z-40 flex items-start justify-center p-6 bg-black/30 overflow-auto",children:f.jsxs("div",{className:"nb-card mt-12 w-full max-w-3xl bg-[var(--color-bg)]",children:[f.jsxs("header",{className:"flex items-start justify-between gap-4 mb-4",children:[f.jsxs("div",{className:"flex-1 min-w-0",children:[f.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[f.jsxs("span",{className:"font-[family-name:var(--font-mono)] font-bold text-xs px-2 py-0.5 bg-[var(--color-accent-purple)] border-2 border-[var(--color-text)] rounded-full",children:["#",t]}),(h==null?void 0:h.state)&&f.jsx("span",{className:"font-[family-name:var(--font-mono)] text-xs px-2 py-0.5 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-full font-semibold",children:h.state}),x&&f.jsx("span",{className:"text-xs font-bold text-[var(--color-stuck)]",children:s("cardModal.editing")})]}),x?f.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-heading)] text-xl font-bold",value:w,onChange:V=>S(V.target.value),maxLength:200,"aria-label":s("cardModal.title.aria")}):f.jsx("h2",{id:"card-modal-title",className:"font-[family-name:var(--font-heading)] text-2xl font-bold break-words",children:(h==null?void 0:h.title)??s("common.loading")})]}),f.jsxs("div",{className:"flex gap-2 flex-shrink-0",children:[!x&&h&&f.jsxs("button",{onClick:()=>E(!0),className:"nb-btn",style:{padding:"6px 12px"},type:"button","aria-label":s("cardModal.editAria"),children:[f.jsx(Wm,{size:12,strokeWidth:2.5})," ",s("cardModal.edit")]}),f.jsx("button",{onClick:n,className:"nb-btn nb-btn-mint p-2","aria-label":s("cardModal.close.aria"),type:"button",children:f.jsx(Si,{size:14,strokeWidth:3})})]})]}),p&&f.jsx("p",{className:"text-[var(--color-text-muted)]",children:s("common.loading")}),b&&f.jsx("p",{className:"text-[var(--color-crashed)]",children:s("cardModal.error.load",{detail:g instanceof Error?g.message:String(g)})}),h&&f.jsxs("div",{className:"flex flex-col gap-4",children:[h.branch&&!x&&f.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[f.jsx(pT,{size:14}),f.jsx("span",{className:"font-[family-name:var(--font-mono)]",children:h.branch})]}),x?f.jsxs(f.Fragment,{children:[f.jsxs("div",{children:[f.jsx("div",{className:"text-sm font-bold mb-1.5",children:"Skills"}),ee.isLoading&&f.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:s("cardModal.skills.loading")}),ee.data&&ee.data.data.length>0&&f.jsx("div",{className:"flex flex-wrap gap-1.5",children:ee.data.data.map(V=>{const ae=T.has(V.name);return f.jsx("button",{type:"button",onClick:()=>ue(V.name),"aria-pressed":ae,className:["px-2.5 py-1 text-xs font-[family-name:var(--font-mono)] rounded-full border-2 transition-all",ae?"bg-[var(--color-accent-mint)] border-[var(--color-text)] shadow-[2px_2px_0_var(--color-text)] font-bold":"bg-[var(--color-bg)] border-[var(--color-border-light)] hover:border-[var(--color-text)]"].join(" "),children:V.name},V.name)})})]}),f.jsxs("div",{children:[f.jsx("div",{className:"text-sm font-bold mb-1.5",children:"Labels"}),f.jsxs("div",{className:"flex flex-wrap gap-1.5 items-center",children:[B.map(V=>f.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 text-xs font-[family-name:var(--font-mono)] bg-[var(--color-accent-yellow)] border-2 border-[var(--color-text)] rounded-full",children:[V,f.jsx("button",{type:"button",onClick:()=>$(V),className:"hover:text-[var(--color-crashed)]","aria-label":s("cardModal.label.removeAria",{label:V}),children:f.jsx(Si,{size:10,strokeWidth:3})})]},V)),f.jsx("input",{type:"text",className:"nb-input",style:{padding:"4px 8px",fontSize:12,width:140},placeholder:s("cardModal.label.addPlaceholder"),value:q,onChange:V=>F(V.target.value),onKeyDown:V=>{V.key==="Enter"&&!V.nativeEvent.isComposing&&(V.preventDefault(),te())}}),q&&f.jsx("button",{type:"button",className:"nb-btn",style:{padding:"2px 6px",fontSize:11},onClick:te,"aria-label":s("cardModal.label.addAria"),children:f.jsx(Bi,{size:10,strokeWidth:3})})]}),f.jsx("p",{className:"text-[10px] text-[var(--color-text-muted)] mt-1",children:s("cardModal.label.note")})]})]}):f.jsxs(f.Fragment,{children:[h.skills.length>0&&f.jsxs("div",{children:[f.jsx("div",{className:"text-sm font-bold mb-1.5",children:"Skills"}),f.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:h.skills.map(V=>f.jsx(vE,{name:V},V))})]}),h.labels.length>0&&f.jsxs("div",{children:[f.jsx("div",{className:"text-sm font-bold mb-1.5",children:"Labels"}),f.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:h.labels.map(V=>f.jsx(wE,{label:V,kind:V==="NEEDS-FIX"?"warn":"default"},V))})]})]}),x?f.jsxs(f.Fragment,{children:[f.jsxs("div",{children:[f.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:s("cardModal.section.description")}),f.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",style:{minHeight:180,resize:"vertical"},value:_,onChange:V=>A(V.target.value),"aria-label":s("cardModal.body.aria")}),f.jsx("p",{className:"text-[10px] text-[var(--color-text-muted)] mt-1",children:s("cardModal.body.replaceNote")})]}),(((ge=h.checklist)==null?void 0:ge.total)??0)>0&&f.jsxs("div",{className:"nb-card bg-[var(--color-bg-cream)] p-3",children:[f.jsx("div",{className:"flex items-center justify-between mb-2",children:f.jsxs("span",{className:"font-bold text-sm",children:[s("cardModal.section.checklist")," ",((_e=h.checklist)==null?void 0:_e.done)??0,"/",((Y=h.checklist)==null?void 0:Y.total)??0]})}),f.jsx("ul",{className:"text-sm space-y-1",children:(((xe=h.checklist)==null?void 0:xe.items)??[]).map((V,ae)=>f.jsxs("li",{className:`flex items-start gap-2 ${V.done?"opacity-60 line-through":""}`,children:[f.jsx("span",{children:V.done?"✓":"○"}),f.jsx("span",{children:V.text})]},ae))})]})]}):f.jsxs(f.Fragment,{children:[f.jsxs("div",{children:[f.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:s("cardModal.section.description")}),f.jsx("pre",{className:"text-xs whitespace-pre-wrap font-[family-name:var(--font-mono)] bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg p-4 max-h-64 overflow-auto",children:wm(h.body,"描述")||s("cardModal.section.empty")})]}),f.jsxs("div",{children:[f.jsxs("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:[s("cardModal.section.checklist")," ",f.jsxs("span",{className:"text-[var(--color-text-muted)] normal-case tracking-normal",children:[((re=h.checklist)==null?void 0:re.done)??0,"/",((O=h.checklist)==null?void 0:O.total)??0]})]}),f.jsx("div",{className:"nb-card bg-[var(--color-bg-cream)] p-3",children:(((R=h.checklist)==null?void 0:R.total)??0)>0?f.jsxs(f.Fragment,{children:[f.jsx("div",{className:"flex items-center justify-end mb-2",children:f.jsx("div",{className:"w-24 h-2 bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded-full overflow-hidden",children:f.jsx("div",{className:"h-full bg-[var(--color-cta)]",style:{width:`${((Q=h.checklist)==null?void 0:Q.percent)??0}%`}})})}),f.jsx("ul",{className:"text-sm space-y-1",children:(((j=h.checklist)==null?void 0:j.items)??[]).map((V,ae)=>f.jsxs("li",{className:`flex items-start gap-2 ${V.done?"opacity-60 line-through":""}`,children:[f.jsx("span",{children:V.done?"✓":"○"}),f.jsx("span",{children:V.text})]},ae))})]}):f.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:s("cardModal.checklist.empty")})})]}),f.jsxs("div",{children:[f.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:s("cardModal.section.log")}),f.jsx("pre",{className:"text-xs whitespace-pre-wrap font-[family-name:var(--font-mono)] bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg p-4 max-h-64 overflow-auto",children:wm(h.body,"日志")||s("cardModal.section.empty")})]})]}),f.jsx("div",{className:"flex gap-2 pt-2 border-t-2 border-[var(--color-border-light)] justify-end flex-wrap",children:x?f.jsxs(f.Fragment,{children:[f.jsx("button",{className:"nb-btn",type:"button",onClick:()=>{E(!1),v()},disabled:J.isPending,children:s("common.cancel")}),f.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",onClick:()=>J.mutate(),disabled:!pe||!w.trim()||J.isPending,"aria-label":s("cardDetail.save"),children:[J.isPending?f.jsx(jt,{size:14,strokeWidth:3,className:"animate-spin"}):f.jsx(Pd,{size:14,strokeWidth:3}),s("common.save")]})]}):f.jsxs(f.Fragment,{children:[f.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",disabled:h.state==="Done"||X,title:h.state==="Done"?s("cardModal.action.launch.disabledDone"):X?s("cardModal.action.launch.disabledRunning"):void 0,onClick:async()=>{try{await SO(e,t),a()}catch(V){d({title:s("cardModal.action.launch.error"),body:V instanceof Error?V.message:String(V)})}},children:[f.jsx(Xm,{size:14,strokeWidth:3}),s("cardModal.action.launch")]}),f.jsxs("button",{className:"nb-btn nb-btn-yellow",type:"button",onClick:async()=>{if(await c({title:s("cardModal.action.reset.confirm.title",{seq:t}),body:s("cardModal.action.reset.confirm.body"),confirm:s("cardModal.action.reset.confirm.button"),danger:!0}))try{await kO(e,t),a(),n()}catch(ae){d({title:s("cardModal.action.reset.error"),body:ae instanceof Error?ae.message:String(ae)})}},children:[f.jsx(ck,{size:14,strokeWidth:2.5}),s("cardModal.action.reset")]}),f.jsxs("button",{className:"nb-btn",style:{background:"var(--color-crashed)",color:"var(--color-bg)"},type:"button",onClick:async()=>{if(!(!await c({title:s("cardModal.action.delete.confirm1.title",{seq:t}),body:s("cardModal.action.delete.confirm1.body",{title:h.title}),confirm:s("cardModal.action.delete.confirm1.button"),danger:!0})||!await c({title:s("cardModal.action.delete.confirm2.title"),body:s("cardModal.action.delete.confirm2.body",{seq:t}),confirm:s("cardModal.action.delete"),danger:!0})))try{await EO(e,t),a(),n()}catch(ye){d({title:s("projectDetail.pipelines.delete.error"),body:ye instanceof Error?ye.message:String(ye)})}},"aria-label":s("cardModal.action.delete"),children:[f.jsx(zl,{size:14,strokeWidth:2.5}),s("cardModal.action.delete")]})]})})]})]})})}function $O({current:e,onChange:t}){const[n,a]=C.useState(!1),s=C.useRef(null),{data:o}=rt({queryKey:["projects"],queryFn:Nr});return C.useEffect(()=>{const c=d=>{var h;(h=s.current)!=null&&h.contains(d.target)||a(!1)};return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[]),f.jsxs("div",{className:"relative",ref:s,children:[f.jsxs("button",{type:"button",className:"inline-flex items-center gap-2 px-3 py-2 bg-[var(--color-bg)] border-[3px] border-[var(--color-text)] rounded-xl shadow-[3px_3px_0_var(--color-text)] font-[family-name:var(--font-mono)] text-sm font-bold hover:-translate-x-px hover:-translate-y-px hover:shadow-[4px_4px_0_var(--color-text)] transition-[transform,box-shadow] duration-150",onClick:()=>a(c=>!c),children:[e,f.jsx(wc,{size:14,strokeWidth:2.5})]}),n&&o&&f.jsx("div",{className:"absolute right-0 mt-2 z-20 min-w-[200px] bg-[var(--color-bg)] border-[3px] border-[var(--color-text)] rounded-xl shadow-[5px_5px_0_var(--color-text)] overflow-hidden",children:o.data.map(c=>f.jsxs("button",{type:"button",onClick:()=>{t(c.name),a(!1)},className:["w-full text-left px-4 py-2 text-sm font-semibold",c.name===e?"bg-[var(--color-accent-mint)]":"hover:bg-[var(--color-bg-cream)]"].join(" "),children:[f.jsx("span",{className:"font-[family-name:var(--font-mono)]",children:c.name}),f.jsxs("span",{className:"ml-2 text-xs text-[var(--color-text-muted)]",children:[c.cards.total," cards"]})]},c.name))})]})}const HO=[{state:"Planning",labelKey:"board.col.planning",bg:"var(--color-accent-purple)"},{state:"Backlog",labelKey:"board.col.backlog",bg:"var(--color-bg-cream)"},{state:"Todo",labelKey:"board.col.todo",bg:"var(--color-accent-yellow)"},{state:"Inprogress",labelKey:"board.col.inprogress",bg:"var(--color-secondary)"},{state:"QA",labelKey:"board.col.qa",bg:"var(--color-accent-pink)"},{state:"Done",labelKey:"board.col.done",bg:"var(--color-accent-mint)"}],kE="sps-console:last-board-project";function KO(){if(typeof window>"u")return null;try{return localStorage.getItem(kE)}catch{return null}}function GO(e){if(!(typeof window>"u"))try{localStorage.setItem(kE,e)}catch{}}function QO(){var $,ce,de;const e=ze(),[t,n]=tk(),a=t.get("project"),[s,o]=C.useState(null),[c,d]=C.useState(""),[h,p]=C.useState(()=>new Set),[b,g]=C.useState(()=>new Set),{confirm:v,alert:x}=Ci();OO(a);const E=rt({queryKey:["projects"],queryFn:Nr}),w=rt({queryKey:["cards",a],queryFn:()=>vO(a??""),enabled:!!a}),S=En(),_=()=>{S.invalidateQueries({queryKey:["cards",a]}),S.invalidateQueries({queryKey:["projects"]}),S.invalidateQueries({queryKey:["pipeline-status",a]})},A=re=>{n({project:re})};C.useEffect(()=>{var O;if(a){GO(a);return}const re=KO();re&&((O=E.data)!=null&&O.data.some(R=>R.name===re))&&n({project:re},{replace:!0})},[a,E.data,n]);const T=Mn({mutationFn:()=>TO(a),onSuccess:()=>{_()},onError:re=>{x({title:e("board.action.startError"),body:re instanceof Error?re.message:String(re)})}}),D=Mn({mutationFn:()=>AO(a),onSuccess:()=>_(),onError:re=>{x({title:e("board.action.stopError"),body:re instanceof Error?re.message:String(re)})}}),B=Mn({mutationFn:()=>jO(a,{all:!0}),onSuccess:()=>_(),onError:re=>{x({title:e("board.action.resetError"),body:re instanceof Error?re.message:String(re)})}}),[M,q]=C.useState(!1),F=Mn({mutationFn:re=>_O(a,re),onSuccess:()=>{_(),q(!1)},onError:re=>{x({title:e("board.action.newCard.error"),body:re instanceof Error?re.message:String(re)})}}),ee=Mn({mutationFn:({seq:re,state:O})=>NO(a,re,O),onMutate:async({seq:re,state:O})=>{await S.cancelQueries({queryKey:["cards",a]});const R=S.getQueryData(["cards",a]);return R&&S.setQueryData(["cards",a],{...R,data:R.data.map(Q=>Q.seq===re?{...Q,state:O}:Q)}),{prev:R}},onError:(re,O,R)=>{R!=null&&R.prev&&S.setQueryData(["cards",a],R.prev),x({title:e("board.action.moveCard.error"),body:re instanceof Error?re.message:String(re)})},onSettled:()=>{S.invalidateQueries({queryKey:["cards",a]})}}),P=(($=w.data)==null?void 0:$.data)??[],{allSkills:X,allLabels:J}=C.useMemo(()=>{const re=new Set,O=new Set;for(const R of P){for(const Q of R.skills)re.add(Q);for(const Q of R.labels)O.add(Q)}return{allSkills:[...re].sort(),allLabels:[...O].sort()}},[P]);if(!a)return f.jsxs("div",{className:"flex flex-col gap-6 max-w-4xl",children:[f.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold",children:e("board.title.bare")}),f.jsxs("div",{className:"nb-card bg-[var(--color-accent-yellow)] max-w-2xl",children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-3",children:e("board.pickPrompt.title")}),f.jsx("p",{className:"text-sm mb-4 text-[var(--color-text-muted)]",children:e("board.pickPrompt.body")}),f.jsx("div",{className:"flex flex-wrap gap-2",children:(ce=E.data)==null?void 0:ce.data.map(re=>f.jsx("button",{className:"nb-btn nb-btn-blue",onClick:()=>A(re.name),type:"button",children:re.name},re.name))})]})]});const pe=P.filter(re=>{if(c){const O=c.toLowerCase();if(!(re.title.toLowerCase().includes(O)||re.skills.some(Q=>Q.toLowerCase().includes(O))||re.labels.some(Q=>Q.toLowerCase().includes(O))))return!1}return!(h.size>0&&!re.skills.some(R=>h.has(R))||b.size>0&&!re.labels.some(R=>b.has(R)))}),ue=(de=E.data)==null?void 0:de.data.find(re=>re.name===a),te=(ue==null?void 0:ue.pipelineStatus)==="running";return f.jsxs("div",{className:"flex flex-col gap-4 max-w-full flex-1 min-h-0",children:[f.jsxs("header",{className:"flex items-center justify-between flex-wrap gap-3 shrink-0",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:e("board.title")}),f.jsx("p",{className:"text-[var(--color-text-muted)] text-sm mt-1",children:ue?e("board.subtitle",{name:ue.name,cards:ue.cards.total,workers:ue.workers.active}):e("common.loading")})]}),f.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[f.jsx($O,{current:a,onChange:A}),f.jsxs("button",{className:te?"nb-btn nb-btn-danger":"nb-btn nb-btn-primary",onClick:()=>te?D.mutate():T.mutate(),disabled:T.isPending||D.isPending,type:"button","aria-label":e(te?"board.action.stopAria":"board.action.startAria"),title:e(te?"board.action.stopAria":"board.action.startAria"),children:[T.isPending||D.isPending?f.jsx(jt,{size:14,strokeWidth:3,className:"animate-spin"}):te?f.jsx(fk,{size:14,strokeWidth:3}):f.jsx(Xm,{size:14,strokeWidth:3}),e(te?"board.action.stop":"board.action.start")]}),f.jsxs("button",{className:"nb-btn nb-btn-yellow",type:"button",onClick:async()=>{await v({title:e("board.action.reset.confirm.title"),body:e("board.action.reset.confirm.body"),confirm:e("board.action.reset.confirm.button"),danger:!0})&&B.mutate()},disabled:B.isPending,children:[B.isPending?f.jsx(jt,{size:14,strokeWidth:3,className:"animate-spin"}):f.jsx(ck,{size:14,strokeWidth:2.5}),e("board.action.reset")]}),f.jsxs("button",{className:"nb-btn nb-btn-mint",type:"button",onClick:()=>q(!0),disabled:F.isPending,children:[F.isPending?f.jsx(jt,{size:14,strokeWidth:3,className:"animate-spin"}):f.jsx(Bi,{size:14,strokeWidth:3}),e("board.action.newCard")]})]})]}),f.jsxs("div",{className:"flex items-center gap-3 flex-wrap shrink-0",children:[f.jsxs("div",{className:"relative flex-1 max-w-md",children:[f.jsx(kd,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--color-text-subtle)]"}),f.jsx("input",{className:"nb-input pl-9 w-full",placeholder:e("board.search.placeholder"),value:c,onChange:re=>d(re.target.value),"aria-label":e("board.search.aria")})]}),f.jsx(lw,{label:"skill",options:X,selected:h,onChange:p}),f.jsx(lw,{label:"label",options:J,selected:b,onChange:g}),(c||h.size>0||b.size>0)&&f.jsxs("button",{className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>{d(""),p(new Set),g(new Set)},type:"button","aria-label":e("board.filter.clearAria"),children:[f.jsx(Si,{size:11,strokeWidth:3}),e("board.filter.clear")]}),f.jsxs("span",{className:"text-xs text-[var(--color-text-muted)] flex items-center gap-1 font-[family-name:var(--font-mono)]",children:[f.jsx(fT,{size:12}),pe.length," / ",P.length]})]}),w.isError&&f.jsxs("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:[f.jsx("p",{className:"font-semibold",children:e("board.error.loadCards")}),f.jsx("p",{className:"text-sm mt-1 text-[var(--color-text-muted)]",children:w.error instanceof Error?w.error.message:String(w.error)})]}),!w.isError&&f.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-6 auto-rows-fr gap-3 flex-1 min-h-0",children:HO.map(re=>f.jsx(FO,{label:e(re.labelKey),bg:re.bg,cards:pe.filter(YO(re.state)),onCardClick:O=>o(O.seq),onDropCard:O=>ee.mutate({seq:O,state:re.state})},re.state))}),s!==null&&f.jsx(qO,{project:a,seq:s,onClose:()=>o(null),onChanged:_}),M&&f.jsx(xO,{project:a,isPending:F.isPending,onCancel:()=>q(!1),onCreate:re=>F.mutate(re)})]})}function YO(e){return t=>e==="QA"?t.state==="QA"||t.state==="Review":e==="Done"?t.state==="Done"||t.state==="Canceled":t.state===e}function lw({label:e,options:t,selected:n,onChange:a}){const s=ze(),[o,c]=C.useState(!1),d=C.useRef(null);C.useEffect(()=>{if(!o)return;const g=x=>{var E;(E=d.current)!=null&&E.contains(x.target)||c(!1)},v=x=>{x.key==="Escape"&&c(!1)};return window.addEventListener("click",g),window.addEventListener("keydown",v),()=>{window.removeEventListener("click",g),window.removeEventListener("keydown",v)}},[o]);const h=g=>{const v=new Set(n);v.has(g)?v.delete(g):v.add(g),a(v)},p=t.length===0,b=n.size;return f.jsxs("div",{ref:d,className:"relative",children:[f.jsxs("button",{type:"button",className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>!p&&c(g=>!g),disabled:p,"aria-haspopup":"listbox","aria-expanded":o,"aria-label":s("board.filter.aria",{label:e}),children:[e,b>0&&f.jsx("span",{className:"ml-1 px-1.5 py-0.5 text-[10px] font-bold rounded-full bg-[var(--color-primary)] text-[var(--color-text)] border border-[var(--color-text)]",children:b}),f.jsx(wc,{size:11,strokeWidth:3,className:["transition-transform",o?"rotate-180":""].join(" ")})]}),o&&f.jsxs("div",{role:"listbox",className:"absolute left-0 top-full mt-2 z-20 min-w-[200px] max-h-64 overflow-auto nb-card p-2",style:{padding:8},children:[t.map(g=>{const v=n.has(g);return f.jsxs("label",{className:["flex items-center gap-2 px-2 py-1.5 rounded cursor-pointer text-sm font-[family-name:var(--font-mono)]",v?"bg-[var(--color-accent-mint)]":"hover:bg-[var(--color-bg-cream)]"].join(" "),children:[f.jsx("input",{type:"checkbox",checked:v,onChange:()=>h(g),className:"flex-shrink-0"}),f.jsx("span",{className:"truncate",children:g})]},g)}),b>0&&f.jsx("button",{type:"button",className:"w-full mt-2 pt-2 border-t-2 border-dashed border-[var(--color-text)] text-xs font-bold text-[var(--color-crashed)] text-center",onClick:()=>a(new Set),children:s("board.filter.clearSelection")})]})]})}function VO(){return It("/api/workers/all")}function WO(e){return It(`/api/projects/${encodeURIComponent(e)}/workers`)}function XO(e,t){return It(`/api/projects/${encodeURIComponent(e)}/workers/${t}`)}async function EE(e,t){const n=await fetch(e,{method:"POST",headers:t?{"Content-Type":"application/json"}:void 0,body:t?JSON.stringify(t):void 0});if(!n.ok)throw new Error(`${n.status}: ${await n.text()}`);return n.json().catch(()=>({}))}function ow(e,t){return EE(`/api/projects/${encodeURIComponent(e)}/workers/${t}/kill`)}function ZO(e,t,n){return EE(`/api/projects/${encodeURIComponent(e)}/workers/${t}/launch`,n?{seq:n}:void 0)}function mg({state:e}){const n={running:{bg:"var(--color-running-bg)",color:"var(--color-running)",label:"running"},starting:{bg:"var(--color-secondary)",color:"var(--color-text)",label:"starting",icon:f.jsx(jt,{size:9,strokeWidth:3,className:"animate-spin"})},stuck:{bg:"var(--color-stuck-bg)",color:"var(--color-stuck)",label:"stuck"},crashed:{bg:"var(--color-crashed-bg)",color:"var(--color-crashed)",label:"crashed",icon:f.jsx(YT,{size:9,strokeWidth:2.5})},idle:{bg:"var(--color-idle-bg)",color:"var(--color-idle)",label:"idle"}}[e];return f.jsxs("span",{className:"nb-status inline-flex items-center gap-1",style:{background:n.bg,color:n.color},children:[n.icon,n.label]})}function gg(e){if(e==null||e<=0)return"—";const t=Math.floor(e/1e3),n=Math.floor(t/3600),a=Math.floor(t%3600/60),s=t%60;return n>0?`${n}h ${a}m`:a>0?`${a}m ${s}s`:`${s}s`}function JO(e){if(e==null||e<=0)return"text-[var(--color-text-muted)]";const t=e/6e4;return t<10?"text-[var(--color-running)]":t<60?"text-[var(--color-stuck)]":"text-[var(--color-crashed)]"}function bg(e){const t=Date.now()-new Date(e).getTime();return t<6e4?`${Math.floor(t/1e3)}s 前`:t<36e5?`${Math.floor(t/6e4)}m 前`:`${Math.floor(t/36e5)}h 前`}function eD({alerts:e,selected:t,onSelect:n}){const a=ze();return e.length===0?f.jsxs("div",{className:"nb-card bg-[var(--color-running-bg)] flex items-center gap-3",children:[f.jsx(lc,{size:18,strokeWidth:2.5,className:"text-[var(--color-running)]"}),f.jsx("span",{className:"text-sm font-bold text-[var(--color-running)]",children:a("workers.alerts.allHealthy")})]}):f.jsxs("section",{children:[f.jsxs("h2",{className:"font-[family-name:var(--font-heading)] text-sm font-bold uppercase tracking-wider mb-2 flex items-center gap-2 text-[var(--color-crashed)]",children:[f.jsx(tA,{size:14,strokeWidth:2.5}),"Alerts (",e.length,")"]}),f.jsx("div",{className:"flex flex-col gap-2",children:e.map(s=>{const o=(t==null?void 0:t.project)===s.project&&(t==null?void 0:t.slot)===s.slot;return f.jsxs("button",{type:"button",onClick:()=>n(s.project,s.slot),className:["nb-card p-3 text-left",s.state==="crashed"?"bg-[var(--color-crashed-bg)]":"bg-[var(--color-stuck-bg)]",o?"ring-4 ring-[var(--color-text)]":""].join(" "),children:[f.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[f.jsx(mg,{state:s.state}),f.jsxs("span",{className:"font-[family-name:var(--font-mono)] font-bold",children:[s.project,"/worker-",s.slot]}),s.card&&f.jsxs("span",{className:"truncate",children:["#",s.card.seq," ",s.card.title]}),f.jsxs("span",{className:"ml-auto text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] flex items-center gap-1",children:[f.jsx(Z2,{size:10,strokeWidth:2.5}),gg(s.runtimeMs)]})]}),s.markerUpdatedAt&&f.jsx("div",{className:"text-xs text-[var(--color-text-muted)] mt-1 font-[family-name:var(--font-mono)]",children:s.state==="crashed"?a("workers.alerts.pidDead"):a("workers.alerts.markerStale",{ago:bg(s.markerUpdatedAt)})})]},`${s.project}-${s.slot}`)})})]})}function tD({active:e,selected:t,onSelect:n}){const a=ze();return e.length===0?f.jsx("div",{className:"nb-card bg-[var(--color-bg-cream)]",children:f.jsx("p",{className:"text-sm text-[var(--color-text-muted)] italic",children:a("workers.active.empty")})}):f.jsxs("section",{children:[f.jsxs("h2",{className:"font-[family-name:var(--font-heading)] text-sm font-bold uppercase tracking-wider mb-2 flex items-center gap-2",children:[f.jsx(zd,{size:14,strokeWidth:2.5}),"Active (",e.length,")"]}),f.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:e.map(s=>{const o=(t==null?void 0:t.project)===s.project&&(t==null?void 0:t.slot)===s.slot;return f.jsxs("button",{type:"button",onClick:()=>n(s.project,s.slot),className:["nb-card p-3 text-left",s.state==="starting"?"bg-[var(--color-secondary)]":"bg-[var(--color-running-bg)]",o?"ring-4 ring-[var(--color-text)]":""].join(" "),children:[f.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[f.jsx(mg,{state:s.state}),f.jsxs("span",{className:"font-[family-name:var(--font-mono)] font-bold text-sm flex-1 truncate",children:[s.project,"/worker-",s.slot]}),f.jsx("span",{className:`text-xs font-[family-name:var(--font-mono)] ${JO(s.runtimeMs)}`,children:gg(s.runtimeMs)})]}),s.card&&f.jsxs("div",{className:"text-sm font-semibold mb-1 truncate",children:["#",s.card.seq," · ",s.card.title]}),f.jsxs("div",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] flex items-center gap-2 mb-1",children:[s.stage&&f.jsxs("span",{children:["stage: ",s.stage]}),s.markerUpdatedAt&&f.jsxs("span",{className:"ml-auto",children:["marker ",bg(s.markerUpdatedAt)]})]}),s.lastLogLine&&f.jsxs("div",{className:"text-[11px] font-[family-name:var(--font-mono)] text-[var(--color-text-muted)] bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded px-2 py-1 mt-2 truncate",children:[f.jsx(hk,{size:9,strokeWidth:2.5,className:"inline-block mr-1 align-text-bottom"}),s.lastLogLine.msg]})]},`${s.project}-${s.slot}`)})})]})}function nD({capacity:e,selected:t,onSelect:n}){const a=ze();return e.length===0?null:f.jsxs("section",{children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-sm font-bold uppercase tracking-wider mb-2",children:"Capacity"}),f.jsx("div",{className:"nb-card p-0 overflow-hidden",children:f.jsxs("table",{className:"w-full text-sm",children:[f.jsx("thead",{children:f.jsxs("tr",{className:"bg-[var(--color-bg-cream)] border-b-2 border-[var(--color-text)]",children:[f.jsx("th",{className:"px-3 py-2 text-left font-bold text-xs uppercase tracking-wider",children:a("workers.capacity.col.project")}),f.jsx("th",{className:"px-3 py-2 text-left font-bold text-xs uppercase tracking-wider",children:a("workers.capacity.col.usage")}),f.jsx("th",{className:"px-3 py-2 text-right font-bold text-xs uppercase tracking-wider",children:"running"}),f.jsx("th",{className:"px-3 py-2 text-right font-bold text-xs uppercase tracking-wider",children:a("workers.capacity.col.other")}),f.jsx("th",{className:"px-3 py-2"})]})}),f.jsx("tbody",{children:e.map(s=>{const o=s.running+s.starting+s.stuck+s.crashed,c=(t==null?void 0:t.project)===s.project;return f.jsxs("tr",{onClick:()=>n(s.project),className:["border-b border-dashed border-[var(--color-border-light)] last:border-0 cursor-pointer hover:bg-[var(--color-accent-yellow)]",c?"bg-[var(--color-accent-yellow)]":""].join(" "),children:[f.jsx("td",{className:"px-3 py-2 font-[family-name:var(--font-mono)] font-bold",children:s.project}),f.jsx("td",{className:"px-3 py-2",children:f.jsx(iD,{total:s.total,cap:s})}),f.jsxs("td",{className:"px-3 py-2 text-right font-[family-name:var(--font-mono)]",children:[f.jsx("span",{className:"text-[var(--color-running)] font-bold",children:s.running}),f.jsxs("span",{className:"text-[var(--color-text-muted)]",children:["/",s.total]})]}),f.jsxs("td",{className:"px-3 py-2 text-right text-xs font-[family-name:var(--font-mono)] text-[var(--color-text-muted)]",children:[s.starting>0&&f.jsxs("span",{className:"mr-2",children:["starting ",s.starting]}),s.stuck>0&&f.jsxs("span",{className:"text-[var(--color-stuck)] font-bold mr-2",children:["stuck ",s.stuck]}),s.crashed>0&&f.jsxs("span",{className:"text-[var(--color-crashed)] font-bold mr-2",children:["crashed ",s.crashed]}),o===0&&f.jsx("span",{children:"idle"})]}),f.jsx("td",{className:"px-3 py-2 text-right",children:f.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:a("workers.capacity.detailHint")})})]},s.project)})})]})})]})}function iD({total:e,cap:t}){const n=[];for(let a=0;a<t.crashed;a++)n.push("crashed");for(let a=0;a<t.stuck;a++)n.push("stuck");for(let a=0;a<t.starting;a++)n.push("starting");for(let a=0;a<t.running;a++)n.push("running");for(let a=0;a<t.idle;a++)n.push("idle");return f.jsxs("div",{className:"flex gap-1 items-center",children:[n.map((a,s)=>f.jsx("span",{className:"inline-block w-3 h-3 rounded-full border-2 border-[var(--color-text)]",style:{background:aD(a)},title:a},s)),f.jsxs("span",{className:"text-xs text-[var(--color-text-muted)] ml-2 font-[family-name:var(--font-mono)]",children:[e," slot",e!==1?"s":""]})]})}function aD(e){switch(e){case"running":return"var(--color-running-bg)";case"starting":return"var(--color-secondary)";case"stuck":return"var(--color-stuck-bg)";case"crashed":return"var(--color-crashed-bg)";default:return"var(--color-idle-bg)"}}function rD({project:e,initialSlot:t,onChange:n}){var p;const a=ze(),s=rt({queryKey:["workers",e],queryFn:()=>WO(e),refetchInterval:3e3}),o=((p=s.data)==null?void 0:p.data)??[],[c,d]=C.useState(null);C.useEffect(()=>{if(o.length===0){d(null);return}const b=o[0].slot;d(g=>g!=null&&o.some(v=>v.slot===g)?g:t!=null&&o.some(v=>v.slot===t)?t:b)},[e,t,o.length]);const h=o.find(b=>b.slot===c)??null;return f.jsxs("div",{className:"flex flex-col h-full",children:[f.jsxs("div",{className:"px-4 py-3 border-b-2 border-[var(--color-text)] bg-[var(--color-bg-cream)]",children:[f.jsxs("div",{className:"flex items-center justify-between mb-2",children:[f.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold truncate",children:e}),f.jsx(ps,{to:`/board?project=${encodeURIComponent(e)}`,className:"text-xs underline text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:a("workers.panel.boardLink")})]}),s.isLoading&&o.length===0?f.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:a("workers.panel.loading")}):o.length===0?f.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:a("workers.panel.empty.slots")}):f.jsx("div",{className:"flex flex-wrap gap-2",children:o.map(b=>f.jsx(sD,{worker:b,active:b.slot===c,onClick:()=>d(b.slot)},b.slot))})]}),h?f.jsx(lD,{project:e,worker:h,onChange:n}):f.jsx("div",{className:"flex-1 flex items-center justify-center p-6 text-center",children:f.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:o.length===0?a("workers.panel.empty.noWorker"):a("workers.panel.empty.pickOne")})})]})}function sD({worker:e,active:t,onClick:n}){const a=ze();return f.jsxs("button",{type:"button",onClick:n,className:["nb-card p-2 text-left min-w-[130px] transition-transform",t?"ring-4 ring-[var(--color-text)]":"opacity-80 hover:opacity-100"].join(" "),children:[f.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[f.jsx(mg,{state:e.state}),f.jsxs("span",{className:"font-[family-name:var(--font-mono)] font-bold text-xs",children:["worker-",e.slot]})]}),e.card?f.jsxs("div",{className:"text-[11px] truncate font-[family-name:var(--font-mono)]",children:["#",e.card.seq," ",e.card.title]}):f.jsx("div",{className:"text-[11px] text-[var(--color-text-muted)] italic",children:a("workers.panel.idle.short")})]})}function lD({project:e,worker:t,onChange:n}){var b,g;const a=ze(),{confirm:s,alert:o}=Ci(),c=t.state==="crashed"||t.state==="stuck",d=rt({queryKey:["worker-detail",e,t.slot],queryFn:()=>XO(e,t.slot),refetchInterval:3e3}),h=((b=d.data)==null?void 0:b.recentOutput)??[],p=((g=d.data)==null?void 0:g.recentLogs)??[];return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"flex-1 overflow-auto p-4 flex flex-col gap-4",children:[t.card?f.jsxs("div",{children:[f.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-[var(--color-text-muted)] mb-1",children:a("workers.panel.section.currentCard")}),f.jsxs("div",{className:"text-sm font-semibold break-words",children:["#",t.card.seq," · ",t.card.title]})]}):f.jsx("div",{className:"text-sm text-[var(--color-text-muted)] italic",children:a("workers.panel.idle.full")}),f.jsxs("dl",{className:"grid grid-cols-[100px_1fr] gap-y-2 text-sm",children:[f.jsx("dt",{className:"font-bold",children:"Stage"}),f.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.stage??"—"}),f.jsx("dt",{className:"font-bold",children:"PID"}),f.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.pid??"—"}),f.jsx("dt",{className:"font-bold",children:"Runtime"}),f.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:gg(t.runtimeMs)}),f.jsx("dt",{className:"font-bold",children:"Started"}),f.jsx("dd",{className:"font-[family-name:var(--font-mono)] text-xs",children:t.startedAt?new Date(t.startedAt).toLocaleString():"—"}),f.jsx("dt",{className:"font-bold",children:"Marker"}),f.jsx("dd",{className:"font-[family-name:var(--font-mono)] text-xs",children:t.markerUpdatedAt?bg(t.markerUpdatedAt):"—"})]}),f.jsxs("div",{children:[f.jsxs("div",{className:"text-xs font-bold uppercase tracking-wider text-[var(--color-text-muted)] mb-1 flex items-center gap-1",children:[f.jsx(hk,{size:10,strokeWidth:2.5}),a("workers.panel.section.claudeOutput",{n:h.length})]}),d.isLoading&&h.length===0?f.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:a("workers.panel.output.loading")}):h.length===0?f.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:a("workers.panel.output.empty")}):f.jsx("pre",{className:"text-xs font-[family-name:var(--font-mono)] bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded p-2 max-h-80 overflow-auto whitespace-pre-wrap break-words",children:h.map(v=>`${v.ts?`${v.ts} [${v.kind}] `:`[${v.kind}] `}${v.text}`).join(`
519
- `)})]}),p.length>0&&f.jsxs("div",{children:[f.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-[var(--color-text-muted)] mb-1 opacity-60",children:a("workers.panel.section.heartbeat",{n:p.length})}),f.jsx("pre",{className:"text-xs font-[family-name:var(--font-mono)] bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded p-2 max-h-40 overflow-auto whitespace-pre-wrap break-words opacity-80",children:p.map(v=>`${v.ts??""} [${v.level}] ${v.msg}`).join(`
520
- `)}),f.jsx(ps,{to:`/logs?project=${encodeURIComponent(e)}&worker=${t.slot}`,className:"text-xs underline text-[var(--color-running)] mt-1 inline-block",children:a("workers.panel.heartbeat.fullLog")})]})]}),f.jsxs("div",{className:"px-4 py-3 border-t-2 border-[var(--color-text)] bg-[var(--color-bg-cream)] flex gap-2 justify-end flex-wrap",children:[c&&t.card&&f.jsxs("button",{type:"button",className:"nb-btn nb-btn-mint",style:{padding:"4px 10px",fontSize:11},onClick:async()=>{if(await s({title:a("workers.panel.action.restart.confirm.title",{slot:t.slot}),body:a("workers.panel.action.restart.confirm.body",{seq:t.card.seq}),confirm:a("workers.panel.action.restart.confirm.button")})){try{await ow(e,t.slot)}catch{}try{await ZO(e,t.slot,t.card.seq),n()}catch(x){o({title:a("workers.panel.action.restart.error"),body:x instanceof Error?x.message:String(x)})}}},children:[f.jsx(ZT,{size:11,strokeWidth:2.5})," ",a("workers.panel.action.restart")]}),t.state!=="idle"&&f.jsxs("button",{type:"button",className:"nb-btn nb-btn-danger",style:{padding:"4px 10px",fontSize:11},onClick:async()=>{if(await s({title:a("workers.panel.action.kill.confirm.title",{slot:t.slot}),body:a("workers.panel.action.kill.confirm.body"),confirm:a("workers.panel.action.kill.confirm.button"),danger:!0}))try{await ow(e,t.slot),n()}catch(x){o({title:a("workers.panel.action.kill.error"),body:x instanceof Error?x.message:String(x)})}},children:[f.jsx(lA,{size:11,strokeWidth:2.5})," ",a("workers.panel.action.kill")]})]})]})}function oD(){var c;const e=ze(),t=En(),[n,a]=C.useState(null),s=rt({queryKey:["workers-agg"],queryFn:VO,refetchInterval:5e3});C.useEffect(()=>{if(!s.data)return;const d=s.data.capacity.map(p=>p.project),h=[];for(const p of d){const b=new EventSource(`/stream/projects/${encodeURIComponent(p)}`),g=()=>{t.invalidateQueries({queryKey:["workers-agg"]})};b.addEventListener("worker.updated",g),b.addEventListener("worker.added",g),b.addEventListener("worker.deleted",g),b.addEventListener("card.updated",g),h.push(b)}return()=>{for(const p of h)p.close()}},[(c=s.data)==null?void 0:c.capacity.map(d=>d.project).join(","),t]);const o=C.useMemo(()=>{if(!s.data)return{projects:0,running:0,starting:0,stuck:0,crashed:0,idle:0};const d={projects:s.data.capacity.length,running:0,starting:0,stuck:0,crashed:0,idle:0};for(const h of s.data.capacity)d.running+=h.running,d.starting+=h.starting,d.stuck+=h.stuck,d.crashed+=h.crashed,d.idle+=h.idle;return d},[s.data]);return f.jsxs("div",{className:"flex flex-col gap-4 h-[calc(100vh-140px)]",children:[f.jsxs("header",{className:"flex items-center justify-between flex-wrap gap-3",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:e("workers.title")}),f.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:e("workers.summary",{projects:o.projects,running:o.running,starting:o.starting,stuck:o.stuck,crashed:o.crashed,idle:o.idle})})]}),f.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>s.refetch(),disabled:s.isFetching,type:"button","aria-label":e("workers.refresh.aria"),children:[s.isFetching?f.jsx(jt,{size:12,strokeWidth:3,className:"animate-spin"}):f.jsx(Er,{size:12,strokeWidth:2.5}),e("workers.refresh")]})]}),f.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-4 flex-1 min-h-0",children:[f.jsxs("div",{className:"flex flex-col gap-4 overflow-auto pr-2",children:[s.isLoading&&f.jsx("p",{className:"text-[var(--color-text-muted)] italic",children:e("common.loading")}),s.isError&&f.jsx("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:f.jsx("p",{children:e("workers.error.load",{detail:s.error instanceof Error?s.error.message:String(s.error)})})}),s.data&&f.jsxs(f.Fragment,{children:[f.jsx(eD,{alerts:s.data.alerts,selected:n,onSelect:(d,h)=>a({project:d,slot:h})}),f.jsx(tD,{active:s.data.active,selected:n,onSelect:(d,h)=>a({project:d,slot:h})}),f.jsx(nD,{capacity:s.data.capacity,selected:n,onSelect:d=>a({project:d})})]})]}),f.jsx("aside",{className:"nb-card p-0 overflow-hidden flex flex-col h-full",children:n?f.jsx(rD,{project:n.project,initialSlot:n.slot,onChange:()=>t.invalidateQueries({queryKey:["workers-agg"]})}):f.jsx("div",{className:"flex-1 flex items-center justify-center p-6 text-center",children:f.jsxs("div",{children:[f.jsx(zd,{size:32,className:"mx-auto mb-3 text-[var(--color-text-subtle)]",strokeWidth:2}),f.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:e("workers.empty.hint")})]})})})]})]})}function cD(e){const t=new URLSearchParams;return e.project&&t.set("project",e.project),e.worker&&t.set("worker",e.worker),t.set("limit",String(e.limit)),e.since&&t.set("since",e.since),It(`/api/logs?${t}`)}function uD(e){const t=new URLSearchParams({project:e.project});return e.worker&&t.set("worker",e.worker),`/stream/logs?${t}`}const dD=["error","warn","info","debug"],fD=["error","warn","info"];function hD(){var ee,P;const e=ze(),[t,n]=tk(),a=t.get("project"),s=t.get("worker")??"",[o,c]=C.useState([]),[d,h]=C.useState(!1),[p,b]=C.useState(!0),[g,v]=C.useState(()=>new Set(fD)),[x,E]=C.useState(""),[w,S]=C.useState("live"),[_,A]=C.useState(()=>{const X=new Date(Date.now()-36e5),J=pe=>String(pe).padStart(2,"0");return`${X.getFullYear()}-${J(X.getMonth()+1)}-${J(X.getDate())}T${J(X.getHours())}:${J(X.getMinutes())}`}),T=C.useRef(null),D=!a,B=rt({queryKey:["projects"],queryFn:Nr}),{data:M,refetch:q}=rt({queryKey:["logs",a??"agg",s,w,w==="history"?_:"live"],queryFn:()=>cD({project:a||void 0,worker:s||void 0,limit:w==="history"?2e3:500,since:w==="history"?new Date(_).toISOString():void 0}),refetchInterval:D&&w==="live"?5e3:!1});C.useEffect(()=>{M!=null&&M.data&&c(M.data)},[M]),C.useEffect(()=>{if(!a||w!=="live")return;const X=uD({project:a,worker:s||void 0}),J=new EventSource(X);return J.addEventListener("log.line",pe=>{if(!d)try{const ue=JSON.parse(pe.data);c(te=>{const $=[...te,ue];return $.length>5e3&&$.splice(0,$.length-5e3),$})}catch{}}),()=>J.close()},[a,s,d,w]),C.useEffect(()=>{if(!p)return;const X=T.current;X&&(X.scrollTop=X.scrollHeight)},[o,p]);const F=C.useMemo(()=>{const X=x.toLowerCase();return o.filter(J=>!(!g.has(J.level)||X&&!J.msg.toLowerCase().includes(X)))},[o,g,x]);return f.jsxs("div",{className:"flex flex-col gap-4 max-w-full",children:[f.jsx("header",{className:"flex items-center justify-between gap-3 flex-wrap",children:f.jsxs("div",{children:[f.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:e("logs.title")}),f.jsxs("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:[D?e("logs.subtitle.allProjectsCount",{count:((ee=B.data)==null?void 0:ee.data.length)??0}):a,s&&` · worker-${s}`," · ",D&&w==="live"?e("logs.poll.5s"):"tail -f"," · ",o.length," lines",d&&f.jsx("span",{className:"text-[var(--color-stuck)] ml-2 font-bold",children:e("logs.paused")})]})]})}),f.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[f.jsxs("div",{className:"flex gap-1 p-1 bg-[var(--color-bg)] border-[2px] border-[var(--color-text)] rounded-full shadow-[2px_2px_0_var(--color-text)]",children:[f.jsxs("button",{type:"button",onClick:()=>S("live"),"aria-pressed":w==="live",className:["px-3 py-1 rounded-full text-xs font-bold flex items-center gap-1.5",w==="live"?"bg-[var(--color-primary)] text-[var(--color-text)] shadow-[1px_1px_0_var(--color-text)]":"text-[var(--color-text-muted)]"].join(" "),children:[f.jsx(ok,{size:11,strokeWidth:2.5}),e("logs.mode.live")]}),f.jsxs("button",{type:"button",onClick:()=>S("history"),"aria-pressed":w==="history",className:["px-3 py-1 rounded-full text-xs font-bold flex items-center gap-1.5",w==="history"?"bg-[var(--color-primary)] text-[var(--color-text)] shadow-[1px_1px_0_var(--color-text)]":"text-[var(--color-text-muted)]"].join(" "),children:[f.jsx(yT,{size:11,strokeWidth:2.5}),e("logs.mode.history")]})]}),w==="history"&&f.jsxs(f.Fragment,{children:[f.jsx("input",{type:"datetime-local",className:"nb-input",style:{padding:"4px 8px",fontSize:12},value:_,onChange:X=>A(X.target.value),"aria-label":e("logs.history.startAria")}),f.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 12px",fontSize:12},onClick:()=>q(),type:"button","aria-label":e("logs.history.queryAria"),children:[f.jsx(kd,{size:11,strokeWidth:3}),e("logs.history.query")]})]}),f.jsxs("div",{className:"relative",children:[f.jsx(oc,{size:14,strokeWidth:2.5,className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none text-[var(--color-text)]"}),f.jsxs("select",{className:"nb-input appearance-none pl-9 pr-9 font-[family-name:var(--font-mono)] cursor-pointer",style:{padding:"10px 36px 10px 36px",fontSize:13,minWidth:180},value:a??"",onChange:X=>{const J=X.target.value;n(J?{project:J}:{})},"aria-label":e("logs.filter.project.aria"),children:[f.jsx("option",{value:"",children:e("logs.filter.project.all")}),(P=B.data)==null?void 0:P.data.map(X=>f.jsx("option",{value:X.name,children:X.name},X.name))]}),f.jsx(wc,{size:14,strokeWidth:3,className:"absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none text-[var(--color-text)]"})]}),f.jsxs("div",{className:"relative flex-1 max-w-md",children:[f.jsx(kd,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--color-text-subtle)]"}),f.jsx("input",{className:"nb-input pl-9 w-full",placeholder:e("logs.filter.keyword.placeholder"),value:x,onChange:X=>E(X.target.value),"aria-label":e("logs.filter.keyword.aria")})]}),f.jsx("div",{className:"flex items-center gap-1 p-1 bg-[var(--color-bg)] border-[2px] border-[var(--color-text)] rounded-full shadow-[2px_2px_0_var(--color-text)]",children:dD.map(X=>f.jsx(pD,{level:X,enabled:g.has(X),onToggle:()=>{v(J=>{const pe=new Set(J);return pe.has(X)?pe.delete(X):pe.add(X),pe})}},X))}),f.jsxs("div",{className:"ml-auto flex gap-2",children:[w==="live"&&f.jsxs(f.Fragment,{children:[f.jsx("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>b(X=>!X),type:"button",children:p?"✓ Auto-scroll":"Auto-scroll"}),f.jsx("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>h(X=>!X),type:"button",children:d?f.jsxs(f.Fragment,{children:[f.jsx(Xm,{size:12,strokeWidth:3})," Resume"]}):f.jsxs(f.Fragment,{children:[f.jsx(RT,{size:12,strokeWidth:3})," Pause"]})})]}),f.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>{const X=new Blob([F.map(ue=>ue.raw).join(`
521
- `)],{type:"text/plain"}),J=URL.createObjectURL(X),pe=document.createElement("a");pe.href=J,pe.download=`${a}-log-${Date.now()}.log`,pe.click(),URL.revokeObjectURL(J)},type:"button",children:[f.jsx(sk,{size:12,strokeWidth:2.5})," Export"]})]})]}),f.jsxs("div",{className:"nb-card p-0 overflow-hidden",children:[f.jsxs("div",{className:"px-4 py-2 bg-[var(--color-bg-cream)] border-b-2 border-[var(--color-text)] flex items-center justify-between font-[family-name:var(--font-mono)] text-xs",children:[f.jsx("span",{className:"text-[var(--color-text-muted)]",children:(M==null?void 0:M.file)??"~/.coral/projects/.../logs/*.log"}),w==="live"?f.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"live"}):f.jsx("span",{className:"nb-status",style:{background:"var(--color-accent-purple)",color:"var(--color-text)"},children:"history"})]}),f.jsxs("div",{ref:T,className:"overflow-auto font-[family-name:var(--font-mono)] text-[12px] leading-[22px] max-h-[70vh] bg-[var(--color-bg)] p-2",onScroll:X=>{const J=X.currentTarget;!(J.scrollHeight-J.scrollTop-J.clientHeight<40)&&p&&b(!1)},children:[F.map((X,J)=>f.jsx(mD,{line:X},J)),F.length===0&&f.jsx("div",{className:"text-center py-12 text-[var(--color-text-subtle)]",children:e("logs.empty.match")})]})]})]})}function pD({level:e,enabled:t,onToggle:n}){const a={error:"var(--color-crashed-bg)",warn:"var(--color-stuck-bg)",info:"var(--color-secondary)",debug:"var(--color-accent-purple)"},s={error:"var(--color-crashed)",warn:"var(--color-stuck)",info:"var(--color-text)",debug:"var(--color-text)"};return f.jsx("button",{type:"button",onClick:n,"aria-pressed":t,className:["px-3 py-0.5 rounded-full font-[family-name:var(--font-mono)] text-[10px] font-bold tracking-widest cursor-pointer",t?"border-[1.5px] border-[var(--color-text)]":"text-[var(--color-text-subtle)]"].join(" "),style:t?{background:a[e],color:s[e]}:{},children:e.toUpperCase()})}function mD({line:e}){var a;const t={error:"bg-[var(--color-crashed)] text-[var(--color-text)]",warn:"bg-[var(--color-stuck)] text-[var(--color-text)]",info:"bg-[var(--color-secondary)] text-[var(--color-text)]",debug:"",trace:""},n=!!e.project;return f.jsxs("div",{className:["grid gap-2 px-2 py-0.5 rounded hover:bg-[var(--color-bg-cream)]",n?"grid-cols-[100px_90px_60px_1fr]":"grid-cols-[100px_60px_1fr]"].join(" "),children:[f.jsx("span",{className:"text-[var(--color-text-subtle)] whitespace-nowrap",children:e.ts?((a=e.ts.split("T")[1])==null?void 0:a.replace("Z",""))??e.ts:"--"}),n&&f.jsx("span",{className:"truncate text-[var(--color-text-muted)] font-bold",title:e.project,children:e.project}),f.jsx("span",{className:`text-center font-bold ${t[e.level]??""}`,style:{borderRadius:4,padding:"0 6px"},children:e.level.toUpperCase()}),f.jsx("span",{className:"truncate text-[var(--color-text)]",children:e.msg})]})}function gD(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const bD=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,yD=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,xD={};function cw(e,t){return(xD.jsx?yD:bD).test(e)}const vD=/[ \t\n\f\r]/g;function wD(e){return typeof e=="object"?e.type==="text"?uw(e.value):!1:uw(e)}function uw(e){return e.replace(vD,"")===""}class Nc{constructor(t,n,a){this.normal=n,this.property=t,a&&(this.space=a)}}Nc.prototype.normal={};Nc.prototype.property={};Nc.prototype.space=void 0;function SE(e,t){const n={},a={};for(const s of e)Object.assign(n,s.property),Object.assign(a,s.normal);return new Nc(n,a,t)}function km(e){return e.toLowerCase()}class Yn{constructor(t,n){this.attribute=n,this.property=t}}Yn.prototype.attribute="";Yn.prototype.booleanish=!1;Yn.prototype.boolean=!1;Yn.prototype.commaOrSpaceSeparated=!1;Yn.prototype.commaSeparated=!1;Yn.prototype.defined=!1;Yn.prototype.mustUseProperty=!1;Yn.prototype.number=!1;Yn.prototype.overloadedBoolean=!1;Yn.prototype.property="";Yn.prototype.spaceSeparated=!1;Yn.prototype.space=void 0;let kD=0;const Ge=bs(),nn=bs(),Em=bs(),he=bs(),Nt=bs(),bl=bs(),ai=bs();function bs(){return 2**++kD}const Sm=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ge,booleanish:nn,commaOrSpaceSeparated:ai,commaSeparated:bl,number:he,overloadedBoolean:Em,spaceSeparated:Nt},Symbol.toStringTag,{value:"Module"})),Np=Object.keys(Sm);class yg extends Yn{constructor(t,n,a,s){let o=-1;if(super(t,n),dw(this,"space",s),typeof a=="number")for(;++o<Np.length;){const c=Np[o];dw(this,Np[o],(a&Sm[c])===Sm[c])}}}yg.prototype.defined=!0;function dw(e,t,n){n&&(e[t]=n)}function Kl(e){const t={},n={};for(const[a,s]of Object.entries(e.properties)){const o=new yg(a,e.transform(e.attributes||{},a),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(a)&&(o.mustUseProperty=!0),t[a]=o,n[km(a)]=a,n[km(o.attribute)]=a}return new Nc(t,n,e.space)}const _E=Kl({properties:{ariaActiveDescendant:null,ariaAtomic:nn,ariaAutoComplete:null,ariaBusy:nn,ariaChecked:nn,ariaColCount:he,ariaColIndex:he,ariaColSpan:he,ariaControls:Nt,ariaCurrent:null,ariaDescribedBy:Nt,ariaDetails:null,ariaDisabled:nn,ariaDropEffect:Nt,ariaErrorMessage:null,ariaExpanded:nn,ariaFlowTo:Nt,ariaGrabbed:nn,ariaHasPopup:null,ariaHidden:nn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Nt,ariaLevel:he,ariaLive:null,ariaModal:nn,ariaMultiLine:nn,ariaMultiSelectable:nn,ariaOrientation:null,ariaOwns:Nt,ariaPlaceholder:null,ariaPosInSet:he,ariaPressed:nn,ariaReadOnly:nn,ariaRelevant:null,ariaRequired:nn,ariaRoleDescription:Nt,ariaRowCount:he,ariaRowIndex:he,ariaRowSpan:he,ariaSelected:nn,ariaSetSize:he,ariaSort:null,ariaValueMax:he,ariaValueMin:he,ariaValueNow:he,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function NE(e,t){return t in e?e[t]:t}function CE(e,t){return NE(e,t.toLowerCase())}const ED=Kl({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:bl,acceptCharset:Nt,accessKey:Nt,action:null,allow:null,allowFullScreen:Ge,allowPaymentRequest:Ge,allowUserMedia:Ge,alt:null,as:null,async:Ge,autoCapitalize:null,autoComplete:Nt,autoFocus:Ge,autoPlay:Ge,blocking:Nt,capture:null,charSet:null,checked:Ge,cite:null,className:Nt,cols:he,colSpan:null,content:null,contentEditable:nn,controls:Ge,controlsList:Nt,coords:he|bl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ge,defer:Ge,dir:null,dirName:null,disabled:Ge,download:Em,draggable:nn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ge,formTarget:null,headers:Nt,height:he,hidden:Em,high:he,href:null,hrefLang:null,htmlFor:Nt,httpEquiv:Nt,id:null,imageSizes:null,imageSrcSet:null,inert:Ge,inputMode:null,integrity:null,is:null,isMap:Ge,itemId:null,itemProp:Nt,itemRef:Nt,itemScope:Ge,itemType:Nt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ge,low:he,manifest:null,max:null,maxLength:he,media:null,method:null,min:null,minLength:he,multiple:Ge,muted:Ge,name:null,nonce:null,noModule:Ge,noValidate:Ge,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:Ge,optimum:he,pattern:null,ping:Nt,placeholder:null,playsInline:Ge,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ge,referrerPolicy:null,rel:Nt,required:Ge,reversed:Ge,rows:he,rowSpan:he,sandbox:Nt,scope:null,scoped:Ge,seamless:Ge,selected:Ge,shadowRootClonable:Ge,shadowRootDelegatesFocus:Ge,shadowRootMode:null,shape:null,size:he,sizes:null,slot:null,span:he,spellCheck:nn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:he,step:null,style:null,tabIndex:he,target:null,title:null,translate:null,type:null,typeMustMatch:Ge,useMap:null,value:nn,width:he,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Nt,axis:null,background:null,bgColor:null,border:he,borderColor:null,bottomMargin:he,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ge,declare:Ge,event:null,face:null,frame:null,frameBorder:null,hSpace:he,leftMargin:he,link:null,longDesc:null,lowSrc:null,marginHeight:he,marginWidth:he,noResize:Ge,noHref:Ge,noShade:Ge,noWrap:Ge,object:null,profile:null,prompt:null,rev:null,rightMargin:he,rules:null,scheme:null,scrolling:nn,standby:null,summary:null,text:null,topMargin:he,valueType:null,version:null,vAlign:null,vLink:null,vSpace:he,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ge,disableRemotePlayback:Ge,prefix:null,property:null,results:he,security:null,unselectable:null},space:"html",transform:CE}),SD=Kl({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:ai,accentHeight:he,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:he,amplitude:he,arabicForm:null,ascent:he,attributeName:null,attributeType:null,azimuth:he,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:he,by:null,calcMode:null,capHeight:he,className:Nt,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:he,diffuseConstant:he,direction:null,display:null,dur:null,divisor:he,dominantBaseline:null,download:Ge,dx:null,dy:null,edgeMode:null,editable:null,elevation:he,enableBackground:null,end:null,event:null,exponent:he,externalResourcesRequired:null,fill:null,fillOpacity:he,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:bl,g2:bl,glyphName:bl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:he,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:he,horizOriginX:he,horizOriginY:he,id:null,ideographic:he,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:he,k:he,k1:he,k2:he,k3:he,k4:he,kernelMatrix:ai,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:he,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:he,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:he,overlineThickness:he,paintOrder:null,panose1:null,path:null,pathLength:he,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Nt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:he,pointsAtY:he,pointsAtZ:he,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ai,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ai,rev:ai,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ai,requiredFeatures:ai,requiredFonts:ai,requiredFormats:ai,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:he,specularExponent:he,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:he,strikethroughThickness:he,string:null,stroke:null,strokeDashArray:ai,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:he,strokeOpacity:he,strokeWidth:null,style:null,surfaceScale:he,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ai,tabIndex:he,tableValues:null,target:null,targetX:he,targetY:he,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ai,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:he,underlineThickness:he,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:he,values:null,vAlphabetic:he,vMathematical:he,vectorEffect:null,vHanging:he,vIdeographic:he,version:null,vertAdvY:he,vertOriginX:he,vertOriginY:he,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:he,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:NE}),TE=Kl({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()}}),AE=Kl({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:CE}),jE=Kl({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),_D={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"},ND=/[A-Z]/g,fw=/-[a-z]/g,CD=/^data[-\w.:]+$/i;function TD(e,t){const n=km(t);let a=t,s=Yn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&CD.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(fw,jD);a="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!fw.test(o)){let c=o.replace(ND,AD);c.charAt(0)!=="-"&&(c="-"+c),t="data"+c}}s=yg}return new s(a,t)}function AD(e){return"-"+e.toLowerCase()}function jD(e){return e.charAt(1).toUpperCase()}const OD=SE([_E,ED,TE,AE,jE],"html"),xg=SE([_E,SD,TE,AE,jE],"svg");function DD(e){return e.join(" ").trim()}var sl={},Cp,hw;function MD(){if(hw)return Cp;hw=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,d=/^\s+|\s+$/g,h=`
522
- `,p="/",b="*",g="",v="comment",x="declaration";function E(S,_){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];_=_||{};var A=1,T=1;function D(ue){var te=ue.match(t);te&&(A+=te.length);var $=ue.lastIndexOf(h);T=~$?ue.length-$:T+ue.length}function B(){var ue={line:A,column:T};return function(te){return te.position=new M(ue),ee(),te}}function M(ue){this.start=ue,this.end={line:A,column:T},this.source=_.source}M.prototype.content=S;function q(ue){var te=new Error(_.source+":"+A+":"+T+": "+ue);if(te.reason=ue,te.filename=_.source,te.line=A,te.column=T,te.source=S,!_.silent)throw te}function F(ue){var te=ue.exec(S);if(te){var $=te[0];return D($),S=S.slice($.length),te}}function ee(){F(n)}function P(ue){var te;for(ue=ue||[];te=X();)te!==!1&&ue.push(te);return ue}function X(){var ue=B();if(!(p!=S.charAt(0)||b!=S.charAt(1))){for(var te=2;g!=S.charAt(te)&&(b!=S.charAt(te)||p!=S.charAt(te+1));)++te;if(te+=2,g===S.charAt(te-1))return q("End of comment missing");var $=S.slice(2,te-2);return T+=2,D($),S=S.slice(te),T+=2,ue({type:v,comment:$})}}function J(){var ue=B(),te=F(a);if(te){if(X(),!F(s))return q("property missing ':'");var $=F(o),ce=ue({type:x,property:w(te[0].replace(e,g)),value:$?w($[0].replace(e,g)):g});return F(c),ce}}function pe(){var ue=[];P(ue);for(var te;te=J();)te!==!1&&(ue.push(te),P(ue));return ue}return ee(),pe()}function w(S){return S?S.replace(d,g):g}return Cp=E,Cp}var pw;function RD(){if(pw)return sl;pw=1;var e=sl&&sl.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(sl,"__esModule",{value:!0}),sl.default=n;const t=e(MD());function n(a,s){let o=null;if(!a||typeof a!="string")return o;const c=(0,t.default)(a),d=typeof s=="function";return c.forEach(h=>{if(h.type!=="declaration")return;const{property:p,value:b}=h;d?s(p,b,h):b&&(o=o||{},o[p]=b)}),o}return sl}var Go={},mw;function LD(){if(mw)return Go;mw=1,Object.defineProperty(Go,"__esModule",{value:!0}),Go.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,o=function(p){return!p||n.test(p)||e.test(p)},c=function(p,b){return b.toUpperCase()},d=function(p,b){return"".concat(b,"-")},h=function(p,b){return b===void 0&&(b={}),o(p)?p:(p=p.toLowerCase(),b.reactCompat?p=p.replace(s,d):p=p.replace(a,d),p.replace(t,c))};return Go.camelCase=h,Go}var Qo,gw;function ID(){if(gw)return Qo;gw=1;var e=Qo&&Qo.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(RD()),n=LD();function a(s,o){var c={};return!s||typeof s!="string"||(0,t.default)(s,function(d,h){d&&h&&(c[(0,n.camelCase)(d,o)]=h)}),c}return a.default=a,Qo=a,Qo}var zD=ID();const BD=Lm(zD),OE=DE("end"),vg=DE("start");function DE(e){return t;function t(n){const a=n&&n.position&&n.position[e]||{};if(typeof a.line=="number"&&a.line>0&&typeof a.column=="number"&&a.column>0)return{line:a.line,column:a.column,offset:typeof a.offset=="number"&&a.offset>-1?a.offset:void 0}}}function PD(e){const t=vg(e),n=OE(e);if(t&&n)return{start:t,end:n}}function ec(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?bw(e.position):"start"in e||"end"in e?bw(e):"line"in e||"column"in e?_m(e):""}function _m(e){return yw(e&&e.line)+":"+yw(e&&e.column)}function bw(e){return _m(e&&e.start)+"-"+_m(e&&e.end)}function yw(e){return e&&typeof e=="number"?e:1}class Sn extends Error{constructor(t,n,a){super(),typeof n=="string"&&(a=n,n=void 0);let s="",o={},c=!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"?s=t:!o.cause&&t&&(c=!0,s=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof a=="string"){const h=a.indexOf(":");h===-1?o.ruleId=a:(o.source=a.slice(0,h),o.ruleId=a.slice(h+1))}if(!o.place&&o.ancestors&&o.ancestors){const h=o.ancestors[o.ancestors.length-1];h&&(o.place=h.position)}const d=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=d?d.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=d?d.line:void 0,this.name=ec(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=c&&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}}Sn.prototype.file="";Sn.prototype.name="";Sn.prototype.reason="";Sn.prototype.message="";Sn.prototype.stack="";Sn.prototype.column=void 0;Sn.prototype.line=void 0;Sn.prototype.ancestors=void 0;Sn.prototype.cause=void 0;Sn.prototype.fatal=void 0;Sn.prototype.place=void 0;Sn.prototype.ruleId=void 0;Sn.prototype.source=void 0;const wg={}.hasOwnProperty,UD=new Map,FD=/[A-Z]/g,qD=new Set(["table","tbody","thead","tfoot","tr"]),$D=new Set(["td","th"]),ME="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function HD(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let a;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");a=ZD(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");a=XD(n,t.jsx,t.jsxs)}const s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:a,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"?xg:OD,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=RE(s,e,void 0);return o&&typeof o!="string"?o:s.create(e,s.Fragment,{children:o||void 0},void 0)}function RE(e,t,n){if(t.type==="element")return KD(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return GD(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return YD(e,t,n);if(t.type==="mdxjsEsm")return QD(e,t);if(t.type==="root")return VD(e,t,n);if(t.type==="text")return WD(e,t)}function KD(e,t,n){const a=e.schema;let s=a;t.tagName.toLowerCase()==="svg"&&a.space==="html"&&(s=xg,e.schema=s),e.ancestors.push(t);const o=IE(e,t.tagName,!1),c=JD(e,t);let d=Eg(e,t);return qD.has(t.tagName)&&(d=d.filter(function(h){return typeof h=="string"?!wD(h):!0})),LE(e,c,o,t),kg(c,d),e.ancestors.pop(),e.schema=a,e.create(t,o,c,n)}function GD(e,t){if(t.data&&t.data.estree&&e.evaluater){const a=t.data.estree.body[0];return a.type,e.evaluater.evaluateExpression(a.expression)}fc(e,t.position)}function QD(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);fc(e,t.position)}function YD(e,t,n){const a=e.schema;let s=a;t.name==="svg"&&a.space==="html"&&(s=xg,e.schema=s),e.ancestors.push(t);const o=t.name===null?e.Fragment:IE(e,t.name,!0),c=eM(e,t),d=Eg(e,t);return LE(e,c,o,t),kg(c,d),e.ancestors.pop(),e.schema=a,e.create(t,o,c,n)}function VD(e,t,n){const a={};return kg(a,Eg(e,t)),e.create(t,e.Fragment,a,n)}function WD(e,t){return t.value}function LE(e,t,n,a){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=a)}function kg(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function XD(e,t,n){return a;function a(s,o,c,d){const p=Array.isArray(c.children)?n:t;return d?p(o,c,d):p(o,c)}}function ZD(e,t){return n;function n(a,s,o,c){const d=Array.isArray(o.children),h=vg(a);return t(s,o,c,d,{columnNumber:h?h.column-1:void 0,fileName:e,lineNumber:h?h.line:void 0},void 0)}}function JD(e,t){const n={};let a,s;for(s in t.properties)if(s!=="children"&&wg.call(t.properties,s)){const o=tM(e,s,t.properties[s]);if(o){const[c,d]=o;e.tableCellAlignToStyle&&c==="align"&&typeof d=="string"&&$D.has(t.tagName)?a=d:n[c]=d}}if(a){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=a}return n}function eM(e,t){const n={};for(const a of t.attributes)if(a.type==="mdxJsxExpressionAttribute")if(a.data&&a.data.estree&&e.evaluater){const o=a.data.estree.body[0];o.type;const c=o.expression;c.type;const d=c.properties[0];d.type,Object.assign(n,e.evaluater.evaluateExpression(d.argument))}else fc(e,t.position);else{const s=a.name;let o;if(a.value&&typeof a.value=="object")if(a.value.data&&a.value.data.estree&&e.evaluater){const d=a.value.data.estree.body[0];d.type,o=e.evaluater.evaluateExpression(d.expression)}else fc(e,t.position);else o=a.value===null?!0:a.value;n[s]=o}return n}function Eg(e,t){const n=[];let a=-1;const s=e.passKeys?new Map:UD;for(;++a<t.children.length;){const o=t.children[a];let c;if(e.passKeys){const h=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(h){const p=s.get(h)||0;c=h+"-"+p,s.set(h,p+1)}}const d=RE(e,o,c);d!==void 0&&n.push(d)}return n}function tM(e,t,n){const a=TD(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=a.commaSeparated?gD(n):DD(n)),a.property==="style"){let s=typeof n=="object"?n:nM(e,String(n));return e.stylePropertyNameCase==="css"&&(s=iM(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&a.space?_D[a.property]||a.property:a.attribute,n]}}function nM(e,t){try{return BD(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const a=n,s=new Sn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=ME+"#cannot-parse-style-attribute",s}}function IE(e,t,n){let a;if(!n)a={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let o=-1,c;for(;++o<s.length;){const d=cw(s[o])?{type:"Identifier",name:s[o]}:{type:"Literal",value:s[o]};c=c?{type:"MemberExpression",object:c,property:d,computed:!!(o&&d.type==="Literal"),optional:!1}:d}a=c}else a=cw(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(a.type==="Literal"){const s=a.value;return wg.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(a);fc(e)}function fc(e,t){const n=new Sn("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=ME+"#cannot-handle-mdx-estrees-without-createevaluater",n}function iM(e){const t={};let n;for(n in e)wg.call(e,n)&&(t[aM(n)]=e[n]);return t}function aM(e){let t=e.replace(FD,rM);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function rM(e){return"-"+e.toLowerCase()}const Tp={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"]},sM={};function Sg(e,t){const n=sM,a=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return zE(e,a,s)}function zE(e,t,n){if(lM(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 xw(e.children,t,n)}return Array.isArray(e)?xw(e,t,n):""}function xw(e,t,n){const a=[];let s=-1;for(;++s<e.length;)a[s]=zE(e[s],t,n);return a.join("")}function lM(e){return!!(e&&typeof e=="object")}const vw=document.createElement("i");function _g(e){const t="&"+e+";";vw.innerHTML=t;const n=vw.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function li(e,t,n,a){const s=e.length;let o=0,c;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,n=n>0?n:0,a.length<1e4)c=Array.from(a),c.unshift(t,n),e.splice(...c);else for(n&&e.splice(t,n);o<a.length;)c=a.slice(o,o+1e4),c.unshift(t,0),e.splice(...c),o+=1e4,t+=1e4}function wi(e,t){return e.length>0?(li(e,e.length,0,t),e):t}const ww={}.hasOwnProperty;function BE(e){const t={};let n=-1;for(;++n<e.length;)oM(t,e[n]);return t}function oM(e,t){let n;for(n in t){const s=(ww.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let c;if(o)for(c in o){ww.call(s,c)||(s[c]=[]);const d=o[c];cM(s[c],Array.isArray(d)?d:d?[d]:[])}}}function cM(e,t){let n=-1;const a=[];for(;++n<t.length;)(t[n].add==="after"?e:a).push(t[n]);li(e,0,0,a)}function PE(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)}function Ii(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Rn=Tr(/[A-Za-z]/),wn=Tr(/[\dA-Za-z]/),uM=Tr(/[#-'*+\--9=?A-Z^-~]/);function Cd(e){return e!==null&&(e<32||e===127)}const Nm=Tr(/\d/),dM=Tr(/[\dA-Fa-f]/),fM=Tr(/[!-/:-@[-`{-~]/);function De(e){return e!==null&&e<-2}function kt(e){return e!==null&&(e<0||e===32)}function Xe(e){return e===-2||e===-1||e===32}const Jd=Tr(new RegExp("\\p{P}|\\p{S}","u")),hs=Tr(/\s/);function Tr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Gl(e){const t=[];let n=-1,a=0,s=0;for(;++n<e.length;){const o=e.charCodeAt(n);let c="";if(o===37&&wn(e.charCodeAt(n+1))&&wn(e.charCodeAt(n+2)))s=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(c=String.fromCharCode(o));else if(o>55295&&o<57344){const d=e.charCodeAt(n+1);o<56320&&d>56319&&d<57344?(c=String.fromCharCode(o,d),s=1):c="�"}else c=String.fromCharCode(o);c&&(t.push(e.slice(a,n),encodeURIComponent(c)),a=n+s+1,c=""),s&&(n+=s,s=0)}return t.join("")+e.slice(a)}function at(e,t,n,a){const s=a?a-1:Number.POSITIVE_INFINITY;let o=0;return c;function c(h){return Xe(h)?(e.enter(n),d(h)):t(h)}function d(h){return Xe(h)&&o++<s?(e.consume(h),d):(e.exit(n),t(h))}}const hM={tokenize:pM};function pM(e){const t=e.attempt(this.parser.constructs.contentInitial,a,s);let n;return t;function a(d){if(d===null){e.consume(d);return}return e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),at(e,t,"linePrefix")}function s(d){return e.enter("paragraph"),o(d)}function o(d){const h=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=h),n=h,c(d)}function c(d){if(d===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(d);return}return De(d)?(e.consume(d),e.exit("chunkText"),o):(e.consume(d),c)}}const mM={tokenize:gM},kw={tokenize:bM};function gM(e){const t=this,n=[];let a=0,s,o,c;return d;function d(T){if(a<n.length){const D=n[a];return t.containerState=D[1],e.attempt(D[0].continuation,h,p)(T)}return p(T)}function h(T){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&A();const D=t.events.length;let B=D,M;for(;B--;)if(t.events[B][0]==="exit"&&t.events[B][1].type==="chunkFlow"){M=t.events[B][1].end;break}_(a);let q=D;for(;q<t.events.length;)t.events[q][1].end={...M},q++;return li(t.events,B+1,0,t.events.slice(D)),t.events.length=q,p(T)}return d(T)}function p(T){if(a===n.length){if(!s)return v(T);if(s.currentConstruct&&s.currentConstruct.concrete)return E(T);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(kw,b,g)(T)}function b(T){return s&&A(),_(a),v(T)}function g(T){return t.parser.lazy[t.now().line]=a!==n.length,c=t.now().offset,E(T)}function v(T){return t.containerState={},e.attempt(kw,x,E)(T)}function x(T){return a++,n.push([t.currentConstruct,t.containerState]),v(T)}function E(T){if(T===null){s&&A(),_(0),e.consume(T);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:o}),w(T)}function w(T){if(T===null){S(e.exit("chunkFlow"),!0),_(0),e.consume(T);return}return De(T)?(e.consume(T),S(e.exit("chunkFlow")),a=0,t.interrupt=void 0,d):(e.consume(T),w)}function S(T,D){const B=t.sliceStream(T);if(D&&B.push(null),T.previous=o,o&&(o.next=T),o=T,s.defineSkip(T.start),s.write(B),t.parser.lazy[T.start.line]){let M=s.events.length;for(;M--;)if(s.events[M][1].start.offset<c&&(!s.events[M][1].end||s.events[M][1].end.offset>c))return;const q=t.events.length;let F=q,ee,P;for(;F--;)if(t.events[F][0]==="exit"&&t.events[F][1].type==="chunkFlow"){if(ee){P=t.events[F][1].end;break}ee=!0}for(_(a),M=q;M<t.events.length;)t.events[M][1].end={...P},M++;li(t.events,F+1,0,t.events.slice(q)),t.events.length=M}}function _(T){let D=n.length;for(;D-- >T;){const B=n[D];t.containerState=B[1],B[0].exit.call(t,e)}n.length=T}function A(){s.write([null]),o=void 0,s=void 0,t.containerState._closeFlow=void 0}}function bM(e,t,n){return at(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Dl(e){if(e===null||kt(e)||hs(e))return 1;if(Jd(e))return 2}function ef(e,t,n){const a=[];let s=-1;for(;++s<e.length;){const o=e[s].resolveAll;o&&!a.includes(o)&&(t=o(t,n),a.push(o))}return t}const Cm={name:"attention",resolveAll:yM,tokenize:xM};function yM(e,t){let n=-1,a,s,o,c,d,h,p,b;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(a=n;a--;)if(e[a][0]==="exit"&&e[a][1].type==="attentionSequence"&&e[a][1]._open&&t.sliceSerialize(e[a][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[a][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[a][1].end.offset-e[a][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;h=e[a][1].end.offset-e[a][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const g={...e[a][1].end},v={...e[n][1].start};Ew(g,-h),Ew(v,h),c={type:h>1?"strongSequence":"emphasisSequence",start:g,end:{...e[a][1].end}},d={type:h>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:v},o={type:h>1?"strongText":"emphasisText",start:{...e[a][1].end},end:{...e[n][1].start}},s={type:h>1?"strong":"emphasis",start:{...c.start},end:{...d.end}},e[a][1].end={...c.start},e[n][1].start={...d.end},p=[],e[a][1].end.offset-e[a][1].start.offset&&(p=wi(p,[["enter",e[a][1],t],["exit",e[a][1],t]])),p=wi(p,[["enter",s,t],["enter",c,t],["exit",c,t],["enter",o,t]]),p=wi(p,ef(t.parser.constructs.insideSpan.null,e.slice(a+1,n),t)),p=wi(p,[["exit",o,t],["enter",d,t],["exit",d,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(b=2,p=wi(p,[["enter",e[n][1],t],["exit",e[n][1],t]])):b=0,li(e,a-1,n-a+3,p),n=a+p.length-b-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function xM(e,t){const n=this.parser.constructs.attentionMarkers.null,a=this.previous,s=Dl(a);let o;return c;function c(h){return o=h,e.enter("attentionSequence"),d(h)}function d(h){if(h===o)return e.consume(h),d;const p=e.exit("attentionSequence"),b=Dl(h),g=!b||b===2&&s||n.includes(h),v=!s||s===2&&b||n.includes(a);return p._open=!!(o===42?g:g&&(s||!v)),p._close=!!(o===42?v:v&&(b||!g)),t(h)}}function Ew(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const vM={name:"autolink",tokenize:wM};function wM(e,t,n){let a=0;return s;function s(x){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(x){return Rn(x)?(e.consume(x),c):x===64?n(x):p(x)}function c(x){return x===43||x===45||x===46||wn(x)?(a=1,d(x)):p(x)}function d(x){return x===58?(e.consume(x),a=0,h):(x===43||x===45||x===46||wn(x))&&a++<32?(e.consume(x),d):(a=0,p(x))}function h(x){return x===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),t):x===null||x===32||x===60||Cd(x)?n(x):(e.consume(x),h)}function p(x){return x===64?(e.consume(x),b):uM(x)?(e.consume(x),p):n(x)}function b(x){return wn(x)?g(x):n(x)}function g(x){return x===46?(e.consume(x),a=0,b):x===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),t):v(x)}function v(x){if((x===45||wn(x))&&a++<63){const E=x===45?v:g;return e.consume(x),E}return n(x)}}const Cc={partial:!0,tokenize:kM};function kM(e,t,n){return a;function a(o){return Xe(o)?at(e,s,"linePrefix")(o):s(o)}function s(o){return o===null||De(o)?t(o):n(o)}}const UE={continuation:{tokenize:SM},exit:_M,name:"blockQuote",tokenize:EM};function EM(e,t,n){const a=this;return s;function s(c){if(c===62){const d=a.containerState;return d.open||(e.enter("blockQuote",{_container:!0}),d.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),o}return n(c)}function o(c){return Xe(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(c))}}function SM(e,t,n){const a=this;return s;function s(c){return Xe(c)?at(e,o,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):o(c)}function o(c){return e.attempt(UE,t,n)(c)}}function _M(e){e.exit("blockQuote")}const FE={name:"characterEscape",tokenize:NM};function NM(e,t,n){return a;function a(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),s}function s(o){return fM(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const qE={name:"characterReference",tokenize:CM};function CM(e,t,n){const a=this;let s=0,o,c;return d;function d(g){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),h}function h(g){return g===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(g),e.exit("characterReferenceMarkerNumeric"),p):(e.enter("characterReferenceValue"),o=31,c=wn,b(g))}function p(g){return g===88||g===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(g),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,c=dM,b):(e.enter("characterReferenceValue"),o=7,c=Nm,b(g))}function b(g){if(g===59&&s){const v=e.exit("characterReferenceValue");return c===wn&&!_g(a.sliceSerialize(v))?n(g):(e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return c(g)&&s++<o?(e.consume(g),b):n(g)}}const Sw={partial:!0,tokenize:AM},_w={concrete:!0,name:"codeFenced",tokenize:TM};function TM(e,t,n){const a=this,s={partial:!0,tokenize:B};let o=0,c=0,d;return h;function h(M){return p(M)}function p(M){const q=a.events[a.events.length-1];return o=q&&q[1].type==="linePrefix"?q[2].sliceSerialize(q[1],!0).length:0,d=M,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),b(M)}function b(M){return M===d?(c++,e.consume(M),b):c<3?n(M):(e.exit("codeFencedFenceSequence"),Xe(M)?at(e,g,"whitespace")(M):g(M))}function g(M){return M===null||De(M)?(e.exit("codeFencedFence"),a.interrupt?t(M):e.check(Sw,w,D)(M)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),v(M))}function v(M){return M===null||De(M)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),g(M)):Xe(M)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),at(e,x,"whitespace")(M)):M===96&&M===d?n(M):(e.consume(M),v)}function x(M){return M===null||De(M)?g(M):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),E(M))}function E(M){return M===null||De(M)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),g(M)):M===96&&M===d?n(M):(e.consume(M),E)}function w(M){return e.attempt(s,D,S)(M)}function S(M){return e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),_}function _(M){return o>0&&Xe(M)?at(e,A,"linePrefix",o+1)(M):A(M)}function A(M){return M===null||De(M)?e.check(Sw,w,D)(M):(e.enter("codeFlowValue"),T(M))}function T(M){return M===null||De(M)?(e.exit("codeFlowValue"),A(M)):(e.consume(M),T)}function D(M){return e.exit("codeFenced"),t(M)}function B(M,q,F){let ee=0;return P;function P(te){return M.enter("lineEnding"),M.consume(te),M.exit("lineEnding"),X}function X(te){return M.enter("codeFencedFence"),Xe(te)?at(M,J,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(te):J(te)}function J(te){return te===d?(M.enter("codeFencedFenceSequence"),pe(te)):F(te)}function pe(te){return te===d?(ee++,M.consume(te),pe):ee>=c?(M.exit("codeFencedFenceSequence"),Xe(te)?at(M,ue,"whitespace")(te):ue(te)):F(te)}function ue(te){return te===null||De(te)?(M.exit("codeFencedFence"),q(te)):F(te)}}}function AM(e,t,n){const a=this;return s;function s(c){return c===null?n(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o)}function o(c){return a.parser.lazy[a.now().line]?n(c):t(c)}}const Ap={name:"codeIndented",tokenize:OM},jM={partial:!0,tokenize:DM};function OM(e,t,n){const a=this;return s;function s(p){return e.enter("codeIndented"),at(e,o,"linePrefix",5)(p)}function o(p){const b=a.events[a.events.length-1];return b&&b[1].type==="linePrefix"&&b[2].sliceSerialize(b[1],!0).length>=4?c(p):n(p)}function c(p){return p===null?h(p):De(p)?e.attempt(jM,c,h)(p):(e.enter("codeFlowValue"),d(p))}function d(p){return p===null||De(p)?(e.exit("codeFlowValue"),c(p)):(e.consume(p),d)}function h(p){return e.exit("codeIndented"),t(p)}}function DM(e,t,n){const a=this;return s;function s(c){return a.parser.lazy[a.now().line]?n(c):De(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s):at(e,o,"linePrefix",5)(c)}function o(c){const d=a.events[a.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(c):De(c)?s(c):n(c)}}const MM={name:"codeText",previous:LM,resolve:RM,tokenize:IM};function RM(e){let t=e.length-4,n=3,a,s;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(a=n;++a<t;)if(e[a][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(a=n-1,t++;++a<=t;)s===void 0?a!==t&&e[a][1].type!=="lineEnding"&&(s=a):(a===t||e[a][1].type==="lineEnding")&&(e[s][1].type="codeTextData",a!==s+2&&(e[s][1].end=e[a-1][1].end,e.splice(s+2,a-s-2),t-=a-s-2,a=s+2),s=void 0);return e}function LM(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function IM(e,t,n){let a=0,s,o;return c;function c(g){return e.enter("codeText"),e.enter("codeTextSequence"),d(g)}function d(g){return g===96?(e.consume(g),a++,d):(e.exit("codeTextSequence"),h(g))}function h(g){return g===null?n(g):g===32?(e.enter("space"),e.consume(g),e.exit("space"),h):g===96?(o=e.enter("codeTextSequence"),s=0,b(g)):De(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),h):(e.enter("codeTextData"),p(g))}function p(g){return g===null||g===32||g===96||De(g)?(e.exit("codeTextData"),h(g)):(e.consume(g),p)}function b(g){return g===96?(e.consume(g),s++,b):s===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(g)):(o.type="codeTextData",p(g))}}class zM{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 a=n??Number.POSITIVE_INFINITY;return a<this.left.length?this.left.slice(t,a):t>this.left.length?this.right.slice(this.right.length-a+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-a+this.left.length).reverse())}splice(t,n,a){const s=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return a&&Yo(this.left,a),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),Yo(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Yo(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);Yo(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Yo(this.left,n.reverse())}}}function Yo(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 $E(e){const t={};let n=-1,a,s,o,c,d,h,p;const b=new zM(e);for(;++n<b.length;){for(;n in t;)n=t[n];if(a=b.get(n),n&&a[1].type==="chunkFlow"&&b.get(n-1)[1].type==="listItemPrefix"&&(h=a[1]._tokenizer.events,o=0,o<h.length&&h[o][1].type==="lineEndingBlank"&&(o+=2),o<h.length&&h[o][1].type==="content"))for(;++o<h.length&&h[o][1].type!=="content";)h[o][1].type==="chunkText"&&(h[o][1]._isInFirstContentOfListItem=!0,o++);if(a[0]==="enter")a[1].contentType&&(Object.assign(t,BM(b,n)),n=t[n],p=!0);else if(a[1]._container){for(o=n,s=void 0;o--;)if(c=b.get(o),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(s&&(b.get(s)[1].type="lineEndingBlank"),c[1].type="lineEnding",s=o);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;s&&(a[1].end={...b.get(s)[1].start},d=b.slice(s,n),d.unshift(a),b.splice(s,n-s+1,d))}}return li(e,0,Number.POSITIVE_INFINITY,b.slice(0)),!p}function BM(e,t){const n=e.get(t)[1],a=e.get(t)[2];let s=t-1;const o=[];let c=n._tokenizer;c||(c=a.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const d=c.events,h=[],p={};let b,g,v=-1,x=n,E=0,w=0;const S=[w];for(;x;){for(;e.get(++s)[1]!==x;);o.push(s),x._tokenizer||(b=a.sliceStream(x),x.next||b.push(null),g&&c.defineSkip(x.start),x._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(b),x._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),g=x,x=x.next}for(x=n;++v<d.length;)d[v][0]==="exit"&&d[v-1][0]==="enter"&&d[v][1].type===d[v-1][1].type&&d[v][1].start.line!==d[v][1].end.line&&(w=v+1,S.push(w),x._tokenizer=void 0,x.previous=void 0,x=x.next);for(c.events=[],x?(x._tokenizer=void 0,x.previous=void 0):S.pop(),v=S.length;v--;){const _=d.slice(S[v],S[v+1]),A=o.pop();h.push([A,A+_.length-1]),e.splice(A,2,_)}for(h.reverse(),v=-1;++v<h.length;)p[E+h[v][0]]=E+h[v][1],E+=h[v][1]-h[v][0]-1;return p}const PM={resolve:FM,tokenize:qM},UM={partial:!0,tokenize:$M};function FM(e){return $E(e),e}function qM(e,t){let n;return a;function a(d){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(d)}function s(d){return d===null?o(d):De(d)?e.check(UM,c,o)(d):(e.consume(d),s)}function o(d){return e.exit("chunkContent"),e.exit("content"),t(d)}function c(d){return e.consume(d),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function $M(e,t,n){const a=this;return s;function s(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),at(e,o,"linePrefix")}function o(c){if(c===null||De(c))return n(c);const d=a.events[a.events.length-1];return!a.parser.constructs.disable.null.includes("codeIndented")&&d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(c):e.interrupt(a.parser.constructs.flow,n,t)(c)}}function HE(e,t,n,a,s,o,c,d,h){const p=h||Number.POSITIVE_INFINITY;let b=0;return g;function g(_){return _===60?(e.enter(a),e.enter(s),e.enter(o),e.consume(_),e.exit(o),v):_===null||_===32||_===41||Cd(_)?n(_):(e.enter(a),e.enter(c),e.enter(d),e.enter("chunkString",{contentType:"string"}),w(_))}function v(_){return _===62?(e.enter(o),e.consume(_),e.exit(o),e.exit(s),e.exit(a),t):(e.enter(d),e.enter("chunkString",{contentType:"string"}),x(_))}function x(_){return _===62?(e.exit("chunkString"),e.exit(d),v(_)):_===null||_===60||De(_)?n(_):(e.consume(_),_===92?E:x)}function E(_){return _===60||_===62||_===92?(e.consume(_),x):x(_)}function w(_){return!b&&(_===null||_===41||kt(_))?(e.exit("chunkString"),e.exit(d),e.exit(c),e.exit(a),t(_)):b<p&&_===40?(e.consume(_),b++,w):_===41?(e.consume(_),b--,w):_===null||_===32||_===40||Cd(_)?n(_):(e.consume(_),_===92?S:w)}function S(_){return _===40||_===41||_===92?(e.consume(_),w):w(_)}}function KE(e,t,n,a,s,o){const c=this;let d=0,h;return p;function p(x){return e.enter(a),e.enter(s),e.consume(x),e.exit(s),e.enter(o),b}function b(x){return d>999||x===null||x===91||x===93&&!h||x===94&&!d&&"_hiddenFootnoteSupport"in c.parser.constructs?n(x):x===93?(e.exit(o),e.enter(s),e.consume(x),e.exit(s),e.exit(a),t):De(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),b):(e.enter("chunkString",{contentType:"string"}),g(x))}function g(x){return x===null||x===91||x===93||De(x)||d++>999?(e.exit("chunkString"),b(x)):(e.consume(x),h||(h=!Xe(x)),x===92?v:g)}function v(x){return x===91||x===92||x===93?(e.consume(x),d++,g):g(x)}}function GE(e,t,n,a,s,o){let c;return d;function d(v){return v===34||v===39||v===40?(e.enter(a),e.enter(s),e.consume(v),e.exit(s),c=v===40?41:v,h):n(v)}function h(v){return v===c?(e.enter(s),e.consume(v),e.exit(s),e.exit(a),t):(e.enter(o),p(v))}function p(v){return v===c?(e.exit(o),h(c)):v===null?n(v):De(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),at(e,p,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),b(v))}function b(v){return v===c||v===null||De(v)?(e.exit("chunkString"),p(v)):(e.consume(v),v===92?g:b)}function g(v){return v===c||v===92?(e.consume(v),b):b(v)}}function tc(e,t){let n;return a;function a(s){return De(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,a):Xe(s)?at(e,a,n?"linePrefix":"lineSuffix")(s):t(s)}}const HM={name:"definition",tokenize:GM},KM={partial:!0,tokenize:QM};function GM(e,t,n){const a=this;let s;return o;function o(x){return e.enter("definition"),c(x)}function c(x){return KE.call(a,e,d,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(x)}function d(x){return s=Ii(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),h):n(x)}function h(x){return kt(x)?tc(e,p)(x):p(x)}function p(x){return HE(e,b,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(x)}function b(x){return e.attempt(KM,g,g)(x)}function g(x){return Xe(x)?at(e,v,"whitespace")(x):v(x)}function v(x){return x===null||De(x)?(e.exit("definition"),a.parser.defined.push(s),t(x)):n(x)}}function QM(e,t,n){return a;function a(d){return kt(d)?tc(e,s)(d):n(d)}function s(d){return GE(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function o(d){return Xe(d)?at(e,c,"whitespace")(d):c(d)}function c(d){return d===null||De(d)?t(d):n(d)}}const YM={name:"hardBreakEscape",tokenize:VM};function VM(e,t,n){return a;function a(o){return e.enter("hardBreakEscape"),e.consume(o),s}function s(o){return De(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const WM={name:"headingAtx",resolve:XM,tokenize:ZM};function XM(e,t){let n=e.length-2,a=3,s,o;return e[a][1].type==="whitespace"&&(a+=2),n-2>a&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(a===n-1||n-4>a&&e[n-2][1].type==="whitespace")&&(n-=a+1===n?2:4),n>a&&(s={type:"atxHeadingText",start:e[a][1].start,end:e[n][1].end},o={type:"chunkText",start:e[a][1].start,end:e[n][1].end,contentType:"text"},li(e,a,n-a+1,[["enter",s,t],["enter",o,t],["exit",o,t],["exit",s,t]])),e}function ZM(e,t,n){let a=0;return s;function s(b){return e.enter("atxHeading"),o(b)}function o(b){return e.enter("atxHeadingSequence"),c(b)}function c(b){return b===35&&a++<6?(e.consume(b),c):b===null||kt(b)?(e.exit("atxHeadingSequence"),d(b)):n(b)}function d(b){return b===35?(e.enter("atxHeadingSequence"),h(b)):b===null||De(b)?(e.exit("atxHeading"),t(b)):Xe(b)?at(e,d,"whitespace")(b):(e.enter("atxHeadingText"),p(b))}function h(b){return b===35?(e.consume(b),h):(e.exit("atxHeadingSequence"),d(b))}function p(b){return b===null||b===35||kt(b)?(e.exit("atxHeadingText"),d(b)):(e.consume(b),p)}}const JM=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Nw=["pre","script","style","textarea"],eR={concrete:!0,name:"htmlFlow",resolveTo:iR,tokenize:aR},tR={partial:!0,tokenize:sR},nR={partial:!0,tokenize:rR};function iR(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 aR(e,t,n){const a=this;let s,o,c,d,h;return p;function p(j){return b(j)}function b(j){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(j),g}function g(j){return j===33?(e.consume(j),v):j===47?(e.consume(j),o=!0,w):j===63?(e.consume(j),s=3,a.interrupt?t:O):Rn(j)?(e.consume(j),c=String.fromCharCode(j),S):n(j)}function v(j){return j===45?(e.consume(j),s=2,x):j===91?(e.consume(j),s=5,d=0,E):Rn(j)?(e.consume(j),s=4,a.interrupt?t:O):n(j)}function x(j){return j===45?(e.consume(j),a.interrupt?t:O):n(j)}function E(j){const ge="CDATA[";return j===ge.charCodeAt(d++)?(e.consume(j),d===ge.length?a.interrupt?t:J:E):n(j)}function w(j){return Rn(j)?(e.consume(j),c=String.fromCharCode(j),S):n(j)}function S(j){if(j===null||j===47||j===62||kt(j)){const ge=j===47,_e=c.toLowerCase();return!ge&&!o&&Nw.includes(_e)?(s=1,a.interrupt?t(j):J(j)):JM.includes(c.toLowerCase())?(s=6,ge?(e.consume(j),_):a.interrupt?t(j):J(j)):(s=7,a.interrupt&&!a.parser.lazy[a.now().line]?n(j):o?A(j):T(j))}return j===45||wn(j)?(e.consume(j),c+=String.fromCharCode(j),S):n(j)}function _(j){return j===62?(e.consume(j),a.interrupt?t:J):n(j)}function A(j){return Xe(j)?(e.consume(j),A):P(j)}function T(j){return j===47?(e.consume(j),P):j===58||j===95||Rn(j)?(e.consume(j),D):Xe(j)?(e.consume(j),T):P(j)}function D(j){return j===45||j===46||j===58||j===95||wn(j)?(e.consume(j),D):B(j)}function B(j){return j===61?(e.consume(j),M):Xe(j)?(e.consume(j),B):T(j)}function M(j){return j===null||j===60||j===61||j===62||j===96?n(j):j===34||j===39?(e.consume(j),h=j,q):Xe(j)?(e.consume(j),M):F(j)}function q(j){return j===h?(e.consume(j),h=null,ee):j===null||De(j)?n(j):(e.consume(j),q)}function F(j){return j===null||j===34||j===39||j===47||j===60||j===61||j===62||j===96||kt(j)?B(j):(e.consume(j),F)}function ee(j){return j===47||j===62||Xe(j)?T(j):n(j)}function P(j){return j===62?(e.consume(j),X):n(j)}function X(j){return j===null||De(j)?J(j):Xe(j)?(e.consume(j),X):n(j)}function J(j){return j===45&&s===2?(e.consume(j),$):j===60&&s===1?(e.consume(j),ce):j===62&&s===4?(e.consume(j),R):j===63&&s===3?(e.consume(j),O):j===93&&s===5?(e.consume(j),re):De(j)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(tR,Q,pe)(j)):j===null||De(j)?(e.exit("htmlFlowData"),pe(j)):(e.consume(j),J)}function pe(j){return e.check(nR,ue,Q)(j)}function ue(j){return e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),te}function te(j){return j===null||De(j)?pe(j):(e.enter("htmlFlowData"),J(j))}function $(j){return j===45?(e.consume(j),O):J(j)}function ce(j){return j===47?(e.consume(j),c="",de):J(j)}function de(j){if(j===62){const ge=c.toLowerCase();return Nw.includes(ge)?(e.consume(j),R):J(j)}return Rn(j)&&c.length<8?(e.consume(j),c+=String.fromCharCode(j),de):J(j)}function re(j){return j===93?(e.consume(j),O):J(j)}function O(j){return j===62?(e.consume(j),R):j===45&&s===2?(e.consume(j),O):J(j)}function R(j){return j===null||De(j)?(e.exit("htmlFlowData"),Q(j)):(e.consume(j),R)}function Q(j){return e.exit("htmlFlow"),t(j)}}function rR(e,t,n){const a=this;return s;function s(c){return De(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o):n(c)}function o(c){return a.parser.lazy[a.now().line]?n(c):t(c)}}function sR(e,t,n){return a;function a(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Cc,t,n)}}const lR={name:"htmlText",tokenize:oR};function oR(e,t,n){const a=this;let s,o,c;return d;function d(O){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(O),h}function h(O){return O===33?(e.consume(O),p):O===47?(e.consume(O),B):O===63?(e.consume(O),T):Rn(O)?(e.consume(O),F):n(O)}function p(O){return O===45?(e.consume(O),b):O===91?(e.consume(O),o=0,E):Rn(O)?(e.consume(O),A):n(O)}function b(O){return O===45?(e.consume(O),x):n(O)}function g(O){return O===null?n(O):O===45?(e.consume(O),v):De(O)?(c=g,ce(O)):(e.consume(O),g)}function v(O){return O===45?(e.consume(O),x):g(O)}function x(O){return O===62?$(O):O===45?v(O):g(O)}function E(O){const R="CDATA[";return O===R.charCodeAt(o++)?(e.consume(O),o===R.length?w:E):n(O)}function w(O){return O===null?n(O):O===93?(e.consume(O),S):De(O)?(c=w,ce(O)):(e.consume(O),w)}function S(O){return O===93?(e.consume(O),_):w(O)}function _(O){return O===62?$(O):O===93?(e.consume(O),_):w(O)}function A(O){return O===null||O===62?$(O):De(O)?(c=A,ce(O)):(e.consume(O),A)}function T(O){return O===null?n(O):O===63?(e.consume(O),D):De(O)?(c=T,ce(O)):(e.consume(O),T)}function D(O){return O===62?$(O):T(O)}function B(O){return Rn(O)?(e.consume(O),M):n(O)}function M(O){return O===45||wn(O)?(e.consume(O),M):q(O)}function q(O){return De(O)?(c=q,ce(O)):Xe(O)?(e.consume(O),q):$(O)}function F(O){return O===45||wn(O)?(e.consume(O),F):O===47||O===62||kt(O)?ee(O):n(O)}function ee(O){return O===47?(e.consume(O),$):O===58||O===95||Rn(O)?(e.consume(O),P):De(O)?(c=ee,ce(O)):Xe(O)?(e.consume(O),ee):$(O)}function P(O){return O===45||O===46||O===58||O===95||wn(O)?(e.consume(O),P):X(O)}function X(O){return O===61?(e.consume(O),J):De(O)?(c=X,ce(O)):Xe(O)?(e.consume(O),X):ee(O)}function J(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),s=O,pe):De(O)?(c=J,ce(O)):Xe(O)?(e.consume(O),J):(e.consume(O),ue)}function pe(O){return O===s?(e.consume(O),s=void 0,te):O===null?n(O):De(O)?(c=pe,ce(O)):(e.consume(O),pe)}function ue(O){return O===null||O===34||O===39||O===60||O===61||O===96?n(O):O===47||O===62||kt(O)?ee(O):(e.consume(O),ue)}function te(O){return O===47||O===62||kt(O)?ee(O):n(O)}function $(O){return O===62?(e.consume(O),e.exit("htmlTextData"),e.exit("htmlText"),t):n(O)}function ce(O){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),de}function de(O){return Xe(O)?at(e,re,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):re(O)}function re(O){return e.enter("htmlTextData"),c(O)}}const Ng={name:"labelEnd",resolveAll:fR,resolveTo:hR,tokenize:pR},cR={tokenize:mR},uR={tokenize:gR},dR={tokenize:bR};function fR(e){let t=-1;const n=[];for(;++t<e.length;){const a=e[t][1];if(n.push(e[t]),a.type==="labelImage"||a.type==="labelLink"||a.type==="labelEnd"){const s=a.type==="labelImage"?4:2;a.type="data",t+=s}}return e.length!==n.length&&li(e,0,e.length,n),e}function hR(e,t){let n=e.length,a=0,s,o,c,d;for(;n--;)if(s=e[n][1],o){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(c){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(o=n,s.type!=="labelLink")){a=2;break}}else s.type==="labelEnd"&&(c=n);const h={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},p={type:"label",start:{...e[o][1].start},end:{...e[c][1].end}},b={type:"labelText",start:{...e[o+a+2][1].end},end:{...e[c-2][1].start}};return d=[["enter",h,t],["enter",p,t]],d=wi(d,e.slice(o+1,o+a+3)),d=wi(d,[["enter",b,t]]),d=wi(d,ef(t.parser.constructs.insideSpan.null,e.slice(o+a+4,c-3),t)),d=wi(d,[["exit",b,t],e[c-2],e[c-1],["exit",p,t]]),d=wi(d,e.slice(c+1)),d=wi(d,[["exit",h,t]]),li(e,o,e.length,d),e}function pR(e,t,n){const a=this;let s=a.events.length,o,c;for(;s--;)if((a.events[s][1].type==="labelImage"||a.events[s][1].type==="labelLink")&&!a.events[s][1]._balanced){o=a.events[s][1];break}return d;function d(v){return o?o._inactive?g(v):(c=a.parser.defined.includes(Ii(a.sliceSerialize({start:o.end,end:a.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(v),e.exit("labelMarker"),e.exit("labelEnd"),h):n(v)}function h(v){return v===40?e.attempt(cR,b,c?b:g)(v):v===91?e.attempt(uR,b,c?p:g)(v):c?b(v):g(v)}function p(v){return e.attempt(dR,b,g)(v)}function b(v){return t(v)}function g(v){return o._balanced=!0,n(v)}}function mR(e,t,n){return a;function a(g){return e.enter("resource"),e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),s}function s(g){return kt(g)?tc(e,o)(g):o(g)}function o(g){return g===41?b(g):HE(e,c,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function c(g){return kt(g)?tc(e,h)(g):b(g)}function d(g){return n(g)}function h(g){return g===34||g===39||g===40?GE(e,p,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):b(g)}function p(g){return kt(g)?tc(e,b)(g):b(g)}function b(g){return g===41?(e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),e.exit("resource"),t):n(g)}}function gR(e,t,n){const a=this;return s;function s(d){return KE.call(a,e,o,c,"reference","referenceMarker","referenceString")(d)}function o(d){return a.parser.defined.includes(Ii(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)))?t(d):n(d)}function c(d){return n(d)}}function bR(e,t,n){return a;function a(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),s}function s(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const yR={name:"labelStartImage",resolveAll:Ng.resolveAll,tokenize:xR};function xR(e,t,n){const a=this;return s;function s(d){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(d),e.exit("labelImageMarker"),o}function o(d){return d===91?(e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelImage"),c):n(d)}function c(d){return d===94&&"_hiddenFootnoteSupport"in a.parser.constructs?n(d):t(d)}}const vR={name:"labelStartLink",resolveAll:Ng.resolveAll,tokenize:wR};function wR(e,t,n){const a=this;return s;function s(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),o}function o(c){return c===94&&"_hiddenFootnoteSupport"in a.parser.constructs?n(c):t(c)}}const jp={name:"lineEnding",tokenize:kR};function kR(e,t){return n;function n(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),at(e,t,"linePrefix")}}const bd={name:"thematicBreak",tokenize:ER};function ER(e,t,n){let a=0,s;return o;function o(p){return e.enter("thematicBreak"),c(p)}function c(p){return s=p,d(p)}function d(p){return p===s?(e.enter("thematicBreakSequence"),h(p)):a>=3&&(p===null||De(p))?(e.exit("thematicBreak"),t(p)):n(p)}function h(p){return p===s?(e.consume(p),a++,h):(e.exit("thematicBreakSequence"),Xe(p)?at(e,d,"whitespace")(p):d(p))}}const Hn={continuation:{tokenize:CR},exit:AR,name:"list",tokenize:NR},SR={partial:!0,tokenize:jR},_R={partial:!0,tokenize:TR};function NR(e,t,n){const a=this,s=a.events[a.events.length-1];let o=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,c=0;return d;function d(x){const E=a.containerState.type||(x===42||x===43||x===45?"listUnordered":"listOrdered");if(E==="listUnordered"?!a.containerState.marker||x===a.containerState.marker:Nm(x)){if(a.containerState.type||(a.containerState.type=E,e.enter(E,{_container:!0})),E==="listUnordered")return e.enter("listItemPrefix"),x===42||x===45?e.check(bd,n,p)(x):p(x);if(!a.interrupt||x===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),h(x)}return n(x)}function h(x){return Nm(x)&&++c<10?(e.consume(x),h):(!a.interrupt||c<2)&&(a.containerState.marker?x===a.containerState.marker:x===41||x===46)?(e.exit("listItemValue"),p(x)):n(x)}function p(x){return e.enter("listItemMarker"),e.consume(x),e.exit("listItemMarker"),a.containerState.marker=a.containerState.marker||x,e.check(Cc,a.interrupt?n:b,e.attempt(SR,v,g))}function b(x){return a.containerState.initialBlankLine=!0,o++,v(x)}function g(x){return Xe(x)?(e.enter("listItemPrefixWhitespace"),e.consume(x),e.exit("listItemPrefixWhitespace"),v):n(x)}function v(x){return a.containerState.size=o+a.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(x)}}function CR(e,t,n){const a=this;return a.containerState._closeFlow=void 0,e.check(Cc,s,o);function s(d){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,at(e,t,"listItemIndent",a.containerState.size+1)(d)}function o(d){return a.containerState.furtherBlankLines||!Xe(d)?(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,c(d)):(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,e.attempt(_R,t,c)(d))}function c(d){return a.containerState._closeFlow=!0,a.interrupt=void 0,at(e,e.attempt(Hn,t,n),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function TR(e,t,n){const a=this;return at(e,s,"listItemIndent",a.containerState.size+1);function s(o){const c=a.events[a.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===a.containerState.size?t(o):n(o)}}function AR(e){e.exit(this.containerState.type)}function jR(e,t,n){const a=this;return at(e,s,"listItemPrefixWhitespace",a.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(o){const c=a.events[a.events.length-1];return!Xe(o)&&c&&c[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const Cw={name:"setextUnderline",resolveTo:OR,tokenize:DR};function OR(e,t){let n=e.length,a,s,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){a=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const c={type:"setextHeading",start:{...e[a][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",o?(e.splice(s,0,["enter",c,t]),e.splice(o+1,0,["exit",e[a][1],t]),e[a][1].end={...e[o][1].end}):e[a][1]=c,e.push(["exit",c,t]),e}function DR(e,t,n){const a=this;let s;return o;function o(p){let b=a.events.length,g;for(;b--;)if(a.events[b][1].type!=="lineEnding"&&a.events[b][1].type!=="linePrefix"&&a.events[b][1].type!=="content"){g=a.events[b][1].type==="paragraph";break}return!a.parser.lazy[a.now().line]&&(a.interrupt||g)?(e.enter("setextHeadingLine"),s=p,c(p)):n(p)}function c(p){return e.enter("setextHeadingLineSequence"),d(p)}function d(p){return p===s?(e.consume(p),d):(e.exit("setextHeadingLineSequence"),Xe(p)?at(e,h,"lineSuffix")(p):h(p))}function h(p){return p===null||De(p)?(e.exit("setextHeadingLine"),t(p)):n(p)}}const MR={tokenize:RR};function RR(e){const t=this,n=e.attempt(Cc,a,e.attempt(this.parser.constructs.flowInitial,s,at(e,e.attempt(this.parser.constructs.flow,s,e.attempt(PM,s)),"linePrefix")));return n;function a(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function s(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const LR={resolveAll:YE()},IR=QE("string"),zR=QE("text");function QE(e){return{resolveAll:YE(e==="text"?BR:void 0),tokenize:t};function t(n){const a=this,s=this.parser.constructs[e],o=n.attempt(s,c,d);return c;function c(b){return p(b)?o(b):d(b)}function d(b){if(b===null){n.consume(b);return}return n.enter("data"),n.consume(b),h}function h(b){return p(b)?(n.exit("data"),o(b)):(n.consume(b),h)}function p(b){if(b===null)return!0;const g=s[b];let v=-1;if(g)for(;++v<g.length;){const x=g[v];if(!x.previous||x.previous.call(a,a.previous))return!0}return!1}}}function YE(e){return t;function t(n,a){let s=-1,o;for(;++s<=n.length;)o===void 0?n[s]&&n[s][1].type==="data"&&(o=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==o+2&&(n[o][1].end=n[s-1][1].end,n.splice(o+2,s-o-2),s=o+2),o=void 0);return e?e(n,a):n}}function BR(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 a=e[n-1][1],s=t.sliceStream(a);let o=s.length,c=-1,d=0,h;for(;o--;){const p=s[o];if(typeof p=="string"){for(c=p.length;p.charCodeAt(c-1)===32;)d++,c--;if(c)break;c=-1}else if(p===-2)h=!0,d++;else if(p!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(d=0),d){const p={type:n===e.length||h||d<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?c:a.start._bufferIndex+c,_index:a.start._index+o,line:a.end.line,column:a.end.column-d,offset:a.end.offset-d},end:{...a.end}};a.end={...p.start},a.start.offset===a.end.offset?Object.assign(a,p):(e.splice(n,0,["enter",p,t],["exit",p,t]),n+=2)}n++}return e}const PR={42:Hn,43:Hn,45:Hn,48:Hn,49:Hn,50:Hn,51:Hn,52:Hn,53:Hn,54:Hn,55:Hn,56:Hn,57:Hn,62:UE},UR={91:HM},FR={[-2]:Ap,[-1]:Ap,32:Ap},qR={35:WM,42:bd,45:[Cw,bd],60:eR,61:Cw,95:bd,96:_w,126:_w},$R={38:qE,92:FE},HR={[-5]:jp,[-4]:jp,[-3]:jp,33:yR,38:qE,42:Cm,60:[vM,lR],91:vR,92:[YM,FE],93:Ng,95:Cm,96:MM},KR={null:[Cm,LR]},GR={null:[42,95]},QR={null:[]},YR=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:GR,contentInitial:UR,disable:QR,document:PR,flow:qR,flowInitial:FR,insideSpan:KR,string:$R,text:HR},Symbol.toStringTag,{value:"Module"}));function VR(e,t,n){let a={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const s={},o=[];let c=[],d=[];const h={attempt:q(B),check:q(M),consume:A,enter:T,exit:D,interrupt:q(M,{interrupt:!0})},p={code:null,containerState:{},defineSkip:w,events:[],now:E,parser:e,previous:null,sliceSerialize:v,sliceStream:x,write:g};let b=t.tokenize.call(p,h);return t.resolveAll&&o.push(t),p;function g(X){return c=wi(c,X),S(),c[c.length-1]!==null?[]:(F(t,0),p.events=ef(o,p.events,p),p.events)}function v(X,J){return XR(x(X),J)}function x(X){return WR(c,X)}function E(){const{_bufferIndex:X,_index:J,line:pe,column:ue,offset:te}=a;return{_bufferIndex:X,_index:J,line:pe,column:ue,offset:te}}function w(X){s[X.line]=X.column,P()}function S(){let X;for(;a._index<c.length;){const J=c[a._index];if(typeof J=="string")for(X=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===X&&a._bufferIndex<J.length;)_(J.charCodeAt(a._bufferIndex));else _(J)}}function _(X){b=b(X)}function A(X){De(X)?(a.line++,a.column=1,a.offset+=X===-3?2:1,P()):X!==-1&&(a.column++,a.offset++),a._bufferIndex<0?a._index++:(a._bufferIndex++,a._bufferIndex===c[a._index].length&&(a._bufferIndex=-1,a._index++)),p.previous=X}function T(X,J){const pe=J||{};return pe.type=X,pe.start=E(),p.events.push(["enter",pe,p]),d.push(pe),pe}function D(X){const J=d.pop();return J.end=E(),p.events.push(["exit",J,p]),J}function B(X,J){F(X,J.from)}function M(X,J){J.restore()}function q(X,J){return pe;function pe(ue,te,$){let ce,de,re,O;return Array.isArray(ue)?Q(ue):"tokenize"in ue?Q([ue]):R(ue);function R(Y){return xe;function xe(V){const ae=V!==null&&Y[V],ye=V!==null&&Y.null,Pe=[...Array.isArray(ae)?ae:ae?[ae]:[],...Array.isArray(ye)?ye:ye?[ye]:[]];return Q(Pe)(V)}}function Q(Y){return ce=Y,de=0,Y.length===0?$:j(Y[de])}function j(Y){return xe;function xe(V){return O=ee(),re=Y,Y.partial||(p.currentConstruct=Y),Y.name&&p.parser.constructs.disable.null.includes(Y.name)?_e():Y.tokenize.call(J?Object.assign(Object.create(p),J):p,h,ge,_e)(V)}}function ge(Y){return X(re,O),te}function _e(Y){return O.restore(),++de<ce.length?j(ce[de]):$}}}function F(X,J){X.resolveAll&&!o.includes(X)&&o.push(X),X.resolve&&li(p.events,J,p.events.length-J,X.resolve(p.events.slice(J),p)),X.resolveTo&&(p.events=X.resolveTo(p.events,p))}function ee(){const X=E(),J=p.previous,pe=p.currentConstruct,ue=p.events.length,te=Array.from(d);return{from:ue,restore:$};function $(){a=X,p.previous=J,p.currentConstruct=pe,p.events.length=ue,d=te,P()}}function P(){a.line in s&&a.column<2&&(a.column=s[a.line],a.offset+=s[a.line]-1)}}function WR(e,t){const n=t.start._index,a=t.start._bufferIndex,s=t.end._index,o=t.end._bufferIndex;let c;if(n===s)c=[e[n].slice(a,o)];else{if(c=e.slice(n,s),a>-1){const d=c[0];typeof d=="string"?c[0]=d.slice(a):c.shift()}o>0&&c.push(e[s].slice(0,o))}return c}function XR(e,t){let n=-1;const a=[];let s;for(;++n<e.length;){const o=e[n];let c;if(typeof o=="string")c=o;else switch(o){case-5:{c="\r";break}case-4:{c=`
523
- `;break}case-3:{c=`\r
524
- `;break}case-2:{c=t?" ":" ";break}case-1:{if(!t&&s)continue;c=" ";break}default:c=String.fromCharCode(o)}s=o===-2,a.push(c)}return a.join("")}function ZR(e){const a={constructs:BE([YR,...(e||{}).extensions||[]]),content:s(hM),defined:[],document:s(mM),flow:s(MR),lazy:{},string:s(IR),text:s(zR)};return a;function s(o){return c;function c(d){return VR(a,o,d)}}}function JR(e){for(;!$E(e););return e}const Tw=/[\0\t\n\r]/g;function eL(){let e=1,t="",n=!0,a;return s;function s(o,c,d){const h=[];let p,b,g,v,x;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(c||void 0).decode(o)),g=0,t="",n&&(o.charCodeAt(0)===65279&&g++,n=void 0);g<o.length;){if(Tw.lastIndex=g,p=Tw.exec(o),v=p&&p.index!==void 0?p.index:o.length,x=o.charCodeAt(v),!p){t=o.slice(g);break}if(x===10&&g===v&&a)h.push(-3),a=void 0;else switch(a&&(h.push(-5),a=void 0),g<v&&(h.push(o.slice(g,v)),e+=v-g),x){case 0:{h.push(65533),e++;break}case 9:{for(b=Math.ceil(e/4)*4,h.push(-2);e++<b;)h.push(-1);break}case 10:{h.push(-4),e=1;break}default:a=!0,e=1}g=v+1}return d&&(a&&h.push(-5),t&&h.push(t),h.push(null)),h}}const tL=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function nL(e){return e.replace(tL,iL)}function iL(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),o=s===120||s===88;return PE(n.slice(o?2:1),o?16:10)}return _g(n)||e}const VE={}.hasOwnProperty;function aL(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),rL(n)(JR(ZR(n).document().write(eL()(e,t,!0))))}function rL(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Fi),autolinkProtocol:ee,autolinkEmail:ee,atxHeading:o(Ui),blockQuote:o(ye),characterEscape:ee,characterReference:ee,codeFenced:o(Pe),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:o(Pe,c),codeText:o(Ot,c),codeTextData:ee,data:ee,codeFlowValue:ee,definition:o(St),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:o(on),hardBreakEscape:o(tt),hardBreakTrailing:o(tt),htmlFlow:o(Ti,c),htmlFlowData:ee,htmlText:o(Ti,c),htmlTextData:ee,image:o(ci),label:c,link:o(Fi),listItem:o(Ar),listItemValue:v,listOrdered:o(na,g),listUnordered:o(na),paragraph:o(Ql),reference:j,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:o(Ui),strong:o(xs),thematicBreak:o(vs)},exit:{atxHeading:h(),atxHeadingSequence:B,autolink:h(),autolinkEmail:ae,autolinkProtocol:V,blockQuote:h(),characterEscapeValue:P,characterReferenceMarkerHexadecimal:_e,characterReferenceMarkerNumeric:_e,characterReferenceValue:Y,characterReference:xe,codeFenced:h(S),codeFencedFence:w,codeFencedFenceInfo:x,codeFencedFenceMeta:E,codeFlowValue:P,codeIndented:h(_),codeText:h(te),codeTextData:P,data:P,definition:h(),definitionDestinationString:D,definitionLabelString:A,definitionTitleString:T,emphasis:h(),hardBreakEscape:h(J),hardBreakTrailing:h(J),htmlFlow:h(pe),htmlFlowData:P,htmlText:h(ue),htmlTextData:P,image:h(ce),label:re,labelText:de,lineEnding:X,link:h($),listItem:h(),listOrdered:h(),listUnordered:h(),paragraph:h(),referenceString:ge,resourceDestinationString:O,resourceTitleString:R,resource:Q,setextHeading:h(F),setextHeadingLineSequence:q,setextHeadingText:M,strong:h(),thematicBreak:h()}};WE(t,(e||{}).mdastExtensions||[]);const n={};return a;function a(ne){let me={type:"root",children:[]};const Me={stack:[me],tokenStack:[],config:t,enter:d,exit:p,buffer:c,resume:b,data:n},Qe=[];let st=-1;for(;++st<ne.length;)if(ne[st][1].type==="listOrdered"||ne[st][1].type==="listUnordered")if(ne[st][0]==="enter")Qe.push(st);else{const _n=Qe.pop();st=s(ne,_n,st)}for(st=-1;++st<ne.length;){const _n=t[ne[st][0]];VE.call(_n,ne[st][1].type)&&_n[ne[st][1].type].call(Object.assign({sliceSerialize:ne[st][2].sliceSerialize},Me),ne[st][1])}if(Me.tokenStack.length>0){const _n=Me.tokenStack[Me.tokenStack.length-1];(_n[1]||Aw).call(Me,void 0,_n[0])}for(me.position={start:cr(ne.length>0?ne[0][1].start:{line:1,column:1,offset:0}),end:cr(ne.length>0?ne[ne.length-2][1].end:{line:1,column:1,offset:0})},st=-1;++st<t.transforms.length;)me=t.transforms[st](me)||me;return me}function s(ne,me,Me){let Qe=me-1,st=-1,_n=!1,Ai,cn,Ft,gn;for(;++Qe<=Me;){const dt=ne[Qe];switch(dt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{dt[0]==="enter"?st++:st--,gn=void 0;break}case"lineEndingBlank":{dt[0]==="enter"&&(Ai&&!gn&&!st&&!Ft&&(Ft=Qe),gn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:gn=void 0}if(!st&&dt[0]==="enter"&&dt[1].type==="listItemPrefix"||st===-1&&dt[0]==="exit"&&(dt[1].type==="listUnordered"||dt[1].type==="listOrdered")){if(Ai){let qi=Qe;for(cn=void 0;qi--;){const Nn=ne[qi];if(Nn[1].type==="lineEnding"||Nn[1].type==="lineEndingBlank"){if(Nn[0]==="exit")continue;cn&&(ne[cn][1].type="lineEndingBlank",_n=!0),Nn[1].type="lineEnding",cn=qi}else if(!(Nn[1].type==="linePrefix"||Nn[1].type==="blockQuotePrefix"||Nn[1].type==="blockQuotePrefixWhitespace"||Nn[1].type==="blockQuoteMarker"||Nn[1].type==="listItemIndent"))break}Ft&&(!cn||Ft<cn)&&(Ai._spread=!0),Ai.end=Object.assign({},cn?ne[cn][1].start:dt[1].end),ne.splice(cn||Qe,0,["exit",Ai,dt[2]]),Qe++,Me++}if(dt[1].type==="listItemPrefix"){const qi={type:"listItem",_spread:!1,start:Object.assign({},dt[1].start),end:void 0};Ai=qi,ne.splice(Qe,0,["enter",qi,dt[2]]),Qe++,Me++,Ft=void 0,gn=!0}}}return ne[me][1]._spread=_n,Me}function o(ne,me){return Me;function Me(Qe){d.call(this,ne(Qe),Qe),me&&me.call(this,Qe)}}function c(){this.stack.push({type:"fragment",children:[]})}function d(ne,me,Me){this.stack[this.stack.length-1].children.push(ne),this.stack.push(ne),this.tokenStack.push([me,Me||void 0]),ne.position={start:cr(me.start),end:void 0}}function h(ne){return me;function me(Me){ne&&ne.call(this,Me),p.call(this,Me)}}function p(ne,me){const Me=this.stack.pop(),Qe=this.tokenStack.pop();if(Qe)Qe[0].type!==ne.type&&(me?me.call(this,ne,Qe[0]):(Qe[1]||Aw).call(this,ne,Qe[0]));else throw new Error("Cannot close `"+ne.type+"` ("+ec({start:ne.start,end:ne.end})+"): it’s not open");Me.position.end=cr(ne.end)}function b(){return Sg(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function v(ne){if(this.data.expectingFirstListItemValue){const me=this.stack[this.stack.length-2];me.start=Number.parseInt(this.sliceSerialize(ne),10),this.data.expectingFirstListItemValue=void 0}}function x(){const ne=this.resume(),me=this.stack[this.stack.length-1];me.lang=ne}function E(){const ne=this.resume(),me=this.stack[this.stack.length-1];me.meta=ne}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const ne=this.resume(),me=this.stack[this.stack.length-1];me.value=ne.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const ne=this.resume(),me=this.stack[this.stack.length-1];me.value=ne.replace(/(\r?\n|\r)$/g,"")}function A(ne){const me=this.resume(),Me=this.stack[this.stack.length-1];Me.label=me,Me.identifier=Ii(this.sliceSerialize(ne)).toLowerCase()}function T(){const ne=this.resume(),me=this.stack[this.stack.length-1];me.title=ne}function D(){const ne=this.resume(),me=this.stack[this.stack.length-1];me.url=ne}function B(ne){const me=this.stack[this.stack.length-1];if(!me.depth){const Me=this.sliceSerialize(ne).length;me.depth=Me}}function M(){this.data.setextHeadingSlurpLineEnding=!0}function q(ne){const me=this.stack[this.stack.length-1];me.depth=this.sliceSerialize(ne).codePointAt(0)===61?1:2}function F(){this.data.setextHeadingSlurpLineEnding=void 0}function ee(ne){const Me=this.stack[this.stack.length-1].children;let Qe=Me[Me.length-1];(!Qe||Qe.type!=="text")&&(Qe=zt(),Qe.position={start:cr(ne.start),end:void 0},Me.push(Qe)),this.stack.push(Qe)}function P(ne){const me=this.stack.pop();me.value+=this.sliceSerialize(ne),me.position.end=cr(ne.end)}function X(ne){const me=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Me=me.children[me.children.length-1];Me.position.end=cr(ne.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(me.type)&&(ee.call(this,ne),P.call(this,ne))}function J(){this.data.atHardBreak=!0}function pe(){const ne=this.resume(),me=this.stack[this.stack.length-1];me.value=ne}function ue(){const ne=this.resume(),me=this.stack[this.stack.length-1];me.value=ne}function te(){const ne=this.resume(),me=this.stack[this.stack.length-1];me.value=ne}function $(){const ne=this.stack[this.stack.length-1];if(this.data.inReference){const me=this.data.referenceType||"shortcut";ne.type+="Reference",ne.referenceType=me,delete ne.url,delete ne.title}else delete ne.identifier,delete ne.label;this.data.referenceType=void 0}function ce(){const ne=this.stack[this.stack.length-1];if(this.data.inReference){const me=this.data.referenceType||"shortcut";ne.type+="Reference",ne.referenceType=me,delete ne.url,delete ne.title}else delete ne.identifier,delete ne.label;this.data.referenceType=void 0}function de(ne){const me=this.sliceSerialize(ne),Me=this.stack[this.stack.length-2];Me.label=nL(me),Me.identifier=Ii(me).toLowerCase()}function re(){const ne=this.stack[this.stack.length-1],me=this.resume(),Me=this.stack[this.stack.length-1];if(this.data.inReference=!0,Me.type==="link"){const Qe=ne.children;Me.children=Qe}else Me.alt=me}function O(){const ne=this.resume(),me=this.stack[this.stack.length-1];me.url=ne}function R(){const ne=this.resume(),me=this.stack[this.stack.length-1];me.title=ne}function Q(){this.data.inReference=void 0}function j(){this.data.referenceType="collapsed"}function ge(ne){const me=this.resume(),Me=this.stack[this.stack.length-1];Me.label=me,Me.identifier=Ii(this.sliceSerialize(ne)).toLowerCase(),this.data.referenceType="full"}function _e(ne){this.data.characterReferenceType=ne.type}function Y(ne){const me=this.sliceSerialize(ne),Me=this.data.characterReferenceType;let Qe;Me?(Qe=PE(me,Me==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Qe=_g(me);const st=this.stack[this.stack.length-1];st.value+=Qe}function xe(ne){const me=this.stack.pop();me.position.end=cr(ne.end)}function V(ne){P.call(this,ne);const me=this.stack[this.stack.length-1];me.url=this.sliceSerialize(ne)}function ae(ne){P.call(this,ne);const me=this.stack[this.stack.length-1];me.url="mailto:"+this.sliceSerialize(ne)}function ye(){return{type:"blockquote",children:[]}}function Pe(){return{type:"code",lang:null,meta:null,value:""}}function Ot(){return{type:"inlineCode",value:""}}function St(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function on(){return{type:"emphasis",children:[]}}function Ui(){return{type:"heading",depth:0,children:[]}}function tt(){return{type:"break"}}function Ti(){return{type:"html",value:""}}function ci(){return{type:"image",title:null,url:"",alt:null}}function Fi(){return{type:"link",title:null,url:"",children:[]}}function na(ne){return{type:"list",ordered:ne.type==="listOrdered",start:null,spread:ne._spread,children:[]}}function Ar(ne){return{type:"listItem",spread:ne._spread,checked:null,children:[]}}function Ql(){return{type:"paragraph",children:[]}}function xs(){return{type:"strong",children:[]}}function zt(){return{type:"text",value:""}}function vs(){return{type:"thematicBreak"}}}function cr(e){return{line:e.line,column:e.column,offset:e.offset}}function WE(e,t){let n=-1;for(;++n<t.length;){const a=t[n];Array.isArray(a)?WE(e,a):sL(e,a)}}function sL(e,t){let n;for(n in t)if(VE.call(t,n))switch(n){case"canContainEols":{const a=t[n];a&&e[n].push(...a);break}case"transforms":{const a=t[n];a&&e[n].push(...a);break}case"enter":case"exit":{const a=t[n];a&&Object.assign(e[n],a);break}}}function Aw(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ec({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ec({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ec({start:t.start,end:t.end})+") is still open")}function lL(e){const t=this;t.parser=n;function n(a){return aL(a,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function oL(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 cL(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
525
- `}]}function uL(e,t){const n=t.value?t.value+`
526
- `:"",a={},s=t.lang?t.lang.split(/\s+/):[];s.length>0&&(a.className=["language-"+s[0]]);let o={type:"element",tagName:"code",properties:a,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 dL(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function fL(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function hL(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=String(t.identifier).toUpperCase(),s=Gl(a.toLowerCase()),o=e.footnoteOrder.indexOf(a);let c,d=e.footnoteCounts.get(a);d===void 0?(d=0,e.footnoteOrder.push(a),c=e.footnoteOrder.length):c=o+1,d+=1,e.footnoteCounts.set(a,d);const h={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+s,id:n+"fnref-"+s+(d>1?"-"+d:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(t,h);const p={type:"element",tagName:"sup",properties:{},children:[h]};return e.patch(t,p),e.applyData(t,p)}function pL(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 mL(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function XE(e,t){const n=t.referenceType;let a="]";if(n==="collapsed"?a+="[]":n==="full"&&(a+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+a}];const s=e.all(t),o=s[0];o&&o.type==="text"?o.value="["+o.value:s.unshift({type:"text",value:"["});const c=s[s.length-1];return c&&c.type==="text"?c.value+=a:s.push({type:"text",value:a}),s}function gL(e,t){const n=String(t.identifier).toUpperCase(),a=e.definitionById.get(n);if(!a)return XE(e,t);const s={src:Gl(a.url||""),alt:t.alt};a.title!==null&&a.title!==void 0&&(s.title=a.title);const o={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,o),e.applyData(t,o)}function bL(e,t){const n={src:Gl(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 a={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,a),e.applyData(t,a)}function yL(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const a={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,a),e.applyData(t,a)}function xL(e,t){const n=String(t.identifier).toUpperCase(),a=e.definitionById.get(n);if(!a)return XE(e,t);const s={href:Gl(a.url||"")};a.title!==null&&a.title!==void 0&&(s.title=a.title);const o={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function vL(e,t){const n={href:Gl(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const a={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function wL(e,t,n){const a=e.all(t),s=n?kL(n):ZE(t),o={},c=[];if(typeof t.checked=="boolean"){const b=a[0];let g;b&&b.type==="element"&&b.tagName==="p"?g=b:(g={type:"element",tagName:"p",properties:{},children:[]},a.unshift(g)),g.children.length>0&&g.children.unshift({type:"text",value:" "}),g.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let d=-1;for(;++d<a.length;){const b=a[d];(s||d!==0||b.type!=="element"||b.tagName!=="p")&&c.push({type:"text",value:`
527
- `}),b.type==="element"&&b.tagName==="p"&&!s?c.push(...b.children):c.push(b)}const h=a[a.length-1];h&&(s||h.type!=="element"||h.tagName!=="p")&&c.push({type:"text",value:`
528
- `});const p={type:"element",tagName:"li",properties:o,children:c};return e.patch(t,p),e.applyData(t,p)}function kL(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let a=-1;for(;!t&&++a<n.length;)t=ZE(n[a])}return t}function ZE(e){const t=e.spread;return t??e.children.length>1}function EL(e,t){const n={},a=e.all(t);let s=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++s<a.length;){const c=a[s];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.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(a,!0)};return e.patch(t,o),e.applyData(t,o)}function SL(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function _L(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function NL(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function CL(e,t){const n=e.all(t),a=n.shift(),s=[];if(a){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([a],!0)};e.patch(t.children[0],c),s.push(c)}if(n.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},d=vg(t.children[1]),h=OE(t.children[t.children.length-1]);d&&h&&(c.position={start:d,end:h}),s.push(c)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,o),e.applyData(t,o)}function TL(e,t,n){const a=n?n.children:void 0,o=(a?a.indexOf(t):1)===0?"th":"td",c=n&&n.type==="table"?n.align:void 0,d=c?c.length:t.children.length;let h=-1;const p=[];for(;++h<d;){const g=t.children[h],v={},x=c?c[h]:void 0;x&&(v.align=x);let E={type:"element",tagName:o,properties:v,children:[]};g&&(E.children=e.all(g),e.patch(g,E),E=e.applyData(g,E)),p.push(E)}const b={type:"element",tagName:"tr",properties:{},children:e.wrap(p,!0)};return e.patch(t,b),e.applyData(t,b)}function AL(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const jw=9,Ow=32;function jL(e){const t=String(e),n=/\r?\n|\r/g;let a=n.exec(t),s=0;const o=[];for(;a;)o.push(Dw(t.slice(s,a.index),s>0,!0),a[0]),s=a.index+a[0].length,a=n.exec(t);return o.push(Dw(t.slice(s),s>0,!1)),o.join("")}function Dw(e,t,n){let a=0,s=e.length;if(t){let o=e.codePointAt(a);for(;o===jw||o===Ow;)a++,o=e.codePointAt(a)}if(n){let o=e.codePointAt(s-1);for(;o===jw||o===Ow;)s--,o=e.codePointAt(s-1)}return s>a?e.slice(a,s):""}function OL(e,t){const n={type:"text",value:jL(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function DL(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const ML={blockquote:oL,break:cL,code:uL,delete:dL,emphasis:fL,footnoteReference:hL,heading:pL,html:mL,imageReference:gL,image:bL,inlineCode:yL,linkReference:xL,link:vL,listItem:wL,list:EL,paragraph:SL,root:_L,strong:NL,table:CL,tableCell:AL,tableRow:TL,text:OL,thematicBreak:DL,toml:td,yaml:td,definition:td,footnoteDefinition:td};function td(){}const JE=-1,tf=0,nc=1,Td=2,Cg=3,Tg=4,Ag=5,jg=6,e1=7,t1=8,Mw=typeof self=="object"?self:globalThis,RL=(e,t)=>{const n=(s,o)=>(e.set(o,s),s),a=s=>{if(e.has(s))return e.get(s);const[o,c]=t[s];switch(o){case tf:case JE:return n(c,s);case nc:{const d=n([],s);for(const h of c)d.push(a(h));return d}case Td:{const d=n({},s);for(const[h,p]of c)d[a(h)]=a(p);return d}case Cg:return n(new Date(c),s);case Tg:{const{source:d,flags:h}=c;return n(new RegExp(d,h),s)}case Ag:{const d=n(new Map,s);for(const[h,p]of c)d.set(a(h),a(p));return d}case jg:{const d=n(new Set,s);for(const h of c)d.add(a(h));return d}case e1:{const{name:d,message:h}=c;return n(new Mw[d](h),s)}case t1:return n(BigInt(c),s);case"BigInt":return n(Object(BigInt(c)),s);case"ArrayBuffer":return n(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:d}=new Uint8Array(c);return n(new DataView(d),c)}}return n(new Mw[o](c),s)};return a},Rw=e=>RL(new Map,e)(0),ll="",{toString:LL}={},{keys:IL}=Object,Vo=e=>{const t=typeof e;if(t!=="object"||!e)return[tf,t];const n=LL.call(e).slice(8,-1);switch(n){case"Array":return[nc,ll];case"Object":return[Td,ll];case"Date":return[Cg,ll];case"RegExp":return[Tg,ll];case"Map":return[Ag,ll];case"Set":return[jg,ll];case"DataView":return[nc,n]}return n.includes("Array")?[nc,n]:n.includes("Error")?[e1,n]:[Td,n]},nd=([e,t])=>e===tf&&(t==="function"||t==="symbol"),zL=(e,t,n,a)=>{const s=(c,d)=>{const h=a.push(c)-1;return n.set(d,h),h},o=c=>{if(n.has(c))return n.get(c);let[d,h]=Vo(c);switch(d){case tf:{let b=c;switch(h){case"bigint":d=t1,b=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+h);b=null;break;case"undefined":return s([JE],c)}return s([d,b],c)}case nc:{if(h){let v=c;return h==="DataView"?v=new Uint8Array(c.buffer):h==="ArrayBuffer"&&(v=new Uint8Array(c)),s([h,[...v]],c)}const b=[],g=s([d,b],c);for(const v of c)b.push(o(v));return g}case Td:{if(h)switch(h){case"BigInt":return s([h,c.toString()],c);case"Boolean":case"Number":case"String":return s([h,c.valueOf()],c)}if(t&&"toJSON"in c)return o(c.toJSON());const b=[],g=s([d,b],c);for(const v of IL(c))(e||!nd(Vo(c[v])))&&b.push([o(v),o(c[v])]);return g}case Cg:return s([d,c.toISOString()],c);case Tg:{const{source:b,flags:g}=c;return s([d,{source:b,flags:g}],c)}case Ag:{const b=[],g=s([d,b],c);for(const[v,x]of c)(e||!(nd(Vo(v))||nd(Vo(x))))&&b.push([o(v),o(x)]);return g}case jg:{const b=[],g=s([d,b],c);for(const v of c)(e||!nd(Vo(v)))&&b.push(o(v));return g}}const{message:p}=c;return s([d,{name:h,message:p}],c)};return o},Lw=(e,{json:t,lossy:n}={})=>{const a=[];return zL(!(t||n),!!t,new Map,a)(e),a},Ad=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Rw(Lw(e,t)):structuredClone(e):(e,t)=>Rw(Lw(e,t));function BL(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 PL(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function UL(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||BL,a=e.options.footnoteBackLabel||PL,s=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},d=[];let h=-1;for(;++h<e.footnoteOrder.length;){const p=e.footnoteById.get(e.footnoteOrder[h]);if(!p)continue;const b=e.all(p),g=String(p.identifier).toUpperCase(),v=Gl(g.toLowerCase());let x=0;const E=[],w=e.footnoteCounts.get(g);for(;w!==void 0&&++x<=w;){E.length>0&&E.push({type:"text",value:" "});let A=typeof n=="string"?n:n(h,x);typeof A=="string"&&(A={type:"text",value:A}),E.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+v+(x>1?"-"+x:""),dataFootnoteBackref:"",ariaLabel:typeof a=="string"?a:a(h,x),className:["data-footnote-backref"]},children:Array.isArray(A)?A:[A]})}const S=b[b.length-1];if(S&&S.type==="element"&&S.tagName==="p"){const A=S.children[S.children.length-1];A&&A.type==="text"?A.value+=" ":S.children.push({type:"text",value:" "}),S.children.push(...E)}else b.push(...E);const _={type:"element",tagName:"li",properties:{id:t+"fn-"+v},children:e.wrap(b,!0)};e.patch(p,_),d.push(_)}if(d.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Ad(c),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
529
- `},{type:"element",tagName:"ol",properties:{},children:e.wrap(d,!0)},{type:"text",value:`
530
- `}]}}const Tc=(function(e){if(e==null)return HL;if(typeof e=="function")return nf(e);if(typeof e=="object")return Array.isArray(e)?FL(e):qL(e);if(typeof e=="string")return $L(e);throw new Error("Expected function, string, or object as test")});function FL(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Tc(e[n]);return nf(a);function a(...s){let o=-1;for(;++o<t.length;)if(t[o].apply(this,s))return!0;return!1}}function qL(e){const t=e;return nf(n);function n(a){const s=a;let o;for(o in e)if(s[o]!==t[o])return!1;return!0}}function $L(e){return nf(t);function t(n){return n&&n.type===e}}function nf(e){return t;function t(n,a,s){return!!(KL(n)&&e.call(this,n,typeof a=="number"?a:void 0,s||void 0))}}function HL(){return!0}function KL(e){return e!==null&&typeof e=="object"&&"type"in e}const n1=[],GL=!0,Tm=!1,QL="skip";function i1(e,t,n,a){let s;typeof t=="function"&&typeof n!="function"?(a=n,n=t):s=t;const o=Tc(s),c=a?-1:1;d(e,void 0,[])();function d(h,p,b){const g=h&&typeof h=="object"?h:{};if(typeof g.type=="string"){const x=typeof g.tagName=="string"?g.tagName:typeof g.name=="string"?g.name:void 0;Object.defineProperty(v,"name",{value:"node ("+(h.type+(x?"<"+x+">":""))+")"})}return v;function v(){let x=n1,E,w,S;if((!t||o(h,p,b[b.length-1]||void 0))&&(x=YL(n(h,b)),x[0]===Tm))return x;if("children"in h&&h.children){const _=h;if(_.children&&x[0]!==QL)for(w=(a?_.children.length:-1)+c,S=b.concat(_);w>-1&&w<_.children.length;){const A=_.children[w];if(E=d(A,w,S)(),E[0]===Tm)return E;w=typeof E[1]=="number"?E[1]:w+c}}return x}}}function YL(e){return Array.isArray(e)?e:typeof e=="number"?[GL,e]:e==null?n1:[e]}function af(e,t,n,a){let s,o,c;typeof t=="function"&&typeof n!="function"?(o=void 0,c=t,s=n):(o=t,c=n,s=a),i1(e,o,d,s);function d(h,p){const b=p[p.length-1],g=b?b.children.indexOf(h):void 0;return c(h,g,b)}}const Am={}.hasOwnProperty,VL={};function WL(e,t){const n=t||VL,a=new Map,s=new Map,o=new Map,c={...ML,...n.handlers},d={all:p,applyData:ZL,definitionById:a,footnoteById:s,footnoteCounts:o,footnoteOrder:[],handlers:c,one:h,options:n,patch:XL,wrap:e3};return af(e,function(b){if(b.type==="definition"||b.type==="footnoteDefinition"){const g=b.type==="definition"?a:s,v=String(b.identifier).toUpperCase();g.has(v)||g.set(v,b)}}),d;function h(b,g){const v=b.type,x=d.handlers[v];if(Am.call(d.handlers,v)&&x)return x(d,b,g);if(d.options.passThrough&&d.options.passThrough.includes(v)){if("children"in b){const{children:w,...S}=b,_=Ad(S);return _.children=d.all(b),_}return Ad(b)}return(d.options.unknownHandler||JL)(d,b,g)}function p(b){const g=[];if("children"in b){const v=b.children;let x=-1;for(;++x<v.length;){const E=d.one(v[x],b);if(E){if(x&&v[x-1].type==="break"&&(!Array.isArray(E)&&E.type==="text"&&(E.value=Iw(E.value)),!Array.isArray(E)&&E.type==="element")){const w=E.children[0];w&&w.type==="text"&&(w.value=Iw(w.value))}Array.isArray(E)?g.push(...E):g.push(E)}}}return g}}function XL(e,t){e.position&&(t.position=PD(e))}function ZL(e,t){let n=t;if(e&&e.data){const a=e.data.hName,s=e.data.hChildren,o=e.data.hProperties;if(typeof a=="string")if(n.type==="element")n.tagName=a;else{const c="children"in n?n.children:[n];n={type:"element",tagName:a,properties:{},children:c}}n.type==="element"&&o&&Object.assign(n.properties,Ad(o)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function JL(e,t){const n=t.data||{},a="value"in t&&!(Am.call(n,"hProperties")||Am.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function e3(e,t){const n=[];let a=-1;for(t&&n.push({type:"text",value:`
531
- `});++a<e.length;)a&&n.push({type:"text",value:`
532
- `}),n.push(e[a]);return t&&e.length>0&&n.push({type:"text",value:`
533
- `}),n}function Iw(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function zw(e,t){const n=WL(e,t),a=n.one(e,void 0),s=UL(n),o=Array.isArray(a)?{type:"root",children:a}:a||{type:"root",children:[]};return s&&o.children.push({type:"text",value:`
534
- `},s),o}function t3(e,t){return e&&"run"in e?async function(n,a){const s=zw(n,{file:a,...t});await e.run(s,a)}:function(n,a){return zw(n,{file:a,...e||t})}}function Bw(e){if(e)throw e}var Op,Pw;function n3(){if(Pw)return Op;Pw=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(p){return typeof Array.isArray=="function"?Array.isArray(p):t.call(p)==="[object Array]"},o=function(p){if(!p||t.call(p)!=="[object Object]")return!1;var b=e.call(p,"constructor"),g=p.constructor&&p.constructor.prototype&&e.call(p.constructor.prototype,"isPrototypeOf");if(p.constructor&&!b&&!g)return!1;var v;for(v in p);return typeof v>"u"||e.call(p,v)},c=function(p,b){n&&b.name==="__proto__"?n(p,b.name,{enumerable:!0,configurable:!0,value:b.newValue,writable:!0}):p[b.name]=b.newValue},d=function(p,b){if(b==="__proto__")if(e.call(p,b)){if(a)return a(p,b).value}else return;return p[b]};return Op=function h(){var p,b,g,v,x,E,w=arguments[0],S=1,_=arguments.length,A=!1;for(typeof w=="boolean"&&(A=w,w=arguments[1]||{},S=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});S<_;++S)if(p=arguments[S],p!=null)for(b in p)g=d(w,b),v=d(p,b),w!==v&&(A&&v&&(o(v)||(x=s(v)))?(x?(x=!1,E=g&&s(g)?g:[]):E=g&&o(g)?g:{},c(w,{name:b,newValue:h(A,E,v)})):typeof v<"u"&&c(w,{name:b,newValue:v}));return w},Op}var i3=n3();const Dp=Lm(i3);function jm(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 a3(){const e=[],t={run:n,use:a};return t;function n(...s){let o=-1;const c=s.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);d(null,...s);function d(h,...p){const b=e[++o];let g=-1;if(h){c(h);return}for(;++g<s.length;)(p[g]===null||p[g]===void 0)&&(p[g]=s[g]);s=p,b?r3(b,d)(...p):c(null,...p)}}function a(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function r3(e,t){let n;return a;function a(...c){const d=e.length>c.length;let h;d&&c.push(s);try{h=e.apply(this,c)}catch(p){const b=p;if(d&&n)throw b;return s(b)}d||(h&&h.then&&typeof h.then=="function"?h.then(o,s):h instanceof Error?s(h):o(h))}function s(c,...d){n||(n=!0,t(c,...d))}function o(c){s(null,c)}}const Vi={basename:s3,dirname:l3,extname:o3,join:c3,sep:"/"};function s3(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ac(e);let n=0,a=-1,s=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(o){n=s+1;break}}else a<0&&(o=!0,a=s+1);return a<0?"":e.slice(n,a)}if(t===e)return"";let c=-1,d=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(o){n=s+1;break}}else c<0&&(o=!0,c=s+1),d>-1&&(e.codePointAt(s)===t.codePointAt(d--)?d<0&&(a=s):(d=-1,a=c));return n===a?a=c:a<0&&(a=e.length),e.slice(n,a)}function l3(e){if(Ac(e),e.length===0)return".";let t=-1,n=e.length,a;for(;--n;)if(e.codePointAt(n)===47){if(a){t=n;break}}else a||(a=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function o3(e){Ac(e);let t=e.length,n=-1,a=0,s=-1,o=0,c;for(;t--;){const d=e.codePointAt(t);if(d===47){if(c){a=t+1;break}continue}n<0&&(c=!0,n=t+1),d===46?s<0?s=t:o!==1&&(o=1):s>-1&&(o=-1)}return s<0||n<0||o===0||o===1&&s===n-1&&s===a+1?"":e.slice(s,n)}function c3(...e){let t=-1,n;for(;++t<e.length;)Ac(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":u3(n)}function u3(e){Ac(e);const t=e.codePointAt(0)===47;let n=d3(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function d3(e,t){let n="",a=0,s=-1,o=0,c=-1,d,h;for(;++c<=e.length;){if(c<e.length)d=e.codePointAt(c);else{if(d===47)break;d=47}if(d===47){if(!(s===c-1||o===1))if(s!==c-1&&o===2){if(n.length<2||a!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(h=n.lastIndexOf("/"),h!==n.length-1){h<0?(n="",a=0):(n=n.slice(0,h),a=n.length-1-n.lastIndexOf("/")),s=c,o=0;continue}}else if(n.length>0){n="",a=0,s=c,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",a=2)}else n.length>0?n+="/"+e.slice(s+1,c):n=e.slice(s+1,c),a=c-s-1;s=c,o=0}else d===46&&o>-1?o++:o=-1}return n}function Ac(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const f3={cwd:h3};function h3(){return"/"}function Om(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function p3(e){if(typeof e=="string")e=new URL(e);else if(!Om(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 m3(e)}function m3(e){if(e.hostname!==""){const a=new TypeError('File URL host must be "localhost" or empty on darwin');throw a.code="ERR_INVALID_FILE_URL_HOST",a}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const a=t.codePointAt(n+2);if(a===70||a===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const Mp=["history","path","basename","stem","extname","dirname"];class a1{constructor(t){let n;t?Om(t)?n={path:t}:typeof t=="string"||g3(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":f3.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let a=-1;for(;++a<Mp.length;){const o=Mp[a];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let s;for(s in n)Mp.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?Vi.basename(this.path):void 0}set basename(t){Lp(t,"basename"),Rp(t,"basename"),this.path=Vi.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Vi.dirname(this.path):void 0}set dirname(t){Uw(this.basename,"dirname"),this.path=Vi.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Vi.extname(this.path):void 0}set extname(t){if(Rp(t,"extname"),Uw(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=Vi.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Om(t)&&(t=p3(t)),Lp(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Vi.basename(this.path,this.extname):void 0}set stem(t){Lp(t,"stem"),Rp(t,"stem"),this.path=Vi.join(this.dirname||"",t+(this.extname||""))}fail(t,n,a){const s=this.message(t,n,a);throw s.fatal=!0,s}info(t,n,a){const s=this.message(t,n,a);return s.fatal=void 0,s}message(t,n,a){const s=new Sn(t,n,a);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Rp(e,t){if(e&&e.includes(Vi.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Vi.sep+"`")}function Lp(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Uw(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function g3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const b3=(function(e){const a=this.constructor.prototype,s=a[e],o=function(){return s.apply(o,arguments)};return Object.setPrototypeOf(o,a),o}),y3={}.hasOwnProperty;class Og extends b3{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=a3()}copy(){const t=new Og;let n=-1;for(;++n<this.attachers.length;){const a=this.attachers[n];t.use(...a)}return t.data(Dp(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Bp("data",this.frozen),this.namespace[t]=n,this):y3.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Bp("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,...a]=this.attachers[this.freezeIndex];if(a[0]===!1)continue;a[0]===!0&&(a[0]=void 0);const s=n.call(t,...a);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=id(t),a=this.parser||this.Parser;return Ip("parse",a),a(String(n),n)}process(t,n){const a=this;return this.freeze(),Ip("process",this.parser||this.Parser),zp("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(o,c){const d=id(t),h=a.parse(d);a.run(h,d,function(b,g,v){if(b||!g||!v)return p(b);const x=g,E=a.stringify(x,v);w3(E)?v.value=E:v.result=E,p(b,v)});function p(b,g){b||!g?c(b):o?o(g):n(void 0,g)}}}processSync(t){let n=!1,a;return this.freeze(),Ip("processSync",this.parser||this.Parser),zp("processSync",this.compiler||this.Compiler),this.process(t,s),qw("processSync","process",n),a;function s(o,c){n=!0,Bw(o),a=c}}run(t,n,a){Fw(t),this.freeze();const s=this.transformers;return!a&&typeof n=="function"&&(a=n,n=void 0),a?o(void 0,a):new Promise(o);function o(c,d){const h=id(n);s.run(t,h,p);function p(b,g,v){const x=g||t;b?d(b):c?c(x):a(void 0,x,v)}}}runSync(t,n){let a=!1,s;return this.run(t,n,o),qw("runSync","run",a),s;function o(c,d){Bw(c),s=d,a=!0}}stringify(t,n){this.freeze();const a=id(n),s=this.compiler||this.Compiler;return zp("stringify",s),Fw(t),s(t,a)}use(t,...n){const a=this.attachers,s=this.namespace;if(Bp("use",this.frozen),t!=null)if(typeof t=="function")h(t,n);else if(typeof t=="object")Array.isArray(t)?d(t):c(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(p){if(typeof p=="function")h(p,[]);else if(typeof p=="object")if(Array.isArray(p)){const[b,...g]=p;h(b,g)}else c(p);else throw new TypeError("Expected usable value, not `"+p+"`")}function c(p){if(!("plugins"in p)&&!("settings"in p))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");d(p.plugins),p.settings&&(s.settings=Dp(!0,s.settings,p.settings))}function d(p){let b=-1;if(p!=null)if(Array.isArray(p))for(;++b<p.length;){const g=p[b];o(g)}else throw new TypeError("Expected a list of plugins, not `"+p+"`")}function h(p,b){let g=-1,v=-1;for(;++g<a.length;)if(a[g][0]===p){v=g;break}if(v===-1)a.push([p,...b]);else if(b.length>0){let[x,...E]=b;const w=a[v][1];jm(w)&&jm(x)&&(x=Dp(!0,w,x)),a[v]=[p,x,...E]}}}}const x3=new Og().freeze();function Ip(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function zp(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Bp(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 Fw(e){if(!jm(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function qw(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function id(e){return v3(e)?e:new a1(e)}function v3(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function w3(e){return typeof e=="string"||k3(e)}function k3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const E3="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",$w=[],Hw={allowDangerousHtml:!0},S3=/^(https?|ircs?|mailto|xmpp)$/i,_3=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Dg(e){const t=N3(e),n=C3(e);return T3(t.runSync(t.parse(n),n),e)}function N3(e){const t=e.rehypePlugins||$w,n=e.remarkPlugins||$w,a=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Hw}:Hw;return x3().use(lL).use(n).use(t3,a).use(t)}function C3(e){const t=e.children||"",n=new a1;return typeof t=="string"&&(n.value=t),n}function T3(e,t){const n=t.allowedElements,a=t.allowElement,s=t.components,o=t.disallowedElements,c=t.skipHtml,d=t.unwrapDisallowed,h=t.urlTransform||A3;for(const b of _3)Object.hasOwn(t,b.from)&&(""+b.from+(b.to?"use `"+b.to+"` instead":"remove it")+E3+b.id,void 0);return af(e,p),HD(e,{Fragment:f.Fragment,components:s,ignoreInvalidStyle:!0,jsx:f.jsx,jsxs:f.jsxs,passKeys:!0,passNode:!0});function p(b,g,v){if(b.type==="raw"&&v&&typeof g=="number")return c?v.children.splice(g,1):v.children[g]={type:"text",value:b.value},g;if(b.type==="element"){let x;for(x in Tp)if(Object.hasOwn(Tp,x)&&Object.hasOwn(b.properties,x)){const E=b.properties[x],w=Tp[x];(w===null||w.includes(b.tagName))&&(b.properties[x]=h(String(E||""),x,b))}}if(b.type==="element"){let x=n?!n.includes(b.tagName):o?o.includes(b.tagName):!1;if(!x&&a&&typeof g=="number"&&(x=!a(b,g,v)),x&&v&&typeof g=="number")return d&&b.children?v.children.splice(g,1,...b.children):v.children.splice(g,1),g}}}function A3(e){const t=e.indexOf(":"),n=e.indexOf("?"),a=e.indexOf("#"),s=e.indexOf("/");return t===-1||s!==-1&&t>s||n!==-1&&t>n||a!==-1&&t>a||S3.test(e.slice(0,t))?e:""}function Kw(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let a=0,s=n.indexOf(t);for(;s!==-1;)a++,s=n.indexOf(t,s+t.length);return a}function j3(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function O3(e,t,n){const s=Tc((n||{}).ignore||[]),o=D3(t);let c=-1;for(;++c<o.length;)i1(e,"text",d);function d(p,b){let g=-1,v;for(;++g<b.length;){const x=b[g],E=v?v.children:void 0;if(s(x,E?E.indexOf(x):void 0,v))return;v=x}if(v)return h(p,b)}function h(p,b){const g=b[b.length-1],v=o[c][0],x=o[c][1];let E=0;const S=g.children.indexOf(p);let _=!1,A=[];v.lastIndex=0;let T=v.exec(p.value);for(;T;){const D=T.index,B={index:T.index,input:T.input,stack:[...b,p]};let M=x(...T,B);if(typeof M=="string"&&(M=M.length>0?{type:"text",value:M}:void 0),M===!1?v.lastIndex=D+1:(E!==D&&A.push({type:"text",value:p.value.slice(E,D)}),Array.isArray(M)?A.push(...M):M&&A.push(M),E=D+T[0].length,_=!0),!v.global)break;T=v.exec(p.value)}return _?(E<p.value.length&&A.push({type:"text",value:p.value.slice(E)}),g.children.splice(S,1,...A)):A=[p],S+A.length}}function D3(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 a=-1;for(;++a<n.length;){const s=n[a];t.push([M3(s[0]),R3(s[1])])}return t}function M3(e){return typeof e=="string"?new RegExp(j3(e),"g"):e}function R3(e){return typeof e=="function"?e:function(){return e}}const Pp="phrasing",Up=["autolink","link","image","label"];function L3(){return{transforms:[q3],enter:{literalAutolink:z3,literalAutolinkEmail:Fp,literalAutolinkHttp:Fp,literalAutolinkWww:Fp},exit:{literalAutolink:F3,literalAutolinkEmail:U3,literalAutolinkHttp:B3,literalAutolinkWww:P3}}}function I3(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Pp,notInConstruct:Up},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Pp,notInConstruct:Up},{character:":",before:"[ps]",after:"\\/",inConstruct:Pp,notInConstruct:Up}]}}function z3(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Fp(e){this.config.enter.autolinkProtocol.call(this,e)}function B3(e){this.config.exit.autolinkProtocol.call(this,e)}function P3(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 U3(e){this.config.exit.autolinkEmail.call(this,e)}function F3(e){this.exit(e)}function q3(e){O3(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,$3],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),H3]],{ignore:["link","linkReference"]})}function $3(e,t,n,a,s){let o="";if(!r1(s)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!K3(n)))return!1;const c=G3(n+a);if(!c[0])return!1;const d={type:"link",title:null,url:o+t+c[0],children:[{type:"text",value:t+c[0]}]};return c[1]?[d,{type:"text",value:c[1]}]:d}function H3(e,t,n,a){return!r1(a,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function K3(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 G3(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],a=n.indexOf(")");const s=Kw(e,"(");let o=Kw(e,")");for(;a!==-1&&s>o;)e+=n.slice(0,a+1),n=n.slice(a+1),a=n.indexOf(")"),o++;return[e,n]}function r1(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||hs(n)||Jd(n))&&(!t||n!==47)}s1.peek=tI;function Q3(){this.buffer()}function Y3(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function V3(){this.buffer()}function W3(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function X3(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ii(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Z3(e){this.exit(e)}function J3(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ii(this.sliceSerialize(e)).toLowerCase(),n.label=t}function eI(e){this.exit(e)}function tI(){return"["}function s1(e,t,n,a){const s=n.createTracker(a);let o=s.move("[^");const c=n.enter("footnoteReference"),d=n.enter("reference");return o+=s.move(n.safe(n.associationId(e),{after:"]",before:o})),d(),c(),o+=s.move("]"),o}function nI(){return{enter:{gfmFootnoteCallString:Q3,gfmFootnoteCall:Y3,gfmFootnoteDefinitionLabelString:V3,gfmFootnoteDefinition:W3},exit:{gfmFootnoteCallString:X3,gfmFootnoteCall:Z3,gfmFootnoteDefinitionLabelString:J3,gfmFootnoteDefinition:eI}}}function iI(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:s1},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(a,s,o,c){const d=o.createTracker(c);let h=d.move("[^");const p=o.enter("footnoteDefinition"),b=o.enter("label");return h+=d.move(o.safe(o.associationId(a),{before:h,after:"]"})),b(),h+=d.move("]:"),a.children&&a.children.length>0&&(d.shift(4),h+=d.move((t?`
535
- `:" ")+o.indentLines(o.containerFlow(a,d.current()),t?l1:aI))),p(),h}}function aI(e,t,n){return t===0?e:l1(e,t,n)}function l1(e,t,n){return(n?"":" ")+e}const rI=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];o1.peek=uI;function sI(){return{canContainEols:["delete"],enter:{strikethrough:oI},exit:{strikethrough:cI}}}function lI(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:rI}],handlers:{delete:o1}}}function oI(e){this.enter({type:"delete",children:[]},e)}function cI(e){this.exit(e)}function o1(e,t,n,a){const s=n.createTracker(a),o=n.enter("strikethrough");let c=s.move("~~");return c+=n.containerPhrasing(e,{...s.current(),before:c,after:"~"}),c+=s.move("~~"),o(),c}function uI(){return"~"}function dI(e){return e.length}function fI(e,t){const n=t||{},a=(n.align||[]).concat(),s=n.stringLength||dI,o=[],c=[],d=[],h=[];let p=0,b=-1;for(;++b<e.length;){const w=[],S=[];let _=-1;for(e[b].length>p&&(p=e[b].length);++_<e[b].length;){const A=hI(e[b][_]);if(n.alignDelimiters!==!1){const T=s(A);S[_]=T,(h[_]===void 0||T>h[_])&&(h[_]=T)}w.push(A)}c[b]=w,d[b]=S}let g=-1;if(typeof a=="object"&&"length"in a)for(;++g<p;)o[g]=Gw(a[g]);else{const w=Gw(a);for(;++g<p;)o[g]=w}g=-1;const v=[],x=[];for(;++g<p;){const w=o[g];let S="",_="";w===99?(S=":",_=":"):w===108?S=":":w===114&&(_=":");let A=n.alignDelimiters===!1?1:Math.max(1,h[g]-S.length-_.length);const T=S+"-".repeat(A)+_;n.alignDelimiters!==!1&&(A=S.length+A+_.length,A>h[g]&&(h[g]=A),x[g]=A),v[g]=T}c.splice(1,0,v),d.splice(1,0,x),b=-1;const E=[];for(;++b<c.length;){const w=c[b],S=d[b];g=-1;const _=[];for(;++g<p;){const A=w[g]||"";let T="",D="";if(n.alignDelimiters!==!1){const B=h[g]-(S[g]||0),M=o[g];M===114?T=" ".repeat(B):M===99?B%2?(T=" ".repeat(B/2+.5),D=" ".repeat(B/2-.5)):(T=" ".repeat(B/2),D=T):D=" ".repeat(B)}n.delimiterStart!==!1&&!g&&_.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&A==="")&&(n.delimiterStart!==!1||g)&&_.push(" "),n.alignDelimiters!==!1&&_.push(T),_.push(A),n.alignDelimiters!==!1&&_.push(D),n.padding!==!1&&_.push(" "),(n.delimiterEnd!==!1||g!==p-1)&&_.push("|")}E.push(n.delimiterEnd===!1?_.join("").replace(/ +$/,""):_.join(""))}return E.join(`
536
- `)}function hI(e){return e==null?"":String(e)}function Gw(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 pI(e,t,n,a){const s=n.enter("blockquote"),o=n.createTracker(a);o.move("> "),o.shift(2);const c=n.indentLines(n.containerFlow(e,o.current()),mI);return s(),c}function mI(e,t,n){return">"+(n?"":" ")+e}function gI(e,t){return Qw(e,t.inConstruct,!0)&&!Qw(e,t.notInConstruct,!1)}function Qw(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let a=-1;for(;++a<t.length;)if(e.includes(t[a]))return!0;return!1}function Yw(e,t,n,a){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
537
- `&&gI(n.stack,n.unsafe[s]))return/[ \t]/.test(a.before)?"":" ";return`\\
538
- `}function bI(e,t){const n=String(e);let a=n.indexOf(t),s=a,o=0,c=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;a!==-1;)a===s?++o>c&&(c=o):o=1,s=a+t.length,a=n.indexOf(t,s);return c}function yI(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 xI(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 vI(e,t,n,a){const s=xI(n),o=e.value||"",c=s==="`"?"GraveAccent":"Tilde";if(yI(e,n)){const g=n.enter("codeIndented"),v=n.indentLines(o,wI);return g(),v}const d=n.createTracker(a),h=s.repeat(Math.max(bI(o,s)+1,3)),p=n.enter("codeFenced");let b=d.move(h);if(e.lang){const g=n.enter(`codeFencedLang${c}`);b+=d.move(n.safe(e.lang,{before:b,after:" ",encode:["`"],...d.current()})),g()}if(e.lang&&e.meta){const g=n.enter(`codeFencedMeta${c}`);b+=d.move(" "),b+=d.move(n.safe(e.meta,{before:b,after:`
539
- `,encode:["`"],...d.current()})),g()}return b+=d.move(`
540
- `),o&&(b+=d.move(o+`
541
- `)),b+=d.move(h),p(),b}function wI(e,t,n){return(n?"":" ")+e}function Mg(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 kI(e,t,n,a){const s=Mg(n),o=s==='"'?"Quote":"Apostrophe",c=n.enter("definition");let d=n.enter("label");const h=n.createTracker(a);let p=h.move("[");return p+=h.move(n.safe(n.associationId(e),{before:p,after:"]",...h.current()})),p+=h.move("]: "),d(),!e.url||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),p+=h.move("<"),p+=h.move(n.safe(e.url,{before:p,after:">",...h.current()})),p+=h.move(">")):(d=n.enter("destinationRaw"),p+=h.move(n.safe(e.url,{before:p,after:e.title?" ":`
542
- `,...h.current()}))),d(),e.title&&(d=n.enter(`title${o}`),p+=h.move(" "+s),p+=h.move(n.safe(e.title,{before:p,after:s,...h.current()})),p+=h.move(s),d()),c(),p}function EI(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 hc(e){return"&#x"+e.toString(16).toUpperCase()+";"}function jd(e,t,n){const a=Dl(e),s=Dl(t);return a===void 0?s===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:a===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}c1.peek=SI;function c1(e,t,n,a){const s=EI(n),o=n.enter("emphasis"),c=n.createTracker(a),d=c.move(s);let h=c.move(n.containerPhrasing(e,{after:s,before:d,...c.current()}));const p=h.charCodeAt(0),b=jd(a.before.charCodeAt(a.before.length-1),p,s);b.inside&&(h=hc(p)+h.slice(1));const g=h.charCodeAt(h.length-1),v=jd(a.after.charCodeAt(0),g,s);v.inside&&(h=h.slice(0,-1)+hc(g));const x=c.move(s);return o(),n.attentionEncodeSurroundingInfo={after:v.outside,before:b.outside},d+h+x}function SI(e,t,n){return n.options.emphasis||"*"}function _I(e,t){let n=!1;return af(e,function(a){if("value"in a&&/\r?\n|\r/.test(a.value)||a.type==="break")return n=!0,Tm}),!!((!e.depth||e.depth<3)&&Sg(e)&&(t.options.setext||n))}function NI(e,t,n,a){const s=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(a);if(_I(e,n)){const b=n.enter("headingSetext"),g=n.enter("phrasing"),v=n.containerPhrasing(e,{...o.current(),before:`
543
- `,after:`
544
- `});return g(),b(),v+`
545
- `+(s===1?"=":"-").repeat(v.length-(Math.max(v.lastIndexOf("\r"),v.lastIndexOf(`
546
- `))+1))}const c="#".repeat(s),d=n.enter("headingAtx"),h=n.enter("phrasing");o.move(c+" ");let p=n.containerPhrasing(e,{before:"# ",after:`
547
- `,...o.current()});return/^[\t ]/.test(p)&&(p=hc(p.charCodeAt(0))+p.slice(1)),p=p?c+" "+p:c,n.options.closeAtx&&(p+=" "+c),h(),d(),p}u1.peek=CI;function u1(e){return e.value||""}function CI(){return"<"}d1.peek=TI;function d1(e,t,n,a){const s=Mg(n),o=s==='"'?"Quote":"Apostrophe",c=n.enter("image");let d=n.enter("label");const h=n.createTracker(a);let p=h.move("![");return p+=h.move(n.safe(e.alt,{before:p,after:"]",...h.current()})),p+=h.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),p+=h.move("<"),p+=h.move(n.safe(e.url,{before:p,after:">",...h.current()})),p+=h.move(">")):(d=n.enter("destinationRaw"),p+=h.move(n.safe(e.url,{before:p,after:e.title?" ":")",...h.current()}))),d(),e.title&&(d=n.enter(`title${o}`),p+=h.move(" "+s),p+=h.move(n.safe(e.title,{before:p,after:s,...h.current()})),p+=h.move(s),d()),p+=h.move(")"),c(),p}function TI(){return"!"}f1.peek=AI;function f1(e,t,n,a){const s=e.referenceType,o=n.enter("imageReference");let c=n.enter("label");const d=n.createTracker(a);let h=d.move("![");const p=n.safe(e.alt,{before:h,after:"]",...d.current()});h+=d.move(p+"]["),c();const b=n.stack;n.stack=[],c=n.enter("reference");const g=n.safe(n.associationId(e),{before:h,after:"]",...d.current()});return c(),n.stack=b,o(),s==="full"||!p||p!==g?h+=d.move(g+"]"):s==="shortcut"?h=h.slice(0,-1):h+=d.move("]"),h}function AI(){return"!"}h1.peek=jI;function h1(e,t,n){let a=e.value||"",s="`",o=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(a);)s+="`";for(/[^ \r\n]/.test(a)&&(/^[ \r\n]/.test(a)&&/[ \r\n]$/.test(a)||/^`|`$/.test(a))&&(a=" "+a+" ");++o<n.unsafe.length;){const c=n.unsafe[o],d=n.compilePattern(c);let h;if(c.atBreak)for(;h=d.exec(a);){let p=h.index;a.charCodeAt(p)===10&&a.charCodeAt(p-1)===13&&p--,a=a.slice(0,p)+" "+a.slice(h.index+1)}}return s+a+s}function jI(){return"`"}function p1(e,t){const n=Sg(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))}m1.peek=OI;function m1(e,t,n,a){const s=Mg(n),o=s==='"'?"Quote":"Apostrophe",c=n.createTracker(a);let d,h;if(p1(e,n)){const b=n.stack;n.stack=[],d=n.enter("autolink");let g=c.move("<");return g+=c.move(n.containerPhrasing(e,{before:g,after:">",...c.current()})),g+=c.move(">"),d(),n.stack=b,g}d=n.enter("link"),h=n.enter("label");let p=c.move("[");return p+=c.move(n.containerPhrasing(e,{before:p,after:"](",...c.current()})),p+=c.move("]("),h(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(h=n.enter("destinationLiteral"),p+=c.move("<"),p+=c.move(n.safe(e.url,{before:p,after:">",...c.current()})),p+=c.move(">")):(h=n.enter("destinationRaw"),p+=c.move(n.safe(e.url,{before:p,after:e.title?" ":")",...c.current()}))),h(),e.title&&(h=n.enter(`title${o}`),p+=c.move(" "+s),p+=c.move(n.safe(e.title,{before:p,after:s,...c.current()})),p+=c.move(s),h()),p+=c.move(")"),d(),p}function OI(e,t,n){return p1(e,n)?"<":"["}g1.peek=DI;function g1(e,t,n,a){const s=e.referenceType,o=n.enter("linkReference");let c=n.enter("label");const d=n.createTracker(a);let h=d.move("[");const p=n.containerPhrasing(e,{before:h,after:"]",...d.current()});h+=d.move(p+"]["),c();const b=n.stack;n.stack=[],c=n.enter("reference");const g=n.safe(n.associationId(e),{before:h,after:"]",...d.current()});return c(),n.stack=b,o(),s==="full"||!p||p!==g?h+=d.move(g+"]"):s==="shortcut"?h=h.slice(0,-1):h+=d.move("]"),h}function DI(){return"["}function Rg(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 MI(e){const t=Rg(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 RI(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 b1(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 LI(e,t,n,a){const s=n.enter("list"),o=n.bulletCurrent;let c=e.ordered?RI(n):Rg(n);const d=e.ordered?c==="."?")":".":MI(n);let h=t&&n.bulletLastUsed?c===n.bulletLastUsed:!1;if(!e.ordered){const b=e.children?e.children[0]:void 0;if((c==="*"||c==="-")&&b&&(!b.children||!b.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&&(h=!0),b1(n)===c&&b){let g=-1;for(;++g<e.children.length;){const v=e.children[g];if(v&&v.type==="listItem"&&v.children&&v.children[0]&&v.children[0].type==="thematicBreak"){h=!0;break}}}}h&&(c=d),n.bulletCurrent=c;const p=n.containerFlow(e,a);return n.bulletLastUsed=c,n.bulletCurrent=o,s(),p}function II(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 zI(e,t,n,a){const s=II(n);let o=n.bulletCurrent||Rg(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 c=o.length+1;(s==="tab"||s==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(c=Math.ceil(c/4)*4);const d=n.createTracker(a);d.move(o+" ".repeat(c-o.length)),d.shift(c);const h=n.enter("listItem"),p=n.indentLines(n.containerFlow(e,d.current()),b);return h(),p;function b(g,v,x){return v?(x?"":" ".repeat(c))+g:(x?o:o+" ".repeat(c-o.length))+g}}function BI(e,t,n,a){const s=n.enter("paragraph"),o=n.enter("phrasing"),c=n.containerPhrasing(e,a);return o(),s(),c}const PI=Tc(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function UI(e,t,n,a){return(e.children.some(function(c){return PI(c)})?n.containerPhrasing:n.containerFlow).call(n,e,a)}function FI(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}y1.peek=qI;function y1(e,t,n,a){const s=FI(n),o=n.enter("strong"),c=n.createTracker(a),d=c.move(s+s);let h=c.move(n.containerPhrasing(e,{after:s,before:d,...c.current()}));const p=h.charCodeAt(0),b=jd(a.before.charCodeAt(a.before.length-1),p,s);b.inside&&(h=hc(p)+h.slice(1));const g=h.charCodeAt(h.length-1),v=jd(a.after.charCodeAt(0),g,s);v.inside&&(h=h.slice(0,-1)+hc(g));const x=c.move(s+s);return o(),n.attentionEncodeSurroundingInfo={after:v.outside,before:b.outside},d+h+x}function qI(e,t,n){return n.options.strong||"*"}function $I(e,t,n,a){return n.safe(e.value,a)}function HI(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 KI(e,t,n){const a=(b1(n)+(n.options.ruleSpaces?" ":"")).repeat(HI(n));return n.options.ruleSpaces?a.slice(0,-1):a}const x1={blockquote:pI,break:Yw,code:vI,definition:kI,emphasis:c1,hardBreak:Yw,heading:NI,html:u1,image:d1,imageReference:f1,inlineCode:h1,link:m1,linkReference:g1,list:LI,listItem:zI,paragraph:BI,root:UI,strong:y1,text:$I,thematicBreak:KI};function GI(){return{enter:{table:QI,tableData:Vw,tableHeader:Vw,tableRow:VI},exit:{codeText:WI,table:YI,tableData:qp,tableHeader:qp,tableRow:qp}}}function QI(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 YI(e){this.exit(e),this.data.inTable=void 0}function VI(e){this.enter({type:"tableRow",children:[]},e)}function qp(e){this.exit(e)}function Vw(e){this.enter({type:"tableCell",children:[]},e)}function WI(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,XI));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function XI(e,t){return t==="|"?t:e}function ZI(e){const t=e||{},n=t.tableCellPadding,a=t.tablePipeAlign,s=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
548
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:v,table:c,tableCell:h,tableRow:d}};function c(x,E,w,S){return p(b(x,w,S),x.align)}function d(x,E,w,S){const _=g(x,w,S),A=p([_]);return A.slice(0,A.indexOf(`
549
- `))}function h(x,E,w,S){const _=w.enter("tableCell"),A=w.enter("phrasing"),T=w.containerPhrasing(x,{...S,before:o,after:o});return A(),_(),T}function p(x,E){return fI(x,{align:E,alignDelimiters:a,padding:n,stringLength:s})}function b(x,E,w){const S=x.children;let _=-1;const A=[],T=E.enter("table");for(;++_<S.length;)A[_]=g(S[_],E,w);return T(),A}function g(x,E,w){const S=x.children;let _=-1;const A=[],T=E.enter("tableRow");for(;++_<S.length;)A[_]=h(S[_],x,E,w);return T(),A}function v(x,E,w){let S=x1.inlineCode(x,E,w);return w.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}function JI(){return{exit:{taskListCheckValueChecked:Ww,taskListCheckValueUnchecked:Ww,paragraph:tz}}}function ez(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:nz}}}function Ww(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function tz(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 a=n.children[0];if(a&&a.type==="text"){const s=t.children;let o=-1,c;for(;++o<s.length;){const d=s[o];if(d.type==="paragraph"){c=d;break}}c===n&&(a.value=a.value.slice(1),a.value.length===0?n.children.shift():n.position&&a.position&&typeof a.position.start.offset=="number"&&(a.position.start.column++,a.position.start.offset++,n.position.start=Object.assign({},a.position.start)))}}this.exit(e)}function nz(e,t,n,a){const s=e.children[0],o=typeof e.checked=="boolean"&&s&&s.type==="paragraph",c="["+(e.checked?"x":" ")+"] ",d=n.createTracker(a);o&&d.move(c);let h=x1.listItem(e,t,n,{...a,...d.current()});return o&&(h=h.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,p)),h;function p(b){return b+c}}function iz(){return[L3(),nI(),sI(),GI(),JI()]}function az(e){return{extensions:[I3(),iI(e),lI(),ZI(e),ez()]}}const rz={tokenize:dz,partial:!0},v1={tokenize:fz,partial:!0},w1={tokenize:hz,partial:!0},k1={tokenize:pz,partial:!0},sz={tokenize:mz,partial:!0},E1={name:"wwwAutolink",tokenize:cz,previous:_1},S1={name:"protocolAutolink",tokenize:uz,previous:N1},Da={name:"emailAutolink",tokenize:oz,previous:C1},ta={};function lz(){return{text:ta}}let Xr=48;for(;Xr<123;)ta[Xr]=Da,Xr++,Xr===58?Xr=65:Xr===91&&(Xr=97);ta[43]=Da;ta[45]=Da;ta[46]=Da;ta[95]=Da;ta[72]=[Da,S1];ta[104]=[Da,S1];ta[87]=[Da,E1];ta[119]=[Da,E1];function oz(e,t,n){const a=this;let s,o;return c;function c(g){return!Dm(g)||!C1.call(a,a.previous)||Lg(a.events)?n(g):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),d(g))}function d(g){return Dm(g)?(e.consume(g),d):g===64?(e.consume(g),h):n(g)}function h(g){return g===46?e.check(sz,b,p)(g):g===45||g===95||wn(g)?(o=!0,e.consume(g),h):b(g)}function p(g){return e.consume(g),s=!0,h}function b(g){return o&&s&&Rn(a.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(g)):n(g)}}function cz(e,t,n){const a=this;return s;function s(c){return c!==87&&c!==119||!_1.call(a,a.previous)||Lg(a.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(rz,e.attempt(v1,e.attempt(w1,o),n),n)(c))}function o(c){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(c)}}function uz(e,t,n){const a=this;let s="",o=!1;return c;function c(g){return(g===72||g===104)&&N1.call(a,a.previous)&&!Lg(a.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(g),e.consume(g),d):n(g)}function d(g){if(Rn(g)&&s.length<5)return s+=String.fromCodePoint(g),e.consume(g),d;if(g===58){const v=s.toLowerCase();if(v==="http"||v==="https")return e.consume(g),h}return n(g)}function h(g){return g===47?(e.consume(g),o?p:(o=!0,h)):n(g)}function p(g){return g===null||Cd(g)||kt(g)||hs(g)||Jd(g)?n(g):e.attempt(v1,e.attempt(w1,b),n)(g)}function b(g){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(g)}}function dz(e,t,n){let a=0;return s;function s(c){return(c===87||c===119)&&a<3?(a++,e.consume(c),s):c===46&&a===3?(e.consume(c),o):n(c)}function o(c){return c===null?n(c):t(c)}}function fz(e,t,n){let a,s,o;return c;function c(p){return p===46||p===95?e.check(k1,h,d)(p):p===null||kt(p)||hs(p)||p!==45&&Jd(p)?h(p):(o=!0,e.consume(p),c)}function d(p){return p===95?a=!0:(s=a,a=void 0),e.consume(p),c}function h(p){return s||a||!o?n(p):t(p)}}function hz(e,t){let n=0,a=0;return s;function s(c){return c===40?(n++,e.consume(c),s):c===41&&a<n?o(c):c===33||c===34||c===38||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===60||c===63||c===93||c===95||c===126?e.check(k1,t,o)(c):c===null||kt(c)||hs(c)?t(c):(e.consume(c),s)}function o(c){return c===41&&a++,e.consume(c),s}}function pz(e,t,n){return a;function a(d){return d===33||d===34||d===39||d===41||d===42||d===44||d===46||d===58||d===59||d===63||d===95||d===126?(e.consume(d),a):d===38?(e.consume(d),o):d===93?(e.consume(d),s):d===60||d===null||kt(d)||hs(d)?t(d):n(d)}function s(d){return d===null||d===40||d===91||kt(d)||hs(d)?t(d):a(d)}function o(d){return Rn(d)?c(d):n(d)}function c(d){return d===59?(e.consume(d),a):Rn(d)?(e.consume(d),c):n(d)}}function mz(e,t,n){return a;function a(o){return e.consume(o),s}function s(o){return wn(o)?n(o):t(o)}}function _1(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||kt(e)}function N1(e){return!Rn(e)}function C1(e){return!(e===47||Dm(e))}function Dm(e){return e===43||e===45||e===46||e===95||wn(e)}function Lg(e){let t=e.length,n=!1;for(;t--;){const a=e[t][1];if((a.type==="labelLink"||a.type==="labelImage")&&!a._balanced){n=!0;break}if(a._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const gz={tokenize:Sz,partial:!0};function bz(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:wz,continuation:{tokenize:kz},exit:Ez}},text:{91:{name:"gfmFootnoteCall",tokenize:vz},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:yz,resolveTo:xz}}}}function yz(e,t,n){const a=this;let s=a.events.length;const o=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let c;for(;s--;){const h=a.events[s][1];if(h.type==="labelImage"){c=h;break}if(h.type==="gfmFootnoteCall"||h.type==="labelLink"||h.type==="label"||h.type==="image"||h.type==="link")break}return d;function d(h){if(!c||!c._balanced)return n(h);const p=Ii(a.sliceSerialize({start:c.end,end:a.now()}));return p.codePointAt(0)!==94||!o.includes(p.slice(1))?n(h):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),t(h))}}function xz(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 a={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},d=[e[n+1],e[n+2],["enter",a,t],e[n+3],e[n+4],["enter",s,t],["exit",s,t],["enter",o,t],["enter",c,t],["exit",c,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",a,t]];return e.splice(n,e.length-n+1,...d),e}function vz(e,t,n){const a=this,s=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let o=0,c;return d;function d(g){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),h}function h(g){return g!==94?n(g):(e.enter("gfmFootnoteCallMarker"),e.consume(g),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",p)}function p(g){if(o>999||g===93&&!c||g===null||g===91||kt(g))return n(g);if(g===93){e.exit("chunkString");const v=e.exit("gfmFootnoteCallString");return s.includes(Ii(a.sliceSerialize(v)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(g)}return kt(g)||(c=!0),o++,e.consume(g),g===92?b:p}function b(g){return g===91||g===92||g===93?(e.consume(g),o++,p):p(g)}}function wz(e,t,n){const a=this,s=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let o,c=0,d;return h;function h(E){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionLabelMarker"),p}function p(E){return E===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",b):n(E)}function b(E){if(c>999||E===93&&!d||E===null||E===91||kt(E))return n(E);if(E===93){e.exit("chunkString");const w=e.exit("gfmFootnoteDefinitionLabelString");return o=Ii(a.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),v}return kt(E)||(d=!0),c++,e.consume(E),E===92?g:b}function g(E){return E===91||E===92||E===93?(e.consume(E),c++,b):b(E)}function v(E){return E===58?(e.enter("definitionMarker"),e.consume(E),e.exit("definitionMarker"),s.includes(o)||s.push(o),at(e,x,"gfmFootnoteDefinitionWhitespace")):n(E)}function x(E){return t(E)}}function kz(e,t,n){return e.check(Cc,t,e.attempt(gz,t,n))}function Ez(e){e.exit("gfmFootnoteDefinition")}function Sz(e,t,n){const a=this;return at(e,s,"gfmFootnoteDefinitionIndent",5);function s(o){const c=a.events[a.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?t(o):n(o)}}function _z(e){let n=(e||{}).singleTilde;const a={name:"strikethrough",tokenize:o,resolveAll:s};return n==null&&(n=!0),{text:{126:a},insideSpan:{null:[a]},attentionMarkers:{null:[126]}};function s(c,d){let h=-1;for(;++h<c.length;)if(c[h][0]==="enter"&&c[h][1].type==="strikethroughSequenceTemporary"&&c[h][1]._close){let p=h;for(;p--;)if(c[p][0]==="exit"&&c[p][1].type==="strikethroughSequenceTemporary"&&c[p][1]._open&&c[h][1].end.offset-c[h][1].start.offset===c[p][1].end.offset-c[p][1].start.offset){c[h][1].type="strikethroughSequence",c[p][1].type="strikethroughSequence";const b={type:"strikethrough",start:Object.assign({},c[p][1].start),end:Object.assign({},c[h][1].end)},g={type:"strikethroughText",start:Object.assign({},c[p][1].end),end:Object.assign({},c[h][1].start)},v=[["enter",b,d],["enter",c[p][1],d],["exit",c[p][1],d],["enter",g,d]],x=d.parser.constructs.insideSpan.null;x&&li(v,v.length,0,ef(x,c.slice(p+1,h),d)),li(v,v.length,0,[["exit",g,d],["enter",c[h][1],d],["exit",c[h][1],d],["exit",b,d]]),li(c,p-1,h-p+3,v),h=p+v.length-2;break}}for(h=-1;++h<c.length;)c[h][1].type==="strikethroughSequenceTemporary"&&(c[h][1].type="data");return c}function o(c,d,h){const p=this.previous,b=this.events;let g=0;return v;function v(E){return p===126&&b[b.length-1][1].type!=="characterEscape"?h(E):(c.enter("strikethroughSequenceTemporary"),x(E))}function x(E){const w=Dl(p);if(E===126)return g>1?h(E):(c.consume(E),g++,x);if(g<2&&!n)return h(E);const S=c.exit("strikethroughSequenceTemporary"),_=Dl(E);return S._open=!_||_===2&&!!w,S._close=!w||w===2&&!!_,d(E)}}}class Nz{constructor(){this.map=[]}add(t,n,a){Cz(this,t,n,a)}consume(t){if(this.map.sort(function(o,c){return o[0]-c[0]}),this.map.length===0)return;let n=this.map.length;const a=[];for(;n>0;)n-=1,a.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];a.push(t.slice()),t.length=0;let s=a.pop();for(;s;){for(const o of s)t.push(o);s=a.pop()}this.map.length=0}}function Cz(e,t,n,a){let s=0;if(!(n===0&&a.length===0)){for(;s<e.map.length;){if(e.map[s][0]===t){e.map[s][1]+=n,e.map[s][2].push(...a);return}s+=1}e.map.push([t,n,a])}}function Tz(e,t){let n=!1;const a=[];for(;t<e.length;){const s=e[t];if(n){if(s[0]==="enter")s[1].type==="tableContent"&&a.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=a.length-1;a[o]=a[o]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return a}function Az(){return{flow:{null:{name:"table",tokenize:jz,resolveAll:Oz}}}}function jz(e,t,n){const a=this;let s=0,o=0,c;return d;function d(P){let X=a.events.length-1;for(;X>-1;){const ue=a.events[X][1].type;if(ue==="lineEnding"||ue==="linePrefix")X--;else break}const J=X>-1?a.events[X][1].type:null,pe=J==="tableHead"||J==="tableRow"?M:h;return pe===M&&a.parser.lazy[a.now().line]?n(P):pe(P)}function h(P){return e.enter("tableHead"),e.enter("tableRow"),p(P)}function p(P){return P===124||(c=!0,o+=1),b(P)}function b(P){return P===null?n(P):De(P)?o>1?(o=0,a.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),x):n(P):Xe(P)?at(e,b,"whitespace")(P):(o+=1,c&&(c=!1,s+=1),P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),c=!0,b):(e.enter("data"),g(P)))}function g(P){return P===null||P===124||kt(P)?(e.exit("data"),b(P)):(e.consume(P),P===92?v:g)}function v(P){return P===92||P===124?(e.consume(P),g):g(P)}function x(P){return a.interrupt=!1,a.parser.lazy[a.now().line]?n(P):(e.enter("tableDelimiterRow"),c=!1,Xe(P)?at(e,E,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):E(P))}function E(P){return P===45||P===58?S(P):P===124?(c=!0,e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),w):B(P)}function w(P){return Xe(P)?at(e,S,"whitespace")(P):S(P)}function S(P){return P===58?(o+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),_):P===45?(o+=1,_(P)):P===null||De(P)?D(P):B(P)}function _(P){return P===45?(e.enter("tableDelimiterFiller"),A(P)):B(P)}function A(P){return P===45?(e.consume(P),A):P===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),T):(e.exit("tableDelimiterFiller"),T(P))}function T(P){return Xe(P)?at(e,D,"whitespace")(P):D(P)}function D(P){return P===124?E(P):P===null||De(P)?!c||s!==o?B(P):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(P)):B(P)}function B(P){return n(P)}function M(P){return e.enter("tableRow"),q(P)}function q(P){return P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),q):P===null||De(P)?(e.exit("tableRow"),t(P)):Xe(P)?at(e,q,"whitespace")(P):(e.enter("data"),F(P))}function F(P){return P===null||P===124||kt(P)?(e.exit("data"),q(P)):(e.consume(P),P===92?ee:F)}function ee(P){return P===92||P===124?(e.consume(P),F):F(P)}}function Oz(e,t){let n=-1,a=!0,s=0,o=[0,0,0,0],c=[0,0,0,0],d=!1,h=0,p,b,g;const v=new Nz;for(;++n<e.length;){const x=e[n],E=x[1];x[0]==="enter"?E.type==="tableHead"?(d=!1,h!==0&&(Xw(v,t,h,p,b),b=void 0,h=0),p={type:"table",start:Object.assign({},E.start),end:Object.assign({},E.end)},v.add(n,0,[["enter",p,t]])):E.type==="tableRow"||E.type==="tableDelimiterRow"?(a=!0,g=void 0,o=[0,0,0,0],c=[0,n+1,0,0],d&&(d=!1,b={type:"tableBody",start:Object.assign({},E.start),end:Object.assign({},E.end)},v.add(n,0,[["enter",b,t]])),s=E.type==="tableDelimiterRow"?2:b?3:1):s&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")?(a=!1,c[2]===0&&(o[1]!==0&&(c[0]=c[1],g=ad(v,t,o,s,void 0,g),o=[0,0,0,0]),c[2]=n)):E.type==="tableCellDivider"&&(a?a=!1:(o[1]!==0&&(c[0]=c[1],g=ad(v,t,o,s,void 0,g)),o=c,c=[o[1],n,0,0])):E.type==="tableHead"?(d=!0,h=n):E.type==="tableRow"||E.type==="tableDelimiterRow"?(h=n,o[1]!==0?(c[0]=c[1],g=ad(v,t,o,s,n,g)):c[1]!==0&&(g=ad(v,t,c,s,n,g)),s=0):s&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")&&(c[3]=n)}for(h!==0&&Xw(v,t,h,p,b),v.consume(t.events),n=-1;++n<t.events.length;){const x=t.events[n];x[0]==="enter"&&x[1].type==="table"&&(x[1]._align=Tz(t.events,n))}return e}function ad(e,t,n,a,s,o){const c=a===1?"tableHeader":a===2?"tableDelimiter":"tableData",d="tableContent";n[0]!==0&&(o.end=Object.assign({},ol(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const h=ol(t.events,n[1]);if(o={type:c,start:Object.assign({},h),end:Object.assign({},h)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const p=ol(t.events,n[2]),b=ol(t.events,n[3]),g={type:d,start:Object.assign({},p),end:Object.assign({},b)};if(e.add(n[2],0,[["enter",g,t]]),a!==2){const v=t.events[n[2]],x=t.events[n[3]];if(v[1].end=Object.assign({},x[1].end),v[1].type="chunkText",v[1].contentType="text",n[3]>n[2]+1){const E=n[2]+1,w=n[3]-n[2]-1;e.add(E,w,[])}}e.add(n[3]+1,0,[["exit",g,t]])}return s!==void 0&&(o.end=Object.assign({},ol(t.events,s)),e.add(s,0,[["exit",o,t]]),o=void 0),o}function Xw(e,t,n,a,s){const o=[],c=ol(t.events,n);s&&(s.end=Object.assign({},c),o.push(["exit",s,t])),a.end=Object.assign({},c),o.push(["exit",a,t]),e.add(n+1,0,o)}function ol(e,t){const n=e[t],a=n[0]==="enter"?"start":"end";return n[1][a]}const Dz={name:"tasklistCheck",tokenize:Rz};function Mz(){return{text:{91:Dz}}}function Rz(e,t,n){const a=this;return s;function s(h){return a.previous!==null||!a._gfmTasklistFirstContentOfListItem?n(h):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(h),e.exit("taskListCheckMarker"),o)}function o(h){return kt(h)?(e.enter("taskListCheckValueUnchecked"),e.consume(h),e.exit("taskListCheckValueUnchecked"),c):h===88||h===120?(e.enter("taskListCheckValueChecked"),e.consume(h),e.exit("taskListCheckValueChecked"),c):n(h)}function c(h){return h===93?(e.enter("taskListCheckMarker"),e.consume(h),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),d):n(h)}function d(h){return De(h)?t(h):Xe(h)?e.check({tokenize:Lz},t,n)(h):n(h)}}function Lz(e,t,n){return at(e,a,"whitespace");function a(s){return s===null?n(s):t(s)}}function Iz(e){return BE([lz(),bz(),_z(e),Az(),Mz()])}const zz={};function Ig(e){const t=this,n=e||zz,a=t.data(),s=a.micromarkExtensions||(a.micromarkExtensions=[]),o=a.fromMarkdownExtensions||(a.fromMarkdownExtensions=[]),c=a.toMarkdownExtensions||(a.toMarkdownExtensions=[]);s.push(Iz(n)),o.push(iz()),c.push(az(n))}const Zw=(function(e,t,n){const a=Tc(n);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if(typeof t=="number"){if(t<0||t===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(t=e.children.indexOf(t),t<0)throw new Error("Expected child node or index");for(;++t<e.children.length;)if(a(e.children[t],t,e))return e.children[t]}),ys=(function(e){if(e==null)return Uz;if(typeof e=="string")return Pz(e);if(typeof e=="object")return Bz(e);if(typeof e=="function")return zg(e);throw new Error("Expected function, string, or array as `test`")});function Bz(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ys(e[n]);return zg(a);function a(...s){let o=-1;for(;++o<t.length;)if(t[o].apply(this,s))return!0;return!1}}function Pz(e){return zg(t);function t(n){return n.tagName===e}}function zg(e){return t;function t(n,a,s){return!!(Fz(n)&&e.call(this,n,typeof a=="number"?a:void 0,s||void 0))}}function Uz(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function Fz(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const Jw=/\n/g,e0=/[\t ]+/g,Mm=ys("br"),t0=ys(Vz),qz=ys("p"),n0=ys("tr"),$z=ys(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",Yz,Wz]),T1=ys(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function Hz(e,t){const n=t||{},a="children"in e?e.children:[],s=T1(e),o=O1(e,{whitespace:n.whitespace||"normal"}),c=[];(e.type==="text"||e.type==="comment")&&c.push(...j1(e,{breakBefore:!0,breakAfter:!0}));let d=-1;for(;++d<a.length;)c.push(...A1(a[d],e,{whitespace:o,breakBefore:d?void 0:s,breakAfter:d<a.length-1?Mm(a[d+1]):s}));const h=[];let p;for(d=-1;++d<c.length;){const b=c[d];typeof b=="number"?p!==void 0&&b>p&&(p=b):b&&(p!==void 0&&p>-1&&h.push(`
550
- `.repeat(p)||" "),p=-1,h.push(b))}return h.join("")}function A1(e,t,n){return e.type==="element"?Kz(e,t,n):e.type==="text"?n.whitespace==="normal"?j1(e,n):Gz(e):[]}function Kz(e,t,n){const a=O1(e,n),s=e.children||[];let o=-1,c=[];if($z(e))return c;let d,h;for(Mm(e)||n0(e)&&Zw(t,e,n0)?h=`
551
- `:qz(e)?(d=2,h=2):T1(e)&&(d=1,h=1);++o<s.length;)c=c.concat(A1(s[o],e,{whitespace:a,breakBefore:o?void 0:d,breakAfter:o<s.length-1?Mm(s[o+1]):h}));return t0(e)&&Zw(t,e,t0)&&c.push(" "),d&&c.unshift(d),h&&c.push(h),c}function j1(e,t){const n=String(e.value),a=[],s=[];let o=0;for(;o<=n.length;){Jw.lastIndex=o;const h=Jw.exec(n),p=h&&"index"in h?h.index:n.length;a.push(Qz(n.slice(o,p).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),o===0?t.breakBefore:!0,p===n.length?t.breakAfter:!0)),o=p+1}let c=-1,d;for(;++c<a.length;)a[c].charCodeAt(a[c].length-1)===8203||c<a.length-1&&a[c+1].charCodeAt(0)===8203?(s.push(a[c]),d=void 0):a[c]?(typeof d=="number"&&s.push(d),s.push(a[c]),d=0):(c===0||c===a.length-1)&&s.push(0);return s}function Gz(e){return[String(e.value)]}function Qz(e,t,n){const a=[];let s=0,o;for(;s<e.length;){e0.lastIndex=s;const c=e0.exec(e);o=c?c.index:e.length,!s&&!o&&c&&!t&&a.push(""),s!==o&&a.push(e.slice(s,o)),s=c?o+c[0].length:o}return s!==o&&!n&&a.push(""),a.join(" ")}function O1(e,t){if(e.type==="element"){const n=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return n.wrap?"pre-wrap":"pre";case"td":case"th":return n.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}}return t.whitespace}function Yz(e){return!!(e.properties||{}).hidden}function Vz(e){return e.tagName==="td"||e.tagName==="th"}function Wz(e){return e.tagName==="dialog"&&!(e.properties||{}).open}function Xz(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),a="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",c="(?!struct)("+a+"|"+t.optional(s)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",d={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},p={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},b={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},g={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(p,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},v={className:"title",begin:t.optional(s)+e.IDENT_RE,relevance:0},x=t.optional(s)+e.IDENT_RE+"\\s*\\(",E=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],w=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],S=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],_=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],D={type:w,keyword:E,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:S},B={className:"function.dispatch",relevance:0,keywords:{_hint:_},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},M=[B,g,d,n,e.C_BLOCK_COMMENT_MODE,b,p],q={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:D,contains:M.concat([{begin:/\(/,end:/\)/,keywords:D,contains:M.concat(["self"]),relevance:0}]),relevance:0},F={className:"function",begin:"("+c+"[\\*&\\s]+)+"+x,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:D,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:D,relevance:0},{begin:x,returnBegin:!0,contains:[v],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[p,b]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:D,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,p,b,d,{begin:/\(/,end:/\)/,keywords:D,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,p,b,d]}]},d,n,e.C_BLOCK_COMMENT_MODE,g]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:D,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(q,F,B,M,[g,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:D,contains:["self",d]},{begin:e.IDENT_RE+"::",keywords:D},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function Zz(e){const t={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},n=Xz(e),a=n.keywords;return a.type=[...a.type,...t.type],a.literal=[...a.literal,...t.literal],a.built_in=[...a.built_in,...t.built_in],a._hints=t._hints,n.name="Arduino",n.aliases=["ino"],n.supersetOf="cpp",n}function Jz(e){const t=e.regex,n={},a={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},a]});const s={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},o=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),c={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},d={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,s]};s.contains.push(d);const h={match:/\\"/},p={className:"string",begin:/'/,end:/'/},b={match:/\\'/},g={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},v=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],x=e.SHEBANG({binary:`(${v.join("|")})`,relevance:10}),E={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},w=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],S=["true","false"],_={match:/(\/[a-z._-]+)+/},A=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],T=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],D=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],B=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:w,literal:S,built_in:[...A,...T,"set","shopt",...D,...B]},contains:[x,e.SHEBANG(),E,g,o,c,_,d,h,p,b,n]}}function e4(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),a="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",c="("+a+"|"+t.optional(s)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",d={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},p={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},b={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},g={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(p,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},v={className:"title",begin:t.optional(s)+e.IDENT_RE,relevance:0},x=t.optional(s)+e.IDENT_RE+"\\s*\\(",S={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},_=[g,d,n,e.C_BLOCK_COMMENT_MODE,b,p],A={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:S,contains:_.concat([{begin:/\(/,end:/\)/,keywords:S,contains:_.concat(["self"]),relevance:0}]),relevance:0},T={begin:"("+c+"[\\*&\\s]+)+"+x,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:S,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:S,relevance:0},{begin:x,returnBegin:!0,contains:[e.inherit(v,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:S,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,p,b,d,{begin:/\(/,end:/\)/,keywords:S,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,p,b,d]}]},d,n,e.C_BLOCK_COMMENT_MODE,g]};return{name:"C",aliases:["h"],keywords:S,disableAutodetect:!0,illegal:"</",contains:[].concat(A,T,_,[g,{begin:e.IDENT_RE+"::",keywords:S},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:g,strings:p,keywords:S}}}function t4(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),a="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",c="(?!struct)("+a+"|"+t.optional(s)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",d={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},p={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},b={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},g={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(p,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},v={className:"title",begin:t.optional(s)+e.IDENT_RE,relevance:0},x=t.optional(s)+e.IDENT_RE+"\\s*\\(",E=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],w=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],S=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],_=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],D={type:w,keyword:E,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:S},B={className:"function.dispatch",relevance:0,keywords:{_hint:_},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},M=[B,g,d,n,e.C_BLOCK_COMMENT_MODE,b,p],q={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:D,contains:M.concat([{begin:/\(/,end:/\)/,keywords:D,contains:M.concat(["self"]),relevance:0}]),relevance:0},F={className:"function",begin:"("+c+"[\\*&\\s]+)+"+x,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:D,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:D,relevance:0},{begin:x,returnBegin:!0,contains:[v],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[p,b]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:D,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,p,b,d,{begin:/\(/,end:/\)/,keywords:D,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,p,b,d]}]},d,n,e.C_BLOCK_COMMENT_MODE,g]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:D,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(q,F,B,M,[g,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:D,contains:["self",d]},{begin:e.IDENT_RE+"::",keywords:D},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function n4(e){const t=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],n=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],a=["default","false","null","true"],s=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],o=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],c={keyword:s.concat(o),built_in:t,literal:a},d=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),h={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},p={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},b={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},g=e.inherit(b,{illegal:/\n/}),v={className:"subst",begin:/\{/,end:/\}/,keywords:c},x=e.inherit(v,{illegal:/\n/}),E={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,x]},w={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},v]},S=e.inherit(w,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},x]});v.contains=[w,E,b,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,h,e.C_BLOCK_COMMENT_MODE],x.contains=[S,E,g,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,h,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const _={variants:[p,w,E,b,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},A={begin:"<",end:">",contains:[{beginKeywords:"in out"},d]},T=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",D={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:c,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},_,h,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},d,A,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[d,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[d,A,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+T+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:c,contains:[{beginKeywords:n.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,A],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,relevance:0,contains:[_,h,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},D]}}const i4=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),a4=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],r4=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],s4=[...a4,...r4],l4=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),o4=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),c4=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),u4=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function d4(e){const t=e.regex,n=i4(e),a={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},s="and or not only",o=/@-?\w[\w]*(-\w+)*/,c="[a-zA-Z-][a-zA-Z0-9_-]*",d=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,a,n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+c,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+o4.join("|")+")"},{begin:":(:)?("+c4.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+u4.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...d,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...d,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:o},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:s,attribute:l4.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...d,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+s4.join("|")+")\\b"}]}}function f4(e){const t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function h4(e){const o={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:o,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:o,illegal:/["']/}]}]}}function p4(e){const t=e.regex,n=/[_A-Za-z][_0-9A-Za-z]*/;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:t.concat(n,t.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}function m4(e){const t=e.regex,n={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},a=e.COMMENT();a.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const s={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},o={className:"literal",begin:/\bon|off|true|false|yes|no\b/},c={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},d={begin:/\[/,end:/\]/,contains:[a,o,s,c,n,"self"],relevance:0},h=/[A-Za-z0-9_-]+/,p=/"(\\"|[^"])*"/,b=/'[^']*'/,g=t.either(h,p,b),v=t.concat(g,"(\\s*\\.\\s*",g,")*",t.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[a,{className:"section",begin:/\[+/,end:/\]+/},{begin:v,className:"attr",starts:{end:/$/,contains:[a,d,o,s,c,n]}}]}}var cl="[0-9](_*[0-9])*",rd=`\\.(${cl})`,sd="[0-9a-fA-F](_*[0-9a-fA-F])*",i0={className:"number",variants:[{begin:`(\\b(${cl})((${rd})|\\.)?|(${rd}))[eE][+-]?(${cl})[fFdD]?\\b`},{begin:`\\b(${cl})((${rd})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${rd})[fFdD]?\\b`},{begin:`\\b(${cl})[fFdD]\\b`},{begin:`\\b0[xX]((${sd})\\.?|(${sd})?\\.(${sd}))[pP][+-]?(${cl})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${sd})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function D1(e,t,n){return n===-1?"":e.replace(t,a=>D1(e,t,n-1))}function g4(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",a=n+D1("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),h={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},p={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},b={className:"params",begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:h,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[b,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+a+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:h,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:[p,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,i0,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},i0,p]}}const a0="[A-Za-z$_][0-9A-Za-z$_]*",b4=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],y4=["true","false","null","undefined","NaN","Infinity"],M1=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],R1=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],L1=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],x4=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],v4=[].concat(L1,M1,R1);function w4(e){const t=e.regex,n=(de,{after:re})=>{const O="</"+de[0].slice(1);return de.input.indexOf(O,re)!==-1},a=a0,s={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,c={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(de,re)=>{const O=de[0].length+de.index,R=de.input[O];if(R==="<"||R===","){re.ignoreMatch();return}R===">"&&(n(de,{after:O})||re.ignoreMatch());let Q;const j=de.input.substring(O);if(Q=j.match(/^\s*=/)){re.ignoreMatch();return}if((Q=j.match(/^\s+extends\s+/))&&Q.index===0){re.ignoreMatch();return}}},d={$pattern:a0,keyword:b4,literal:y4,built_in:v4,"variable.language":x4},h="[0-9](_?[0-9])*",p=`\\.(${h})`,b="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",g={className:"number",variants:[{begin:`(\\b(${b})((${p})|\\.)?|(${p}))[eE][+-]?(${h})\\b`},{begin:`\\b(${b})\\b((${p})\\b|\\.)?|(${p})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},v={className:"subst",begin:"\\$\\{",end:"\\}",keywords:d,contains:[]},x={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,v],subLanguage:"xml"}},E={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,v],subLanguage:"css"}},w={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,v],subLanguage:"graphql"}},S={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,v]},A={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:a+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},T=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,x,E,w,S,{match:/\$\d+/},g];v.contains=T.concat({begin:/\{/,end:/\}/,keywords:d,contains:["self"].concat(T)});const D=[].concat(A,v.contains),B=D.concat([{begin:/(\s*)\(/,end:/\)/,keywords:d,contains:["self"].concat(D)}]),M={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:d,contains:B},q={variants:[{match:[/class/,/\s+/,a,/\s+/,/extends/,/\s+/,t.concat(a,"(",t.concat(/\./,a),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,a],scope:{1:"keyword",3:"title.class"}}]},F={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...M1,...R1]}},ee={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},P={variants:[{match:[/function/,/\s+/,a,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[M],illegal:/%/},X={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function J(de){return t.concat("(?!",de.join("|"),")")}const pe={match:t.concat(/\b/,J([...L1,"super","import"].map(de=>`${de}\\s*\\(`)),a,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},ue={begin:t.concat(/\./,t.lookahead(t.concat(a,/(?![0-9A-Za-z$_(])/))),end:a,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},te={match:[/get|set/,/\s+/,a,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},M]},$="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",ce={match:[/const|var|let/,/\s+/,a,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead($)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[M]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:d,exports:{PARAMS_CONTAINS:B,CLASS_REFERENCE:F},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),ee,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,x,E,w,S,A,{match:/\$\d+/},g,F,{scope:"attr",match:a+t.lookahead(":"),relevance:0},ce,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[A,e.REGEXP_MODE,{className:"function",begin:$,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:d,contains:B}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:s.begin,end:s.end},{match:o},{begin:c.begin,"on:begin":c.isTrulyOpeningTag,end:c.end}],subLanguage:"xml",contains:[{begin:c.begin,end:c.end,skip:!0,contains:["self"]}]}]},P,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[M,e.inherit(e.TITLE_MODE,{begin:a,className:"title.function"})]},{match:/\.\.\./,relevance:0},ue,{match:"\\$"+a,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[M]},pe,X,q,te,{match:/\$[(.]/}]}}function k4(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},a=["true","false","null"],s={scope:"literal",beginKeywords:a.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:a},contains:[t,n,e.QUOTE_STRING_MODE,s,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var ul="[0-9](_*[0-9])*",ld=`\\.(${ul})`,od="[0-9a-fA-F](_*[0-9a-fA-F])*",E4={className:"number",variants:[{begin:`(\\b(${ul})((${ld})|\\.)?|(${ld}))[eE][+-]?(${ul})[fFdD]?\\b`},{begin:`\\b(${ul})((${ld})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${ld})[fFdD]?\\b`},{begin:`\\b(${ul})[fFdD]\\b`},{begin:`\\b0[xX]((${od})\\.?|(${od})?\\.(${od}))[pP][+-]?(${ul})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${od})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function S4(e){const t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},n={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},a={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},s={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},o={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},c={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[o,s]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,o,s]}]};s.contains.push(c);const d={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},h={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(c,{className:"string"}),"self"]}]},p=E4,b=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),g={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},v=g;return v.variants[1].contains=[g],g.variants[1].contains=[v],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,b,n,a,d,h,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[g,e.C_LINE_COMMENT_MODE,b],relevance:0},e.C_LINE_COMMENT_MODE,b,d,h,c,e.C_NUMBER_MODE]},b]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},d,h]},c,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
552
- `},p]}}const _4=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),N4=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],C4=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],T4=[...N4,...C4],A4=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),I1=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),z1=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),j4=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),O4=I1.concat(z1).sort().reverse();function D4(e){const t=_4(e),n=O4,a="and or not only",s="[\\w-]+",o="("+s+"|@\\{"+s+"\\})",c=[],d=[],h=function(T){return{className:"string",begin:"~?"+T+".*?"+T}},p=function(T,D,B){return{className:T,begin:D,relevance:B}},b={$pattern:/[a-z-]+/,keyword:a,attribute:A4.join(" ")},g={begin:"\\(",end:"\\)",contains:d,keywords:b,relevance:0};d.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,h("'"),h('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,g,p("variable","@@?"+s,10),p("variable","@\\{"+s+"\\}"),p("built_in","~?`[^`]*?`"),{className:"attribute",begin:s+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const v=d.concat({begin:/\{/,end:/\}/,contains:c}),x={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(d)},E={begin:o+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+j4.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:d}}]},w={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:b,returnEnd:!0,contains:d,relevance:0}},S={className:"variable",variants:[{begin:"@"+s+"\\s*:",relevance:15},{begin:"@"+s}],starts:{end:"[;}]",returnEnd:!0,contains:v}},_={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:o,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,x,p("keyword","all\\b"),p("variable","@\\{"+s+"\\}"),{begin:"\\b("+T4.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,p("selector-tag",o,0),p("selector-id","#"+o),p("selector-class","\\."+o,0),p("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+I1.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+z1.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:v},{begin:"!important"},t.FUNCTION_DISPATCH]},A={begin:s+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[_]};return c.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,w,S,A,E,_,x,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:c}}function M4(e){const t="\\[=*\\[",n="\\]=*\\]",a={begin:t,end:n,contains:["self"]},s=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,n,{contains:[a],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:s.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:s}].concat(s)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:n,contains:[a],relevance:5}])}}function R4(e){const t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},n={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t]},a={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[t,n]},s={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},o={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},c={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[t]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[e.HASH_COMMENT_MODE,t,n,a,s,o,c]}}function L4(e){const t=e.regex,n={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},a={begin:"^[-\\*]{3,}",end:"$"},s={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},o={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},c={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},d=/[A-Za-z][A-Za-z0-9+.-]*/,h={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,d,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},p={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},b={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},g=e.inherit(p,{contains:[]}),v=e.inherit(b,{contains:[]});p.contains.push(v),b.contains.push(g);let x=[n,h];return[p,b,g,v].forEach(_=>{_.contains=_.contains.concat(x)}),x=x.concat(p,b),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:x},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:x}]}]},n,o,p,b,{className:"quote",begin:"^>\\s+",contains:x,end:"$"},s,a,h,c,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function I4(e){const t={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},n=/[a-zA-Z@][a-zA-Z0-9_]*/,d={"variable.language":["this","super"],$pattern:n,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},h={$pattern:n,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:d,illegal:"</",contains:[t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+h.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:h,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function z4(e){const t=e.regex,n=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],a=/[dualxmsipngr]{0,12}/,s={$pattern:/[\w.]+/,keyword:n.join(" ")},o={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:s},c={begin:/->\{/,end:/\}/},d={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},h={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[d]},p={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},b=[e.BACKSLASH_ESCAPE,o,h],g=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],v=(w,S,_="\\1")=>{const A=_==="\\1"?_:t.concat(_,S);return t.concat(t.concat("(?:",w,")"),S,/(?:\\.|[^\\\/])*?/,A,/(?:\\.|[^\\\/])*?/,_,a)},x=(w,S,_)=>t.concat(t.concat("(?:",w,")"),S,/(?:\\.|[^\\\/])*?/,_,a),E=[h,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),c,{className:"string",contains:b,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},p,{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:v("s|tr|y",t.either(...g,{capture:!0}))},{begin:v("s|tr|y","\\(","\\)")},{begin:v("s|tr|y","\\[","\\]")},{begin:v("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:x("(?:m|qr)?",/\//,/\//)},{begin:x("m|qr",t.either(...g,{capture:!0}),/\1/)},{begin:x("m|qr",/\(/,/\)/)},{begin:x("m|qr",/\[/,/\]/)},{begin:x("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,d]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,d,p]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return o.contains=E,c.contains=E,{name:"Perl",aliases:["pl","pm"],keywords:s,contains:E}}function B4(e){const t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,a=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),s=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),o=t.concat(/[A-Z]+/,n),c={scope:"variable",match:"\\$+"+a},d={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},h={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},p=e.inherit(e.APOS_STRING_MODE,{illegal:null}),b=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(h)}),g={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(h),"on:begin":(ue,te)=>{te.data._beginMatch=ue[1]||ue[2]},"on:end":(ue,te)=>{te.data._beginMatch!==ue[1]&&te.ignoreMatch()}},v=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),x=`[
553
- ]`,E={scope:"string",variants:[b,p,g,v]},w={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},S=["false","null","true"],_=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],A=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],D={keyword:_,literal:(ue=>{const te=[];return ue.forEach($=>{te.push($),$.toLowerCase()===$?te.push($.toUpperCase()):te.push($.toLowerCase())}),te})(S),built_in:A},B=ue=>ue.map(te=>te.replace(/\|\d+$/,"")),M={variants:[{match:[/new/,t.concat(x,"+"),t.concat("(?!",B(A).join("\\b|"),"\\b)"),s],scope:{1:"keyword",4:"title.class"}}]},q=t.concat(a,"\\b(?!\\()"),F={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),q],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[s,t.concat(/::/,t.lookahead(/(?!class\b)/)),q],scope:{1:"title.class",3:"variable.constant"}},{match:[s,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[s,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},ee={scope:"attr",match:t.concat(a,t.lookahead(":"),t.lookahead(/(?!::)/))},P={relevance:0,begin:/\(/,end:/\)/,keywords:D,contains:[ee,c,F,e.C_BLOCK_COMMENT_MODE,E,w,M]},X={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",B(_).join("\\b|"),"|",B(A).join("\\b|"),"\\b)"),a,t.concat(x,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[P]};P.contains.push(X);const J=[ee,F,e.C_BLOCK_COMMENT_MODE,E,w,M],pe={begin:t.concat(/#\[\s*\\?/,t.either(s,o)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:S,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:S,keyword:["new","array"]},contains:["self",...J]},...J,{scope:"meta",variants:[{match:s},{match:o}]}]};return{case_insensitive:!1,keywords:D,contains:[pe,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},d,{scope:"variable.language",match:/\$this\b/},c,X,F,{match:[/const/,/\s/,a],scope:{1:"keyword",3:"variable.constant"}},M,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:D,contains:["self",pe,c,F,e.C_BLOCK_COMMENT_MODE,E,w]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},E,w]}}function P4(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function U4(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function F4(e){const t=e.regex,n=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),a=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],d={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:a,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},h={className:"meta",begin:/^(>>>|\.\.\.) /},p={className:"subst",begin:/\{/,end:/\}/,keywords:d,illegal:/#/},b={begin:/\{\{/,relevance:0},g={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,h],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,h],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,h,b,p]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,h,b,p]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,b,p]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,b,p]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},v="[0-9](_?[0-9])*",x=`(\\b(${v}))?\\.(${v})|\\b(${v})\\.`,E=`\\b|${a.join("|")}`,w={className:"number",relevance:0,variants:[{begin:`(\\b(${v})|(${x}))[eE][+-]?(${v})[jJ]?(?=${E})`},{begin:`(${x})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${E})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${E})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${E})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${E})`},{begin:`\\b(${v})[jJ](?=${E})`}]},S={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:d,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},_={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:d,contains:["self",h,w,g,e.HASH_COMMENT_MODE]}]};return p.contains=[g,w,h],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:d,illegal:/(<\/|\?)|=>/,contains:[h,w,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},g,S,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[_]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[w,_,g]}]}}function q4(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function $4(e){const t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,a=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),s=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,o=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[s,a]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,a]},{scope:{1:"punctuation",2:"number"},match:[o,a]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,a]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:s},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:o},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function H4(e){const t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",a=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),s=t.concat(a,/(::\w+)*/),c={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},d={className:"doctag",begin:"@[A-Za-z]+"},h={begin:"#<",end:">"},p=[e.COMMENT("#","$",{contains:[d]}),e.COMMENT("^=begin","^=end",{contains:[d],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],b={className:"subst",begin:/#\{/,end:/\}/,keywords:c},g={className:"string",contains:[e.BACKSLASH_ESCAPE,b],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,b]})]}]},v="[1-9](_?[0-9])*|0",x="[0-9](_?[0-9])*",E={className:"number",relevance:0,variants:[{begin:`\\b(${v})(\\.(${x}))?([eE][+-]?(${x})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},w={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:c}]},M=[g,{variants:[{match:[/class\s+/,s,/\s+<\s+/,s]},{match:[/\b(class|module)\s+/,s]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:c},{match:[/(include|extend)\s+/,s],scope:{2:"title.class"},keywords:c},{relevance:0,match:[s,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:a,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[w]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[g,{begin:n}],relevance:0},E,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:c},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,b],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(h,p),relevance:0}].concat(h,p);b.contains=M,w.contains=M;const P=[{begin:/^\s*=>/,starts:{end:"$",contains:M}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:c,contains:M}}];return p.unshift(h),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:c,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(P).concat(p).concat(M)}}function K4(e){const t=e.regex,n=/(r#)?/,a=t.concat(n,e.UNDERSCORE_IDENT_RE),s=t.concat(n,e.IDENT_RE),o={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,s,t.lookahead(/\s*\(/))},c="([ui](8|16|32|64|128|size)|f(32|64))?",d=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],h=["true","false","Some","None","Ok","Err"],p=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],b=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:b,keyword:d,literal:h,built_in:p},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+c},{begin:"\\b0o([0-7_]+)"+c},{begin:"\\b0x([A-Fa-f0-9_]+)"+c},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+c}],relevance:0},{begin:[/fn/,/\s+/,a],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,a],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,a,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,a],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,a],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:p,type:b}},{className:"punctuation",begin:"->"},o]}}const G4=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),Q4=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],Y4=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],V4=[...Q4,...Y4],W4=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),X4=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),Z4=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),J4=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function eB(e){const t=G4(e),n=Z4,a=X4,s="@[a-z-]+",o="and or not only",d={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+V4.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+a.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},d,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+J4.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,d,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:s,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:o,attribute:W4.join(" ")},contains:[{begin:s,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},d,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function tB(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function nB(e){const t=e.regex,n=e.COMMENT("--","$"),a={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},s={begin:/"/,end:/"/,contains:[{match:/""/}]},o=["true","false","unknown"],c=["double precision","large object","with timezone","without timezone"],d=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],h=["add","asc","collation","desc","final","first","last","view"],p=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],b=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],g=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],v=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],x=b,E=[...p,...h].filter(B=>!b.includes(B)),w={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},S={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},_={match:t.concat(/\b/,t.either(...x),/\s*\(/),relevance:0,keywords:{built_in:x}};function A(B){return t.concat(/\b/,t.either(...B.map(M=>M.replace(/\s+/,"\\s+"))),/\b/)}const T={scope:"keyword",match:A(v),relevance:0};function D(B,{exceptions:M,when:q}={}){const F=q;return M=M||[],B.map(ee=>ee.match(/\|\d+$/)||M.includes(ee)?ee:F(ee)?`${ee}|0`:ee)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:D(E,{when:B=>B.length<3}),literal:o,type:d,built_in:g},contains:[{scope:"type",match:A(c)},T,_,w,a,s,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,S]}}function B1(e){return e?typeof e=="string"?e:e.source:null}function Wo(e){return xt("(?=",e,")")}function xt(...e){return e.map(n=>B1(n)).join("")}function iB(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function jn(...e){return"("+(iB(e).capture?"":"?:")+e.map(a=>B1(a)).join("|")+")"}const Bg=e=>xt(/\b/,e,/\w$/.test(e)?/\b/:/\B/),aB=["Protocol","Type"].map(Bg),r0=["init","self"].map(Bg),rB=["Any","Self"],$p=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],s0=["false","nil","true"],sB=["assignment","associativity","higherThan","left","lowerThan","none","right"],lB=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],l0=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],P1=jn(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),U1=jn(P1,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),Hp=xt(P1,U1,"*"),F1=jn(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),Od=jn(F1,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),Yi=xt(F1,Od,"*"),cd=xt(/[A-Z]/,Od,"*"),oB=["attached","autoclosure",xt(/convention\(/,jn("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",xt(/objc\(/,Yi,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],cB=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function uB(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),a=[e.C_LINE_COMMENT_MODE,n],s={match:[/\./,jn(...aB,...r0)],className:{2:"keyword"}},o={match:xt(/\./,jn(...$p)),relevance:0},c=$p.filter(tt=>typeof tt=="string").concat(["_|0"]),d=$p.filter(tt=>typeof tt!="string").concat(rB).map(Bg),h={variants:[{className:"keyword",match:jn(...d,...r0)}]},p={$pattern:jn(/\b\w+/,/#\w+/),keyword:c.concat(lB),literal:s0},b=[s,o,h],g={match:xt(/\./,jn(...l0)),relevance:0},v={className:"built_in",match:xt(/\b/,jn(...l0),/(?=\()/)},x=[g,v],E={match:/->/,relevance:0},w={className:"operator",relevance:0,variants:[{match:Hp},{match:`\\.(\\.|${U1})+`}]},S=[E,w],_="([0-9]_*)+",A="([0-9a-fA-F]_*)+",T={className:"number",relevance:0,variants:[{match:`\\b(${_})(\\.(${_}))?([eE][+-]?(${_}))?\\b`},{match:`\\b0x(${A})(\\.(${A}))?([pP][+-]?(${_}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},D=(tt="")=>({className:"subst",variants:[{match:xt(/\\/,tt,/[0\\tnr"']/)},{match:xt(/\\/,tt,/u\{[0-9a-fA-F]{1,8}\}/)}]}),B=(tt="")=>({className:"subst",match:xt(/\\/,tt,/[\t ]*(?:[\r\n]|\r\n)/)}),M=(tt="")=>({className:"subst",label:"interpol",begin:xt(/\\/,tt,/\(/),end:/\)/}),q=(tt="")=>({begin:xt(tt,/"""/),end:xt(/"""/,tt),contains:[D(tt),B(tt),M(tt)]}),F=(tt="")=>({begin:xt(tt,/"/),end:xt(/"/,tt),contains:[D(tt),M(tt)]}),ee={className:"string",variants:[q(),q("#"),q("##"),q("###"),F(),F("#"),F("##"),F("###")]},P=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],X={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:P},J=tt=>{const Ti=xt(tt,/\//),ci=xt(/\//,tt);return{begin:Ti,end:ci,contains:[...P,{scope:"comment",begin:`#(?!.*${ci})`,end:/$/}]}},pe={scope:"regexp",variants:[J("###"),J("##"),J("#"),X]},ue={match:xt(/`/,Yi,/`/)},te={className:"variable",match:/\$\d+/},$={className:"variable",match:`\\$${Od}+`},ce=[ue,te,$],de={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:cB,contains:[...S,T,ee]}]}},re={scope:"keyword",match:xt(/@/,jn(...oB),Wo(jn(/\(/,/\s+/)))},O={scope:"meta",match:xt(/@/,Yi)},R=[de,re,O],Q={match:Wo(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:xt(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,Od,"+")},{className:"type",match:cd,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:xt(/\s+&\s+/,Wo(cd)),relevance:0}]},j={begin:/</,end:/>/,keywords:p,contains:[...a,...b,...R,E,Q]};Q.contains.push(j);const ge={match:xt(Yi,/\s*:/),keywords:"_|0",relevance:0},_e={begin:/\(/,end:/\)/,relevance:0,keywords:p,contains:["self",ge,...a,pe,...b,...x,...S,T,ee,...ce,...R,Q]},Y={begin:/</,end:/>/,keywords:"repeat each",contains:[...a,Q]},xe={begin:jn(Wo(xt(Yi,/\s*:/)),Wo(xt(Yi,/\s+/,Yi,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:Yi}]},V={begin:/\(/,end:/\)/,keywords:p,contains:[xe,...a,...b,...S,T,ee,...R,Q,_e],endsParent:!0,illegal:/["']/},ae={match:[/(func|macro)/,/\s+/,jn(ue.match,Yi,Hp)],className:{1:"keyword",3:"title.function"},contains:[Y,V,t],illegal:[/\[/,/%/]},ye={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[Y,V,t],illegal:/\[|%/},Pe={match:[/operator/,/\s+/,Hp],className:{1:"keyword",3:"title"}},Ot={begin:[/precedencegroup/,/\s+/,cd],className:{1:"keyword",3:"title"},contains:[Q],keywords:[...sB,...s0],end:/}/},St={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},on={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Ui={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,Yi,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:p,contains:[Y,...b,{begin:/:/,end:/\{/,keywords:p,contains:[{scope:"title.class.inherited",match:cd},...b],relevance:0}]};for(const tt of ee.variants){const Ti=tt.contains.find(Fi=>Fi.label==="interpol");Ti.keywords=p;const ci=[...b,...x,...S,T,ee,...ce];Ti.contains=[...ci,{begin:/\(/,end:/\)/,contains:["self",...ci]}]}return{name:"Swift",keywords:p,contains:[...a,ae,ye,St,on,Ui,Pe,Ot,{beginKeywords:"import",end:/$/,contains:[...a],relevance:0},pe,...b,...x,...S,T,ee,...ce,...R,Q,_e]}}const Dd="[A-Za-z$_][0-9A-Za-z$_]*",q1=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],$1=["true","false","null","undefined","NaN","Infinity"],H1=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],K1=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],G1=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Q1=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Y1=[].concat(G1,H1,K1);function dB(e){const t=e.regex,n=(de,{after:re})=>{const O="</"+de[0].slice(1);return de.input.indexOf(O,re)!==-1},a=Dd,s={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,c={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(de,re)=>{const O=de[0].length+de.index,R=de.input[O];if(R==="<"||R===","){re.ignoreMatch();return}R===">"&&(n(de,{after:O})||re.ignoreMatch());let Q;const j=de.input.substring(O);if(Q=j.match(/^\s*=/)){re.ignoreMatch();return}if((Q=j.match(/^\s+extends\s+/))&&Q.index===0){re.ignoreMatch();return}}},d={$pattern:Dd,keyword:q1,literal:$1,built_in:Y1,"variable.language":Q1},h="[0-9](_?[0-9])*",p=`\\.(${h})`,b="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",g={className:"number",variants:[{begin:`(\\b(${b})((${p})|\\.)?|(${p}))[eE][+-]?(${h})\\b`},{begin:`\\b(${b})\\b((${p})\\b|\\.)?|(${p})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},v={className:"subst",begin:"\\$\\{",end:"\\}",keywords:d,contains:[]},x={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,v],subLanguage:"xml"}},E={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,v],subLanguage:"css"}},w={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,v],subLanguage:"graphql"}},S={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,v]},A={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:a+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},T=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,x,E,w,S,{match:/\$\d+/},g];v.contains=T.concat({begin:/\{/,end:/\}/,keywords:d,contains:["self"].concat(T)});const D=[].concat(A,v.contains),B=D.concat([{begin:/(\s*)\(/,end:/\)/,keywords:d,contains:["self"].concat(D)}]),M={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:d,contains:B},q={variants:[{match:[/class/,/\s+/,a,/\s+/,/extends/,/\s+/,t.concat(a,"(",t.concat(/\./,a),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,a],scope:{1:"keyword",3:"title.class"}}]},F={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...H1,...K1]}},ee={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},P={variants:[{match:[/function/,/\s+/,a,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[M],illegal:/%/},X={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function J(de){return t.concat("(?!",de.join("|"),")")}const pe={match:t.concat(/\b/,J([...G1,"super","import"].map(de=>`${de}\\s*\\(`)),a,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},ue={begin:t.concat(/\./,t.lookahead(t.concat(a,/(?![0-9A-Za-z$_(])/))),end:a,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},te={match:[/get|set/,/\s+/,a,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},M]},$="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",ce={match:[/const|var|let/,/\s+/,a,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead($)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[M]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:d,exports:{PARAMS_CONTAINS:B,CLASS_REFERENCE:F},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),ee,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,x,E,w,S,A,{match:/\$\d+/},g,F,{scope:"attr",match:a+t.lookahead(":"),relevance:0},ce,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[A,e.REGEXP_MODE,{className:"function",begin:$,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:d,contains:B}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:s.begin,end:s.end},{match:o},{begin:c.begin,"on:begin":c.isTrulyOpeningTag,end:c.end}],subLanguage:"xml",contains:[{begin:c.begin,end:c.end,skip:!0,contains:["self"]}]}]},P,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[M,e.inherit(e.TITLE_MODE,{begin:a,className:"title.function"})]},{match:/\.\.\./,relevance:0},ue,{match:"\\$"+a,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[M]},pe,X,q,te,{match:/\$[(.]/}]}}function fB(e){const t=e.regex,n=dB(e),a=Dd,s=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],o={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},c={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:s},contains:[n.exports.CLASS_REFERENCE]},d={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},h=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],p={$pattern:Dd,keyword:q1.concat(h),literal:$1,built_in:Y1.concat(s),"variable.language":Q1},b={className:"meta",begin:"@"+a},g=(w,S,_)=>{const A=w.contains.findIndex(T=>T.label===S);if(A===-1)throw new Error("can not find mode to replace");w.contains.splice(A,1,_)};Object.assign(n.keywords,p),n.exports.PARAMS_CONTAINS.push(b);const v=n.contains.find(w=>w.scope==="attr"),x=Object.assign({},v,{match:t.concat(a,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,v,x]),n.contains=n.contains.concat([b,o,c,x]),g(n,"shebang",e.SHEBANG()),g(n,"use_strict",d);const E=n.contains.find(w=>w.label==="func.def");return E.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function hB(e){const t=e.regex,n={className:"string",begin:/"(""|[^/n])"C\b/},a={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},s=/\d{1,2}\/\d{1,2}\/\d{4}/,o=/\d{4}-\d{1,2}-\d{1,2}/,c=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,d=/\d{1,2}(:\d{1,2}){1,2}/,h={className:"literal",variants:[{begin:t.concat(/# */,t.either(o,s),/ *#/)},{begin:t.concat(/# */,d,/ *#/)},{begin:t.concat(/# */,c,/ *#/)},{begin:t.concat(/# */,t.either(o,s),/ +/,t.either(c,d),/ *#/)}]},p={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},b={className:"label",begin:/^\w+:/},g=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),v=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[n,a,h,p,b,g,v,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[v]}]}}function pB(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");const n=e.COMMENT(/;;/,/$/),a=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],s={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},o={className:"variable",begin:/\$[\w_]+/},c={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},d={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},h={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},p={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:a},contains:[n,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},o,c,s,e.QUOTE_STRING_MODE,h,p,d]}}function mB(e){const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),a=/[\p{L}0-9._:-]+/u,s={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},o={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},c=e.inherit(o,{begin:/\(/,end:/\)/}),d=e.inherit(e.APOS_STRING_MODE,{className:"string"}),h=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),p={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:a,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[s]},{begin:/'/,end:/'/,contains:[s]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[o,h,d,c,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[o,c,h,d]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},s,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[h]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[p],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[p],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:p}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function gB(e){const t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",a={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},s={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},o={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},c={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,s]},d=e.inherit(c,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),v={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},x={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},E={begin:/\{/,end:/\}/,contains:[x],illegal:"\\n",relevance:0},w={begin:"\\[",end:"\\]",contains:[x],illegal:"\\n",relevance:0},S=[a,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},v,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},E,w,o,c],_=[...S];return _.pop(),_.push(d),x.contains=_,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:S}}const bB={arduino:Zz,bash:Jz,c:e4,cpp:t4,csharp:n4,css:d4,diff:f4,go:h4,graphql:p4,ini:m4,java:g4,javascript:w4,json:k4,kotlin:S4,less:D4,lua:M4,makefile:R4,markdown:L4,objectivec:I4,perl:z4,php:B4,"php-template":P4,plaintext:U4,python:F4,"python-repl":q4,r:$4,ruby:H4,rust:K4,scss:eB,shell:tB,sql:nB,swift:uB,typescript:fB,vbnet:hB,wasm:pB,xml:mB,yaml:gB};var Kp,o0;function yB(){if(o0)return Kp;o0=1;function e(z){return z instanceof Map?z.clear=z.delete=z.set=function(){throw new Error("map is read-only")}:z instanceof Set&&(z.add=z.clear=z.delete=function(){throw new Error("set is read-only")}),Object.freeze(z),Object.getOwnPropertyNames(z).forEach(se=>{const ve=z[se],Be=typeof ve;(Be==="object"||Be==="function")&&!Object.isFrozen(ve)&&e(ve)}),z}class t{constructor(se){se.data===void 0&&(se.data={}),this.data=se.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(z){return z.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function a(z,...se){const ve=Object.create(null);for(const Be in z)ve[Be]=z[Be];return se.forEach(function(Be){for(const Ct in Be)ve[Ct]=Be[Ct]}),ve}const s="</span>",o=z=>!!z.scope,c=(z,{prefix:se})=>{if(z.startsWith("language:"))return z.replace("language:","language-");if(z.includes(".")){const ve=z.split(".");return[`${se}${ve.shift()}`,...ve.map((Be,Ct)=>`${Be}${"_".repeat(Ct+1)}`)].join(" ")}return`${se}${z}`};class d{constructor(se,ve){this.buffer="",this.classPrefix=ve.classPrefix,se.walk(this)}addText(se){this.buffer+=n(se)}openNode(se){if(!o(se))return;const ve=c(se.scope,{prefix:this.classPrefix});this.span(ve)}closeNode(se){o(se)&&(this.buffer+=s)}value(){return this.buffer}span(se){this.buffer+=`<span class="${se}">`}}const h=(z={})=>{const se={children:[]};return Object.assign(se,z),se};class p{constructor(){this.rootNode=h(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(se){this.top.children.push(se)}openNode(se){const ve=h({scope:se});this.add(ve),this.stack.push(ve)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(se){return this.constructor._walk(se,this.rootNode)}static _walk(se,ve){return typeof ve=="string"?se.addText(ve):ve.children&&(se.openNode(ve),ve.children.forEach(Be=>this._walk(se,Be)),se.closeNode(ve)),se}static _collapse(se){typeof se!="string"&&se.children&&(se.children.every(ve=>typeof ve=="string")?se.children=[se.children.join("")]:se.children.forEach(ve=>{p._collapse(ve)}))}}class b extends p{constructor(se){super(),this.options=se}addText(se){se!==""&&this.add(se)}startScope(se){this.openNode(se)}endScope(){this.closeNode()}__addSublanguage(se,ve){const Be=se.root;ve&&(Be.scope=`language:${ve}`),this.add(Be)}toHTML(){return new d(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function g(z){return z?typeof z=="string"?z:z.source:null}function v(z){return w("(?=",z,")")}function x(z){return w("(?:",z,")*")}function E(z){return w("(?:",z,")?")}function w(...z){return z.map(ve=>g(ve)).join("")}function S(z){const se=z[z.length-1];return typeof se=="object"&&se.constructor===Object?(z.splice(z.length-1,1),se):{}}function _(...z){return"("+(S(z).capture?"":"?:")+z.map(Be=>g(Be)).join("|")+")"}function A(z){return new RegExp(z.toString()+"|").exec("").length-1}function T(z,se){const ve=z&&z.exec(se);return ve&&ve.index===0}const D=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function B(z,{joinWith:se}){let ve=0;return z.map(Be=>{ve+=1;const Ct=ve;let vt=g(Be),Se="";for(;vt.length>0;){const ke=D.exec(vt);if(!ke){Se+=vt;break}Se+=vt.substring(0,ke.index),vt=vt.substring(ke.index+ke[0].length),ke[0][0]==="\\"&&ke[1]?Se+="\\"+String(Number(ke[1])+Ct):(Se+=ke[0],ke[0]==="("&&ve++)}return Se}).map(Be=>`(${Be})`).join(se)}const M=/\b\B/,q="[a-zA-Z]\\w*",F="[a-zA-Z_]\\w*",ee="\\b\\d+(\\.\\d+)?",P="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",X="\\b(0b[01]+)",J="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",pe=(z={})=>{const se=/^#![ ]*\//;return z.binary&&(z.begin=w(se,/.*\b/,z.binary,/\b.*/)),a({scope:"meta",begin:se,end:/$/,relevance:0,"on:begin":(ve,Be)=>{ve.index!==0&&Be.ignoreMatch()}},z)},ue={begin:"\\\\[\\s\\S]",relevance:0},te={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[ue]},$={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[ue]},ce={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},de=function(z,se,ve={}){const Be=a({scope:"comment",begin:z,end:se,contains:[]},ve);Be.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const Ct=_("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return Be.contains.push({begin:w(/[ ]+/,"(",Ct,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),Be},re=de("//","$"),O=de("/\\*","\\*/"),R=de("#","$"),Q={scope:"number",begin:ee,relevance:0},j={scope:"number",begin:P,relevance:0},ge={scope:"number",begin:X,relevance:0},_e={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[ue,{begin:/\[/,end:/\]/,relevance:0,contains:[ue]}]},Y={scope:"title",begin:q,relevance:0},xe={scope:"title",begin:F,relevance:0},V={begin:"\\.\\s*"+F,relevance:0};var ye=Object.freeze({__proto__:null,APOS_STRING_MODE:te,BACKSLASH_ESCAPE:ue,BINARY_NUMBER_MODE:ge,BINARY_NUMBER_RE:X,COMMENT:de,C_BLOCK_COMMENT_MODE:O,C_LINE_COMMENT_MODE:re,C_NUMBER_MODE:j,C_NUMBER_RE:P,END_SAME_AS_BEGIN:function(z){return Object.assign(z,{"on:begin":(se,ve)=>{ve.data._beginMatch=se[1]},"on:end":(se,ve)=>{ve.data._beginMatch!==se[1]&&ve.ignoreMatch()}})},HASH_COMMENT_MODE:R,IDENT_RE:q,MATCH_NOTHING_RE:M,METHOD_GUARD:V,NUMBER_MODE:Q,NUMBER_RE:ee,PHRASAL_WORDS_MODE:ce,QUOTE_STRING_MODE:$,REGEXP_MODE:_e,RE_STARTERS_RE:J,SHEBANG:pe,TITLE_MODE:Y,UNDERSCORE_IDENT_RE:F,UNDERSCORE_TITLE_MODE:xe});function Pe(z,se){z.input[z.index-1]==="."&&se.ignoreMatch()}function Ot(z,se){z.className!==void 0&&(z.scope=z.className,delete z.className)}function St(z,se){se&&z.beginKeywords&&(z.begin="\\b("+z.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",z.__beforeBegin=Pe,z.keywords=z.keywords||z.beginKeywords,delete z.beginKeywords,z.relevance===void 0&&(z.relevance=0))}function on(z,se){Array.isArray(z.illegal)&&(z.illegal=_(...z.illegal))}function Ui(z,se){if(z.match){if(z.begin||z.end)throw new Error("begin & end are not supported with match");z.begin=z.match,delete z.match}}function tt(z,se){z.relevance===void 0&&(z.relevance=1)}const Ti=(z,se)=>{if(!z.beforeMatch)return;if(z.starts)throw new Error("beforeMatch cannot be used with starts");const ve=Object.assign({},z);Object.keys(z).forEach(Be=>{delete z[Be]}),z.keywords=ve.keywords,z.begin=w(ve.beforeMatch,v(ve.begin)),z.starts={relevance:0,contains:[Object.assign(ve,{endsParent:!0})]},z.relevance=0,delete ve.beforeMatch},ci=["of","and","for","in","not","or","if","then","parent","list","value"],Fi="keyword";function na(z,se,ve=Fi){const Be=Object.create(null);return typeof z=="string"?Ct(ve,z.split(" ")):Array.isArray(z)?Ct(ve,z):Object.keys(z).forEach(function(vt){Object.assign(Be,na(z[vt],se,vt))}),Be;function Ct(vt,Se){se&&(Se=Se.map(ke=>ke.toLowerCase())),Se.forEach(function(ke){const Ie=ke.split("|");Be[Ie[0]]=[vt,Ar(Ie[0],Ie[1])]})}}function Ar(z,se){return se?Number(se):Ql(z)?0:1}function Ql(z){return ci.includes(z.toLowerCase())}const xs={},zt=z=>{console.error(z)},vs=(z,...se)=>{console.log(`WARN: ${z}`,...se)},ne=(z,se)=>{xs[`${z}/${se}`]||(console.log(`Deprecated as of ${z}. ${se}`),xs[`${z}/${se}`]=!0)},me=new Error;function Me(z,se,{key:ve}){let Be=0;const Ct=z[ve],vt={},Se={};for(let ke=1;ke<=se.length;ke++)Se[ke+Be]=Ct[ke],vt[ke+Be]=!0,Be+=A(se[ke-1]);z[ve]=Se,z[ve]._emit=vt,z[ve]._multi=!0}function Qe(z){if(Array.isArray(z.begin)){if(z.skip||z.excludeBegin||z.returnBegin)throw zt("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),me;if(typeof z.beginScope!="object"||z.beginScope===null)throw zt("beginScope must be object"),me;Me(z,z.begin,{key:"beginScope"}),z.begin=B(z.begin,{joinWith:""})}}function st(z){if(Array.isArray(z.end)){if(z.skip||z.excludeEnd||z.returnEnd)throw zt("skip, excludeEnd, returnEnd not compatible with endScope: {}"),me;if(typeof z.endScope!="object"||z.endScope===null)throw zt("endScope must be object"),me;Me(z,z.end,{key:"endScope"}),z.end=B(z.end,{joinWith:""})}}function _n(z){z.scope&&typeof z.scope=="object"&&z.scope!==null&&(z.beginScope=z.scope,delete z.scope)}function Ai(z){_n(z),typeof z.beginScope=="string"&&(z.beginScope={_wrap:z.beginScope}),typeof z.endScope=="string"&&(z.endScope={_wrap:z.endScope}),Qe(z),st(z)}function cn(z){function se(Se,ke){return new RegExp(g(Se),"m"+(z.case_insensitive?"i":"")+(z.unicodeRegex?"u":"")+(ke?"g":""))}class ve{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(ke,Ie){Ie.position=this.position++,this.matchIndexes[this.matchAt]=Ie,this.regexes.push([Ie,ke]),this.matchAt+=A(ke)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const ke=this.regexes.map(Ie=>Ie[1]);this.matcherRe=se(B(ke,{joinWith:"|"}),!0),this.lastIndex=0}exec(ke){this.matcherRe.lastIndex=this.lastIndex;const Ie=this.matcherRe.exec(ke);if(!Ie)return null;const Kt=Ie.findIndex((ia,ks)=>ks>0&&ia!==void 0),Dt=this.matchIndexes[Kt];return Ie.splice(0,Kt),Object.assign(Ie,Dt)}}class Be{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(ke){if(this.multiRegexes[ke])return this.multiRegexes[ke];const Ie=new ve;return this.rules.slice(ke).forEach(([Kt,Dt])=>Ie.addRule(Kt,Dt)),Ie.compile(),this.multiRegexes[ke]=Ie,Ie}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(ke,Ie){this.rules.push([ke,Ie]),Ie.type==="begin"&&this.count++}exec(ke){const Ie=this.getMatcher(this.regexIndex);Ie.lastIndex=this.lastIndex;let Kt=Ie.exec(ke);if(this.resumingScanAtSamePosition()&&!(Kt&&Kt.index===this.lastIndex)){const Dt=this.getMatcher(0);Dt.lastIndex=this.lastIndex+1,Kt=Dt.exec(ke)}return Kt&&(this.regexIndex+=Kt.position+1,this.regexIndex===this.count&&this.considerAll()),Kt}}function Ct(Se){const ke=new Be;return Se.contains.forEach(Ie=>ke.addRule(Ie.begin,{rule:Ie,type:"begin"})),Se.terminatorEnd&&ke.addRule(Se.terminatorEnd,{type:"end"}),Se.illegal&&ke.addRule(Se.illegal,{type:"illegal"}),ke}function vt(Se,ke){const Ie=Se;if(Se.isCompiled)return Ie;[Ot,Ui,Ai,Ti].forEach(Dt=>Dt(Se,ke)),z.compilerExtensions.forEach(Dt=>Dt(Se,ke)),Se.__beforeBegin=null,[St,on,tt].forEach(Dt=>Dt(Se,ke)),Se.isCompiled=!0;let Kt=null;return typeof Se.keywords=="object"&&Se.keywords.$pattern&&(Se.keywords=Object.assign({},Se.keywords),Kt=Se.keywords.$pattern,delete Se.keywords.$pattern),Kt=Kt||/\w+/,Se.keywords&&(Se.keywords=na(Se.keywords,z.case_insensitive)),Ie.keywordPatternRe=se(Kt,!0),ke&&(Se.begin||(Se.begin=/\B|\b/),Ie.beginRe=se(Ie.begin),!Se.end&&!Se.endsWithParent&&(Se.end=/\B|\b/),Se.end&&(Ie.endRe=se(Ie.end)),Ie.terminatorEnd=g(Ie.end)||"",Se.endsWithParent&&ke.terminatorEnd&&(Ie.terminatorEnd+=(Se.end?"|":"")+ke.terminatorEnd)),Se.illegal&&(Ie.illegalRe=se(Se.illegal)),Se.contains||(Se.contains=[]),Se.contains=[].concat(...Se.contains.map(function(Dt){return gn(Dt==="self"?Se:Dt)})),Se.contains.forEach(function(Dt){vt(Dt,Ie)}),Se.starts&&vt(Se.starts,ke),Ie.matcher=Ct(Ie),Ie}if(z.compilerExtensions||(z.compilerExtensions=[]),z.contains&&z.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return z.classNameAliases=a(z.classNameAliases||{}),vt(z)}function Ft(z){return z?z.endsWithParent||Ft(z.starts):!1}function gn(z){return z.variants&&!z.cachedVariants&&(z.cachedVariants=z.variants.map(function(se){return a(z,{variants:null},se)})),z.cachedVariants?z.cachedVariants:Ft(z)?a(z,{starts:z.starts?a(z.starts):null}):Object.isFrozen(z)?a(z):z}var dt="11.11.1";class qi extends Error{constructor(se,ve){super(se),this.name="HTMLInjectionError",this.html=ve}}const Nn=n,jc=a,jr=Symbol("nomatch"),ws=7,Or=function(z){const se=Object.create(null),ve=Object.create(null),Be=[];let Ct=!0;const vt="Could not find the language '{}', did you forget to load/include a language module?",Se={disableAutodetect:!0,name:"Plain text",contains:[]};let ke={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:b};function Ie(fe){return ke.noHighlightRe.test(fe)}function Kt(fe){let Ae=fe.className+" ";Ae+=fe.parentNode?fe.parentNode.className:"";const Ye=ke.languageDetectRe.exec(Ae);if(Ye){const ft=Cn(Ye[1]);return ft||(vs(vt.replace("{}",Ye[1])),vs("Falling back to no-highlight mode for this block.",fe)),ft?Ye[1]:"no-highlight"}return Ae.split(/\s+/).find(ft=>Ie(ft)||Cn(ft))}function Dt(fe,Ae,Ye){let ft="",Qt="";typeof Ae=="object"?(ft=fe,Ye=Ae.ignoreIllegals,Qt=Ae.language):(ne("10.7.0","highlight(lang, code, ...args) has been deprecated."),ne("10.7.0",`Please use highlight(code, options) instead.
554
- https://github.com/highlightjs/highlight.js/issues/2277`),Qt=fe,ft=Ae),Ye===void 0&&(Ye=!0);const yn={code:ft,language:Qt};Mr("before:highlight",yn);const Vn=yn.result?yn.result:ia(yn.language,yn.code,Ye);return Vn.code=yn.code,Mr("after:highlight",Vn),Vn}function ia(fe,Ae,Ye,ft){const Qt=Object.create(null);function yn(be,Ne){return be.keywords[Ne]}function Vn(){if(!Le.keywords){Xt.addText(ht);return}let be=0;Le.keywordPatternRe.lastIndex=0;let Ne=Le.keywordPatternRe.exec(ht),qe="";for(;Ne;){qe+=ht.substring(be,Ne.index);const Ze=un.case_insensitive?Ne[0].toLowerCase():Ne[0],Bt=yn(Le,Ze);if(Bt){const[ui,Jl]=Bt;if(Xt.addText(qe),qe="",Qt[Ze]=(Qt[Ze]||0)+1,Qt[Ze]<=ws&&(Ia+=Jl),ui.startsWith("_"))qe+=Ne[0];else{const zc=un.classNameAliases[ui]||ui;Wn(Ne[0],zc)}}else qe+=Ne[0];be=Le.keywordPatternRe.lastIndex,Ne=Le.keywordPatternRe.exec(ht)}qe+=ht.substring(be),Xt.addText(qe)}function In(){if(ht==="")return;let be=null;if(typeof Le.subLanguage=="string"){if(!se[Le.subLanguage]){Xt.addText(ht);return}be=ia(Le.subLanguage,ht,!0,Ic[Le.subLanguage]),Ic[Le.subLanguage]=be._top}else be=Es(ht,Le.subLanguage.length?Le.subLanguage:null);Le.relevance>0&&(Ia+=be.relevance),Xt.__addSublanguage(be._emitter,be.language)}function _t(){Le.subLanguage!=null?In():Vn(),ht=""}function Wn(be,Ne){be!==""&&(Xt.startScope(Ne),Xt.addText(be),Xt.endScope())}function Rc(be,Ne){let qe=1;const Ze=Ne.length-1;for(;qe<=Ze;){if(!be._emit[qe]){qe++;continue}const Bt=un.classNameAliases[be[qe]]||be[qe],ui=Ne[qe];Bt?Wn(ui,Bt):(ht=ui,Vn(),ht=""),qe++}}function _s(be,Ne){return be.scope&&typeof be.scope=="string"&&Xt.openNode(un.classNameAliases[be.scope]||be.scope),be.beginScope&&(be.beginScope._wrap?(Wn(ht,un.classNameAliases[be.beginScope._wrap]||be.beginScope._wrap),ht=""):be.beginScope._multi&&(Rc(be.beginScope,Ne),ht="")),Le=Object.create(be,{parent:{value:Le}}),Le}function Wl(be,Ne,qe){let Ze=T(be.endRe,qe);if(Ze){if(be["on:end"]){const Bt=new t(be);be["on:end"](Ne,Bt),Bt.isMatchIgnored&&(Ze=!1)}if(Ze){for(;be.endsParent&&be.parent;)be=be.parent;return be}}if(be.endsWithParent)return Wl(be.parent,Ne,qe)}function Ns(be){return Le.matcher.regexIndex===0?(ht+=be[0],1):(za=!0,0)}function rf(be){const Ne=be[0],qe=be.rule,Ze=new t(qe),Bt=[qe.__beforeBegin,qe["on:begin"]];for(const ui of Bt)if(ui&&(ui(be,Ze),Ze.isMatchIgnored))return Ns(Ne);return qe.skip?ht+=Ne:(qe.excludeBegin&&(ht+=Ne),_t(),!qe.returnBegin&&!qe.excludeBegin&&(ht=Ne)),_s(qe,be),qe.returnBegin?0:Ne.length}function zn(be){const Ne=be[0],qe=Ae.substring(be.index),Ze=Wl(Le,be,qe);if(!Ze)return jr;const Bt=Le;Le.endScope&&Le.endScope._wrap?(_t(),Wn(Ne,Le.endScope._wrap)):Le.endScope&&Le.endScope._multi?(_t(),Rc(Le.endScope,be)):Bt.skip?ht+=Ne:(Bt.returnEnd||Bt.excludeEnd||(ht+=Ne),_t(),Bt.excludeEnd&&(ht=Ne));do Le.scope&&Xt.closeNode(),!Le.skip&&!Le.subLanguage&&(Ia+=Le.relevance),Le=Le.parent;while(Le!==Ze.parent);return Ze.starts&&_s(Ze.starts,be),Bt.returnEnd?0:Ne.length}function Xl(){const be=[];for(let Ne=Le;Ne!==un;Ne=Ne.parent)Ne.scope&&be.unshift(Ne.scope);be.forEach(Ne=>Xt.openNode(Ne))}let Rr={};function Cs(be,Ne){const qe=Ne&&Ne[0];if(ht+=be,qe==null)return _t(),0;if(Rr.type==="begin"&&Ne.type==="end"&&Rr.index===Ne.index&&qe===""){if(ht+=Ae.slice(Ne.index,Ne.index+1),!Ct){const Ze=new Error(`0 width match regex (${fe})`);throw Ze.languageName=fe,Ze.badRule=Rr.rule,Ze}return 1}if(Rr=Ne,Ne.type==="begin")return rf(Ne);if(Ne.type==="illegal"&&!Ye){const Ze=new Error('Illegal lexeme "'+qe+'" for mode "'+(Le.scope||"<unnamed>")+'"');throw Ze.mode=Le,Ze}else if(Ne.type==="end"){const Ze=zn(Ne);if(Ze!==jr)return Ze}if(Ne.type==="illegal"&&qe==="")return ht+=`
555
- `,1;if(Zl>1e5&&Zl>Ne.index*3)throw new Error("potential infinite loop, way more iterations than matches");return ht+=qe,qe.length}const un=Cn(fe);if(!un)throw zt(vt.replace("{}",fe)),new Error('Unknown language: "'+fe+'"');const Lc=cn(un);let Ts="",Le=ft||Lc;const Ic={},Xt=new ke.__emitter(ke);Xl();let ht="",Ia=0,sa=0,Zl=0,za=!1;try{if(un.__emitTokens)un.__emitTokens(Ae,Xt);else{for(Le.matcher.considerAll();;){Zl++,za?za=!1:Le.matcher.considerAll(),Le.matcher.lastIndex=sa;const be=Le.matcher.exec(Ae);if(!be)break;const Ne=Ae.substring(sa,be.index),qe=Cs(Ne,be);sa=be.index+qe}Cs(Ae.substring(sa))}return Xt.finalize(),Ts=Xt.toHTML(),{language:fe,value:Ts,relevance:Ia,illegal:!1,_emitter:Xt,_top:Le}}catch(be){if(be.message&&be.message.includes("Illegal"))return{language:fe,value:Nn(Ae),illegal:!0,relevance:0,_illegalBy:{message:be.message,index:sa,context:Ae.slice(sa-100,sa+100),mode:be.mode,resultSoFar:Ts},_emitter:Xt};if(Ct)return{language:fe,value:Nn(Ae),illegal:!1,relevance:0,errorRaised:be,_emitter:Xt,_top:Le};throw be}}function ks(fe){const Ae={value:Nn(fe),illegal:!1,relevance:0,_top:Se,_emitter:new ke.__emitter(ke)};return Ae._emitter.addText(fe),Ae}function Es(fe,Ae){Ae=Ae||ke.languages||Object.keys(se);const Ye=ks(fe),ft=Ae.filter(Cn).filter(Ra).map(_t=>ia(_t,fe,!1));ft.unshift(Ye);const Qt=ft.sort((_t,Wn)=>{if(_t.relevance!==Wn.relevance)return Wn.relevance-_t.relevance;if(_t.language&&Wn.language){if(Cn(_t.language).supersetOf===Wn.language)return 1;if(Cn(Wn.language).supersetOf===_t.language)return-1}return 0}),[yn,Vn]=Qt,In=yn;return In.secondBest=Vn,In}function $i(fe,Ae,Ye){const ft=Ae&&ve[Ae]||Ye;fe.classList.add("hljs"),fe.classList.add(`language-${ft}`)}function Gt(fe){let Ae=null;const Ye=Kt(fe);if(Ie(Ye))return;if(Mr("before:highlightElement",{el:fe,language:Ye}),fe.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",fe);return}if(fe.children.length>0&&(ke.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(fe)),ke.throwUnescapedHTML))throw new qi("One of your code blocks includes unescaped HTML.",fe.innerHTML);Ae=fe;const ft=Ae.textContent,Qt=Ye?Dt(ft,{language:Ye,ignoreIllegals:!0}):Es(ft);fe.innerHTML=Qt.value,fe.dataset.highlighted="yes",$i(fe,Ye,Qt.language),fe.result={language:Qt.language,re:Qt.relevance,relevance:Qt.relevance},Qt.secondBest&&(fe.secondBest={language:Qt.secondBest.language,relevance:Qt.secondBest.relevance}),Mr("after:highlightElement",{el:fe,result:Qt,text:ft})}function bn(fe){ke=jc(ke,fe)}const Ma=()=>{Ss(),ne("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Yl(){Ss(),ne("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let Oc=!1;function Ss(){function fe(){Ss()}if(document.readyState==="loading"){Oc||window.addEventListener("DOMContentLoaded",fe,!1),Oc=!0;return}document.querySelectorAll(ke.cssSelector).forEach(Gt)}function Dc(fe,Ae){let Ye=null;try{Ye=Ae(z)}catch(ft){if(zt("Language definition for '{}' could not be registered.".replace("{}",fe)),Ct)zt(ft);else throw ft;Ye=Se}Ye.name||(Ye.name=fe),se[fe]=Ye,Ye.rawDefinition=Ae.bind(null,z),Ye.aliases&&aa(Ye.aliases,{languageName:fe})}function Dr(fe){delete se[fe];for(const Ae of Object.keys(ve))ve[Ae]===fe&&delete ve[Ae]}function Vl(){return Object.keys(se)}function Cn(fe){return fe=(fe||"").toLowerCase(),se[fe]||se[ve[fe]]}function aa(fe,{languageName:Ae}){typeof fe=="string"&&(fe=[fe]),fe.forEach(Ye=>{ve[Ye.toLowerCase()]=Ae})}function Ra(fe){const Ae=Cn(fe);return Ae&&!Ae.disableAutodetect}function La(fe){fe["before:highlightBlock"]&&!fe["before:highlightElement"]&&(fe["before:highlightElement"]=Ae=>{fe["before:highlightBlock"](Object.assign({block:Ae.el},Ae))}),fe["after:highlightBlock"]&&!fe["after:highlightElement"]&&(fe["after:highlightElement"]=Ae=>{fe["after:highlightBlock"](Object.assign({block:Ae.el},Ae))})}function Wt(fe){La(fe),Be.push(fe)}function Mc(fe){const Ae=Be.indexOf(fe);Ae!==-1&&Be.splice(Ae,1)}function Mr(fe,Ae){const Ye=fe;Be.forEach(function(ft){ft[Ye]&&ft[Ye](Ae)})}function ra(fe){return ne("10.7.0","highlightBlock will be removed entirely in v12.0"),ne("10.7.0","Please use highlightElement now."),Gt(fe)}Object.assign(z,{highlight:Dt,highlightAuto:Es,highlightAll:Ss,highlightElement:Gt,highlightBlock:ra,configure:bn,initHighlighting:Ma,initHighlightingOnLoad:Yl,registerLanguage:Dc,unregisterLanguage:Dr,listLanguages:Vl,getLanguage:Cn,registerAliases:aa,autoDetection:Ra,inherit:jc,addPlugin:Wt,removePlugin:Mc}),z.debugMode=function(){Ct=!1},z.safeMode=function(){Ct=!0},z.versionString=dt,z.regex={concat:w,lookahead:v,either:_,optional:E,anyNumberOfTimes:x};for(const fe in ye)typeof ye[fe]=="object"&&e(ye[fe]);return Object.assign(z,ye),z},Ln=Or({});return Ln.newInstance=()=>Or({}),Kp=Ln,Ln.HighlightJS=Ln,Ln.default=Ln,Kp}var xB=yB();const vB=Lm(xB),c0={},wB="hljs-";function kB(e){const t=vB.newInstance();return e&&o(e),{highlight:n,highlightAuto:a,listLanguages:s,register:o,registerAlias:c,registered:d};function n(h,p,b){const g=b||c0,v=typeof g.prefix=="string"?g.prefix:wB;if(!t.getLanguage(h))throw new Error("Unknown language: `"+h+"` is not registered");t.configure({__emitter:EB,classPrefix:v});const x=t.highlight(p,{ignoreIllegals:!0,language:h});if(x.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:x.errorRaised});const E=x._emitter.root,w=E.data;return w.language=x.language,w.relevance=x.relevance,E}function a(h,p){const g=(p||c0).subset||s();let v=-1,x=0,E;for(;++v<g.length;){const w=g[v];if(!t.getLanguage(w))continue;const S=n(w,h,p);S.data&&S.data.relevance!==void 0&&S.data.relevance>x&&(x=S.data.relevance,E=S)}return E||{type:"root",children:[],data:{language:void 0,relevance:x}}}function s(){return t.listLanguages()}function o(h,p){if(typeof h=="string")t.registerLanguage(h,p);else{let b;for(b in h)Object.hasOwn(h,b)&&t.registerLanguage(b,h[b])}}function c(h,p){if(typeof h=="string")t.registerAliases(typeof p=="string"?p:[...p],{languageName:h});else{let b;for(b in h)if(Object.hasOwn(h,b)){const g=h[b];t.registerAliases(typeof g=="string"?g:[...g],{languageName:b})}}}function d(h){return!!t.getLanguage(h)}}class EB{constructor(t){this.options=t,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(t){if(t==="")return;const n=this.stack[this.stack.length-1],a=n.children[n.children.length-1];a&&a.type==="text"?a.value+=t:n.children.push({type:"text",value:t})}startScope(t){this.openNode(String(t))}endScope(){this.closeNode()}__addSublanguage(t,n){const a=this.stack[this.stack.length-1],s=t.root.children;n?a.children.push({type:"element",tagName:"span",properties:{className:[n]},children:s}):a.children.push(...s)}openNode(t){const n=this,a=t.split(".").map(function(c,d){return d?c+"_".repeat(d):n.options.classPrefix+c}),s=this.stack[this.stack.length-1],o={type:"element",tagName:"span",properties:{className:a},children:[]};s.children.push(o),this.stack.push(o)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const SB={};function Pg(e){const t=e||SB,n=t.aliases,a=t.detect||!1,s=t.languages||bB,o=t.plainText,c=t.prefix,d=t.subset;let h="hljs";const p=kB(s);if(n&&p.registerAlias(n),c){const b=c.indexOf("-");h=b===-1?c:c.slice(0,b)}return function(b,g){af(b,"element",function(v,x,E){if(v.tagName!=="code"||!E||E.type!=="element"||E.tagName!=="pre")return;const w=_B(v);if(w===!1||!w&&!a||w&&o&&o.includes(w))return;Array.isArray(v.properties.className)||(v.properties.className=[]),v.properties.className.includes(h)||v.properties.className.unshift(h);const S=Hz(v,{whitespace:"pre"});let _;try{_=w?p.highlight(w,S,{prefix:c}):p.highlightAuto(S,{prefix:c,subset:d})}catch(A){const T=A;if(w&&/Unknown language/.test(T.message)){g.message("Cannot highlight as `"+w+"`, it’s not registered",{ancestors:[E,v],cause:T,place:v.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw T}!w&&_.data&&_.data.language&&v.properties.className.push("language-"+_.data.language),_.children.length>0&&(v.children=_.children)})}}function _B(e){const t=e.properties.className;let n=-1;if(!Array.isArray(t))return;let a;for(;++n<t.length;){const s=String(t[n]);if(s==="no-highlight"||s==="nohighlight")return!1;!a&&s.slice(0,5)==="lang-"&&(a=s.slice(5)),!a&&s.slice(0,9)==="language-"&&(a=s.slice(9))}return a}function NB({name:e,onClose:t}){const n=ze(),{data:a,isLoading:s,isError:o,error:c}=rt({queryKey:["skill",e],queryFn:()=>mO(e)});return C.useEffect(()=>{const d=h=>{h.key==="Escape"&&t()};return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[t]),f.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-40 flex items-start justify-center p-6 bg-black/30 overflow-auto",children:f.jsxs("div",{className:"nb-card mt-8 w-full max-w-4xl",children:[f.jsxs("header",{className:"flex items-start justify-between gap-4 mb-4",children:[f.jsxs("div",{children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-3xl font-bold",children:e}),a&&f.jsxs("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:[a.category," · ",a.origin||"local"]})]}),f.jsx("button",{onClick:t,className:"nb-btn nb-btn-mint p-2","aria-label":n("skillDetail.close.aria"),type:"button",children:f.jsx(Si,{size:16,strokeWidth:3})})]}),s&&f.jsx("p",{children:n("skillDetail.loading")}),o&&f.jsx("p",{className:"text-[var(--color-crashed)]",children:n("skillDetail.error.load",{detail:c instanceof Error?c.message:String(c)})}),a&&f.jsxs("div",{className:"flex flex-col gap-4",children:[f.jsxs("div",{children:[f.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:n("skillDetail.section.preview")}),f.jsx("div",{className:"prose-chat bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg p-4 max-h-80 overflow-auto text-sm",children:a.body?f.jsx(Dg,{remarkPlugins:[Ig],rehypePlugins:[Pg],children:a.body}):f.jsx("p",{className:"text-[var(--color-text-muted)] italic",children:"(empty)"})})]}),a.references.length>0&&f.jsxs("div",{children:[f.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:"References"}),f.jsx("ul",{className:"flex flex-col gap-2",children:a.references.map(d=>f.jsx(CB,{skillName:e,file:d.name,lines:d.lines},d.name))})]})]})]})})}function CB({skillName:e,file:t,lines:n}){const a=ze(),[s,o]=C.useState(!1),{data:c,isLoading:d,isError:h,error:p}=rt({queryKey:["skill-ref",e,t],queryFn:()=>gO(e,t),enabled:s,staleTime:1/0});return f.jsxs("li",{className:"border-2 border-[var(--color-text)] rounded-lg overflow-hidden bg-[var(--color-bg-cream)]",children:[f.jsxs("button",{type:"button",onClick:()=>o(b=>!b),"aria-label":a("skillDetail.toggleSection.aria",{action:a(s?"skillDetail.collapse":"skillDetail.expand"),file:t}),"aria-expanded":s,className:"w-full flex items-center gap-2 px-3 py-2 text-sm font-[family-name:var(--font-mono)] hover:bg-[var(--color-accent-yellow)] transition-colors",children:[f.jsx(Bd,{size:12,strokeWidth:3,className:["transition-transform",s?"rotate-90":""].join(" ")}),f.jsx(kc,{size:12,strokeWidth:2.5}),f.jsx("span",{className:"flex-1 text-left font-bold",children:t}),f.jsxs("span",{className:"text-xs text-[var(--color-text-subtle)]",children:[n," lines"]})]}),s&&f.jsxs("div",{className:"px-4 py-3 border-t-2 border-[var(--color-text)] bg-[var(--color-bg)] max-h-96 overflow-auto",children:[d&&f.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:a("skillDetail.loading")}),h&&f.jsx("p",{className:"text-xs text-[var(--color-crashed)]",children:a("skillDetail.error.load",{detail:p instanceof Error?p.message:String(p)})}),c&&f.jsx("div",{className:"prose-chat text-sm",children:f.jsx(Dg,{remarkPlugins:[Ig],rehypePlugins:[Pg],children:c.content})})]})]})}const TB=[{value:"all",labelKey:"skills.category.all"},{value:"language",labelKey:"skills.category.language"},{value:"end",labelKey:"skills.category.end"},{value:"persona",labelKey:"skills.category.persona"},{value:"workflow",labelKey:"skills.category.workflow"},{value:"other",labelKey:"skills.category.other"}],AB={language:"var(--color-accent-purple)",end:"var(--color-secondary)",persona:"var(--color-primary)",workflow:"var(--color-accent-mint)",other:"var(--color-bg-cream)"};function jB(){const e=ze(),[t,n]=C.useState("all"),[a,s]=C.useState(""),[o,c]=C.useState(null),d=En(),{data:h,isLoading:p}=rt({queryKey:["skills"],queryFn:()=>pg()}),b=rt({queryKey:["projects"],queryFn:Nr}),g=C.useMemo(()=>((h==null?void 0:h.data)??[]).filter(E=>!(t!=="all"&&E.category!==t||a&&!E.name.toLowerCase().includes(a.toLowerCase()))),[h,t,a]),v=C.useMemo(()=>{const x=(h==null?void 0:h.data)??[],E={all:x.length};for(const w of x)E[w.category]=(E[w.category]??0)+1;return E},[h]);return f.jsxs("div",{className:"flex flex-col gap-4 max-w-full",children:[f.jsxs("header",{className:"flex items-center justify-between flex-wrap gap-3",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold",children:"Skills 🎯"}),f.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:p?e("common.loading"):e("skills.subtitleCount",{count:(h==null?void 0:h.data.length)??0})})]}),f.jsx("div",{className:"flex gap-3 items-center",children:f.jsxs("button",{className:"nb-btn nb-btn-mint",onClick:async()=>{await yO(),d.invalidateQueries({queryKey:["skills"]})},type:"button",children:[f.jsx(Er,{size:14,strokeWidth:2.5}),"Sync bundled"]})})]}),f.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[f.jsxs("div",{className:"relative flex-1 max-w-md",children:[f.jsx(kd,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--color-text-subtle)]"}),f.jsx("input",{className:"nb-input pl-9 w-full",placeholder:e("skills.search.placeholder"),value:a,onChange:x=>s(x.target.value),"aria-label":e("skills.search.aria")})]}),f.jsx("div",{className:"flex gap-1 p-1 bg-[var(--color-bg)] border-[2px] border-[var(--color-text)] rounded-full shadow-[2px_2px_0_var(--color-text)]",children:TB.map(x=>f.jsxs("button",{type:"button",onClick:()=>n(x.value),className:["px-3 py-1 rounded-full text-xs font-bold font-[family-name:var(--font-body)]",t===x.value?"bg-[var(--color-text)] text-[var(--color-bg)]":"text-[var(--color-text-muted)] hover:text-[var(--color-text)]"].join(" "),children:[e(x.labelKey)," ",v[x.value]]},x.value))})]}),f.jsx("div",{className:"grid gap-4 grid-cols-[repeat(auto-fill,minmax(280px,1fr))]",children:g.map(x=>{var E;return f.jsx(OB,{skill:x,projectCount:((E=b.data)==null?void 0:E.data.length)??0,onOpen:()=>c(x.name)},x.name)})}),o&&f.jsx(NB,{name:o,onClose:()=>c(null)})]})}function OB({skill:e,projectCount:t,onOpen:n}){const a=AB[e.category];return f.jsxs("article",{onClick:n,onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),n())},tabIndex:0,role:"button","aria-label":`Open ${e.name}`,className:"nb-card nb-card-interactive flex flex-col gap-3",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("h3",{className:"font-[family-name:var(--font-heading)] font-bold text-lg",children:e.name}),f.jsx("span",{className:"nb-badge text-[10px]",style:{background:a},children:e.category})]}),f.jsx("p",{className:"text-sm text-[var(--color-text-muted)] leading-5 line-clamp-3",children:e.description||"(no description)"}),f.jsxs("div",{className:"flex items-center justify-between text-xs font-[family-name:var(--font-mono)] pt-2 border-t-[1.5px] border-dashed border-[var(--color-border-light)]",children:[f.jsx("span",{className:"font-bold",children:e.linkedProjects.length>0?`● linked in ${e.linkedProjects.length}`:"○ not linked"}),f.jsxs("span",{className:"text-[var(--color-text-subtle)]",children:[t," projects"]})]})]})}function DB(){var o;const e=ze(),t=rt({queryKey:["system-info"],queryFn:wk}),n=rt({queryKey:["system-env"],queryFn:bA}),[a,s]=C.useState(!1);return f.jsxs("div",{className:"flex flex-col gap-6 max-w-4xl",children:[f.jsx("header",{children:f.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold",children:e("system.h1")})}),f.jsx(MB,{current:(o=t.data)==null?void 0:o.version}),f.jsxs("section",{className:"nb-card",children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-3",children:e("system.runtime")}),t.data?f.jsxs("dl",{className:"grid grid-cols-[160px_1fr] gap-y-2 text-sm",children:[f.jsx("dt",{className:"font-bold",children:"Node"}),f.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.data.nodeVersion}),f.jsx("dt",{className:"font-bold",children:"Platform"}),f.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.data.platform}),f.jsx("dt",{className:"font-bold",children:"PID"}),f.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.data.pid??"—"}),f.jsx("dt",{className:"font-bold",children:"Uptime"}),f.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:zB(t.data.uptimeMs)})]}):f.jsx("p",{className:"text-[var(--color-text-muted)]",children:e("common.loading")})]}),f.jsxs("section",{className:"nb-card",children:[f.jsxs("div",{className:"flex items-center justify-between mb-3",children:[f.jsxs("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold",children:[e("system.env.title.prefix"),f.jsx("code",{className:"text-sm font-[family-name:var(--font-mono)] font-normal bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] px-2 py-0.5 rounded",children:"~/.coral/env"})]}),a?f.jsx("span",{className:"text-xs text-[var(--color-stuck)] font-bold",children:e("system.env.editing.label")}):f.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>s(!0),type:"button","aria-label":e("system.env.edit.aria"),children:[f.jsx(Wm,{size:12,strokeWidth:2.5})," ",e("system.env.edit.button")]})]}),a?f.jsx(RB,{onClose:()=>{s(!1),n.refetch()}}):n.data&&n.data.exists?f.jsx("dl",{className:"grid grid-cols-[220px_1fr] gap-y-1 text-sm font-[family-name:var(--font-mono)]",children:n.data.entries.map(c=>f.jsxs("div",{className:"contents",children:[f.jsxs("dt",{className:"font-bold flex items-center gap-2",children:[c.masked&&f.jsx("span",{className:"text-[var(--color-stuck)]",children:"🔒"}),c.key]}),f.jsx("dd",{className:"text-[var(--color-text-muted)] truncate",children:c.value})]},c.key))}):f.jsxs("p",{className:"text-[var(--color-text-muted)] text-sm",children:[e("system.env.empty.before"),f.jsx("code",{className:"bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] px-2 py-0.5 rounded font-[family-name:var(--font-mono)]",children:"sps setup"}),e("system.env.empty.after")]})]}),f.jsx(LB,{})]})}function MB({current:e}){var w;const t=ze(),{confirm:n,alert:a}=Ci(),[s,o]=C.useState(!1),[c,d]=C.useState(null),h=rt({queryKey:["latest-version"],queryFn:vA,enabled:!1}),[p,b]=C.useState(null),[g,v]=C.useState("npm i -g @coralai/sps-cli@latest"),x=async()=>{var _;if(await n({title:t("system.upgrade.confirm.title"),body:t("system.upgrade.confirm.body",{current:e??"?",latest:((_=h.data)==null?void 0:_.latest)??"?"}),confirm:t("system.upgrade.confirm.button")})){o(!0),d(null),b(null);try{const A=await wA();if(d(A.output),b(A.installedVersion),v(A.command),A.ok)a({title:t("system.upgrade.success.title"),body:t("system.upgrade.success.body",{version:A.installedVersion??"?"})});else{const T=A.installedVersion&&A.installedVersion===e?t("system.upgrade.notEffective.same",{version:A.installedVersion}):t("system.upgrade.notEffective.notInstalled");a({title:t("system.upgrade.notEffective.title"),body:T})}}catch(A){d(A.message),a({title:t("system.upgrade.error.title"),body:A.message})}finally{o(!1)}}},E=async()=>{const S=h.data&&!h.data.upToDate?`npm i -g @coralai/sps-cli@${h.data.latest}`:g;try{await navigator.clipboard.writeText(S),a({title:t("system.upgrade.copy.success.title"),body:t("system.upgrade.copy.success.body",{cmd:S})})}catch{a({title:t("system.upgrade.copy.fail.title"),body:t("system.upgrade.copy.fail.body",{cmd:S})})}};return f.jsxs("section",{className:"nb-card",children:[f.jsxs("div",{className:"flex items-center justify-between mb-3",children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold",children:t("system.upgrade.title")}),f.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>h.refetch(),disabled:h.isFetching||!e,type:"button","aria-label":t("system.upgrade.checkLatest.aria"),children:[h.isFetching?f.jsx(jt,{size:12,strokeWidth:3,className:"animate-spin"}):f.jsx(Er,{size:12,strokeWidth:2.5}),t("system.upgrade.checkUpdate")]})]}),f.jsxs("dl",{className:"grid grid-cols-[160px_1fr] gap-y-2 text-sm",children:[f.jsx("dt",{className:"font-bold",children:t("system.upgrade.label.current")}),f.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:e??"—"}),h.data&&f.jsxs(f.Fragment,{children:[f.jsx("dt",{className:"font-bold",children:t("system.upgrade.label.latest")}),f.jsxs("dd",{className:"font-[family-name:var(--font-mono)] flex items-center gap-2 flex-wrap",children:[h.data.latest,h.data.upToDate?f.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:t("system.upgrade.latestPill")}):f.jsxs(f.Fragment,{children:[f.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"3px 10px",fontSize:11},onClick:x,disabled:s,type:"button","aria-label":t("system.upgrade.button.upgradeAria"),children:[s?f.jsx(jt,{size:11,strokeWidth:3,className:"animate-spin"}):f.jsx(sk,{size:11,strokeWidth:2.5}),t("system.upgrade.button.upgrade")]}),f.jsxs("button",{className:"nb-btn",style:{padding:"3px 10px",fontSize:11},onClick:E,type:"button","aria-label":t("system.upgrade.button.copyAria"),title:t("system.upgrade.button.copyTitle"),children:[f.jsx(eT,{size:11,strokeWidth:2.5})," ",t("system.upgrade.button.copy")]})]})]})]}),p&&f.jsxs(f.Fragment,{children:[f.jsx("dt",{className:"font-bold",children:t("system.upgrade.label.installed")}),f.jsxs("dd",{className:"font-[family-name:var(--font-mono)] flex items-center gap-2",children:[p,p===((w=h.data)==null?void 0:w.latest)?f.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:t("system.upgrade.installed.ok")}):p===e?f.jsx("span",{className:"nb-status",style:{background:"var(--color-stuck-bg)",color:"var(--color-stuck)"},children:t("system.upgrade.installed.fail")}):null]})]}),h.isError&&f.jsxs(f.Fragment,{children:[f.jsx("dt",{className:"font-bold",children:t("system.upgrade.label.check")}),f.jsx("dd",{className:"text-[var(--color-crashed)] text-xs",children:h.error instanceof Error?h.error.message:String(h.error)})]})]}),c&&f.jsx("pre",{className:"mt-3 text-xs font-[family-name:var(--font-mono)] bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg p-3 max-h-40 overflow-auto whitespace-pre-wrap",children:c})]})}function RB({onClose:e}){const t=ze(),n=En(),{alert:a}=Ci(),s=rt({queryKey:["system-env-raw"],queryFn:yA}),[o,c]=C.useState(null),[d,h]=C.useState(null);C.useEffect(()=>{s.data&&o===null&&(c(s.data.content),h(s.data.etag))},[s.data,o]);const p=o!==null&&s.data&&o!==s.data.content,b=Mn({mutationFn:()=>{if(o===null)throw new Error("no draft");return xA(o,d??"")},onSuccess:()=>{n.invalidateQueries({queryKey:["system-env"]}),n.invalidateQueries({queryKey:["system-env-raw"]}),e()},onError:g=>{const v=g.status;a({title:t(v===409?"system.env.error.conflict.title":"system.env.error.save.title"),body:v===409?t("system.env.error.conflict.body"):g instanceof Error?g.message:String(g)})}});return s.isLoading?f.jsx("p",{className:"text-[var(--color-text-muted)]",children:t("common.loading")}):f.jsxs("div",{children:[f.jsx("p",{className:"text-xs text-[var(--color-stuck)] font-bold mb-2",children:t("system.env.warning")}),f.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",style:{minHeight:320,resize:"vertical"},value:o??"",onChange:g=>c(g.target.value),spellCheck:!1,"aria-label":t("system.env.aria")}),f.jsxs("div",{className:"flex items-center justify-between mt-3",children:[f.jsxs("span",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)]",children:[d?`etag: ${d}`:"",p?t("system.env.dirtyMark"):""]}),f.jsxs("div",{className:"flex gap-2",children:[f.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px"},onClick:e,disabled:b.isPending,type:"button",children:[f.jsx(Si,{size:12,strokeWidth:3})," ",t("system.env.cancel")]}),f.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 12px"},onClick:()=>b.mutate(),disabled:!p||b.isPending,type:"button","aria-label":t("system.env.save.aria"),children:[b.isPending?f.jsx(jt,{size:12,strokeWidth:3,className:"animate-spin"}):f.jsx(Pd,{size:12,strokeWidth:3}),t("system.env.save")]})]})]})]})}function LB(){var v;const e=ze(),{alert:t}=Ci(),n=rt({queryKey:["projects"],queryFn:Nr}),[a,s]=C.useState({}),[o,c]=C.useState({}),[d,h]=C.useState({}),p=(((v=n.data)==null?void 0:v.data)??[]).map(x=>({project:x.name})),b=async(x,E)=>{c(w=>({...w,[x]:E?"fix":"check"}));try{const w=await kA(x,E);s(S=>({...S,[x]:w})),h(S=>({...S,[x]:!0}))}catch(w){t({title:e(E?"system.diagnostics.error.fix":"system.diagnostics.error.check"),body:w instanceof Error?w.message:String(w)})}finally{c(w=>({...w,[x]:null}))}},g=async()=>{for(const x of p)await b(x.project,!1)};return f.jsxs("section",{className:"nb-card",children:[f.jsxs("div",{className:"flex items-center justify-between mb-3",children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold",children:e("system.diagnostics.title")}),f.jsxs("button",{className:"nb-btn nb-btn-mint",style:{padding:"6px 12px",fontSize:12},onClick:()=>{g()},disabled:p.length===0||Object.values(o).some(Boolean),type:"button",children:[f.jsx(Er,{size:12,strokeWidth:2.5}),e("system.diagnostics.checkAll")]})]}),p.length===0?f.jsx("p",{className:"text-[var(--color-text-muted)] text-sm",children:e("system.diagnostics.empty")}):f.jsx("ul",{className:"flex flex-col gap-2",children:p.map(x=>{const E=a[x.project],w=o[x.project],S=E?E.checks.filter(D=>D.status==="fail").length:0,_=E?E.checks.filter(D=>D.status==="warn").length:0,A=d[x.project]??!1,T=E!=null;return f.jsxs("li",{className:"bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg",children:[f.jsxs("div",{className:"flex items-center gap-3 px-3 py-2",children:[f.jsxs("button",{type:"button",onClick:()=>h(D=>({...D,[x.project]:!A})),disabled:!T,className:"flex items-center gap-2 flex-1 text-left min-w-0","aria-label":e(A?"system.diagnostics.collapseAria":"system.diagnostics.expandAria"),children:[T&&E.ok?f.jsx(fm,{size:16,className:"text-[var(--color-running)] shrink-0",strokeWidth:2.5}):T?f.jsx(sc,{size:16,className:"text-[var(--color-stuck)] shrink-0",strokeWidth:2.5}):f.jsx(fm,{size:16,className:"text-[var(--color-text-subtle)] shrink-0",strokeWidth:2.5}),T&&(A?f.jsx(wc,{size:12}):f.jsx(Bd,{size:12})),f.jsx("span",{className:"font-bold font-[family-name:var(--font-mono)]",children:x.project}),T?E.ok?f.jsx("span",{className:"text-xs text-[var(--color-running)] font-semibold",children:"OK"}):f.jsxs("span",{className:"text-xs text-[var(--color-stuck)] font-semibold",children:[S," fail · ",_," warn"]}):f.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:e("system.diagnostics.never")})]}),f.jsxs("button",{className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>{b(x.project,!1)},disabled:!!w,type:"button","aria-label":e("system.diagnostics.checkAria"),children:[w==="check"?f.jsx(jt,{size:11,strokeWidth:3,className:"animate-spin"}):f.jsx(Er,{size:11,strokeWidth:2.5}),e("system.diagnostics.check")]}),f.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"4px 10px",fontSize:11},onClick:()=>{b(x.project,!0)},disabled:!!w||T&&E.ok,type:"button","aria-label":e("system.diagnostics.fixAria"),title:T&&E.ok?e("system.diagnostics.noFixesNeeded"):e("system.diagnostics.fix.tip"),children:[w==="fix"?f.jsx(jt,{size:11,strokeWidth:3,className:"animate-spin"}):f.jsx(gk,{size:11,strokeWidth:2.5}),e("system.diagnostics.fix")]})]}),A&&T&&f.jsxs("div",{className:"border-t-2 border-dashed border-[var(--color-text)] px-3 py-2",children:[f.jsx("ul",{className:"flex flex-col gap-1 text-xs font-[family-name:var(--font-mono)]",children:E.checks.map((D,B)=>f.jsx(IB,{check:D},`${D.name}-${B}`))}),E.fixes.length>0&&f.jsxs("div",{className:"mt-3 bg-[var(--color-running-bg)] border-2 border-[var(--color-running)] rounded p-2",children:[f.jsx("div",{className:"text-xs font-bold text-[var(--color-running)] mb-1",children:e("system.diagnostics.fixed")}),f.jsx("ul",{className:"text-xs list-disc pl-4",children:E.fixes.map((D,B)=>f.jsx("li",{children:D},B))})]})]})]},x.project)})})]})}function IB({check:e}){const t=e.status==="pass"?f.jsx(fm,{size:12,className:"text-[var(--color-running)]",strokeWidth:2.5}):e.status==="fail"?f.jsx(sc,{size:12,className:"text-[var(--color-crashed)]",strokeWidth:2.5}):e.status==="warn"?f.jsx(sc,{size:12,className:"text-[var(--color-stuck)]",strokeWidth:2.5}):f.jsx("span",{className:"w-3 h-3 rounded-full bg-[var(--color-text-subtle)] inline-block"});return f.jsxs("li",{className:"flex items-start gap-2",children:[f.jsx("span",{className:"pt-0.5 shrink-0",children:t}),f.jsx("span",{className:"font-bold w-32 shrink-0",children:e.name}),f.jsx("span",{className:"text-[var(--color-text-muted)] break-words",children:e.message})]})}function zB(e){const t=Math.floor(e/1e3),n=Math.floor(t/3600),a=Math.floor(t%3600/60),s=t%60;return n>0?`${n}h ${a}m ${s}s`:a>0?`${a}m ${s}s`:`${s}s`}function BB(){return It("/api/chat/sessions")}function PB(e){return It(`/api/chat/sessions/${e}`)}async function Gp(e={}){const t=await fetch("/api/chat/sessions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error(`${t.status}: ${await t.text()}`);return await t.json()}async function UB(e){const t=await fetch(`/api/chat/sessions/${e}`,{method:"DELETE"});if(!t.ok)throw new Error(`${t.status}`)}async function FB(e,t,n){const a=await fetch(`/api/chat/sessions/${e}/messages`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:t,attachments:n})});if(!a.ok)throw new Error(`${a.status}: ${await a.text()}`);return await a.json()}async function qB(e){const t=await fetch(`/api/chat/sessions/${e}/interrupt`,{method:"POST"});if(!t.ok&&t.status!==204)throw new Error(`${t.status}: ${await t.text()}`)}function $B(e,t){const n=t?`?since=${encodeURIComponent(t)}`:"";return It(`/api/chat/sessions/${e}/messages${n}`)}function u0(){var ce,de,re,O,R,Q,j,ge,_e;const e=ze(),{sessionId:t}=Q0(),n=_r(),a=En(),{confirm:s,alert:o}=Ci(),c=rt({queryKey:["chat-sessions"],queryFn:BB}),d=rt({queryKey:["chat-session",t],queryFn:()=>PB(t??""),enabled:!!t}),[h,p]=C.useState(null),[b,g]=C.useState(""),[v,x]=C.useState(!1),E=C.useRef(null),[w,S]=C.useState(!1),[_,A]=C.useState([]),[T,D]=C.useState(!1),[B,M]=C.useState(!1),[q,F]=C.useState(!1),[ee,P]=C.useState(null);C.useEffect(()=>{if(!t)return;const Y=new EventSource(`/stream/chat/${encodeURIComponent(t)}`);let xe=!0;return Y.addEventListener("open",()=>{if(xe){xe=!1;return}const V=a.getQueryData(["chat-session",t]),ae=V!=null&&V.messages.length?V.messages[V.messages.length-1].ts:void 0;$B(t,ae).then(ye=>{ye.data.length!==0&&a.setQueryData(["chat-session",t],Pe=>{if(!Pe)return Pe;const Ot=new Set(Pe.messages.map(on=>on.id)),St=ye.data.filter(on=>!Ot.has(on.id));return St.length===0?Pe:{...Pe,messages:[...Pe.messages,...St],lastMessageAt:St[St.length-1].ts,messageCount:Pe.messageCount+St.length}})}).catch(()=>{})}),Y.addEventListener("chat.message",V=>{try{const ae=JSON.parse(V.data);a.setQueryData(["chat-session",t],ye=>{if(!ye||ye.messages.some(St=>St.id===ae.message.id))return ye;const Ot=ye.messages.findIndex(St=>St.role==="user"&&St.id.startsWith("optim-")&&St.content===ae.message.content);if(Ot>=0){const St=[...ye.messages];return St[Ot]=ae.message,{...ye,messages:St}}return{...ye,messages:[...ye.messages,ae.message]}})}catch{}}),Y.addEventListener("chat.message.pending",V=>{try{const ae=JSON.parse(V.data);p({id:ae.assistantId,blocks:[],done:!1,finalMessage:null})}catch{}}),Y.addEventListener("chat.message.chunk.text",V=>{try{const ae=JSON.parse(V.data);p(ye=>{if(!ye||ye.id!==ae.assistantId)return ye;const Pe=[...ye.blocks],Ot=Pe[Pe.length-1];return Ot&&Ot.type==="text"?Pe[Pe.length-1]={...Ot,target:Ot.target+ae.text}:Pe.push({type:"text",target:ae.text,displayed:""}),{...ye,blocks:Pe}})}catch{}}),Y.addEventListener("chat.message.chunk.tool_use",V=>{try{const ae=JSON.parse(V.data);p(ye=>!ye||ye.id!==ae.assistantId?ye:{...ye,blocks:[...ye.blocks,{type:"tool_use",id:ae.id,title:ae.title,kind:ae.kind,status:ae.status}]})}catch{}}),Y.addEventListener("chat.message.chunk.tool_update",V=>{try{const ae=JSON.parse(V.data);p(ye=>!ye||ye.id!==ae.assistantId?ye:{...ye,blocks:ye.blocks.map(Pe=>Pe.type==="tool_use"&&Pe.id===ae.id?{...Pe,status:ae.status}:Pe)})}catch{}}),Y.addEventListener("chat.message.complete",V=>{try{const ae=JSON.parse(V.data);p(ye=>ye&&ye.id===ae.assistantId?{...ye,done:!0,finalMessage:ae.message}:ye)}catch{}}),()=>Y.close()},[t,a]),C.useEffect(()=>{if(!h)return;const Y=h.blocks.reduce((V,ae)=>ae.type==="text"?V+(ae.target.length-ae.displayed.length):V,0);if(Y<=0){if(h.done&&h.finalMessage){const V=h.finalMessage;a.setQueryData(["chat-session",t],ae=>!ae||ae.messages.some(ye=>ye.id===V.id)?ae:{...ae,messages:[...ae.messages,V],lastMessageAt:V.ts,messageCount:ae.messageCount+1}),a.invalidateQueries({queryKey:["chat-sessions"]}),p(null),x(!1)}return}const xe=setTimeout(()=>{p(V=>{if(!V)return V;let ae=Math.max(1,Math.ceil(Y/40));const ye=V.blocks.map(Pe=>{if(Pe.type!=="text"||ae<=0)return Pe;const Ot=Pe.target.length-Pe.displayed.length;if(Ot<=0)return Pe;const St=Math.min(Ot,ae);return ae-=St,{...Pe,displayed:Pe.target.slice(0,Pe.displayed.length+St)}});return{...V,blocks:ye}})},25);return()=>clearTimeout(xe)},[h,a,t]),C.useEffect(()=>{const Y=E.current;Y&&(Y.scrollTop=Y.scrollHeight)},[d.data,h]);const X=C.useCallback(async(Y={})=>{var xe,V;try{const ae=await Gp({cwd:((xe=Y.cwd)==null?void 0:xe.trim())||void 0,title:((V=Y.title)==null?void 0:V.trim())||void 0});a.invalidateQueries({queryKey:["chat-sessions"]}),n(`/chat/${ae.id}`),S(!1)}catch(ae){o({title:e("chat.error.create.title"),body:ae instanceof Error?ae.message:String(ae)})}},[a,n,o,e]),J=C.useCallback(async()=>{const Y=b.trim();if(!Y&&_.length===0||v)return;let xe=t;if(!xe){const ye=await Gp();a.invalidateQueries({queryKey:["chat-sessions"]}),xe=ye.id,n(`/chat/${xe}`,{replace:!0})}const V=_.map(ye=>ye.path),ae={id:`optim-${Date.now()}`,role:"user",content:Y||e("chat.placeholder.attachment"),ts:new Date().toISOString(),status:"complete",attachments:V.length>0?V:void 0};a.setQueryData(["chat-session",xe],ye=>ye?{...ye,messages:[...ye.messages,ae],lastMessageAt:ae.ts,messageCount:ye.messageCount+1}:{id:xe,createdAt:ae.ts,lastMessageAt:ae.ts,title:Y.slice(0,60)||e("chat.placeholder.attachmentTitle"),project:null,messageCount:1,messages:[ae]}),g(""),A([]),x(!0);try{await FB(xe,Y||e("chat.placeholder.viewAttachment"),V.length>0?V:void 0)}catch(ye){x(!1),console.error("sendMessage failed",ye),o({title:e("chat.error.send.title"),body:ye instanceof Error?ye.message:String(ye)})}},[b,_,v,t,a,n,o,e]),pe=C.useCallback(async Y=>{if(Y.size>kk){o({title:e("chat.error.fileTooBig.title"),body:e("chat.error.fileTooBig.body",{size:(Y.size/1024/1024).toFixed(2),name:Y.name})});return}let xe=t;if(!xe){const V=await Gp();a.invalidateQueries({queryKey:["chat-sessions"]}),xe=V.id,n(`/chat/${xe}`,{replace:!0})}D(!0);try{const V=await GA(xe,Y);A(ae=>[...ae,{path:V.path,name:V.name}])}catch(V){o({title:e("chat.error.uploadAttachment.title"),body:V instanceof Error?V.message:String(V)})}finally{D(!1)}},[t,a,n,o,e]),ue=C.useCallback(Y=>{A(xe=>xe.filter(V=>V.path!==Y))},[]),te=C.useCallback(async(Y,xe)=>{await s({title:e("chat.delete.confirm.title"),body:e(xe==="cli"?"chat.delete.confirm.body.cli":"chat.delete.confirm.body.console"),confirm:e("chat.delete.confirm.button"),danger:!0})&&(await UB(Y),a.invalidateQueries({queryKey:["chat-sessions"]}),t===Y&&n("/chat"))},[a,t,n,s,e]),$=C.useCallback(async()=>{if(t)try{await qB(t)}catch(Y){o({title:e("chat.error.interrupt.title"),body:Y instanceof Error?Y.message:String(Y)})}},[t,o,e]);return f.jsxs("div",{className:"grid grid-cols-[260px_1fr] gap-4 h-[calc(100vh-140px)]",children:[f.jsxs("aside",{className:"nb-card p-3 overflow-auto flex flex-col gap-2",children:[f.jsxs("button",{className:"nb-btn nb-btn-primary w-full justify-center",onClick:()=>S(!0),type:"button",children:[f.jsx(Bi,{size:14,strokeWidth:3}),e("chat.list.new")]}),f.jsx("div",{className:"mt-2 text-xs font-[family-name:var(--font-heading)] uppercase tracking-wider text-[var(--color-text-muted)] px-2",children:e("chat.list.heading",{count:((ce=c.data)==null?void 0:ce.data.length)??0})}),f.jsxs("div",{className:"flex flex-col gap-1.5 mt-1",children:[(((de=c.data)==null?void 0:de.data)??[]).map(Y=>f.jsxs("div",{className:["group flex items-start gap-2 p-2 rounded-lg border-2 border-transparent",t===Y.id?"bg-[var(--color-accent-mint)] border-[var(--color-text)] shadow-[2px_2px_0_var(--color-text)]":"hover:bg-[var(--color-bg-cream)] hover:border-[var(--color-text)]"].join(" "),children:[f.jsxs("button",{type:"button","aria-label":e("chat.list.openAria",{title:Y.title,cwd:Y.cwd?e("chat.list.cwdSuffix",{cwd:Y.cwd}):""}),onClick:()=>n(`/chat/${Y.id}`),className:"flex items-start gap-2 flex-1 min-w-0 text-left",children:[f.jsx(Yv,{size:14,strokeWidth:2.5,className:"mt-0.5 flex-shrink-0"}),f.jsxs("div",{className:"flex-1 min-w-0",children:[f.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[f.jsx("p",{className:"text-sm font-semibold truncate flex-1",children:Y.title}),Y.source==="cli"&&f.jsx("span",{className:"flex-shrink-0 px-1.5 py-0 rounded-md bg-[var(--color-accent-purple)] border-2 border-[var(--color-text)] text-[9px] font-[family-name:var(--font-mono)] uppercase tracking-wider leading-tight",title:e("chat.cliBadge.tooltip"),children:e("chat.cliBadge")})]}),f.jsx("p",{className:"text-[10px] text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] truncate",children:e("chat.list.msgs",{count:Y.messageCount,time:X1(Y.lastMessageAt??Y.createdAt,e)})}),Y.cwd&&f.jsxs("p",{className:"text-[10px] text-[var(--color-text-subtle)] font-[family-name:var(--font-mono)] truncate flex items-center gap-1",title:Y.cwd,children:[f.jsx(oc,{size:9,strokeWidth:2.5,className:"flex-shrink-0"}),f.jsx("span",{className:"truncate",dir:"rtl",children:Y.cwd})]})]})]}),f.jsx("button",{type:"button","aria-label":Y.source==="cli"?e("chat.list.deleteCli.aria"):e("chat.list.delete.aria"),className:"opacity-0 group-hover:opacity-100 p-1 hover:text-[var(--color-crashed)]",onClick:xe=>{xe.stopPropagation(),te(Y.id,Y.source)},children:f.jsx(zl,{size:12})})]},Y.id)),(((re=c.data)==null?void 0:re.data)??[]).length===0&&f.jsx("p",{className:"text-xs text-[var(--color-text-subtle)] italic text-center py-4",children:e("chat.list.empty")})]})]}),f.jsx("div",{className:"nb-card p-0 flex flex-col overflow-hidden",children:t?f.jsxs(f.Fragment,{children:[f.jsxs("header",{className:"px-4 py-3 border-b-2 border-[var(--color-text)] bg-[var(--color-bg-cream)]",children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] font-bold text-lg",children:((O=d.data)==null?void 0:O.title)??e("common.loading")}),f.jsx("p",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)]",children:t}),((R=d.data)==null?void 0:R.cwd)&&f.jsxs("p",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] flex items-center gap-1 mt-1",title:d.data.cwd,children:[f.jsx(oc,{size:11,strokeWidth:2.5,className:"flex-shrink-0"}),f.jsx("span",{className:"truncate",children:d.data.cwd})]})]}),f.jsxs("div",{ref:E,className:"flex-1 overflow-auto p-4 flex flex-col gap-4",children:[(((Q=d.data)==null?void 0:Q.messages)??[]).map(Y=>f.jsx(GB,{msg:Y,sessionId:t??null,onPreviewAttachment:xe=>P(xe)},Y.id)),h&&f.jsx(YB,{pending:h}),!d.isLoading&&(((j=d.data)==null?void 0:j.messages)??[]).length===0&&!h&&!v&&f.jsx("p",{className:"text-center text-[var(--color-text-subtle)] italic mt-12",children:e("chat.session.empty")})]}),((ge=d.data)==null?void 0:ge.source)==="cli"?f.jsxs("div",{className:"border-t-2 border-[var(--color-text)] p-4 bg-[var(--color-accent-purple)]",children:[f.jsxs("p",{className:"text-sm font-[family-name:var(--font-mono)] text-[var(--color-text-muted)] text-center",children:[f.jsx("strong",{children:e("chat.cli.banner.bold")})," — ",e("chat.cli.banner")]}),f.jsxs("pre",{className:"mt-2 px-3 py-2 bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded-md text-xs font-[family-name:var(--font-mono)] overflow-x-auto",children:["sps agent --chat --name ",(t??"").replace(/^session-/,"")]})]}):f.jsxs("div",{className:["border-t-2 border-[var(--color-text)] p-3 bg-[var(--color-bg-cream)] transition-colors",q?"bg-[var(--color-accent-mint)]":""].join(" "),onDragOver:Y=>{Y.dataTransfer.types.includes("Files")&&(Y.preventDefault(),Y.dataTransfer.dropEffect="copy",q||F(!0))},onDragLeave:()=>F(!1),onDrop:Y=>{if(!Y.dataTransfer.types.includes("Files"))return;Y.preventDefault(),F(!1);const xe=Array.from(Y.dataTransfer.files??[]);for(const V of xe)pe(V)},children:[(_.length>0||T)&&f.jsxs("div",{className:"flex flex-wrap gap-2 mb-2",children:[_.map(Y=>f.jsxs("button",{type:"button",className:"flex items-center gap-1.5 px-2 py-1 rounded-md bg-[var(--color-bg)] border-2 border-[var(--color-text)] text-xs font-[family-name:var(--font-mono)] hover:bg-[var(--color-accent-mint)] group",onClick:()=>P(Y.path),title:e("chat.attachment.previewTooltip",{name:Y.name,path:Y.path}),children:[Md(Y.path)?f.jsx(kT,{size:11,strokeWidth:2.5,className:"flex-shrink-0"}):f.jsx(kc,{size:11,strokeWidth:2.5,className:"flex-shrink-0"}),f.jsx("span",{className:"truncate max-w-[180px]",children:Y.name}),f.jsx("span",{role:"button","aria-label":e("chat.input.removeAttachment",{name:Y.name}),className:"ml-1 hover:text-[var(--color-crashed)] cursor-pointer",onClick:xe=>{xe.stopPropagation(),ue(Y.path)},children:f.jsx(Si,{size:11,strokeWidth:3})})]},Y.path)),T&&f.jsxs("span",{className:"flex items-center gap-1.5 px-2 py-1 text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)]",children:[f.jsx(jt,{size:11,strokeWidth:2.5,className:"animate-spin"}),e("chat.input.uploading")]})]}),f.jsxs("div",{className:"flex gap-2 items-end",children:[f.jsx("button",{type:"button",className:"nb-btn flex-shrink-0",onClick:()=>M(!0),disabled:v,"aria-label":e("chat.input.attach.aria"),title:e("chat.input.attach.title"),children:f.jsx(DT,{size:14,strokeWidth:2.5})}),f.jsx("textarea",{className:"nb-input flex-1 resize-none",placeholder:e(q?"chat.input.dragOver":"chat.input.placeholder"),rows:2,value:b,onChange:Y=>g(Y.target.value),onKeyDown:Y=>{Y.key==="Enter"&&!Y.shiftKey&&!Y.nativeEvent.isComposing&&(Y.preventDefault(),J())},onPaste:Y=>{const V=Array.from(Y.clipboardData.items??[]).filter(ae=>ae.kind==="file"&&ae.type.startsWith("image/"));if(V.length!==0){Y.preventDefault();for(const ae of V){const ye=ae.getAsFile();ye&&pe(ye)}}},"aria-label":e("chat.input.aria")}),h?f.jsxs("button",{className:"nb-btn nb-btn-danger",onClick:$,type:"button","aria-label":e("chat.input.interrupt.aria"),children:[f.jsx(fk,{size:14,strokeWidth:3}),e("chat.input.interrupt")]}):f.jsxs("button",{className:"nb-btn nb-btn-primary",onClick:J,disabled:!b.trim()&&_.length===0||v,type:"button","aria-label":e("chat.input.send.aria"),children:[v?f.jsx(jt,{size:14,strokeWidth:3,className:"animate-spin"}):f.jsx(KT,{size:14,strokeWidth:3}),e("chat.input.send")]})]})]})]}):f.jsx("div",{className:"flex-1 flex items-center justify-center p-8",children:f.jsxs("div",{className:"text-center max-w-md",children:[f.jsx("div",{className:"w-20 h-20 rounded-2xl bg-[var(--color-accent-mint)] border-[3px] border-[var(--color-text)] shadow-[3px_3px_0_var(--color-text)] flex items-center justify-center mx-auto mb-4",children:f.jsx(Yv,{size:32,strokeWidth:2.5})}),f.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold mb-2",children:e("chat.empty.title")}),f.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mb-4",children:e("chat.empty.hint")}),f.jsx("p",{className:"text-xs text-[var(--color-text-subtle)] italic",children:e("chat.empty.shortcuts")})]})})}),w&&f.jsx(KB,{onCancel:()=>S(!1),onCreate:Y=>X(Y)}),B&&f.jsx(Zm,{mode:"file",title:e("chat.filePicker.title"),initialPath:((_e=d.data)==null?void 0:_e.cwd)??void 0,onCancel:()=>M(!1),onSelect:Y=>{A(xe=>{if(xe.some(ae=>ae.path===Y))return xe;const V=Y.split(/[\\/]/).pop()||Y;return[...xe,{path:Y,name:V}]}),M(!1)}}),ee&&t&&f.jsx(HB,{sessionId:t,path:ee,onClose:()=>P(null)})]})}function Md(e){return/\.(png|jpe?g|gif|webp|svg|avif)$/i.test(e)}function d0(e){return/\.pdf$/i.test(e)}function Qp(e){return/\.(txt|md|log|json|yaml|yml|csv|html|xml|tsx?|jsx?|css|sh|ya?ml|conf|toml|ini|env|gitignore|sql|py|rb|go|rs|java|kt|swift|c|cc|cpp|h|hpp)$/i.test(e)}function HB({sessionId:e,path:t,onClose:n}){const a=ze(),[s,o]=C.useState(null),[c,d]=C.useState(null);C.useEffect(()=>{const b=g=>{g.key==="Escape"&&(g.preventDefault(),n())};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[n]),C.useEffect(()=>{if(!Qp(t))return;let b=!1;return fetch(pm(e,t)).then(async g=>{if(!g.ok)throw new Error(`${g.status}`);return g.text()}).then(g=>{b||o(g.length>2e5?g.slice(0,2e5)+`
556
-
557
- …(truncated)`:g)}).catch(g=>{b||d(g instanceof Error?g.message:String(g))}),()=>{b=!0}},[e,t]);const h=pm(e,t),p=t.split(/[\\/]/).pop()??t;return f.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-[rgba(45,55,72,0.6)] p-4",role:"presentation",children:f.jsxs("div",{className:"nb-card bg-[var(--color-bg)] max-w-3xl w-full p-5 flex flex-col",style:{maxHeight:"85vh"},role:"dialog","aria-modal":"true","aria-label":a("chat.attachment.preview.aria",{name:p}),children:[f.jsxs("header",{className:"flex items-center justify-between mb-3 shrink-0",children:[f.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[f.jsx(aT,{size:16,strokeWidth:2.5,className:"flex-shrink-0"}),f.jsx("h3",{className:"font-[family-name:var(--font-heading)] font-bold text-base truncate",children:p})]}),f.jsx("button",{type:"button",className:"p-1 hover:bg-[var(--color-bg-cream)] rounded flex-shrink-0",onClick:n,"aria-label":a("chat.attachment.close.aria"),children:f.jsx(Si,{size:16,strokeWidth:3})})]}),f.jsx("p",{className:"text-[10px] text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] truncate mb-2 shrink-0",title:t,dir:"rtl",children:t}),f.jsxs("div",{className:"flex-1 overflow-auto border-2 border-[var(--color-text)] rounded-lg bg-[var(--color-bg-cream)] min-h-0",children:[Md(t)&&f.jsx("div",{className:"flex items-center justify-center p-4",children:f.jsx("img",{src:h,alt:`Preview: ${p}`,className:"max-w-full max-h-[60vh] object-contain"})}),d0(t)&&f.jsx("iframe",{src:h,title:`PDF: ${p}`,className:"w-full",style:{height:"60vh",border:0}}),Qp(t)&&f.jsx("pre",{className:"p-3 text-xs font-[family-name:var(--font-mono)] whitespace-pre-wrap break-words",children:c?f.jsx("span",{className:"text-[var(--color-crashed)]",children:a("chat.attachment.readErr",{detail:c})}):s===null?f.jsx("span",{className:"text-[var(--color-text-muted)]",children:a("chat.attachment.loading")}):s}),!Md(t)&&!d0(t)&&!Qp(t)&&f.jsxs("div",{className:"p-6 text-center text-sm text-[var(--color-text-muted)]",children:[f.jsx("p",{className:"mb-3",children:a("chat.attachment.unsupported")}),f.jsx("a",{href:h,download:p,className:"nb-btn nb-btn-primary inline-flex",children:a("chat.attachment.download")})]})]})]})})}function KB({onCancel:e,onCreate:t}){const n=ze(),[a,s]=C.useState(""),[o,c]=C.useState(""),[d,h]=C.useState(!1),[p,b]=C.useState(!1);C.useEffect(()=>{if(p)return;const v=x=>{x.key==="Escape"&&(x.preventDefault(),e())};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[e,p]);const g=async()=>{if(!d){h(!0);try{t({title:a.trim()||void 0,cwd:o.trim()||void 0})}finally{h(!1)}}};return f.jsxs("div",{className:"fixed inset-0 z-40 flex items-center justify-center bg-[rgba(45,55,72,0.4)] p-4",role:"presentation",children:[f.jsxs("div",{className:"nb-card bg-[var(--color-bg)] max-w-md w-full p-5",role:"dialog","aria-modal":"true","aria-label":n("chat.newSession.title.aria"),children:[f.jsxs("header",{className:"flex items-center justify-between mb-4",children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] font-bold text-lg",children:n("chat.newSession.title")}),f.jsx("button",{type:"button",className:"p-1 hover:bg-[var(--color-bg-cream)] rounded",onClick:e,"aria-label":n("chat.newSession.close.aria"),children:f.jsx(Si,{size:16,strokeWidth:3})})]}),f.jsxs("div",{className:"flex flex-col gap-4",children:[f.jsxs("div",{children:[f.jsx("label",{htmlFor:"new-session-title",className:"block text-xs font-bold mb-1.5 uppercase tracking-wider",children:n("chat.newSession.field.title")}),f.jsx("input",{id:"new-session-title",type:"text",className:"nb-input w-full",placeholder:n("chat.newSession.field.title.placeholder"),value:a,onChange:v=>s(v.target.value),autoFocus:!0})]}),f.jsxs("div",{children:[f.jsx("label",{htmlFor:"new-session-cwd",className:"block text-xs font-bold mb-1.5 uppercase tracking-wider",children:n("chat.newSession.field.cwd")}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx("input",{id:"new-session-cwd",type:"text",className:"nb-input flex-1 font-[family-name:var(--font-mono)] text-sm",placeholder:"/home/coral/projects/my-app",value:o,onChange:v=>c(v.target.value)}),f.jsxs("button",{type:"button",className:"nb-btn flex-shrink-0",onClick:()=>b(!0),"aria-label":n("chat.newSession.field.cwd.browseAria"),title:n("chat.newSession.field.cwd.browseAria"),children:[f.jsx(lk,{size:14,strokeWidth:2.5}),n("chat.newSession.field.cwd.browse")]})]}),f.jsxs("p",{className:"text-[11px] text-[var(--color-text-muted)] mt-1.5 leading-relaxed",children:[f.jsx(oc,{size:10,strokeWidth:2.5,className:"inline mr-1 -mt-0.5"}),n("chat.newSession.field.cwd.help1")," ",n("chat.newSession.field.cwd.help2")]})]}),f.jsxs("div",{className:"flex gap-2 justify-end pt-2",children:[f.jsx("button",{type:"button",className:"nb-btn",onClick:e,children:n("chat.newSession.cancel")}),f.jsxs("button",{type:"button",className:"nb-btn nb-btn-primary",onClick:g,disabled:d,children:[d?f.jsx(jt,{size:14,strokeWidth:3,className:"animate-spin"}):f.jsx(Bi,{size:14,strokeWidth:3}),n("chat.newSession.create")]})]})]})]}),p&&f.jsx(Zm,{initialPath:o.trim()||void 0,onCancel:()=>b(!1),onSelect:v=>{c(v),b(!1)}})]})}function GB({msg:e,sessionId:t,onPreviewAttachment:n}){const a=ze(),s=e.role==="user",o=e.role==="error",c=e.blocks&&e.blocks.length>0?e.blocks:[{type:"text",text:e.content}],d=e.attachments??[];return f.jsx("div",{className:s?"self-end max-w-3xl":"self-start max-w-3xl",children:f.jsxs("div",{className:["nb-card",s?"bg-[var(--color-secondary)]":o?"bg-[var(--color-crashed-bg)]":"bg-[var(--color-bg)]"].join(" "),children:[f.jsxs("p",{className:"text-xs font-bold uppercase tracking-wider text-[var(--color-text-muted)] mb-2 flex items-center gap-2",children:[a(s?"chat.message.role.you":o?"chat.message.role.error":"chat.message.role.assistant"),f.jsx("span",{className:"font-normal",children:"·"}),f.jsx("span",{className:"font-normal cursor-help",title:WB(e.ts),children:X1(e.ts,a)})]}),f.jsx("div",{className:"flex flex-col gap-2",children:c.map((h,p)=>f.jsx(VB,{block:h},p))}),d.length>0&&t&&f.jsx("div",{className:"mt-3 pt-3 border-t-2 border-dashed border-[var(--color-text)]/30 flex flex-wrap gap-2",children:d.map(h=>f.jsx(QB,{sessionId:t,path:h,onPreview:()=>n(h)},h))}),e.truncated&&f.jsx("p",{className:"mt-3 px-3 py-2 bg-[var(--color-stuck-bg)] border-2 border-[var(--color-stuck)] rounded-lg text-xs text-[var(--color-stuck)] font-bold",children:a("chat.message.truncated")})]})})}function QB({sessionId:e,path:t,onPreview:n}){const a=ze(),s=t.split(/[\\/]/).pop()??t;return Md(t)?f.jsx("button",{type:"button",onClick:n,className:"block rounded-md overflow-hidden border-2 border-[var(--color-text)] hover:shadow-[2px_2px_0_var(--color-text)] transition-shadow",title:a("chat.attachment.previewSimpleTooltip",{name:s}),children:f.jsx("img",{src:pm(e,t),alt:s,className:"block max-h-40 max-w-[12rem] object-cover",loading:"lazy"})}):f.jsxs("button",{type:"button",onClick:n,className:"flex items-center gap-1.5 px-2 py-1 rounded-md bg-[var(--color-bg)] border-2 border-[var(--color-text)] text-xs font-[family-name:var(--font-mono)] hover:bg-[var(--color-accent-mint)]",title:a("chat.attachment.previewTooltip",{name:s,path:t}),children:[f.jsx(kc,{size:11,strokeWidth:2.5,className:"flex-shrink-0"}),f.jsx("span",{className:"truncate max-w-[200px]",children:s})]})}function YB({pending:e}){const t=(()=>{for(let n=e.blocks.length-1;n>=0;n--)if(e.blocks[n].type==="text")return n;return-1})();return f.jsx("div",{className:"self-start max-w-3xl",children:f.jsxs("div",{className:"nb-card bg-[var(--color-bg)]",children:[f.jsxs("p",{className:"text-xs font-bold uppercase tracking-wider text-[var(--color-text-muted)] mb-2 flex items-center gap-2",children:["assistant",f.jsx("span",{className:"font-normal",children:"·"}),f.jsxs("span",{className:"flex items-center gap-1 font-normal text-[var(--color-running)]",children:[f.jsx(jt,{size:10,strokeWidth:3,className:"animate-spin"}),"streaming"]})]}),f.jsxs("div",{className:"flex flex-col gap-2",children:[e.blocks.length===0&&f.jsx("p",{className:"text-sm text-[var(--color-text-muted)] italic",children:"…"}),e.blocks.map((n,a)=>{if(n.type==="text"){const s=a===t;return f.jsxs("div",{className:"relative",children:[f.jsx(V1,{text:n.displayed}),s&&f.jsx("span",{className:"inline-block w-2 h-4 ml-1 bg-[var(--color-text)] animate-pulse align-middle"})]},a)}return f.jsx(W1,{tool:n},a)})]})]})})}function VB({block:e}){return e.type==="text"?f.jsx(V1,{text:e.text}):f.jsx(W1,{tool:e})}function V1({text:e}){return e?f.jsx("div",{className:"text-sm font-[family-name:var(--font-body)] break-words prose-chat",children:f.jsx(Dg,{remarkPlugins:[Ig],rehypePlugins:[Pg],children:e})}):null}function W1({tool:e}){const[t,n]=C.useState(!1),a=e.status==="completed",s=e.status==="failed",o=!a&&!s;return f.jsxs("div",{className:"border-2 border-[var(--color-text)] rounded-lg overflow-hidden bg-[var(--color-bg-cream)]",children:[f.jsxs("button",{type:"button",onClick:()=>n(c=>!c),className:"w-full flex items-center gap-2 px-3 py-2 text-xs font-[family-name:var(--font-mono)] hover:bg-[var(--color-accent-yellow)] transition-colors",children:[f.jsx(Bd,{size:12,strokeWidth:3,className:["transition-transform",t?"rotate-90":""].join(" ")}),f.jsx(gk,{size:12,strokeWidth:2.5}),f.jsx("span",{className:"font-bold",children:e.kind}),f.jsx("span",{className:"flex-1 text-left text-[var(--color-text-muted)] truncate",children:e.title}),o&&f.jsx(jt,{size:12,strokeWidth:3,className:"animate-spin text-[var(--color-running)]"}),a&&f.jsx(lc,{size:12,strokeWidth:2.5,className:"text-[var(--color-running)]"}),s&&f.jsx(ak,{size:12,strokeWidth:2.5,className:"text-[var(--color-crashed)]"})]}),t&&f.jsxs("div",{className:"px-3 py-2 text-xs font-[family-name:var(--font-mono)] text-[var(--color-text-muted)] border-t-2 border-[var(--color-text)]",children:[f.jsxs("div",{children:["id: ",f.jsx("span",{className:"text-[var(--color-text)]",children:e.id})]}),f.jsxs("div",{children:["status: ",f.jsx("span",{className:"text-[var(--color-text)]",children:e.status})]})]})]})}function X1(e,t){if(!e)return"";const n=new Date(e),a=Date.now()-n.getTime();return a<6e4?t("kanban.time.justNow"):a<36e5?t("kanban.time.minutes",{n:Math.floor(a/6e4)}):a<864e5?t("kanban.time.hours",{n:Math.floor(a/36e5)}):n.toLocaleDateString()}function WB(e){if(!e)return;const t=new Date(e),n=a=>String(a).padStart(2,"0");return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())} ${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}`}function XB(){return It("/api/processes").then(e=>e.data)}function ZB(e){return gA(`/api/processes/${e}/kill`)}const JB="border-[3px] border-[var(--color-text)] rounded-2xl bg-white shadow-[4px_4px_0_var(--color-text)]";function eP({p:e}){const t=e.alive?e.sessionState??"alive":"offline",n=e.alive?"bg-[var(--color-accent-mint)]":"bg-[var(--color-bg-cream)] text-[var(--color-text)]/60";return f.jsxs("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded-lg border-2 border-[var(--color-text)] text-xs font-bold font-[family-name:var(--font-mono)] ${n}`,children:[f.jsx("span",{className:`w-2 h-2 rounded-full ${e.alive?"bg-green-600":"bg-gray-400"}`}),t]})}function tP(){const e=ze(),t=En(),[n,a]=C.useState(null),[s,o]=C.useState("all"),c=rt({queryKey:["processes"],queryFn:XB,refetchInterval:5e3}),d=Mn({mutationFn:ZB,onSuccess:b=>{a(b.message),t.invalidateQueries({queryKey:["processes"]})},onError:b=>a(b instanceof Error?b.message:String(b))}),h=c.data??[],p=h.filter(b=>s==="all"?!0:b.kind===s);return f.jsxs("div",{className:"max-w-full",children:[f.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[f.jsx(rk,{size:22,strokeWidth:2.5}),f.jsx("h1",{className:"font-[family-name:var(--font-heading)] font-bold text-2xl",children:e("processes.title")}),f.jsxs("button",{type:"button","aria-label":e("processes.refresh"),onClick:()=>t.invalidateQueries({queryKey:["processes"]}),className:"ml-auto inline-flex items-center gap-1.5 px-3 py-1.5 rounded-xl border-2 border-[var(--color-text)] bg-white text-sm font-semibold shadow-[2px_2px_0_var(--color-text)] hover:-translate-x-px hover:-translate-y-px focus-visible:outline focus-visible:outline-2",children:[c.isFetching?f.jsx(jt,{size:15,className:"animate-spin"}):f.jsx(Er,{size:15}),e("processes.refresh")]})]}),f.jsxs("p",{className:"text-sm text-[var(--color-text)]/70 mb-4",children:[e("processes.subtitle")," · ",e("processes.aliveCount").replace("{n}",String(h.length))]}),n&&f.jsx("div",{className:"mb-3 px-3 py-2 rounded-xl border-2 border-[var(--color-text)] bg-[var(--color-bg-cream)] text-sm font-mono",children:n}),f.jsx("div",{className:"flex flex-wrap gap-2 mb-3 items-center",children:["all","worker","chat"].map(b=>f.jsx("button",{type:"button","aria-label":e(`processes.kind.${b}`),onClick:()=>o(b),className:`px-3 py-1 rounded-lg border-2 border-[var(--color-text)] text-sm font-bold shadow-[2px_2px_0_var(--color-text)] focus-visible:outline focus-visible:outline-2 ${s===b?"bg-[var(--color-accent-yellow)]":"bg-white hover:-translate-x-px hover:-translate-y-px"}`,children:e(`processes.kind.${b}`)},b))}),f.jsx("div",{className:`${JB} overflow-hidden`,children:f.jsxs("table",{className:"w-full text-sm",children:[f.jsx("thead",{className:"bg-[var(--color-bg-cream)] font-[family-name:var(--font-heading)]",children:f.jsxs("tr",{className:"text-left",children:[f.jsx("th",{className:"px-3 py-2",children:e("processes.col.kind")}),f.jsx("th",{className:"px-3 py-2",children:e("processes.col.slot")}),f.jsx("th",{className:"px-3 py-2",children:e("processes.col.project")}),f.jsx("th",{className:"px-3 py-2",children:"PID"}),f.jsx("th",{className:"px-3 py-2",children:e("processes.col.state")}),f.jsx("th",{className:"px-3 py-2",children:e("processes.col.memory")}),f.jsx("th",{className:"px-3 py-2",children:e("processes.col.action")})]})}),f.jsxs("tbody",{className:"font-[family-name:var(--font-mono)]",children:[p.length===0&&f.jsx("tr",{children:f.jsx("td",{colSpan:7,className:"px-3 py-6 text-center text-[var(--color-text)]/50",children:e("processes.empty")})}),p.map(b=>f.jsxs("tr",{className:"border-t-2 border-[var(--color-text)]/10",title:b.cwd??"",children:[f.jsx("td",{className:"px-3 py-2",children:f.jsx("span",{className:`inline-block px-2 py-0.5 rounded-lg border-2 border-[var(--color-text)] text-xs font-bold ${b.kind==="worker"?"bg-[var(--color-accent-yellow)]":"bg-[var(--color-accent-purple)]"}`,children:e(`processes.kind.${b.kind}`)})}),f.jsx("td",{className:"px-3 py-2 max-w-[260px] truncate",children:b.slot}),f.jsx("td",{className:"px-3 py-2",children:b.project??"—"}),f.jsx("td",{className:"px-3 py-2",children:b.pid??"—"}),f.jsx("td",{className:"px-3 py-2",children:f.jsx(eP,{p:b})}),f.jsx("td",{className:"px-3 py-2",children:b.memoryMB!=null?`${b.memoryMB} MB`:"—"}),f.jsx("td",{className:"px-3 py-2",children:b.alive&&b.pid!=null?f.jsxs("button",{type:"button","aria-label":`${e("processes.kill")} ${b.slot}`,onClick:()=>{confirm(e("processes.killConfirm").replace("{slot}",b.slot))&&d.mutate(b.pid)},className:"inline-flex items-center gap-1 px-2.5 py-1 rounded-lg border-2 border-[var(--color-text)] bg-[var(--color-accent-pink)] text-xs font-bold shadow-[2px_2px_0_var(--color-text)] hover:-translate-x-px hover:-translate-y-px active:translate-x-0.5 active:translate-y-0.5 focus-visible:outline focus-visible:outline-2",children:[f.jsx(ak,{size:13})," ",e("processes.kill")]}):f.jsx("span",{className:"text-[var(--color-text)]/40 text-xs",children:"—"})})]},b.slot))]})]})})]})}function nP(e={}){const t=new URLSearchParams;e.project&&t.set("project",e.project),e.action&&t.set("action",e.action);const n=t.toString();return It(`/api/audit${n?`?${n}`:""}`).then(a=>a.data)}const iP="border-[3px] border-[var(--color-text)] rounded-2xl bg-white shadow-[4px_4px_0_var(--color-text)]",aP={create:"bg-[var(--color-accent-mint)]",modify:"bg-[var(--color-accent-yellow)]",delete:"bg-[var(--color-accent-pink)]",daemon:"bg-[var(--color-accent-purple)]"};function rP(){const e=ze(),t=En(),[n,a]=C.useState(""),s=rt({queryKey:["audit",n],queryFn:()=>nP(n?{action:n}:{}),refetchInterval:8e3}),o=s.data??[],c=d=>e(`audit.action.${d}`);return f.jsxs("div",{className:"max-w-full",children:[f.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[f.jsx(uk,{size:22,strokeWidth:2.5}),f.jsx("h1",{className:"font-[family-name:var(--font-heading)] font-bold text-2xl",children:e("audit.title")}),f.jsxs("button",{type:"button","aria-label":e("audit.refresh"),onClick:()=>t.invalidateQueries({queryKey:["audit"]}),className:"ml-auto inline-flex items-center gap-1.5 px-3 py-1.5 rounded-xl border-2 border-[var(--color-text)] bg-white text-sm font-semibold shadow-[2px_2px_0_var(--color-text)] hover:-translate-x-px hover:-translate-y-px focus-visible:outline focus-visible:outline-2",children:[s.isFetching?f.jsx(jt,{size:15,className:"animate-spin"}):f.jsx(Er,{size:15}),e("audit.refresh")]})]}),f.jsx("p",{className:"text-sm text-[var(--color-text)]/70 mb-4",children:e("audit.subtitle")}),f.jsx("div",{className:"flex gap-2 mb-3",children:["","create","modify","delete","daemon"].map(d=>f.jsx("button",{type:"button","aria-label":d?c(d):e("audit.filter.all"),onClick:()=>a(d),className:`px-3 py-1 rounded-lg border-2 border-[var(--color-text)] text-sm font-bold shadow-[2px_2px_0_var(--color-text)] focus-visible:outline focus-visible:outline-2 ${n===d?"bg-[var(--color-accent-purple)]":"bg-white hover:-translate-x-px hover:-translate-y-px"}`,children:d?c(d):e("audit.filter.all")},d||"all"))}),f.jsx("div",{className:`${iP} overflow-hidden`,children:f.jsxs("table",{className:"w-full text-sm",children:[f.jsx("thead",{className:"bg-[var(--color-bg-cream)] font-[family-name:var(--font-heading)]",children:f.jsxs("tr",{className:"text-left",children:[f.jsx("th",{className:"px-3 py-2",children:e("audit.col.time")}),f.jsx("th",{className:"px-3 py-2",children:e("audit.col.action")}),f.jsx("th",{className:"px-3 py-2",children:e("audit.col.project")}),f.jsx("th",{className:"px-3 py-2",children:e("audit.col.detail")})]})}),f.jsxs("tbody",{className:"font-[family-name:var(--font-mono)]",children:[o.length===0&&f.jsx("tr",{children:f.jsx("td",{colSpan:4,className:"px-3 py-6 text-center text-[var(--color-text)]/50",children:e("audit.empty")})}),o.map((d,h)=>f.jsxs("tr",{className:"border-t-2 border-[var(--color-text)]/10",children:[f.jsx("td",{className:"px-3 py-2 whitespace-nowrap",children:new Date(d.ts).toLocaleString()}),f.jsx("td",{className:"px-3 py-2",children:f.jsx("span",{className:`inline-block px-2 py-0.5 rounded-lg border-2 border-[var(--color-text)] text-xs font-bold ${aP[d.action]}`,children:c(d.action)})}),f.jsx("td",{className:"px-3 py-2",children:d.project}),f.jsx("td",{className:"px-3 py-2 text-[var(--color-text)]/70",children:d.detail??(d.source?`(${d.source})`:"—")})]},`${d.ts}-${h}`))]})]})})]})}const Yp="rounded-xl border-[3px] border-[var(--color-text)] shadow-[3px_3px_0_var(--color-text)] bg-white p-3";function sP(){const e=ze(),[t,n]=C.useState(""),[a,s]=C.useState([]),[o,c]=C.useState([]),[d,h]=C.useState(!1),[p,b]=C.useState(null),[g,v]=C.useState(null);C.useEffect(()=>{fetch("/api/memory-cfg").then(w=>w.json()).then(w=>v(w.viewerUrl??"")).catch(()=>v(""))},[]);async function x(){try{const w=await fetch("/api/memory/sessions");if(!w.ok)throw new Error(`HTTP ${w.status}`);const S=await w.json();c((S.sessions??S??[]).slice(0,30))}catch(w){b(w instanceof Error?w.message:String(w))}}C.useEffect(()=>{x()},[]);async function E(){if(t.trim()){h(!0),b(null);try{const w=await fetch("/api/memory/smart-search",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({query:t,limit:15})});if(!w.ok)throw new Error(`HTTP ${w.status}`);const S=await w.json();s(S.results??S.hits??[])}catch(w){b(w instanceof Error?w.message:String(w))}finally{h(!1)}}}return g===null?null:g?f.jsxs("div",{className:"flex flex-col gap-4 h-full min-h-0",children:[f.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[f.jsxs("h1",{className:"font-[family-name:var(--font-heading)] font-bold text-2xl text-[var(--color-text)]",children:["🧠 ",e("nav.memory")]}),f.jsxs("a",{href:g,target:"_blank",rel:"noreferrer",className:"text-sm font-semibold underline decoration-2 underline-offset-2 text-[var(--color-text)] hover:opacity-70",children:["↗ ",g]})]}),f.jsx("div",{className:"flex-1 min-h-0 rounded-2xl border-[3px] border-[var(--color-text)] shadow-[4px_4px_0_var(--color-text)] overflow-hidden bg-white",children:f.jsx("iframe",{src:g,title:"agentmemory dashboard",className:"w-full h-full border-0",style:{minHeight:"calc(100vh - 160px)"}})})]}):f.jsxs("div",{className:"flex flex-col gap-4",children:[f.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[f.jsxs("h1",{className:"font-[family-name:var(--font-heading)] font-bold text-2xl text-[var(--color-text)]",children:["🧠 ",e("nav.memory")]}),f.jsx("span",{className:"text-xs text-[var(--color-text)] opacity-60",children:e("memory.sub")})]}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx("input",{value:t,onChange:w=>n(w.target.value),onKeyDown:w=>w.key==="Enter"&&E(),placeholder:e("memory.searchPlaceholder"),"aria-label":e("memory.searchPlaceholder"),className:"flex-1 rounded-xl border-[3px] border-[var(--color-text)] px-3 py-2 font-[family-name:var(--font-mono)] text-sm focus-visible:shadow-[3px_3px_0_var(--color-text)] outline-none"}),f.jsx("button",{type:"button",onClick:E,disabled:d,"aria-label":e("memory.search"),className:"rounded-xl border-[3px] border-[var(--color-text)] bg-[var(--color-accent-mint)] px-4 py-2 font-bold text-sm shadow-[3px_3px_0_var(--color-text)] hover:-translate-x-px hover:-translate-y-px hover:shadow-[4px_4px_0_var(--color-text)] active:translate-x-0.5 active:translate-y-0.5 active:shadow-[1px_1px_0_var(--color-text)] disabled:opacity-50",children:d?"…":e("memory.search")})]}),p&&f.jsxs("div",{className:"text-sm text-[var(--color-accent-pink,#d6336c)] font-semibold",children:["⚠ ",p]}),a.length>0&&f.jsxs("div",{className:"flex flex-col gap-2",children:[f.jsxs("h2",{className:"font-[family-name:var(--font-heading)] font-bold text-sm text-[var(--color-text)]",children:[e("memory.results"),"(",a.length,")"]}),a.map(w=>{var S;return f.jsxs("div",{className:Yp,children:[f.jsxs("div",{className:"flex items-center gap-2 text-xs opacity-60 font-[family-name:var(--font-mono)]",children:[f.jsx("span",{children:w.type||w.title}),f.jsx("span",{children:"·"}),f.jsx("span",{children:new Date(w.timestamp).toLocaleString()}),f.jsx("span",{children:"·"}),f.jsxs("span",{children:["score ",(S=w.score)==null?void 0:S.toFixed(3)]})]}),f.jsx("div",{className:"text-sm mt-1 text-[var(--color-text)]",children:w.text||w.content||w.summary||f.jsx("span",{className:"opacity-50 italic",children:e("memory.rawHint")})})]},w.obsId)})]}),f.jsxs("div",{className:"flex flex-col gap-2",children:[f.jsxs("h2",{className:"font-[family-name:var(--font-heading)] font-bold text-sm text-[var(--color-text)]",children:[e("memory.sessions"),"(",o.length,")"]}),o.length===0&&f.jsx("div",{className:`${Yp} text-sm opacity-60`,children:e("memory.empty")}),o.map((w,S)=>{var _;return f.jsxs("div",{className:Yp,children:[f.jsx("div",{className:"font-[family-name:var(--font-mono)] text-xs text-[var(--color-text)]",children:(w.cwd??"").split("/").pop()||((_=w.sessionId)==null?void 0:_.slice(0,8))||"?"}),w.firstPrompt&&f.jsx("div",{className:"text-xs opacity-60 mt-1 line-clamp-2",children:w.firstPrompt.slice(0,160)})]},w.sessionId??S)})]})]})}function lP(){const e=ze();return f.jsxs("div",{className:"nb-card max-w-2xl mt-12",children:[f.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold mb-2",children:e("notFound.title")}),f.jsx("p",{className:"text-[var(--color-text-muted)] mb-6",children:e("notFound.body")}),f.jsx(ps,{to:"/",className:"nb-btn nb-btn-mint inline-flex",children:e("notFound.home")})]})}function oP(){return f.jsx(PA,{children:f.jsx(WC,{children:f.jsxs(mn,{element:f.jsx(zA,{}),children:[f.jsx(mn,{index:!0,element:f.jsx(QC,{to:"/projects",replace:!0})}),f.jsx(mn,{path:"/projects",element:f.jsx(UA,{})}),f.jsx(mn,{path:"/projects/new",element:f.jsx(XA,{})}),f.jsx(mn,{path:"/projects/:name",element:f.jsx(uO,{})}),f.jsx(mn,{path:"/board",element:f.jsx(QO,{})}),f.jsx(mn,{path:"/workers",element:f.jsx(oD,{})}),f.jsx(mn,{path:"/logs",element:f.jsx(hD,{})}),f.jsx(mn,{path:"/skills",element:f.jsx(jB,{})}),f.jsx(mn,{path:"/system",element:f.jsx(DB,{})}),f.jsx(mn,{path:"/processes",element:f.jsx(tP,{})}),f.jsx(mn,{path:"/audit",element:f.jsx(rP,{})}),f.jsx(mn,{path:"/chat",element:f.jsx(u0,{})}),f.jsx(mn,{path:"/chat/:sessionId",element:f.jsx(u0,{})}),f.jsx(mn,{path:"/memory",element:f.jsx(sP,{})}),f.jsx(mn,{path:"*",element:f.jsx(lP,{})})]})})})}BA();const cP=new zN({defaultOptions:{queries:{staleTime:3e4,refetchOnWindowFocus:!1}}}),Z1=document.getElementById("root");if(!Z1)throw new Error("#root not found");fN.createRoot(Z1).render(f.jsx(C.StrictMode,{children:f.jsx(fA,{children:f.jsx(BN,{client:cP,children:f.jsx(w2,{children:f.jsx(YA,{children:f.jsx(oP,{})})})})})}));