@taico/taico 0.2.0 → 0.2.12

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 (530) hide show
  1. package/README.md +31 -77
  2. package/dist/agent-runs/agent-run.entity.d.ts +0 -2
  3. package/dist/agent-runs/agent-run.entity.js +0 -7
  4. package/dist/agent-runs/agent-run.entity.js.map +1 -1
  5. package/dist/agent-runs/agent-runs.controller.d.ts +1 -1
  6. package/dist/agent-runs/agent-runs.controller.js +4 -7
  7. package/dist/agent-runs/agent-runs.controller.js.map +1 -1
  8. package/dist/agent-runs/agent-runs.scopes.d.ts +1 -1
  9. package/dist/agent-runs/agent-runs.service.js +1 -2
  10. package/dist/agent-runs/agent-runs.service.js.map +1 -1
  11. package/dist/agents/agent-execution-tokens.controller.d.ts +4 -1
  12. package/dist/agents/agent-execution-tokens.controller.js +22 -4
  13. package/dist/agents/agent-execution-tokens.controller.js.map +1 -1
  14. package/dist/agents/agent-template.catalog.d.ts +4 -0
  15. package/dist/agents/agent-template.catalog.js +153 -0
  16. package/dist/agents/agent-template.catalog.js.map +1 -0
  17. package/dist/agents/agent-tool-permission-scope.entity.d.ts +11 -0
  18. package/dist/agents/agent-tool-permission-scope.entity.js +65 -0
  19. package/dist/agents/agent-tool-permission-scope.entity.js.map +1 -0
  20. package/dist/agents/agent-tool-permission.entity.d.ts +12 -0
  21. package/dist/agents/agent-tool-permission.entity.js +60 -0
  22. package/dist/agents/agent-tool-permission.entity.js.map +1 -0
  23. package/dist/agents/agent-tool-permissions.controller.d.ts +11 -0
  24. package/dist/agents/agent-tool-permissions.controller.js +87 -0
  25. package/dist/agents/agent-tool-permissions.controller.js.map +1 -0
  26. package/dist/agents/agent-tool-permissions.service.d.ts +19 -0
  27. package/dist/agents/agent-tool-permissions.service.js +194 -0
  28. package/dist/agents/agent-tool-permissions.service.js.map +1 -0
  29. package/dist/agents/agent.entity.d.ts +3 -1
  30. package/dist/agents/agent.entity.js +6 -0
  31. package/dist/agents/agent.entity.js.map +1 -1
  32. package/dist/agents/agents.controller.d.ts +2 -0
  33. package/dist/agents/agents.controller.js +12 -0
  34. package/dist/agents/agents.controller.js.map +1 -1
  35. package/dist/agents/agents.module.js +13 -2
  36. package/dist/agents/agents.module.js.map +1 -1
  37. package/dist/agents/agents.scopes.d.ts +1 -1
  38. package/dist/agents/agents.service.d.ts +2 -0
  39. package/dist/agents/agents.service.js +4 -0
  40. package/dist/agents/agents.service.js.map +1 -1
  41. package/dist/agents/dto/agent-response.dto.d.ts +1 -1
  42. package/dist/agents/dto/agent-template-catalog-response.dto.d.ts +33 -0
  43. package/dist/agents/dto/agent-template-catalog-response.dto.js +205 -0
  44. package/dist/agents/dto/agent-template-catalog-response.dto.js.map +1 -0
  45. package/dist/agents/dto/agent-tool-permission-params.dto.d.ts +3 -0
  46. package/dist/agents/dto/agent-tool-permission-params.dto.js +27 -0
  47. package/dist/agents/dto/agent-tool-permission-params.dto.js.map +1 -0
  48. package/dist/agents/dto/agent-tool-permission-response.dto.d.ts +20 -0
  49. package/dist/agents/dto/agent-tool-permission-response.dto.js +119 -0
  50. package/dist/agents/dto/agent-tool-permission-response.dto.js.map +1 -0
  51. package/dist/agents/dto/create-agent.dto.d.ts +1 -1
  52. package/dist/agents/dto/patch-agent.dto.d.ts +1 -1
  53. package/dist/agents/dto/request-agent-execution-token.dto.d.ts +1 -1
  54. package/dist/agents/dto/request-agent-execution-token.dto.js +3 -2
  55. package/dist/agents/dto/request-agent-execution-token.dto.js.map +1 -1
  56. package/dist/agents/dto/service/agent-tool-permissions.service.types.d.ts +17 -0
  57. package/dist/{executions/dto/service/execution-claim.service.types.js → agents/dto/service/agent-tool-permissions.service.types.js} +1 -1
  58. package/dist/agents/dto/service/agent-tool-permissions.service.types.js.map +1 -0
  59. package/dist/agents/dto/service/agents.service.types.d.ts +1 -1
  60. package/dist/agents/dto/upsert-agent-tool-permission.dto.d.ts +3 -0
  61. package/dist/agents/dto/upsert-agent-tool-permission.dto.js +30 -0
  62. package/dist/agents/dto/upsert-agent-tool-permission.dto.js.map +1 -0
  63. package/dist/agents/errors/agents.errors.d.ts +8 -0
  64. package/dist/agents/errors/agents.errors.js +15 -1
  65. package/dist/agents/errors/agents.errors.js.map +1 -1
  66. package/dist/app-init/agent/claude-dev.agent.d.ts +1 -1
  67. package/dist/app-init/agent/claude-dev.agent.js +1 -1
  68. package/dist/app-init/agent/claude-dev.agent.js.map +1 -1
  69. package/dist/app-init/agent/code-reviewer.agent.d.ts +1 -1
  70. package/dist/app-init/agent/code-reviewer.agent.js +4 -1
  71. package/dist/app-init/agent/code-reviewer.agent.js.map +1 -1
  72. package/dist/app-init/agent/codex-dev.agent.d.ts +1 -1
  73. package/dist/app-init/agent/codex-dev.agent.js +6 -3
  74. package/dist/app-init/agent/codex-dev.agent.js.map +1 -1
  75. package/dist/app-init/agent/gemini-assistant.agent.d.ts +1 -1
  76. package/dist/app-init/agent/gemini-assistant.agent.js +3 -1
  77. package/dist/app-init/agent/gemini-assistant.agent.js.map +1 -1
  78. package/dist/app-init/agent/taico.agent.d.ts +1 -1
  79. package/dist/app-init/agent/taico.agent.js +1 -1
  80. package/dist/app-init/agent/taico.agent.js.map +1 -1
  81. package/dist/app-init/app-init.runner.d.ts +14 -14
  82. package/dist/app-init/app-init.runner.js +23 -17
  83. package/dist/app-init/app-init.runner.js.map +1 -1
  84. package/dist/app-init/mcp/chrome-devtools.mcp.d.ts +2 -0
  85. package/dist/app-init/mcp/chrome-devtools.mcp.js +14 -0
  86. package/dist/app-init/mcp/chrome-devtools.mcp.js.map +1 -0
  87. package/dist/app-init/mcp/context.mcp.d.ts +3 -3
  88. package/dist/app-init/mcp/context.mcp.js +12 -9
  89. package/dist/app-init/mcp/context.mcp.js.map +1 -1
  90. package/dist/app-init/mcp/elen.mcp.d.ts +1 -1
  91. package/dist/app-init/mcp/internal-worker-auth.mcp.d.ts +2 -2
  92. package/dist/app-init/mcp/internal-worker-auth.mcp.js +12 -9
  93. package/dist/app-init/mcp/internal-worker-auth.mcp.js.map +1 -1
  94. package/dist/app-init/mcp/playwright.mcp.d.ts +1 -1
  95. package/dist/app-init/mcp/playwright.mcp.js +1 -1
  96. package/dist/app-init/mcp/playwright.mcp.js.map +1 -1
  97. package/dist/app-init/mcp/tasks.mcp.d.ts +3 -3
  98. package/dist/app-init/mcp/tasks.mcp.js +12 -9
  99. package/dist/app-init/mcp/tasks.mcp.js.map +1 -1
  100. package/dist/app-init/models/models.d.ts +10 -0
  101. package/dist/app-init/models/models.js +29 -0
  102. package/dist/app-init/models/models.js.map +1 -0
  103. package/dist/app-init/prompts/prompts.d.ts +5 -0
  104. package/dist/app-init/{agent → prompts}/prompts.js +20 -4
  105. package/dist/app-init/prompts/prompts.js.map +1 -0
  106. package/dist/app-init/user/admin.user.d.ts +2 -2
  107. package/dist/app-init/user/dev.user.d.ts +2 -2
  108. package/dist/app.controller.js.map +1 -1
  109. package/dist/app.module.js +14 -2
  110. package/dist/app.module.js.map +1 -1
  111. package/dist/auth/core/scopes/mcp.scopes.d.ts +1 -1
  112. package/dist/auth/core/scopes/user.scopes.d.ts +1 -1
  113. package/dist/auth/core/types/access-token-claims.type.d.ts +1 -1
  114. package/dist/auth/guards/context/auth-context.types.d.ts +1 -1
  115. package/dist/auth/guards/guards/ws-access-token-guard.js +4 -1
  116. package/dist/auth/guards/guards/ws-access-token-guard.js.map +1 -1
  117. package/dist/auth-journeys/entities/auth-journey.entity.d.ts +1 -1
  118. package/dist/authorization-server/authorization.service.d.ts +1 -1
  119. package/dist/authorization-server/client-registration.service.d.ts +2 -2
  120. package/dist/authorization-server/dto/service/authorization.service.types.d.ts +1 -1
  121. package/dist/authorization-server/dto/user-response.dto.d.ts +2 -1
  122. package/dist/authorization-server/dto/user-response.dto.js +7 -5
  123. package/dist/authorization-server/dto/user-response.dto.js.map +1 -1
  124. package/dist/authorization-server/token-exchange.service.d.ts +1 -1
  125. package/dist/authorization-server/web-auth.controller.d.ts +1 -1
  126. package/dist/authorization-server/web-auth.controller.js +4 -4
  127. package/dist/authorization-server/web-auth.controller.js.map +1 -1
  128. package/dist/authorization-server/web-auth.service.d.ts +3 -3
  129. package/dist/chat-providers/chat-providers.scopes.d.ts +1 -1
  130. package/dist/chat-providers/chat-providers.service.js +6 -2
  131. package/dist/chat-providers/chat-providers.service.js.map +1 -1
  132. package/dist/chat-providers/dto/service/chat-providers.service.types.d.ts +1 -1
  133. package/dist/chat-providers/enums/chat-provider-type.enum.d.ts +2 -1
  134. package/dist/chat-providers/enums/chat-provider-type.enum.js +1 -0
  135. package/dist/chat-providers/enums/chat-provider-type.enum.js.map +1 -1
  136. package/dist/config/cli-env.d.ts +1 -0
  137. package/dist/config/cli-env.js +14 -0
  138. package/dist/config/cli-env.js.map +1 -0
  139. package/dist/config/env.config.d.ts +1 -0
  140. package/dist/config/env.config.js +30 -3
  141. package/dist/config/env.config.js.map +1 -1
  142. package/dist/context/block.entity.d.ts +1 -1
  143. package/dist/context/context.controller.d.ts +8 -0
  144. package/dist/context/context.controller.js +72 -0
  145. package/dist/context/context.controller.js.map +1 -1
  146. package/dist/context/context.mcp.gateway.d.ts +4 -4
  147. package/dist/context/context.mcp.gateway.js +2 -1
  148. package/dist/context/context.mcp.gateway.js.map +1 -1
  149. package/dist/context/context.scopes.d.ts +1 -1
  150. package/dist/context/context.service.d.ts +16 -0
  151. package/dist/context/context.service.js +219 -1
  152. package/dist/context/context.service.js.map +1 -1
  153. package/dist/context/dto/import-blocks-response.dto.d.ts +3 -0
  154. package/dist/context/dto/import-blocks-response.dto.js +25 -0
  155. package/dist/context/dto/import-blocks-response.dto.js.map +1 -0
  156. package/dist/context/errors/context.errors.d.ts +8 -0
  157. package/dist/context/errors/context.errors.js +15 -1
  158. package/dist/context/errors/context.errors.js.map +1 -1
  159. package/dist/discovery/discovery.controller.js.map +1 -1
  160. package/dist/discovery/discovery.service.js +3 -3
  161. package/dist/discovery/discovery.service.js.map +1 -1
  162. package/dist/errors/http/error-catalog.js +12 -0
  163. package/dist/errors/http/error-catalog.js.map +1 -1
  164. package/dist/{executions-v2 → executions}/active/active-execution-context-resolver.service.js +2 -2
  165. package/dist/executions/active/active-execution-context-resolver.service.js.map +1 -0
  166. package/dist/{executions-v2 → executions}/active/active-task-execution.controller.d.ts +3 -0
  167. package/dist/{executions-v2 → executions}/active/active-task-execution.controller.js +63 -6
  168. package/dist/executions/active/active-task-execution.controller.js.map +1 -0
  169. package/dist/{executions-v2 → executions}/active/active-task-execution.entity.d.ts +2 -0
  170. package/dist/{executions-v2 → executions}/active/active-task-execution.entity.js +11 -1
  171. package/dist/executions/active/active-task-execution.entity.js.map +1 -0
  172. package/dist/{executions-v2 → executions}/active/active-task-execution.service.d.ts +12 -1
  173. package/dist/{executions-v2 → executions}/active/active-task-execution.service.js +77 -8
  174. package/dist/executions/active/active-task-execution.service.js.map +1 -0
  175. package/dist/{executions-v2 → executions}/active/dto/http/active-task-execution-response.dto.d.ts +2 -0
  176. package/dist/{executions-v2 → executions}/active/dto/http/active-task-execution-response.dto.js +20 -0
  177. package/dist/executions/active/dto/http/active-task-execution-response.dto.js.map +1 -0
  178. package/dist/executions/active/dto/http/stop-active-task-execution.dto.js.map +1 -0
  179. package/dist/executions/active/dto/http/update-runner-session-id.dto.d.ts +3 -0
  180. package/dist/executions/active/dto/http/update-runner-session-id.dto.js +29 -0
  181. package/dist/executions/active/dto/http/update-runner-session-id.dto.js.map +1 -0
  182. package/dist/executions/errors/executions.errors.d.ts +8 -16
  183. package/dist/executions/errors/executions.errors.js +16 -26
  184. package/dist/executions/errors/executions.errors.js.map +1 -1
  185. package/dist/{executions-v2 → executions}/events/execution-activity.events.js +1 -1
  186. package/dist/executions/events/execution-activity.events.js.map +1 -0
  187. package/dist/{executions-v2 → executions}/execution-activity.service.d.ts +10 -0
  188. package/dist/{executions-v2 → executions}/execution-activity.service.js +27 -5
  189. package/dist/executions/execution-activity.service.js.map +1 -0
  190. package/dist/{executions-v2/executions-v2-worker.gateway.d.ts → executions/executions-worker.gateway.d.ts} +22 -4
  191. package/dist/executions/executions-worker.gateway.js +288 -0
  192. package/dist/executions/executions-worker.gateway.js.map +1 -0
  193. package/dist/executions/executions.module.js +51 -35
  194. package/dist/executions/executions.module.js.map +1 -1
  195. package/dist/{executions-v2 → executions}/history/dto/http/task-execution-history-response.dto.d.ts +2 -0
  196. package/dist/{executions-v2 → executions}/history/dto/http/task-execution-history-response.dto.js +20 -0
  197. package/dist/executions/history/dto/http/task-execution-history-response.dto.js.map +1 -0
  198. package/dist/executions/history/task-execution-history-error-code.enum.js.map +1 -0
  199. package/dist/executions/history/task-execution-history-status.enum.js.map +1 -0
  200. package/dist/{executions-v2 → executions}/history/task-execution-history.controller.js +3 -3
  201. package/dist/executions/history/task-execution-history.controller.js.map +1 -0
  202. package/dist/{executions-v2 → executions}/history/task-execution-history.entity.d.ts +2 -0
  203. package/dist/{executions-v2 → executions}/history/task-execution-history.entity.js +11 -1
  204. package/dist/executions/history/task-execution-history.entity.js.map +1 -0
  205. package/dist/executions/history/task-execution-history.service.js.map +1 -0
  206. package/dist/executions/queue/dto/http/task-execution-queue-entry-response.dto.js.map +1 -0
  207. package/dist/{executions-v2 → executions}/queue/task-execution-queue.controller.js +7 -7
  208. package/dist/executions/queue/task-execution-queue.controller.js.map +1 -0
  209. package/dist/executions/queue/task-execution-queue.entity.js.map +1 -0
  210. package/dist/executions/queue/task-execution-queue.service.js.map +1 -0
  211. package/dist/{executions-v2 → executions}/readiness/readiness-candidate.repository.d.ts +1 -0
  212. package/dist/{executions-v2 → executions}/readiness/readiness-candidate.repository.js +22 -11
  213. package/dist/executions/readiness/readiness-candidate.repository.js.map +1 -0
  214. package/dist/executions/readiness/task-eligibility-event-source.service.js.map +1 -0
  215. package/dist/executions/readiness/task-eligibility-scheduler.service.js.map +1 -0
  216. package/dist/{executions-v2 → executions}/readiness/task-execution-queue-populator.service.js +9 -12
  217. package/dist/executions/readiness/task-execution-queue-populator.service.js.map +1 -0
  218. package/dist/{executions-v2 → executions}/staleness/stale-active-task-execution-detector.service.js +1 -1
  219. package/dist/executions/staleness/stale-active-task-execution-detector.service.js.map +1 -0
  220. package/dist/executions/staleness/stale-active-task-execution-pruner.service.js.map +1 -0
  221. package/dist/{executions-v2 → executions}/staleness/stale-active-task-execution-scheduler.service.js +1 -1
  222. package/dist/executions/staleness/stale-active-task-execution-scheduler.service.js.map +1 -0
  223. package/dist/executions/task-activity-projection.service.js.map +1 -0
  224. package/dist/executions/workers.scopes.d.ts +9 -1
  225. package/dist/executions/workers.scopes.js +8 -0
  226. package/dist/executions/workers.scopes.js.map +1 -1
  227. package/dist/identity-provider/enums/index.d.ts +1 -0
  228. package/dist/identity-provider/enums/index.js +3 -1
  229. package/dist/identity-provider/enums/index.js.map +1 -1
  230. package/dist/identity-provider/enums/onboarding-display-mode.enum.d.ts +5 -0
  231. package/dist/identity-provider/enums/onboarding-display-mode.enum.js +10 -0
  232. package/dist/identity-provider/enums/onboarding-display-mode.enum.js.map +1 -0
  233. package/dist/identity-provider/identity-provider.service.d.ts +1 -0
  234. package/dist/identity-provider/identity-provider.service.js +6 -1
  235. package/dist/identity-provider/identity-provider.service.js.map +1 -1
  236. package/dist/identity-provider/user.entity.d.ts +2 -1
  237. package/dist/identity-provider/user.entity.js +9 -4
  238. package/dist/identity-provider/user.entity.js.map +1 -1
  239. package/dist/llm/openai-responses.service.js +3 -0
  240. package/dist/llm/openai-responses.service.js.map +1 -1
  241. package/dist/main.d.ts +1 -1
  242. package/dist/main.js +41 -26
  243. package/dist/main.js.map +1 -1
  244. package/dist/mcp-registry/entities/mcp-scope.entity.d.ts +2 -0
  245. package/dist/mcp-registry/entities/mcp-scope.entity.js +6 -0
  246. package/dist/mcp-registry/entities/mcp-scope.entity.js.map +1 -1
  247. package/dist/mcp-registry/entities/mcp-server.entity.d.ts +2 -0
  248. package/dist/mcp-registry/entities/mcp-server.entity.js +6 -0
  249. package/dist/mcp-registry/entities/mcp-server.entity.js.map +1 -1
  250. package/dist/mcp-registry/errors/mcp-registry.errors.js +1 -1
  251. package/dist/mcp-registry/errors/mcp-registry.errors.js.map +1 -1
  252. package/dist/mcp-registry/mcp-registry.scopes.d.ts +1 -1
  253. package/dist/mcp-registry/mcp-registry.service.d.ts +1 -1
  254. package/dist/mcp-registry/mcp-registry.service.js +5 -1
  255. package/dist/mcp-registry/mcp-registry.service.js.map +1 -1
  256. package/dist/meta/meta.scopes.d.ts +1 -1
  257. package/dist/meta/tag.entity.d.ts +1 -1
  258. package/dist/migrations/1742000000000-AddAgentToolPermissions.d.ts +5 -0
  259. package/dist/migrations/1742000000000-AddAgentToolPermissions.js +44 -0
  260. package/dist/migrations/1742000000000-AddAgentToolPermissions.js.map +1 -0
  261. package/dist/migrations/1742100000000-AddExecutionEnrichmentFieldsV2.d.ts +6 -0
  262. package/dist/migrations/1742100000000-AddExecutionEnrichmentFieldsV2.js +44 -0
  263. package/dist/migrations/1742100000000-AddExecutionEnrichmentFieldsV2.js.map +1 -0
  264. package/dist/migrations/1742200000000-RenameExecutionTables.d.ts +5 -0
  265. package/dist/migrations/1742200000000-RenameExecutionTables.js +27 -0
  266. package/dist/migrations/1742200000000-RenameExecutionTables.js.map +1 -0
  267. package/dist/migrations/1742300000000-AddWorkersTable.d.ts +5 -0
  268. package/dist/migrations/1742300000000-AddWorkersTable.js +34 -0
  269. package/dist/migrations/1742300000000-AddWorkersTable.js.map +1 -0
  270. package/dist/migrations/1742400000000-RenameHasSeenWalkthroughToOnboardingDisplayMode.d.ts +6 -0
  271. package/dist/migrations/1742400000000-RenameHasSeenWalkthroughToOnboardingDisplayMode.js +78 -0
  272. package/dist/migrations/1742400000000-RenameHasSeenWalkthroughToOnboardingDisplayMode.js.map +1 -0
  273. package/dist/public/assets/index-6WngSDfP.js +73 -0
  274. package/dist/public/assets/index-Bh1qbaci.css +1 -0
  275. package/dist/public/beta/assets/index-BaBvl20K.css +1 -0
  276. package/dist/public/beta/assets/index-g8TuopEh.js +94 -0
  277. package/dist/public/beta/index.html +2 -2
  278. package/dist/public/index.html +2 -2
  279. package/dist/secrets/secrets.scopes.d.ts +1 -1
  280. package/dist/tasks/tasks.mcp.gateway.d.ts +4 -4
  281. package/dist/tasks/tasks.mcp.gateway.js +2 -1
  282. package/dist/tasks/tasks.mcp.gateway.js.map +1 -1
  283. package/dist/tasks/tasks.module.js +2 -2
  284. package/dist/tasks/tasks.module.js.map +1 -1
  285. package/dist/tasks/tasks.scopes.d.ts +1 -1
  286. package/dist/tasks/tasks.service.d.ts +2 -2
  287. package/dist/tasks/tasks.service.js +1 -1
  288. package/dist/tasks/tasks.service.js.map +1 -1
  289. package/dist/threads/backends/adk.backend.d.ts +19 -0
  290. package/dist/threads/backends/adk.backend.js +275 -0
  291. package/dist/threads/backends/adk.backend.js.map +1 -0
  292. package/dist/threads/backends/chat-backend.interface.d.ts +39 -0
  293. package/dist/{worker/runners/agent-runner.types.js → threads/backends/chat-backend.interface.js} +1 -1
  294. package/dist/threads/backends/chat-backend.interface.js.map +1 -0
  295. package/dist/threads/backends/chat-backend.utils.d.ts +5 -0
  296. package/dist/threads/backends/chat-backend.utils.js +27 -0
  297. package/dist/threads/backends/chat-backend.utils.js.map +1 -0
  298. package/dist/threads/backends/openai.backend.d.ts +19 -0
  299. package/dist/threads/backends/openai.backend.js +155 -0
  300. package/dist/threads/backends/openai.backend.js.map +1 -0
  301. package/dist/threads/chat.service.d.ts +27 -33
  302. package/dist/threads/chat.service.js +94 -401
  303. package/dist/threads/chat.service.js.map +1 -1
  304. package/dist/threads/thread-state-reconciler.service.d.ts +6 -10
  305. package/dist/threads/thread-state-reconciler.service.js +17 -59
  306. package/dist/threads/thread-state-reconciler.service.js.map +1 -1
  307. package/dist/threads/thread-title.service.d.ts +3 -3
  308. package/dist/threads/thread-title.service.js +6 -9
  309. package/dist/threads/thread-title.service.js.map +1 -1
  310. package/dist/threads/threads.module.js +4 -2
  311. package/dist/threads/threads.module.js.map +1 -1
  312. package/dist/threads/threads.scopes.d.ts +1 -1
  313. package/dist/threads/threads.service.d.ts +4 -15
  314. package/dist/threads/threads.service.js +97 -24
  315. package/dist/threads/threads.service.js.map +1 -1
  316. package/dist/tsconfig.tsbuildinfo +1 -1
  317. package/dist/walkthrough/dto/walkthrough-status-response.dto.d.ts +12 -0
  318. package/dist/walkthrough/dto/walkthrough-status-response.dto.js +66 -0
  319. package/dist/walkthrough/dto/walkthrough-status-response.dto.js.map +1 -0
  320. package/dist/walkthrough/walkthrough.controller.d.ts +11 -0
  321. package/dist/walkthrough/walkthrough.controller.js +76 -0
  322. package/dist/walkthrough/walkthrough.controller.js.map +1 -0
  323. package/dist/walkthrough/walkthrough.module.d.ts +2 -0
  324. package/dist/walkthrough/walkthrough.module.js +43 -0
  325. package/dist/walkthrough/walkthrough.module.js.map +1 -0
  326. package/dist/walkthrough/walkthrough.service.d.ts +31 -0
  327. package/dist/walkthrough/walkthrough.service.js +110 -0
  328. package/dist/walkthrough/walkthrough.service.js.map +1 -0
  329. package/dist/workers/dto/http/worker-response.dto.d.ts +11 -0
  330. package/dist/workers/dto/http/worker-response.dto.js +58 -0
  331. package/dist/workers/dto/http/worker-response.dto.js.map +1 -0
  332. package/dist/workers/dto/service/workers.service.types.d.ts +6 -0
  333. package/dist/{worker/auth/worker-auth.types.js → workers/dto/service/workers.service.types.js} +1 -1
  334. package/dist/workers/dto/service/workers.service.types.js.map +1 -0
  335. package/dist/workers/events/workers.events.d.ts +14 -0
  336. package/dist/workers/events/workers.events.js +21 -0
  337. package/dist/workers/events/workers.events.js.map +1 -0
  338. package/dist/workers/worker.entity.d.ts +12 -0
  339. package/dist/workers/worker.entity.js +62 -0
  340. package/dist/workers/worker.entity.js.map +1 -0
  341. package/dist/workers/workers.controller.d.ts +7 -0
  342. package/dist/workers/workers.controller.js +51 -0
  343. package/dist/workers/workers.controller.js.map +1 -0
  344. package/dist/workers/workers.gateway.d.ts +18 -0
  345. package/dist/workers/workers.gateway.js +94 -0
  346. package/dist/workers/workers.gateway.js.map +1 -0
  347. package/dist/workers/workers.module.d.ts +2 -0
  348. package/dist/workers/workers.module.js +31 -0
  349. package/dist/workers/workers.module.js.map +1 -0
  350. package/dist/workers/workers.service.d.ts +11 -0
  351. package/dist/workers/workers.service.js +67 -0
  352. package/dist/workers/workers.service.js.map +1 -0
  353. package/package.json +7 -6
  354. package/dist/app-init/agent/prompts.d.ts +0 -4
  355. package/dist/app-init/agent/prompts.js.map +0 -1
  356. package/dist/app-init/agent/qwen3-coder-next.d.ts +0 -2
  357. package/dist/app-init/agent/qwen3-coder-next.js +0 -22
  358. package/dist/app-init/agent/qwen3-coder-next.js.map +0 -1
  359. package/dist/executions/dto/http/execution-list-response.dto.d.ts +0 -8
  360. package/dist/executions/dto/http/execution-list-response.dto.js +0 -58
  361. package/dist/executions/dto/http/execution-list-response.dto.js.map +0 -1
  362. package/dist/executions/dto/http/execution-response.dto.d.ts +0 -24
  363. package/dist/executions/dto/http/execution-response.dto.js +0 -225
  364. package/dist/executions/dto/http/execution-response.dto.js.map +0 -1
  365. package/dist/executions/dto/http/list-executions-query.dto.d.ts +0 -8
  366. package/dist/executions/dto/http/list-executions-query.dto.js +0 -79
  367. package/dist/executions/dto/http/list-executions-query.dto.js.map +0 -1
  368. package/dist/executions/dto/service/execution-claim.service.types.d.ts +0 -27
  369. package/dist/executions/dto/service/execution-claim.service.types.js.map +0 -1
  370. package/dist/executions/dto/service/executions.service.types.d.ts +0 -35
  371. package/dist/executions/dto/service/executions.service.types.js +0 -3
  372. package/dist/executions/dto/service/executions.service.types.js.map +0 -1
  373. package/dist/executions/enums/index.d.ts +0 -2
  374. package/dist/executions/enums/index.js +0 -8
  375. package/dist/executions/enums/index.js.map +0 -1
  376. package/dist/executions/enums/task-execution-status.enum.d.ts +0 -10
  377. package/dist/executions/enums/task-execution-status.enum.js +0 -15
  378. package/dist/executions/enums/task-execution-status.enum.js.map +0 -1
  379. package/dist/executions/enums/worker-session-status.enum.d.ts +0 -6
  380. package/dist/executions/enums/worker-session-status.enum.js +0 -11
  381. package/dist/executions/enums/worker-session-status.enum.js.map +0 -1
  382. package/dist/executions/events/executions.events.d.ts +0 -25
  383. package/dist/executions/events/executions.events.js +0 -39
  384. package/dist/executions/events/executions.events.js.map +0 -1
  385. package/dist/executions/execution-claim.service.d.ts +0 -17
  386. package/dist/executions/execution-claim.service.js +0 -368
  387. package/dist/executions/execution-claim.service.js.map +0 -1
  388. package/dist/executions/execution-context-resolver.service.d.ts +0 -21
  389. package/dist/executions/execution-context-resolver.service.js +0 -119
  390. package/dist/executions/execution-context-resolver.service.js.map +0 -1
  391. package/dist/executions/execution-reconciler.service.d.ts +0 -24
  392. package/dist/executions/execution-reconciler.service.js +0 -345
  393. package/dist/executions/execution-reconciler.service.js.map +0 -1
  394. package/dist/executions/executions.controller.d.ts +0 -8
  395. package/dist/executions/executions.controller.js +0 -70
  396. package/dist/executions/executions.controller.js.map +0 -1
  397. package/dist/executions/executions.gateway.d.ts +0 -21
  398. package/dist/executions/executions.gateway.js +0 -167
  399. package/dist/executions/executions.gateway.js.map +0 -1
  400. package/dist/executions/executions.service.d.ts +0 -15
  401. package/dist/executions/executions.service.js +0 -119
  402. package/dist/executions/executions.service.js.map +0 -1
  403. package/dist/executions/task-execution.entity.d.ts +0 -25
  404. package/dist/executions/task-execution.entity.js +0 -130
  405. package/dist/executions/task-execution.entity.js.map +0 -1
  406. package/dist/executions/worker-session.entity.d.ts +0 -19
  407. package/dist/executions/worker-session.entity.js +0 -103
  408. package/dist/executions/worker-session.entity.js.map +0 -1
  409. package/dist/executions/worker-session.service.d.ts +0 -24
  410. package/dist/executions/worker-session.service.js +0 -115
  411. package/dist/executions/worker-session.service.js.map +0 -1
  412. package/dist/executions/workers.gateway.d.ts +0 -25
  413. package/dist/executions/workers.gateway.js +0 -355
  414. package/dist/executions/workers.gateway.js.map +0 -1
  415. package/dist/executions-v2/active/active-execution-context-resolver.service.js.map +0 -1
  416. package/dist/executions-v2/active/active-task-execution.controller.js.map +0 -1
  417. package/dist/executions-v2/active/active-task-execution.entity.js.map +0 -1
  418. package/dist/executions-v2/active/active-task-execution.service.js.map +0 -1
  419. package/dist/executions-v2/active/dto/http/active-task-execution-response.dto.js.map +0 -1
  420. package/dist/executions-v2/active/dto/http/stop-active-task-execution.dto.js.map +0 -1
  421. package/dist/executions-v2/errors/executions-v2.errors.d.ts +0 -13
  422. package/dist/executions-v2/errors/executions-v2.errors.js +0 -31
  423. package/dist/executions-v2/errors/executions-v2.errors.js.map +0 -1
  424. package/dist/executions-v2/events/execution-activity.events.js.map +0 -1
  425. package/dist/executions-v2/execution-activity.service.js.map +0 -1
  426. package/dist/executions-v2/executions-v2-worker.gateway.js +0 -149
  427. package/dist/executions-v2/executions-v2-worker.gateway.js.map +0 -1
  428. package/dist/executions-v2/executions-v2.module.d.ts +0 -2
  429. package/dist/executions-v2/executions-v2.module.js +0 -78
  430. package/dist/executions-v2/executions-v2.module.js.map +0 -1
  431. package/dist/executions-v2/history/dto/http/task-execution-history-response.dto.js.map +0 -1
  432. package/dist/executions-v2/history/task-execution-history-error-code.enum.js.map +0 -1
  433. package/dist/executions-v2/history/task-execution-history-status.enum.js.map +0 -1
  434. package/dist/executions-v2/history/task-execution-history.controller.js.map +0 -1
  435. package/dist/executions-v2/history/task-execution-history.entity.js.map +0 -1
  436. package/dist/executions-v2/history/task-execution-history.service.js.map +0 -1
  437. package/dist/executions-v2/queue/dto/http/task-execution-queue-entry-response.dto.js.map +0 -1
  438. package/dist/executions-v2/queue/task-execution-queue.controller.js.map +0 -1
  439. package/dist/executions-v2/queue/task-execution-queue.entity.js.map +0 -1
  440. package/dist/executions-v2/queue/task-execution-queue.service.js.map +0 -1
  441. package/dist/executions-v2/readiness/readiness-candidate.repository.js.map +0 -1
  442. package/dist/executions-v2/readiness/task-eligibility-event-source.service.js.map +0 -1
  443. package/dist/executions-v2/readiness/task-eligibility-scheduler.service.js.map +0 -1
  444. package/dist/executions-v2/readiness/task-execution-queue-populator.service.js.map +0 -1
  445. package/dist/executions-v2/staleness/stale-active-task-execution-detector.service.js.map +0 -1
  446. package/dist/executions-v2/staleness/stale-active-task-execution-pruner.service.js.map +0 -1
  447. package/dist/executions-v2/staleness/stale-active-task-execution-scheduler.service.js.map +0 -1
  448. package/dist/executions-v2/task-activity-projection.service.js.map +0 -1
  449. package/dist/public/assets/index-BYBolBql.css +0 -1
  450. package/dist/public/assets/index-Cr1iblrK.js +0 -73
  451. package/dist/public/beta/assets/index-DCkmROA6.js +0 -85
  452. package/dist/public/beta/assets/index-DIzh0pTC.css +0 -1
  453. package/dist/worker/auth/callback-server.d.ts +0 -6
  454. package/dist/worker/auth/callback-server.js +0 -50
  455. package/dist/worker/auth/callback-server.js.map +0 -1
  456. package/dist/worker/auth/credentials-store.d.ts +0 -4
  457. package/dist/worker/auth/credentials-store.js +0 -23
  458. package/dist/worker/auth/credentials-store.js.map +0 -1
  459. package/dist/worker/auth/oauth-client.d.ts +0 -4
  460. package/dist/worker/auth/oauth-client.js +0 -116
  461. package/dist/worker/auth/oauth-client.js.map +0 -1
  462. package/dist/worker/auth/worker-auth-client.d.ts +0 -9
  463. package/dist/worker/auth/worker-auth-client.js +0 -35
  464. package/dist/worker/auth/worker-auth-client.js.map +0 -1
  465. package/dist/worker/auth/worker-auth.types.d.ts +0 -30
  466. package/dist/worker/auth/worker-auth.types.js.map +0 -1
  467. package/dist/worker/execution-orchestrator.d.ts +0 -25
  468. package/dist/worker/execution-orchestrator.js +0 -186
  469. package/dist/worker/execution-orchestrator.js.map +0 -1
  470. package/dist/worker/formatters/claude-message-formatter.d.ts +0 -13
  471. package/dist/worker/formatters/claude-message-formatter.js +0 -90
  472. package/dist/worker/formatters/claude-message-formatter.js.map +0 -1
  473. package/dist/worker/formatters/opencode-message-formatter.d.ts +0 -6
  474. package/dist/worker/formatters/opencode-message-formatter.js +0 -51
  475. package/dist/worker/formatters/opencode-message-formatter.js.map +0 -1
  476. package/dist/worker/helpers/ensure-repo.d.ts +0 -1
  477. package/dist/worker/helpers/ensure-repo.js +0 -37
  478. package/dist/worker/helpers/ensure-repo.js.map +0 -1
  479. package/dist/worker/helpers/prepare-workspace.d.ts +0 -1
  480. package/dist/worker/helpers/prepare-workspace.js +0 -24
  481. package/dist/worker/helpers/prepare-workspace.js.map +0 -1
  482. package/dist/worker/helpers/session-store.d.ts +0 -2
  483. package/dist/worker/helpers/session-store.js +0 -47
  484. package/dist/worker/helpers/session-store.js.map +0 -1
  485. package/dist/worker/runners/agent-runner.types.d.ts +0 -28
  486. package/dist/worker/runners/agent-runner.types.js.map +0 -1
  487. package/dist/worker/runners/base-agent-runner.d.ts +0 -10
  488. package/dist/worker/runners/base-agent-runner.js +0 -41
  489. package/dist/worker/runners/base-agent-runner.js.map +0 -1
  490. package/dist/worker/runners/claude-agent-runner.d.ts +0 -9
  491. package/dist/worker/runners/claude-agent-runner.js +0 -79
  492. package/dist/worker/runners/claude-agent-runner.js.map +0 -1
  493. package/dist/worker/runners/opencode-agent-runner.d.ts +0 -18
  494. package/dist/worker/runners/opencode-agent-runner.js +0 -170
  495. package/dist/worker/runners/opencode-agent-runner.js.map +0 -1
  496. package/dist/worker/worker-gateway-client.d.ts +0 -45
  497. package/dist/worker/worker-gateway-client.js +0 -332
  498. package/dist/worker/worker-gateway-client.js.map +0 -1
  499. package/dist/worker/worker-mode.d.ts +0 -6
  500. package/dist/worker/worker-mode.js +0 -40
  501. package/dist/worker/worker-mode.js.map +0 -1
  502. /package/dist/{executions-v2 → executions}/active/active-execution-context-resolver.service.d.ts +0 -0
  503. /package/dist/{executions-v2 → executions}/active/dto/http/stop-active-task-execution.dto.d.ts +0 -0
  504. /package/dist/{executions-v2 → executions}/active/dto/http/stop-active-task-execution.dto.js +0 -0
  505. /package/dist/{executions-v2 → executions}/events/execution-activity.events.d.ts +0 -0
  506. /package/dist/{executions-v2 → executions}/history/task-execution-history-error-code.enum.d.ts +0 -0
  507. /package/dist/{executions-v2 → executions}/history/task-execution-history-error-code.enum.js +0 -0
  508. /package/dist/{executions-v2 → executions}/history/task-execution-history-status.enum.d.ts +0 -0
  509. /package/dist/{executions-v2 → executions}/history/task-execution-history-status.enum.js +0 -0
  510. /package/dist/{executions-v2 → executions}/history/task-execution-history.controller.d.ts +0 -0
  511. /package/dist/{executions-v2 → executions}/history/task-execution-history.service.d.ts +0 -0
  512. /package/dist/{executions-v2 → executions}/history/task-execution-history.service.js +0 -0
  513. /package/dist/{executions-v2 → executions}/queue/dto/http/task-execution-queue-entry-response.dto.d.ts +0 -0
  514. /package/dist/{executions-v2 → executions}/queue/dto/http/task-execution-queue-entry-response.dto.js +0 -0
  515. /package/dist/{executions-v2 → executions}/queue/task-execution-queue.controller.d.ts +0 -0
  516. /package/dist/{executions-v2 → executions}/queue/task-execution-queue.entity.d.ts +0 -0
  517. /package/dist/{executions-v2 → executions}/queue/task-execution-queue.entity.js +0 -0
  518. /package/dist/{executions-v2 → executions}/queue/task-execution-queue.service.d.ts +0 -0
  519. /package/dist/{executions-v2 → executions}/queue/task-execution-queue.service.js +0 -0
  520. /package/dist/{executions-v2 → executions}/readiness/task-eligibility-event-source.service.d.ts +0 -0
  521. /package/dist/{executions-v2 → executions}/readiness/task-eligibility-event-source.service.js +0 -0
  522. /package/dist/{executions-v2 → executions}/readiness/task-eligibility-scheduler.service.d.ts +0 -0
  523. /package/dist/{executions-v2 → executions}/readiness/task-eligibility-scheduler.service.js +0 -0
  524. /package/dist/{executions-v2 → executions}/readiness/task-execution-queue-populator.service.d.ts +0 -0
  525. /package/dist/{executions-v2 → executions}/staleness/stale-active-task-execution-detector.service.d.ts +0 -0
  526. /package/dist/{executions-v2 → executions}/staleness/stale-active-task-execution-pruner.service.d.ts +0 -0
  527. /package/dist/{executions-v2 → executions}/staleness/stale-active-task-execution-pruner.service.js +0 -0
  528. /package/dist/{executions-v2 → executions}/staleness/stale-active-task-execution-scheduler.service.d.ts +0 -0
  529. /package/dist/{executions-v2 → executions}/task-activity-projection.service.d.ts +0 -0
  530. /package/dist/{executions-v2 → executions}/task-activity-projection.service.js +0 -0
@@ -1,85 +0,0 @@
1
- var vx=Object.defineProperty;var ld=e=>{throw TypeError(e)};var kx=(e,t,n)=>t in e?vx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var yr=(e,t,n)=>kx(e,typeof t!="symbol"?t+"":t,n),ad=(e,t,n)=>t.has(e)||ld("Cannot "+n);var le=(e,t,n)=>(ad(e,t,"read from private field"),n?n.call(e):t.get(e)),xn=(e,t,n)=>t.has(e)?ld("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Tt=(e,t,n,r)=>(ad(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var ds=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function rp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ip={exports:{}},Us={},op={exports:{}},ee={};/**
2
- * @license React
3
- * react.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its 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 so=Symbol.for("react.element"),wx=Symbol.for("react.portal"),Sx=Symbol.for("react.fragment"),Cx=Symbol.for("react.strict_mode"),Ex=Symbol.for("react.profiler"),Nx=Symbol.for("react.provider"),bx=Symbol.for("react.context"),Tx=Symbol.for("react.forward_ref"),jx=Symbol.for("react.suspense"),_x=Symbol.for("react.memo"),Ix=Symbol.for("react.lazy"),ud=Symbol.iterator;function Ax(e){return e===null||typeof e!="object"?null:(e=ud&&e[ud]||e["@@iterator"],typeof e=="function"?e:null)}var sp={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},lp=Object.assign,ap={};function Qr(e,t,n){this.props=e,this.context=t,this.refs=ap,this.updater=n||sp}Qr.prototype.isReactComponent={};Qr.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Qr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function up(){}up.prototype=Qr.prototype;function ju(e,t,n){this.props=e,this.context=t,this.refs=ap,this.updater=n||sp}var _u=ju.prototype=new up;_u.constructor=ju;lp(_u,Qr.prototype);_u.isPureReactComponent=!0;var cd=Array.isArray,cp=Object.prototype.hasOwnProperty,Iu={current:null},dp={key:!0,ref:!0,__self:!0,__source:!0};function fp(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)cp.call(t,r)&&!dp.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(l===1)i.children=n;else if(1<l){for(var u=Array(l),c=0;c<l;c++)u[c]=arguments[c+2];i.children=u}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)i[r]===void 0&&(i[r]=l[r]);return{$$typeof:so,type:e,key:o,ref:s,props:i,_owner:Iu.current}}function Rx(e,t){return{$$typeof:so,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Au(e){return typeof e=="object"&&e!==null&&e.$$typeof===so}function Px(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var dd=/\/+/g;function yl(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Px(""+e.key):t.toString(36)}function qo(e,t,n,r,i){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(o){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case so:case wx:s=!0}}if(s)return s=e,i=i(s),e=r===""?"."+yl(s,0):r,cd(i)?(n="",e!=null&&(n=e.replace(dd,"$&/")+"/"),qo(i,t,n,"",function(c){return c})):i!=null&&(Au(i)&&(i=Rx(i,n+(!i.key||s&&s.key===i.key?"":(""+i.key).replace(dd,"$&/")+"/")+e)),t.push(i)),1;if(s=0,r=r===""?".":r+":",cd(e))for(var l=0;l<e.length;l++){o=e[l];var u=r+yl(o,l);s+=qo(o,t,n,u,i)}else if(u=Ax(e),typeof u=="function")for(e=u.call(e),l=0;!(o=e.next()).done;)o=o.value,u=r+yl(o,l++),s+=qo(o,t,n,u,i);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function ko(e,t,n){if(e==null)return e;var r=[],i=0;return qo(e,r,"","",function(o){return t.call(n,o,i++)}),r}function Ox(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var qe={current:null},Go={transition:null},Dx={ReactCurrentDispatcher:qe,ReactCurrentBatchConfig:Go,ReactCurrentOwner:Iu};function hp(){throw Error("act(...) is not supported in production builds of React.")}ee.Children={map:ko,forEach:function(e,t,n){ko(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ko(e,function(){t++}),t},toArray:function(e){return ko(e,function(t){return t})||[]},only:function(e){if(!Au(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ee.Component=Qr;ee.Fragment=Sx;ee.Profiler=Ex;ee.PureComponent=ju;ee.StrictMode=Cx;ee.Suspense=jx;ee.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Dx;ee.act=hp;ee.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=lp({},e.props),i=e.key,o=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,s=Iu.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(u in t)cp.call(t,u)&&!dp.hasOwnProperty(u)&&(r[u]=t[u]===void 0&&l!==void 0?l[u]:t[u])}var u=arguments.length-2;if(u===1)r.children=n;else if(1<u){l=Array(u);for(var c=0;c<u;c++)l[c]=arguments[c+2];r.children=l}return{$$typeof:so,type:e.type,key:i,ref:o,props:r,_owner:s}};ee.createContext=function(e){return e={$$typeof:bx,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Nx,_context:e},e.Consumer=e};ee.createElement=fp;ee.createFactory=function(e){var t=fp.bind(null,e);return t.type=e,t};ee.createRef=function(){return{current:null}};ee.forwardRef=function(e){return{$$typeof:Tx,render:e}};ee.isValidElement=Au;ee.lazy=function(e){return{$$typeof:Ix,_payload:{_status:-1,_result:e},_init:Ox}};ee.memo=function(e,t){return{$$typeof:_x,type:e,compare:t===void 0?null:t}};ee.startTransition=function(e){var t=Go.transition;Go.transition={};try{e()}finally{Go.transition=t}};ee.unstable_act=hp;ee.useCallback=function(e,t){return qe.current.useCallback(e,t)};ee.useContext=function(e){return qe.current.useContext(e)};ee.useDebugValue=function(){};ee.useDeferredValue=function(e){return qe.current.useDeferredValue(e)};ee.useEffect=function(e,t){return qe.current.useEffect(e,t)};ee.useId=function(){return qe.current.useId()};ee.useImperativeHandle=function(e,t,n){return qe.current.useImperativeHandle(e,t,n)};ee.useInsertionEffect=function(e,t){return qe.current.useInsertionEffect(e,t)};ee.useLayoutEffect=function(e,t){return qe.current.useLayoutEffect(e,t)};ee.useMemo=function(e,t){return qe.current.useMemo(e,t)};ee.useReducer=function(e,t,n){return qe.current.useReducer(e,t,n)};ee.useRef=function(e){return qe.current.useRef(e)};ee.useState=function(e){return qe.current.useState(e)};ee.useSyncExternalStore=function(e,t,n){return qe.current.useSyncExternalStore(e,t,n)};ee.useTransition=function(){return qe.current.useTransition()};ee.version="18.3.1";op.exports=ee;var k=op.exports;/**
10
- * @license React
11
- * react-jsx-runtime.production.min.js
12
- *
13
- * Copyright (c) Facebook, Inc. and its 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 Lx=k,Fx=Symbol.for("react.element"),zx=Symbol.for("react.fragment"),Mx=Object.prototype.hasOwnProperty,Bx=Lx.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Ux={key:!0,ref:!0,__self:!0,__source:!0};function pp(e,t,n){var r,i={},o=null,s=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)Mx.call(t,r)&&!Ux.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:Fx,type:e,key:o,ref:s,props:i,_owner:Bx.current}}Us.Fragment=zx;Us.jsx=pp;Us.jsxs=pp;ip.exports=Us;var a=ip.exports,mp={exports:{}},dt={},gp={exports:{}},yp={};/**
18
- * @license React
19
- * scheduler.production.min.js
20
- *
21
- * Copyright (c) Facebook, Inc. and its 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
- */(function(e){function t(C,B){var w=C.length;C.push(B);e:for(;0<w;){var J=w-1>>>1,se=C[J];if(0<i(se,B))C[J]=B,C[w]=se,w=J;else break e}}function n(C){return C.length===0?null:C[0]}function r(C){if(C.length===0)return null;var B=C[0],w=C.pop();if(w!==B){C[0]=w;e:for(var J=0,se=C.length,T=se>>>1;J<T;){var Se=2*(J+1)-1,rt=C[Se],ue=Se+1,pt=C[ue];if(0>i(rt,w))ue<se&&0>i(pt,rt)?(C[J]=pt,C[ue]=w,J=ue):(C[J]=rt,C[Se]=w,J=Se);else if(ue<se&&0>i(pt,w))C[J]=pt,C[ue]=w,J=ue;else break e}}return B}function i(C,B){var w=C.sortIndex-B.sortIndex;return w!==0?w:C.id-B.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var u=[],c=[],f=1,d=null,h=3,p=!1,y=!1,x=!1,S=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(C){for(var B=n(c);B!==null;){if(B.callback===null)r(c);else if(B.startTime<=C)r(c),B.sortIndex=B.expirationTime,t(u,B);else break;B=n(c)}}function b(C){if(x=!1,v(C),!y)if(n(u)!==null)y=!0,F(j);else{var B=n(c);B!==null&&D(b,B.startTime-C)}}function j(C,B){y=!1,x&&(x=!1,g(O),O=-1),p=!0;var w=h;try{for(v(B),d=n(u);d!==null&&(!(d.expirationTime>B)||C&&!P());){var J=d.callback;if(typeof J=="function"){d.callback=null,h=d.priorityLevel;var se=J(d.expirationTime<=B);B=e.unstable_now(),typeof se=="function"?d.callback=se:d===n(u)&&r(u),v(B)}else r(u);d=n(u)}if(d!==null)var T=!0;else{var Se=n(c);Se!==null&&D(b,Se.startTime-B),T=!1}return T}finally{d=null,h=w,p=!1}}var E=!1,_=null,O=-1,R=5,N=-1;function P(){return!(e.unstable_now()-N<R)}function V(){if(_!==null){var C=e.unstable_now();N=C;var B=!0;try{B=_(!0,C)}finally{B?$():(E=!1,_=null)}}else E=!1}var $;if(typeof m=="function")$=function(){m(V)};else if(typeof MessageChannel<"u"){var H=new MessageChannel,G=H.port2;H.port1.onmessage=V,$=function(){G.postMessage(null)}}else $=function(){S(V,0)};function F(C){_=C,E||(E=!0,$())}function D(C,B){O=S(function(){C(e.unstable_now())},B)}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(C){C.callback=null},e.unstable_continueExecution=function(){y||p||(y=!0,F(j))},e.unstable_forceFrameRate=function(C){0>C||125<C?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<C?Math.floor(1e3/C):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(C){switch(h){case 1:case 2:case 3:var B=3;break;default:B=h}var w=h;h=B;try{return C()}finally{h=w}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(C,B){switch(C){case 1:case 2:case 3:case 4:case 5:break;default:C=3}var w=h;h=C;try{return B()}finally{h=w}},e.unstable_scheduleCallback=function(C,B,w){var J=e.unstable_now();switch(typeof w=="object"&&w!==null?(w=w.delay,w=typeof w=="number"&&0<w?J+w:J):w=J,C){case 1:var se=-1;break;case 2:se=250;break;case 5:se=1073741823;break;case 4:se=1e4;break;default:se=5e3}return se=w+se,C={id:f++,callback:B,priorityLevel:C,startTime:w,expirationTime:se,sortIndex:-1},w>J?(C.sortIndex=w,t(c,C),n(u)===null&&C===n(c)&&(x?(g(O),O=-1):x=!0,D(b,w-J))):(C.sortIndex=se,t(u,C),y||p||(y=!0,F(j))),C},e.unstable_shouldYield=P,e.unstable_wrapCallback=function(C){var B=h;return function(){var w=h;h=B;try{return C.apply(this,arguments)}finally{h=w}}}})(yp);gp.exports=yp;var Hx=gp.exports;/**
26
- * @license React
27
- * react-dom.production.min.js
28
- *
29
- * Copyright (c) Facebook, Inc. and its 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 $x=k,ct=Hx;function z(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var xp=new Set,zi={};function cr(e,t){Ur(e,t),Ur(e+"Capture",t)}function Ur(e,t){for(zi[e]=t,e=0;e<t.length;e++)xp.add(t[e])}var un=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),fa=Object.prototype.hasOwnProperty,Wx=/^[: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]*$/,fd={},hd={};function Vx(e){return fa.call(hd,e)?!0:fa.call(fd,e)?!1:Wx.test(e)?hd[e]=!0:(fd[e]=!0,!1)}function qx(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Gx(e,t,n,r){if(t===null||typeof t>"u"||qx(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ge(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var De={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){De[e]=new Ge(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];De[t]=new Ge(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){De[e]=new Ge(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){De[e]=new Ge(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){De[e]=new Ge(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){De[e]=new Ge(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){De[e]=new Ge(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){De[e]=new Ge(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){De[e]=new Ge(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ru=/[\-:]([a-z])/g;function Pu(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Ru,Pu);De[t]=new Ge(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Ru,Pu);De[t]=new Ge(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Ru,Pu);De[t]=new Ge(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){De[e]=new Ge(e,1,!1,e.toLowerCase(),null,!1,!1)});De.xlinkHref=new Ge("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){De[e]=new Ge(e,1,!1,e.toLowerCase(),null,!0,!0)});function Ou(e,t,n,r){var i=De.hasOwnProperty(t)?De[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Gx(t,n,i,r)&&(n=null),r||i===null?Vx(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var pn=$x.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,wo=Symbol.for("react.element"),wr=Symbol.for("react.portal"),Sr=Symbol.for("react.fragment"),Du=Symbol.for("react.strict_mode"),ha=Symbol.for("react.profiler"),vp=Symbol.for("react.provider"),kp=Symbol.for("react.context"),Lu=Symbol.for("react.forward_ref"),pa=Symbol.for("react.suspense"),ma=Symbol.for("react.suspense_list"),Fu=Symbol.for("react.memo"),wn=Symbol.for("react.lazy"),wp=Symbol.for("react.offscreen"),pd=Symbol.iterator;function si(e){return e===null||typeof e!="object"?null:(e=pd&&e[pd]||e["@@iterator"],typeof e=="function"?e:null)}var ke=Object.assign,xl;function vi(e){if(xl===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);xl=t&&t[1]||""}return`
34
- `+xl+e}var vl=!1;function kl(e,t){if(!e||vl)return"";vl=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var i=c.stack.split(`
35
- `),o=r.stack.split(`
36
- `),s=i.length-1,l=o.length-1;1<=s&&0<=l&&i[s]!==o[l];)l--;for(;1<=s&&0<=l;s--,l--)if(i[s]!==o[l]){if(s!==1||l!==1)do if(s--,l--,0>l||i[s]!==o[l]){var u=`
37
- `+i[s].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=s&&0<=l);break}}}finally{vl=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?vi(e):""}function Kx(e){switch(e.tag){case 5:return vi(e.type);case 16:return vi("Lazy");case 13:return vi("Suspense");case 19:return vi("SuspenseList");case 0:case 2:case 15:return e=kl(e.type,!1),e;case 11:return e=kl(e.type.render,!1),e;case 1:return e=kl(e.type,!0),e;default:return""}}function ga(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Sr:return"Fragment";case wr:return"Portal";case ha:return"Profiler";case Du:return"StrictMode";case pa:return"Suspense";case ma:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case kp:return(e.displayName||"Context")+".Consumer";case vp:return(e._context.displayName||"Context")+".Provider";case Lu:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Fu:return t=e.displayName||null,t!==null?t:ga(e.type)||"Memo";case wn:t=e._payload,e=e._init;try{return ga(e(t))}catch{}}return null}function Qx(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ga(t);case 8:return t===Du?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Mn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Sp(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Yx(e){var t=Sp(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function So(e){e._valueTracker||(e._valueTracker=Yx(e))}function Cp(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Sp(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function fs(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function ya(e,t){var n=t.checked;return ke({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function md(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Mn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Ep(e,t){t=t.checked,t!=null&&Ou(e,"checked",t,!1)}function xa(e,t){Ep(e,t);var n=Mn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?va(e,t.type,n):t.hasOwnProperty("defaultValue")&&va(e,t.type,Mn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function gd(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function va(e,t,n){(t!=="number"||fs(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ki=Array.isArray;function Pr(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Mn(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function ka(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(z(91));return ke({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function yd(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(z(92));if(ki(n)){if(1<n.length)throw Error(z(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Mn(n)}}function Np(e,t){var n=Mn(t.value),r=Mn(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function xd(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function bp(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function wa(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?bp(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Co,Tp=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Co=Co||document.createElement("div"),Co.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Co.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Mi(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ei={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Xx=["Webkit","ms","Moz","O"];Object.keys(Ei).forEach(function(e){Xx.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ei[t]=Ei[e]})});function jp(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ei.hasOwnProperty(e)&&Ei[e]?(""+t).trim():t+"px"}function _p(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=jp(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Jx=ke({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Sa(e,t){if(t){if(Jx[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(z(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(z(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(z(61))}if(t.style!=null&&typeof t.style!="object")throw Error(z(62))}}function Ca(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){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 Ea=null;function zu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Na=null,Or=null,Dr=null;function vd(e){if(e=uo(e)){if(typeof Na!="function")throw Error(z(280));var t=e.stateNode;t&&(t=qs(t),Na(e.stateNode,e.type,t))}}function Ip(e){Or?Dr?Dr.push(e):Dr=[e]:Or=e}function Ap(){if(Or){var e=Or,t=Dr;if(Dr=Or=null,vd(e),t)for(e=0;e<t.length;e++)vd(t[e])}}function Rp(e,t){return e(t)}function Pp(){}var wl=!1;function Op(e,t,n){if(wl)return e(t,n);wl=!0;try{return Rp(e,t,n)}finally{wl=!1,(Or!==null||Dr!==null)&&(Pp(),Ap())}}function Bi(e,t){var n=e.stateNode;if(n===null)return null;var r=qs(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(z(231,t,typeof n));return n}var ba=!1;if(un)try{var li={};Object.defineProperty(li,"passive",{get:function(){ba=!0}}),window.addEventListener("test",li,li),window.removeEventListener("test",li,li)}catch{ba=!1}function Zx(e,t,n,r,i,o,s,l,u){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(f){this.onError(f)}}var Ni=!1,hs=null,ps=!1,Ta=null,ev={onError:function(e){Ni=!0,hs=e}};function tv(e,t,n,r,i,o,s,l,u){Ni=!1,hs=null,Zx.apply(ev,arguments)}function nv(e,t,n,r,i,o,s,l,u){if(tv.apply(this,arguments),Ni){if(Ni){var c=hs;Ni=!1,hs=null}else throw Error(z(198));ps||(ps=!0,Ta=c)}}function dr(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Dp(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function kd(e){if(dr(e)!==e)throw Error(z(188))}function rv(e){var t=e.alternate;if(!t){if(t=dr(e),t===null)throw Error(z(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return kd(i),e;if(o===r)return kd(i),t;o=o.sibling}throw Error(z(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,l=i.child;l;){if(l===n){s=!0,n=i,r=o;break}if(l===r){s=!0,r=i,n=o;break}l=l.sibling}if(!s){for(l=o.child;l;){if(l===n){s=!0,n=o,r=i;break}if(l===r){s=!0,r=o,n=i;break}l=l.sibling}if(!s)throw Error(z(189))}}if(n.alternate!==r)throw Error(z(190))}if(n.tag!==3)throw Error(z(188));return n.stateNode.current===n?e:t}function Lp(e){return e=rv(e),e!==null?Fp(e):null}function Fp(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Fp(e);if(t!==null)return t;e=e.sibling}return null}var zp=ct.unstable_scheduleCallback,wd=ct.unstable_cancelCallback,iv=ct.unstable_shouldYield,ov=ct.unstable_requestPaint,Ce=ct.unstable_now,sv=ct.unstable_getCurrentPriorityLevel,Mu=ct.unstable_ImmediatePriority,Mp=ct.unstable_UserBlockingPriority,ms=ct.unstable_NormalPriority,lv=ct.unstable_LowPriority,Bp=ct.unstable_IdlePriority,Hs=null,Qt=null;function av(e){if(Qt&&typeof Qt.onCommitFiberRoot=="function")try{Qt.onCommitFiberRoot(Hs,e,void 0,(e.current.flags&128)===128)}catch{}}var Lt=Math.clz32?Math.clz32:dv,uv=Math.log,cv=Math.LN2;function dv(e){return e>>>=0,e===0?32:31-(uv(e)/cv|0)|0}var Eo=64,No=4194304;function wi(e){switch(e&-e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function gs(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var l=s&~i;l!==0?r=wi(l):(o&=s,o!==0&&(r=wi(o)))}else s=n&~i,s!==0?r=wi(s):o!==0&&(r=wi(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Lt(t),i=1<<n,r|=e[n],t&=~i;return r}function fv(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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 t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function hv(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var s=31-Lt(o),l=1<<s,u=i[s];u===-1?(!(l&n)||l&r)&&(i[s]=fv(l,t)):u<=t&&(e.expiredLanes|=l),o&=~l}}function ja(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Up(){var e=Eo;return Eo<<=1,!(Eo&4194240)&&(Eo=64),e}function Sl(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function lo(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Lt(t),e[t]=n}function pv(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-Lt(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}function Bu(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Lt(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var ae=0;function Hp(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var $p,Uu,Wp,Vp,qp,_a=!1,bo=[],In=null,An=null,Rn=null,Ui=new Map,Hi=new Map,En=[],mv="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 submit".split(" ");function Sd(e,t){switch(e){case"focusin":case"focusout":In=null;break;case"dragenter":case"dragleave":An=null;break;case"mouseover":case"mouseout":Rn=null;break;case"pointerover":case"pointerout":Ui.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Hi.delete(t.pointerId)}}function ai(e,t,n,r,i,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},t!==null&&(t=uo(t),t!==null&&Uu(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function gv(e,t,n,r,i){switch(t){case"focusin":return In=ai(In,e,t,n,r,i),!0;case"dragenter":return An=ai(An,e,t,n,r,i),!0;case"mouseover":return Rn=ai(Rn,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return Ui.set(o,ai(Ui.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Hi.set(o,ai(Hi.get(o)||null,e,t,n,r,i)),!0}return!1}function Gp(e){var t=Xn(e.target);if(t!==null){var n=dr(t);if(n!==null){if(t=n.tag,t===13){if(t=Dp(n),t!==null){e.blockedOn=t,qp(e.priority,function(){Wp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ko(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ia(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Ea=r,n.target.dispatchEvent(r),Ea=null}else return t=uo(n),t!==null&&Uu(t),e.blockedOn=n,!1;t.shift()}return!0}function Cd(e,t,n){Ko(e)&&n.delete(t)}function yv(){_a=!1,In!==null&&Ko(In)&&(In=null),An!==null&&Ko(An)&&(An=null),Rn!==null&&Ko(Rn)&&(Rn=null),Ui.forEach(Cd),Hi.forEach(Cd)}function ui(e,t){e.blockedOn===t&&(e.blockedOn=null,_a||(_a=!0,ct.unstable_scheduleCallback(ct.unstable_NormalPriority,yv)))}function $i(e){function t(i){return ui(i,e)}if(0<bo.length){ui(bo[0],e);for(var n=1;n<bo.length;n++){var r=bo[n];r.blockedOn===e&&(r.blockedOn=null)}}for(In!==null&&ui(In,e),An!==null&&ui(An,e),Rn!==null&&ui(Rn,e),Ui.forEach(t),Hi.forEach(t),n=0;n<En.length;n++)r=En[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<En.length&&(n=En[0],n.blockedOn===null);)Gp(n),n.blockedOn===null&&En.shift()}var Lr=pn.ReactCurrentBatchConfig,ys=!0;function xv(e,t,n,r){var i=ae,o=Lr.transition;Lr.transition=null;try{ae=1,Hu(e,t,n,r)}finally{ae=i,Lr.transition=o}}function vv(e,t,n,r){var i=ae,o=Lr.transition;Lr.transition=null;try{ae=4,Hu(e,t,n,r)}finally{ae=i,Lr.transition=o}}function Hu(e,t,n,r){if(ys){var i=Ia(e,t,n,r);if(i===null)Rl(e,t,r,xs,n),Sd(e,r);else if(gv(i,e,t,n,r))r.stopPropagation();else if(Sd(e,r),t&4&&-1<mv.indexOf(e)){for(;i!==null;){var o=uo(i);if(o!==null&&$p(o),o=Ia(e,t,n,r),o===null&&Rl(e,t,r,xs,n),o===i)break;i=o}i!==null&&r.stopPropagation()}else Rl(e,t,r,null,n)}}var xs=null;function Ia(e,t,n,r){if(xs=null,e=zu(r),e=Xn(e),e!==null)if(t=dr(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Dp(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return xs=e,null}function Kp(e){switch(e){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(sv()){case Mu:return 1;case Mp:return 4;case ms:case lv:return 16;case Bp:return 536870912;default:return 16}default:return 16}}var jn=null,$u=null,Qo=null;function Qp(){if(Qo)return Qo;var e,t=$u,n=t.length,r,i="value"in jn?jn.value:jn.textContent,o=i.length;for(e=0;e<n&&t[e]===i[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===i[o-r];r++);return Qo=i.slice(e,1<r?1-r:void 0)}function Yo(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function To(){return!0}function Ed(){return!1}function ft(e){function t(n,r,i,o,s){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=o,this.target=s,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(o):o[l]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?To:Ed,this.isPropagationStopped=Ed,this}return ke(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=To)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=To)},persist:function(){},isPersistent:To}),t}var Yr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Wu=ft(Yr),ao=ke({},Yr,{view:0,detail:0}),kv=ft(ao),Cl,El,ci,$s=ke({},ao,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Vu,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ci&&(ci&&e.type==="mousemove"?(Cl=e.screenX-ci.screenX,El=e.screenY-ci.screenY):El=Cl=0,ci=e),Cl)},movementY:function(e){return"movementY"in e?e.movementY:El}}),Nd=ft($s),wv=ke({},$s,{dataTransfer:0}),Sv=ft(wv),Cv=ke({},ao,{relatedTarget:0}),Nl=ft(Cv),Ev=ke({},Yr,{animationName:0,elapsedTime:0,pseudoElement:0}),Nv=ft(Ev),bv=ke({},Yr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Tv=ft(bv),jv=ke({},Yr,{data:0}),bd=ft(jv),_v={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Iv={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"},Av={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Rv(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Av[e])?!!t[e]:!1}function Vu(){return Rv}var Pv=ke({},ao,{key:function(e){if(e.key){var t=_v[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Yo(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Iv[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Vu,charCode:function(e){return e.type==="keypress"?Yo(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Yo(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Ov=ft(Pv),Dv=ke({},$s,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Td=ft(Dv),Lv=ke({},ao,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Vu}),Fv=ft(Lv),zv=ke({},Yr,{propertyName:0,elapsedTime:0,pseudoElement:0}),Mv=ft(zv),Bv=ke({},$s,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Uv=ft(Bv),Hv=[9,13,27,32],qu=un&&"CompositionEvent"in window,bi=null;un&&"documentMode"in document&&(bi=document.documentMode);var $v=un&&"TextEvent"in window&&!bi,Yp=un&&(!qu||bi&&8<bi&&11>=bi),jd=" ",_d=!1;function Xp(e,t){switch(e){case"keyup":return Hv.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Jp(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Cr=!1;function Wv(e,t){switch(e){case"compositionend":return Jp(t);case"keypress":return t.which!==32?null:(_d=!0,jd);case"textInput":return e=t.data,e===jd&&_d?null:e;default:return null}}function Vv(e,t){if(Cr)return e==="compositionend"||!qu&&Xp(e,t)?(e=Qp(),Qo=$u=jn=null,Cr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Yp&&t.locale!=="ko"?null:t.data;default:return null}}var qv={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 Id(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!qv[e.type]:t==="textarea"}function Zp(e,t,n,r){Ip(r),t=vs(t,"onChange"),0<t.length&&(n=new Wu("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Ti=null,Wi=null;function Gv(e){cm(e,0)}function Ws(e){var t=br(e);if(Cp(t))return e}function Kv(e,t){if(e==="change")return t}var em=!1;if(un){var bl;if(un){var Tl="oninput"in document;if(!Tl){var Ad=document.createElement("div");Ad.setAttribute("oninput","return;"),Tl=typeof Ad.oninput=="function"}bl=Tl}else bl=!1;em=bl&&(!document.documentMode||9<document.documentMode)}function Rd(){Ti&&(Ti.detachEvent("onpropertychange",tm),Wi=Ti=null)}function tm(e){if(e.propertyName==="value"&&Ws(Wi)){var t=[];Zp(t,Wi,e,zu(e)),Op(Gv,t)}}function Qv(e,t,n){e==="focusin"?(Rd(),Ti=t,Wi=n,Ti.attachEvent("onpropertychange",tm)):e==="focusout"&&Rd()}function Yv(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ws(Wi)}function Xv(e,t){if(e==="click")return Ws(t)}function Jv(e,t){if(e==="input"||e==="change")return Ws(t)}function Zv(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Mt=typeof Object.is=="function"?Object.is:Zv;function Vi(e,t){if(Mt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!fa.call(t,i)||!Mt(e[i],t[i]))return!1}return!0}function Pd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Od(e,t){var n=Pd(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Pd(n)}}function nm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?nm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function rm(){for(var e=window,t=fs();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=fs(e.document)}return t}function Gu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function ek(e){var t=rm(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&nm(n.ownerDocument.documentElement,n)){if(r!==null&&Gu(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=Od(n,o);var s=Od(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var tk=un&&"documentMode"in document&&11>=document.documentMode,Er=null,Aa=null,ji=null,Ra=!1;function Dd(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ra||Er==null||Er!==fs(r)||(r=Er,"selectionStart"in r&&Gu(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ji&&Vi(ji,r)||(ji=r,r=vs(Aa,"onSelect"),0<r.length&&(t=new Wu("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Er)))}function jo(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Nr={animationend:jo("Animation","AnimationEnd"),animationiteration:jo("Animation","AnimationIteration"),animationstart:jo("Animation","AnimationStart"),transitionend:jo("Transition","TransitionEnd")},jl={},im={};un&&(im=document.createElement("div").style,"AnimationEvent"in window||(delete Nr.animationend.animation,delete Nr.animationiteration.animation,delete Nr.animationstart.animation),"TransitionEvent"in window||delete Nr.transitionend.transition);function Vs(e){if(jl[e])return jl[e];if(!Nr[e])return e;var t=Nr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in im)return jl[e]=t[n];return e}var om=Vs("animationend"),sm=Vs("animationiteration"),lm=Vs("animationstart"),am=Vs("transitionend"),um=new Map,Ld="abort auxClick 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(" ");function Un(e,t){um.set(e,t),cr(t,[e])}for(var _l=0;_l<Ld.length;_l++){var Il=Ld[_l],nk=Il.toLowerCase(),rk=Il[0].toUpperCase()+Il.slice(1);Un(nk,"on"+rk)}Un(om,"onAnimationEnd");Un(sm,"onAnimationIteration");Un(lm,"onAnimationStart");Un("dblclick","onDoubleClick");Un("focusin","onFocus");Un("focusout","onBlur");Un(am,"onTransitionEnd");Ur("onMouseEnter",["mouseout","mouseover"]);Ur("onMouseLeave",["mouseout","mouseover"]);Ur("onPointerEnter",["pointerout","pointerover"]);Ur("onPointerLeave",["pointerout","pointerover"]);cr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));cr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));cr("onBeforeInput",["compositionend","keypress","textInput","paste"]);cr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));cr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));cr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Si="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(" "),ik=new Set("cancel close invalid load scroll toggle".split(" ").concat(Si));function Fd(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,nv(r,t,void 0,e),e.currentTarget=null}function cm(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var s=r.length-1;0<=s;s--){var l=r[s],u=l.instance,c=l.currentTarget;if(l=l.listener,u!==o&&i.isPropagationStopped())break e;Fd(i,l,c),o=u}else for(s=0;s<r.length;s++){if(l=r[s],u=l.instance,c=l.currentTarget,l=l.listener,u!==o&&i.isPropagationStopped())break e;Fd(i,l,c),o=u}}}if(ps)throw e=Ta,ps=!1,Ta=null,e}function pe(e,t){var n=t[Fa];n===void 0&&(n=t[Fa]=new Set);var r=e+"__bubble";n.has(r)||(dm(t,e,2,!1),n.add(r))}function Al(e,t,n){var r=0;t&&(r|=4),dm(n,e,r,t)}var _o="_reactListening"+Math.random().toString(36).slice(2);function qi(e){if(!e[_o]){e[_o]=!0,xp.forEach(function(n){n!=="selectionchange"&&(ik.has(n)||Al(n,!1,e),Al(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[_o]||(t[_o]=!0,Al("selectionchange",!1,t))}}function dm(e,t,n,r){switch(Kp(t)){case 1:var i=xv;break;case 4:i=vv;break;default:i=Hu}n=i.bind(null,t,n,e),i=void 0,!ba||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Rl(e,t,n,r,i){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var l=r.stateNode.containerInfo;if(l===i||l.nodeType===8&&l.parentNode===i)break;if(s===4)for(s=r.return;s!==null;){var u=s.tag;if((u===3||u===4)&&(u=s.stateNode.containerInfo,u===i||u.nodeType===8&&u.parentNode===i))return;s=s.return}for(;l!==null;){if(s=Xn(l),s===null)return;if(u=s.tag,u===5||u===6){r=o=s;continue e}l=l.parentNode}}r=r.return}Op(function(){var c=o,f=zu(n),d=[];e:{var h=um.get(e);if(h!==void 0){var p=Wu,y=e;switch(e){case"keypress":if(Yo(n)===0)break e;case"keydown":case"keyup":p=Ov;break;case"focusin":y="focus",p=Nl;break;case"focusout":y="blur",p=Nl;break;case"beforeblur":case"afterblur":p=Nl;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=Nd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=Sv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=Fv;break;case om:case sm:case lm:p=Nv;break;case am:p=Mv;break;case"scroll":p=kv;break;case"wheel":p=Uv;break;case"copy":case"cut":case"paste":p=Tv;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=Td}var x=(t&4)!==0,S=!x&&e==="scroll",g=x?h!==null?h+"Capture":null:h;x=[];for(var m=c,v;m!==null;){v=m;var b=v.stateNode;if(v.tag===5&&b!==null&&(v=b,g!==null&&(b=Bi(m,g),b!=null&&x.push(Gi(m,b,v)))),S)break;m=m.return}0<x.length&&(h=new p(h,y,null,n,f),d.push({event:h,listeners:x}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",h&&n!==Ea&&(y=n.relatedTarget||n.fromElement)&&(Xn(y)||y[cn]))break e;if((p||h)&&(h=f.window===f?f:(h=f.ownerDocument)?h.defaultView||h.parentWindow:window,p?(y=n.relatedTarget||n.toElement,p=c,y=y?Xn(y):null,y!==null&&(S=dr(y),y!==S||y.tag!==5&&y.tag!==6)&&(y=null)):(p=null,y=c),p!==y)){if(x=Nd,b="onMouseLeave",g="onMouseEnter",m="mouse",(e==="pointerout"||e==="pointerover")&&(x=Td,b="onPointerLeave",g="onPointerEnter",m="pointer"),S=p==null?h:br(p),v=y==null?h:br(y),h=new x(b,m+"leave",p,n,f),h.target=S,h.relatedTarget=v,b=null,Xn(f)===c&&(x=new x(g,m+"enter",y,n,f),x.target=v,x.relatedTarget=S,b=x),S=b,p&&y)t:{for(x=p,g=y,m=0,v=x;v;v=xr(v))m++;for(v=0,b=g;b;b=xr(b))v++;for(;0<m-v;)x=xr(x),m--;for(;0<v-m;)g=xr(g),v--;for(;m--;){if(x===g||g!==null&&x===g.alternate)break t;x=xr(x),g=xr(g)}x=null}else x=null;p!==null&&zd(d,h,p,x,!1),y!==null&&S!==null&&zd(d,S,y,x,!0)}}e:{if(h=c?br(c):window,p=h.nodeName&&h.nodeName.toLowerCase(),p==="select"||p==="input"&&h.type==="file")var j=Kv;else if(Id(h))if(em)j=Jv;else{j=Yv;var E=Qv}else(p=h.nodeName)&&p.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(j=Xv);if(j&&(j=j(e,c))){Zp(d,j,n,f);break e}E&&E(e,h,c),e==="focusout"&&(E=h._wrapperState)&&E.controlled&&h.type==="number"&&va(h,"number",h.value)}switch(E=c?br(c):window,e){case"focusin":(Id(E)||E.contentEditable==="true")&&(Er=E,Aa=c,ji=null);break;case"focusout":ji=Aa=Er=null;break;case"mousedown":Ra=!0;break;case"contextmenu":case"mouseup":case"dragend":Ra=!1,Dd(d,n,f);break;case"selectionchange":if(tk)break;case"keydown":case"keyup":Dd(d,n,f)}var _;if(qu)e:{switch(e){case"compositionstart":var O="onCompositionStart";break e;case"compositionend":O="onCompositionEnd";break e;case"compositionupdate":O="onCompositionUpdate";break e}O=void 0}else Cr?Xp(e,n)&&(O="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(O="onCompositionStart");O&&(Yp&&n.locale!=="ko"&&(Cr||O!=="onCompositionStart"?O==="onCompositionEnd"&&Cr&&(_=Qp()):(jn=f,$u="value"in jn?jn.value:jn.textContent,Cr=!0)),E=vs(c,O),0<E.length&&(O=new bd(O,e,null,n,f),d.push({event:O,listeners:E}),_?O.data=_:(_=Jp(n),_!==null&&(O.data=_)))),(_=$v?Wv(e,n):Vv(e,n))&&(c=vs(c,"onBeforeInput"),0<c.length&&(f=new bd("onBeforeInput","beforeinput",null,n,f),d.push({event:f,listeners:c}),f.data=_))}cm(d,t)})}function Gi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function vs(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=Bi(e,n),o!=null&&r.unshift(Gi(e,o,i)),o=Bi(e,t),o!=null&&r.push(Gi(e,o,i))),e=e.return}return r}function xr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function zd(e,t,n,r,i){for(var o=t._reactName,s=[];n!==null&&n!==r;){var l=n,u=l.alternate,c=l.stateNode;if(u!==null&&u===r)break;l.tag===5&&c!==null&&(l=c,i?(u=Bi(n,o),u!=null&&s.unshift(Gi(n,u,l))):i||(u=Bi(n,o),u!=null&&s.push(Gi(n,u,l)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var ok=/\r\n?/g,sk=/\u0000|\uFFFD/g;function Md(e){return(typeof e=="string"?e:""+e).replace(ok,`
38
- `).replace(sk,"")}function Io(e,t,n){if(t=Md(t),Md(e)!==t&&n)throw Error(z(425))}function ks(){}var Pa=null,Oa=null;function Da(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var La=typeof setTimeout=="function"?setTimeout:void 0,lk=typeof clearTimeout=="function"?clearTimeout:void 0,Bd=typeof Promise=="function"?Promise:void 0,ak=typeof queueMicrotask=="function"?queueMicrotask:typeof Bd<"u"?function(e){return Bd.resolve(null).then(e).catch(uk)}:La;function uk(e){setTimeout(function(){throw e})}function Pl(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),$i(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);$i(t)}function Pn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Ud(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Xr=Math.random().toString(36).slice(2),Kt="__reactFiber$"+Xr,Ki="__reactProps$"+Xr,cn="__reactContainer$"+Xr,Fa="__reactEvents$"+Xr,ck="__reactListeners$"+Xr,dk="__reactHandles$"+Xr;function Xn(e){var t=e[Kt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[cn]||n[Kt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Ud(e);e!==null;){if(n=e[Kt])return n;e=Ud(e)}return t}e=n,n=e.parentNode}return null}function uo(e){return e=e[Kt]||e[cn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function br(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(z(33))}function qs(e){return e[Ki]||null}var za=[],Tr=-1;function Hn(e){return{current:e}}function me(e){0>Tr||(e.current=za[Tr],za[Tr]=null,Tr--)}function he(e,t){Tr++,za[Tr]=e.current,e.current=t}var Bn={},Ue=Hn(Bn),Ze=Hn(!1),rr=Bn;function Hr(e,t){var n=e.type.contextTypes;if(!n)return Bn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function et(e){return e=e.childContextTypes,e!=null}function ws(){me(Ze),me(Ue)}function Hd(e,t,n){if(Ue.current!==Bn)throw Error(z(168));he(Ue,t),he(Ze,n)}function fm(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(z(108,Qx(e)||"Unknown",i));return ke({},n,r)}function Ss(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Bn,rr=Ue.current,he(Ue,e),he(Ze,Ze.current),!0}function $d(e,t,n){var r=e.stateNode;if(!r)throw Error(z(169));n?(e=fm(e,t,rr),r.__reactInternalMemoizedMergedChildContext=e,me(Ze),me(Ue),he(Ue,e)):me(Ze),he(Ze,n)}var on=null,Gs=!1,Ol=!1;function hm(e){on===null?on=[e]:on.push(e)}function fk(e){Gs=!0,hm(e)}function $n(){if(!Ol&&on!==null){Ol=!0;var e=0,t=ae;try{var n=on;for(ae=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}on=null,Gs=!1}catch(i){throw on!==null&&(on=on.slice(e+1)),zp(Mu,$n),i}finally{ae=t,Ol=!1}}return null}var jr=[],_r=0,Cs=null,Es=0,gt=[],yt=0,ir=null,sn=1,ln="";function Kn(e,t){jr[_r++]=Es,jr[_r++]=Cs,Cs=e,Es=t}function pm(e,t,n){gt[yt++]=sn,gt[yt++]=ln,gt[yt++]=ir,ir=e;var r=sn;e=ln;var i=32-Lt(r)-1;r&=~(1<<i),n+=1;var o=32-Lt(t)+i;if(30<o){var s=i-i%5;o=(r&(1<<s)-1).toString(32),r>>=s,i-=s,sn=1<<32-Lt(t)+i|n<<i|r,ln=o+e}else sn=1<<o|n<<i|r,ln=e}function Ku(e){e.return!==null&&(Kn(e,1),pm(e,1,0))}function Qu(e){for(;e===Cs;)Cs=jr[--_r],jr[_r]=null,Es=jr[--_r],jr[_r]=null;for(;e===ir;)ir=gt[--yt],gt[yt]=null,ln=gt[--yt],gt[yt]=null,sn=gt[--yt],gt[yt]=null}var at=null,lt=null,ge=!1,Ot=null;function mm(e,t){var n=kt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Wd(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,at=e,lt=Pn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,at=e,lt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=ir!==null?{id:sn,overflow:ln}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=kt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,at=e,lt=null,!0):!1;default:return!1}}function Ma(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Ba(e){if(ge){var t=lt;if(t){var n=t;if(!Wd(e,t)){if(Ma(e))throw Error(z(418));t=Pn(n.nextSibling);var r=at;t&&Wd(e,t)?mm(r,n):(e.flags=e.flags&-4097|2,ge=!1,at=e)}}else{if(Ma(e))throw Error(z(418));e.flags=e.flags&-4097|2,ge=!1,at=e}}}function Vd(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;at=e}function Ao(e){if(e!==at)return!1;if(!ge)return Vd(e),ge=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Da(e.type,e.memoizedProps)),t&&(t=lt)){if(Ma(e))throw gm(),Error(z(418));for(;t;)mm(e,t),t=Pn(t.nextSibling)}if(Vd(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(z(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){lt=Pn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}lt=null}}else lt=at?Pn(e.stateNode.nextSibling):null;return!0}function gm(){for(var e=lt;e;)e=Pn(e.nextSibling)}function $r(){lt=at=null,ge=!1}function Yu(e){Ot===null?Ot=[e]:Ot.push(e)}var hk=pn.ReactCurrentBatchConfig;function di(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(z(309));var r=n.stateNode}if(!r)throw Error(z(147,e));var i=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(s){var l=i.refs;s===null?delete l[o]:l[o]=s},t._stringRef=o,t)}if(typeof e!="string")throw Error(z(284));if(!n._owner)throw Error(z(290,e))}return e}function Ro(e,t){throw e=Object.prototype.toString.call(t),Error(z(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function qd(e){var t=e._init;return t(e._payload)}function ym(e){function t(g,m){if(e){var v=g.deletions;v===null?(g.deletions=[m],g.flags|=16):v.push(m)}}function n(g,m){if(!e)return null;for(;m!==null;)t(g,m),m=m.sibling;return null}function r(g,m){for(g=new Map;m!==null;)m.key!==null?g.set(m.key,m):g.set(m.index,m),m=m.sibling;return g}function i(g,m){return g=Fn(g,m),g.index=0,g.sibling=null,g}function o(g,m,v){return g.index=v,e?(v=g.alternate,v!==null?(v=v.index,v<m?(g.flags|=2,m):v):(g.flags|=2,m)):(g.flags|=1048576,m)}function s(g){return e&&g.alternate===null&&(g.flags|=2),g}function l(g,m,v,b){return m===null||m.tag!==6?(m=Ul(v,g.mode,b),m.return=g,m):(m=i(m,v),m.return=g,m)}function u(g,m,v,b){var j=v.type;return j===Sr?f(g,m,v.props.children,b,v.key):m!==null&&(m.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===wn&&qd(j)===m.type)?(b=i(m,v.props),b.ref=di(g,m,v),b.return=g,b):(b=rs(v.type,v.key,v.props,null,g.mode,b),b.ref=di(g,m,v),b.return=g,b)}function c(g,m,v,b){return m===null||m.tag!==4||m.stateNode.containerInfo!==v.containerInfo||m.stateNode.implementation!==v.implementation?(m=Hl(v,g.mode,b),m.return=g,m):(m=i(m,v.children||[]),m.return=g,m)}function f(g,m,v,b,j){return m===null||m.tag!==7?(m=nr(v,g.mode,b,j),m.return=g,m):(m=i(m,v),m.return=g,m)}function d(g,m,v){if(typeof m=="string"&&m!==""||typeof m=="number")return m=Ul(""+m,g.mode,v),m.return=g,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case wo:return v=rs(m.type,m.key,m.props,null,g.mode,v),v.ref=di(g,null,m),v.return=g,v;case wr:return m=Hl(m,g.mode,v),m.return=g,m;case wn:var b=m._init;return d(g,b(m._payload),v)}if(ki(m)||si(m))return m=nr(m,g.mode,v,null),m.return=g,m;Ro(g,m)}return null}function h(g,m,v,b){var j=m!==null?m.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return j!==null?null:l(g,m,""+v,b);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case wo:return v.key===j?u(g,m,v,b):null;case wr:return v.key===j?c(g,m,v,b):null;case wn:return j=v._init,h(g,m,j(v._payload),b)}if(ki(v)||si(v))return j!==null?null:f(g,m,v,b,null);Ro(g,v)}return null}function p(g,m,v,b,j){if(typeof b=="string"&&b!==""||typeof b=="number")return g=g.get(v)||null,l(m,g,""+b,j);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case wo:return g=g.get(b.key===null?v:b.key)||null,u(m,g,b,j);case wr:return g=g.get(b.key===null?v:b.key)||null,c(m,g,b,j);case wn:var E=b._init;return p(g,m,v,E(b._payload),j)}if(ki(b)||si(b))return g=g.get(v)||null,f(m,g,b,j,null);Ro(m,b)}return null}function y(g,m,v,b){for(var j=null,E=null,_=m,O=m=0,R=null;_!==null&&O<v.length;O++){_.index>O?(R=_,_=null):R=_.sibling;var N=h(g,_,v[O],b);if(N===null){_===null&&(_=R);break}e&&_&&N.alternate===null&&t(g,_),m=o(N,m,O),E===null?j=N:E.sibling=N,E=N,_=R}if(O===v.length)return n(g,_),ge&&Kn(g,O),j;if(_===null){for(;O<v.length;O++)_=d(g,v[O],b),_!==null&&(m=o(_,m,O),E===null?j=_:E.sibling=_,E=_);return ge&&Kn(g,O),j}for(_=r(g,_);O<v.length;O++)R=p(_,g,O,v[O],b),R!==null&&(e&&R.alternate!==null&&_.delete(R.key===null?O:R.key),m=o(R,m,O),E===null?j=R:E.sibling=R,E=R);return e&&_.forEach(function(P){return t(g,P)}),ge&&Kn(g,O),j}function x(g,m,v,b){var j=si(v);if(typeof j!="function")throw Error(z(150));if(v=j.call(v),v==null)throw Error(z(151));for(var E=j=null,_=m,O=m=0,R=null,N=v.next();_!==null&&!N.done;O++,N=v.next()){_.index>O?(R=_,_=null):R=_.sibling;var P=h(g,_,N.value,b);if(P===null){_===null&&(_=R);break}e&&_&&P.alternate===null&&t(g,_),m=o(P,m,O),E===null?j=P:E.sibling=P,E=P,_=R}if(N.done)return n(g,_),ge&&Kn(g,O),j;if(_===null){for(;!N.done;O++,N=v.next())N=d(g,N.value,b),N!==null&&(m=o(N,m,O),E===null?j=N:E.sibling=N,E=N);return ge&&Kn(g,O),j}for(_=r(g,_);!N.done;O++,N=v.next())N=p(_,g,O,N.value,b),N!==null&&(e&&N.alternate!==null&&_.delete(N.key===null?O:N.key),m=o(N,m,O),E===null?j=N:E.sibling=N,E=N);return e&&_.forEach(function(V){return t(g,V)}),ge&&Kn(g,O),j}function S(g,m,v,b){if(typeof v=="object"&&v!==null&&v.type===Sr&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case wo:e:{for(var j=v.key,E=m;E!==null;){if(E.key===j){if(j=v.type,j===Sr){if(E.tag===7){n(g,E.sibling),m=i(E,v.props.children),m.return=g,g=m;break e}}else if(E.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===wn&&qd(j)===E.type){n(g,E.sibling),m=i(E,v.props),m.ref=di(g,E,v),m.return=g,g=m;break e}n(g,E);break}else t(g,E);E=E.sibling}v.type===Sr?(m=nr(v.props.children,g.mode,b,v.key),m.return=g,g=m):(b=rs(v.type,v.key,v.props,null,g.mode,b),b.ref=di(g,m,v),b.return=g,g=b)}return s(g);case wr:e:{for(E=v.key;m!==null;){if(m.key===E)if(m.tag===4&&m.stateNode.containerInfo===v.containerInfo&&m.stateNode.implementation===v.implementation){n(g,m.sibling),m=i(m,v.children||[]),m.return=g,g=m;break e}else{n(g,m);break}else t(g,m);m=m.sibling}m=Hl(v,g.mode,b),m.return=g,g=m}return s(g);case wn:return E=v._init,S(g,m,E(v._payload),b)}if(ki(v))return y(g,m,v,b);if(si(v))return x(g,m,v,b);Ro(g,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,m!==null&&m.tag===6?(n(g,m.sibling),m=i(m,v),m.return=g,g=m):(n(g,m),m=Ul(v,g.mode,b),m.return=g,g=m),s(g)):n(g,m)}return S}var Wr=ym(!0),xm=ym(!1),Ns=Hn(null),bs=null,Ir=null,Xu=null;function Ju(){Xu=Ir=bs=null}function Zu(e){var t=Ns.current;me(Ns),e._currentValue=t}function Ua(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Fr(e,t){bs=e,Xu=Ir=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Je=!0),e.firstContext=null)}function St(e){var t=e._currentValue;if(Xu!==e)if(e={context:e,memoizedValue:t,next:null},Ir===null){if(bs===null)throw Error(z(308));Ir=e,bs.dependencies={lanes:0,firstContext:e}}else Ir=Ir.next=e;return t}var Jn=null;function ec(e){Jn===null?Jn=[e]:Jn.push(e)}function vm(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,ec(t)):(n.next=i.next,i.next=n),t.interleaved=n,dn(e,r)}function dn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Sn=!1;function tc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function km(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function an(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function On(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,oe&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,dn(e,n)}return i=r.interleaved,i===null?(t.next=t,ec(r)):(t.next=i.next,i.next=t),r.interleaved=t,dn(e,n)}function Xo(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Bu(e,n)}}function Gd(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=s:o=o.next=s,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ts(e,t,n,r){var i=e.updateQueue;Sn=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var u=l,c=u.next;u.next=null,s===null?o=c:s.next=c,s=u;var f=e.alternate;f!==null&&(f=f.updateQueue,l=f.lastBaseUpdate,l!==s&&(l===null?f.firstBaseUpdate=c:l.next=c,f.lastBaseUpdate=u))}if(o!==null){var d=i.baseState;s=0,f=c=u=null,l=o;do{var h=l.lane,p=l.eventTime;if((r&h)===h){f!==null&&(f=f.next={eventTime:p,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var y=e,x=l;switch(h=t,p=n,x.tag){case 1:if(y=x.payload,typeof y=="function"){d=y.call(p,d,h);break e}d=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=x.payload,h=typeof y=="function"?y.call(p,d,h):y,h==null)break e;d=ke({},d,h);break e;case 2:Sn=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,h=i.effects,h===null?i.effects=[l]:h.push(l))}else p={eventTime:p,lane:h,tag:l.tag,payload:l.payload,callback:l.callback,next:null},f===null?(c=f=p,u=d):f=f.next=p,s|=h;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;h=l,l=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(f===null&&(u=d),i.baseState=u,i.firstBaseUpdate=c,i.lastBaseUpdate=f,t=i.shared.interleaved,t!==null){i=t;do s|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);sr|=s,e.lanes=s,e.memoizedState=d}}function Kd(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(z(191,i));i.call(r)}}}var co={},Yt=Hn(co),Qi=Hn(co),Yi=Hn(co);function Zn(e){if(e===co)throw Error(z(174));return e}function nc(e,t){switch(he(Yi,t),he(Qi,e),he(Yt,co),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:wa(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=wa(t,e)}me(Yt),he(Yt,t)}function Vr(){me(Yt),me(Qi),me(Yi)}function wm(e){Zn(Yi.current);var t=Zn(Yt.current),n=wa(t,e.type);t!==n&&(he(Qi,e),he(Yt,n))}function rc(e){Qi.current===e&&(me(Yt),me(Qi))}var xe=Hn(0);function js(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Dl=[];function ic(){for(var e=0;e<Dl.length;e++)Dl[e]._workInProgressVersionPrimary=null;Dl.length=0}var Jo=pn.ReactCurrentDispatcher,Ll=pn.ReactCurrentBatchConfig,or=0,ve=null,_e=null,Ae=null,_s=!1,_i=!1,Xi=0,pk=0;function Fe(){throw Error(z(321))}function oc(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Mt(e[n],t[n]))return!1;return!0}function sc(e,t,n,r,i,o){if(or=o,ve=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Jo.current=e===null||e.memoizedState===null?xk:vk,e=n(r,i),_i){o=0;do{if(_i=!1,Xi=0,25<=o)throw Error(z(301));o+=1,Ae=_e=null,t.updateQueue=null,Jo.current=kk,e=n(r,i)}while(_i)}if(Jo.current=Is,t=_e!==null&&_e.next!==null,or=0,Ae=_e=ve=null,_s=!1,t)throw Error(z(300));return e}function lc(){var e=Xi!==0;return Xi=0,e}function $t(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ae===null?ve.memoizedState=Ae=e:Ae=Ae.next=e,Ae}function Ct(){if(_e===null){var e=ve.alternate;e=e!==null?e.memoizedState:null}else e=_e.next;var t=Ae===null?ve.memoizedState:Ae.next;if(t!==null)Ae=t,_e=e;else{if(e===null)throw Error(z(310));_e=e,e={memoizedState:_e.memoizedState,baseState:_e.baseState,baseQueue:_e.baseQueue,queue:_e.queue,next:null},Ae===null?ve.memoizedState=Ae=e:Ae=Ae.next=e}return Ae}function Ji(e,t){return typeof t=="function"?t(e):t}function Fl(e){var t=Ct(),n=t.queue;if(n===null)throw Error(z(311));n.lastRenderedReducer=e;var r=_e,i=r.baseQueue,o=n.pending;if(o!==null){if(i!==null){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(i!==null){o=i.next,r=r.baseState;var l=s=null,u=null,c=o;do{var f=c.lane;if((or&f)===f)u!==null&&(u=u.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var d={lane:f,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};u===null?(l=u=d,s=r):u=u.next=d,ve.lanes|=f,sr|=f}c=c.next}while(c!==null&&c!==o);u===null?s=r:u.next=l,Mt(r,t.memoizedState)||(Je=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=u,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do o=i.lane,ve.lanes|=o,sr|=o,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function zl(e){var t=Ct(),n=t.queue;if(n===null)throw Error(z(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do o=e(o,s.action),s=s.next;while(s!==i);Mt(o,t.memoizedState)||(Je=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Sm(){}function Cm(e,t){var n=ve,r=Ct(),i=t(),o=!Mt(r.memoizedState,i);if(o&&(r.memoizedState=i,Je=!0),r=r.queue,ac(bm.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||Ae!==null&&Ae.memoizedState.tag&1){if(n.flags|=2048,Zi(9,Nm.bind(null,n,r,i,t),void 0,null),Re===null)throw Error(z(349));or&30||Em(n,t,i)}return i}function Em(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ve.updateQueue,t===null?(t={lastEffect:null,stores:null},ve.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Nm(e,t,n,r){t.value=n,t.getSnapshot=r,Tm(t)&&jm(e)}function bm(e,t,n){return n(function(){Tm(t)&&jm(e)})}function Tm(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Mt(e,n)}catch{return!0}}function jm(e){var t=dn(e,1);t!==null&&Ft(t,e,1,-1)}function Qd(e){var t=$t();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ji,lastRenderedState:e},t.queue=e,e=e.dispatch=yk.bind(null,ve,e),[t.memoizedState,e]}function Zi(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=ve.updateQueue,t===null?(t={lastEffect:null,stores:null},ve.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function _m(){return Ct().memoizedState}function Zo(e,t,n,r){var i=$t();ve.flags|=e,i.memoizedState=Zi(1|t,n,void 0,r===void 0?null:r)}function Ks(e,t,n,r){var i=Ct();r=r===void 0?null:r;var o=void 0;if(_e!==null){var s=_e.memoizedState;if(o=s.destroy,r!==null&&oc(r,s.deps)){i.memoizedState=Zi(t,n,o,r);return}}ve.flags|=e,i.memoizedState=Zi(1|t,n,o,r)}function Yd(e,t){return Zo(8390656,8,e,t)}function ac(e,t){return Ks(2048,8,e,t)}function Im(e,t){return Ks(4,2,e,t)}function Am(e,t){return Ks(4,4,e,t)}function Rm(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Pm(e,t,n){return n=n!=null?n.concat([e]):null,Ks(4,4,Rm.bind(null,t,e),n)}function uc(){}function Om(e,t){var n=Ct();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&oc(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Dm(e,t){var n=Ct();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&oc(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Lm(e,t,n){return or&21?(Mt(n,t)||(n=Up(),ve.lanes|=n,sr|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Je=!0),e.memoizedState=n)}function mk(e,t){var n=ae;ae=n!==0&&4>n?n:4,e(!0);var r=Ll.transition;Ll.transition={};try{e(!1),t()}finally{ae=n,Ll.transition=r}}function Fm(){return Ct().memoizedState}function gk(e,t,n){var r=Ln(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},zm(e))Mm(t,n);else if(n=vm(e,t,n,r),n!==null){var i=Ve();Ft(n,e,r,i),Bm(n,t,r)}}function yk(e,t,n){var r=Ln(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(zm(e))Mm(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,l=o(s,n);if(i.hasEagerState=!0,i.eagerState=l,Mt(l,s)){var u=t.interleaved;u===null?(i.next=i,ec(t)):(i.next=u.next,u.next=i),t.interleaved=i;return}}catch{}finally{}n=vm(e,t,i,r),n!==null&&(i=Ve(),Ft(n,e,r,i),Bm(n,t,r))}}function zm(e){var t=e.alternate;return e===ve||t!==null&&t===ve}function Mm(e,t){_i=_s=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Bm(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Bu(e,n)}}var Is={readContext:St,useCallback:Fe,useContext:Fe,useEffect:Fe,useImperativeHandle:Fe,useInsertionEffect:Fe,useLayoutEffect:Fe,useMemo:Fe,useReducer:Fe,useRef:Fe,useState:Fe,useDebugValue:Fe,useDeferredValue:Fe,useTransition:Fe,useMutableSource:Fe,useSyncExternalStore:Fe,useId:Fe,unstable_isNewReconciler:!1},xk={readContext:St,useCallback:function(e,t){return $t().memoizedState=[e,t===void 0?null:t],e},useContext:St,useEffect:Yd,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Zo(4194308,4,Rm.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Zo(4194308,4,e,t)},useInsertionEffect:function(e,t){return Zo(4,2,e,t)},useMemo:function(e,t){var n=$t();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=$t();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=gk.bind(null,ve,e),[r.memoizedState,e]},useRef:function(e){var t=$t();return e={current:e},t.memoizedState=e},useState:Qd,useDebugValue:uc,useDeferredValue:function(e){return $t().memoizedState=e},useTransition:function(){var e=Qd(!1),t=e[0];return e=mk.bind(null,e[1]),$t().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ve,i=$t();if(ge){if(n===void 0)throw Error(z(407));n=n()}else{if(n=t(),Re===null)throw Error(z(349));or&30||Em(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Yd(bm.bind(null,r,o,e),[e]),r.flags|=2048,Zi(9,Nm.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=$t(),t=Re.identifierPrefix;if(ge){var n=ln,r=sn;n=(r&~(1<<32-Lt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Xi++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=pk++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},vk={readContext:St,useCallback:Om,useContext:St,useEffect:ac,useImperativeHandle:Pm,useInsertionEffect:Im,useLayoutEffect:Am,useMemo:Dm,useReducer:Fl,useRef:_m,useState:function(){return Fl(Ji)},useDebugValue:uc,useDeferredValue:function(e){var t=Ct();return Lm(t,_e.memoizedState,e)},useTransition:function(){var e=Fl(Ji)[0],t=Ct().memoizedState;return[e,t]},useMutableSource:Sm,useSyncExternalStore:Cm,useId:Fm,unstable_isNewReconciler:!1},kk={readContext:St,useCallback:Om,useContext:St,useEffect:ac,useImperativeHandle:Pm,useInsertionEffect:Im,useLayoutEffect:Am,useMemo:Dm,useReducer:zl,useRef:_m,useState:function(){return zl(Ji)},useDebugValue:uc,useDeferredValue:function(e){var t=Ct();return _e===null?t.memoizedState=e:Lm(t,_e.memoizedState,e)},useTransition:function(){var e=zl(Ji)[0],t=Ct().memoizedState;return[e,t]},useMutableSource:Sm,useSyncExternalStore:Cm,useId:Fm,unstable_isNewReconciler:!1};function It(e,t){if(e&&e.defaultProps){t=ke({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Ha(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ke({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Qs={isMounted:function(e){return(e=e._reactInternals)?dr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ve(),i=Ln(e),o=an(r,i);o.payload=t,n!=null&&(o.callback=n),t=On(e,o,i),t!==null&&(Ft(t,e,i,r),Xo(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ve(),i=Ln(e),o=an(r,i);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=On(e,o,i),t!==null&&(Ft(t,e,i,r),Xo(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ve(),r=Ln(e),i=an(n,r);i.tag=2,t!=null&&(i.callback=t),t=On(e,i,r),t!==null&&(Ft(t,e,r,n),Xo(t,e,r))}};function Xd(e,t,n,r,i,o,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,s):t.prototype&&t.prototype.isPureReactComponent?!Vi(n,r)||!Vi(i,o):!0}function Um(e,t,n){var r=!1,i=Bn,o=t.contextType;return typeof o=="object"&&o!==null?o=St(o):(i=et(t)?rr:Ue.current,r=t.contextTypes,o=(r=r!=null)?Hr(e,i):Bn),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Qs,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function Jd(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Qs.enqueueReplaceState(t,t.state,null)}function $a(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},tc(e);var o=t.contextType;typeof o=="object"&&o!==null?i.context=St(o):(o=et(t)?rr:Ue.current,i.context=Hr(e,o)),i.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(Ha(e,t,o,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&Qs.enqueueReplaceState(i,i.state,null),Ts(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function qr(e,t){try{var n="",r=t;do n+=Kx(r),r=r.return;while(r);var i=n}catch(o){i=`
39
- Error generating stack: `+o.message+`
40
- `+o.stack}return{value:e,source:t,stack:i,digest:null}}function Ml(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Wa(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var wk=typeof WeakMap=="function"?WeakMap:Map;function Hm(e,t,n){n=an(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Rs||(Rs=!0,eu=r),Wa(e,t)},n}function $m(e,t,n){n=an(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Wa(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Wa(e,t),typeof r!="function"&&(Dn===null?Dn=new Set([this]):Dn.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function Zd(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new wk;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Dk.bind(null,e,t,n),t.then(e,e))}function ef(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function tf(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=an(-1,1),t.tag=2,On(n,t,1))),n.lanes|=1),e)}var Sk=pn.ReactCurrentOwner,Je=!1;function $e(e,t,n,r){t.child=e===null?xm(t,null,n,r):Wr(t,e.child,n,r)}function nf(e,t,n,r,i){n=n.render;var o=t.ref;return Fr(t,i),r=sc(e,t,n,r,o,i),n=lc(),e!==null&&!Je?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,fn(e,t,i)):(ge&&n&&Ku(t),t.flags|=1,$e(e,t,r,i),t.child)}function rf(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!yc(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,Wm(e,t,o,r,i)):(e=rs(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var s=o.memoizedProps;if(n=n.compare,n=n!==null?n:Vi,n(s,r)&&e.ref===t.ref)return fn(e,t,i)}return t.flags|=1,e=Fn(o,r),e.ref=t.ref,e.return=t,t.child=e}function Wm(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(Vi(o,r)&&e.ref===t.ref)if(Je=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(Je=!0);else return t.lanes=e.lanes,fn(e,t,i)}return Va(e,t,n,r,i)}function Vm(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},he(Rr,st),st|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,he(Rr,st),st|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,he(Rr,st),st|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,he(Rr,st),st|=r;return $e(e,t,i,n),t.child}function qm(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Va(e,t,n,r,i){var o=et(n)?rr:Ue.current;return o=Hr(t,o),Fr(t,i),n=sc(e,t,n,r,o,i),r=lc(),e!==null&&!Je?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,fn(e,t,i)):(ge&&r&&Ku(t),t.flags|=1,$e(e,t,n,i),t.child)}function of(e,t,n,r,i){if(et(n)){var o=!0;Ss(t)}else o=!1;if(Fr(t,i),t.stateNode===null)es(e,t),Um(t,n,r),$a(t,n,r,i),r=!0;else if(e===null){var s=t.stateNode,l=t.memoizedProps;s.props=l;var u=s.context,c=n.contextType;typeof c=="object"&&c!==null?c=St(c):(c=et(n)?rr:Ue.current,c=Hr(t,c));var f=n.getDerivedStateFromProps,d=typeof f=="function"||typeof s.getSnapshotBeforeUpdate=="function";d||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==r||u!==c)&&Jd(t,s,r,c),Sn=!1;var h=t.memoizedState;s.state=h,Ts(t,r,s,i),u=t.memoizedState,l!==r||h!==u||Ze.current||Sn?(typeof f=="function"&&(Ha(t,n,f,r),u=t.memoizedState),(l=Sn||Xd(t,n,l,r,h,u,c))?(d||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),s.props=r,s.state=u,s.context=c,r=l):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,km(e,t),l=t.memoizedProps,c=t.type===t.elementType?l:It(t.type,l),s.props=c,d=t.pendingProps,h=s.context,u=n.contextType,typeof u=="object"&&u!==null?u=St(u):(u=et(n)?rr:Ue.current,u=Hr(t,u));var p=n.getDerivedStateFromProps;(f=typeof p=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==d||h!==u)&&Jd(t,s,r,u),Sn=!1,h=t.memoizedState,s.state=h,Ts(t,r,s,i);var y=t.memoizedState;l!==d||h!==y||Ze.current||Sn?(typeof p=="function"&&(Ha(t,n,p,r),y=t.memoizedState),(c=Sn||Xd(t,n,c,r,h,y,u)||!1)?(f||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,y,u),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,y,u)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=y),s.props=r,s.state=y,s.context=u,r=c):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return qa(e,t,n,r,o,i)}function qa(e,t,n,r,i,o){qm(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return i&&$d(t,n,!1),fn(e,t,o);r=t.stateNode,Sk.current=t;var l=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Wr(t,e.child,null,o),t.child=Wr(t,null,l,o)):$e(e,t,l,o),t.memoizedState=r.state,i&&$d(t,n,!0),t.child}function Gm(e){var t=e.stateNode;t.pendingContext?Hd(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Hd(e,t.context,!1),nc(e,t.containerInfo)}function sf(e,t,n,r,i){return $r(),Yu(i),t.flags|=256,$e(e,t,n,r),t.child}var Ga={dehydrated:null,treeContext:null,retryLane:0};function Ka(e){return{baseLanes:e,cachePool:null,transitions:null}}function Km(e,t,n){var r=t.pendingProps,i=xe.current,o=!1,s=(t.flags&128)!==0,l;if((l=s)||(l=e!==null&&e.memoizedState===null?!1:(i&2)!==0),l?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),he(xe,i&1),e===null)return Ba(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,o?(r=t.mode,o=t.child,s={mode:"hidden",children:s},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=s):o=Js(s,r,0,null),e=nr(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Ka(n),t.memoizedState=Ga,e):cc(t,s));if(i=e.memoizedState,i!==null&&(l=i.dehydrated,l!==null))return Ck(e,t,s,r,l,i,n);if(o){o=r.fallback,s=t.mode,i=e.child,l=i.sibling;var u={mode:"hidden",children:r.children};return!(s&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=Fn(i,u),r.subtreeFlags=i.subtreeFlags&14680064),l!==null?o=Fn(l,o):(o=nr(o,s,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,s=e.child.memoizedState,s=s===null?Ka(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=e.childLanes&~n,t.memoizedState=Ga,r}return o=e.child,e=o.sibling,r=Fn(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function cc(e,t){return t=Js({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Po(e,t,n,r){return r!==null&&Yu(r),Wr(t,e.child,null,n),e=cc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ck(e,t,n,r,i,o,s){if(n)return t.flags&256?(t.flags&=-257,r=Ml(Error(z(422))),Po(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=Js({mode:"visible",children:r.children},i,0,null),o=nr(o,i,s,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&Wr(t,e.child,null,s),t.child.memoizedState=Ka(s),t.memoizedState=Ga,o);if(!(t.mode&1))return Po(e,t,s,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var l=r.dgst;return r=l,o=Error(z(419)),r=Ml(o,r,void 0),Po(e,t,s,r)}if(l=(s&e.childLanes)!==0,Je||l){if(r=Re,r!==null){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|s)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,dn(e,i),Ft(r,e,i,-1))}return gc(),r=Ml(Error(z(421))),Po(e,t,s,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=Lk.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,lt=Pn(i.nextSibling),at=t,ge=!0,Ot=null,e!==null&&(gt[yt++]=sn,gt[yt++]=ln,gt[yt++]=ir,sn=e.id,ln=e.overflow,ir=t),t=cc(t,r.children),t.flags|=4096,t)}function lf(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ua(e.return,t,n)}function Bl(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function Qm(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if($e(e,t,r.children,n),r=xe.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&lf(e,n,t);else if(e.tag===19)lf(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(he(xe,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&js(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Bl(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&js(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Bl(t,!0,n,null,o);break;case"together":Bl(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function es(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function fn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),sr|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(z(153));if(t.child!==null){for(e=t.child,n=Fn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Fn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Ek(e,t,n){switch(t.tag){case 3:Gm(t),$r();break;case 5:wm(t);break;case 1:et(t.type)&&Ss(t);break;case 4:nc(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;he(Ns,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(he(xe,xe.current&1),t.flags|=128,null):n&t.child.childLanes?Km(e,t,n):(he(xe,xe.current&1),e=fn(e,t,n),e!==null?e.sibling:null);he(xe,xe.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Qm(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),he(xe,xe.current),r)break;return null;case 22:case 23:return t.lanes=0,Vm(e,t,n)}return fn(e,t,n)}var Ym,Qa,Xm,Jm;Ym=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Qa=function(){};Xm=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Zn(Yt.current);var o=null;switch(n){case"input":i=ya(e,i),r=ya(e,r),o=[];break;case"select":i=ke({},i,{value:void 0}),r=ke({},r,{value:void 0}),o=[];break;case"textarea":i=ka(e,i),r=ka(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=ks)}Sa(n,r);var s;n=null;for(c in i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var l=i[c];for(s in l)l.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(zi.hasOwnProperty(c)?o||(o=[]):(o=o||[]).push(c,null));for(c in r){var u=r[c];if(l=i!=null?i[c]:void 0,r.hasOwnProperty(c)&&u!==l&&(u!=null||l!=null))if(c==="style")if(l){for(s in l)!l.hasOwnProperty(s)||u&&u.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in u)u.hasOwnProperty(s)&&l[s]!==u[s]&&(n||(n={}),n[s]=u[s])}else n||(o||(o=[]),o.push(c,n)),n=u;else c==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,l=l?l.__html:void 0,u!=null&&l!==u&&(o=o||[]).push(c,u)):c==="children"?typeof u!="string"&&typeof u!="number"||(o=o||[]).push(c,""+u):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(zi.hasOwnProperty(c)?(u!=null&&c==="onScroll"&&pe("scroll",e),o||l===u||(o=[])):(o=o||[]).push(c,u))}n&&(o=o||[]).push("style",n);var c=o;(t.updateQueue=c)&&(t.flags|=4)}};Jm=function(e,t,n,r){n!==r&&(t.flags|=4)};function fi(e,t){if(!ge)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ze(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Nk(e,t,n){var r=t.pendingProps;switch(Qu(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ze(t),null;case 1:return et(t.type)&&ws(),ze(t),null;case 3:return r=t.stateNode,Vr(),me(Ze),me(Ue),ic(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ao(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ot!==null&&(ru(Ot),Ot=null))),Qa(e,t),ze(t),null;case 5:rc(t);var i=Zn(Yi.current);if(n=t.type,e!==null&&t.stateNode!=null)Xm(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(z(166));return ze(t),null}if(e=Zn(Yt.current),Ao(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Kt]=t,r[Ki]=o,e=(t.mode&1)!==0,n){case"dialog":pe("cancel",r),pe("close",r);break;case"iframe":case"object":case"embed":pe("load",r);break;case"video":case"audio":for(i=0;i<Si.length;i++)pe(Si[i],r);break;case"source":pe("error",r);break;case"img":case"image":case"link":pe("error",r),pe("load",r);break;case"details":pe("toggle",r);break;case"input":md(r,o),pe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},pe("invalid",r);break;case"textarea":yd(r,o),pe("invalid",r)}Sa(n,o),i=null;for(var s in o)if(o.hasOwnProperty(s)){var l=o[s];s==="children"?typeof l=="string"?r.textContent!==l&&(o.suppressHydrationWarning!==!0&&Io(r.textContent,l,e),i=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(o.suppressHydrationWarning!==!0&&Io(r.textContent,l,e),i=["children",""+l]):zi.hasOwnProperty(s)&&l!=null&&s==="onScroll"&&pe("scroll",r)}switch(n){case"input":So(r),gd(r,o,!0);break;case"textarea":So(r),xd(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=ks)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{s=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=bp(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Kt]=t,e[Ki]=r,Ym(e,t,!1,!1),t.stateNode=e;e:{switch(s=Ca(n,r),n){case"dialog":pe("cancel",e),pe("close",e),i=r;break;case"iframe":case"object":case"embed":pe("load",e),i=r;break;case"video":case"audio":for(i=0;i<Si.length;i++)pe(Si[i],e);i=r;break;case"source":pe("error",e),i=r;break;case"img":case"image":case"link":pe("error",e),pe("load",e),i=r;break;case"details":pe("toggle",e),i=r;break;case"input":md(e,r),i=ya(e,r),pe("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=ke({},r,{value:void 0}),pe("invalid",e);break;case"textarea":yd(e,r),i=ka(e,r),pe("invalid",e);break;default:i=r}Sa(n,i),l=i;for(o in l)if(l.hasOwnProperty(o)){var u=l[o];o==="style"?_p(e,u):o==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&Tp(e,u)):o==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&Mi(e,u):typeof u=="number"&&Mi(e,""+u):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(zi.hasOwnProperty(o)?u!=null&&o==="onScroll"&&pe("scroll",e):u!=null&&Ou(e,o,u,s))}switch(n){case"input":So(e),gd(e,r,!1);break;case"textarea":So(e),xd(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Mn(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?Pr(e,!!r.multiple,o,!1):r.defaultValue!=null&&Pr(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=ks)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return ze(t),null;case 6:if(e&&t.stateNode!=null)Jm(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(z(166));if(n=Zn(Yi.current),Zn(Yt.current),Ao(t)){if(r=t.stateNode,n=t.memoizedProps,r[Kt]=t,(o=r.nodeValue!==n)&&(e=at,e!==null))switch(e.tag){case 3:Io(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Io(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Kt]=t,t.stateNode=r}return ze(t),null;case 13:if(me(xe),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ge&&lt!==null&&t.mode&1&&!(t.flags&128))gm(),$r(),t.flags|=98560,o=!1;else if(o=Ao(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(z(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(z(317));o[Kt]=t}else $r(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ze(t),o=!1}else Ot!==null&&(ru(Ot),Ot=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||xe.current&1?Ie===0&&(Ie=3):gc())),t.updateQueue!==null&&(t.flags|=4),ze(t),null);case 4:return Vr(),Qa(e,t),e===null&&qi(t.stateNode.containerInfo),ze(t),null;case 10:return Zu(t.type._context),ze(t),null;case 17:return et(t.type)&&ws(),ze(t),null;case 19:if(me(xe),o=t.memoizedState,o===null)return ze(t),null;if(r=(t.flags&128)!==0,s=o.rendering,s===null)if(r)fi(o,!1);else{if(Ie!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=js(e),s!==null){for(t.flags|=128,fi(o,!1),r=s.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,s=o.alternate,s===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=s.childLanes,o.lanes=s.lanes,o.child=s.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=s.memoizedProps,o.memoizedState=s.memoizedState,o.updateQueue=s.updateQueue,o.type=s.type,e=s.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return he(xe,xe.current&1|2),t.child}e=e.sibling}o.tail!==null&&Ce()>Gr&&(t.flags|=128,r=!0,fi(o,!1),t.lanes=4194304)}else{if(!r)if(e=js(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),fi(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!ge)return ze(t),null}else 2*Ce()-o.renderingStartTime>Gr&&n!==1073741824&&(t.flags|=128,r=!0,fi(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Ce(),t.sibling=null,n=xe.current,he(xe,r?n&1|2:n&1),t):(ze(t),null);case 22:case 23:return mc(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?st&1073741824&&(ze(t),t.subtreeFlags&6&&(t.flags|=8192)):ze(t),null;case 24:return null;case 25:return null}throw Error(z(156,t.tag))}function bk(e,t){switch(Qu(t),t.tag){case 1:return et(t.type)&&ws(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Vr(),me(Ze),me(Ue),ic(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return rc(t),null;case 13:if(me(xe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(z(340));$r()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return me(xe),null;case 4:return Vr(),null;case 10:return Zu(t.type._context),null;case 22:case 23:return mc(),null;case 24:return null;default:return null}}var Oo=!1,Me=!1,Tk=typeof WeakSet=="function"?WeakSet:Set,K=null;function Ar(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){we(e,t,r)}else n.current=null}function Ya(e,t,n){try{n()}catch(r){we(e,t,r)}}var af=!1;function jk(e,t){if(Pa=ys,e=rm(),Gu(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,l=-1,u=-1,c=0,f=0,d=e,h=null;t:for(;;){for(var p;d!==n||i!==0&&d.nodeType!==3||(l=s+i),d!==o||r!==0&&d.nodeType!==3||(u=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(p=d.firstChild)!==null;)h=d,d=p;for(;;){if(d===e)break t;if(h===n&&++c===i&&(l=s),h===o&&++f===r&&(u=s),(p=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=p}n=l===-1||u===-1?null:{start:l,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Oa={focusedElem:e,selectionRange:n},ys=!1,K=t;K!==null;)if(t=K,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,K=e;else for(;K!==null;){t=K;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var x=y.memoizedProps,S=y.memoizedState,g=t.stateNode,m=g.getSnapshotBeforeUpdate(t.elementType===t.type?x:It(t.type,x),S);g.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(z(163))}}catch(b){we(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,K=e;break}K=t.return}return y=af,af=!1,y}function Ii(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&Ya(t,n,o)}i=i.next}while(i!==r)}}function Ys(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Xa(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Zm(e){var t=e.alternate;t!==null&&(e.alternate=null,Zm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Kt],delete t[Ki],delete t[Fa],delete t[ck],delete t[dk])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function eg(e){return e.tag===5||e.tag===3||e.tag===4}function uf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||eg(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ja(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ks));else if(r!==4&&(e=e.child,e!==null))for(Ja(e,t,n),e=e.sibling;e!==null;)Ja(e,t,n),e=e.sibling}function Za(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Za(e,t,n),e=e.sibling;e!==null;)Za(e,t,n),e=e.sibling}var Pe=null,Rt=!1;function vn(e,t,n){for(n=n.child;n!==null;)tg(e,t,n),n=n.sibling}function tg(e,t,n){if(Qt&&typeof Qt.onCommitFiberUnmount=="function")try{Qt.onCommitFiberUnmount(Hs,n)}catch{}switch(n.tag){case 5:Me||Ar(n,t);case 6:var r=Pe,i=Rt;Pe=null,vn(e,t,n),Pe=r,Rt=i,Pe!==null&&(Rt?(e=Pe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Pe.removeChild(n.stateNode));break;case 18:Pe!==null&&(Rt?(e=Pe,n=n.stateNode,e.nodeType===8?Pl(e.parentNode,n):e.nodeType===1&&Pl(e,n),$i(e)):Pl(Pe,n.stateNode));break;case 4:r=Pe,i=Rt,Pe=n.stateNode.containerInfo,Rt=!0,vn(e,t,n),Pe=r,Rt=i;break;case 0:case 11:case 14:case 15:if(!Me&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&Ya(n,t,s),i=i.next}while(i!==r)}vn(e,t,n);break;case 1:if(!Me&&(Ar(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){we(n,t,l)}vn(e,t,n);break;case 21:vn(e,t,n);break;case 22:n.mode&1?(Me=(r=Me)||n.memoizedState!==null,vn(e,t,n),Me=r):vn(e,t,n);break;default:vn(e,t,n)}}function cf(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Tk),t.forEach(function(r){var i=Fk.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function jt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,s=t,l=s;e:for(;l!==null;){switch(l.tag){case 5:Pe=l.stateNode,Rt=!1;break e;case 3:Pe=l.stateNode.containerInfo,Rt=!0;break e;case 4:Pe=l.stateNode.containerInfo,Rt=!0;break e}l=l.return}if(Pe===null)throw Error(z(160));tg(o,s,i),Pe=null,Rt=!1;var u=i.alternate;u!==null&&(u.return=null),i.return=null}catch(c){we(i,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)ng(t,e),t=t.sibling}function ng(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(jt(t,e),Ht(e),r&4){try{Ii(3,e,e.return),Ys(3,e)}catch(x){we(e,e.return,x)}try{Ii(5,e,e.return)}catch(x){we(e,e.return,x)}}break;case 1:jt(t,e),Ht(e),r&512&&n!==null&&Ar(n,n.return);break;case 5:if(jt(t,e),Ht(e),r&512&&n!==null&&Ar(n,n.return),e.flags&32){var i=e.stateNode;try{Mi(i,"")}catch(x){we(e,e.return,x)}}if(r&4&&(i=e.stateNode,i!=null)){var o=e.memoizedProps,s=n!==null?n.memoizedProps:o,l=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{l==="input"&&o.type==="radio"&&o.name!=null&&Ep(i,o),Ca(l,s);var c=Ca(l,o);for(s=0;s<u.length;s+=2){var f=u[s],d=u[s+1];f==="style"?_p(i,d):f==="dangerouslySetInnerHTML"?Tp(i,d):f==="children"?Mi(i,d):Ou(i,f,d,c)}switch(l){case"input":xa(i,o);break;case"textarea":Np(i,o);break;case"select":var h=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var p=o.value;p!=null?Pr(i,!!o.multiple,p,!1):h!==!!o.multiple&&(o.defaultValue!=null?Pr(i,!!o.multiple,o.defaultValue,!0):Pr(i,!!o.multiple,o.multiple?[]:"",!1))}i[Ki]=o}catch(x){we(e,e.return,x)}}break;case 6:if(jt(t,e),Ht(e),r&4){if(e.stateNode===null)throw Error(z(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(x){we(e,e.return,x)}}break;case 3:if(jt(t,e),Ht(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{$i(t.containerInfo)}catch(x){we(e,e.return,x)}break;case 4:jt(t,e),Ht(e);break;case 13:jt(t,e),Ht(e),i=e.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(hc=Ce())),r&4&&cf(e);break;case 22:if(f=n!==null&&n.memoizedState!==null,e.mode&1?(Me=(c=Me)||f,jt(t,e),Me=c):jt(t,e),Ht(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!f&&e.mode&1)for(K=e,f=e.child;f!==null;){for(d=K=f;K!==null;){switch(h=K,p=h.child,h.tag){case 0:case 11:case 14:case 15:Ii(4,h,h.return);break;case 1:Ar(h,h.return);var y=h.stateNode;if(typeof y.componentWillUnmount=="function"){r=h,n=h.return;try{t=r,y.props=t.memoizedProps,y.state=t.memoizedState,y.componentWillUnmount()}catch(x){we(r,n,x)}}break;case 5:Ar(h,h.return);break;case 22:if(h.memoizedState!==null){ff(d);continue}}p!==null?(p.return=h,K=p):ff(d)}f=f.sibling}e:for(f=null,d=e;;){if(d.tag===5){if(f===null){f=d;try{i=d.stateNode,c?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(l=d.stateNode,u=d.memoizedProps.style,s=u!=null&&u.hasOwnProperty("display")?u.display:null,l.style.display=jp("display",s))}catch(x){we(e,e.return,x)}}}else if(d.tag===6){if(f===null)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(x){we(e,e.return,x)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;f===d&&(f=null),d=d.return}f===d&&(f=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:jt(t,e),Ht(e),r&4&&cf(e);break;case 21:break;default:jt(t,e),Ht(e)}}function Ht(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(eg(n)){var r=n;break e}n=n.return}throw Error(z(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Mi(i,""),r.flags&=-33);var o=uf(e);Za(e,o,i);break;case 3:case 4:var s=r.stateNode.containerInfo,l=uf(e);Ja(e,l,s);break;default:throw Error(z(161))}}catch(u){we(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function _k(e,t,n){K=e,rg(e)}function rg(e,t,n){for(var r=(e.mode&1)!==0;K!==null;){var i=K,o=i.child;if(i.tag===22&&r){var s=i.memoizedState!==null||Oo;if(!s){var l=i.alternate,u=l!==null&&l.memoizedState!==null||Me;l=Oo;var c=Me;if(Oo=s,(Me=u)&&!c)for(K=i;K!==null;)s=K,u=s.child,s.tag===22&&s.memoizedState!==null?hf(i):u!==null?(u.return=s,K=u):hf(i);for(;o!==null;)K=o,rg(o),o=o.sibling;K=i,Oo=l,Me=c}df(e)}else i.subtreeFlags&8772&&o!==null?(o.return=i,K=o):df(e)}}function df(e){for(;K!==null;){var t=K;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Me||Ys(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Me)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:It(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&Kd(t,o,r);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Kd(t,s,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var f=c.memoizedState;if(f!==null){var d=f.dehydrated;d!==null&&$i(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(z(163))}Me||t.flags&512&&Xa(t)}catch(h){we(t,t.return,h)}}if(t===e){K=null;break}if(n=t.sibling,n!==null){n.return=t.return,K=n;break}K=t.return}}function ff(e){for(;K!==null;){var t=K;if(t===e){K=null;break}var n=t.sibling;if(n!==null){n.return=t.return,K=n;break}K=t.return}}function hf(e){for(;K!==null;){var t=K;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Ys(4,t)}catch(u){we(t,n,u)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(u){we(t,i,u)}}var o=t.return;try{Xa(t)}catch(u){we(t,o,u)}break;case 5:var s=t.return;try{Xa(t)}catch(u){we(t,s,u)}}}catch(u){we(t,t.return,u)}if(t===e){K=null;break}var l=t.sibling;if(l!==null){l.return=t.return,K=l;break}K=t.return}}var Ik=Math.ceil,As=pn.ReactCurrentDispatcher,dc=pn.ReactCurrentOwner,wt=pn.ReactCurrentBatchConfig,oe=0,Re=null,Ne=null,Oe=0,st=0,Rr=Hn(0),Ie=0,eo=null,sr=0,Xs=0,fc=0,Ai=null,Xe=null,hc=0,Gr=1/0,rn=null,Rs=!1,eu=null,Dn=null,Do=!1,_n=null,Ps=0,Ri=0,tu=null,ts=-1,ns=0;function Ve(){return oe&6?Ce():ts!==-1?ts:ts=Ce()}function Ln(e){return e.mode&1?oe&2&&Oe!==0?Oe&-Oe:hk.transition!==null?(ns===0&&(ns=Up()),ns):(e=ae,e!==0||(e=window.event,e=e===void 0?16:Kp(e.type)),e):1}function Ft(e,t,n,r){if(50<Ri)throw Ri=0,tu=null,Error(z(185));lo(e,n,r),(!(oe&2)||e!==Re)&&(e===Re&&(!(oe&2)&&(Xs|=n),Ie===4&&Nn(e,Oe)),tt(e,r),n===1&&oe===0&&!(t.mode&1)&&(Gr=Ce()+500,Gs&&$n()))}function tt(e,t){var n=e.callbackNode;hv(e,t);var r=gs(e,e===Re?Oe:0);if(r===0)n!==null&&wd(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&wd(n),t===1)e.tag===0?fk(pf.bind(null,e)):hm(pf.bind(null,e)),ak(function(){!(oe&6)&&$n()}),n=null;else{switch(Hp(r)){case 1:n=Mu;break;case 4:n=Mp;break;case 16:n=ms;break;case 536870912:n=Bp;break;default:n=ms}n=dg(n,ig.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function ig(e,t){if(ts=-1,ns=0,oe&6)throw Error(z(327));var n=e.callbackNode;if(zr()&&e.callbackNode!==n)return null;var r=gs(e,e===Re?Oe:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Os(e,r);else{t=r;var i=oe;oe|=2;var o=sg();(Re!==e||Oe!==t)&&(rn=null,Gr=Ce()+500,tr(e,t));do try{Pk();break}catch(l){og(e,l)}while(!0);Ju(),As.current=o,oe=i,Ne!==null?t=0:(Re=null,Oe=0,t=Ie)}if(t!==0){if(t===2&&(i=ja(e),i!==0&&(r=i,t=nu(e,i))),t===1)throw n=eo,tr(e,0),Nn(e,r),tt(e,Ce()),n;if(t===6)Nn(e,r);else{if(i=e.current.alternate,!(r&30)&&!Ak(i)&&(t=Os(e,r),t===2&&(o=ja(e),o!==0&&(r=o,t=nu(e,o))),t===1))throw n=eo,tr(e,0),Nn(e,r),tt(e,Ce()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(z(345));case 2:Qn(e,Xe,rn);break;case 3:if(Nn(e,r),(r&130023424)===r&&(t=hc+500-Ce(),10<t)){if(gs(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){Ve(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=La(Qn.bind(null,e,Xe,rn),t);break}Qn(e,Xe,rn);break;case 4:if(Nn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var s=31-Lt(r);o=1<<s,s=t[s],s>i&&(i=s),r&=~o}if(r=i,r=Ce()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Ik(r/1960))-r,10<r){e.timeoutHandle=La(Qn.bind(null,e,Xe,rn),r);break}Qn(e,Xe,rn);break;case 5:Qn(e,Xe,rn);break;default:throw Error(z(329))}}}return tt(e,Ce()),e.callbackNode===n?ig.bind(null,e):null}function nu(e,t){var n=Ai;return e.current.memoizedState.isDehydrated&&(tr(e,t).flags|=256),e=Os(e,t),e!==2&&(t=Xe,Xe=n,t!==null&&ru(t)),e}function ru(e){Xe===null?Xe=e:Xe.push.apply(Xe,e)}function Ak(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!Mt(o(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Nn(e,t){for(t&=~fc,t&=~Xs,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Lt(t),r=1<<n;e[n]=-1,t&=~r}}function pf(e){if(oe&6)throw Error(z(327));zr();var t=gs(e,0);if(!(t&1))return tt(e,Ce()),null;var n=Os(e,t);if(e.tag!==0&&n===2){var r=ja(e);r!==0&&(t=r,n=nu(e,r))}if(n===1)throw n=eo,tr(e,0),Nn(e,t),tt(e,Ce()),n;if(n===6)throw Error(z(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Qn(e,Xe,rn),tt(e,Ce()),null}function pc(e,t){var n=oe;oe|=1;try{return e(t)}finally{oe=n,oe===0&&(Gr=Ce()+500,Gs&&$n())}}function lr(e){_n!==null&&_n.tag===0&&!(oe&6)&&zr();var t=oe;oe|=1;var n=wt.transition,r=ae;try{if(wt.transition=null,ae=1,e)return e()}finally{ae=r,wt.transition=n,oe=t,!(oe&6)&&$n()}}function mc(){st=Rr.current,me(Rr)}function tr(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,lk(n)),Ne!==null)for(n=Ne.return;n!==null;){var r=n;switch(Qu(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&ws();break;case 3:Vr(),me(Ze),me(Ue),ic();break;case 5:rc(r);break;case 4:Vr();break;case 13:me(xe);break;case 19:me(xe);break;case 10:Zu(r.type._context);break;case 22:case 23:mc()}n=n.return}if(Re=e,Ne=e=Fn(e.current,null),Oe=st=t,Ie=0,eo=null,fc=Xs=sr=0,Xe=Ai=null,Jn!==null){for(t=0;t<Jn.length;t++)if(n=Jn[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,o=n.pending;if(o!==null){var s=o.next;o.next=i,r.next=s}n.pending=r}Jn=null}return e}function og(e,t){do{var n=Ne;try{if(Ju(),Jo.current=Is,_s){for(var r=ve.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}_s=!1}if(or=0,Ae=_e=ve=null,_i=!1,Xi=0,dc.current=null,n===null||n.return===null){Ie=1,eo=t,Ne=null;break}e:{var o=e,s=n.return,l=n,u=t;if(t=Oe,l.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var c=u,f=l,d=f.tag;if(!(f.mode&1)&&(d===0||d===11||d===15)){var h=f.alternate;h?(f.updateQueue=h.updateQueue,f.memoizedState=h.memoizedState,f.lanes=h.lanes):(f.updateQueue=null,f.memoizedState=null)}var p=ef(s);if(p!==null){p.flags&=-257,tf(p,s,l,o,t),p.mode&1&&Zd(o,c,t),t=p,u=c;var y=t.updateQueue;if(y===null){var x=new Set;x.add(u),t.updateQueue=x}else y.add(u);break e}else{if(!(t&1)){Zd(o,c,t),gc();break e}u=Error(z(426))}}else if(ge&&l.mode&1){var S=ef(s);if(S!==null){!(S.flags&65536)&&(S.flags|=256),tf(S,s,l,o,t),Yu(qr(u,l));break e}}o=u=qr(u,l),Ie!==4&&(Ie=2),Ai===null?Ai=[o]:Ai.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var g=Hm(o,u,t);Gd(o,g);break e;case 1:l=u;var m=o.type,v=o.stateNode;if(!(o.flags&128)&&(typeof m.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(Dn===null||!Dn.has(v)))){o.flags|=65536,t&=-t,o.lanes|=t;var b=$m(o,l,t);Gd(o,b);break e}}o=o.return}while(o!==null)}ag(n)}catch(j){t=j,Ne===n&&n!==null&&(Ne=n=n.return);continue}break}while(!0)}function sg(){var e=As.current;return As.current=Is,e===null?Is:e}function gc(){(Ie===0||Ie===3||Ie===2)&&(Ie=4),Re===null||!(sr&268435455)&&!(Xs&268435455)||Nn(Re,Oe)}function Os(e,t){var n=oe;oe|=2;var r=sg();(Re!==e||Oe!==t)&&(rn=null,tr(e,t));do try{Rk();break}catch(i){og(e,i)}while(!0);if(Ju(),oe=n,As.current=r,Ne!==null)throw Error(z(261));return Re=null,Oe=0,Ie}function Rk(){for(;Ne!==null;)lg(Ne)}function Pk(){for(;Ne!==null&&!iv();)lg(Ne)}function lg(e){var t=cg(e.alternate,e,st);e.memoizedProps=e.pendingProps,t===null?ag(e):Ne=t,dc.current=null}function ag(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=bk(n,t),n!==null){n.flags&=32767,Ne=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ie=6,Ne=null;return}}else if(n=Nk(n,t,st),n!==null){Ne=n;return}if(t=t.sibling,t!==null){Ne=t;return}Ne=t=e}while(t!==null);Ie===0&&(Ie=5)}function Qn(e,t,n){var r=ae,i=wt.transition;try{wt.transition=null,ae=1,Ok(e,t,n,r)}finally{wt.transition=i,ae=r}return null}function Ok(e,t,n,r){do zr();while(_n!==null);if(oe&6)throw Error(z(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(z(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(pv(e,o),e===Re&&(Ne=Re=null,Oe=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Do||(Do=!0,dg(ms,function(){return zr(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=wt.transition,wt.transition=null;var s=ae;ae=1;var l=oe;oe|=4,dc.current=null,jk(e,n),ng(n,e),ek(Oa),ys=!!Pa,Oa=Pa=null,e.current=n,_k(n),ov(),oe=l,ae=s,wt.transition=o}else e.current=n;if(Do&&(Do=!1,_n=e,Ps=i),o=e.pendingLanes,o===0&&(Dn=null),av(n.stateNode),tt(e,Ce()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Rs)throw Rs=!1,e=eu,eu=null,e;return Ps&1&&e.tag!==0&&zr(),o=e.pendingLanes,o&1?e===tu?Ri++:(Ri=0,tu=e):Ri=0,$n(),null}function zr(){if(_n!==null){var e=Hp(Ps),t=wt.transition,n=ae;try{if(wt.transition=null,ae=16>e?16:e,_n===null)var r=!1;else{if(e=_n,_n=null,Ps=0,oe&6)throw Error(z(331));var i=oe;for(oe|=4,K=e.current;K!==null;){var o=K,s=o.child;if(K.flags&16){var l=o.deletions;if(l!==null){for(var u=0;u<l.length;u++){var c=l[u];for(K=c;K!==null;){var f=K;switch(f.tag){case 0:case 11:case 15:Ii(8,f,o)}var d=f.child;if(d!==null)d.return=f,K=d;else for(;K!==null;){f=K;var h=f.sibling,p=f.return;if(Zm(f),f===c){K=null;break}if(h!==null){h.return=p,K=h;break}K=p}}}var y=o.alternate;if(y!==null){var x=y.child;if(x!==null){y.child=null;do{var S=x.sibling;x.sibling=null,x=S}while(x!==null)}}K=o}}if(o.subtreeFlags&2064&&s!==null)s.return=o,K=s;else e:for(;K!==null;){if(o=K,o.flags&2048)switch(o.tag){case 0:case 11:case 15:Ii(9,o,o.return)}var g=o.sibling;if(g!==null){g.return=o.return,K=g;break e}K=o.return}}var m=e.current;for(K=m;K!==null;){s=K;var v=s.child;if(s.subtreeFlags&2064&&v!==null)v.return=s,K=v;else e:for(s=m;K!==null;){if(l=K,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:Ys(9,l)}}catch(j){we(l,l.return,j)}if(l===s){K=null;break e}var b=l.sibling;if(b!==null){b.return=l.return,K=b;break e}K=l.return}}if(oe=i,$n(),Qt&&typeof Qt.onPostCommitFiberRoot=="function")try{Qt.onPostCommitFiberRoot(Hs,e)}catch{}r=!0}return r}finally{ae=n,wt.transition=t}}return!1}function mf(e,t,n){t=qr(n,t),t=Hm(e,t,1),e=On(e,t,1),t=Ve(),e!==null&&(lo(e,1,t),tt(e,t))}function we(e,t,n){if(e.tag===3)mf(e,e,n);else for(;t!==null;){if(t.tag===3){mf(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Dn===null||!Dn.has(r))){e=qr(n,e),e=$m(t,e,1),t=On(t,e,1),e=Ve(),t!==null&&(lo(t,1,e),tt(t,e));break}}t=t.return}}function Dk(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Ve(),e.pingedLanes|=e.suspendedLanes&n,Re===e&&(Oe&n)===n&&(Ie===4||Ie===3&&(Oe&130023424)===Oe&&500>Ce()-hc?tr(e,0):fc|=n),tt(e,t)}function ug(e,t){t===0&&(e.mode&1?(t=No,No<<=1,!(No&130023424)&&(No=4194304)):t=1);var n=Ve();e=dn(e,t),e!==null&&(lo(e,t,n),tt(e,n))}function Lk(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ug(e,n)}function Fk(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(z(314))}r!==null&&r.delete(t),ug(e,n)}var cg;cg=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ze.current)Je=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Je=!1,Ek(e,t,n);Je=!!(e.flags&131072)}else Je=!1,ge&&t.flags&1048576&&pm(t,Es,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;es(e,t),e=t.pendingProps;var i=Hr(t,Ue.current);Fr(t,n),i=sc(null,t,r,e,i,n);var o=lc();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,et(r)?(o=!0,Ss(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,tc(t),i.updater=Qs,t.stateNode=i,i._reactInternals=t,$a(t,r,e,n),t=qa(null,t,r,!0,o,n)):(t.tag=0,ge&&o&&Ku(t),$e(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(es(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Mk(r),e=It(r,e),i){case 0:t=Va(null,t,r,e,n);break e;case 1:t=of(null,t,r,e,n);break e;case 11:t=nf(null,t,r,e,n);break e;case 14:t=rf(null,t,r,It(r.type,e),n);break e}throw Error(z(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:It(r,i),Va(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:It(r,i),of(e,t,r,i,n);case 3:e:{if(Gm(t),e===null)throw Error(z(387));r=t.pendingProps,o=t.memoizedState,i=o.element,km(e,t),Ts(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=qr(Error(z(423)),t),t=sf(e,t,r,n,i);break e}else if(r!==i){i=qr(Error(z(424)),t),t=sf(e,t,r,n,i);break e}else for(lt=Pn(t.stateNode.containerInfo.firstChild),at=t,ge=!0,Ot=null,n=xm(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if($r(),r===i){t=fn(e,t,n);break e}$e(e,t,r,n)}t=t.child}return t;case 5:return wm(t),e===null&&Ba(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,Da(r,i)?s=null:o!==null&&Da(r,o)&&(t.flags|=32),qm(e,t),$e(e,t,s,n),t.child;case 6:return e===null&&Ba(t),null;case 13:return Km(e,t,n);case 4:return nc(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Wr(t,null,r,n):$e(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:It(r,i),nf(e,t,r,i,n);case 7:return $e(e,t,t.pendingProps,n),t.child;case 8:return $e(e,t,t.pendingProps.children,n),t.child;case 12:return $e(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,he(Ns,r._currentValue),r._currentValue=s,o!==null)if(Mt(o.value,s)){if(o.children===i.children&&!Ze.current){t=fn(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){s=o.child;for(var u=l.firstContext;u!==null;){if(u.context===r){if(o.tag===1){u=an(-1,n&-n),u.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var f=c.pending;f===null?u.next=u:(u.next=f.next,f.next=u),c.pending=u}}o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),Ua(o.return,n,t),l.lanes|=n;break}u=u.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(z(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Ua(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}$e(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Fr(t,n),i=St(i),r=r(i),t.flags|=1,$e(e,t,r,n),t.child;case 14:return r=t.type,i=It(r,t.pendingProps),i=It(r.type,i),rf(e,t,r,i,n);case 15:return Wm(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:It(r,i),es(e,t),t.tag=1,et(r)?(e=!0,Ss(t)):e=!1,Fr(t,n),Um(t,r,i),$a(t,r,i,n),qa(null,t,r,!0,e,n);case 19:return Qm(e,t,n);case 22:return Vm(e,t,n)}throw Error(z(156,t.tag))};function dg(e,t){return zp(e,t)}function zk(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function kt(e,t,n,r){return new zk(e,t,n,r)}function yc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Mk(e){if(typeof e=="function")return yc(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Lu)return 11;if(e===Fu)return 14}return 2}function Fn(e,t){var n=e.alternate;return n===null?(n=kt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function rs(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")yc(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Sr:return nr(n.children,i,o,t);case Du:s=8,i|=8;break;case ha:return e=kt(12,n,t,i|2),e.elementType=ha,e.lanes=o,e;case pa:return e=kt(13,n,t,i),e.elementType=pa,e.lanes=o,e;case ma:return e=kt(19,n,t,i),e.elementType=ma,e.lanes=o,e;case wp:return Js(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case vp:s=10;break e;case kp:s=9;break e;case Lu:s=11;break e;case Fu:s=14;break e;case wn:s=16,r=null;break e}throw Error(z(130,e==null?e:typeof e,""))}return t=kt(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function nr(e,t,n,r){return e=kt(7,e,r,t),e.lanes=n,e}function Js(e,t,n,r){return e=kt(22,e,r,t),e.elementType=wp,e.lanes=n,e.stateNode={isHidden:!1},e}function Ul(e,t,n){return e=kt(6,e,null,t),e.lanes=n,e}function Hl(e,t,n){return t=kt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Bk(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Sl(0),this.expirationTimes=Sl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Sl(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function xc(e,t,n,r,i,o,s,l,u){return e=new Bk(e,t,n,l,u),t===1?(t=1,o===!0&&(t|=8)):t=0,o=kt(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},tc(o),e}function Uk(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:wr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function fg(e){if(!e)return Bn;e=e._reactInternals;e:{if(dr(e)!==e||e.tag!==1)throw Error(z(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(et(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(z(171))}if(e.tag===1){var n=e.type;if(et(n))return fm(e,n,t)}return t}function hg(e,t,n,r,i,o,s,l,u){return e=xc(n,r,!0,e,i,o,s,l,u),e.context=fg(null),n=e.current,r=Ve(),i=Ln(n),o=an(r,i),o.callback=t??null,On(n,o,i),e.current.lanes=i,lo(e,i,r),tt(e,r),e}function Zs(e,t,n,r){var i=t.current,o=Ve(),s=Ln(i);return n=fg(n),t.context===null?t.context=n:t.pendingContext=n,t=an(o,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=On(i,t,s),e!==null&&(Ft(e,i,s,o),Xo(e,i,s)),s}function Ds(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function gf(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function vc(e,t){gf(e,t),(e=e.alternate)&&gf(e,t)}function Hk(){return null}var pg=typeof reportError=="function"?reportError:function(e){console.error(e)};function kc(e){this._internalRoot=e}el.prototype.render=kc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(z(409));Zs(e,t,null,null)};el.prototype.unmount=kc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;lr(function(){Zs(null,e,null,null)}),t[cn]=null}};function el(e){this._internalRoot=e}el.prototype.unstable_scheduleHydration=function(e){if(e){var t=Vp();e={blockedOn:null,target:e,priority:t};for(var n=0;n<En.length&&t!==0&&t<En[n].priority;n++);En.splice(n,0,e),n===0&&Gp(e)}};function wc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function tl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function yf(){}function $k(e,t,n,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var c=Ds(s);o.call(c)}}var s=hg(t,r,e,0,null,!1,!1,"",yf);return e._reactRootContainer=s,e[cn]=s.current,qi(e.nodeType===8?e.parentNode:e),lr(),s}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var l=r;r=function(){var c=Ds(u);l.call(c)}}var u=xc(e,0,!1,null,null,!1,!1,"",yf);return e._reactRootContainer=u,e[cn]=u.current,qi(e.nodeType===8?e.parentNode:e),lr(function(){Zs(t,u,n,r)}),u}function nl(e,t,n,r,i){var o=n._reactRootContainer;if(o){var s=o;if(typeof i=="function"){var l=i;i=function(){var u=Ds(s);l.call(u)}}Zs(t,s,e,i)}else s=$k(n,t,e,i,r);return Ds(s)}$p=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=wi(t.pendingLanes);n!==0&&(Bu(t,n|1),tt(t,Ce()),!(oe&6)&&(Gr=Ce()+500,$n()))}break;case 13:lr(function(){var r=dn(e,1);if(r!==null){var i=Ve();Ft(r,e,1,i)}}),vc(e,1)}};Uu=function(e){if(e.tag===13){var t=dn(e,134217728);if(t!==null){var n=Ve();Ft(t,e,134217728,n)}vc(e,134217728)}};Wp=function(e){if(e.tag===13){var t=Ln(e),n=dn(e,t);if(n!==null){var r=Ve();Ft(n,e,t,r)}vc(e,t)}};Vp=function(){return ae};qp=function(e,t){var n=ae;try{return ae=e,t()}finally{ae=n}};Na=function(e,t,n){switch(t){case"input":if(xa(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=qs(r);if(!i)throw Error(z(90));Cp(r),xa(r,i)}}}break;case"textarea":Np(e,n);break;case"select":t=n.value,t!=null&&Pr(e,!!n.multiple,t,!1)}};Rp=pc;Pp=lr;var Wk={usingClientEntryPoint:!1,Events:[uo,br,qs,Ip,Ap,pc]},hi={findFiberByHostInstance:Xn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Vk={bundleType:hi.bundleType,version:hi.version,rendererPackageName:hi.rendererPackageName,rendererConfig:hi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:pn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Lp(e),e===null?null:e.stateNode},findFiberByHostInstance:hi.findFiberByHostInstance||Hk,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Lo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Lo.isDisabled&&Lo.supportsFiber)try{Hs=Lo.inject(Vk),Qt=Lo}catch{}}dt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Wk;dt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!wc(t))throw Error(z(200));return Uk(e,t,null,n)};dt.createRoot=function(e,t){if(!wc(e))throw Error(z(299));var n=!1,r="",i=pg;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=xc(e,1,!1,null,null,n,!1,r,i),e[cn]=t.current,qi(e.nodeType===8?e.parentNode:e),new kc(t)};dt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(z(188)):(e=Object.keys(e).join(","),Error(z(268,e)));return e=Lp(t),e=e===null?null:e.stateNode,e};dt.flushSync=function(e){return lr(e)};dt.hydrate=function(e,t,n){if(!tl(t))throw Error(z(200));return nl(null,e,t,!0,n)};dt.hydrateRoot=function(e,t,n){if(!wc(e))throw Error(z(405));var r=n!=null&&n.hydratedSources||null,i=!1,o="",s=pg;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=hg(t,null,e,1,n??null,i,!1,o,s),e[cn]=t.current,qi(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new el(t)};dt.render=function(e,t,n){if(!tl(t))throw Error(z(200));return nl(null,e,t,!1,n)};dt.unmountComponentAtNode=function(e){if(!tl(e))throw Error(z(40));return e._reactRootContainer?(lr(function(){nl(null,null,e,!1,function(){e._reactRootContainer=null,e[cn]=null})}),!0):!1};dt.unstable_batchedUpdates=pc;dt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!tl(n))throw Error(z(200));if(e==null||e._reactInternals===void 0)throw Error(z(38));return nl(e,t,n,!1,r)};dt.version="18.3.1-next-f1338f8080-20240426";function mg(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(mg)}catch(e){console.error(e)}}mg(),mp.exports=dt;var qk=mp.exports,gg,xf=qk;gg=xf.createRoot,xf.hydrateRoot;/**
41
- * react-router v7.14.0
42
- *
43
- * Copyright (c) Remix Software Inc.
44
- *
45
- * This source code is licensed under the MIT license found in the
46
- * LICENSE.md file in the root directory of this source tree.
47
- *
48
- * @license MIT
49
- */var vf="popstate";function kf(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function Gk(e={}){function t(r,i){var c;let o=(c=i.state)==null?void 0:c.masked,{pathname:s,search:l,hash:u}=o||r.location;return iu("",{pathname:s,search:l,hash:u},i.state&&i.state.usr||null,i.state&&i.state.key||"default",o?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}function n(r,i){return typeof i=="string"?i:to(i)}return Qk(t,n,null,e)}function ye(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Et(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Kk(){return Math.random().toString(36).substring(2,10)}function wf(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 iu(e,t,n=null,r,i){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Jr(t):t,state:n,key:t&&t.key||r||Kk(),unstable_mask:i}}function to({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 Jr(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function Qk(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,l="POP",u=null,c=f();c==null&&(c=0,s.replaceState({...s.state,idx:c},""));function f(){return(s.state||{idx:null}).idx}function d(){l="POP";let S=f(),g=S==null?null:S-c;c=S,u&&u({action:l,location:x.location,delta:g})}function h(S,g){l="PUSH";let m=kf(S)?S:iu(x.location,S,g);c=f()+1;let v=wf(m,c),b=x.createHref(m.unstable_mask||m);try{s.pushState(v,"",b)}catch(j){if(j instanceof DOMException&&j.name==="DataCloneError")throw j;i.location.assign(b)}o&&u&&u({action:l,location:x.location,delta:1})}function p(S,g){l="REPLACE";let m=kf(S)?S:iu(x.location,S,g);c=f();let v=wf(m,c),b=x.createHref(m.unstable_mask||m);s.replaceState(v,"",b),o&&u&&u({action:l,location:x.location,delta:0})}function y(S){return Yk(S)}let x={get action(){return l},get location(){return e(i,s)},listen(S){if(u)throw new Error("A history only accepts one active listener");return i.addEventListener(vf,d),u=S,()=>{i.removeEventListener(vf,d),u=null}},createHref(S){return t(i,S)},createURL:y,encodeLocation(S){let g=y(S);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:h,replace:p,go(S){return s.go(S)}};return x}function Yk(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),ye(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:to(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function yg(e,t,n="/"){return Xk(e,t,n,!1)}function Xk(e,t,n,r){let i=typeof t=="string"?Jr(t):t,o=hn(i.pathname||"/",n);if(o==null)return null;let s=xg(e);Jk(s);let l=null;for(let u=0;l==null&&u<s.length;++u){let c=uw(o);l=lw(s[u],c,r)}return l}function xg(e,t=[],n=[],r="",i=!1){let o=(s,l,u=i,c)=>{let f={relativePath:c===void 0?s.path||"":c,caseSensitive:s.caseSensitive===!0,childrenIndex:l,route:s};if(f.relativePath.startsWith("/")){if(!f.relativePath.startsWith(r)&&u)return;ye(f.relativePath.startsWith(r),`Absolute route path "${f.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),f.relativePath=f.relativePath.slice(r.length)}let d=Xt([r,f.relativePath]),h=n.concat(f);s.children&&s.children.length>0&&(ye(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${d}".`),xg(s.children,t,h,d,u)),!(s.path==null&&!s.index)&&t.push({path:d,score:ow(d,s.index),routesMeta:h})};return e.forEach((s,l)=>{var u;if(s.path===""||!((u=s.path)!=null&&u.includes("?")))o(s,l);else for(let c of vg(s.path))o(s,l,!0,c)}),t}function vg(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let s=vg(r.join("/")),l=[];return l.push(...s.map(u=>u===""?o:[o,u].join("/"))),i&&l.push(...s),l.map(u=>e.startsWith("/")&&u===""?"/":u)}function Jk(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:sw(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var Zk=/^:[\w-]+$/,ew=3,tw=2,nw=1,rw=10,iw=-2,Sf=e=>e==="*";function ow(e,t){let n=e.split("/"),r=n.length;return n.some(Sf)&&(r+=iw),t&&(r+=tw),n.filter(i=>!Sf(i)).reduce((i,o)=>i+(Zk.test(o)?ew:o===""?nw:rw),r)}function sw(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function lw(e,t,n=!1){let{routesMeta:r}=e,i={},o="/",s=[];for(let l=0;l<r.length;++l){let u=r[l],c=l===r.length-1,f=o==="/"?t:t.slice(o.length)||"/",d=Ls({path:u.relativePath,caseSensitive:u.caseSensitive,end:c},f),h=u.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=Ls({path:u.relativePath,caseSensitive:u.caseSensitive,end:!1},f)),!d)return null;Object.assign(i,d.params),s.push({params:i,pathname:Xt([o,d.pathname]),pathnameBase:hw(Xt([o,d.pathnameBase])),route:h}),d.pathnameBase!=="/"&&(o=Xt([o,d.pathnameBase]))}return s}function Ls(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=aw(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let o=i[0],s=o.replace(/(.)\/+$/,"$1"),l=i.slice(1);return{params:r.reduce((c,{paramName:f,isOptional:d},h)=>{if(f==="*"){let y=l[h]||"";s=o.slice(0,o.length-y.length).replace(/(.)\/+$/,"$1")}const p=l[h];return d&&!p?c[f]=void 0:c[f]=(p||"").replace(/%2F/g,"/"),c},{}),pathname:o,pathnameBase:s,pattern:e}}function aw(e,t=!1,n=!0){Et(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 r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,l,u,c,f)=>{if(r.push({paramName:l,isOptional:u!=null}),u){let d=f.charAt(c+s.length);return d&&d!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function uw(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Et(!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 hn(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}var cw=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function dw(e,t="/"){let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Jr(e):e,o;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?o=Cf(n.substring(1),"/"):o=Cf(n,t)):o=t,{pathname:o,search:pw(r),hash:mw(i)}}function Cf(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function $l(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. 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 fw(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Sc(e){let t=fw(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function rl(e,t,n,r=!1){let i;typeof e=="string"?i=Jr(e):(i={...e},ye(!i.pathname||!i.pathname.includes("?"),$l("?","pathname","search",i)),ye(!i.pathname||!i.pathname.includes("#"),$l("#","pathname","hash",i)),ye(!i.search||!i.search.includes("#"),$l("#","search","hash",i)));let o=e===""||i.pathname==="",s=o?"/":i.pathname,l;if(s==null)l=n;else{let d=t.length-1;if(!r&&s.startsWith("..")){let h=s.split("/");for(;h[0]==="..";)h.shift(),d-=1;i.pathname=h.join("/")}l=d>=0?t[d]:"/"}let u=dw(i,l),c=s&&s!=="/"&&s.endsWith("/"),f=(o||s===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(c||f)&&(u.pathname+="/"),u}var Xt=e=>e.join("/").replace(/\/\/+/g,"/"),hw=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),pw=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,mw=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,gw=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function yw(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function xw(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var kg=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function wg(e,t){let n=e;if(typeof n!="string"||!cw.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(kg)try{let o=new URL(window.location.href),s=n.startsWith("//")?new URL(o.protocol+n):new URL(n),l=hn(s.pathname,t);s.origin===o.origin&&l!=null?n=l+s.search+s.hash:i=!0}catch{Et(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Sg=["POST","PUT","PATCH","DELETE"];new Set(Sg);var vw=["GET",...Sg];new Set(vw);var Zr=k.createContext(null);Zr.displayName="DataRouter";var il=k.createContext(null);il.displayName="DataRouterState";var Cg=k.createContext(!1);function kw(){return k.useContext(Cg)}var Eg=k.createContext({isTransitioning:!1});Eg.displayName="ViewTransition";var ww=k.createContext(new Map);ww.displayName="Fetchers";var Sw=k.createContext(null);Sw.displayName="Await";var ht=k.createContext(null);ht.displayName="Navigation";var fo=k.createContext(null);fo.displayName="Location";var Nt=k.createContext({outlet:null,matches:[],isDataRoute:!1});Nt.displayName="Route";var Cc=k.createContext(null);Cc.displayName="RouteError";var Ng="REACT_ROUTER_ERROR",Cw="REDIRECT",Ew="ROUTE_ERROR_RESPONSE";function Nw(e){if(e.startsWith(`${Ng}:${Cw}:{`))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 bw(e){if(e.startsWith(`${Ng}:${Ew}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new gw(t.status,t.statusText,t.data)}catch{}}function Tw(e,{relative:t}={}){ye(ei(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=k.useContext(ht),{hash:i,pathname:o,search:s}=ho(e,{relative:t}),l=o;return n!=="/"&&(l=o==="/"?n:Xt([n,o])),r.createHref({pathname:l,search:s,hash:i})}function ei(){return k.useContext(fo)!=null}function Ke(){return ye(ei(),"useLocation() may be used only in the context of a <Router> component."),k.useContext(fo).location}var bg="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Tg(e){k.useContext(ht).static||k.useLayoutEffect(e)}function Le(){let{isDataRoute:e}=k.useContext(Nt);return e?Hw():jw()}function jw(){ye(ei(),"useNavigate() may be used only in the context of a <Router> component.");let e=k.useContext(Zr),{basename:t,navigator:n}=k.useContext(ht),{matches:r}=k.useContext(Nt),{pathname:i}=Ke(),o=JSON.stringify(Sc(r)),s=k.useRef(!1);return Tg(()=>{s.current=!0}),k.useCallback((u,c={})=>{if(Et(s.current,bg),!s.current)return;if(typeof u=="number"){n.go(u);return}let f=rl(u,JSON.parse(o),i,c.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Xt([t,f.pathname])),(c.replace?n.replace:n.push)(f,c.state,c)},[t,n,o,i,e])}var _w=k.createContext(null);function Iw(e){let t=k.useContext(Nt).outlet;return k.useMemo(()=>t&&k.createElement(_w.Provider,{value:e},t),[t,e])}function fr(){let{matches:e}=k.useContext(Nt),t=e[e.length-1];return t?t.params:{}}function ho(e,{relative:t}={}){let{matches:n}=k.useContext(Nt),{pathname:r}=Ke(),i=JSON.stringify(Sc(n));return k.useMemo(()=>rl(e,JSON.parse(i),r,t==="path"),[e,i,r,t])}function Aw(e,t){return jg(e,t)}function jg(e,t,n){var S;ye(ei(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=k.useContext(ht),{matches:i}=k.useContext(Nt),o=i[i.length-1],s=o?o.params:{},l=o?o.pathname:"/",u=o?o.pathnameBase:"/",c=o&&o.route;{let g=c&&c.path||"";Ig(l,!c||g.endsWith("*")||g.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${g}">) 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.
50
-
51
- Please change the parent <Route path="${g}"> to <Route path="${g==="/"?"*":`${g}/*`}">.`)}let f=Ke(),d;if(t){let g=typeof t=="string"?Jr(t):t;ye(u==="/"||((S=g.pathname)==null?void 0:S.startsWith(u)),`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 "${u}" but pathname "${g.pathname}" was given in the \`location\` prop.`),d=g}else d=f;let h=d.pathname||"/",p=h;if(u!=="/"){let g=u.replace(/^\//,"").split("/");p="/"+h.replace(/^\//,"").split("/").slice(g.length).join("/")}let y=yg(e,{pathname:p});Et(c||y!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),Et(y==null||y[y.length-1].route.element!==void 0||y[y.length-1].route.Component!==void 0||y[y.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.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 x=Lw(y&&y.map(g=>Object.assign({},g,{params:Object.assign({},s,g.params),pathname:Xt([u,r.encodeLocation?r.encodeLocation(g.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?u:Xt([u,r.encodeLocation?r.encodeLocation(g.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:g.pathnameBase])})),i,n);return t&&x?k.createElement(fo.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...d},navigationType:"POP"}},x):x}function Rw(){let e=Uw(),t=yw(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},o={padding:"2px 4px",backgroundColor:r},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=k.createElement(k.Fragment,null,k.createElement("p",null,"💿 Hey developer 👋"),k.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",k.createElement("code",{style:o},"ErrorBoundary")," or"," ",k.createElement("code",{style:o},"errorElement")," prop on your route.")),k.createElement(k.Fragment,null,k.createElement("h2",null,"Unexpected Application Error!"),k.createElement("h3",{style:{fontStyle:"italic"}},t),n?k.createElement("pre",{style:i},n):null,s)}var Pw=k.createElement(Rw,null),_g=class extends k.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=bw(e.digest);n&&(e=n)}let t=e!==void 0?k.createElement(Nt.Provider,{value:this.props.routeContext},k.createElement(Cc.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?k.createElement(Ow,{error:e},t):t}};_g.contextType=Cg;var Wl=new WeakMap;function Ow({children:e,error:t}){let{basename:n}=k.useContext(ht);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=Nw(t.digest);if(r){let i=Wl.get(t);if(i)throw i;let o=wg(r.location,n);if(kg&&!Wl.get(t))if(o.isExternal||r.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const s=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:r.replace}));throw Wl.set(t,s),s}return k.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function Dw({routeContext:e,match:t,children:n}){let r=k.useContext(Zr);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),k.createElement(Nt.Provider,{value:e},n)}function Lw(e,t=[],n){let r=n==null?void 0:n.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,o=r==null?void 0:r.errors;if(o!=null){let f=i.findIndex(d=>d.route.id&&(o==null?void 0:o[d.route.id])!==void 0);ye(f>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),i=i.slice(0,Math.min(i.length,f+1))}let s=!1,l=-1;if(n&&r){s=r.renderFallback;for(let f=0;f<i.length;f++){let d=i[f];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(l=f),d.route.id){let{loaderData:h,errors:p}=r,y=d.route.loader&&!h.hasOwnProperty(d.route.id)&&(!p||p[d.route.id]===void 0);if(d.route.lazy||y){n.isStatic&&(s=!0),l>=0?i=i.slice(0,l+1):i=[i[0]];break}}}}let u=n==null?void 0:n.onError,c=r&&u?(f,d)=>{var h,p;u(f,{location:r.location,params:((p=(h=r.matches)==null?void 0:h[0])==null?void 0:p.params)??{},unstable_pattern:xw(r.matches),errorInfo:d})}:void 0;return i.reduceRight((f,d,h)=>{let p,y=!1,x=null,S=null;r&&(p=o&&d.route.id?o[d.route.id]:void 0,x=d.route.errorElement||Pw,s&&(l<0&&h===0?(Ig("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),y=!0,S=null):l===h&&(y=!0,S=d.route.hydrateFallbackElement||null)));let g=t.concat(i.slice(0,h+1)),m=()=>{let v;return p?v=x:y?v=S:d.route.Component?v=k.createElement(d.route.Component,null):d.route.element?v=d.route.element:v=f,k.createElement(Dw,{match:d,routeContext:{outlet:f,matches:g,isDataRoute:r!=null},children:v})};return r&&(d.route.ErrorBoundary||d.route.errorElement||h===0)?k.createElement(_g,{location:r.location,revalidation:r.revalidation,component:x,error:p,children:m(),routeContext:{outlet:null,matches:g,isDataRoute:!0},onError:c}):m()},null)}function Ec(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Fw(e){let t=k.useContext(Zr);return ye(t,Ec(e)),t}function zw(e){let t=k.useContext(il);return ye(t,Ec(e)),t}function Mw(e){let t=k.useContext(Nt);return ye(t,Ec(e)),t}function Nc(e){let t=Mw(e),n=t.matches[t.matches.length-1];return ye(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Bw(){return Nc("useRouteId")}function Uw(){var r;let e=k.useContext(Cc),t=zw("useRouteError"),n=Nc("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function Hw(){let{router:e}=Fw("useNavigate"),t=Nc("useNavigate"),n=k.useRef(!1);return Tg(()=>{n.current=!0}),k.useCallback(async(i,o={})=>{Et(n.current,bg),n.current&&(typeof i=="number"?await e.navigate(i):await e.navigate(i,{fromRouteId:t,...o}))},[e,t])}var Ef={};function Ig(e,t,n){!t&&!Ef[e]&&(Ef[e]=!0,Et(!1,n))}k.memo($w);function $w({routes:e,future:t,state:n,isStatic:r,onError:i}){return jg(e,void 0,{state:n,isStatic:r,onError:i})}function Ww({to:e,replace:t,state:n,relative:r}){ye(ei(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=k.useContext(ht);Et(!i,"<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}=k.useContext(Nt),{pathname:s}=Ke(),l=Le(),u=rl(e,Sc(o),s,r==="path"),c=JSON.stringify(u);return k.useEffect(()=>{l(JSON.parse(c),{replace:t,state:n,relative:r})},[l,c,r,t,n]),null}function bc(e){return Iw(e.context)}function je(e){ye(!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 Vw({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:i,static:o=!1,unstable_useTransitions:s}){ye(!ei(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),u=k.useMemo(()=>({basename:l,navigator:i,static:o,unstable_useTransitions:s,future:{}}),[l,i,o,s]);typeof n=="string"&&(n=Jr(n));let{pathname:c="/",search:f="",hash:d="",state:h=null,key:p="default",unstable_mask:y}=n,x=k.useMemo(()=>{let S=hn(c,l);return S==null?null:{location:{pathname:S,search:f,hash:d,state:h,key:p,unstable_mask:y},navigationType:r}},[l,c,f,d,h,p,r,y]);return Et(x!=null,`<Router basename="${l}"> is not able to match the URL "${c}${f}${d}" because it does not start with the basename, so the <Router> won't render anything.`),x==null?null:k.createElement(ht.Provider,{value:u},k.createElement(fo.Provider,{children:t,value:x}))}function qw({children:e,location:t}){return Aw(ou(e),t)}function ou(e,t=[]){let n=[];return k.Children.forEach(e,(r,i)=>{if(!k.isValidElement(r))return;let o=[...t,i];if(r.type===k.Fragment){n.push.apply(n,ou(r.props.children,o));return}ye(r.type===je,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),ye(!r.props.index||!r.props.children,"An index route cannot have child routes.");let s={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=ou(r.props.children,o)),n.push(s)}),n}var is="get",os="application/x-www-form-urlencoded";function ol(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function Gw(e){return ol(e)&&e.tagName.toLowerCase()==="button"}function Kw(e){return ol(e)&&e.tagName.toLowerCase()==="form"}function Qw(e){return ol(e)&&e.tagName.toLowerCase()==="input"}function Yw(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Xw(e,t){return e.button===0&&(!t||t==="_self")&&!Yw(e)}function su(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function Jw(e,t){let n=su(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(o=>{n.append(i,o)})}),n}var Fo=null;function Zw(){if(Fo===null)try{new FormData(document.createElement("form"),0),Fo=!1}catch{Fo=!0}return Fo}var e1=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Vl(e){return e!=null&&!e1.has(e)?(Et(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${os}"`),null):e}function t1(e,t){let n,r,i,o,s;if(Kw(e)){let l=e.getAttribute("action");r=l?hn(l,t):null,n=e.getAttribute("method")||is,i=Vl(e.getAttribute("enctype"))||os,o=new FormData(e)}else if(Gw(e)||Qw(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let u=e.getAttribute("formaction")||l.getAttribute("action");if(r=u?hn(u,t):null,n=e.getAttribute("formmethod")||l.getAttribute("method")||is,i=Vl(e.getAttribute("formenctype"))||Vl(l.getAttribute("enctype"))||os,o=new FormData(l,e),!Zw()){let{name:c,type:f,value:d}=e;if(f==="image"){let h=c?`${c}.`:"";o.append(`${h}x`,"0"),o.append(`${h}y`,"0")}else c&&o.append(c,d)}}else{if(ol(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=is,r=null,i=os,s=e}return o&&i==="text/plain"&&(s=o,o=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:o,body:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Tc(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ag(e,t,n,r){let i=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?i.pathname.endsWith("/")?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname==="/"?i.pathname=`_root.${r}`:t&&hn(i.pathname,t)==="/"?i.pathname=`${t.replace(/\/$/,"")}/_root.${r}`:i.pathname=`${i.pathname.replace(/\/$/,"")}.${r}`,i}async function n1(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 r1(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 i1(e,t,n){let r=await Promise.all(e.map(async i=>{let o=t.routes[i.route.id];if(o){let s=await n1(o,n);return s.links?s.links():[]}return[]}));return a1(r.flat(1).filter(r1).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function Nf(e,t,n,r,i,o){let s=(u,c)=>n[c]?u.route.id!==n[c].route.id:!0,l=(u,c)=>{var f;return n[c].pathname!==u.pathname||((f=n[c].route.path)==null?void 0:f.endsWith("*"))&&n[c].params["*"]!==u.params["*"]};return o==="assets"?t.filter((u,c)=>s(u,c)||l(u,c)):o==="data"?t.filter((u,c)=>{var d;let f=r.routes[u.route.id];if(!f||!f.hasLoader)return!1;if(s(u,c)||l(u,c))return!0;if(u.route.shouldRevalidate){let h=u.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:((d=n[0])==null?void 0:d.params)||{},nextUrl:new URL(e,window.origin),nextParams:u.params,defaultShouldRevalidate:!0});if(typeof h=="boolean")return h}return!0}):[]}function o1(e,t,{includeHydrateFallback:n}={}){return s1(e.map(r=>{let i=t.routes[r.route.id];if(!i)return[];let o=[i.module];return i.clientActionModule&&(o=o.concat(i.clientActionModule)),i.clientLoaderModule&&(o=o.concat(i.clientLoaderModule)),n&&i.hydrateFallbackModule&&(o=o.concat(i.hydrateFallbackModule)),i.imports&&(o=o.concat(i.imports)),o}).flat(1))}function s1(e){return[...new Set(e)]}function l1(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function a1(e,t){let n=new Set;return new Set(t),e.reduce((r,i)=>{let o=JSON.stringify(l1(i));return n.has(o)||(n.add(o),r.push({key:o,link:i})),r},[])}function jc(){let e=k.useContext(Zr);return Tc(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function u1(){let e=k.useContext(il);return Tc(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var _c=k.createContext(void 0);_c.displayName="FrameworkContext";function Ic(){let e=k.useContext(_c);return Tc(e,"You must render this element inside a <HydratedRouter> element"),e}function c1(e,t){let n=k.useContext(_c),[r,i]=k.useState(!1),[o,s]=k.useState(!1),{onFocus:l,onBlur:u,onMouseEnter:c,onMouseLeave:f,onTouchStart:d}=t,h=k.useRef(null);k.useEffect(()=>{if(e==="render"&&s(!0),e==="viewport"){let x=g=>{g.forEach(m=>{s(m.isIntersecting)})},S=new IntersectionObserver(x,{threshold:.5});return h.current&&S.observe(h.current),()=>{S.disconnect()}}},[e]),k.useEffect(()=>{if(r){let x=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(x)}}},[r]);let p=()=>{i(!0)},y=()=>{i(!1),s(!1)};return n?e!=="intent"?[o,h,{}]:[o,h,{onFocus:pi(l,p),onBlur:pi(u,y),onMouseEnter:pi(c,p),onMouseLeave:pi(f,y),onTouchStart:pi(d,p)}]:[!1,h,{}]}function pi(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function d1({page:e,...t}){let n=kw(),{router:r}=jc(),i=k.useMemo(()=>yg(r.routes,e,r.basename),[r.routes,e,r.basename]);return i?n?k.createElement(h1,{page:e,matches:i,...t}):k.createElement(p1,{page:e,matches:i,...t}):null}function f1(e){let{manifest:t,routeModules:n}=Ic(),[r,i]=k.useState([]);return k.useEffect(()=>{let o=!1;return i1(e,t,n).then(s=>{o||i(s)}),()=>{o=!0}},[e,t,n]),r}function h1({page:e,matches:t,...n}){let r=Ke(),{future:i}=Ic(),{basename:o}=jc(),s=k.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let l=Ag(e,o,i.unstable_trailingSlashAwareDataRequests,"rsc"),u=!1,c=[];for(let f of t)typeof f.route.shouldRevalidate=="function"?u=!0:c.push(f.route.id);return u&&c.length>0&&l.searchParams.set("_routes",c.join(",")),[l.pathname+l.search]},[o,i.unstable_trailingSlashAwareDataRequests,e,r,t]);return k.createElement(k.Fragment,null,s.map(l=>k.createElement("link",{key:l,rel:"prefetch",as:"fetch",href:l,...n})))}function p1({page:e,matches:t,...n}){let r=Ke(),{future:i,manifest:o,routeModules:s}=Ic(),{basename:l}=jc(),{loaderData:u,matches:c}=u1(),f=k.useMemo(()=>Nf(e,t,c,o,r,"data"),[e,t,c,o,r]),d=k.useMemo(()=>Nf(e,t,c,o,r,"assets"),[e,t,c,o,r]),h=k.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let x=new Set,S=!1;if(t.forEach(m=>{var b;let v=o.routes[m.route.id];!v||!v.hasLoader||(!f.some(j=>j.route.id===m.route.id)&&m.route.id in u&&((b=s[m.route.id])!=null&&b.shouldRevalidate)||v.hasClientLoader?S=!0:x.add(m.route.id))}),x.size===0)return[];let g=Ag(e,l,i.unstable_trailingSlashAwareDataRequests,"data");return S&&x.size>0&&g.searchParams.set("_routes",t.filter(m=>x.has(m.route.id)).map(m=>m.route.id).join(",")),[g.pathname+g.search]},[l,i.unstable_trailingSlashAwareDataRequests,u,r,o,f,t,e,s]),p=k.useMemo(()=>o1(d,o),[d,o]),y=f1(d);return k.createElement(k.Fragment,null,h.map(x=>k.createElement("link",{key:x,rel:"prefetch",as:"fetch",href:x,...n})),p.map(x=>k.createElement("link",{key:x,rel:"modulepreload",href:x,...n})),y.map(({key:x,link:S})=>k.createElement("link",{key:x,nonce:n.nonce,...S,crossOrigin:S.crossOrigin??n.crossOrigin})))}function m1(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var g1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{g1&&(window.__reactRouterVersion="7.14.0")}catch{}function y1({basename:e,children:t,unstable_useTransitions:n,window:r}){let i=k.useRef();i.current==null&&(i.current=Gk({window:r,v5Compat:!0}));let o=i.current,[s,l]=k.useState({action:o.action,location:o.location}),u=k.useCallback(c=>{n===!1?l(c):k.startTransition(()=>l(c))},[n]);return k.useLayoutEffect(()=>o.listen(u),[o,u]),k.createElement(Vw,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:o,unstable_useTransitions:n})}var Rg=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ar=k.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:i,reloadDocument:o,replace:s,unstable_mask:l,state:u,target:c,to:f,preventScrollReset:d,viewTransition:h,unstable_defaultShouldRevalidate:p,...y},x){let{basename:S,navigator:g,unstable_useTransitions:m}=k.useContext(ht),v=typeof f=="string"&&Rg.test(f),b=wg(f,S);f=b.to;let j=Tw(f,{relative:i}),E=Ke(),_=null;if(l){let G=rl(l,[],E.unstable_mask?E.unstable_mask.pathname:"/",!0);S!=="/"&&(G.pathname=G.pathname==="/"?S:Xt([S,G.pathname])),_=g.createHref(G)}let[O,R,N]=c1(r,y),P=k1(f,{replace:s,unstable_mask:l,state:u,target:c,preventScrollReset:d,relative:i,viewTransition:h,unstable_defaultShouldRevalidate:p,unstable_useTransitions:m});function V(G){t&&t(G),G.defaultPrevented||P(G)}let $=!(b.isExternal||o),H=k.createElement("a",{...y,...N,href:($?_:void 0)||b.absoluteURL||j,onClick:$?V:t,ref:m1(x,R),target:c,"data-discover":!v&&n==="render"?"true":void 0});return O&&!v?k.createElement(k.Fragment,null,H,k.createElement(d1,{page:j})):H});ar.displayName="Link";var lu=k.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:i=!1,style:o,to:s,viewTransition:l,children:u,...c},f){let d=ho(s,{relative:c.relative}),h=Ke(),p=k.useContext(il),{navigator:y,basename:x}=k.useContext(ht),S=p!=null&&b1(d)&&l===!0,g=y.encodeLocation?y.encodeLocation(d).pathname:d.pathname,m=h.pathname,v=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;n||(m=m.toLowerCase(),v=v?v.toLowerCase():null,g=g.toLowerCase()),v&&x&&(v=hn(v,x)||v);const b=g!=="/"&&g.endsWith("/")?g.length-1:g.length;let j=m===g||!i&&m.startsWith(g)&&m.charAt(b)==="/",E=v!=null&&(v===g||!i&&v.startsWith(g)&&v.charAt(g.length)==="/"),_={isActive:j,isPending:E,isTransitioning:S},O=j?t:void 0,R;typeof r=="function"?R=r(_):R=[r,j?"active":null,E?"pending":null,S?"transitioning":null].filter(Boolean).join(" ");let N=typeof o=="function"?o(_):o;return k.createElement(ar,{...c,"aria-current":O,className:R,ref:f,style:N,to:s,viewTransition:l},typeof u=="function"?u(_):u)});lu.displayName="NavLink";var x1=k.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:o,method:s=is,action:l,onSubmit:u,relative:c,preventScrollReset:f,viewTransition:d,unstable_defaultShouldRevalidate:h,...p},y)=>{let{unstable_useTransitions:x}=k.useContext(ht),S=E1(),g=N1(l,{relative:c}),m=s.toLowerCase()==="get"?"get":"post",v=typeof l=="string"&&Rg.test(l),b=j=>{if(u&&u(j),j.defaultPrevented)return;j.preventDefault();let E=j.nativeEvent.submitter,_=(E==null?void 0:E.getAttribute("formmethod"))||s,O=()=>S(E||j.currentTarget,{fetcherKey:t,method:_,navigate:n,replace:i,state:o,relative:c,preventScrollReset:f,viewTransition:d,unstable_defaultShouldRevalidate:h});x&&n!==!1?k.startTransition(()=>O()):O()};return k.createElement("form",{ref:y,method:m,action:g,onSubmit:r?u:b,...p,"data-discover":!v&&e==="render"?"true":void 0})});x1.displayName="Form";function v1(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Pg(e){let t=k.useContext(Zr);return ye(t,v1(e)),t}function k1(e,{target:t,replace:n,unstable_mask:r,state:i,preventScrollReset:o,relative:s,viewTransition:l,unstable_defaultShouldRevalidate:u,unstable_useTransitions:c}={}){let f=Le(),d=Ke(),h=ho(e,{relative:s});return k.useCallback(p=>{if(Xw(p,t)){p.preventDefault();let y=n!==void 0?n:to(d)===to(h),x=()=>f(e,{replace:y,unstable_mask:r,state:i,preventScrollReset:o,relative:s,viewTransition:l,unstable_defaultShouldRevalidate:u});c?k.startTransition(()=>x()):x()}},[d,f,h,n,r,i,t,e,o,s,l,u,c])}function w1(e){Et(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=k.useRef(su(e)),n=k.useRef(!1),r=Ke(),i=k.useMemo(()=>Jw(r.search,n.current?null:t.current),[r.search]),o=Le(),s=k.useCallback((l,u)=>{const c=su(typeof l=="function"?l(new URLSearchParams(i)):l);n.current=!0,o("?"+c,u)},[o,i]);return[i,s]}var S1=0,C1=()=>`__${String(++S1)}__`;function E1(){let{router:e}=Pg("useSubmit"),{basename:t}=k.useContext(ht),n=Bw(),r=e.fetch,i=e.navigate;return k.useCallback(async(o,s={})=>{let{action:l,method:u,encType:c,formData:f,body:d}=t1(o,t);if(s.navigate===!1){let h=s.fetcherKey||C1();await r(h,n,s.action||l,{unstable_defaultShouldRevalidate:s.unstable_defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:f,body:d,formMethod:s.method||u,formEncType:s.encType||c,flushSync:s.flushSync})}else await i(s.action||l,{unstable_defaultShouldRevalidate:s.unstable_defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:f,body:d,formMethod:s.method||u,formEncType:s.encType||c,replace:s.replace,state:s.state,fromRouteId:n,flushSync:s.flushSync,viewTransition:s.viewTransition})},[r,i,t,n])}function N1(e,{relative:t}={}){let{basename:n}=k.useContext(ht),r=k.useContext(Nt);ye(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),o={...ho(e||".",{relative:t})},s=Ke();if(e==null){o.search=s.search;let l=new URLSearchParams(o.search),u=l.getAll("index");if(u.some(f=>f==="")){l.delete("index"),u.filter(d=>d).forEach(d=>l.append("index",d));let f=l.toString();o.search=f?`?${f}`:""}}return(!e||e===".")&&i.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(o.pathname=o.pathname==="/"?n:Xt([n,o.pathname])),to(o)}function b1(e,{relative:t}={}){let n=k.useContext(Eg);ye(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Pg("useViewTransitionState"),i=ho(e,{relative:t});if(!n.isTransitioning)return!1;let o=hn(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=hn(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Ls(i.pathname,s)!=null||Ls(i.pathname,o)!=null}const T1="/beta";class bf extends Error{constructor(n,r,i){super(i);yr(this,"url");yr(this,"status");yr(this,"statusText");yr(this,"body");yr(this,"request");this.name="ApiError",this.url=r.url,this.status=r.status,this.statusText=r.statusText,this.body=r.body,this.request=n}}class j1 extends Error{constructor(t){super(t),this.name="CancelError"}get isCancelled(){return!0}}var qt,Gt,At,bn,er,Br,Tn;class _1{constructor(t){xn(this,qt);xn(this,Gt);xn(this,At);xn(this,bn);xn(this,er);xn(this,Br);xn(this,Tn);Tt(this,qt,!1),Tt(this,Gt,!1),Tt(this,At,!1),Tt(this,bn,[]),Tt(this,er,new Promise((n,r)=>{Tt(this,Br,n),Tt(this,Tn,r);const i=l=>{le(this,qt)||le(this,Gt)||le(this,At)||(Tt(this,qt,!0),le(this,Br)&&le(this,Br).call(this,l))},o=l=>{le(this,qt)||le(this,Gt)||le(this,At)||(Tt(this,Gt,!0),le(this,Tn)&&le(this,Tn).call(this,l))},s=l=>{le(this,qt)||le(this,Gt)||le(this,At)||le(this,bn).push(l)};return Object.defineProperty(s,"isResolved",{get:()=>le(this,qt)}),Object.defineProperty(s,"isRejected",{get:()=>le(this,Gt)}),Object.defineProperty(s,"isCancelled",{get:()=>le(this,At)}),t(i,o,s)}))}get[Symbol.toStringTag](){return"Cancellable Promise"}then(t,n){return le(this,er).then(t,n)}catch(t){return le(this,er).catch(t)}finally(t){return le(this,er).finally(t)}cancel(){if(!(le(this,qt)||le(this,Gt)||le(this,At))){if(Tt(this,At,!0),le(this,bn).length)try{for(const t of le(this,bn))t()}catch(t){console.warn("Cancellation threw an error",t);return}le(this,bn).length=0,le(this,Tn)&&le(this,Tn).call(this,new j1("Request aborted"))}}get isCancelled(){return le(this,At)}}qt=new WeakMap,Gt=new WeakMap,At=new WeakMap,bn=new WeakMap,er=new WeakMap,Br=new WeakMap,Tn=new WeakMap;const L={BASE:"",VERSION:"1.0",WITH_CREDENTIALS:!1,CREDENTIALS:"include",TOKEN:void 0,USERNAME:void 0,PASSWORD:void 0,HEADERS:void 0,ENCODE_PATH:void 0};var Tf;(function(e){(function(t){t.NOT_STARTED="NOT_STARTED",t.IN_PROGRESS="IN_PROGRESS",t.FOR_REVIEW="FOR_REVIEW",t.DONE="DONE"})(e.taskStatus||(e.taskStatus={})),function(t){t.NOT_STARTED="NOT_STARTED",t.IN_PROGRESS="IN_PROGRESS",t.FOR_REVIEW="FOR_REVIEW",t.DONE="DONE"}(e.taskStatusBeforeClaim||(e.taskStatusBeforeClaim={}))})(Tf||(Tf={}));var jf;(function(e){(function(t){t.HUMAN="human",t.AGENT="agent"})(e.type||(e.type={}))})(jf||(jf={}));var _f;(function(e){(function(t){t.CLAUDE="claude",t.CODEX="codex",t.OPENCODE="opencode",t.ADK="adk",t.GITHUBCOPILOT="githubcopilot",t.OTHER="other"})(e.type||(e.type={}))})(_f||(_f={}));var Wt;(function(e){(function(t){t.NOT_STARTED="not_started",t.USER_CONSENT_REJECTED="USER_CONSENT_REJECTED",t.MCP_AUTH_FLOW_STARTED="mcp_auth_flow_started",t.MCP_AUTH_FLOW_COMPLETED="mcp_auth_flow_completed",t.CONNECTIONS_FLOW_STARTED="connections_flow_started",t.CONNECTIONS_FLOW_COMPLETED="connections_flow_completed",t.AUTHORIZATION_CODE_ISSUED="authorization_code_issued",t.AUTHORIZATION_CODE_EXCHANGED="authorization_code_exchanged"})(e.status||(e.status={}))})(Wt||(Wt={}));var If;(function(e){(function(t){t.NOT_STARTED="NOT_STARTED",t.IN_PROGRESS="IN_PROGRESS",t.FOR_REVIEW="FOR_REVIEW",t.DONE="DONE"})(e.status||(e.status={}))})(If||(If={}));var Af;(function(e){(function(t){t.OPENAI="openai"})(e.type||(e.type={}))})(Af||(Af={}));var Rf;(function(e){(function(t){t.NONE="none",t.CLIENT_SECRET_BASIC="client_secret_basic"})(e.token_endpoint_auth_method||(e.token_endpoint_auth_method={}))})(Rf||(Rf={}));var Cn;(function(e){(function(t){t.PENDING="pending",t.AUTHORIZED="authorized",t.FAILED="failed"})(e.status||(e.status={}))})(Cn||(Cn={}));var Pf;(function(e){(function(t){t.CLAUDE="claude",t.CODEX="codex",t.OPENCODE="opencode",t.ADK="adk",t.GITHUBCOPILOT="githubcopilot",t.OTHER="other"})(e.type||(e.type={}))})(Pf||(Pf={}));var Of;(function(e){(function(t){t.OPENAI="openai"})(e.type||(e.type={}))})(Of||(Of={}));var au;(function(e){(function(t){t.HTTP="http",t.STDIO="stdio"})(e.type||(e.type={}))})(au||(au={}));var Df;(function(e){(function(t){t.READY="READY",t.CLAIMED="CLAIMED",t.RUNNING="RUNNING",t.STOP_REQUESTED="STOP_REQUESTED",t.COMPLETED="COMPLETED",t.FAILED="FAILED",t.CANCELLED="CANCELLED",t.STALE="STALE"})(e.status||(e.status={}))})(Df||(Df={}));var Lf;(function(e){(function(t){t.CLIENT_NOT_REGISTERED="CLIENT_NOT_REGISTERED",t.CLIENT_REGISTERED="CLIENT_REGISTERED",t.AUTHORIZATION_REQUEST_STARTED="AUTHORIZATION_REQUEST_STARTED",t.USER_CONSENT_OK="USER_CONSENT_OK",t.USER_CONSENT_REJECTED="USER_CONSENT_REJECTED",t.WAITING_ON_DOWNSTREAM_AUTH="WAITING_ON_DOWNSTREAM_AUTH",t.AUTHORIZATION_CODE_ISSUED="AUTHORIZATION_CODE_ISSUED",t.AUTHORIZATION_CODE_EXCHANGED="AUTHORIZATION_CODE_EXCHANGED"})(e.status||(e.status={}))})(Lf||(Lf={}));var Ff;(function(e){(function(t){t.TASK="task",t.CONTEXT_BLOCK="context_block",t.AGENT="agent",t.PROJECT="project",t.TAG="tag",t.TOOL="tool"})(e.type||(e.type={}))})(Ff||(Ff={}));var zf;(function(e){(function(t){t.ACCESS_TOKEN="access_token",t.REFRESH_TOKEN="refresh_token"})(e.token_type_hint||(e.token_type_hint={}))})(zf||(zf={}));var Mf;(function(e){(function(t){t.BEARER="Bearer"})(e.token_type||(e.token_type={}))})(Mf||(Mf={}));var Pi;(function(e){(function(t){t.CLIENT_NOT_REGISTERED="CLIENT_NOT_REGISTERED",t.CLIENT_REGISTERED="CLIENT_REGISTERED",t.AUTHORIZATION_REQUEST_STARTED="AUTHORIZATION_REQUEST_STARTED",t.USER_CONSENT_OK="USER_CONSENT_OK",t.USER_CONSENT_REJECTED="USER_CONSENT_REJECTED",t.WAITING_ON_DOWNSTREAM_AUTH="WAITING_ON_DOWNSTREAM_AUTH",t.AUTHORIZATION_CODE_ISSUED="AUTHORIZATION_CODE_ISSUED",t.AUTHORIZATION_CODE_EXCHANGED="AUTHORIZATION_CODE_EXCHANGED"})(e.status||(e.status={}))})(Pi||(Pi={}));var Bf;(function(e){(function(t){t.CLAUDE="claude",t.CODEX="codex",t.OPENCODE="opencode",t.ADK="adk",t.GITHUBCOPILOT="githubcopilot",t.OTHER="other"})(e.type||(e.type={}))})(Bf||(Bf={}));var Uf;(function(e){(function(t){t.NONE="none",t.CLIENT_SECRET_BASIC="client_secret_basic"})(e.token_endpoint_auth_method||(e.token_endpoint_auth_method={}))})(Uf||(Uf={}));var Hf;(function(e){(function(t){t.HTTP="http",t.STDIO="stdio"})(e.type||(e.type={}))})(Hf||(Hf={}));var $f;(function(e){(function(t){t.SUCCEEDED="SUCCEEDED",t.FAILED="FAILED",t.STALE="STALE",t.CANCELLED="CANCELLED"})(e.status||(e.status={})),function(t){t.OUT_OF_QUOTA="OUT_OF_QUOTA",t.UNKNOWN="UNKNOWN"}(e.errorCode||(e.errorCode={}))})($f||($f={}));var Wf;(function(e){(function(t){t.NOT_STARTED="NOT_STARTED",t.IN_PROGRESS="IN_PROGRESS",t.FOR_REVIEW="FOR_REVIEW",t.DONE="DONE"})(e.taskStatus||(e.taskStatus={})),function(t){t.SUCCEEDED="SUCCEEDED",t.FAILED="FAILED",t.STALE="STALE",t.CANCELLED="CANCELLED"}(e.status||(e.status={})),function(t){t.OUT_OF_QUOTA="OUT_OF_QUOTA",t.UNKNOWN="UNKNOWN"}(e.errorCode||(e.errorCode={}))})(Wf||(Wf={}));var Vf;(function(e){(function(t){t.NOT_STARTED="NOT_STARTED",t.IN_PROGRESS="IN_PROGRESS",t.FOR_REVIEW="FOR_REVIEW",t.DONE="DONE"})(e.taskStatus||(e.taskStatus={}))})(Vf||(Vf={}));var uu;(function(e){(function(t){t.NOT_STARTED="NOT_STARTED",t.IN_PROGRESS="IN_PROGRESS",t.FOR_REVIEW="FOR_REVIEW",t.DONE="DONE"})(e.status||(e.status={}))})(uu||(uu={}));var qf;(function(e){(function(t){t.NOT_STARTED="NOT_STARTED",t.IN_PROGRESS="IN_PROGRESS",t.FOR_REVIEW="FOR_REVIEW",t.DONE="DONE"})(e.status||(e.status={}))})(qf||(qf={}));var Gf;(function(e){(function(t){t.URN_IETF_PARAMS_OAUTH_GRANT_TYPE_TOKEN_EXCHANGE="urn:ietf:params:oauth:grant-type:token-exchange"})(e.grant_type||(e.grant_type={})),function(t){t.URN_IETF_PARAMS_OAUTH_TOKEN_TYPE_ACCESS_TOKEN="urn:ietf:params:oauth:token-type:access_token"}(e.subject_token_type||(e.subject_token_type={}))})(Gf||(Gf={}));var Kf;(function(e){(function(t){t.AUTHORIZATION_CODE="authorization_code",t.REFRESH_TOKEN="refresh_token"})(e.grant_type||(e.grant_type={}))})(Kf||(Kf={}));var Qf;(function(e){(function(t){t.BEARER="Bearer"})(e.token_type||(e.token_type={}))})(Qf||(Qf={}));var Yf;(function(e){(function(t){t.HTTP="http",t.STDIO="stdio"})(e.type||(e.type={}))})(Yf||(Yf={}));var Xf;(function(e){(function(t){t.ADMIN="admin",t.STANDARD="standard"})(e.role||(e.role={}))})(Xf||(Xf={}));const Ac=e=>e!=null,po=e=>typeof e=="string",ql=e=>po(e)&&e!=="",Rc=e=>typeof e=="object"&&typeof e.type=="string"&&typeof e.stream=="function"&&typeof e.arrayBuffer=="function"&&typeof e.constructor=="function"&&typeof e.constructor.name=="string"&&/^(Blob|File)$/.test(e.constructor.name)&&/^(Blob|File)$/.test(e[Symbol.toStringTag]),Og=e=>e instanceof FormData,I1=e=>{try{return btoa(e)}catch{return Buffer.from(e).toString("base64")}},A1=e=>{const t=[],n=(i,o)=>{t.push(`${encodeURIComponent(i)}=${encodeURIComponent(String(o))}`)},r=(i,o)=>{Ac(o)&&(Array.isArray(o)?o.forEach(s=>{r(i,s)}):typeof o=="object"?Object.entries(o).forEach(([s,l])=>{r(`${i}[${s}]`,l)}):n(i,o))};return Object.entries(e).forEach(([i,o])=>{r(i,o)}),t.length>0?`?${t.join("&")}`:""},R1=(e,t)=>{const n=e.ENCODE_PATH||encodeURI,r=t.url.replace("{api-version}",e.VERSION).replace(/{(.*?)}/g,(o,s)=>{var l;return(l=t.path)!=null&&l.hasOwnProperty(s)?n(String(t.path[s])):o}),i=`${e.BASE}${r}`;return t.query?`${i}${A1(t.query)}`:i},P1=e=>{if(e.formData){const t=new FormData,n=(r,i)=>{po(i)||Rc(i)?t.append(r,i):t.append(r,JSON.stringify(i))};return Object.entries(e.formData).filter(([r,i])=>Ac(i)).forEach(([r,i])=>{Array.isArray(i)?i.forEach(o=>n(r,o)):n(r,i)}),t}},zo=async(e,t)=>typeof t=="function"?t(e):t,O1=async(e,t)=>{const[n,r,i,o]=await Promise.all([zo(t,e.TOKEN),zo(t,e.USERNAME),zo(t,e.PASSWORD),zo(t,e.HEADERS)]),s=Object.entries({Accept:"application/json",...o,...t.headers}).filter(([l,u])=>Ac(u)).reduce((l,[u,c])=>({...l,[u]:String(c)}),{});if(ql(n)&&(s.Authorization=`Bearer ${n}`),ql(r)&&ql(i)){const l=I1(`${r}:${i}`);s.Authorization=`Basic ${l}`}return t.body!==void 0&&(t.mediaType?s["Content-Type"]=t.mediaType:Rc(t.body)?s["Content-Type"]=t.body.type||"application/octet-stream":po(t.body)?s["Content-Type"]="text/plain":Og(t.body)||(s["Content-Type"]="application/json")),new Headers(s)},D1=e=>{var t;if(e.body!==void 0)return(t=e.mediaType)!=null&&t.includes("/json")?JSON.stringify(e.body):po(e.body)||Rc(e.body)||Og(e.body)?e.body:JSON.stringify(e.body)},L1=async(e,t,n,r,i,o,s)=>{const l=new AbortController,u={headers:o,body:r??i,method:t.method,signal:l.signal};return e.WITH_CREDENTIALS&&(u.credentials=e.CREDENTIALS),s(()=>l.abort()),await fetch(n,u)},F1=(e,t)=>{if(t){const n=e.headers.get(t);if(po(n))return n}},z1=async e=>{if(e.status!==204)try{const t=e.headers.get("Content-Type");if(t)return["application/json","application/problem+json"].some(i=>t.toLowerCase().startsWith(i))?await e.json():await e.text()}catch(t){console.error(t)}},M1=(e,t)=>{const r={400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable",...e.errors}[t.status];if(r)throw new bf(e,t,r);if(!t.ok){const i=t.status??"unknown",o=t.statusText??"unknown",s=(()=>{try{return JSON.stringify(t.body,null,2)}catch{return}})();throw new bf(e,t,`Generic Error: status: ${i}; status text: ${o}; body: ${s}`)}},U=(e,t)=>new _1(async(n,r,i)=>{try{const o=R1(e,t),s=P1(t),l=D1(t),u=await O1(e,t);if(!i.isCancelled){const c=await L1(e,t,o,l,s,u,i),f=await z1(c),d=F1(c,t.responseHeader),h={url:o,ok:c.ok,status:c.status,statusText:c.statusText,body:d??f};M1(t,h),n(h.body)}}catch(o){r(o)}});class Gl{static agentsControllerCreateAgent(t,n=L){return U(n,{method:"POST",url:"/api/v1/agents",body:t,mediaType:"application/json"})}static agentsControllerListAgents(t,n=1,r=20,i=L){return U(i,{method:"GET",url:"/api/v1/agents",query:{isActive:t,page:n,limit:r}})}static agentsControllerGetAgentBySlug(t,n=L){return U(n,{method:"GET",url:"/api/v1/agents/{slug}",path:{slug:t}})}static agentsControllerPatchAgent(t,n,r=L){return U(r,{method:"PATCH",url:"/api/v1/agents/{actorId}",path:{actorId:t},body:n,mediaType:"application/json"})}static agentsControllerDeleteAgent(t,n=L){return U(n,{method:"DELETE",url:"/api/v1/agents/{actorId}",path:{actorId:t}})}}class B1{static authJourneysControllerGetAuthJourneys(t,n=L){return U(n,{method:"GET",url:"/api/v1/auth-journeys/servers/{serverId}",path:{serverId:t},errors:{404:"Server not found"}})}}class U1{static clientRegistrationControllerRegisterClient(t,n,r,i=L){return U(i,{method:"POST",url:"/api/v1/auth/clients/register/mcp/{serverId}/{version}",path:{serverId:t,version:n},body:r,mediaType:"application/json",errors:{400:"Invalid client metadata (missing fields, invalid redirect URIs, unsupported grant types, or PKCE not configured)",409:"A client with this name is already registered"}})}static clientRegistrationControllerGetClient(t,n=L){return U(n,{method:"GET",url:"/api/v1/auth/clients/{clientId}",path:{clientId:t},errors:{404:"Client not found"}})}static clientRegistrationControllerListClients(t=L){return U(t,{method:"GET",url:"/api/v1/auth/clients"})}static authorizationControllerAuthorize(t,n,r,i,o,s,l,u,c,f,d=L){return U(d,{method:"GET",url:"/api/v1/auth/authorize/mcp/{serverIdentifier}/{version}",path:{serverIdentifier:l,version:u},query:{response_type:t,scope:c,client_id:n,code_challenge:r,code_challenge_method:i,redirect_uri:o,state:s,resource:f},errors:{302:"Redirects to consent screen with authorization request ID",400:"Invalid authorization request parameters",404:"MCP server or client not found"}})}static authorizationControllerAuthorizeConsent(t,n,r,i=L){return U(i,{method:"POST",url:"/api/v1/auth/authorize/mcp/{serverIdentifier}/{version}",path:{serverIdentifier:t,version:n},body:r,mediaType:"application/json",errors:{302:"Redirects to client redirect_uri with authorization code or error",400:"Invalid consent decision or flow state",401:"Authorization flow has already been used",404:"Authorization flow not found"}})}static authorizationControllerGetConsentMetadata(t,n=L){return U(n,{method:"GET",url:"/api/v1/auth/consent/{flowId}",path:{flowId:t},errors:{401:"Authentication required to access consent metadata",404:"Authorization flow not found"}})}static authorizationControllerToken(t,n,r,i=L){return U(i,{method:"POST",url:"/api/v1/auth/token/mcp/{serverIdentifier}/{version}",path:{serverIdentifier:t,version:n},body:r,mediaType:"application/json",errors:{400:"Invalid token request parameters",401:"Invalid authorization code, code_verifier, or expired code"}})}static authorizationControllerIntrospect(t,n,r,i=L){return U(i,{method:"POST",url:"/api/v1/auth/introspect/mcp/{serverIdentifier}/{version}",path:{serverIdentifier:t,version:n},body:r,mediaType:"application/json",errors:{400:"Invalid introspection request parameters"}})}static authorizationControllerTokenExchange(t,n,r,i=L){return U(i,{method:"POST",url:"/api/v1/auth/token-exchange/mcp/{serverIdentifier}/{version}",path:{serverIdentifier:t,version:n},body:r,mediaType:"application/json",errors:{400:"Invalid token exchange request parameters",401:"Invalid or expired MCP JWT",403:"Insufficient scope - requested scope not entitled",404:"Connection not found"}})}static authorizationControllerCallback(t,n,r,i,o,s=L){return U(s,{method:"GET",url:"/api/v1/auth/callback",query:{code:t,state:n,error:r,scope:i,error_description:o},errors:{302:"Redirects to next step in the authorization flow",400:"Invalid callback parameters or state",404:"Connection flow not found for provided state"}})}static authorizationControllerGetScopes(t=L){return U(t,{method:"GET",url:"/api/v1/auth/scopes"})}}class _t{static contextControllerCreateBlock(t,n=L){return U(n,{method:"POST",url:"/api/v1/context/blocks",body:t,mediaType:"application/json",errors:{400:"Invalid input data"}})}static contextControllerListBlocks(t,n=L){return U(n,{method:"GET",url:"/api/v1/context/blocks",query:{tag:t}})}static contextControllerSearchBlocks(t,n=10,r=.3,i=L){return U(i,{method:"GET",url:"/api/v1/context/blocks/search/query",query:{query:t,limit:n,threshold:r}})}static contextControllerGetBlockTree(t=L){return U(t,{method:"GET",url:"/api/v1/context/blocks/tree"})}static contextControllerGetBlock(t,n=L){return U(n,{method:"GET",url:"/api/v1/context/blocks/{id}",path:{id:t}})}static contextControllerUpdateBlock(t,n,r=L){return U(r,{method:"PATCH",url:"/api/v1/context/blocks/{id}",path:{id:t},body:n,mediaType:"application/json",errors:{400:"No update fields provided"}})}static contextControllerDeleteBlock(t,n=L){return U(n,{method:"DELETE",url:"/api/v1/context/blocks/{id}",path:{id:t}})}static contextControllerAppendToBlock(t,n,r=L){return U(r,{method:"POST",url:"/api/v1/context/blocks/{id}/append",path:{id:t},body:n,mediaType:"application/json"})}static contextControllerReorderBlock(t,n,r=L){return U(r,{method:"PATCH",url:"/api/v1/context/blocks/{id}/reorder",path:{id:t},body:n,mediaType:"application/json"})}static contextControllerMoveBlock(t,n,r=L){return U(r,{method:"PATCH",url:"/api/v1/context/blocks/{id}/move",path:{id:t},body:n,mediaType:"application/json",errors:{400:"Circular reference detected or parent not found"}})}static contextControllerAddTagToBlock(t,n,r=L){return U(r,{method:"POST",url:"/api/v1/context/blocks/{id}/tags",path:{id:t},body:n,mediaType:"application/json",errors:{400:"Invalid input data"}})}static contextControllerRemoveTagFromBlock(t,n,r=L){return U(r,{method:"DELETE",url:"/api/v1/context/blocks/{id}/tags/{tagId}",path:{id:t,tagId:n}})}static contextControllerHandleMcpGet(t=L){return U(t,{method:"GET",url:"/api/v1/context/blocks/mcp"})}static contextControllerHandleMcpPost(t=L){return U(t,{method:"POST",url:"/api/v1/context/blocks/mcp"})}static contextControllerHandleMcpPut(t=L){return U(t,{method:"PUT",url:"/api/v1/context/blocks/mcp"})}static contextControllerHandleMcpDelete(t=L){return U(t,{method:"DELETE",url:"/api/v1/context/blocks/mcp"})}static contextControllerHandleMcpPatch(t=L){return U(t,{method:"PATCH",url:"/api/v1/context/blocks/mcp"})}static contextControllerHandleMcpOptions(t=L){return U(t,{method:"OPTIONS",url:"/api/v1/context/blocks/mcp"})}static contextControllerHandleMcpHead(t=L){return U(t,{method:"HEAD",url:"/api/v1/context/blocks/mcp"})}}class Dg{static metaControllerCreateTag(t,n=L){return U(n,{method:"POST",url:"/api/v1/meta/tags",body:t,mediaType:"application/json",errors:{400:"Invalid input data"}})}static metaControllerGetAllTags(t=L){return U(t,{method:"GET",url:"/api/v1/meta/tags"})}static metaControllerGetTagColors(t=L){return U(t,{method:"GET",url:"/api/v1/meta/tags/colors"})}static metaControllerDeleteTag(t,n=L){return U(n,{method:"DELETE",url:"/api/v1/meta/tags/{tagId}",path:{tagId:t},errors:{404:"Tag not found"}})}}class Dt{static tasksControllerCreateTask(t,n=L){return U(n,{method:"POST",url:"/api/v1/tasks/tasks",body:t,mediaType:"application/json",errors:{400:"Invalid input data"}})}static tasksControllerListTasks(t,n,r,i=1,o=20,s=L){return U(s,{method:"GET",url:"/api/v1/tasks/tasks",query:{assignee:t,sessionId:n,tag:r,page:i,limit:o}})}static tasksControllerUpdateTask(t,n,r=L){return U(r,{method:"PATCH",url:"/api/v1/tasks/tasks/{id}",path:{id:t},body:n,mediaType:"application/json",errors:{400:"Invalid input data",404:"Task not found"}})}static tasksControllerDeleteTask(t,n=L){return U(n,{method:"DELETE",url:"/api/v1/tasks/tasks/{id}",path:{id:t},errors:{404:"Task not found"}})}static tasksControllerGetTask(t,n=L){return U(n,{method:"GET",url:"/api/v1/tasks/tasks/{id}",path:{id:t},errors:{404:"Task not found"}})}static tasksControllerAssignTask(t,n,r=L){return U(r,{method:"PATCH",url:"/api/v1/tasks/tasks/{id}/assign",path:{id:t},body:n,mediaType:"application/json",errors:{400:"Invalid input data",404:"Task not found"}})}static tasksControllerAssignTaskToMe(t,n=L){return U(n,{method:"PATCH",url:"/api/v1/tasks/tasks/{id}/assign-to-me",path:{id:t},errors:{404:"Task not found"}})}static tasksControllerSearchTasks(t,n=10,r=.3,i=L){return U(i,{method:"GET",url:"/api/v1/tasks/tasks/search/query",query:{query:t,limit:n,threshold:r}})}static tasksControllerAddComment(t,n,r=L){return U(r,{method:"POST",url:"/api/v1/tasks/tasks/{id}/comments",path:{id:t},body:n,mediaType:"application/json",errors:{400:"Invalid input data",404:"Task not found"}})}static tasksControllerAddArtefact(t,n,r=L){return U(r,{method:"POST",url:"/api/v1/tasks/tasks/{id}/artefacts",path:{id:t},body:n,mediaType:"application/json",errors:{400:"Invalid input data",404:"Task not found"}})}static tasksControllerChangeStatus(t,n,r=L){return U(r,{method:"PATCH",url:"/api/v1/tasks/tasks/{id}/status",path:{id:t},body:n,mediaType:"application/json",errors:{400:"Invalid status transition or comment required",404:"Task not found"}})}static tasksControllerAddTagToTask(t,n,r=L){return U(r,{method:"POST",url:"/api/v1/tasks/tasks/{id}/tags",path:{id:t},body:n,mediaType:"application/json",errors:{400:"Invalid input data",404:"Task not found"}})}static tasksControllerRemoveTagFromTask(t,n,r=L){return U(r,{method:"DELETE",url:"/api/v1/tasks/tasks/{id}/tags/{tagId}",path:{id:t,tagId:n},errors:{404:"Task not found"}})}static tasksControllerCreateInputRequest(t,n,r=L){return U(r,{method:"POST",url:"/api/v1/tasks/tasks/{id}/input-requests",path:{id:t},body:n,mediaType:"application/json",errors:{400:"Invalid input data",404:"Task not found"}})}static tasksControllerAnswerInputRequest(t,n,r,i=L){return U(i,{method:"POST",url:"/api/v1/tasks/tasks/{id}/input-requests/{inputRequestId}/answer",path:{id:t,inputRequestId:n},body:r,mediaType:"application/json",errors:{400:"Invalid input data",404:"Input request not found"}})}static tasksControllerHandleMcpGet(t=L){return U(t,{method:"GET",url:"/api/v1/tasks/tasks/mcp"})}static tasksControllerHandleMcpPost(t=L){return U(t,{method:"POST",url:"/api/v1/tasks/tasks/mcp"})}static tasksControllerHandleMcpPut(t=L){return U(t,{method:"PUT",url:"/api/v1/tasks/tasks/mcp"})}static tasksControllerHandleMcpDelete(t=L){return U(t,{method:"DELETE",url:"/api/v1/tasks/tasks/mcp"})}static tasksControllerHandleMcpPatch(t=L){return U(t,{method:"PATCH",url:"/api/v1/tasks/tasks/mcp"})}static tasksControllerHandleMcpOptions(t=L){return U(t,{method:"OPTIONS",url:"/api/v1/tasks/tasks/mcp"})}static tasksControllerHandleMcpHead(t=L){return U(t,{method:"HEAD",url:"/api/v1/tasks/tasks/mcp"})}}class Qe{static mcpRegistryControllerCreateServer(t,n=L){return U(n,{method:"POST",url:"/api/v1/mcp/servers",body:t,mediaType:"application/json",errors:{409:"Server with providedId already exists"}})}static mcpRegistryControllerListServers(t,n,r=L){return U(r,{method:"GET",url:"/api/v1/mcp/servers",query:{page:t,limit:n}})}static mcpRegistryControllerGetServer(t,n=L){return U(n,{method:"GET",url:"/api/v1/mcp/servers/{serverId}",path:{serverId:t},errors:{404:"Server not found"}})}static mcpRegistryControllerUpdateServer(t,n,r=L){return U(r,{method:"PATCH",url:"/api/v1/mcp/servers/{serverId}",path:{serverId:t},body:n,mediaType:"application/json",errors:{404:"Server not found"}})}static mcpRegistryControllerDeleteServer(t,n=L){return U(n,{method:"DELETE",url:"/api/v1/mcp/servers/{serverId}",path:{serverId:t},errors:{404:"Server not found",409:"Server has dependencies"}})}static mcpRegistryControllerCreateScopes(t,n,r=L){return U(r,{method:"POST",url:"/api/v1/mcp/servers/{serverId}/scopes",path:{serverId:t},body:n,mediaType:"application/json",errors:{404:"Server not found",409:"Scope already exists"}})}static mcpRegistryControllerListScopes(t,n=L){return U(n,{method:"GET",url:"/api/v1/mcp/servers/{serverId}/scopes",path:{serverId:t},errors:{404:"Server not found"}})}static mcpRegistryControllerGetScope(t,n,r=L){return U(r,{method:"GET",url:"/api/v1/mcp/servers/{serverId}/scopes/{scopeId}",path:{serverId:t,scopeId:n},errors:{404:"Scope not found"}})}static mcpRegistryControllerDeleteScope(t,n,r=L){return U(r,{method:"DELETE",url:"/api/v1/mcp/servers/{serverId}/scopes/{scopeId}",path:{serverId:t,scopeId:n},errors:{404:"Scope not found",409:"Scope has mappings"}})}static mcpRegistryControllerCreateConnection(t,n,r=L){return U(r,{method:"POST",url:"/api/v1/mcp/servers/{serverId}/connections",path:{serverId:t},body:n,mediaType:"application/json",errors:{404:"Server not found",409:"Connection name conflict"}})}static mcpRegistryControllerListConnections(t,n=L){return U(n,{method:"GET",url:"/api/v1/mcp/servers/{serverId}/connections",path:{serverId:t},errors:{404:"Server not found"}})}static mcpRegistryControllerGetConnection(t,n=L){return U(n,{method:"GET",url:"/api/v1/mcp/connections/{connectionId}",path:{connectionId:t},errors:{404:"Connection not found"}})}static mcpRegistryControllerUpdateConnection(t,n,r=L){return U(r,{method:"PATCH",url:"/api/v1/mcp/connections/{connectionId}",path:{connectionId:t},body:n,mediaType:"application/json",errors:{404:"Connection not found",409:"Connection name conflict"}})}static mcpRegistryControllerDeleteConnection(t,n=L){return U(n,{method:"DELETE",url:"/api/v1/mcp/connections/{connectionId}",path:{connectionId:t},errors:{404:"Connection not found",409:"Connection has mappings"}})}static mcpRegistryControllerCreateMapping(t,n,r=L){return U(r,{method:"POST",url:"/api/v1/mcp/servers/{serverId}/mappings",path:{serverId:t},body:n,mediaType:"application/json",errors:{400:"Invalid mapping",404:"Scope or connection not found"}})}static mcpRegistryControllerListMappings(t,n,r=L){return U(r,{method:"GET",url:"/api/v1/mcp/servers/{serverId}/scopes/{scopeId}/mappings",path:{serverId:t,scopeId:n},errors:{404:"Scope not found"}})}static mcpRegistryControllerDeleteMapping(t,n=L){return U(n,{method:"DELETE",url:"/api/v1/mcp/mappings/{mappingId}",path:{mappingId:t},errors:{404:"Mapping not found"}})}}class mi{static webAuthControllerLogin(t,n=L){return U(n,{method:"POST",url:"/api/v1/auth/login",body:t,mediaType:"application/json",errors:{401:"Invalid credentials"}})}static webAuthControllerRefresh(t=L){return U(t,{method:"POST",url:"/api/v1/auth/refresh",errors:{401:"Invalid or expired refresh token"}})}static webAuthControllerLogout(t=L){return U(t,{method:"POST",url:"/api/v1/auth/logout"})}static webAuthControllerMe(t=L){return U(t,{method:"GET",url:"/api/v1/auth/me",errors:{401:"Not authenticated"}})}static webAuthControllerChangePassword(t,n=L){return U(n,{method:"POST",url:"/api/v1/auth/change-password",body:t,mediaType:"application/json",errors:{401:"Not authenticated or current password is incorrect"}})}static webAuthControllerGetOnboardingStatus(t=L){return U(t,{method:"GET",url:"/api/v1/auth/onboarding-status"})}static webAuthControllerOnboard(t,n=L){return U(n,{method:"POST",url:"/api/v1/auth/onboard",body:t,mediaType:"application/json",errors:{409:"Admin users already exist, onboarding not allowed"}})}static webAuthControllerMarkWalkthroughSeen(t=L){return U(t,{method:"POST",url:"/api/v1/auth/mark-walkthrough-seen",errors:{401:"Not authenticated"}})}}const Lg=()=>"",Fg=e=>e,hr=Lg();L.BASE=hr;L.CREDENTIALS="include";L.BASE=hr;const zg=k.createContext(void 0);function H1({children:e}){const[t,n]=k.useState(null),[r,i]=k.useState(!0);k.useEffect(()=>{mi.webAuthControllerMe().then(c=>{console.log("found me"),n(c)}).catch(()=>{console.log("not me"),n(null)}).finally(()=>{i(!1)})},[]),k.useEffect(()=>{if(!t)return;const c=setInterval(async()=>{try{const f=await mi.webAuthControllerRefresh();n(f.user)}catch(f){console.error("Token refresh failed:",f),n(null)}},8*60*1e3);return()=>clearInterval(c)},[t]);const u={user:t,isAuthenticated:!!t,isLoading:r,login:async(c,f)=>{const d=await mi.webAuthControllerLogin({email:c,password:f});n(d.user)},logout:async()=>{try{await mi.webAuthControllerLogout()}finally{n(null)}},refreshAuth:async()=>{const c=await mi.webAuthControllerRefresh();n(c.user)}};return a.jsx(zg.Provider,{value:u,children:e})}function Pc(){const e=k.useContext(zg);if(e===void 0)throw new Error("useAuth must be used within an AuthProvider");return e}function $1({children:e}){const{isAuthenticated:t,isLoading:n}=Pc(),r=Ke();return n?a.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100vh",background:"linear-gradient(135deg, #667eea 0%, #764ba2 100%)"},children:a.jsx("div",{style:{color:"white",fontSize:"18px",fontWeight:"600"},children:"Loading..."})}):t?a.jsx(a.Fragment,{children:e}):a.jsx(Ww,{to:"/login",state:{from:r},replace:!0})}function W1(){var p,y;const[e,t]=k.useState(""),[n,r]=k.useState(""),[i,o]=k.useState(""),[s,l]=k.useState(!1),{login:u}=Pc(),c=Le(),d=((y=(p=Ke().state)==null?void 0:p.from)==null?void 0:y.pathname)||"/",h=async x=>{x.preventDefault(),l(!0),o("");try{await u(e,n),c(d,{replace:!0})}catch{o("Invalid email or password")}finally{l(!1)}};return a.jsx("div",{className:"login-page",children:a.jsx("div",{className:"login-container",children:a.jsxs("div",{className:"login-card",children:[a.jsxs("div",{className:"login-header",children:[a.jsx("h1",{className:"login-title",children:"Welcome Back"}),a.jsx("p",{className:"login-subtitle",children:"Sign in to your account"})]}),a.jsxs("form",{onSubmit:h,className:"login-form",children:[a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"email",className:"form-label",children:"Email"}),a.jsx("input",{id:"email",type:"email",value:e,onChange:x=>t(x.target.value),className:"form-input",placeholder:"you@example.com",required:!0,disabled:s,autoComplete:"email"})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"password",className:"form-label",children:"Password"}),a.jsx("input",{id:"password",type:"password",value:n,onChange:x=>r(x.target.value),className:"form-input",placeholder:"••••••••",required:!0,disabled:s,autoComplete:"current-password"})]}),i&&a.jsx("div",{className:"login-error",children:i}),a.jsx("button",{type:"submit",className:"login-button",disabled:s,children:s?"Signing in...":"Sign In"})]})]})})})}function V1({collapsed:e}){const t=[{name:"Home",path:"/",icon:a.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("path",{d:"M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}),a.jsx("polyline",{points:"9 22 9 12 15 12 15 22"})]})},{name:"Agents",path:"/agents",icon:"🤖"},{name:"Tasks",path:"/tasks",icon:"📋"},{name:"Context",path:"/context",icon:"📚"},{name:"Tools",path:"/mcp-registry",icon:"🔧"}];return a.jsxs("nav",{className:"sidebar-nav-container",children:[a.jsx("div",{className:"sidebar-nav-main",children:t.map(n=>a.jsxs(lu,{to:n.path,className:({isActive:r})=>`sidebar-nav-link ${r?"active":""} ${e?"collapsed":""}`,end:n.path==="/",children:[a.jsx("div",{className:"sidebar-nav-icon",children:typeof n.icon=="string"?a.jsx("span",{children:n.icon}):n.icon}),a.jsx("span",{className:"nav-link-text",children:n.name})]},n.path))}),a.jsx("div",{className:"sidebar-nav-bottom",children:a.jsxs(lu,{to:"/logout",className:({isActive:n})=>`sidebar-nav-link ${n?"active":""} ${e?"collapsed":""}`,end:!0,children:[a.jsx("div",{className:"sidebar-nav-icon",children:a.jsx("span",{children:"🔓"})}),a.jsx("span",{className:"nav-link-text",children:"Logout"})]},"213")})]})}const q1=768;function no(){return window.innerWidth<q1}function G1(){const[e,t]=k.useState(()=>no());return k.useEffect(()=>{const n=()=>{t(no())};return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[]),e}const Jf="app-nav-collapsed";function K1(){const[e,t]=k.useState(()=>{const r=localStorage.getItem(Jf);return r!==null?r==="true":no()});k.useEffect(()=>{localStorage.setItem(Jf,String(e))},[e]);const n=()=>{t(!e)};return a.jsxs("div",{className:"root-layout",children:[a.jsxs("aside",{className:`sidebar-app-nav ${e?"collapsed":""}`,children:[a.jsx("nav",{className:"sidebar-content",children:a.jsx(V1,{collapsed:e})}),a.jsx("button",{className:"sidebar-toggle",onClick:n,"aria-label":e?"Expand sidebar":"Collapse sidebar",children:e?"→":"←"})]}),a.jsx("div",{className:"root-layout-main",children:a.jsx(bc,{})})]})}function pr(e){const t=k.useRef(null);k.useEffect(()=>(t.current=document.title,document.title=e,()=>{t.current!==null&&(document.title=t.current)}),[e])}function Q1(){pr("taico — Home");const e=[{name:"Tasks",description:"Manage and track your tasks across different stages with our Kanban board.",path:"/tasks",icon:"📋",color:"#3b82f6"},{name:"Context",description:"Create, edit, and organize your knowledge base with our wiki platform.",path:"/context",icon:"📚",color:"#10b981"},{name:"Tools",description:"Manage Model Context Protocol servers, scopes, and OAuth connections.",path:"/mcp-registry",icon:"🔧",color:"#8b5cf6"}];return a.jsx("div",{className:"home-page",children:a.jsxs("div",{className:"home-container",children:[a.jsxs("header",{className:"home-header",children:[a.jsx("h1",{className:"home-title",children:"taico"}),a.jsx("p",{className:"home-subtitle",children:"Your all-in-one platform for task management, knowledge organization, and protocol integration"})]}),a.jsx("div",{className:"apps-grid",children:e.map(t=>a.jsxs(ar,{to:t.path,className:"app-card",style:{"--app-color":t.color},children:[a.jsx("div",{className:"app-icon",children:t.icon}),a.jsx("h2",{className:"app-name",children:t.name}),a.jsx("p",{className:"app-description",children:t.description}),a.jsx("div",{className:"app-arrow",children:"→"})]},t.path))}),a.jsx("footer",{className:"home-footer",children:a.jsx("p",{children:"Built with React + TypeScript + Vite"})})]})})}const Mg=({tag:e,onRemove:t,small:n=!1})=>{const r=e.color||"#6B7280";return a.jsxs("span",{className:`tag-badge ${n?"tag-badge-small":""}`,style:{backgroundColor:r,color:"#ffffff",padding:n?"1px 4px":"2px 6px",borderRadius:"3px",fontSize:n?"0.65rem":"0.7rem",fontWeight:"500",display:"inline-flex",alignItems:"center",gap:"2px",marginRight:"4px",marginBottom:"4px"},children:[e.name,t&&a.jsx("button",{onClick:i=>{i.stopPropagation(),t()},style:{background:"none",border:"none",color:"white",cursor:"pointer",padding:"0",marginLeft:"1px",fontSize:n?"0.75rem":"0.85rem",lineHeight:"1"},"aria-label":`Remove ${e.name} tag`,children:"×"})]})};function Y1({task:e,onClick:t}){var i,o;const n=s=>{const l=new Date(s);return(new Date().getTime()-l.getTime())/(1e3*60*60)<24?l.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0}):l.toLocaleDateString("en-US",{month:"short",day:"numeric"})},r=((i=e.comments)==null?void 0:i.length)??0;return a.jsxs("div",{className:"task-card",onClick:t,children:[a.jsx("h3",{className:"task-card-title",children:e.name}),a.jsx("p",{className:"task-card-description",children:e.description}),e.tags&&e.tags.length>0&&a.jsx("div",{style:{marginTop:"8px",marginBottom:"8px"},children:e.tags.map(s=>a.jsx(Mg,{tag:s,small:!0},s.name))}),a.jsx("div",{className:"task-card-divider"}),a.jsxs("div",{className:"task-card-footer",children:[a.jsxs("div",{className:"task-card-assignee",children:[e.assignee?a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"assignee-emoji",children:"👤"}),a.jsx("span",{className:"assignee-name",children:((o=e.assigneeActor)==null?void 0:o.displayName)||"unassigned"})]}):a.jsx("span",{className:"unassigned-text",children:"Unassigned"}),r>0?a.jsxs("span",{className:"comment-count","aria-label":`${r} comments`,children:["💬 ",r]}):null]}),a.jsx("div",{className:"task-card-date",children:n(e.updatedAt)})]})]})}L.BASE=hr;function Bg(){const[e,t]=k.useState([]),n=k.useCallback((i,o="info")=>{const s=Date.now();t(l=>[...l,{id:s,message:i,type:o}])},[]),r=k.useCallback(i=>{t(o=>o.filter(s=>s.id!==i))},[]);return{toasts:e,showToast:n,removeToast:r}}function Ug({message:e,type:t="info",onClose:n,duration:r=3e3}){return k.useEffect(()=>{const i=setTimeout(n,r);return()=>clearTimeout(i)},[n,r]),a.jsxs("div",{className:`toast toast-${t}`,children:[a.jsx("span",{children:e}),a.jsx("button",{onClick:n,className:"toast-close","aria-label":"Close",children:"×"})]})}const Oc=({value:e,onChange:t,placeholder:n="Type to add tags..."})=>{const[r,i]=k.useState(""),[o,s]=k.useState([]),[l,u]=k.useState(!1),[c,f]=k.useState(-1),[d,h]=k.useState([]),p=k.useRef(null),y=k.useRef(null);k.useEffect(()=>{(async()=>{try{const v=await Dg.metaControllerGetAllTags();h(v)}catch(v){console.error("Failed to load tags:",v)}})()},[]),k.useEffect(()=>{const v=setTimeout(()=>{if(r.trim().length>0){const b=r.trim().toLowerCase(),j=d.filter(E=>E.name.toLowerCase().includes(b)&&!e.includes(E.name));s(j),u(!0)}else s([]),u(!1)},150);return()=>clearTimeout(v)},[r,e,d]),k.useEffect(()=>{const m=v=>{y.current&&!y.current.contains(v.target)&&u(!1)};return document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)},[]);const x=m=>{var b;const v=m.trim();v&&!e.includes(v)&&t([...e,v]),i(""),s([]),u(!1),f(-1),(b=p.current)==null||b.focus()},S=m=>{t(e.filter(v=>v!==m))},g=m=>{m.key==="Tab"&&r.trim()||m.key==="Enter"&&r.trim()?(m.preventDefault(),c>=0&&o[c]?x(o[c].name):x(r)):m.key==="ArrowDown"?(m.preventDefault(),f(v=>v<o.length-1?v+1:v)):m.key==="ArrowUp"?(m.preventDefault(),f(v=>v>0?v-1:-1)):m.key==="Escape"?(u(!1),f(-1)):m.key==="Backspace"&&!r&&e.length>0&&t(e.slice(0,-1))};return a.jsxs("div",{ref:y,style:{position:"relative"},children:[a.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:"4px",padding:"6px",border:"1px solid #ddd",borderRadius:"4px",minHeight:"38px",cursor:"text"},onClick:()=>{var m;return(m=p.current)==null?void 0:m.focus()},children:[e.map(m=>{const v=d.find(j=>j.name===m),b=(v==null?void 0:v.color)||"#3B82F6";return a.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:"2px",backgroundColor:b,color:"white",padding:"2px 6px",borderRadius:"3px",fontSize:"0.7rem",fontWeight:"500"},children:[m,a.jsx("button",{type:"button",onClick:j=>{j.stopPropagation(),S(m)},style:{background:"none",border:"none",color:"white",cursor:"pointer",padding:"0",marginLeft:"1px",fontSize:"0.85rem",lineHeight:"1"},children:"×"})]},m)}),a.jsx("input",{ref:p,type:"text",value:r,onChange:m=>i(m.target.value),onKeyDown:g,onFocus:()=>r&&u(!0),placeholder:e.length===0?n:"",style:{flex:"1",minWidth:"120px",border:"none",outline:"none",fontSize:"0.875rem",padding:"2px"}})]}),l&&o.length>0&&a.jsx("div",{style:{position:"absolute",top:"100%",left:0,right:0,backgroundColor:"white",border:"1px solid #ddd",borderRadius:"4px",marginTop:"2px",maxHeight:"200px",overflowY:"auto",boxShadow:"0 4px 6px rgba(0, 0, 0, 0.1)",zIndex:1e3},children:o.map((m,v)=>a.jsxs("div",{onClick:()=>x(m.name),style:{padding:"8px 12px",cursor:"pointer",backgroundColor:v===c?"#EFF6FF":"white",display:"flex",alignItems:"center",gap:"8px"},onMouseEnter:()=>f(v),children:[a.jsx("span",{style:{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:m.color||"#6B7280"}}),a.jsx("span",{style:{fontSize:"0.875rem"},children:m.name})]},m.name))}),l&&r&&o.length===0&&a.jsxs("div",{style:{position:"absolute",top:"100%",left:0,right:0,backgroundColor:"white",border:"1px solid #ddd",borderRadius:"4px",marginTop:"2px",padding:"8px 12px",boxShadow:"0 4px 6px rgba(0, 0, 0, 0.1)",zIndex:1e3,fontSize:"0.875rem",color:"#6B7280"},children:['Press Tab or Enter to create "',r,'"']})]})};function X1({key:e,defaultValue:t,debounceMs:n=500}){const[r,i]=k.useState(()=>{try{const l=localStorage.getItem(e);if(l)return JSON.parse(l)}catch(l){console.error("Error loading draft from localStorage:",l)}return t}),o=k.useRef(void 0);return k.useEffect(()=>(o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{try{localStorage.setItem(e,JSON.stringify(r))}catch(l){console.error("Error saving draft to localStorage:",l)}},n),()=>{o.current&&clearTimeout(o.current)}),[r,e,n]),[r,i,()=>{try{localStorage.removeItem(e),i(t)}catch(l){console.error("Error clearing draft from localStorage:",l)}}]}const J1={name:"",description:"",assignee:"",sessionId:"",tagNames:[],dependsOnIds:[]};function Z1({onClose:e}){const{toasts:t,showToast:n,removeToast:r}=Bg(),[i,o,s]=X1({key:"create-task-draft",defaultValue:J1}),[l,u]=k.useState(!1),{name:c,description:f,assignee:d,sessionId:h,tagNames:p,dependsOnIds:y}=i,x=(g,m)=>{o({...i,[g]:m})};k.useEffect(()=>{const g=m=>{m.key==="Escape"&&e()};return window.addEventListener("keydown",g),()=>window.removeEventListener("keydown",g)},[e]);const S=async g=>{var m;g.preventDefault(),u(!0);try{await Dt.tasksControllerCreateTask({name:c,description:f,...d&&{assignee:d},...h&&{sessionId:h},...p.length>0&&{tagNames:p},...y.length>0&&{dependsOnIds:y}}),s(),e()}catch(v){const b=((m=v==null?void 0:v.body)==null?void 0:m.detail)||(v==null?void 0:v.message)||"Failed to create task";n(`Error: ${b}`,"error"),console.error(v)}finally{u(!1)}};return a.jsx("div",{className:"modal-overlay",onClick:e,children:a.jsxs("div",{className:"modal-content",onClick:g=>g.stopPropagation(),children:[a.jsxs("div",{className:"modal-header",children:[a.jsx("h2",{children:"Create New Task"}),a.jsx("button",{onClick:e,className:"btn-close",children:"×"})]}),a.jsxs("form",{onSubmit:S,children:[a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"name",children:"Title *"}),a.jsx("input",{id:"name",type:"text",value:c,onChange:g=>x("name",g.target.value),required:!0,placeholder:"Enter task name"})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"description",children:"Description *"}),a.jsx("textarea",{id:"description",value:f,onChange:g=>x("description",g.target.value),required:!0,placeholder:"Enter task description",rows:4})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"assignee",children:"Assigned to"}),a.jsx("input",{id:"assignee",type:"text",value:d,onChange:g=>x("assignee",g.target.value),placeholder:"Agent name or assignee"})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"sessionId",children:"Session ID"}),a.jsx("input",{id:"sessionId",type:"text",value:h,onChange:g=>x("sessionId",g.target.value),placeholder:"Agent session ID"})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"tags",children:"Tags"}),a.jsx(Oc,{value:p,onChange:g=>x("tagNames",g),placeholder:"Type to add tags..."})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"dependsOn",children:"Depends On (Task IDs)"}),a.jsx("input",{id:"dependsOn",type:"text",value:y.join(", "),onChange:g=>x("dependsOnIds",g.target.value.split(",").map(m=>m.trim()).filter(m=>m)),placeholder:"Enter task IDs separated by commas"})]}),a.jsxs("div",{className:"form-actions",children:[a.jsx("button",{type:"button",onClick:e,className:"btn-secondary",children:"Cancel"}),a.jsx("button",{type:"submit",className:"btn-primary",disabled:l,children:l?"Creating...":"Create Task"})]})]}),t.map(g=>a.jsx(Ug,{message:g.message,type:g.type,onClose:()=>r(g.id)},g.id))]})})}const re=uu.status;function Hg({task:e,onClose:t,onUpdate:n}){var R,N,P,V;const[r,i]=k.useState(e.description),[o,s]=k.useState((R=e.assigneeActor)==null?void 0:R.id),[l,u]=k.useState(e.sessionId||""),[c,f]=k.useState(((N=e.tags)==null?void 0:N.map($=>$.name))||[]),[d,h]=k.useState(""),[p,y]=k.useState(""),[x,S]=k.useState(!1),[g,m]=k.useState("");k.useEffect(()=>{const $=H=>{H.key==="Escape"&&t()};return document.addEventListener("keydown",$),()=>{document.removeEventListener("keydown",$)}},[t]);const v=async()=>{var $;if(r!==e.description)try{const H=await Dt.tasksControllerUpdateTask(e.id,{description:r});n(H),m("")}catch(H){console.error("Failed to update task:",H);const G=(($=H==null?void 0:H.body)==null?void 0:$.detail)||(H==null?void 0:H.message)||"Failed to update description";m(G)}},b=async()=>{console.log("NOT IMPLEMENTED - ASSIGNEE STRUCTURE CHANGED")},j=async()=>{var $;if(d.trim())try{await Dt.tasksControllerAddComment(e.id,{content:d});const H=await Dt.tasksControllerGetTask(e.id);n(H),h(""),m("")}catch(H){console.error("Failed to add comment:",H);const G=(($=H==null?void 0:H.body)==null?void 0:$.detail)||(H==null?void 0:H.message)||"Failed to add comment";m(G)}},E=async $=>{var H;try{const G={status:$};$===re.DONE&&p.trim()&&(G.comment=p);const F=await Dt.tasksControllerChangeStatus(e.id,G);n(F),y(""),m("")}catch(G){console.error("Failed to change status:",G);const F=((H=G==null?void 0:G.body)==null?void 0:H.detail)||(G==null?void 0:G.message)||"Failed to change status";m(F)}},_=async()=>{var $;try{await Dt.tasksControllerDeleteTask(e.id),t()}catch(H){console.error("Failed to delete task:",H);const G=(($=H==null?void 0:H.body)==null?void 0:$.detail)||(H==null?void 0:H.message)||"Failed to delete task";m(G)}},O=async $=>{var H,G;f($);try{const F=await Dt.tasksControllerUpdateTask(e.id,{tagNames:$});n(F),m("")}catch(F){console.error("Failed to update tags:",F);const D=((H=F==null?void 0:F.body)==null?void 0:H.detail)||(F==null?void 0:F.message)||"Failed to update tags";m(D),f(((G=e.tags)==null?void 0:G.map(C=>C.name))||[])}};return a.jsx("div",{className:"modal-overlay",onClick:t,children:a.jsxs("div",{className:"modal-content task-detail",onClick:$=>$.stopPropagation(),children:[a.jsxs("div",{className:"modal-header",children:[a.jsx("h2",{children:e.name}),a.jsx("button",{onClick:t,className:"btn-close",children:"×"})]}),a.jsxs("div",{className:"detail-section",children:[a.jsx("h3",{children:"Description"}),a.jsx("textarea",{value:r,onChange:$=>i($.target.value),onBlur:v,placeholder:"Enter task description...",className:"description-textarea"})]}),a.jsxs("div",{className:"detail-section",children:[a.jsx("h3",{children:"Status"}),g&&a.jsxs("div",{className:"error-message",children:[a.jsx("strong",{children:"Error:"})," ",g]}),a.jsxs("div",{className:"status-buttons",children:[a.jsx("button",{onClick:()=>E(re.NOT_STARTED),className:`status-btn ${e.status===re.NOT_STARTED?"active status-not-started":""}`,children:"Not Started"}),a.jsx("button",{onClick:()=>E(re.IN_PROGRESS),className:`status-btn ${e.status===re.IN_PROGRESS?"active status-in-progress":""}`,children:"In Progress"}),a.jsx("button",{onClick:()=>E(re.FOR_REVIEW),className:`status-btn ${e.status===re.FOR_REVIEW?"active status-for-review":""}`,children:"For Review"}),a.jsx("button",{onClick:()=>E(re.DONE),className:`status-btn ${e.status===re.DONE?"active status-done":""}`,children:"Done"})]})]}),a.jsxs("div",{className:"detail-section",children:[a.jsx("h3",{children:"Assignee & Session"}),a.jsxs("div",{className:"assignee-form",children:[a.jsxs("div",{className:"form-row",children:[a.jsxs("div",{className:"form-field",children:[a.jsx("label",{children:"Assignee"}),a.jsx("input",{type:"text",value:e.assignee?`@${e.assignee}`:"@",onChange:$=>s($.target.value),placeholder:"Enter assignee name"})]}),a.jsxs("div",{className:"form-field",children:[a.jsx("label",{children:"Session ID"}),a.jsx("input",{type:"text",value:l,onChange:$=>u($.target.value),placeholder:"Enter session ID"})]})]}),a.jsx("button",{onClick:b,className:"btn-primary",children:"Update Assignment"})]})]}),a.jsxs("div",{className:"detail-section",children:[a.jsx("h3",{children:"Tags"}),a.jsx(Oc,{value:c,onChange:O,placeholder:"Type to add tags..."})]}),a.jsxs("div",{className:"detail-section",children:[a.jsx("h3",{children:"Task Info"}),a.jsxs("div",{className:"task-info-grid",children:[a.jsxs("div",{className:"info-item",children:[a.jsx("label",{children:"Created By"}),a.jsxs("span",{children:["@",e.createdByActor.slug]})]}),e.dependsOnIds&&e.dependsOnIds.length>0&&a.jsxs("div",{className:"info-item",children:[a.jsx("label",{children:"Depends On"}),a.jsx("div",{className:"dependency-list",children:e.dependsOnIds.map($=>a.jsx("span",{className:"dependency-id",children:$},$))})]})]})]}),a.jsxs("div",{className:"detail-section",children:[a.jsxs("h3",{children:["Comments (",((P=e.comments)==null?void 0:P.length)||0,")"]}),a.jsx("div",{className:"comments-list",children:(V=e.comments)==null?void 0:V.map($=>a.jsxs("div",{className:"comment",children:[a.jsx("strong",{children:$.commenterName}),a.jsx("p",{children:$.content}),a.jsx("span",{className:"comment-date",children:new Date($.createdAt).toLocaleString()})]},$.id))}),a.jsxs("div",{className:"add-comment",children:[a.jsx("textarea",{placeholder:"Add a comment...",value:d,onChange:$=>h($.target.value),rows:3}),a.jsx("button",{onClick:j,className:"btn-primary",children:"Add Comment"})]})]}),a.jsx("div",{className:"detail-section",children:a.jsxs("div",{className:"task-actions",children:[e.status===re.FOR_REVIEW&&a.jsxs("div",{className:"review-shortcuts",children:[a.jsx("button",{onClick:()=>E(re.DONE),className:"btn-review-done",children:"✓ Done"}),a.jsx("button",{onClick:()=>E(re.IN_PROGRESS),className:"btn-review-needs-work",children:"← Needs work"})]}),x?a.jsxs("div",{className:"delete-confirm",children:[a.jsx("button",{onClick:_,className:"btn-danger",children:"Confirm Delete"}),a.jsx("button",{onClick:()=>S(!1),className:"btn-secondary",children:"Cancel"})]}):a.jsx("button",{onClick:()=>S(!0),className:"btn-danger",children:"Delete Task"})]})})]})})}function ro(){return a.jsx(ar,{to:"/",className:"home-link",title:"Back to Home",children:a.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("path",{d:"M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}),a.jsx("polyline",{points:"9 22 9 12 15 12 15 22"})]})})}const Zt=Object.create(null);Zt.open="0";Zt.close="1";Zt.ping="2";Zt.pong="3";Zt.message="4";Zt.upgrade="5";Zt.noop="6";const ss=Object.create(null);Object.keys(Zt).forEach(e=>{ss[Zt[e]]=e});const cu={type:"error",data:"parser error"},$g=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Wg=typeof ArrayBuffer=="function",Vg=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Dc=({type:e,data:t},n,r)=>$g&&t instanceof Blob?n?r(t):Zf(t,r):Wg&&(t instanceof ArrayBuffer||Vg(t))?n?r(t):Zf(new Blob([t]),r):r(Zt[e]+(t||"")),Zf=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function eh(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Kl;function e0(e,t){if($g&&e.data instanceof Blob)return e.data.arrayBuffer().then(eh).then(t);if(Wg&&(e.data instanceof ArrayBuffer||Vg(e.data)))return t(eh(e.data));Dc(e,!1,n=>{Kl||(Kl=new TextEncoder),t(Kl.encode(n))})}const th="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ci=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<th.length;e++)Ci[th.charCodeAt(e)]=e;const t0=e=>{let t=e.length*.75,n=e.length,r,i=0,o,s,l,u;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const c=new ArrayBuffer(t),f=new Uint8Array(c);for(r=0;r<n;r+=4)o=Ci[e.charCodeAt(r)],s=Ci[e.charCodeAt(r+1)],l=Ci[e.charCodeAt(r+2)],u=Ci[e.charCodeAt(r+3)],f[i++]=o<<2|s>>4,f[i++]=(s&15)<<4|l>>2,f[i++]=(l&3)<<6|u&63;return c},n0=typeof ArrayBuffer=="function",Lc=(e,t)=>{if(typeof e!="string")return{type:"message",data:qg(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:r0(e.substring(1),t)}:ss[n]?e.length>1?{type:ss[n],data:e.substring(1)}:{type:ss[n]}:cu},r0=(e,t)=>{if(n0){const n=t0(e);return qg(n,t)}else return{base64:!0,data:e}},qg=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},Gg="",i0=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,s)=>{Dc(o,!1,l=>{r[s]=l,++i===n&&t(r.join(Gg))})})},o0=(e,t)=>{const n=e.split(Gg),r=[];for(let i=0;i<n.length;i++){const o=Lc(n[i],t);if(r.push(o),o.type==="error")break}return r};function s0(){return new TransformStream({transform(e,t){e0(e,n=>{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const o=new DataView(i.buffer);o.setUint8(0,126),o.setUint16(1,r)}else{i=new Uint8Array(9);const o=new DataView(i.buffer);o.setUint8(0,127),o.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let Ql;function Mo(e){return e.reduce((t,n)=>t+n.length,0)}function Bo(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function l0(e,t){Ql||(Ql=new TextDecoder);const n=[];let r=0,i=-1,o=!1;return new TransformStream({transform(s,l){for(n.push(s);;){if(r===0){if(Mo(n)<1)break;const u=Bo(n,1);o=(u[0]&128)===128,i=u[0]&127,i<126?r=3:i===126?r=1:r=2}else if(r===1){if(Mo(n)<2)break;const u=Bo(n,2);i=new DataView(u.buffer,u.byteOffset,u.length).getUint16(0),r=3}else if(r===2){if(Mo(n)<8)break;const u=Bo(n,8),c=new DataView(u.buffer,u.byteOffset,u.length),f=c.getUint32(0);if(f>Math.pow(2,21)-1){l.enqueue(cu);break}i=f*Math.pow(2,32)+c.getUint32(4),r=3}else{if(Mo(n)<i)break;const u=Bo(n,i);l.enqueue(Lc(o?u:Ql.decode(u),t)),r=0}if(i===0||i>e){l.enqueue(cu);break}}}})}const Kg=4;function be(e){if(e)return a0(e)}function a0(e){for(var t in be.prototype)e[t]=be.prototype[t];return e}be.prototype.on=be.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};be.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};be.prototype.off=be.prototype.removeListener=be.prototype.removeAllListeners=be.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+e],this};be.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this};be.prototype.emitReserved=be.prototype.emit;be.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};be.prototype.hasListeners=function(e){return!!this.listeners(e).length};const sl=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),xt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),u0="arraybuffer";function Qg(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const c0=xt.setTimeout,d0=xt.clearTimeout;function ll(e,t){t.useNativeTimers?(e.setTimeoutFn=c0.bind(xt),e.clearTimeoutFn=d0.bind(xt)):(e.setTimeoutFn=xt.setTimeout.bind(xt),e.clearTimeoutFn=xt.clearTimeout.bind(xt))}const f0=1.33;function h0(e){return typeof e=="string"?p0(e):Math.ceil((e.byteLength||e.size)*f0)}function p0(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function Yg(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function m0(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function g0(e){let t={},n=e.split("&");for(let r=0,i=n.length;r<i;r++){let o=n[r].split("=");t[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return t}class y0 extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Fc extends be{constructor(t){super(),this.writable=!1,ll(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new y0(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=Lc(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=m0(t);return n.length?"?"+n:""}}class x0 extends Fc{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};o0(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,i0(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=Yg()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let Xg=!1;try{Xg=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const v0=Xg;function k0(){}class w0 extends x0{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Jt extends be{constructor(t,n,r){super(),this.createRequest=t,ll(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=Qg(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this._opts.extraHeaders[i])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document<"u"&&(this._index=Jt.requestsCount++,Jt.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=k0,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Jt.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Jt.requestsCount=0;Jt.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",nh);else if(typeof addEventListener=="function"){const e="onpagehide"in xt?"pagehide":"unload";addEventListener(e,nh,!1)}}function nh(){for(let e in Jt.requests)Jt.requests.hasOwnProperty(e)&&Jt.requests[e].abort()}const S0=function(){const e=Jg({xdomain:!1});return e&&e.responseType!==null}();class C0 extends w0{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=S0&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Jt(Jg,this.uri(),t)}}function Jg(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||v0))return new XMLHttpRequest}catch{}if(!t)try{return new xt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Zg=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class E0 extends Fc{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=Zg?{}:Qg(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;Dc(r,this.supportsBinary,o=>{try{this.doWrite(r,o)}catch{}i&&sl(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=Yg()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Yl=xt.WebSocket||xt.MozWebSocket;class N0 extends E0{createSocket(t,n,r){return Zg?new Yl(t,n,r):n?new Yl(t,n):new Yl(t)}doWrite(t,n){this.ws.send(n)}}class b0 extends Fc{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=l0(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=s0();i.readable.pipeTo(t.writable),this._writer=i.writable.getWriter();const o=()=>{r.read().then(({done:l,value:u})=>{l||(this.onPacket(u),o())}).catch(l=>{})};o();const s={type:"open"};this.query.sid&&(s.data=`{"sid":"${this.query.sid}"}`),this._writer.write(s).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;this._writer.write(r).then(()=>{i&&sl(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const T0={websocket:N0,webtransport:b0,polling:C0},j0=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,_0=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function du(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=j0.exec(e||""),o={},s=14;for(;s--;)o[_0[s]]=i[s]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=I0(o,o.path),o.queryKey=A0(o,o.query),o}function I0(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function A0(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}const fu=typeof addEventListener=="function"&&typeof removeEventListener=="function",ls=[];fu&&addEventListener("offline",()=>{ls.forEach(e=>e())},!1);class zn extends be{constructor(t,n){if(super(),this.binaryType=u0,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=du(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=du(n.host).host);ll(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const i=r.prototype.name;this.transports.push(i),this._transportsByName[i]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=g0(this.opts.query)),fu&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},ls.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=Kg,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&zn.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",zn.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const i=this.writeBuffer[r].data;if(i&&(n+=h0(i)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,sl(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(zn.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),fu&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=ls.indexOf(this._offlineEventListener);r!==-1&&ls.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}zn.protocol=Kg;class R0 extends zn{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;zn.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",d=>{if(!r)if(d.type==="pong"&&d.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;zn.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(f(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const h=new Error("probe error");h.transport=n.name,this.emitReserved("upgradeError",h)}}))};function o(){r||(r=!0,f(),n.close(),n=null)}const s=d=>{const h=new Error("probe error: "+d);h.transport=n.name,o(),this.emitReserved("upgradeError",h)};function l(){s("transport closed")}function u(){s("socket closed")}function c(d){n&&d.name!==n.name&&o()}const f=()=>{n.removeListener("open",i),n.removeListener("error",s),n.removeListener("close",l),this.off("close",u),this.off("upgrading",c)};n.once("open",i),n.once("error",s),n.once("close",l),this.once("close",u),this.once("upgrading",c),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let P0=class extends R0{constructor(t,n={}){const r=typeof t=="object"?t:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(i=>T0[i]).filter(i=>!!i)),super(t,r)}};function O0(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=du(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const o=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+o+":"+r.port+t,r.href=r.protocol+"://"+o+(n&&n.port===r.port?"":":"+r.port),r}const D0=typeof ArrayBuffer=="function",L0=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,ey=Object.prototype.toString,F0=typeof Blob=="function"||typeof Blob<"u"&&ey.call(Blob)==="[object BlobConstructor]",z0=typeof File=="function"||typeof File<"u"&&ey.call(File)==="[object FileConstructor]";function zc(e){return D0&&(e instanceof ArrayBuffer||L0(e))||F0&&e instanceof Blob||z0&&e instanceof File}function as(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(as(e[n]))return!0;return!1}if(zc(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return as(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&as(e[n]))return!0;return!1}function M0(e){const t=[],n=e.data,r=e;return r.data=hu(n,t),r.attachments=t.length,{packet:r,buffers:t}}function hu(e,t){if(!e)return e;if(zc(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=hu(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=hu(e[r],t));return n}return e}function B0(e,t){return e.data=pu(e.data,t),delete e.attachments,e}function pu(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=pu(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=pu(e[n],t));return e}const U0=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var ne;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(ne||(ne={}));class H0{constructor(t){this.replacer=t}encode(t){return(t.type===ne.EVENT||t.type===ne.ACK)&&as(t)?this.encodeAsBinary({type:t.type===ne.EVENT?ne.BINARY_EVENT:ne.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===ne.BINARY_EVENT||t.type===ne.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=M0(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}class Mc extends be{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof t=="function"?{reviver:t}:t)}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===ne.BINARY_EVENT;r||n.type===ne.BINARY_ACK?(n.type=r?ne.EVENT:ne.ACK,this.reconstructor=new $0(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(zc(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(ne[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===ne.BINARY_EVENT||r.type===ne.BINARY_ACK){const o=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const s=t.substring(o,n);if(s!=Number(s)||t.charAt(n)!=="-")throw new Error("Illegal attachments");const l=Number(s);if(!W0(l)||l<0)throw new Error("Illegal attachments");if(l>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=l}if(t.charAt(n+1)==="/"){const o=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(o,n)}else r.nsp="/";const i=t.charAt(n+1);if(i!==""&&Number(i)==i){const o=n+1;for(;++n;){const s=t.charAt(n);if(s==null||Number(s)!=s){--n;break}if(n===t.length)break}r.id=Number(t.substring(o,n+1))}if(t.charAt(++n)){const o=this.tryParse(t.substr(n));if(Mc.isPayloadValid(r.type,o))r.data=o;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case ne.CONNECT:return rh(n);case ne.DISCONNECT:return n===void 0;case ne.CONNECT_ERROR:return typeof n=="string"||rh(n);case ne.EVENT:case ne.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&U0.indexOf(n[0])===-1);case ne.ACK:case ne.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class $0{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=B0(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const W0=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function rh(e){return Object.prototype.toString.call(e)==="[object Object]"}const V0=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Mc,Encoder:H0,get PacketType(){return ne}},Symbol.toStringTag,{value:"Module"}));function Pt(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const q0=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class ty extends be{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Pt(t,"open",this.onopen.bind(this)),Pt(t,"packet",this.onpacket.bind(this)),Pt(t,"error",this.onerror.bind(this)),Pt(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,i,o;if(q0.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const s={type:ne.EVENT,data:n};if(s.options={},s.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const f=this.ids++,d=n.pop();this._registerAckCallback(f,d),s.id=f}const l=(i=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||i===void 0?void 0:i.writable,u=this.connected&&!(!((o=this.io.engine)===null||o===void 0)&&o._hasPingExpired());return this.flags.volatile&&!l||(u?(this.notifyOutgoingListeners(s),this.packet(s)):this.sendBuffer.push(s)),this.flags={},this}_registerAckCallback(t,n){var r;const i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[t]=n;return}const o=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let l=0;l<this.sendBuffer.length;l++)this.sendBuffer[l].id===t&&this.sendBuffer.splice(l,1);n.call(this,new Error("operation has timed out"))},i),s=(...l)=>{this.io.clearTimeoutFn(o),n.apply(this,l)};s.withError=!0,this.acks[t]=s}emitWithAck(t,...n){return new Promise((r,i)=>{const o=(s,l)=>s?i(s):r(l);o.withError=!0,n.push(o),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...o)=>(this._queue[0],i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...o)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:ne.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case ne.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case ne.EVENT:case ne.BINARY_EVENT:this.onevent(t);break;case ne.ACK:case ne.BINARY_ACK:this.onack(t);break;case ne.DISCONNECT:this.ondisconnect();break;case ne.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:ne.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:ne.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function ti(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}ti.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};ti.prototype.reset=function(){this.attempts=0};ti.prototype.setMin=function(e){this.ms=e};ti.prototype.setMax=function(e){this.max=e};ti.prototype.setJitter=function(e){this.jitter=e};class mu extends be{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,ll(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new ti({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||V0;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new P0(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=Pt(n,"open",function(){r.onopen(),t&&t()}),o=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),t?t(l):this.maybeReconnectOnOpen()},s=Pt(n,"error",o);if(this._timeout!==!1){const l=this._timeout,u=this.setTimeoutFn(()=>{i(),o(new Error("timeout")),n.close()},l);this.opts.autoUnref&&u.unref(),this.subs.push(()=>{this.clearTimeoutFn(u)})}return this.subs.push(i),this.subs.push(s),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Pt(t,"ping",this.onping.bind(this)),Pt(t,"data",this.ondata.bind(this)),Pt(t,"error",this.onerror.bind(this)),Pt(t,"close",this.onclose.bind(this)),Pt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){sl(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new ty(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const gi={};function Oi(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=O0(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,s=gi[i]&&o in gi[i].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||s;let u;return l?u=new mu(r,t):(gi[i]||(gi[i]=new mu(r,t)),u=gi[i]),n.query&&!t.query&&(t.query=n.queryKey),u.socket(n.path,t)}Object.assign(Oi,{Manager:mu,Socket:ty,io:Oi,connect:Oi});const G0=Fg("/tasks"),ny=()=>{const[e,t]=k.useState(!1),[n,r]=k.useState(null),[i,o]=k.useState([]),[s,l]=k.useState(null),[u,c]=k.useState(!1);k.useEffect(()=>(d(),h(),()=>{s&&s.disconnect()}),[]);const f=p=>[...p].sort((y,x)=>{const S=new Date(y.updatedAt).getTime();return new Date(x.updatedAt).getTime()-S}),d=async()=>{t(!0),r(null);try{const p=await Dt.tasksControllerListTasks();o(f(p.items))}catch(p){r(p instanceof Error?p.message:"Failed to load tasks")}finally{t(!1)}},h=()=>{const p=Oi(G0,{transports:["websocket","polling"],withCredentials:!0});return p.on("connect",()=>{console.log("Connected to websocket"),p.emit("tasks.subscribe",{},y=>{y.ok?(console.log(y),console.log("Subscribed to room:",y.room),c(!0)):(console.error("Failed to subscribe to room"),c(!1))}),d()}),p.on("disconnect",()=>{console.log("WebSocket disconnected"),c(!1)}),p.on("task.created",y=>{o(x=>x.some(S=>S.id===y.id)?x:f([y,...x]))}),p.on("task.updated",y=>{o(x=>f(x.map(S=>S.id===y.id?y:S)))}),p.on("task.deleted",({taskId:y})=>{o(x=>x.filter(S=>S.id!==y))}),p.on("task.assigned",y=>{o(x=>f(x.map(S=>S.id===y.id?y:S)))}),p.on("task.commented",async y=>{try{const x=await Dt.tasksControllerGetTask(y.taskId);o(S=>S.findIndex(m=>m.id===x.id)===-1?f([x,...S]):f(S.map(m=>m.id===x.id?x:m)))}catch(x){console.error("Failed to refresh task after comment",x)}}),p.on("input.request.answered",async y=>{try{const x=await Dt.tasksControllerGetTask(y.taskId);o(S=>S.findIndex(m=>m.id===x.id)===-1?f([x,...S]):f(S.map(m=>m.id===x.id?x:m)))}catch(x){console.error("Failed to refresh task after input request answer",x)}}),p.on("task.status_changed",y=>{o(x=>f(x.map(S=>S.id===y.id?y:S)))}),l(p),()=>{p.close()}};return{isLoading:e,error:n,tasks:i,isConnected:u}};function K0(){const{tasks:e,isConnected:t}=ny(),[n,r]=k.useState(null),[i,o]=k.useState(!1);pr("Tasks");const s={[re.NOT_STARTED]:e.filter(l=>l.status===re.NOT_STARTED),[re.IN_PROGRESS]:e.filter(l=>l.status===re.IN_PROGRESS),[re.FOR_REVIEW]:e.filter(l=>l.status===re.FOR_REVIEW),[re.DONE]:e.filter(l=>l.status===re.DONE)};return a.jsxs("div",{className:"task-board",children:[a.jsxs("div",{className:"task-board-header",children:[a.jsxs("div",{children:[a.jsx("h1",{children:"Tasks"}),a.jsx("p",{className:"subtitle",children:"Manage and track your tasks across different stages"})]}),a.jsxs("div",{className:"header-actions",children:[a.jsx(ro,{}),a.jsx("span",{className:`status-indicator ${t?"connected":"disconnected"}`,children:t?"● Connected":"○ Disconnected"})]})]}),a.jsx("div",{className:"kanban-board",children:Object.entries(s).map(([l,u])=>a.jsxs("div",{className:`kanban-column column-${l.replace(" ","-")}`,children:[a.jsxs("div",{className:"column-header",children:[a.jsx("h2",{children:l.toUpperCase()}),a.jsx("span",{className:"task-count",children:u.length})]}),a.jsxs("div",{className:"column-content",children:[l===re.NOT_STARTED&&a.jsx("button",{onClick:()=>o(!0),className:"btn-add-task",children:"+ Add New Task"}),u.map(c=>a.jsx(Y1,{task:c,onClick:()=>r(c)},c.id))]})]},l))}),i&&a.jsx(Z1,{onClose:()=>o(!1)}),n&&a.jsx(Hg,{task:n,onClose:()=>r(null),onUpdate:l=>r(l)})]})}function Q0(){const[e,t]=k.useState(!1),n=Ke(),r=()=>t(!e),i=()=>t(!1),o=[{name:"Home",path:"/",icon:a.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("path",{d:"M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}),a.jsx("polyline",{points:"9 22 9 12 15 12 15 22"})]}),color:"#8e8e93"},{name:"Tasks",path:"/tasks",icon:"📋",color:"#3b82f6"},{name:"Context",path:"/context",icon:"📚",color:"#10b981"},{name:"Tools",path:"/mcp-registry",icon:"🔧",color:"#8b5cf6"},{name:"Logout",path:"/logout",icon:"🔒"}];return a.jsxs(a.Fragment,{children:[a.jsx("button",{className:"hamburger-button",onClick:r,"aria-label":"Menu",children:a.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),a.jsx("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),a.jsx("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]})}),e&&a.jsx("div",{className:"hamburger-overlay",onClick:i}),a.jsxs("div",{className:`hamburger-drawer ${e?"open":""}`,children:[a.jsxs("div",{className:"hamburger-header",children:[a.jsx("h2",{children:"Menu"}),a.jsx("button",{className:"hamburger-close",onClick:i,"aria-label":"Close menu",children:a.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),a.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),a.jsx("nav",{className:"hamburger-nav",children:o.map(s=>{const l=n.pathname===s.path||s.path!=="/"&&n.pathname.startsWith(s.path);return a.jsxs(ar,{to:s.path,className:`hamburger-nav-item ${l?"active":""}`,onClick:i,children:[a.jsx("div",{className:"hamburger-nav-icon",style:{color:s.color},children:typeof s.icon=="string"?a.jsx("span",{className:"hamburger-emoji",children:s.icon}):s.icon}),a.jsx("span",{className:"hamburger-nav-label",children:s.name}),l&&a.jsx("svg",{className:"hamburger-nav-check",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:a.jsx("polyline",{points:"20 6 9 17 4 12"})})]},s.path)})})]})]})}const Y0=[re.NOT_STARTED,re.IN_PROGRESS,re.FOR_REVIEW,re.DONE],Uo={[re.NOT_STARTED]:{label:"Queued",icon:"○",sublabel:"Ideas + intake"},[re.IN_PROGRESS]:{label:"Building",icon:"▣",sublabel:"Actively running"},[re.FOR_REVIEW]:{label:"Review",icon:"◆",sublabel:"Needs eyeballs"},[re.DONE]:{label:"Shipped",icon:"▴",sublabel:"Mission complete"}};function X0(){const{tasks:e,isConnected:t}=ny(),[n,r]=k.useState(null),[i,o]=k.useState(!1),[s,l]=k.useState(re.NOT_STARTED);pr("Tasks");const u=k.useMemo(()=>e.reduce((d,h)=>(d[h.status]=d[h.status]?[...d[h.status],h]:[h],d),{[re.NOT_STARTED]:[],[re.IN_PROGRESS]:[],[re.FOR_REVIEW]:[],[re.DONE]:[]}),[e]),c=u[s]??[],f=d=>{const h=new Date(d),y=Math.round((new Date().getTime()-h.getTime())/(1e3*60));if(y<60)return`${Math.max(y,1)}m ago`;const x=Math.round(y/60);return x<24?`${x}h ago`:h.toLocaleDateString("en-US",{month:"short",day:"numeric"})};return a.jsxs("div",{className:"task-board-mobile",children:[a.jsxs("div",{className:"matrix-frame",children:[a.jsxs("header",{className:"matrix-header",children:[a.jsx(Q0,{}),a.jsx("div",{className:"matrix-header-copy",children:a.jsx("h1",{children:"Tasks"})}),a.jsxs("div",{className:"matrix-connection",children:[a.jsx("span",{className:`matrix-connection-dot ${t?"online":"offline"}`,"aria-hidden":!0}),a.jsx("span",{children:t?"":"offline"})]})]}),a.jsxs("section",{className:"matrix-status-panel",children:[a.jsxs("div",{children:[a.jsx("h2",{children:Uo[s].label}),a.jsx("p",{className:"matrix-status-sub",children:Uo[s].sublabel})]}),a.jsxs("div",{className:"matrix-status-count",children:[a.jsx("span",{className:"matrix-count-number",children:c.length}),a.jsx("span",{className:"matrix-count-text",children:"tasks"})]})]}),a.jsxs("section",{className:"matrix-task-feed",children:[c.length===0&&a.jsxs("div",{className:"matrix-empty-state",children:[a.jsx("p",{children:"No entries in this lane."}),s===re.NOT_STARTED&&a.jsx("button",{type:"button",className:"matrix-link",onClick:()=>o(!0),children:"create the first task"})]}),c.map(d=>a.jsxs("article",{className:"matrix-task-card",onClick:()=>r(d),children:[a.jsxs("div",{className:"matrix-task-meta-row",children:[a.jsxs("span",{className:"matrix-task-id",children:["#",d.id.slice(0,6).toUpperCase()]}),a.jsx("span",{className:"matrix-task-updated",children:f(d.updatedAt)})]}),a.jsx("h3",{children:d.name}),a.jsx("p",{children:d.description}),d.tags&&d.tags.length>0&&a.jsx("div",{className:"matrix-task-tags",children:d.tags.map(h=>a.jsx(Mg,{tag:h,small:!0},h.name))}),a.jsxs("div",{className:"matrix-task-footer",children:[a.jsx("span",{children:d.assignee?`Assigned: ${d.assignee}`:"Unassigned"}),d.comments&&d.comments.length>0&&a.jsxs("span",{children:["💬 ",d.comments.length]})]})]},d.id))]})]}),a.jsx("nav",{className:"matrix-bottom-nav","aria-label":"Task status navigation",children:Y0.map(d=>a.jsxs("button",{className:`matrix-nav-item ${d===s?"active":""}`,onClick:()=>l(d),type:"button",children:[a.jsx("span",{className:"matrix-nav-icon",children:Uo[d].icon}),a.jsx("span",{className:"matrix-nav-label",children:Uo[d].label}),a.jsx("span",{className:"matrix-nav-count",children:u[d].length})]},d))}),a.jsx("button",{type:"button",className:"matrix-fab",onClick:()=>o(!0),"aria-label":"Create task",children:"➕"}),n&&a.jsx(Hg,{task:n,onClose:()=>r(null),onUpdate:d=>r(d)}),i&&a.jsx(J0,{onClose:()=>o(!1)})]})}function J0({onClose:e}){const{toasts:t,showToast:n,removeToast:r}=Bg(),[i,o]=k.useState(""),[s,l]=k.useState(""),[u,c]=k.useState(""),[f,d]=k.useState(""),[h,p]=k.useState([]),[y,x]=k.useState(""),[S,g]=k.useState(!1),m=async v=>{var b;if(v.preventDefault(),!i.trim()||!s.trim()){n("Name and description are required","error");return}g(!0);try{const j=y.split(",").map(E=>E.trim()).filter(Boolean);await Dt.tasksControllerCreateTask({name:i,description:s,...u&&{assignee:u},...f&&{sessionId:f},...h.length>0&&{tagNames:h},...j.length>0&&{dependsOnIds:j}}),e()}catch(j){const E=((b=j==null?void 0:j.body)==null?void 0:b.detail)||(j==null?void 0:j.message)||"Failed to create task";n(E,"error")}finally{g(!1)}};return a.jsx("div",{className:"mobile-create-overlay",onClick:e,children:a.jsxs("div",{className:"mobile-create-panel",onClick:v=>v.stopPropagation(),children:[a.jsxs("header",{className:"mobile-create-header",children:[a.jsxs("div",{children:[a.jsx("p",{className:"matrix-status-label",children:"New task payload"}),a.jsx("h2",{children:"Compose"})]}),a.jsx("button",{type:"button",className:"matrix-link",onClick:e,children:"close"})]}),a.jsxs("form",{className:"mobile-create-form",onSubmit:m,children:[a.jsxs("label",{children:[a.jsx("span",{children:"Title *"}),a.jsx("input",{type:"text",value:i,onChange:v=>o(v.target.value),placeholder:"Ship a feature",required:!0})]}),a.jsxs("label",{children:[a.jsx("span",{children:"Description *"}),a.jsx("textarea",{value:s,onChange:v=>l(v.target.value),placeholder:"Outline what needs to happen",rows:4,required:!0})]}),a.jsxs("label",{children:[a.jsx("span",{children:"Assignee"}),a.jsx("input",{type:"text",value:u,onChange:v=>c(v.target.value),placeholder:"agent or human"})]}),a.jsxs("label",{children:[a.jsx("span",{children:"Session ID"}),a.jsx("input",{type:"text",value:f,onChange:v=>d(v.target.value),placeholder:"link a running session"})]}),a.jsxs("div",{className:"mobile-form-control",children:[a.jsx("span",{children:"Tags"}),a.jsx(Oc,{value:h,onChange:p,placeholder:"ops, agents, ui"})]}),a.jsxs("label",{children:[a.jsx("span",{children:"Depends on task IDs"}),a.jsx("input",{type:"text",value:y,onChange:v=>x(v.target.value),placeholder:"comma separated"})]}),a.jsx("button",{type:"submit",className:"matrix-submit",disabled:S,children:S?"Transmitting…":"Create Task"})]}),t.map(v=>a.jsx(Ug,{message:v.message,type:v.type,onClose:()=>r(v.id)},v.id))]})})}function ry(e,t){return t?e.id===t?!0:e.children?e.children.some(n=>ry(n,t)):!1:!1}const Z0=k.memo(function e({page:t,level:n,isActive:r,currentPageId:i,onPageClick:o,onAddChild:s}){const l=t.children&&t.children.length>0,u=l&&ry(t,i),[c,f]=k.useState(u);k.useEffect(()=>{u&&f(!0)},[u]);const d=x=>{x.stopPropagation(),f(!c)},h=x=>{x.preventDefault(),o(t.id)},p=x=>{x.preventDefault(),x.stopPropagation(),s(t.id)},y=k.useMemo(()=>l?[...t.children].sort((x,S)=>x.order-S.order):[],[l,t.children]);return a.jsxs("div",{className:"page-tree-item",children:[a.jsxs("div",{className:`tree-item-content ${r?"active":""}`,style:{paddingLeft:`${n*20}px`},children:[l?a.jsx("button",{className:"tree-toggle",onClick:d,"aria-label":c?"Collapse":"Expand","aria-expanded":c,children:c?"▼":"▶"}):a.jsx("span",{className:"tree-spacer"}),a.jsx("a",{href:"#",className:"tree-item-link",onClick:h,"aria-current":r?"page":void 0,children:t.title}),a.jsx("button",{className:"tree-item-add-child",onClick:p,"aria-label":`Add child page to ${t.title}`,title:"Add child page",children:"+"})]}),c&&l&&a.jsx("div",{className:"tree-item-children",children:y.map(x=>a.jsx(e,{page:x,level:n+1,isActive:x.id===i,currentPageId:i,onPageClick:o,onAddChild:s},x.id))})]})});function eS({pages:e,currentPageId:t,onPageClick:n}){const r=Le(),i=k.useMemo(()=>[...e].sort((s,l)=>s.order-l.order),[e]),o=s=>{r(`/context/page/${s}/new`)};return a.jsx("div",{className:"page-tree",children:i.map(s=>a.jsx(Z0,{page:s,level:0,isActive:s.id===t,currentPageId:t,onPageClick:n,onAddChild:o},s.id))})}L.BASE=hr;const tS=Fg("/context"),mo=()=>{const[e,t]=k.useState([]),[n,r]=k.useState(null),[i,o]=k.useState(!1),[s,l]=k.useState(!1),[u,c]=k.useState(!1),[f,d]=k.useState(!1),[h,p]=k.useState(!1),[y,x]=k.useState(null),[S,g]=k.useState(null),[m,v]=k.useState(!1),b=k.useCallback(async()=>{o(!0),x(null);try{const F=await _t.contextControllerListBlocks();t(F.items)}catch(F){x(F instanceof Error?F.message:"Failed to load wiki pages")}finally{o(!1)}},[]),j=k.useCallback(async F=>{l(!0),x(null),r(null);try{const D=await _t.contextControllerGetBlock(F);r(D)}catch(D){x(D instanceof Error?D.message:"Failed to fetch wiki page")}finally{l(!1)}},[]),E=k.useCallback(async F=>{c(!0),x(null);try{const D=await _t.contextControllerCreateBlock(F);return t(C=>{const B=C.filter(w=>w.id!==D.id);return[{id:D.id,title:D.title,createdBy:D.createdBy,createdByActorId:D.createdByActorId,tags:D.tags,parentId:D.parentId,order:D.order,createdAt:D.createdAt,updatedAt:D.updatedAt},...B]}),r(D),D}catch(D){throw x(D instanceof Error?D.message:"Failed to create wiki page"),D}finally{c(!1)}},[]),_=k.useCallback(F=>{j(F)},[j]),O=k.useCallback(async(F,D)=>{d(!0),x(null);try{const C=await _t.contextControllerUpdateBlock(F,D);return t(B=>B.map(w=>w.id===F?{id:C.id,title:C.title,createdBy:C.createdBy,createdByActorId:C.createdByActorId,tags:C.tags,parentId:C.parentId,order:C.order,createdAt:C.createdAt,updatedAt:C.updatedAt}:w)),(n==null?void 0:n.id)===F&&r(C),C}catch(C){throw x(C instanceof Error?C.message:"Failed to update page"),C}finally{d(!1)}},[n]),R=k.useCallback(async F=>{p(!0),x(null);try{await _t.contextControllerDeleteBlock(F),t(D=>D.filter(C=>C.id!==F)),(n==null?void 0:n.id)===F&&r(null)}catch(D){throw x(D instanceof Error?D.message:"Failed to delete page"),D}finally{p(!1)}},[n]),N=k.useCallback(async(F,D)=>{d(!0),x(null);try{const C=await _t.contextControllerAppendToBlock(F,{content:D});return(n==null?void 0:n.id)===F&&r(C),C}catch(C){throw x(C instanceof Error?C.message:"Failed to append content"),C}finally{d(!1)}},[n]),P=k.useCallback(async(F,D)=>{x(null);try{const C=await _t.contextControllerAddTagToBlock(F,D);return t(B=>B.map(w=>w.id===F?{id:C.id,title:C.title,createdBy:C.createdBy,createdByActorId:C.createdByActorId,tags:C.tags,parentId:C.parentId,order:C.order,createdAt:C.createdAt,updatedAt:C.updatedAt}:w)),(n==null?void 0:n.id)===F&&r(C),C}catch(C){throw x(C instanceof Error?C.message:"Failed to add tag"),C}},[n]),V=k.useCallback(async(F,D)=>{x(null);try{const C=await _t.contextControllerRemoveTagFromBlock(F,D);return t(B=>B.map(w=>w.id===F?{id:C.id,title:C.title,createdBy:C.createdBy,createdByActorId:C.createdByActorId,tags:C.tags,parentId:C.parentId,order:C.order,createdAt:C.createdAt,updatedAt:C.updatedAt}:w)),(n==null?void 0:n.id)===F&&r(C),C}catch(C){throw x(C instanceof Error?C.message:"Failed to remove tag"),C}},[n]),$=k.useCallback(async()=>{x(null);try{return await _t.contextControllerGetBlockTree()}catch(F){throw x(F instanceof Error?F.message:"Failed to fetch page tree"),F}},[]),H=k.useCallback(async(F,D)=>{x(null);try{const C=await _t.contextControllerReorderBlock(F,{newOrder:D});return t(B=>B.map(w=>w.id===F?{id:C.id,title:C.title,createdBy:C.createdBy,createdByActorId:C.createdByActorId,tags:C.tags,parentId:C.parentId,order:C.order,createdAt:C.createdAt,updatedAt:C.updatedAt}:w)),(n==null?void 0:n.id)===F&&r(C),C}catch(C){throw x(C instanceof Error?C.message:"Failed to reorder page"),C}},[n]),G=k.useCallback(async(F,D)=>{x(null);try{const C=await _t.contextControllerMoveBlock(F,{newParentId:D});return t(B=>B.map(w=>w.id===F?{id:C.id,title:C.title,createdBy:C.createdBy,createdByActorId:C.createdByActorId,tags:C.tags,parentId:C.parentId,order:C.order,createdAt:C.createdAt,updatedAt:C.updatedAt}:w)),(n==null?void 0:n.id)===F&&r(C),C}catch(C){throw x(C instanceof Error?C.message:"Failed to move page"),C}},[n]);return k.useEffect(()=>{const F=Oi(tS,{transports:["websocket","polling"],withCredentials:!0});return F.on("connect",()=>{console.log("Connected to Context websocket"),F.emit("context.subscribe",{},D=>{D.ok?(console.log(D),console.log("Subscribed to room:",D.room),v(!0)):(console.error("Failed to subscribe to room"),v(!1))}),v(!0),b()}),F.on("disconnect",()=>{console.log("Context WebSocket disconnected"),v(!1)}),F.on("page.created",D=>{t(C=>C.some(B=>B.id===D.id)?C:[{id:D.id,title:D.title,createdBy:D.createdBy,createdByActorId:D.createdByActorId,tags:D.tags,parentId:D.parentId,order:D.order,createdAt:D.createdAt,updatedAt:D.updatedAt},...C])}),F.on("page.updated",D=>{t(C=>C.map(B=>B.id===D.id?{id:D.id,title:D.title,createdBy:D.createdBy,createdByActorId:D.createdByActorId,tags:D.tags,parentId:D.parentId,order:D.order,createdAt:D.createdAt,updatedAt:D.updatedAt}:B)),(n==null?void 0:n.id)===D.id&&r(D)}),F.on("page.deleted",({pageId:D})=>{t(C=>C.filter(B=>B.id!==D)),(n==null?void 0:n.id)===D&&r(null)}),g(F),()=>{F.disconnect()}},[b,n==null?void 0:n.id]),k.useEffect(()=>{b()},[b]),{pages:e,selectedPage:n,isLoadingList:i,isLoadingPage:s,isCreating:u,isUpdating:f,isDeleting:h,error:y,isConnected:m,socket:S,loadPages:b,createPage:E,selectPage:_,updatePage:O,appendToPage:N,deletePage:R,addTagToPage:P,removeTagFromPage:V,getPageTree:$,reorderPage:H,movePage:G}},ih="context-sidebar-collapsed";function nS(){const{pageId:e}=fr(),t=Le(),{getPageTree:n,isConnected:r,socket:i}=mo(),[o,s]=k.useState([]),[l,u]=k.useState(!1),[c,f]=k.useState(()=>{const y=localStorage.getItem(ih);return y!==null?y==="true":no()});k.useEffect(()=>{localStorage.setItem(ih,String(c))},[c]);const d=k.useCallback(async()=>{u(!0);try{const y=await n();s(y)}catch(y){console.error("Failed to load page tree:",y)}finally{u(!1)}},[n]);k.useEffect(()=>{d()},[d]),k.useEffect(()=>{if(!i)return;const y=()=>{d()},x=()=>{d()},S=()=>{d()};return i.on("page.created",y),i.on("page.updated",x),i.on("page.deleted",S),()=>{i.off("page.created",y),i.off("page.updated",x),i.off("page.deleted",S)}},[i,d]);const h=k.useCallback(y=>{t(`/context/page/${y}`)},[t]),p=()=>{f(!c)};return a.jsxs("div",{className:"context-with-sidebar",children:[a.jsxs("aside",{className:`sidebar-app-specific ${c?"collapsed":""}`,children:[a.jsxs("nav",{className:"sidebar-content",children:[c&&a.jsx("div",{style:{display:"flex",justifyContent:"center",padding:"8px"},children:a.jsx("span",{className:`context-status-dot ${r?"connected":"disconnected"}`,title:r?"WebSocket connected":"WebSocket disconnected","aria-label":r?"WebSocket connected":"WebSocket disconnected"})}),!c&&a.jsxs("div",{children:[a.jsxs("div",{className:"context-sidebar-header",children:[a.jsxs("h2",{className:"context-sidebar-title",children:["📚 Context",a.jsx("span",{className:`context-status-dot ${r?"connected":"disconnected"}`,title:r?"WebSocket connected":"WebSocket disconnected","aria-label":r?"WebSocket connected":"WebSocket disconnected"})]}),a.jsx("button",{className:"context-button primary context-sidebar-new-page",type:"button",onClick:()=>t("/context/new"),title:"Create new page",children:"+ New page"})]}),l&&a.jsx("div",{className:"context-status",children:"Loading pages…"}),o.length>0&&a.jsx(eS,{pages:o,currentPageId:e,onPageClick:h}),o.length===0&&!l&&a.jsx("div",{className:"context-empty-sidebar",children:a.jsx("span",{children:"No pages yet"})})]})]}),a.jsx("button",{className:"sidebar-toggle",onClick:p,"aria-label":c?"Expand sidebar":"Collapse sidebar",children:c?"→":"←"})]}),a.jsx("main",{className:"context-content",children:a.jsx(bc,{})})]})}const iy=({tag:e,onRemove:t,small:n=!1})=>{const r=e.color||"#6B7280";return a.jsxs("span",{className:`tag-badge ${n?"tag-badge-small":""}`,style:{backgroundColor:r,color:"#ffffff",padding:n?"1px 4px":"2px 6px",borderRadius:"3px",fontSize:n?"0.65rem":"0.7rem",fontWeight:"500",display:"inline-flex",alignItems:"center",gap:"2px",marginRight:"4px",marginBottom:"4px"},children:[e.name,t&&a.jsx("button",{onClick:i=>{i.stopPropagation(),t()},style:{background:"none",border:"none",color:"white",cursor:"pointer",padding:"0",marginLeft:"1px",fontSize:n?"0.75rem":"0.85rem",lineHeight:"1"},"aria-label":`Remove ${e.name} tag`,children:"×"})]})};function rS(){const e=Le(),{pages:t,isLoadingList:n}=mo();return n?a.jsx("div",{className:"context-welcome",children:a.jsx("p",{children:"Loading pages..."})}):t.length===0?a.jsxs("div",{className:"context-welcome",children:[a.jsx("h2",{children:"Context"}),a.jsx("br",{}),a.jsx("button",{className:"context-button primary",type:"button",onClick:()=>e("/context/new"),title:"Create new page",children:"+ New page"})]}):a.jsxs("div",{className:"context-content",style:{padding:"24px"},children:[a.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"24px"},children:[a.jsx("h2",{style:{margin:0},children:"All Pages"}),a.jsx("button",{className:"context-button primary",type:"button",onClick:()=>e("/context/new"),title:"Create new page",children:"+ New page"})]}),a.jsx("div",{className:"context-grid",children:t.map(r=>a.jsxs("div",{className:"context-card",onClick:()=>e(`/context/page/${r.id}`),style:{cursor:"pointer"},children:[a.jsx("h3",{children:r.title}),r.tags&&r.tags.length>0&&a.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"6px"},children:r.tags.map(i=>a.jsx(iy,{tag:i},i.name))}),a.jsxs("div",{className:"context-card-meta",children:[a.jsxs("span",{children:["By ",r.createdBy||"unknown"]}),a.jsxs("span",{children:["Created ",new Date(r.createdAt).toLocaleDateString()]}),r.updatedAt!==r.createdAt&&a.jsxs("span",{children:["Updated ",new Date(r.updatedAt).toLocaleDateString()]})]})]},r.id))})]})}const iS=({value:e,onChange:t,placeholder:n="Type to add tags..."})=>{const[r,i]=k.useState(""),[o,s]=k.useState([]),[l,u]=k.useState(!1),[c,f]=k.useState(-1),[d,h]=k.useState([]),p=k.useRef(null),y=k.useRef(null);k.useEffect(()=>{(async()=>{try{const v=await Dg.metaControllerGetAllTags();h(v)}catch(v){console.error("Failed to load tags:",v)}})()},[]),k.useEffect(()=>{const v=setTimeout(()=>{if(r.trim().length>0){const b=r.trim().toLowerCase(),j=d.filter(E=>E.name.toLowerCase().includes(b)&&!e.includes(E.name));s(j),u(!0)}else s([]),u(!1)},150);return()=>clearTimeout(v)},[r,e,d]),k.useEffect(()=>{const m=v=>{y.current&&!y.current.contains(v.target)&&u(!1)};return document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)},[]);const x=m=>{var b;const v=m.trim();v&&!e.includes(v)&&t([...e,v]),i(""),s([]),u(!1),f(-1),(b=p.current)==null||b.focus()},S=m=>{t(e.filter(v=>v!==m))},g=m=>{m.key==="Tab"&&r.trim()||m.key==="Enter"&&r.trim()?(m.preventDefault(),c>=0&&o[c]?x(o[c].name):x(r)):m.key==="ArrowDown"?(m.preventDefault(),f(v=>v<o.length-1?v+1:v)):m.key==="ArrowUp"?(m.preventDefault(),f(v=>v>0?v-1:-1)):m.key==="Escape"?(u(!1),f(-1)):m.key==="Backspace"&&!r&&e.length>0&&t(e.slice(0,-1))};return a.jsxs("div",{ref:y,style:{position:"relative"},children:[a.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:"4px",padding:"6px",border:"1px solid #ddd",borderRadius:"4px",minHeight:"38px",cursor:"text"},onClick:()=>{var m;return(m=p.current)==null?void 0:m.focus()},children:[e.map(m=>{const v=d.find(j=>j.name===m),b=(v==null?void 0:v.color)||"#3B82F6";return a.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:"2px",backgroundColor:b,color:"white",padding:"2px 6px",borderRadius:"3px",fontSize:"0.7rem",fontWeight:"500"},children:[m,a.jsx("button",{type:"button",onClick:j=>{j.stopPropagation(),S(m)},style:{background:"none",border:"none",color:"white",cursor:"pointer",padding:"0",marginLeft:"1px",fontSize:"0.85rem",lineHeight:"1"},children:"×"})]},m)}),a.jsx("input",{ref:p,type:"text",value:r,onChange:m=>i(m.target.value),onKeyDown:g,onFocus:()=>r&&u(!0),placeholder:e.length===0?n:"",style:{flex:"1",minWidth:"120px",border:"none",outline:"none",fontSize:"0.875rem",padding:"2px"}})]}),l&&o.length>0&&a.jsx("div",{style:{position:"absolute",top:"100%",left:0,right:0,backgroundColor:"white",border:"1px solid #ddd",borderRadius:"4px",marginTop:"2px",maxHeight:"200px",overflowY:"auto",boxShadow:"0 4px 6px rgba(0, 0, 0, 0.1)",zIndex:1e3},children:o.map((m,v)=>a.jsxs("div",{onClick:()=>x(m.name),style:{padding:"8px 12px",cursor:"pointer",backgroundColor:v===c?"#EFF6FF":"white",display:"flex",alignItems:"center",gap:"8px"},onMouseEnter:()=>f(v),children:[a.jsx("span",{style:{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:m.color||"#6B7280"}}),a.jsx("span",{style:{fontSize:"0.875rem"},children:m.name})]},m.name))}),l&&r&&o.length===0&&a.jsxs("div",{style:{position:"absolute",top:"100%",left:0,right:0,backgroundColor:"white",border:"1px solid #ddd",borderRadius:"4px",marginTop:"2px",padding:"8px 12px",boxShadow:"0 4px 6px rgba(0, 0, 0, 0.1)",zIndex:1e3,fontSize:"0.875rem",color:"#6B7280"},children:['Press Tab or Enter to create "',r,'"']})]})};function oS(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const sS=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,lS=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,aS={};function oh(e,t){return(aS.jsx?lS:sS).test(e)}const uS=/[ \t\n\f\r]/g;function cS(e){return typeof e=="object"?e.type==="text"?sh(e.value):!1:sh(e)}function sh(e){return e.replace(uS,"")===""}class go{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}go.prototype.normal={};go.prototype.property={};go.prototype.space=void 0;function oy(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new go(n,r,t)}function gu(e){return e.toLowerCase()}class nt{constructor(t,n){this.attribute=n,this.property=t}}nt.prototype.attribute="";nt.prototype.booleanish=!1;nt.prototype.boolean=!1;nt.prototype.commaOrSpaceSeparated=!1;nt.prototype.commaSeparated=!1;nt.prototype.defined=!1;nt.prototype.mustUseProperty=!1;nt.prototype.number=!1;nt.prototype.overloadedBoolean=!1;nt.prototype.property="";nt.prototype.spaceSeparated=!1;nt.prototype.space=void 0;let dS=0;const X=mr(),Ee=mr(),yu=mr(),M=mr(),fe=mr(),Mr=mr(),ot=mr();function mr(){return 2**++dS}const xu=Object.freeze(Object.defineProperty({__proto__:null,boolean:X,booleanish:Ee,commaOrSpaceSeparated:ot,commaSeparated:Mr,number:M,overloadedBoolean:yu,spaceSeparated:fe},Symbol.toStringTag,{value:"Module"})),Xl=Object.keys(xu);class Bc extends nt{constructor(t,n,r,i){let o=-1;if(super(t,n),lh(this,"space",i),typeof r=="number")for(;++o<Xl.length;){const s=Xl[o];lh(this,Xl[o],(r&xu[s])===xu[s])}}}Bc.prototype.defined=!0;function lh(e,t,n){n&&(e[t]=n)}function ni(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new Bc(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[gu(r)]=r,n[gu(o.attribute)]=r}return new go(t,n,e.space)}const sy=ni({properties:{ariaActiveDescendant:null,ariaAtomic:Ee,ariaAutoComplete:null,ariaBusy:Ee,ariaChecked:Ee,ariaColCount:M,ariaColIndex:M,ariaColSpan:M,ariaControls:fe,ariaCurrent:null,ariaDescribedBy:fe,ariaDetails:null,ariaDisabled:Ee,ariaDropEffect:fe,ariaErrorMessage:null,ariaExpanded:Ee,ariaFlowTo:fe,ariaGrabbed:Ee,ariaHasPopup:null,ariaHidden:Ee,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:fe,ariaLevel:M,ariaLive:null,ariaModal:Ee,ariaMultiLine:Ee,ariaMultiSelectable:Ee,ariaOrientation:null,ariaOwns:fe,ariaPlaceholder:null,ariaPosInSet:M,ariaPressed:Ee,ariaReadOnly:Ee,ariaRelevant:null,ariaRequired:Ee,ariaRoleDescription:fe,ariaRowCount:M,ariaRowIndex:M,ariaRowSpan:M,ariaSelected:Ee,ariaSetSize:M,ariaSort:null,ariaValueMax:M,ariaValueMin:M,ariaValueNow:M,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function ly(e,t){return t in e?e[t]:t}function ay(e,t){return ly(e,t.toLowerCase())}const fS=ni({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Mr,acceptCharset:fe,accessKey:fe,action:null,allow:null,allowFullScreen:X,allowPaymentRequest:X,allowUserMedia:X,alt:null,as:null,async:X,autoCapitalize:null,autoComplete:fe,autoFocus:X,autoPlay:X,blocking:fe,capture:null,charSet:null,checked:X,cite:null,className:fe,cols:M,colSpan:null,content:null,contentEditable:Ee,controls:X,controlsList:fe,coords:M|Mr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:X,defer:X,dir:null,dirName:null,disabled:X,download:yu,draggable:Ee,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:X,formTarget:null,headers:fe,height:M,hidden:yu,high:M,href:null,hrefLang:null,htmlFor:fe,httpEquiv:fe,id:null,imageSizes:null,imageSrcSet:null,inert:X,inputMode:null,integrity:null,is:null,isMap:X,itemId:null,itemProp:fe,itemRef:fe,itemScope:X,itemType:fe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:X,low:M,manifest:null,max:null,maxLength:M,media:null,method:null,min:null,minLength:M,multiple:X,muted:X,name:null,nonce:null,noModule:X,noValidate:X,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:X,optimum:M,pattern:null,ping:fe,placeholder:null,playsInline:X,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:X,referrerPolicy:null,rel:fe,required:X,reversed:X,rows:M,rowSpan:M,sandbox:fe,scope:null,scoped:X,seamless:X,selected:X,shadowRootClonable:X,shadowRootDelegatesFocus:X,shadowRootMode:null,shape:null,size:M,sizes:null,slot:null,span:M,spellCheck:Ee,src:null,srcDoc:null,srcLang:null,srcSet:null,start:M,step:null,style:null,tabIndex:M,target:null,title:null,translate:null,type:null,typeMustMatch:X,useMap:null,value:Ee,width:M,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:fe,axis:null,background:null,bgColor:null,border:M,borderColor:null,bottomMargin:M,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:X,declare:X,event:null,face:null,frame:null,frameBorder:null,hSpace:M,leftMargin:M,link:null,longDesc:null,lowSrc:null,marginHeight:M,marginWidth:M,noResize:X,noHref:X,noShade:X,noWrap:X,object:null,profile:null,prompt:null,rev:null,rightMargin:M,rules:null,scheme:null,scrolling:Ee,standby:null,summary:null,text:null,topMargin:M,valueType:null,version:null,vAlign:null,vLink:null,vSpace:M,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:X,disableRemotePlayback:X,prefix:null,property:null,results:M,security:null,unselectable:null},space:"html",transform:ay}),hS=ni({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:ot,accentHeight:M,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:M,amplitude:M,arabicForm:null,ascent:M,attributeName:null,attributeType:null,azimuth:M,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:M,by:null,calcMode:null,capHeight:M,className:fe,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:M,diffuseConstant:M,direction:null,display:null,dur:null,divisor:M,dominantBaseline:null,download:X,dx:null,dy:null,edgeMode:null,editable:null,elevation:M,enableBackground:null,end:null,event:null,exponent:M,externalResourcesRequired:null,fill:null,fillOpacity:M,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Mr,g2:Mr,glyphName:Mr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:M,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:M,horizOriginX:M,horizOriginY:M,id:null,ideographic:M,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:M,k:M,k1:M,k2:M,k3:M,k4:M,kernelMatrix:ot,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:M,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:M,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:M,overlineThickness:M,paintOrder:null,panose1:null,path:null,pathLength:M,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:fe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:M,pointsAtY:M,pointsAtZ:M,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ot,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ot,rev:ot,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ot,requiredFeatures:ot,requiredFonts:ot,requiredFormats:ot,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:M,specularExponent:M,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:M,strikethroughThickness:M,string:null,stroke:null,strokeDashArray:ot,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:M,strokeOpacity:M,strokeWidth:null,style:null,surfaceScale:M,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ot,tabIndex:M,tableValues:null,target:null,targetX:M,targetY:M,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ot,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:M,underlineThickness:M,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:M,values:null,vAlphabetic:M,vMathematical:M,vectorEffect:null,vHanging:M,vIdeographic:M,version:null,vertAdvY:M,vertOriginX:M,vertOriginY:M,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:M,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:ly}),uy=ni({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()}}),cy=ni({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:ay}),dy=ni({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),pS={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"},mS=/[A-Z]/g,ah=/-[a-z]/g,gS=/^data[-\w.:]+$/i;function yS(e,t){const n=gu(t);let r=t,i=nt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&gS.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(ah,vS);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!ah.test(o)){let s=o.replace(mS,xS);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=Bc}return new i(r,t)}function xS(e){return"-"+e.toLowerCase()}function vS(e){return e.charAt(1).toUpperCase()}const kS=oy([sy,fS,uy,cy,dy],"html"),Uc=oy([sy,hS,uy,cy,dy],"svg");function wS(e){return e.join(" ").trim()}var Hc={},uh=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,SS=/\n/g,CS=/^\s*/,ES=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,NS=/^:\s*/,bS=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,TS=/^[;\s]*/,jS=/^\s+|\s+$/g,_S=`
52
- `,ch="/",dh="*",Yn="",IS="comment",AS="declaration";function RS(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(y){var x=y.match(SS);x&&(n+=x.length);var S=y.lastIndexOf(_S);r=~S?y.length-S:r+y.length}function o(){var y={line:n,column:r};return function(x){return x.position=new s(y),c(),x}}function s(y){this.start=y,this.end={line:n,column:r},this.source=t.source}s.prototype.content=e;function l(y){var x=new Error(t.source+":"+n+":"+r+": "+y);if(x.reason=y,x.filename=t.source,x.line=n,x.column=r,x.source=e,!t.silent)throw x}function u(y){var x=y.exec(e);if(x){var S=x[0];return i(S),e=e.slice(S.length),x}}function c(){u(CS)}function f(y){var x;for(y=y||[];x=d();)x!==!1&&y.push(x);return y}function d(){var y=o();if(!(ch!=e.charAt(0)||dh!=e.charAt(1))){for(var x=2;Yn!=e.charAt(x)&&(dh!=e.charAt(x)||ch!=e.charAt(x+1));)++x;if(x+=2,Yn===e.charAt(x-1))return l("End of comment missing");var S=e.slice(2,x-2);return r+=2,i(S),e=e.slice(x),r+=2,y({type:IS,comment:S})}}function h(){var y=o(),x=u(ES);if(x){if(d(),!u(NS))return l("property missing ':'");var S=u(bS),g=y({type:AS,property:fh(x[0].replace(uh,Yn)),value:S?fh(S[0].replace(uh,Yn)):Yn});return u(TS),g}}function p(){var y=[];f(y);for(var x;x=h();)x!==!1&&(y.push(x),f(y));return y}return c(),p()}function fh(e){return e?e.replace(jS,Yn):Yn}var PS=RS,OS=ds&&ds.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Hc,"__esModule",{value:!0});Hc.default=LS;const DS=OS(PS);function LS(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,DS.default)(e),i=typeof t=="function";return r.forEach(o=>{if(o.type!=="declaration")return;const{property:s,value:l}=o;i?t(s,l,o):l&&(n=n||{},n[s]=l)}),n}var al={};Object.defineProperty(al,"__esModule",{value:!0});al.camelCase=void 0;var FS=/^--[a-zA-Z0-9_-]+$/,zS=/-([a-z])/g,MS=/^[^-]+$/,BS=/^-(webkit|moz|ms|o|khtml)-/,US=/^-(ms)-/,HS=function(e){return!e||MS.test(e)||FS.test(e)},$S=function(e,t){return t.toUpperCase()},hh=function(e,t){return"".concat(t,"-")},WS=function(e,t){return t===void 0&&(t={}),HS(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(US,hh):e=e.replace(BS,hh),e.replace(zS,$S))};al.camelCase=WS;var VS=ds&&ds.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},qS=VS(Hc),GS=al;function vu(e,t){var n={};return!e||typeof e!="string"||(0,qS.default)(e,function(r,i){r&&i&&(n[(0,GS.camelCase)(r,t)]=i)}),n}vu.default=vu;var KS=vu;const QS=rp(KS),fy=hy("end"),$c=hy("start");function hy(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function YS(e){const t=$c(e),n=fy(e);if(t&&n)return{start:t,end:n}}function Di(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?ph(e.position):"start"in e||"end"in e?ph(e):"line"in e||"column"in e?ku(e):""}function ku(e){return mh(e&&e.line)+":"+mh(e&&e.column)}function ph(e){return ku(e&&e.start)+"-"+ku(e&&e.end)}function mh(e){return e&&typeof e=="number"?e:1}class He extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},s=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(s=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?o.ruleId=r:(o.source=r.slice(0,u),o.ruleId=r.slice(u+1))}if(!o.place&&o.ancestors&&o.ancestors){const u=o.ancestors[o.ancestors.length-1];u&&(o.place=u.position)}const l=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=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=l?l.line:void 0,this.name=Di(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=s&&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}}He.prototype.file="";He.prototype.name="";He.prototype.reason="";He.prototype.message="";He.prototype.stack="";He.prototype.column=void 0;He.prototype.line=void 0;He.prototype.ancestors=void 0;He.prototype.cause=void 0;He.prototype.fatal=void 0;He.prototype.place=void 0;He.prototype.ruleId=void 0;He.prototype.source=void 0;const Wc={}.hasOwnProperty,XS=new Map,JS=/[A-Z]/g,ZS=new Set(["table","tbody","thead","tfoot","tr"]),eC=new Set(["td","th"]),py="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function tC(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=uC(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=aC(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Uc:kS,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=my(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function my(e,t,n){if(t.type==="element")return nC(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return rC(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return oC(e,t,n);if(t.type==="mdxjsEsm")return iC(e,t);if(t.type==="root")return sC(e,t,n);if(t.type==="text")return lC(e,t)}function nC(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Uc,e.schema=i),e.ancestors.push(t);const o=yy(e,t.tagName,!1),s=cC(e,t);let l=qc(e,t);return ZS.has(t.tagName)&&(l=l.filter(function(u){return typeof u=="string"?!cS(u):!0})),gy(e,s,o,t),Vc(s,l),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function rC(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}io(e,t.position)}function iC(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);io(e,t.position)}function oC(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Uc,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:yy(e,t.name,!0),s=dC(e,t),l=qc(e,t);return gy(e,s,o,t),Vc(s,l),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function sC(e,t,n){const r={};return Vc(r,qc(e,t)),e.create(t,e.Fragment,r,n)}function lC(e,t){return t.value}function gy(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Vc(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function aC(e,t,n){return r;function r(i,o,s,l){const c=Array.isArray(s.children)?n:t;return l?c(o,s,l):c(o,s)}}function uC(e,t){return n;function n(r,i,o,s){const l=Array.isArray(o.children),u=$c(r);return t(i,o,s,l,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function cC(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Wc.call(t.properties,i)){const o=fC(e,i,t.properties[i]);if(o){const[s,l]=o;e.tableCellAlignToStyle&&s==="align"&&typeof l=="string"&&eC.has(t.tagName)?r=l:n[s]=l}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function dC(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const s=o.expression;s.type;const l=s.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else io(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,o=e.evaluater.evaluateExpression(l.expression)}else io(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function qc(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:XS;for(;++r<t.children.length;){const o=t.children[r];let s;if(e.passKeys){const u=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(u){const c=i.get(u)||0;s=u+"-"+c,i.set(u,c+1)}}const l=my(e,o,s);l!==void 0&&n.push(l)}return n}function fC(e,t,n){const r=yS(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?oS(n):wS(n)),r.property==="style"){let i=typeof n=="object"?n:hC(e,String(n));return e.stylePropertyNameCase==="css"&&(i=pC(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?pS[r.property]||r.property:r.attribute,n]}}function hC(e,t){try{return QS(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new He("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=py+"#cannot-parse-style-attribute",i}}function yy(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,s;for(;++o<i.length;){const l=oh(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};s=s?{type:"MemberExpression",object:s,property:l,computed:!!(o&&l.type==="Literal"),optional:!1}:l}r=s}else r=oh(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Wc.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);io(e)}function io(e,t){const n=new He("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=py+"#cannot-handle-mdx-estrees-without-createevaluater",n}function pC(e){const t={};let n;for(n in e)Wc.call(e,n)&&(t[mC(n)]=e[n]);return t}function mC(e){let t=e.replace(JS,gC);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function gC(e){return"-"+e.toLowerCase()}const Jl={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"]},yC={};function Gc(e,t){const n=yC,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return xy(e,r,i)}function xy(e,t,n){if(xC(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 gh(e.children,t,n)}return Array.isArray(e)?gh(e,t,n):""}function gh(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=xy(e[i],t,n);return r.join("")}function xC(e){return!!(e&&typeof e=="object")}const yh=document.createElement("i");function Kc(e){const t="&"+e+";";yh.innerHTML=t;const n=yh.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function ut(e,t,n,r){const i=e.length;let o=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);o<r.length;)s=r.slice(o,o+1e4),s.unshift(t,0),e.splice(...s),o+=1e4,t+=1e4}function vt(e,t){return e.length>0?(ut(e,e.length,0,t),e):t}const xh={}.hasOwnProperty;function vy(e){const t={};let n=-1;for(;++n<e.length;)vC(t,e[n]);return t}function vC(e,t){let n;for(n in t){const i=(xh.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let s;if(o)for(s in o){xh.call(i,s)||(i[s]=[]);const l=o[s];kC(i[s],Array.isArray(l)?l:l?[l]:[])}}}function kC(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);ut(e,0,0,r)}function ky(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 zt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const We=Wn(/[A-Za-z]/),Be=Wn(/[\dA-Za-z]/),wC=Wn(/[#-'*+\--9=?A-Z^-~]/);function Fs(e){return e!==null&&(e<32||e===127)}const wu=Wn(/\d/),SC=Wn(/[\dA-Fa-f]/),CC=Wn(/[!-/:-@[-`{-~]/);function Q(e){return e!==null&&e<-2}function de(e){return e!==null&&(e<0||e===32)}function Z(e){return e===-2||e===-1||e===32}const ul=Wn(new RegExp("\\p{P}|\\p{S}","u")),ur=Wn(/\s/);function Wn(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function ri(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let s="";if(o===37&&Be(e.charCodeAt(n+1))&&Be(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(s=String.fromCharCode(o));else if(o>55295&&o<57344){const l=e.charCodeAt(n+1);o<56320&&l>56319&&l<57344?(s=String.fromCharCode(o,l),i=1):s="�"}else s=String.fromCharCode(o);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function ie(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return s;function s(u){return Z(u)?(e.enter(n),l(u)):t(u)}function l(u){return Z(u)&&o++<i?(e.consume(u),l):(e.exit(n),t(u))}}const EC={tokenize:NC};function NC(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),ie(e,t,"linePrefix")}function i(l){return e.enter("paragraph"),o(l)}function o(l){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,s(l)}function s(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return Q(l)?(e.consume(l),e.exit("chunkText"),o):(e.consume(l),s)}}const bC={tokenize:TC},vh={tokenize:jC};function TC(e){const t=this,n=[];let r=0,i,o,s;return l;function l(v){if(r<n.length){const b=n[r];return t.containerState=b[1],e.attempt(b[0].continuation,u,c)(v)}return c(v)}function u(v){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&m();const b=t.events.length;let j=b,E;for(;j--;)if(t.events[j][0]==="exit"&&t.events[j][1].type==="chunkFlow"){E=t.events[j][1].end;break}g(r);let _=b;for(;_<t.events.length;)t.events[_][1].end={...E},_++;return ut(t.events,j+1,0,t.events.slice(b)),t.events.length=_,c(v)}return l(v)}function c(v){if(r===n.length){if(!i)return h(v);if(i.currentConstruct&&i.currentConstruct.concrete)return y(v);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(vh,f,d)(v)}function f(v){return i&&m(),g(r),h(v)}function d(v){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,y(v)}function h(v){return t.containerState={},e.attempt(vh,p,y)(v)}function p(v){return r++,n.push([t.currentConstruct,t.containerState]),h(v)}function y(v){if(v===null){i&&m(),g(0),e.consume(v);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),x(v)}function x(v){if(v===null){S(e.exit("chunkFlow"),!0),g(0),e.consume(v);return}return Q(v)?(e.consume(v),S(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(v),x)}function S(v,b){const j=t.sliceStream(v);if(b&&j.push(null),v.previous=o,o&&(o.next=v),o=v,i.defineSkip(v.start),i.write(j),t.parser.lazy[v.start.line]){let E=i.events.length;for(;E--;)if(i.events[E][1].start.offset<s&&(!i.events[E][1].end||i.events[E][1].end.offset>s))return;const _=t.events.length;let O=_,R,N;for(;O--;)if(t.events[O][0]==="exit"&&t.events[O][1].type==="chunkFlow"){if(R){N=t.events[O][1].end;break}R=!0}for(g(r),E=_;E<t.events.length;)t.events[E][1].end={...N},E++;ut(t.events,O+1,0,t.events.slice(_)),t.events.length=E}}function g(v){let b=n.length;for(;b-- >v;){const j=n[b];t.containerState=j[1],j[0].exit.call(t,e)}n.length=v}function m(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function jC(e,t,n){return ie(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Kr(e){if(e===null||de(e)||ur(e))return 1;if(ul(e))return 2}function cl(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const Su={name:"attention",resolveAll:_C,tokenize:IC};function _C(e,t){let n=-1,r,i,o,s,l,u,c,f;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;u=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},h={...e[n][1].start};kh(d,-u),kh(h,u),s={type:u>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},l={type:u>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:h},o={type:u>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:u>1?"strong":"emphasis",start:{...s.start},end:{...l.end}},e[r][1].end={...s.start},e[n][1].start={...l.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=vt(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=vt(c,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",o,t]]),c=vt(c,cl(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=vt(c,[["exit",o,t],["enter",l,t],["exit",l,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,c=vt(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,ut(e,r-1,n-r+3,c),n=r+c.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function IC(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Kr(r);let o;return s;function s(u){return o=u,e.enter("attentionSequence"),l(u)}function l(u){if(u===o)return e.consume(u),l;const c=e.exit("attentionSequence"),f=Kr(u),d=!f||f===2&&i||n.includes(u),h=!i||i===2&&f||n.includes(r);return c._open=!!(o===42?d:d&&(i||!h)),c._close=!!(o===42?h:h&&(f||!d)),t(u)}}function kh(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const AC={name:"autolink",tokenize:RC};function RC(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(p){return We(p)?(e.consume(p),s):p===64?n(p):c(p)}function s(p){return p===43||p===45||p===46||Be(p)?(r=1,l(p)):c(p)}function l(p){return p===58?(e.consume(p),r=0,u):(p===43||p===45||p===46||Be(p))&&r++<32?(e.consume(p),l):(r=0,c(p))}function u(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||Fs(p)?n(p):(e.consume(p),u)}function c(p){return p===64?(e.consume(p),f):wC(p)?(e.consume(p),c):n(p)}function f(p){return Be(p)?d(p):n(p)}function d(p){return p===46?(e.consume(p),r=0,f):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):h(p)}function h(p){if((p===45||Be(p))&&r++<63){const y=p===45?h:d;return e.consume(p),y}return n(p)}}const yo={partial:!0,tokenize:PC};function PC(e,t,n){return r;function r(o){return Z(o)?ie(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||Q(o)?t(o):n(o)}}const wy={continuation:{tokenize:DC},exit:LC,name:"blockQuote",tokenize:OC};function OC(e,t,n){const r=this;return i;function i(s){if(s===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),o}return n(s)}function o(s){return Z(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function DC(e,t,n){const r=this;return i;function i(s){return Z(s)?ie(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):o(s)}function o(s){return e.attempt(wy,t,n)(s)}}function LC(e){e.exit("blockQuote")}const Sy={name:"characterEscape",tokenize:FC};function FC(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return CC(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const Cy={name:"characterReference",tokenize:zC};function zC(e,t,n){const r=this;let i=0,o,s;return l;function l(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),u}function u(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),o=31,s=Be,f(d))}function c(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,s=SC,f):(e.enter("characterReferenceValue"),o=7,s=wu,f(d))}function f(d){if(d===59&&i){const h=e.exit("characterReferenceValue");return s===Be&&!Kc(r.sliceSerialize(h))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(d)&&i++<o?(e.consume(d),f):n(d)}}const wh={partial:!0,tokenize:BC},Sh={concrete:!0,name:"codeFenced",tokenize:MC};function MC(e,t,n){const r=this,i={partial:!0,tokenize:j};let o=0,s=0,l;return u;function u(E){return c(E)}function c(E){const _=r.events[r.events.length-1];return o=_&&_[1].type==="linePrefix"?_[2].sliceSerialize(_[1],!0).length:0,l=E,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(E)}function f(E){return E===l?(s++,e.consume(E),f):s<3?n(E):(e.exit("codeFencedFenceSequence"),Z(E)?ie(e,d,"whitespace")(E):d(E))}function d(E){return E===null||Q(E)?(e.exit("codeFencedFence"),r.interrupt?t(E):e.check(wh,x,b)(E)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(E))}function h(E){return E===null||Q(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(E)):Z(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ie(e,p,"whitespace")(E)):E===96&&E===l?n(E):(e.consume(E),h)}function p(E){return E===null||Q(E)?d(E):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),y(E))}function y(E){return E===null||Q(E)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(E)):E===96&&E===l?n(E):(e.consume(E),y)}function x(E){return e.attempt(i,b,S)(E)}function S(E){return e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),g}function g(E){return o>0&&Z(E)?ie(e,m,"linePrefix",o+1)(E):m(E)}function m(E){return E===null||Q(E)?e.check(wh,x,b)(E):(e.enter("codeFlowValue"),v(E))}function v(E){return E===null||Q(E)?(e.exit("codeFlowValue"),m(E)):(e.consume(E),v)}function b(E){return e.exit("codeFenced"),t(E)}function j(E,_,O){let R=0;return N;function N(G){return E.enter("lineEnding"),E.consume(G),E.exit("lineEnding"),P}function P(G){return E.enter("codeFencedFence"),Z(G)?ie(E,V,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(G):V(G)}function V(G){return G===l?(E.enter("codeFencedFenceSequence"),$(G)):O(G)}function $(G){return G===l?(R++,E.consume(G),$):R>=s?(E.exit("codeFencedFenceSequence"),Z(G)?ie(E,H,"whitespace")(G):H(G)):O(G)}function H(G){return G===null||Q(G)?(E.exit("codeFencedFence"),_(G)):O(G)}}}function BC(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const Zl={name:"codeIndented",tokenize:HC},UC={partial:!0,tokenize:$C};function HC(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),ie(e,o,"linePrefix",5)(c)}function o(c){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?s(c):n(c)}function s(c){return c===null?u(c):Q(c)?e.attempt(UC,s,u)(c):(e.enter("codeFlowValue"),l(c))}function l(c){return c===null||Q(c)?(e.exit("codeFlowValue"),s(c)):(e.consume(c),l)}function u(c){return e.exit("codeIndented"),t(c)}}function $C(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):Q(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):ie(e,o,"linePrefix",5)(s)}function o(s){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):Q(s)?i(s):n(s)}}const WC={name:"codeText",previous:qC,resolve:VC,tokenize:GC};function VC(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function qC(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function GC(e,t,n){let r=0,i,o;return s;function s(d){return e.enter("codeText"),e.enter("codeTextSequence"),l(d)}function l(d){return d===96?(e.consume(d),r++,l):(e.exit("codeTextSequence"),u(d))}function u(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),u):d===96?(o=e.enter("codeTextSequence"),i=0,f(d)):Q(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),u):(e.enter("codeTextData"),c(d))}function c(d){return d===null||d===32||d===96||Q(d)?(e.exit("codeTextData"),u(d)):(e.consume(d),c)}function f(d){return d===96?(e.consume(d),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(o.type="codeTextData",c(d))}}class KC{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&yi(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),yi(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),yi(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);yi(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);yi(this.left,n.reverse())}}}function yi(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 Ey(e){const t={};let n=-1,r,i,o,s,l,u,c;const f=new KC(e);for(;++n<f.length;){for(;n in t;)n=t[n];if(r=f.get(n),n&&r[1].type==="chunkFlow"&&f.get(n-1)[1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,o=0,o<u.length&&u[o][1].type==="lineEndingBlank"&&(o+=2),o<u.length&&u[o][1].type==="content"))for(;++o<u.length&&u[o][1].type!=="content";)u[o][1].type==="chunkText"&&(u[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,QC(f,n)),n=t[n],c=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(s=f.get(o),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=o);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},l=f.slice(i,n),l.unshift(r),f.splice(i,n-i+1,l))}}return ut(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!c}function QC(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const l=s.events,u=[],c={};let f,d,h=-1,p=n,y=0,x=0;const S=[x];for(;p;){for(;e.get(++i)[1]!==p;);o.push(i),p._tokenizer||(f=r.sliceStream(p),p.next||f.push(null),d&&s.defineSkip(p.start),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(f),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++h<l.length;)l[h][0]==="exit"&&l[h-1][0]==="enter"&&l[h][1].type===l[h-1][1].type&&l[h][1].start.line!==l[h][1].end.line&&(x=h+1,S.push(x),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(s.events=[],p?(p._tokenizer=void 0,p.previous=void 0):S.pop(),h=S.length;h--;){const g=l.slice(S[h],S[h+1]),m=o.pop();u.push([m,m+g.length-1]),e.splice(m,2,g)}for(u.reverse(),h=-1;++h<u.length;)c[y+u[h][0]]=y+u[h][1],y+=u[h][1]-u[h][0]-1;return c}const YC={resolve:JC,tokenize:ZC},XC={partial:!0,tokenize:eE};function JC(e){return Ey(e),e}function ZC(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(l)}function i(l){return l===null?o(l):Q(l)?e.check(XC,s,o)(l):(e.consume(l),i)}function o(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function s(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function eE(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),ie(e,o,"linePrefix")}function o(s){if(s===null||Q(s))return n(s);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function Ny(e,t,n,r,i,o,s,l,u){const c=u||Number.POSITIVE_INFINITY;let f=0;return d;function d(g){return g===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(g),e.exit(o),h):g===null||g===32||g===41||Fs(g)?n(g):(e.enter(r),e.enter(s),e.enter(l),e.enter("chunkString",{contentType:"string"}),x(g))}function h(g){return g===62?(e.enter(o),e.consume(g),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),p(g))}function p(g){return g===62?(e.exit("chunkString"),e.exit(l),h(g)):g===null||g===60||Q(g)?n(g):(e.consume(g),g===92?y:p)}function y(g){return g===60||g===62||g===92?(e.consume(g),p):p(g)}function x(g){return!f&&(g===null||g===41||de(g))?(e.exit("chunkString"),e.exit(l),e.exit(s),e.exit(r),t(g)):f<c&&g===40?(e.consume(g),f++,x):g===41?(e.consume(g),f--,x):g===null||g===32||g===40||Fs(g)?n(g):(e.consume(g),g===92?S:x)}function S(g){return g===40||g===41||g===92?(e.consume(g),x):x(g)}}function by(e,t,n,r,i,o){const s=this;let l=0,u;return c;function c(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(o),f}function f(p){return l>999||p===null||p===91||p===93&&!u||p===94&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?n(p):p===93?(e.exit(o),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):Q(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===null||p===91||p===93||Q(p)||l++>999?(e.exit("chunkString"),f(p)):(e.consume(p),u||(u=!Z(p)),p===92?h:d)}function h(p){return p===91||p===92||p===93?(e.consume(p),l++,d):d(p)}}function Ty(e,t,n,r,i,o){let s;return l;function l(h){return h===34||h===39||h===40?(e.enter(r),e.enter(i),e.consume(h),e.exit(i),s=h===40?41:h,u):n(h)}function u(h){return h===s?(e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):(e.enter(o),c(h))}function c(h){return h===s?(e.exit(o),u(s)):h===null?n(h):Q(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),ie(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===s||h===null||Q(h)?(e.exit("chunkString"),c(h)):(e.consume(h),h===92?d:f)}function d(h){return h===s||h===92?(e.consume(h),f):f(h)}}function Li(e,t){let n;return r;function r(i){return Q(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Z(i)?ie(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const tE={name:"definition",tokenize:rE},nE={partial:!0,tokenize:iE};function rE(e,t,n){const r=this;let i;return o;function o(p){return e.enter("definition"),s(p)}function s(p){return by.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function l(p){return i=zt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),u):n(p)}function u(p){return de(p)?Li(e,c)(p):c(p)}function c(p){return Ny(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function f(p){return e.attempt(nE,d,d)(p)}function d(p){return Z(p)?ie(e,h,"whitespace")(p):h(p)}function h(p){return p===null||Q(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function iE(e,t,n){return r;function r(l){return de(l)?Li(e,i)(l):n(l)}function i(l){return Ty(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function o(l){return Z(l)?ie(e,s,"whitespace")(l):s(l)}function s(l){return l===null||Q(l)?t(l):n(l)}}const oE={name:"hardBreakEscape",tokenize:sE};function sE(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return Q(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const lE={name:"headingAtx",resolve:aE,tokenize:uE};function aE(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},ut(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function uE(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),o(f)}function o(f){return e.enter("atxHeadingSequence"),s(f)}function s(f){return f===35&&r++<6?(e.consume(f),s):f===null||de(f)?(e.exit("atxHeadingSequence"),l(f)):n(f)}function l(f){return f===35?(e.enter("atxHeadingSequence"),u(f)):f===null||Q(f)?(e.exit("atxHeading"),t(f)):Z(f)?ie(e,l,"whitespace")(f):(e.enter("atxHeadingText"),c(f))}function u(f){return f===35?(e.consume(f),u):(e.exit("atxHeadingSequence"),l(f))}function c(f){return f===null||f===35||de(f)?(e.exit("atxHeadingText"),l(f)):(e.consume(f),c)}}const cE=["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"],Ch=["pre","script","style","textarea"],dE={concrete:!0,name:"htmlFlow",resolveTo:pE,tokenize:mE},fE={partial:!0,tokenize:yE},hE={partial:!0,tokenize:gE};function pE(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 mE(e,t,n){const r=this;let i,o,s,l,u;return c;function c(T){return f(T)}function f(T){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(T),d}function d(T){return T===33?(e.consume(T),h):T===47?(e.consume(T),o=!0,x):T===63?(e.consume(T),i=3,r.interrupt?t:w):We(T)?(e.consume(T),s=String.fromCharCode(T),S):n(T)}function h(T){return T===45?(e.consume(T),i=2,p):T===91?(e.consume(T),i=5,l=0,y):We(T)?(e.consume(T),i=4,r.interrupt?t:w):n(T)}function p(T){return T===45?(e.consume(T),r.interrupt?t:w):n(T)}function y(T){const Se="CDATA[";return T===Se.charCodeAt(l++)?(e.consume(T),l===Se.length?r.interrupt?t:V:y):n(T)}function x(T){return We(T)?(e.consume(T),s=String.fromCharCode(T),S):n(T)}function S(T){if(T===null||T===47||T===62||de(T)){const Se=T===47,rt=s.toLowerCase();return!Se&&!o&&Ch.includes(rt)?(i=1,r.interrupt?t(T):V(T)):cE.includes(s.toLowerCase())?(i=6,Se?(e.consume(T),g):r.interrupt?t(T):V(T)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(T):o?m(T):v(T))}return T===45||Be(T)?(e.consume(T),s+=String.fromCharCode(T),S):n(T)}function g(T){return T===62?(e.consume(T),r.interrupt?t:V):n(T)}function m(T){return Z(T)?(e.consume(T),m):N(T)}function v(T){return T===47?(e.consume(T),N):T===58||T===95||We(T)?(e.consume(T),b):Z(T)?(e.consume(T),v):N(T)}function b(T){return T===45||T===46||T===58||T===95||Be(T)?(e.consume(T),b):j(T)}function j(T){return T===61?(e.consume(T),E):Z(T)?(e.consume(T),j):v(T)}function E(T){return T===null||T===60||T===61||T===62||T===96?n(T):T===34||T===39?(e.consume(T),u=T,_):Z(T)?(e.consume(T),E):O(T)}function _(T){return T===u?(e.consume(T),u=null,R):T===null||Q(T)?n(T):(e.consume(T),_)}function O(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||de(T)?j(T):(e.consume(T),O)}function R(T){return T===47||T===62||Z(T)?v(T):n(T)}function N(T){return T===62?(e.consume(T),P):n(T)}function P(T){return T===null||Q(T)?V(T):Z(T)?(e.consume(T),P):n(T)}function V(T){return T===45&&i===2?(e.consume(T),F):T===60&&i===1?(e.consume(T),D):T===62&&i===4?(e.consume(T),J):T===63&&i===3?(e.consume(T),w):T===93&&i===5?(e.consume(T),B):Q(T)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(fE,se,$)(T)):T===null||Q(T)?(e.exit("htmlFlowData"),$(T)):(e.consume(T),V)}function $(T){return e.check(hE,H,se)(T)}function H(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),G}function G(T){return T===null||Q(T)?$(T):(e.enter("htmlFlowData"),V(T))}function F(T){return T===45?(e.consume(T),w):V(T)}function D(T){return T===47?(e.consume(T),s="",C):V(T)}function C(T){if(T===62){const Se=s.toLowerCase();return Ch.includes(Se)?(e.consume(T),J):V(T)}return We(T)&&s.length<8?(e.consume(T),s+=String.fromCharCode(T),C):V(T)}function B(T){return T===93?(e.consume(T),w):V(T)}function w(T){return T===62?(e.consume(T),J):T===45&&i===2?(e.consume(T),w):V(T)}function J(T){return T===null||Q(T)?(e.exit("htmlFlowData"),se(T)):(e.consume(T),J)}function se(T){return e.exit("htmlFlow"),t(T)}}function gE(e,t,n){const r=this;return i;function i(s){return Q(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o):n(s)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function yE(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(yo,t,n)}}const xE={name:"htmlText",tokenize:vE};function vE(e,t,n){const r=this;let i,o,s;return l;function l(w){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(w),u}function u(w){return w===33?(e.consume(w),c):w===47?(e.consume(w),j):w===63?(e.consume(w),v):We(w)?(e.consume(w),O):n(w)}function c(w){return w===45?(e.consume(w),f):w===91?(e.consume(w),o=0,y):We(w)?(e.consume(w),m):n(w)}function f(w){return w===45?(e.consume(w),p):n(w)}function d(w){return w===null?n(w):w===45?(e.consume(w),h):Q(w)?(s=d,D(w)):(e.consume(w),d)}function h(w){return w===45?(e.consume(w),p):d(w)}function p(w){return w===62?F(w):w===45?h(w):d(w)}function y(w){const J="CDATA[";return w===J.charCodeAt(o++)?(e.consume(w),o===J.length?x:y):n(w)}function x(w){return w===null?n(w):w===93?(e.consume(w),S):Q(w)?(s=x,D(w)):(e.consume(w),x)}function S(w){return w===93?(e.consume(w),g):x(w)}function g(w){return w===62?F(w):w===93?(e.consume(w),g):x(w)}function m(w){return w===null||w===62?F(w):Q(w)?(s=m,D(w)):(e.consume(w),m)}function v(w){return w===null?n(w):w===63?(e.consume(w),b):Q(w)?(s=v,D(w)):(e.consume(w),v)}function b(w){return w===62?F(w):v(w)}function j(w){return We(w)?(e.consume(w),E):n(w)}function E(w){return w===45||Be(w)?(e.consume(w),E):_(w)}function _(w){return Q(w)?(s=_,D(w)):Z(w)?(e.consume(w),_):F(w)}function O(w){return w===45||Be(w)?(e.consume(w),O):w===47||w===62||de(w)?R(w):n(w)}function R(w){return w===47?(e.consume(w),F):w===58||w===95||We(w)?(e.consume(w),N):Q(w)?(s=R,D(w)):Z(w)?(e.consume(w),R):F(w)}function N(w){return w===45||w===46||w===58||w===95||Be(w)?(e.consume(w),N):P(w)}function P(w){return w===61?(e.consume(w),V):Q(w)?(s=P,D(w)):Z(w)?(e.consume(w),P):R(w)}function V(w){return w===null||w===60||w===61||w===62||w===96?n(w):w===34||w===39?(e.consume(w),i=w,$):Q(w)?(s=V,D(w)):Z(w)?(e.consume(w),V):(e.consume(w),H)}function $(w){return w===i?(e.consume(w),i=void 0,G):w===null?n(w):Q(w)?(s=$,D(w)):(e.consume(w),$)}function H(w){return w===null||w===34||w===39||w===60||w===61||w===96?n(w):w===47||w===62||de(w)?R(w):(e.consume(w),H)}function G(w){return w===47||w===62||de(w)?R(w):n(w)}function F(w){return w===62?(e.consume(w),e.exit("htmlTextData"),e.exit("htmlText"),t):n(w)}function D(w){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),C}function C(w){return Z(w)?ie(e,B,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):B(w)}function B(w){return e.enter("htmlTextData"),s(w)}}const Qc={name:"labelEnd",resolveAll:CE,resolveTo:EE,tokenize:NE},kE={tokenize:bE},wE={tokenize:TE},SE={tokenize:jE};function CE(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&ut(e,0,e.length,n),e}function EE(e,t){let n=e.length,r=0,i,o,s,l;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const u={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[o][1].start},end:{...e[s][1].end}},f={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[s-2][1].start}};return l=[["enter",u,t],["enter",c,t]],l=vt(l,e.slice(o+1,o+r+3)),l=vt(l,[["enter",f,t]]),l=vt(l,cl(t.parser.constructs.insideSpan.null,e.slice(o+r+4,s-3),t)),l=vt(l,[["exit",f,t],e[s-2],e[s-1],["exit",c,t]]),l=vt(l,e.slice(s+1)),l=vt(l,[["exit",u,t]]),ut(e,o,e.length,l),e}function NE(e,t,n){const r=this;let i=r.events.length,o,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return l;function l(h){return o?o._inactive?d(h):(s=r.parser.defined.includes(zt(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),u):n(h)}function u(h){return h===40?e.attempt(kE,f,s?f:d)(h):h===91?e.attempt(wE,f,s?c:d)(h):s?f(h):d(h)}function c(h){return e.attempt(SE,f,d)(h)}function f(h){return t(h)}function d(h){return o._balanced=!0,n(h)}}function bE(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return de(d)?Li(e,o)(d):o(d)}function o(d){return d===41?f(d):Ny(e,s,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function s(d){return de(d)?Li(e,u)(d):f(d)}function l(d){return n(d)}function u(d){return d===34||d===39||d===40?Ty(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):f(d)}function c(d){return de(d)?Li(e,f)(d):f(d)}function f(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function TE(e,t,n){const r=this;return i;function i(l){return by.call(r,e,o,s,"reference","referenceMarker","referenceString")(l)}function o(l){return r.parser.defined.includes(zt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function s(l){return n(l)}}function jE(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const _E={name:"labelStartImage",resolveAll:Qc.resolveAll,tokenize:IE};function IE(e,t,n){const r=this;return i;function i(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),o}function o(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),s):n(l)}function s(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const AE={name:"labelStartLink",resolveAll:Qc.resolveAll,tokenize:RE};function RE(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),o}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const ea={name:"lineEnding",tokenize:PE};function PE(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),ie(e,t,"linePrefix")}}const us={name:"thematicBreak",tokenize:OE};function OE(e,t,n){let r=0,i;return o;function o(c){return e.enter("thematicBreak"),s(c)}function s(c){return i=c,l(c)}function l(c){return c===i?(e.enter("thematicBreakSequence"),u(c)):r>=3&&(c===null||Q(c))?(e.exit("thematicBreak"),t(c)):n(c)}function u(c){return c===i?(e.consume(c),r++,u):(e.exit("thematicBreakSequence"),Z(c)?ie(e,l,"whitespace")(c):l(c))}}const Ye={continuation:{tokenize:zE},exit:BE,name:"list",tokenize:FE},DE={partial:!0,tokenize:UE},LE={partial:!0,tokenize:ME};function FE(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return l;function l(p){const y=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(y==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:wu(p)){if(r.containerState.type||(r.containerState.type=y,e.enter(y,{_container:!0})),y==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(us,n,c)(p):c(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(p)}return n(p)}function u(p){return wu(p)&&++s<10?(e.consume(p),u):(!r.interrupt||s<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),c(p)):n(p)}function c(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(yo,r.interrupt?n:f,e.attempt(DE,h,d))}function f(p){return r.containerState.initialBlankLine=!0,o++,h(p)}function d(p){return Z(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),h):n(p)}function h(p){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function zE(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(yo,i,o);function i(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ie(e,t,"listItemIndent",r.containerState.size+1)(l)}function o(l){return r.containerState.furtherBlankLines||!Z(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(LE,t,s)(l))}function s(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,ie(e,e.attempt(Ye,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function ME(e,t,n){const r=this;return ie(e,i,"listItemIndent",r.containerState.size+1);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(o):n(o)}}function BE(e){e.exit(this.containerState.type)}function UE(e,t,n){const r=this;return ie(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const s=r.events[r.events.length-1];return!Z(o)&&s&&s[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const Eh={name:"setextUnderline",resolveTo:HE,tokenize:$E};function HE(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",s,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function $E(e,t,n){const r=this;let i;return o;function o(c){let f=r.events.length,d;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){d=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=c,s(c)):n(c)}function s(c){return e.enter("setextHeadingLineSequence"),l(c)}function l(c){return c===i?(e.consume(c),l):(e.exit("setextHeadingLineSequence"),Z(c)?ie(e,u,"lineSuffix")(c):u(c))}function u(c){return c===null||Q(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const WE={tokenize:VE};function VE(e){const t=this,n=e.attempt(yo,r,e.attempt(this.parser.constructs.flowInitial,i,ie(e,e.attempt(this.parser.constructs.flow,i,e.attempt(YC,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const qE={resolveAll:_y()},GE=jy("string"),KE=jy("text");function jy(e){return{resolveAll:_y(e==="text"?QE:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,s,l);return s;function s(f){return c(f)?o(f):l(f)}function l(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),u}function u(f){return c(f)?(n.exit("data"),o(f)):(n.consume(f),u)}function c(f){if(f===null)return!0;const d=i[f];let h=-1;if(d)for(;++h<d.length;){const p=d[h];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function _y(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function QE(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,s=-1,l=0,u;for(;o--;){const c=i[o];if(typeof c=="string"){for(s=c.length;c.charCodeAt(s-1)===32;)l++,s--;if(s)break;s=-1}else if(c===-2)u=!0,l++;else if(c!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const c={type:n===e.length||u||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?s:r.start._bufferIndex+s,_index:r.start._index+o,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}const YE={42:Ye,43:Ye,45:Ye,48:Ye,49:Ye,50:Ye,51:Ye,52:Ye,53:Ye,54:Ye,55:Ye,56:Ye,57:Ye,62:wy},XE={91:tE},JE={[-2]:Zl,[-1]:Zl,32:Zl},ZE={35:lE,42:us,45:[Eh,us],60:dE,61:Eh,95:us,96:Sh,126:Sh},eN={38:Cy,92:Sy},tN={[-5]:ea,[-4]:ea,[-3]:ea,33:_E,38:Cy,42:Su,60:[AC,xE],91:AE,92:[oE,Sy],93:Qc,95:Su,96:WC},nN={null:[Su,qE]},rN={null:[42,95]},iN={null:[]},oN=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:rN,contentInitial:XE,disable:iN,document:YE,flow:ZE,flowInitial:JE,insideSpan:nN,string:eN,text:tN},Symbol.toStringTag,{value:"Module"}));function sN(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let s=[],l=[];const u={attempt:_(j),check:_(E),consume:m,enter:v,exit:b,interrupt:_(E,{interrupt:!0})},c={code:null,containerState:{},defineSkip:x,events:[],now:y,parser:e,previous:null,sliceSerialize:h,sliceStream:p,write:d};let f=t.tokenize.call(c,u);return t.resolveAll&&o.push(t),c;function d(P){return s=vt(s,P),S(),s[s.length-1]!==null?[]:(O(t,0),c.events=cl(o,c.events,c),c.events)}function h(P,V){return aN(p(P),V)}function p(P){return lN(s,P)}function y(){const{_bufferIndex:P,_index:V,line:$,column:H,offset:G}=r;return{_bufferIndex:P,_index:V,line:$,column:H,offset:G}}function x(P){i[P.line]=P.column,N()}function S(){let P;for(;r._index<s.length;){const V=s[r._index];if(typeof V=="string")for(P=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===P&&r._bufferIndex<V.length;)g(V.charCodeAt(r._bufferIndex));else g(V)}}function g(P){f=f(P)}function m(P){Q(P)?(r.line++,r.column=1,r.offset+=P===-3?2:1,N()):P!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=P}function v(P,V){const $=V||{};return $.type=P,$.start=y(),c.events.push(["enter",$,c]),l.push($),$}function b(P){const V=l.pop();return V.end=y(),c.events.push(["exit",V,c]),V}function j(P,V){O(P,V.from)}function E(P,V){V.restore()}function _(P,V){return $;function $(H,G,F){let D,C,B,w;return Array.isArray(H)?se(H):"tokenize"in H?se([H]):J(H);function J(ue){return pt;function pt(Bt){const gn=Bt!==null&&ue[Bt],yn=Bt!==null&&ue.null,Vn=[...Array.isArray(gn)?gn:gn?[gn]:[],...Array.isArray(yn)?yn:yn?[yn]:[]];return se(Vn)(Bt)}}function se(ue){return D=ue,C=0,ue.length===0?F:T(ue[C])}function T(ue){return pt;function pt(Bt){return w=R(),B=ue,ue.partial||(c.currentConstruct=ue),ue.name&&c.parser.constructs.disable.null.includes(ue.name)?rt():ue.tokenize.call(V?Object.assign(Object.create(c),V):c,u,Se,rt)(Bt)}}function Se(ue){return P(B,w),G}function rt(ue){return w.restore(),++C<D.length?T(D[C]):F}}}function O(P,V){P.resolveAll&&!o.includes(P)&&o.push(P),P.resolve&&ut(c.events,V,c.events.length-V,P.resolve(c.events.slice(V),c)),P.resolveTo&&(c.events=P.resolveTo(c.events,c))}function R(){const P=y(),V=c.previous,$=c.currentConstruct,H=c.events.length,G=Array.from(l);return{from:H,restore:F};function F(){r=P,c.previous=V,c.currentConstruct=$,c.events.length=H,l=G,N()}}function N(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function lN(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,o)];else{if(s=e.slice(n,i),r>-1){const l=s[0];typeof l=="string"?s[0]=l.slice(r):s.shift()}o>0&&s.push(e[i].slice(0,o))}return s}function aN(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let s;if(typeof o=="string")s=o;else switch(o){case-5:{s="\r";break}case-4:{s=`
53
- `;break}case-3:{s=`\r
54
- `;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(o)}i=o===-2,r.push(s)}return r.join("")}function uN(e){const r={constructs:vy([oN,...(e||{}).extensions||[]]),content:i(EC),defined:[],document:i(bC),flow:i(WE),lazy:{},string:i(GE),text:i(KE)};return r;function i(o){return s;function s(l){return sN(r,o,l)}}}function cN(e){for(;!Ey(e););return e}const Nh=/[\0\t\n\r]/g;function dN(){let e=1,t="",n=!0,r;return i;function i(o,s,l){const u=[];let c,f,d,h,p;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(s||void 0).decode(o)),d=0,t="",n&&(o.charCodeAt(0)===65279&&d++,n=void 0);d<o.length;){if(Nh.lastIndex=d,c=Nh.exec(o),h=c&&c.index!==void 0?c.index:o.length,p=o.charCodeAt(h),!c){t=o.slice(d);break}if(p===10&&d===h&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),d<h&&(u.push(o.slice(d,h)),e+=h-d),p){case 0:{u.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,u.push(-2);e++<f;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}d=h+1}return l&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}const fN=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function hN(e){return e.replace(fN,pN)}function pN(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return ky(n.slice(o?2:1),o?16:10)}return Kc(n)||e}const Iy={}.hasOwnProperty;function mN(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),gN(n)(cN(uN(n).document().write(dN()(e,t,!0))))}function gN(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(mt),autolinkProtocol:R,autolinkEmail:R,atxHeading:o(vo),blockQuote:o(yn),characterEscape:R,characterReference:R,codeFenced:o(Vn),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(Vn,s),codeText:o(pl,s),codeTextData:R,data:R,codeFlowValue:R,definition:o(ml),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(gl),hardBreakEscape:o(I),hardBreakTrailing:o(I),htmlFlow:o(W,s),htmlFlowData:R,htmlText:o(W,s),htmlTextData:R,image:o(Te),label:s,link:o(mt),listItem:o(px),listItemValue:h,listOrdered:o(Ut,d),listUnordered:o(Ut),paragraph:o(mx),reference:T,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(vo),strong:o(gx),thematicBreak:o(xx)},exit:{atxHeading:u(),atxHeadingSequence:j,autolink:u(),autolinkEmail:gn,autolinkProtocol:Bt,blockQuote:u(),characterEscapeValue:N,characterReferenceMarkerHexadecimal:rt,characterReferenceMarkerNumeric:rt,characterReferenceValue:ue,characterReference:pt,codeFenced:u(S),codeFencedFence:x,codeFencedFenceInfo:p,codeFencedFenceMeta:y,codeFlowValue:N,codeIndented:u(g),codeText:u(G),codeTextData:N,data:N,definition:u(),definitionDestinationString:b,definitionLabelString:m,definitionTitleString:v,emphasis:u(),hardBreakEscape:u(V),hardBreakTrailing:u(V),htmlFlow:u($),htmlFlowData:N,htmlText:u(H),htmlTextData:N,image:u(D),label:B,labelText:C,lineEnding:P,link:u(F),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:Se,resourceDestinationString:w,resourceTitleString:J,resource:se,setextHeading:u(O),setextHeadingLineSequence:_,setextHeadingText:E,strong:u(),thematicBreak:u()}};Ay(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(A){let q={type:"root",children:[]};const Y={stack:[q],tokenStack:[],config:t,enter:l,exit:c,buffer:s,resume:f,data:n},te=[];let ce=-1;for(;++ce<A.length;)if(A[ce][1].type==="listOrdered"||A[ce][1].type==="listUnordered")if(A[ce][0]==="enter")te.push(ce);else{const bt=te.pop();ce=i(A,bt,ce)}for(ce=-1;++ce<A.length;){const bt=t[A[ce][0]];Iy.call(bt,A[ce][1].type)&&bt[A[ce][1].type].call(Object.assign({sliceSerialize:A[ce][2].sliceSerialize},Y),A[ce][1])}if(Y.tokenStack.length>0){const bt=Y.tokenStack[Y.tokenStack.length-1];(bt[1]||bh).call(Y,void 0,bt[0])}for(q.position={start:kn(A.length>0?A[0][1].start:{line:1,column:1,offset:0}),end:kn(A.length>0?A[A.length-2][1].end:{line:1,column:1,offset:0})},ce=-1;++ce<t.transforms.length;)q=t.transforms[ce](q)||q;return q}function i(A,q,Y){let te=q-1,ce=-1,bt=!1,qn,tn,ii,oi;for(;++te<=Y;){const it=A[te];switch(it[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{it[0]==="enter"?ce++:ce--,oi=void 0;break}case"lineEndingBlank":{it[0]==="enter"&&(qn&&!oi&&!ce&&!ii&&(ii=te),oi=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:oi=void 0}if(!ce&&it[0]==="enter"&&it[1].type==="listItemPrefix"||ce===-1&&it[0]==="exit"&&(it[1].type==="listUnordered"||it[1].type==="listOrdered")){if(qn){let gr=te;for(tn=void 0;gr--;){const nn=A[gr];if(nn[1].type==="lineEnding"||nn[1].type==="lineEndingBlank"){if(nn[0]==="exit")continue;tn&&(A[tn][1].type="lineEndingBlank",bt=!0),nn[1].type="lineEnding",tn=gr}else if(!(nn[1].type==="linePrefix"||nn[1].type==="blockQuotePrefix"||nn[1].type==="blockQuotePrefixWhitespace"||nn[1].type==="blockQuoteMarker"||nn[1].type==="listItemIndent"))break}ii&&(!tn||ii<tn)&&(qn._spread=!0),qn.end=Object.assign({},tn?A[tn][1].start:it[1].end),A.splice(tn||te,0,["exit",qn,it[2]]),te++,Y++}if(it[1].type==="listItemPrefix"){const gr={type:"listItem",_spread:!1,start:Object.assign({},it[1].start),end:void 0};qn=gr,A.splice(te,0,["enter",gr,it[2]]),te++,Y++,ii=void 0,oi=!0}}}return A[q][1]._spread=bt,Y}function o(A,q){return Y;function Y(te){l.call(this,A(te),te),q&&q.call(this,te)}}function s(){this.stack.push({type:"fragment",children:[]})}function l(A,q,Y){this.stack[this.stack.length-1].children.push(A),this.stack.push(A),this.tokenStack.push([q,Y||void 0]),A.position={start:kn(q.start),end:void 0}}function u(A){return q;function q(Y){A&&A.call(this,Y),c.call(this,Y)}}function c(A,q){const Y=this.stack.pop(),te=this.tokenStack.pop();if(te)te[0].type!==A.type&&(q?q.call(this,A,te[0]):(te[1]||bh).call(this,A,te[0]));else throw new Error("Cannot close `"+A.type+"` ("+Di({start:A.start,end:A.end})+"): it’s not open");Y.position.end=kn(A.end)}function f(){return Gc(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function h(A){if(this.data.expectingFirstListItemValue){const q=this.stack[this.stack.length-2];q.start=Number.parseInt(this.sliceSerialize(A),10),this.data.expectingFirstListItemValue=void 0}}function p(){const A=this.resume(),q=this.stack[this.stack.length-1];q.lang=A}function y(){const A=this.resume(),q=this.stack[this.stack.length-1];q.meta=A}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const A=this.resume(),q=this.stack[this.stack.length-1];q.value=A.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){const A=this.resume(),q=this.stack[this.stack.length-1];q.value=A.replace(/(\r?\n|\r)$/g,"")}function m(A){const q=this.resume(),Y=this.stack[this.stack.length-1];Y.label=q,Y.identifier=zt(this.sliceSerialize(A)).toLowerCase()}function v(){const A=this.resume(),q=this.stack[this.stack.length-1];q.title=A}function b(){const A=this.resume(),q=this.stack[this.stack.length-1];q.url=A}function j(A){const q=this.stack[this.stack.length-1];if(!q.depth){const Y=this.sliceSerialize(A).length;q.depth=Y}}function E(){this.data.setextHeadingSlurpLineEnding=!0}function _(A){const q=this.stack[this.stack.length-1];q.depth=this.sliceSerialize(A).codePointAt(0)===61?1:2}function O(){this.data.setextHeadingSlurpLineEnding=void 0}function R(A){const Y=this.stack[this.stack.length-1].children;let te=Y[Y.length-1];(!te||te.type!=="text")&&(te=yx(),te.position={start:kn(A.start),end:void 0},Y.push(te)),this.stack.push(te)}function N(A){const q=this.stack.pop();q.value+=this.sliceSerialize(A),q.position.end=kn(A.end)}function P(A){const q=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Y=q.children[q.children.length-1];Y.position.end=kn(A.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(q.type)&&(R.call(this,A),N.call(this,A))}function V(){this.data.atHardBreak=!0}function $(){const A=this.resume(),q=this.stack[this.stack.length-1];q.value=A}function H(){const A=this.resume(),q=this.stack[this.stack.length-1];q.value=A}function G(){const A=this.resume(),q=this.stack[this.stack.length-1];q.value=A}function F(){const A=this.stack[this.stack.length-1];if(this.data.inReference){const q=this.data.referenceType||"shortcut";A.type+="Reference",A.referenceType=q,delete A.url,delete A.title}else delete A.identifier,delete A.label;this.data.referenceType=void 0}function D(){const A=this.stack[this.stack.length-1];if(this.data.inReference){const q=this.data.referenceType||"shortcut";A.type+="Reference",A.referenceType=q,delete A.url,delete A.title}else delete A.identifier,delete A.label;this.data.referenceType=void 0}function C(A){const q=this.sliceSerialize(A),Y=this.stack[this.stack.length-2];Y.label=hN(q),Y.identifier=zt(q).toLowerCase()}function B(){const A=this.stack[this.stack.length-1],q=this.resume(),Y=this.stack[this.stack.length-1];if(this.data.inReference=!0,Y.type==="link"){const te=A.children;Y.children=te}else Y.alt=q}function w(){const A=this.resume(),q=this.stack[this.stack.length-1];q.url=A}function J(){const A=this.resume(),q=this.stack[this.stack.length-1];q.title=A}function se(){this.data.inReference=void 0}function T(){this.data.referenceType="collapsed"}function Se(A){const q=this.resume(),Y=this.stack[this.stack.length-1];Y.label=q,Y.identifier=zt(this.sliceSerialize(A)).toLowerCase(),this.data.referenceType="full"}function rt(A){this.data.characterReferenceType=A.type}function ue(A){const q=this.sliceSerialize(A),Y=this.data.characterReferenceType;let te;Y?(te=ky(q,Y==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):te=Kc(q);const ce=this.stack[this.stack.length-1];ce.value+=te}function pt(A){const q=this.stack.pop();q.position.end=kn(A.end)}function Bt(A){N.call(this,A);const q=this.stack[this.stack.length-1];q.url=this.sliceSerialize(A)}function gn(A){N.call(this,A);const q=this.stack[this.stack.length-1];q.url="mailto:"+this.sliceSerialize(A)}function yn(){return{type:"blockquote",children:[]}}function Vn(){return{type:"code",lang:null,meta:null,value:""}}function pl(){return{type:"inlineCode",value:""}}function ml(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function gl(){return{type:"emphasis",children:[]}}function vo(){return{type:"heading",depth:0,children:[]}}function I(){return{type:"break"}}function W(){return{type:"html",value:""}}function Te(){return{type:"image",title:null,url:"",alt:null}}function mt(){return{type:"link",title:null,url:"",children:[]}}function Ut(A){return{type:"list",ordered:A.type==="listOrdered",start:null,spread:A._spread,children:[]}}function px(A){return{type:"listItem",spread:A._spread,checked:null,children:[]}}function mx(){return{type:"paragraph",children:[]}}function gx(){return{type:"strong",children:[]}}function yx(){return{type:"text",value:""}}function xx(){return{type:"thematicBreak"}}}function kn(e){return{line:e.line,column:e.column,offset:e.offset}}function Ay(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Ay(e,r):yN(e,r)}}function yN(e,t){let n;for(n in t)if(Iy.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function bh(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Di({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Di({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Di({start:t.start,end:t.end})+") is still open")}function xN(e){const t=this;t.parser=n;function n(r){return mN(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function vN(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 kN(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
55
- `}]}function wN(e,t){const n=t.value?t.value+`
56
- `:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function SN(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function CN(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function EN(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=ri(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let s,l=e.footnoteCounts.get(r);l===void 0?(l=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=o+1,l+=1,e.footnoteCounts.set(r,l);const u={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,u);const c={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,c),e.applyData(t,c)}function NN(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 bN(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Ry(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function TN(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ry(e,t);const i={src:ri(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function jN(e,t){const n={src:ri(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function _N(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function IN(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ry(e,t);const i={href:ri(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function AN(e,t){const n={href:ri(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function RN(e,t,n){const r=e.all(t),i=n?PN(n):Py(t),o={},s=[];if(typeof t.checked=="boolean"){const f=r[0];let d;f&&f.type==="element"&&f.tagName==="p"?d=f:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let l=-1;for(;++l<r.length;){const f=r[l];(i||l!==0||f.type!=="element"||f.tagName!=="p")&&s.push({type:"text",value:`
57
- `}),f.type==="element"&&f.tagName==="p"&&!i?s.push(...f.children):s.push(f)}const u=r[r.length-1];u&&(i||u.type!=="element"||u.tagName!=="p")&&s.push({type:"text",value:`
58
- `});const c={type:"element",tagName:"li",properties:o,children:s};return e.patch(t,c),e.applyData(t,c)}function PN(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Py(n[r])}return t}function Py(e){const t=e.spread;return t??e.children.length>1}function ON(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const s=r[i];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function DN(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function LN(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function FN(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function zN(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),i.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=$c(t.children[1]),u=fy(t.children[t.children.length-1]);l&&u&&(s.position={start:l,end:u}),i.push(s)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function MN(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,l=s?s.length:t.children.length;let u=-1;const c=[];for(;++u<l;){const d=t.children[u],h={},p=s?s[u]:void 0;p&&(h.align=p);let y={type:"element",tagName:o,properties:h,children:[]};d&&(y.children=e.all(d),e.patch(d,y),y=e.applyData(d,y)),c.push(y)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,f),e.applyData(t,f)}function BN(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Th=9,jh=32;function UN(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(_h(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(_h(t.slice(i),i>0,!1)),o.join("")}function _h(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===Th||o===jh;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===Th||o===jh;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function HN(e,t){const n={type:"text",value:UN(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function $N(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const WN={blockquote:vN,break:kN,code:wN,delete:SN,emphasis:CN,footnoteReference:EN,heading:NN,html:bN,imageReference:TN,image:jN,inlineCode:_N,linkReference:IN,link:AN,listItem:RN,list:ON,paragraph:DN,root:LN,strong:FN,table:zN,tableCell:BN,tableRow:MN,text:HN,thematicBreak:$N,toml:Ho,yaml:Ho,definition:Ho,footnoteDefinition:Ho};function Ho(){}const Oy=-1,dl=0,Fi=1,zs=2,Yc=3,Xc=4,Jc=5,Zc=6,Dy=7,Ly=8,Ih=typeof self=="object"?self:globalThis,VN=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,s]=t[i];switch(o){case dl:case Oy:return n(s,i);case Fi:{const l=n([],i);for(const u of s)l.push(r(u));return l}case zs:{const l=n({},i);for(const[u,c]of s)l[r(u)]=r(c);return l}case Yc:return n(new Date(s),i);case Xc:{const{source:l,flags:u}=s;return n(new RegExp(l,u),i)}case Jc:{const l=n(new Map,i);for(const[u,c]of s)l.set(r(u),r(c));return l}case Zc:{const l=n(new Set,i);for(const u of s)l.add(r(u));return l}case Dy:{const{name:l,message:u}=s;return n(new Ih[l](u),i)}case Ly:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:l}=new Uint8Array(s);return n(new DataView(l),s)}}return n(new Ih[o](s),i)};return r},Ah=e=>VN(new Map,e)(0),vr="",{toString:qN}={},{keys:GN}=Object,xi=e=>{const t=typeof e;if(t!=="object"||!e)return[dl,t];const n=qN.call(e).slice(8,-1);switch(n){case"Array":return[Fi,vr];case"Object":return[zs,vr];case"Date":return[Yc,vr];case"RegExp":return[Xc,vr];case"Map":return[Jc,vr];case"Set":return[Zc,vr];case"DataView":return[Fi,n]}return n.includes("Array")?[Fi,n]:n.includes("Error")?[Dy,n]:[zs,n]},$o=([e,t])=>e===dl&&(t==="function"||t==="symbol"),KN=(e,t,n,r)=>{const i=(s,l)=>{const u=r.push(s)-1;return n.set(l,u),u},o=s=>{if(n.has(s))return n.get(s);let[l,u]=xi(s);switch(l){case dl:{let f=s;switch(u){case"bigint":l=Ly,f=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);f=null;break;case"undefined":return i([Oy],s)}return i([l,f],s)}case Fi:{if(u){let h=s;return u==="DataView"?h=new Uint8Array(s.buffer):u==="ArrayBuffer"&&(h=new Uint8Array(s)),i([u,[...h]],s)}const f=[],d=i([l,f],s);for(const h of s)f.push(o(h));return d}case zs:{if(u)switch(u){case"BigInt":return i([u,s.toString()],s);case"Boolean":case"Number":case"String":return i([u,s.valueOf()],s)}if(t&&"toJSON"in s)return o(s.toJSON());const f=[],d=i([l,f],s);for(const h of GN(s))(e||!$o(xi(s[h])))&&f.push([o(h),o(s[h])]);return d}case Yc:return i([l,s.toISOString()],s);case Xc:{const{source:f,flags:d}=s;return i([l,{source:f,flags:d}],s)}case Jc:{const f=[],d=i([l,f],s);for(const[h,p]of s)(e||!($o(xi(h))||$o(xi(p))))&&f.push([o(h),o(p)]);return d}case Zc:{const f=[],d=i([l,f],s);for(const h of s)(e||!$o(xi(h)))&&f.push(o(h));return d}}const{message:c}=s;return i([l,{name:u,message:c}],s)};return o},Rh=(e,{json:t,lossy:n}={})=>{const r=[];return KN(!(t||n),!!t,new Map,r)(e),r},Ms=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Ah(Rh(e,t)):structuredClone(e):(e,t)=>Ah(Rh(e,t));function QN(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 YN(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function XN(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||QN,r=e.options.footnoteBackLabel||YN,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let u=-1;for(;++u<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[u]);if(!c)continue;const f=e.all(c),d=String(c.identifier).toUpperCase(),h=ri(d.toLowerCase());let p=0;const y=[],x=e.footnoteCounts.get(d);for(;x!==void 0&&++p<=x;){y.length>0&&y.push({type:"text",value:" "});let m=typeof n=="string"?n:n(u,p);typeof m=="string"&&(m={type:"text",value:m}),y.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,p),className:["data-footnote-backref"]},children:Array.isArray(m)?m:[m]})}const S=f[f.length-1];if(S&&S.type==="element"&&S.tagName==="p"){const m=S.children[S.children.length-1];m&&m.type==="text"?m.value+=" ":S.children.push({type:"text",value:" "}),S.children.push(...y)}else f.push(...y);const g={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(f,!0)};e.patch(c,g),l.push(g)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Ms(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
59
- `},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:`
60
- `}]}}const fl=function(e){if(e==null)return tb;if(typeof e=="function")return hl(e);if(typeof e=="object")return Array.isArray(e)?JN(e):ZN(e);if(typeof e=="string")return eb(e);throw new Error("Expected function, string, or object as test")};function JN(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=fl(e[n]);return hl(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function ZN(e){const t=e;return hl(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function eb(e){return hl(t);function t(n){return n&&n.type===e}}function hl(e){return t;function t(n,r,i){return!!(nb(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function tb(){return!0}function nb(e){return e!==null&&typeof e=="object"&&"type"in e}const Fy=[],rb=!0,Cu=!1,ib="skip";function zy(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=fl(i),s=r?-1:1;l(e,void 0,[])();function l(u,c,f){const d=u&&typeof u=="object"?u:{};if(typeof d.type=="string"){const p=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(u.type+(p?"<"+p+">":""))+")"})}return h;function h(){let p=Fy,y,x,S;if((!t||o(u,c,f[f.length-1]||void 0))&&(p=ob(n(u,f)),p[0]===Cu))return p;if("children"in u&&u.children){const g=u;if(g.children&&p[0]!==ib)for(x=(r?g.children.length:-1)+s,S=f.concat(g);x>-1&&x<g.children.length;){const m=g.children[x];if(y=l(m,x,S)(),y[0]===Cu)return y;x=typeof y[1]=="number"?y[1]:x+s}}return p}}}function ob(e){return Array.isArray(e)?e:typeof e=="number"?[rb,e]:e==null?Fy:[e]}function ed(e,t,n,r){let i,o,s;typeof t=="function"&&typeof n!="function"?(o=void 0,s=t,i=n):(o=t,s=n,i=r),zy(e,o,l,i);function l(u,c){const f=c[c.length-1],d=f?f.children.indexOf(u):void 0;return s(u,d,f)}}const Eu={}.hasOwnProperty,sb={};function lb(e,t){const n=t||sb,r=new Map,i=new Map,o=new Map,s={...WN,...n.handlers},l={all:c,applyData:ub,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:s,one:u,options:n,patch:ab,wrap:db};return ed(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const d=f.type==="definition"?r:i,h=String(f.identifier).toUpperCase();d.has(h)||d.set(h,f)}}),l;function u(f,d){const h=f.type,p=l.handlers[h];if(Eu.call(l.handlers,h)&&p)return p(l,f,d);if(l.options.passThrough&&l.options.passThrough.includes(h)){if("children"in f){const{children:x,...S}=f,g=Ms(S);return g.children=l.all(f),g}return Ms(f)}return(l.options.unknownHandler||cb)(l,f,d)}function c(f){const d=[];if("children"in f){const h=f.children;let p=-1;for(;++p<h.length;){const y=l.one(h[p],f);if(y){if(p&&h[p-1].type==="break"&&(!Array.isArray(y)&&y.type==="text"&&(y.value=Ph(y.value)),!Array.isArray(y)&&y.type==="element")){const x=y.children[0];x&&x.type==="text"&&(x.value=Ph(x.value))}Array.isArray(y)?d.push(...y):d.push(y)}}}return d}}function ab(e,t){e.position&&(t.position=YS(e))}function ub(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const s="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:s}}n.type==="element"&&o&&Object.assign(n.properties,Ms(o)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function cb(e,t){const n=t.data||{},r="value"in t&&!(Eu.call(n,"hProperties")||Eu.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function db(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
61
- `});++r<e.length;)r&&n.push({type:"text",value:`
62
- `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
63
- `}),n}function Ph(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Oh(e,t){const n=lb(e,t),r=n.one(e,void 0),i=XN(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
64
- `},i),o}function fb(e,t){return e&&"run"in e?async function(n,r){const i=Oh(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Oh(n,{file:r,...e||t})}}function Dh(e){if(e)throw e}var cs=Object.prototype.hasOwnProperty,My=Object.prototype.toString,Lh=Object.defineProperty,Fh=Object.getOwnPropertyDescriptor,zh=function(t){return typeof Array.isArray=="function"?Array.isArray(t):My.call(t)==="[object Array]"},Mh=function(t){if(!t||My.call(t)!=="[object Object]")return!1;var n=cs.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&cs.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||cs.call(t,i)},Bh=function(t,n){Lh&&n.name==="__proto__"?Lh(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Uh=function(t,n){if(n==="__proto__")if(cs.call(t,n)){if(Fh)return Fh(t,n).value}else return;return t[n]},hb=function e(){var t,n,r,i,o,s,l=arguments[0],u=1,c=arguments.length,f=!1;for(typeof l=="boolean"&&(f=l,l=arguments[1]||{},u=2),(l==null||typeof l!="object"&&typeof l!="function")&&(l={});u<c;++u)if(t=arguments[u],t!=null)for(n in t)r=Uh(l,n),i=Uh(t,n),l!==i&&(f&&i&&(Mh(i)||(o=zh(i)))?(o?(o=!1,s=r&&zh(r)?r:[]):s=r&&Mh(r)?r:{},Bh(l,{name:n,newValue:e(f,s,i)})):typeof i<"u"&&Bh(l,{name:n,newValue:i}));return l};const ta=rp(hb);function Nu(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 pb(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);l(null,...i);function l(u,...c){const f=e[++o];let d=-1;if(u){s(u);return}for(;++d<i.length;)(c[d]===null||c[d]===void 0)&&(c[d]=i[d]);i=c,f?mb(f,l)(...c):s(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function mb(e,t){let n;return r;function r(...s){const l=e.length>s.length;let u;l&&s.push(i);try{u=e.apply(this,s)}catch(c){const f=c;if(l&&n)throw f;return i(f)}l||(u&&u.then&&typeof u.then=="function"?u.then(o,i):u instanceof Error?i(u):o(u))}function i(s,...l){n||(n=!0,t(s,...l))}function o(s){i(null,s)}}const Vt={basename:gb,dirname:yb,extname:xb,join:vb,sep:"/"};function gb(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');xo(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,l=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else s<0&&(o=!0,s=i+1),l>-1&&(e.codePointAt(i)===t.codePointAt(l--)?l<0&&(r=i):(l=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function yb(e){if(xo(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function xb(e){xo(e);let t=e.length,n=-1,r=0,i=-1,o=0,s;for(;t--;){const l=e.codePointAt(t);if(l===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),l===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function vb(...e){let t=-1,n;for(;++t<e.length;)xo(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":kb(n)}function kb(e){xo(e);const t=e.codePointAt(0)===47;let n=wb(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function wb(e,t){let n="",r=0,i=-1,o=0,s=-1,l,u;for(;++s<=e.length;){if(s<e.length)l=e.codePointAt(s);else{if(l===47)break;l=47}if(l===47){if(!(i===s-1||o===1))if(i!==s-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),i=s,o=0;continue}}else if(n.length>0){n="",r=0,i=s,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,o=0}else l===46&&o>-1?o++:o=-1}return n}function xo(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Sb={cwd:Cb};function Cb(){return"/"}function bu(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Eb(e){if(typeof e=="string")e=new URL(e);else if(!bu(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 Nb(e)}function Nb(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const na=["history","path","basename","stem","extname","dirname"];class By{constructor(t){let n;t?bu(t)?n={path:t}:typeof t=="string"||bb(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":Sb.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<na.length;){const o=na[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)na.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Vt.basename(this.path):void 0}set basename(t){ia(t,"basename"),ra(t,"basename"),this.path=Vt.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Vt.dirname(this.path):void 0}set dirname(t){Hh(this.basename,"dirname"),this.path=Vt.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Vt.extname(this.path):void 0}set extname(t){if(ra(t,"extname"),Hh(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=Vt.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){bu(t)&&(t=Eb(t)),ia(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Vt.basename(this.path,this.extname):void 0}set stem(t){ia(t,"stem"),ra(t,"stem"),this.path=Vt.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new He(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function ra(e,t){if(e&&e.includes(Vt.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Vt.sep+"`")}function ia(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Hh(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function bb(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Tb=function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o},jb={}.hasOwnProperty;class td extends Tb{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=pb()}copy(){const t=new td;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(ta(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(la("data",this.frozen),this.namespace[t]=n,this):jb.call(this.namespace,t)&&this.namespace[t]||void 0:t?(la("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Wo(t),r=this.parser||this.Parser;return oa("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),oa("process",this.parser||this.Parser),sa("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,s){const l=Wo(t),u=r.parse(l);r.run(u,l,function(f,d,h){if(f||!d||!h)return c(f);const p=d,y=r.stringify(p,h);Ab(y)?h.value=y:h.result=y,c(f,h)});function c(f,d){f||!d?s(f):o?o(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),oa("processSync",this.parser||this.Parser),sa("processSync",this.compiler||this.Compiler),this.process(t,i),Wh("processSync","process",n),r;function i(o,s){n=!0,Dh(o),r=s}}run(t,n,r){$h(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(s,l){const u=Wo(n);i.run(t,u,c);function c(f,d,h){const p=d||t;f?l(f):s?s(p):r(void 0,p,h)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),Wh("runSync","run",r),i;function o(s,l){Dh(s),i=l,r=!0}}stringify(t,n){this.freeze();const r=Wo(n),i=this.compiler||this.Compiler;return sa("stringify",i),$h(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(la("use",this.frozen),t!=null)if(typeof t=="function")u(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(c){if(typeof c=="function")u(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[f,...d]=c;u(f,d)}else s(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function s(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(c.plugins),c.settings&&(i.settings=ta(!0,i.settings,c.settings))}function l(c){let f=-1;if(c!=null)if(Array.isArray(c))for(;++f<c.length;){const d=c[f];o(d)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function u(c,f){let d=-1,h=-1;for(;++d<r.length;)if(r[d][0]===c){h=d;break}if(h===-1)r.push([c,...f]);else if(f.length>0){let[p,...y]=f;const x=r[h][1];Nu(x)&&Nu(p)&&(p=ta(!0,x,p)),r[h]=[c,p,...y]}}}}const _b=new td().freeze();function oa(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function sa(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function la(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 $h(e){if(!Nu(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Wh(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Wo(e){return Ib(e)?e:new By(e)}function Ib(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Ab(e){return typeof e=="string"||Rb(e)}function Rb(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Pb="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Vh=[],qh={allowDangerousHtml:!0},Ob=/^(https?|ircs?|mailto|xmpp)$/i,Db=[{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:"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 Lb(e){const t=Fb(e),n=zb(e);return Mb(t.runSync(t.parse(n),n),e)}function Fb(e){const t=e.rehypePlugins||Vh,n=e.remarkPlugins||Vh,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...qh}:qh;return _b().use(xN).use(n).use(fb,r).use(t)}function zb(e){const t=e.children||"",n=new By;return typeof t=="string"&&(n.value=t),n}function Mb(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,s=t.skipHtml,l=t.unwrapDisallowed,u=t.urlTransform||Bb;for(const f of Db)Object.hasOwn(t,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+Pb+f.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),ed(e,c),tC(e,{Fragment:a.Fragment,components:i,ignoreInvalidStyle:!0,jsx:a.jsx,jsxs:a.jsxs,passKeys:!0,passNode:!0});function c(f,d,h){if(f.type==="raw"&&h&&typeof d=="number")return s?h.children.splice(d,1):h.children[d]={type:"text",value:f.value},d;if(f.type==="element"){let p;for(p in Jl)if(Object.hasOwn(Jl,p)&&Object.hasOwn(f.properties,p)){const y=f.properties[p],x=Jl[p];(x===null||x.includes(f.tagName))&&(f.properties[p]=u(String(y||""),p,f))}}if(f.type==="element"){let p=n?!n.includes(f.tagName):o?o.includes(f.tagName):!1;if(!p&&r&&typeof d=="number"&&(p=!r(f,d,h)),p&&h&&typeof d=="number")return l&&f.children?h.children.splice(d,1,...f.children):h.children.splice(d,1),d}}}function Bb(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||Ob.test(e.slice(0,t))?e:""}function Gh(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Ub(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Uy(e,t,n){const i=fl((n||{}).ignore||[]),o=Hb(t);let s=-1;for(;++s<o.length;)zy(e,"text",l);function l(c,f){let d=-1,h;for(;++d<f.length;){const p=f[d],y=h?h.children:void 0;if(i(p,y?y.indexOf(p):void 0,h))return;h=p}if(h)return u(c,f)}function u(c,f){const d=f[f.length-1],h=o[s][0],p=o[s][1];let y=0;const S=d.children.indexOf(c);let g=!1,m=[];h.lastIndex=0;let v=h.exec(c.value);for(;v;){const b=v.index,j={index:v.index,input:v.input,stack:[...f,c]};let E=p(...v,j);if(typeof E=="string"&&(E=E.length>0?{type:"text",value:E}:void 0),E===!1?h.lastIndex=b+1:(y!==b&&m.push({type:"text",value:c.value.slice(y,b)}),Array.isArray(E)?m.push(...E):E&&m.push(E),y=b+v[0].length,g=!0),!h.global)break;v=h.exec(c.value)}return g?(y<c.value.length&&m.push({type:"text",value:c.value.slice(y)}),d.children.splice(S,1,...m)):m=[c],S+m.length}}function Hb(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([$b(i[0]),Wb(i[1])])}return t}function $b(e){return typeof e=="string"?new RegExp(Ub(e),"g"):e}function Wb(e){return typeof e=="function"?e:function(){return e}}const aa="phrasing",ua=["autolink","link","image","label"];function Vb(){return{transforms:[Jb],enter:{literalAutolink:Gb,literalAutolinkEmail:ca,literalAutolinkHttp:ca,literalAutolinkWww:ca},exit:{literalAutolink:Xb,literalAutolinkEmail:Yb,literalAutolinkHttp:Kb,literalAutolinkWww:Qb}}}function qb(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:aa,notInConstruct:ua},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:aa,notInConstruct:ua},{character:":",before:"[ps]",after:"\\/",inConstruct:aa,notInConstruct:ua}]}}function Gb(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function ca(e){this.config.enter.autolinkProtocol.call(this,e)}function Kb(e){this.config.exit.autolinkProtocol.call(this,e)}function Qb(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 Yb(e){this.config.exit.autolinkEmail.call(this,e)}function Xb(e){this.exit(e)}function Jb(e){Uy(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Zb],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),eT]],{ignore:["link","linkReference"]})}function Zb(e,t,n,r,i){let o="";if(!Hy(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!tT(n)))return!1;const s=nT(n+r);if(!s[0])return!1;const l={type:"link",title:null,url:o+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[l,{type:"text",value:s[1]}]:l}function eT(e,t,n,r){return!Hy(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function tT(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 nT(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=Gh(e,"(");let o=Gh(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function Hy(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||ur(n)||ul(n))&&(!t||n!==47)}$y.peek=dT;function rT(){this.buffer()}function iT(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function oT(){this.buffer()}function sT(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function lT(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=zt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function aT(e){this.exit(e)}function uT(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=zt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function cT(e){this.exit(e)}function dT(){return"["}function $y(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const s=n.enter("footnoteReference"),l=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{after:"]",before:o})),l(),s(),o+=i.move("]"),o}function fT(){return{enter:{gfmFootnoteCallString:rT,gfmFootnoteCall:iT,gfmFootnoteDefinitionLabelString:oT,gfmFootnoteDefinition:sT},exit:{gfmFootnoteCallString:lT,gfmFootnoteCall:aT,gfmFootnoteDefinitionLabelString:uT,gfmFootnoteDefinition:cT}}}function hT(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:$y},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,o,s){const l=o.createTracker(s);let u=l.move("[^");const c=o.enter("footnoteDefinition"),f=o.enter("label");return u+=l.move(o.safe(o.associationId(r),{before:u,after:"]"})),f(),u+=l.move("]:"),r.children&&r.children.length>0&&(l.shift(4),u+=l.move((t?`
65
- `:" ")+o.indentLines(o.containerFlow(r,l.current()),t?Wy:pT))),c(),u}}function pT(e,t,n){return t===0?e:Wy(e,t,n)}function Wy(e,t,n){return(n?"":" ")+e}const mT=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Vy.peek=kT;function gT(){return{canContainEols:["delete"],enter:{strikethrough:xT},exit:{strikethrough:vT}}}function yT(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:mT}],handlers:{delete:Vy}}}function xT(e){this.enter({type:"delete",children:[]},e)}function vT(e){this.exit(e)}function Vy(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),o(),s}function kT(){return"~"}function wT(e){return e.length}function ST(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||wT,o=[],s=[],l=[],u=[];let c=0,f=-1;for(;++f<e.length;){const x=[],S=[];let g=-1;for(e[f].length>c&&(c=e[f].length);++g<e[f].length;){const m=CT(e[f][g]);if(n.alignDelimiters!==!1){const v=i(m);S[g]=v,(u[g]===void 0||v>u[g])&&(u[g]=v)}x.push(m)}s[f]=x,l[f]=S}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<c;)o[d]=Kh(r[d]);else{const x=Kh(r);for(;++d<c;)o[d]=x}d=-1;const h=[],p=[];for(;++d<c;){const x=o[d];let S="",g="";x===99?(S=":",g=":"):x===108?S=":":x===114&&(g=":");let m=n.alignDelimiters===!1?1:Math.max(1,u[d]-S.length-g.length);const v=S+"-".repeat(m)+g;n.alignDelimiters!==!1&&(m=S.length+m+g.length,m>u[d]&&(u[d]=m),p[d]=m),h[d]=v}s.splice(1,0,h),l.splice(1,0,p),f=-1;const y=[];for(;++f<s.length;){const x=s[f],S=l[f];d=-1;const g=[];for(;++d<c;){const m=x[d]||"";let v="",b="";if(n.alignDelimiters!==!1){const j=u[d]-(S[d]||0),E=o[d];E===114?v=" ".repeat(j):E===99?j%2?(v=" ".repeat(j/2+.5),b=" ".repeat(j/2-.5)):(v=" ".repeat(j/2),b=v):b=" ".repeat(j)}n.delimiterStart!==!1&&!d&&g.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&m==="")&&(n.delimiterStart!==!1||d)&&g.push(" "),n.alignDelimiters!==!1&&g.push(v),g.push(m),n.alignDelimiters!==!1&&g.push(b),n.padding!==!1&&g.push(" "),(n.delimiterEnd!==!1||d!==c-1)&&g.push("|")}y.push(n.delimiterEnd===!1?g.join("").replace(/ +$/,""):g.join(""))}return y.join(`
66
- `)}function CT(e){return e==null?"":String(e)}function Kh(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 ET(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const s=n.indentLines(n.containerFlow(e,o.current()),NT);return i(),s}function NT(e,t,n){return">"+(n?"":" ")+e}function bT(e,t){return Qh(e,t.inConstruct,!0)&&!Qh(e,t.notInConstruct,!1)}function Qh(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Yh(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
67
- `&&bT(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
68
- `}function TT(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>s&&(s=o):o=1,i=r+t.length,r=n.indexOf(t,i);return s}function jT(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 _T(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 IT(e,t,n,r){const i=_T(n),o=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(jT(e,n)){const d=n.enter("codeIndented"),h=n.indentLines(o,AT);return d(),h}const l=n.createTracker(r),u=i.repeat(Math.max(TT(o,i)+1,3)),c=n.enter("codeFenced");let f=l.move(u);if(e.lang){const d=n.enter(`codeFencedLang${s}`);f+=l.move(n.safe(e.lang,{before:f,after:" ",encode:["`"],...l.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${s}`);f+=l.move(" "),f+=l.move(n.safe(e.meta,{before:f,after:`
69
- `,encode:["`"],...l.current()})),d()}return f+=l.move(`
70
- `),o&&(f+=l.move(o+`
71
- `)),f+=l.move(u),c(),f}function AT(e,t,n){return(n?"":" ")+e}function nd(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 RT(e,t,n,r){const i=nd(n),o=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let l=n.enter("label");const u=n.createTracker(r);let c=u.move("[");return c+=u.move(n.safe(n.associationId(e),{before:c,after:"]",...u.current()})),c+=u.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=u.move("<"),c+=u.move(n.safe(e.url,{before:c,after:">",...u.current()})),c+=u.move(">")):(l=n.enter("destinationRaw"),c+=u.move(n.safe(e.url,{before:c,after:e.title?" ":`
72
- `,...u.current()}))),l(),e.title&&(l=n.enter(`title${o}`),c+=u.move(" "+i),c+=u.move(n.safe(e.title,{before:c,after:i,...u.current()})),c+=u.move(i),l()),s(),c}function PT(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 oo(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Bs(e,t,n){const r=Kr(e),i=Kr(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}qy.peek=OT;function qy(e,t,n,r){const i=PT(n),o=n.enter("emphasis"),s=n.createTracker(r),l=s.move(i);let u=s.move(n.containerPhrasing(e,{after:i,before:l,...s.current()}));const c=u.charCodeAt(0),f=Bs(r.before.charCodeAt(r.before.length-1),c,i);f.inside&&(u=oo(c)+u.slice(1));const d=u.charCodeAt(u.length-1),h=Bs(r.after.charCodeAt(0),d,i);h.inside&&(u=u.slice(0,-1)+oo(d));const p=s.move(i);return o(),n.attentionEncodeSurroundingInfo={after:h.outside,before:f.outside},l+u+p}function OT(e,t,n){return n.options.emphasis||"*"}function DT(e,t){let n=!1;return ed(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Cu}),!!((!e.depth||e.depth<3)&&Gc(e)&&(t.options.setext||n))}function LT(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(DT(e,n)){const f=n.enter("headingSetext"),d=n.enter("phrasing"),h=n.containerPhrasing(e,{...o.current(),before:`
73
- `,after:`
74
- `});return d(),f(),h+`
75
- `+(i===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(`
76
- `))+1))}const s="#".repeat(i),l=n.enter("headingAtx"),u=n.enter("phrasing");o.move(s+" ");let c=n.containerPhrasing(e,{before:"# ",after:`
77
- `,...o.current()});return/^[\t ]/.test(c)&&(c=oo(c.charCodeAt(0))+c.slice(1)),c=c?s+" "+c:s,n.options.closeAtx&&(c+=" "+s),u(),l(),c}Gy.peek=FT;function Gy(e){return e.value||""}function FT(){return"<"}Ky.peek=zT;function Ky(e,t,n,r){const i=nd(n),o=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let l=n.enter("label");const u=n.createTracker(r);let c=u.move("![");return c+=u.move(n.safe(e.alt,{before:c,after:"]",...u.current()})),c+=u.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=u.move("<"),c+=u.move(n.safe(e.url,{before:c,after:">",...u.current()})),c+=u.move(">")):(l=n.enter("destinationRaw"),c+=u.move(n.safe(e.url,{before:c,after:e.title?" ":")",...u.current()}))),l(),e.title&&(l=n.enter(`title${o}`),c+=u.move(" "+i),c+=u.move(n.safe(e.title,{before:c,after:i,...u.current()})),c+=u.move(i),l()),c+=u.move(")"),s(),c}function zT(){return"!"}Qy.peek=MT;function Qy(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let s=n.enter("label");const l=n.createTracker(r);let u=l.move("![");const c=n.safe(e.alt,{before:u,after:"]",...l.current()});u+=l.move(c+"]["),s();const f=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:u,after:"]",...l.current()});return s(),n.stack=f,o(),i==="full"||!c||c!==d?u+=l.move(d+"]"):i==="shortcut"?u=u.slice(0,-1):u+=l.move("]"),u}function MT(){return"!"}Yy.peek=BT;function Yy(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const s=n.unsafe[o],l=n.compilePattern(s);let u;if(s.atBreak)for(;u=l.exec(r);){let c=u.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(u.index+1)}}return i+r+i}function BT(){return"`"}function Xy(e,t){const n=Gc(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))}Jy.peek=UT;function Jy(e,t,n,r){const i=nd(n),o=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let l,u;if(Xy(e,n)){const f=n.stack;n.stack=[],l=n.enter("autolink");let d=s.move("<");return d+=s.move(n.containerPhrasing(e,{before:d,after:">",...s.current()})),d+=s.move(">"),l(),n.stack=f,d}l=n.enter("link"),u=n.enter("label");let c=s.move("[");return c+=s.move(n.containerPhrasing(e,{before:c,after:"](",...s.current()})),c+=s.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),c+=s.move("<"),c+=s.move(n.safe(e.url,{before:c,after:">",...s.current()})),c+=s.move(">")):(u=n.enter("destinationRaw"),c+=s.move(n.safe(e.url,{before:c,after:e.title?" ":")",...s.current()}))),u(),e.title&&(u=n.enter(`title${o}`),c+=s.move(" "+i),c+=s.move(n.safe(e.title,{before:c,after:i,...s.current()})),c+=s.move(i),u()),c+=s.move(")"),l(),c}function UT(e,t,n){return Xy(e,n)?"<":"["}Zy.peek=HT;function Zy(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let s=n.enter("label");const l=n.createTracker(r);let u=l.move("[");const c=n.containerPhrasing(e,{before:u,after:"]",...l.current()});u+=l.move(c+"]["),s();const f=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:u,after:"]",...l.current()});return s(),n.stack=f,o(),i==="full"||!c||c!==d?u+=l.move(d+"]"):i==="shortcut"?u=u.slice(0,-1):u+=l.move("]"),u}function HT(){return"["}function rd(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 $T(e){const t=rd(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 WT(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 ex(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 VT(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let s=e.ordered?WT(n):rd(n);const l=e.ordered?s==="."?")":".":$T(n);let u=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&f&&(!f.children||!f.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&&(u=!0),ex(n)===s&&f){let d=-1;for(;++d<e.children.length;){const h=e.children[d];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(s=l),n.bulletCurrent=s;const c=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=o,i(),c}function qT(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 GT(e,t,n,r){const i=qT(n);let o=n.bulletCurrent||rd(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 s=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const l=n.createTracker(r);l.move(o+" ".repeat(s-o.length)),l.shift(s);const u=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,l.current()),f);return u(),c;function f(d,h,p){return h?(p?"":" ".repeat(s))+d:(p?o:o+" ".repeat(s-o.length))+d}}function KT(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),s=n.containerPhrasing(e,r);return o(),i(),s}const QT=fl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function YT(e,t,n,r){return(e.children.some(function(s){return QT(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function XT(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}tx.peek=JT;function tx(e,t,n,r){const i=XT(n),o=n.enter("strong"),s=n.createTracker(r),l=s.move(i+i);let u=s.move(n.containerPhrasing(e,{after:i,before:l,...s.current()}));const c=u.charCodeAt(0),f=Bs(r.before.charCodeAt(r.before.length-1),c,i);f.inside&&(u=oo(c)+u.slice(1));const d=u.charCodeAt(u.length-1),h=Bs(r.after.charCodeAt(0),d,i);h.inside&&(u=u.slice(0,-1)+oo(d));const p=s.move(i+i);return o(),n.attentionEncodeSurroundingInfo={after:h.outside,before:f.outside},l+u+p}function JT(e,t,n){return n.options.strong||"*"}function ZT(e,t,n,r){return n.safe(e.value,r)}function ej(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 tj(e,t,n){const r=(ex(n)+(n.options.ruleSpaces?" ":"")).repeat(ej(n));return n.options.ruleSpaces?r.slice(0,-1):r}const nx={blockquote:ET,break:Yh,code:IT,definition:RT,emphasis:qy,hardBreak:Yh,heading:LT,html:Gy,image:Ky,imageReference:Qy,inlineCode:Yy,link:Jy,linkReference:Zy,list:VT,listItem:GT,paragraph:KT,root:YT,strong:tx,text:ZT,thematicBreak:tj};function nj(){return{enter:{table:rj,tableData:Xh,tableHeader:Xh,tableRow:oj},exit:{codeText:sj,table:ij,tableData:da,tableHeader:da,tableRow:da}}}function rj(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 ij(e){this.exit(e),this.data.inTable=void 0}function oj(e){this.enter({type:"tableRow",children:[]},e)}function da(e){this.exit(e)}function Xh(e){this.enter({type:"tableCell",children:[]},e)}function sj(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,lj));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function lj(e,t){return t==="|"?t:e}function aj(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
78
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:h,table:s,tableCell:u,tableRow:l}};function s(p,y,x,S){return c(f(p,x,S),p.align)}function l(p,y,x,S){const g=d(p,x,S),m=c([g]);return m.slice(0,m.indexOf(`
79
- `))}function u(p,y,x,S){const g=x.enter("tableCell"),m=x.enter("phrasing"),v=x.containerPhrasing(p,{...S,before:o,after:o});return m(),g(),v}function c(p,y){return ST(p,{align:y,alignDelimiters:r,padding:n,stringLength:i})}function f(p,y,x){const S=p.children;let g=-1;const m=[],v=y.enter("table");for(;++g<S.length;)m[g]=d(S[g],y,x);return v(),m}function d(p,y,x){const S=p.children;let g=-1;const m=[],v=y.enter("tableRow");for(;++g<S.length;)m[g]=u(S[g],p,y,x);return v(),m}function h(p,y,x){let S=nx.inlineCode(p,y,x);return x.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}function uj(){return{exit:{taskListCheckValueChecked:Jh,taskListCheckValueUnchecked:Jh,paragraph:dj}}}function cj(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:fj}}}function Jh(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function dj(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,s;for(;++o<i.length;){const l=i[o];if(l.type==="paragraph"){s=l;break}}s===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function fj(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",l=n.createTracker(r);o&&l.move(s);let u=nx.listItem(e,t,n,{...r,...l.current()});return o&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),u;function c(f){return f+s}}function hj(){return[Vb(),fT(),gT(),nj(),uj()]}function pj(e){return{extensions:[qb(),hT(e),yT(),aj(e),cj()]}}const mj={tokenize:wj,partial:!0},rx={tokenize:Sj,partial:!0},ix={tokenize:Cj,partial:!0},ox={tokenize:Ej,partial:!0},gj={tokenize:Nj,partial:!0},sx={name:"wwwAutolink",tokenize:vj,previous:ax},lx={name:"protocolAutolink",tokenize:kj,previous:ux},mn={name:"emailAutolink",tokenize:xj,previous:cx},en={};function yj(){return{text:en}}let Gn=48;for(;Gn<123;)en[Gn]=mn,Gn++,Gn===58?Gn=65:Gn===91&&(Gn=97);en[43]=mn;en[45]=mn;en[46]=mn;en[95]=mn;en[72]=[mn,lx];en[104]=[mn,lx];en[87]=[mn,sx];en[119]=[mn,sx];function xj(e,t,n){const r=this;let i,o;return s;function s(d){return!Tu(d)||!cx.call(r,r.previous)||id(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(d))}function l(d){return Tu(d)?(e.consume(d),l):d===64?(e.consume(d),u):n(d)}function u(d){return d===46?e.check(gj,f,c)(d):d===45||d===95||Be(d)?(o=!0,e.consume(d),u):f(d)}function c(d){return e.consume(d),i=!0,u}function f(d){return o&&i&&We(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function vj(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!ax.call(r,r.previous)||id(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(mj,e.attempt(rx,e.attempt(ix,o),n),n)(s))}function o(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function kj(e,t,n){const r=this;let i="",o=!1;return s;function s(d){return(d===72||d===104)&&ux.call(r,r.previous)&&!id(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),l):n(d)}function l(d){if(We(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),l;if(d===58){const h=i.toLowerCase();if(h==="http"||h==="https")return e.consume(d),u}return n(d)}function u(d){return d===47?(e.consume(d),o?c:(o=!0,u)):n(d)}function c(d){return d===null||Fs(d)||de(d)||ur(d)||ul(d)?n(d):e.attempt(rx,e.attempt(ix,f),n)(d)}function f(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function wj(e,t,n){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),o):n(s)}function o(s){return s===null?n(s):t(s)}}function Sj(e,t,n){let r,i,o;return s;function s(c){return c===46||c===95?e.check(ox,u,l)(c):c===null||de(c)||ur(c)||c!==45&&ul(c)?u(c):(o=!0,e.consume(c),s)}function l(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),s}function u(c){return i||r||!o?n(c):t(c)}}function Cj(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?o(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(ox,t,o)(s):s===null||de(s)||ur(s)?t(s):(e.consume(s),i)}function o(s){return s===41&&r++,e.consume(s),i}}function Ej(e,t,n){return r;function r(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(e.consume(l),r):l===38?(e.consume(l),o):l===93?(e.consume(l),i):l===60||l===null||de(l)||ur(l)?t(l):n(l)}function i(l){return l===null||l===40||l===91||de(l)||ur(l)?t(l):r(l)}function o(l){return We(l)?s(l):n(l)}function s(l){return l===59?(e.consume(l),r):We(l)?(e.consume(l),s):n(l)}}function Nj(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return Be(o)?n(o):t(o)}}function ax(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||de(e)}function ux(e){return!We(e)}function cx(e){return!(e===47||Tu(e))}function Tu(e){return e===43||e===45||e===46||e===95||Be(e)}function id(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const bj={tokenize:Oj,partial:!0};function Tj(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Aj,continuation:{tokenize:Rj},exit:Pj}},text:{91:{name:"gfmFootnoteCall",tokenize:Ij},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:jj,resolveTo:_j}}}}function jj(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const u=r.events[i][1];if(u.type==="labelImage"){s=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return l;function l(u){if(!s||!s._balanced)return n(u);const c=zt(r.sliceSerialize({start:s.end,end:r.now()}));return c.codePointAt(0)!==94||!o.includes(c.slice(1))?n(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function _j(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},l=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",s,t],["exit",s,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...l),e}function Ij(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,s;return l;function l(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),u}function u(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(d){if(o>999||d===93&&!s||d===null||d===91||de(d))return n(d);if(d===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return i.includes(zt(r.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return de(d)||(s=!0),o++,e.consume(d),d===92?f:c}function f(d){return d===91||d===92||d===93?(e.consume(d),o++,c):c(d)}}function Aj(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,s=0,l;return u;function u(y){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(y){return y===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(y)}function f(y){if(s>999||y===93&&!l||y===null||y===91||de(y))return n(y);if(y===93){e.exit("chunkString");const x=e.exit("gfmFootnoteDefinitionLabelString");return o=zt(r.sliceSerialize(x)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return de(y)||(l=!0),s++,e.consume(y),y===92?d:f}function d(y){return y===91||y===92||y===93?(e.consume(y),s++,f):f(y)}function h(y){return y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),i.includes(o)||i.push(o),ie(e,p,"gfmFootnoteDefinitionWhitespace")):n(y)}function p(y){return t(y)}}function Rj(e,t,n){return e.check(yo,t,e.attempt(bj,t,n))}function Pj(e){e.exit("gfmFootnoteDefinition")}function Oj(e,t,n){const r=this;return ie(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(o):n(o)}}function Dj(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,l){let u=-1;for(;++u<s.length;)if(s[u][0]==="enter"&&s[u][1].type==="strikethroughSequenceTemporary"&&s[u][1]._close){let c=u;for(;c--;)if(s[c][0]==="exit"&&s[c][1].type==="strikethroughSequenceTemporary"&&s[c][1]._open&&s[u][1].end.offset-s[u][1].start.offset===s[c][1].end.offset-s[c][1].start.offset){s[u][1].type="strikethroughSequence",s[c][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},s[c][1].start),end:Object.assign({},s[u][1].end)},d={type:"strikethroughText",start:Object.assign({},s[c][1].end),end:Object.assign({},s[u][1].start)},h=[["enter",f,l],["enter",s[c][1],l],["exit",s[c][1],l],["enter",d,l]],p=l.parser.constructs.insideSpan.null;p&&ut(h,h.length,0,cl(p,s.slice(c+1,u),l)),ut(h,h.length,0,[["exit",d,l],["enter",s[u][1],l],["exit",s[u][1],l],["exit",f,l]]),ut(s,c-1,u-c+3,h),u=c+h.length-2;break}}for(u=-1;++u<s.length;)s[u][1].type==="strikethroughSequenceTemporary"&&(s[u][1].type="data");return s}function o(s,l,u){const c=this.previous,f=this.events;let d=0;return h;function h(y){return c===126&&f[f.length-1][1].type!=="characterEscape"?u(y):(s.enter("strikethroughSequenceTemporary"),p(y))}function p(y){const x=Kr(c);if(y===126)return d>1?u(y):(s.consume(y),d++,p);if(d<2&&!n)return u(y);const S=s.exit("strikethroughSequenceTemporary"),g=Kr(y);return S._open=!g||g===2&&!!x,S._close=!x||x===2&&!!g,l(y)}}}class Lj{constructor(){this.map=[]}add(t,n,r){Fj(this,t,n,r)}consume(t){if(this.map.sort(function(o,s){return o[0]-s[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const o of i)t.push(o);i=r.pop()}this.map.length=0}}function Fj(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function zj(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function Mj(){return{flow:{null:{name:"table",tokenize:Bj,resolveAll:Uj}}}}function Bj(e,t,n){const r=this;let i=0,o=0,s;return l;function l(N){let P=r.events.length-1;for(;P>-1;){const H=r.events[P][1].type;if(H==="lineEnding"||H==="linePrefix")P--;else break}const V=P>-1?r.events[P][1].type:null,$=V==="tableHead"||V==="tableRow"?E:u;return $===E&&r.parser.lazy[r.now().line]?n(N):$(N)}function u(N){return e.enter("tableHead"),e.enter("tableRow"),c(N)}function c(N){return N===124||(s=!0,o+=1),f(N)}function f(N){return N===null?n(N):Q(N)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),p):n(N):Z(N)?ie(e,f,"whitespace")(N):(o+=1,s&&(s=!1,i+=1),N===124?(e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),s=!0,f):(e.enter("data"),d(N)))}function d(N){return N===null||N===124||de(N)?(e.exit("data"),f(N)):(e.consume(N),N===92?h:d)}function h(N){return N===92||N===124?(e.consume(N),d):d(N)}function p(N){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(N):(e.enter("tableDelimiterRow"),s=!1,Z(N)?ie(e,y,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):y(N))}function y(N){return N===45||N===58?S(N):N===124?(s=!0,e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),x):j(N)}function x(N){return Z(N)?ie(e,S,"whitespace")(N):S(N)}function S(N){return N===58?(o+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(N),e.exit("tableDelimiterMarker"),g):N===45?(o+=1,g(N)):N===null||Q(N)?b(N):j(N)}function g(N){return N===45?(e.enter("tableDelimiterFiller"),m(N)):j(N)}function m(N){return N===45?(e.consume(N),m):N===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(N),e.exit("tableDelimiterMarker"),v):(e.exit("tableDelimiterFiller"),v(N))}function v(N){return Z(N)?ie(e,b,"whitespace")(N):b(N)}function b(N){return N===124?y(N):N===null||Q(N)?!s||i!==o?j(N):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(N)):j(N)}function j(N){return n(N)}function E(N){return e.enter("tableRow"),_(N)}function _(N){return N===124?(e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),_):N===null||Q(N)?(e.exit("tableRow"),t(N)):Z(N)?ie(e,_,"whitespace")(N):(e.enter("data"),O(N))}function O(N){return N===null||N===124||de(N)?(e.exit("data"),_(N)):(e.consume(N),N===92?R:O)}function R(N){return N===92||N===124?(e.consume(N),O):O(N)}}function Uj(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],s=[0,0,0,0],l=!1,u=0,c,f,d;const h=new Lj;for(;++n<e.length;){const p=e[n],y=p[1];p[0]==="enter"?y.type==="tableHead"?(l=!1,u!==0&&(Zh(h,t,u,c,f),f=void 0,u=0),c={type:"table",start:Object.assign({},y.start),end:Object.assign({},y.end)},h.add(n,0,[["enter",c,t]])):y.type==="tableRow"||y.type==="tableDelimiterRow"?(r=!0,d=void 0,o=[0,0,0,0],s=[0,n+1,0,0],l&&(l=!1,f={type:"tableBody",start:Object.assign({},y.start),end:Object.assign({},y.end)},h.add(n,0,[["enter",f,t]])),i=y.type==="tableDelimiterRow"?2:f?3:1):i&&(y.type==="data"||y.type==="tableDelimiterMarker"||y.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(o[1]!==0&&(s[0]=s[1],d=Vo(h,t,o,i,void 0,d),o=[0,0,0,0]),s[2]=n)):y.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(s[0]=s[1],d=Vo(h,t,o,i,void 0,d)),o=s,s=[o[1],n,0,0])):y.type==="tableHead"?(l=!0,u=n):y.type==="tableRow"||y.type==="tableDelimiterRow"?(u=n,o[1]!==0?(s[0]=s[1],d=Vo(h,t,o,i,n,d)):s[1]!==0&&(d=Vo(h,t,s,i,n,d)),i=0):i&&(y.type==="data"||y.type==="tableDelimiterMarker"||y.type==="tableDelimiterFiller")&&(s[3]=n)}for(u!==0&&Zh(h,t,u,c,f),h.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=zj(t.events,n))}return e}function Vo(e,t,n,r,i,o){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(o.end=Object.assign({},kr(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const u=kr(t.events,n[1]);if(o={type:s,start:Object.assign({},u),end:Object.assign({},u)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const c=kr(t.events,n[2]),f=kr(t.events,n[3]),d={type:l,start:Object.assign({},c),end:Object.assign({},f)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const h=t.events[n[2]],p=t.events[n[3]];if(h[1].end=Object.assign({},p[1].end),h[1].type="chunkText",h[1].contentType="text",n[3]>n[2]+1){const y=n[2]+1,x=n[3]-n[2]-1;e.add(y,x,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(o.end=Object.assign({},kr(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function Zh(e,t,n,r,i){const o=[],s=kr(t.events,n);i&&(i.end=Object.assign({},s),o.push(["exit",i,t])),r.end=Object.assign({},s),o.push(["exit",r,t]),e.add(n+1,0,o)}function kr(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Hj={name:"tasklistCheck",tokenize:Wj};function $j(){return{text:{91:Hj}}}function Wj(e,t,n){const r=this;return i;function i(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),o)}function o(u){return de(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),s):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),s):n(u)}function s(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(u)}function l(u){return Q(u)?t(u):Z(u)?e.check({tokenize:Vj},t,n)(u):n(u)}}function Vj(e,t,n){return ie(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function qj(e){return vy([yj(),Tj(),Dj(e),Mj(),$j()])}const Gj={};function Kj(e){const t=this,n=e||Gj,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(qj(n)),o.push(hj()),s.push(pj(n))}function Qj(e){Uy(e,[/\r?\n|\r/g,Yj])}function Yj(){return{type:"break"}}function Xj(){return function(e){Qj(e)}}function dx({content:e}){return a.jsx("div",{className:"context-markdownXXX",children:a.jsx(Lb,{remarkPlugins:[Kj,Xj],children:e.replace(/\\n/g,`
80
- `)})})}function Jj({commands:e,selectedIndex:t,position:n,onSelect:r,onCancel:i}){const o=k.useRef(null);return k.useEffect(()=>{const s=l=>{o.current&&!o.current.contains(l.target)&&i()};return document.addEventListener("mousedown",s),()=>{document.removeEventListener("mousedown",s)}},[i]),e.length===0?null:a.jsx("div",{ref:o,className:"slash-command-menu",style:{left:`${n.x}px`,top:`${n.y}px`},role:"listbox","aria-label":"Slash commands",children:e.map((s,l)=>a.jsxs("button",{type:"button",className:`slash-command-item ${l===t?"selected":""}`,onClick:()=>r(s),role:"option","aria-selected":l===t,children:[a.jsx("div",{className:"slash-command-label",children:s.label}),a.jsx("div",{className:"slash-command-description",children:s.description})]},s.id))})}const Zj=[{id:"h1",label:"/h1",trigger:"h1",markdown:{before:"# "},description:"Heading 1"},{id:"h2",label:"/h2",trigger:"h2",markdown:{before:"## "},description:"Heading 2"},{id:"h3",label:"/h3",trigger:"h3",markdown:{before:"### "},description:"Heading 3"},{id:"h4",label:"/h4",trigger:"h4",markdown:{before:"#### "},description:"Heading 4"},{id:"h5",label:"/h5",trigger:"h5",markdown:{before:"##### "},description:"Heading 5"},{id:"h6",label:"/h6",trigger:"h6",markdown:{before:"###### "},description:"Heading 6"},{id:"bold",label:"/bold",trigger:"bold",markdown:{before:"**",after:"**"},description:"Bold text"},{id:"italic",label:"/italic",trigger:"italic",markdown:{before:"_",after:"_"},description:"Italic text"},{id:"code",label:"/code",trigger:"code",markdown:{before:"`",after:"`"},description:"Inline code"},{id:"codeblock",label:"/codeblock",trigger:"codeblock",markdown:{before:"```\n",after:"\n```"},description:"Code block"},{id:"table",label:"/table",trigger:"table",markdown:{before:`| Column 1 | Column 2 |
81
- | --- | --- |
82
- | | |`},description:"Insert table"},{id:"list",label:"/list",trigger:"list",markdown:{before:"- "},description:"Bullet list"},{id:"numbered",label:"/numbered",trigger:"numbered",markdown:{before:"1. "},description:"Numbered list"},{id:"quote",label:"/quote",trigger:"quote",markdown:{before:"> "},description:"Block quote"},{id:"divider",label:"/divider",trigger:"div",markdown:{before:`
83
- ---
84
- `},description:"Horizontal divider"},{id:"link",label:"/link",trigger:"link",markdown:{before:"[",after:"](url)"},description:"Insert link"}];function e_(e,t){return{id:e.id,label:e.label,description:e.description,action:()=>t(e.markdown.before,e.markdown.after)}}function t_(e){return Zj.map(t=>e_(t,e))}function n_({value:e,onChange:t,placeholder:n,disabled:r}){const i=k.useRef(null),[o,s]=k.useState({active:!1,query:"",position:{x:0,y:0},selectedIndex:0,startPosition:0}),u=t_((y,x="")=>{if(!i.current)return;const S=i.current,g=o.startPosition,m=S.selectionEnd,v=e.substring(0,g),b=e.substring(m),j=v+y+x+b;t(j),s({...o,active:!1}),setTimeout(()=>{const E=g+y.length;S.focus(),S.setSelectionRange(E,E)},0)}),c=o.query?u.filter(y=>y.label.toLowerCase().includes(o.query.toLowerCase())):u,f=y=>{if(!o.active){if(y.key==="/"){const x=i.current;if(!x)return;const S=x.selectionStart,g=e.substring(0,S);if(S===0||g[S-1].match(/\s/)){const m=x.getBoundingClientRect(),v=24,b=g.split(`
85
- `).length;s({active:!0,query:"",position:{x:m.left+16,y:m.top+b*v+40},selectedIndex:0,startPosition:S})}}return}switch(y.key){case"Escape":y.preventDefault(),s({...o,active:!1});break;case"ArrowDown":y.preventDefault(),s({...o,selectedIndex:(o.selectedIndex+1)%c.length});break;case"ArrowUp":y.preventDefault(),s({...o,selectedIndex:o.selectedIndex===0?c.length-1:o.selectedIndex-1});break;case"Enter":case"Tab":y.preventDefault(),c[o.selectedIndex]&&c[o.selectedIndex].action();break;case"Backspace":const x=i.current;x&&x.selectionStart<=o.startPosition&&s({...o,active:!1});break}},d=y=>{const x=y.target.value;if(t(x),o.active&&i.current){const S=i.current.selectionStart,g=x.substring(o.startPosition+1,S);s({...o,query:g,selectedIndex:0})}},h=y=>{y.action()},p=()=>{s({...o,active:!1})};return a.jsx("div",{className:"rich-editor",children:a.jsxs("div",{className:"rich-editor-panes",children:[a.jsxs("div",{className:"rich-editor-pane rich-editor-edit",children:[a.jsx("div",{className:"rich-editor-label",children:"Edit"}),a.jsx("textarea",{ref:i,className:"rich-editor-textarea",value:e,onChange:d,onKeyDown:f,placeholder:n||"Write in markdown...",disabled:r,"aria-label":"Markdown editor"}),o.active&&a.jsx(Jj,{commands:c,selectedIndex:o.selectedIndex,position:o.position,onSelect:h,onCancel:p})]}),a.jsxs("div",{className:"rich-editor-pane rich-editor-preview",children:[a.jsx("div",{className:"rich-editor-label",children:"Preview"}),a.jsx("div",{className:"rich-editor-preview-content",children:e?a.jsx(dx,{content:e}):a.jsx("div",{className:"rich-editor-empty",children:"Nothing to preview yet"})})]})]})})}function r_(e,t){const n=new Set,r=[e];for(;r.length>0;){const i=r.shift();n.add(i),t.filter(s=>{const l=s.parentId;return typeof l=="string"&&l===i}).forEach(s=>r.push(s.id))}return n}function fx({mode:e,page:t,pages:n,onSubmit:r,onCancel:i,isSubmitting:o,defaultParentId:s}){var v;const[l,u]=k.useState((t==null?void 0:t.title)||""),[c,f]=k.useState((t==null?void 0:t.content)||""),[d,h]=k.useState(((v=t==null?void 0:t.tags)==null?void 0:v.map(b=>b.name))||[]),[p,y]=k.useState(()=>{if(e==="create"&&s)return s;const b=t==null?void 0:t.parentId;return typeof b=="string"?b:null}),[x,S]=k.useState(""),g=k.useMemo(()=>{if(e==="create")return n;{const b=r_(t.id,n);return n.filter(j=>!b.has(j.id))}},[e,n,t]);k.useEffect(()=>{const b=j=>{j.key==="Escape"&&i()};return document.addEventListener("keydown",b),()=>{document.removeEventListener("keydown",b)}},[i]);const m=async b=>{var j,E;b.preventDefault();try{if(e==="create"){const _={title:l.trim(),content:c.trim(),...d.length>0&&{tagNames:d},...p&&{parentId:p}};await r(_)}else{const _={};let O=!1;l!==t.title&&(_.title=l,O=!0),c!==t.content&&(_.content=c,O=!0);const R=((j=t.tags)==null?void 0:j.map(V=>V.name))||[];JSON.stringify(d.sort())!==JSON.stringify(R.sort())&&(_.tagNames=d,O=!0);const P=typeof t.parentId=="string"?t.parentId:null;if(p!==P&&(_.parentId=p,O=!0),!O){S("No changes to save");return}await r(_)}S("")}catch(_){const O=((E=_==null?void 0:_.body)==null?void 0:E.detail)||(_==null?void 0:_.message)||`Failed to ${e==="create"?"create":"update"} page`;S(O)}};return a.jsxs("form",{className:"context-form",onSubmit:m,children:[x&&a.jsx("div",{className:"context-error",style:{margin:"0 0 16px 0"},children:x}),a.jsxs("div",{className:"context-form-group",children:[a.jsx("label",{htmlFor:`${e}-title`,children:"Title *"}),a.jsx("input",{id:`${e}-title`,type:"text",value:l,onChange:b=>u(b.target.value),placeholder:"Give your page a headline",required:!0,disabled:o})]}),a.jsxs("div",{className:"context-form-group",children:[a.jsx("label",{htmlFor:`${e}-parent`,children:"Parent Page"}),a.jsxs("select",{id:`${e}-parent`,value:p??"",onChange:b=>y(b.target.value||null),disabled:o,children:[a.jsx("option",{value:"",children:"None (top level)"}),g.map(b=>a.jsx("option",{value:b.id,children:b.title},b.id))]})]}),a.jsxs("div",{className:"context-form-group",children:[a.jsx("label",{htmlFor:`${e}-content`,children:"Content *"}),a.jsx(n_,{value:c,onChange:f,placeholder:"Write in markdown or use / for commands",disabled:o})]}),a.jsxs("div",{className:"context-form-group",children:[a.jsx("label",{htmlFor:`${e}-tags`,children:"Tags"}),a.jsx(iS,{value:d,onChange:h,placeholder:"Type to add tags..."})]}),a.jsxs("div",{className:"context-form-actions",children:[a.jsx("button",{type:"button",className:"context-button secondary",onClick:i,disabled:o,children:"Cancel"}),a.jsx("button",{type:"submit",className:"context-button primary",disabled:o,children:o?"Saving…":e==="create"?"Create page":"Save Changes"})]})]})}function ep(){const e=Le(),{pageId:t}=fr(),{pages:n,isCreating:r,createPage:i,getPageTree:o}=mo(),s=async l=>{const u=await i(l);await o(),e(`/context/page/${u.id}`)};return a.jsxs("div",{className:"context-edit-container",children:[a.jsxs("div",{className:"context-edit-header",children:[a.jsx("h2",{children:"New Page"}),a.jsx("button",{onClick:()=>e("/context"),className:"context-button secondary",children:"Close"})]}),a.jsx(fx,{mode:"create",pages:n,onSubmit:s,onCancel:()=>e("/context"),isSubmitting:r,defaultParentId:t})]})}function od({message:e,onConfirm:t,onCancel:n,confirmText:r="Confirm",cancelText:i="Cancel"}){return a.jsx("div",{className:"confirm-overlay",onClick:n,children:a.jsxs("div",{className:"confirm-dialog",onClick:o=>o.stopPropagation(),children:[a.jsx("div",{className:"confirm-message",children:e}),a.jsxs("div",{className:"confirm-actions",children:[a.jsx("button",{onClick:n,className:"btn-secondary",children:i}),a.jsx("button",{onClick:t,className:"btn-danger",children:r})]})]})})}function i_(e,t){const n=[];let r=e;for(;r;){const i=t.find(s=>s.id===r);if(!i)break;n.unshift(i);const o=i.parentId;r=typeof o=="string"?o:null}return n}function o_({pageId:e,pages:t}){const n=i_(e,t);return a.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[a.jsx(ar,{to:"/context",className:"breadcrumb-link",children:"Home"}),n.map((r,i)=>a.jsxs("span",{className:"breadcrumb-item",children:[a.jsx("span",{className:"breadcrumb-separator",children:" > "}),i===n.length-1?a.jsx("span",{className:"breadcrumb-current",children:r.title}):a.jsx(ar,{to:`/context/page/${r.id}`,className:"breadcrumb-link",children:r.title})]},r.id))]})}function tp(e){try{return new Date(e).toLocaleString()}catch{return e}}function s_(){const{pageId:e}=fr(),t=Le(),{pages:n,selectedPage:r,isLoadingPage:i,isUpdating:o,isDeleting:s,error:l,selectPage:u,deletePage:c,getPageTree:f}=mo(),[d,h]=k.useState(!1),[p,y]=k.useState("");pr(r!=null&&r.title?`Context — ${r.title}`:"Context"),k.useEffect(()=>{e&&u(e)},[e,u]);const x=k.useCallback(()=>{h(!0)},[]),S=k.useCallback(async()=>{var g;if(e)try{await c(e),h(!1),await f(),t("/context")}catch(m){const v=((g=m==null?void 0:m.body)==null?void 0:g.detail)||(m==null?void 0:m.message)||"Failed to delete page";y(v),h(!1)}},[e,c,t,f]);return a.jsxs(a.Fragment,{children:[i&&a.jsx("div",{className:"context-status",children:"Loading page…"}),l&&a.jsx("div",{className:"context-error",children:l}),p&&a.jsx("div",{className:"context-error",children:p}),r&&e&&a.jsxs("div",{className:"context-page-detail",children:[a.jsx(o_,{pageId:e,pages:n}),a.jsxs("div",{className:"context-page-detail-header",children:[a.jsx("h1",{className:"context-page-detail-title",children:r.title}),a.jsxs("div",{className:"context-page-detail-meta",children:[a.jsxs("span",{children:["By ",r.createdBy||"unknown"]}),a.jsx("span",{children:"•"}),a.jsxs("span",{children:["Created ",tp(r.createdAt)]}),a.jsx("span",{children:"•"}),a.jsxs("span",{children:["Last edited ",tp(r.updatedAt)]})]})]}),r.tags&&r.tags.length>0&&a.jsx("div",{className:"context-page-detail-tags",children:r.tags.map(g=>a.jsx(iy,{tag:g},g.name))}),a.jsx("div",{className:"context-page-detail-content",children:a.jsx(dx,{content:r.content})}),a.jsxs("div",{className:"context-page-detail-actions",children:[a.jsx("button",{className:"context-button",type:"button",onClick:()=>t(`/context/page/${e}/edit`),disabled:o||s,children:"Edit"}),a.jsx("button",{className:"context-button context-button-danger",type:"button",onClick:x,disabled:o||s,children:"Delete"})]})]}),d&&a.jsx(od,{message:"Are you sure you want to delete this page? This action cannot be undone.",onConfirm:S,onCancel:()=>h(!1),confirmText:"Delete",cancelText:"Cancel"})]})}function l_(){const{pageId:e}=fr(),t=Le(),{selectedPage:n,pages:r,isUpdating:i,updatePage:o,getPageTree:s,selectPage:l}=mo();k.useEffect(()=>{e&&l(e)},[e,l]);const u=k.useCallback(async c=>{e&&(await o(e,c),await s(),t(`/context/page/${e}`))},[e,o,s,t]);return n?a.jsxs("div",{className:"context-edit-container",children:[a.jsxs("div",{className:"context-edit-header",children:[a.jsx("h2",{children:"Edit Page"}),a.jsx("button",{onClick:()=>t(`/context/page/${e}`),className:"context-button secondary",children:"Close"})]}),a.jsx(fx,{mode:"edit",page:n,pages:r,onSubmit:u,onCancel:()=>t(`/context/page/${e}`),isSubmitting:i})]}):a.jsx("div",{className:"context-status",children:"Loading..."})}L.BASE=hr;const hx=()=>{const[e,t]=k.useState(!1),[n,r]=k.useState(null),[i,o]=k.useState([]),[s,l]=k.useState(null),[u,c]=k.useState([]),[f,d]=k.useState([]),[h,p]=k.useState([]);k.useEffect(()=>{y()},[]);const y=async()=>{t(!0),r(null);try{const R=await Qe.mcpRegistryControllerListServers();o(R.items||[])}catch(R){r(R instanceof Error?R.message:"Failed to load servers")}finally{t(!1)}},x=async R=>{t(!0),r(null);try{const[N,P,V]=await Promise.all([Qe.mcpRegistryControllerGetServer(R),Qe.mcpRegistryControllerListScopes(R),Qe.mcpRegistryControllerListConnections(R)]);if(l(N),c(P||[]),d(V||[]),P&&P.length>0){const $=[];for(const H of P)try{const G=await Qe.mcpRegistryControllerListMappings(R,H.id);G&&$.push(...G)}catch(G){console.error(`Failed to load mappings for scope ${H.id}`,G)}p($)}}catch(N){r(N instanceof Error?N.message:"Failed to load server details")}finally{t(!1)}};return{isLoading:e,error:n,servers:i,selectedServer:s,scopes:u,connections:f,mappings:h,loadServers:y,loadServerDetails:x,createServer:async R=>{t(!0),r(null);try{const N=await Qe.mcpRegistryControllerCreateServer({...R,type:R.type??au.type.HTTP});return await y(),N}catch(N){throw r(N instanceof Error?N.message:"Failed to create server"),N}finally{t(!1)}},updateServer:async(R,N)=>{t(!0),r(null);try{const P=await Qe.mcpRegistryControllerUpdateServer(R,N);return(s==null?void 0:s.id)===R&&l(P),await y(),P}catch(P){throw r(P instanceof Error?P.message:"Failed to update server"),P}finally{t(!1)}},createScope:async(R,N,P)=>{t(!0),r(null);try{await Qe.mcpRegistryControllerCreateScopes(R,[{id:N,description:P}]),(s==null?void 0:s.id)===R&&await x(R)}catch(V){throw r(V instanceof Error?V.message:"Failed to create scope"),V}finally{t(!1)}},createConnection:async(R,N)=>{t(!0),r(null);try{await Qe.mcpRegistryControllerCreateConnection(R,N),(s==null?void 0:s.id)===R&&await x(R)}catch(P){throw r(P instanceof Error?P.message:"Failed to create connection"),P}finally{t(!1)}},updateConnection:async(R,N)=>{t(!0),r(null);try{await Qe.mcpRegistryControllerUpdateConnection(R,N),s&&await x(s.id)}catch(P){throw r(P instanceof Error?P.message:"Failed to update connection"),P}finally{t(!1)}},createMapping:async(R,N)=>{t(!0),r(null);try{await Qe.mcpRegistryControllerCreateMapping(R,N),(s==null?void 0:s.id)===R&&await x(R)}catch(P){throw r(P instanceof Error?P.message:"Failed to create mapping"),P}finally{t(!1)}},deleteScope:async(R,N)=>{t(!0),r(null);try{await Qe.mcpRegistryControllerDeleteScope(R,N),(s==null?void 0:s.id)===R&&await x(R)}catch(P){throw r(P instanceof Error?P.message:"Failed to delete scope"),P}finally{t(!1)}},deleteConnection:async R=>{t(!0),r(null);try{await Qe.mcpRegistryControllerDeleteConnection(R),s&&await x(s.id)}catch(N){throw r(N instanceof Error?N.message:"Failed to delete connection"),N}finally{t(!1)}},deleteMapping:async R=>{t(!0),r(null);try{await Qe.mcpRegistryControllerDeleteMapping(R),s&&await x(s.id)}catch(N){throw r(N instanceof Error?N.message:"Failed to delete mapping"),N}finally{t(!1)}}}};function a_(){pr("Tools");const{servers:e,isLoading:t,error:n,createServer:r}=hx(),i=Le(),[o,s]=k.useState(!1),[l,u]=k.useState({providedId:"",name:"",description:"",url:""}),c=async f=>{f.preventDefault();try{const d={...l,url:l.url||void 0},h=await r(d);s(!1),u({providedId:"",name:"",description:"",url:""}),h&&i(`/mcp-registry/${h.id}`)}catch(d){console.error("Failed to create server",d)}};return a.jsxs("div",{className:"mcp-registry",children:[a.jsxs("div",{className:"mcp-registry-header",children:[a.jsxs("div",{children:[a.jsx("h1",{children:"Tools"}),a.jsx("p",{className:"subtitle",children:"Manage Model Context Protocol servers and their configurations"})]}),a.jsxs("div",{className:"header-actions",children:[a.jsx(ro,{}),a.jsx("button",{onClick:()=>s(!0),className:"btn-primary",children:"+ Add Server"})]})]}),n&&a.jsx("div",{className:"error-message",children:n}),t?a.jsx("div",{className:"loading",children:"Loading servers..."}):a.jsx("div",{className:"servers-grid",children:e.length===0?a.jsxs("div",{className:"empty-state",children:[a.jsx("p",{children:"No MCP servers registered yet."}),a.jsx("button",{onClick:()=>s(!0),className:"btn-primary",children:"Create your first server"})]}):e.map(f=>a.jsxs("div",{className:"server-card",onClick:()=>i(`/mcp-registry/${f.id}`),children:[a.jsx("h3",{children:f.name}),a.jsxs("p",{className:"server-id",children:["ID: ",f.providedId]}),a.jsx("p",{className:"server-description",children:f.description})]},f.id))}),o&&a.jsx("div",{className:"modal-overlay",onClick:()=>s(!1),children:a.jsxs("div",{className:"modal-content",onClick:f=>f.stopPropagation(),children:[a.jsx("h2",{children:"Create MCP Server"}),a.jsxs("form",{onSubmit:c,children:[a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"providedId",children:"Server ID"}),a.jsx("input",{type:"text",id:"providedId",value:l.providedId,onChange:f=>u({...l,providedId:f.target.value}),placeholder:"e.g., my-mcp-server",required:!0}),a.jsx("small",{children:"Unique identifier for this server"})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"name",children:"Name"}),a.jsx("input",{type:"text",id:"name",value:l.name,onChange:f=>u({...l,name:f.target.value}),placeholder:"e.g., My MCP Server",required:!0})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"description",children:"Description"}),a.jsx("textarea",{id:"description",value:l.description,onChange:f=>u({...l,description:f.target.value}),placeholder:"Brief description of this server",rows:3,required:!0})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"url",children:"Server URL (optional)"}),a.jsx("input",{type:"url",id:"url",value:l.url,onChange:f=>u({...l,url:f.target.value}),placeholder:"e.g., http://localhost:3000/api/v1/tasks/tasks/mcp"}),a.jsx("small",{children:"URL that MCP clients will use to connect to this server"})]}),a.jsxs("div",{className:"form-actions",children:[a.jsx("button",{type:"button",onClick:()=>s(!1),className:"btn-secondary",children:"Cancel"}),a.jsx("button",{type:"submit",className:"btn-primary",children:"Create Server"})]})]})]})})]})}const u_=()=>{const[e,t]=k.useState(!1),[n,r]=k.useState(null),[i,o]=k.useState(null),[s,l]=k.useState(null),[u,c]=k.useState(null);async function f(h,p){t(!0),r(null);try{const y=Lg(),x=await fetch(`${y}/.well-known/oauth-authorization-server/mcp/issuer`);if(!x.ok)throw new Error("Failed to fetch authorization server issuer URL");const{issuer:S}=await x.json(),g=new URL(`${S}/mcp/${h}/${p}`);o(g);const m=new URL(`${g.origin}/.well-known/oauth-authorization-server${g.pathname}`);l(m),await d(m)}catch(y){r(y instanceof Error?y.message:"Failed to load authorization server configuration"),t(!1)}}async function d(h){t(!0),r(null);try{const y=await(await fetch(h.toString())).json();c(y)}catch(p){r(p instanceof Error?p.message:"Failed to load metadata"),c({})}finally{t(!1)}}return{isLoading:e,error:n,authorizationServerUrl:i,authorizationServerMetadataUrl:s,metadata:u,loadMetadata:f}};function c_(){const{serverId:e}=fr(),t=Le(),{selectedServer:n,scopes:r,connections:i,mappings:o,isLoading:s,error:l,loadServerDetails:u,createScope:c,createConnection:f,updateServer:d,updateConnection:h,createMapping:p,deleteScope:y,deleteConnection:x,deleteMapping:S}=hx(),{metadata:g,authorizationServerMetadataUrl:m,loadMetadata:v}=u_(),[b,j]=k.useState([]),[E,_]=k.useState(null),[O,R]=k.useState(null),[N,P]=k.useState(null),[V,$]=k.useState(!1),[H,G]=k.useState({name:"",description:"",url:""}),[F,D]=k.useState({scopeId:"",description:""}),[C,B]=k.useState({clientId:"",clientSecret:"",authorizeUrl:"",tokenUrl:"",friendlyName:"",providedId:""}),[w,J]=k.useState({scopeId:"",mappings:[{connectionId:"",downstreamScope:""}]});pr(n?`${n.name} - Tools`:"Tools"),k.useEffect(()=>{e&&(u(e),B1.authJourneysControllerGetAuthJourneys(e).then(j).catch(()=>j([])))},[e]),k.useEffect(()=>{n&&v(n.providedId,"0.0.0")},[n]);const se=()=>{n&&(G({name:n.name,description:n.description,url:n.url||""}),_("edit-server"))},T=async I=>{if(I.preventDefault(),!!e)try{const W={};H.name&&(W.name=H.name),H.description&&(W.description=H.description),H.url&&(W.url=H.url),await d(e,W),_(null),G({name:"",description:"",url:""})}catch(W){console.error("Failed to update server",W)}},Se=async I=>{if(I.preventDefault(),!!e)try{await c(e,F.scopeId,F.description),_(null),D({scopeId:"",description:""})}catch(W){console.error("Failed to create scope",W)}},rt=async I=>{if(I.preventDefault(),!!e)try{await f(e,C),_(null),B({clientId:"",clientSecret:"",authorizeUrl:"",tokenUrl:"",friendlyName:"",providedId:""})}catch(W){console.error("Failed to create connection",W)}},ue=I=>{const W=i.find(Te=>Te.id===I);W&&(P(I),B({clientId:W.clientId,clientSecret:"",authorizeUrl:W.authorizeUrl,tokenUrl:W.tokenUrl,friendlyName:W.friendlyName,providedId:W.providedId||""}),_("edit-connection"))},pt=async I=>{if(I.preventDefault(),!!N)try{const W={};C.friendlyName&&(W.friendlyName=C.friendlyName),C.providedId&&(W.providedId=C.providedId),C.clientId&&(W.clientId=C.clientId),C.clientSecret&&(W.clientSecret=C.clientSecret),C.authorizeUrl&&(W.authorizeUrl=C.authorizeUrl),C.tokenUrl&&(W.tokenUrl=C.tokenUrl),await h(N,W),_(null),P(null),B({clientId:"",clientSecret:"",authorizeUrl:"",tokenUrl:"",friendlyName:"",providedId:""})}catch(W){console.error("Failed to update connection",W)}},Bt=async I=>{if(I.preventDefault(),!!e)try{for(const W of w.mappings)await p(e,{scopeId:w.scopeId,connectionId:W.connectionId,downstreamScope:W.downstreamScope});_(null),J({scopeId:"",mappings:[{connectionId:"",downstreamScope:""}]})}catch(W){console.error("Failed to create mapping",W)}},gn=()=>{const I=w.mappings[w.mappings.length-1];J({...w,mappings:[...w.mappings,{connectionId:I.connectionId,downstreamScope:""}]})},yn=I=>{w.mappings.length!==1&&J({...w,mappings:w.mappings.filter((W,Te)=>Te!==I)})},Vn=(I,W,Te)=>{const mt=[...w.mappings];mt[I]={...mt[I],[W]:Te},J({...w,mappings:mt})},pl=async I=>{e&&R({message:"Are you sure you want to delete this scope?",onConfirm:async()=>{try{await y(e,I),R(null)}catch(W){console.error("Failed to delete scope",W),R(null)}}})},ml=async I=>{R({message:"Are you sure you want to delete this connection?",onConfirm:async()=>{try{await x(I),R(null)}catch(W){console.error("Failed to delete connection",W),R(null)}}})},gl=async I=>{R({message:"Are you sure you want to delete this mapping?",onConfirm:async()=>{try{await S(I),R(null)}catch(W){console.error("Failed to delete mapping",W),R(null)}}})},vo=k.useMemo(()=>{const I={};return o.forEach(W=>{const Te=r.find(Ut=>Ut.id===W.scopeId),mt=i.find(Ut=>Ut.id===W.connectionId);!Te||!mt||(I[W.scopeId]||(I[W.scopeId]={scope:Te,connections:{}}),I[W.scopeId].connections[W.connectionId]||(I[W.scopeId].connections[W.connectionId]={connection:mt,mappings:[]}),I[W.scopeId].connections[W.connectionId].mappings.push(W))}),I},[o,r,i]);return s&&!n?a.jsx("div",{className:"loading",children:"Loading server details..."}):n?a.jsxs("div",{className:"mcp-registry",children:[a.jsxs("div",{className:"mcp-registry-header",children:[a.jsxs("div",{children:[a.jsx("button",{onClick:()=>t("/mcp-registry"),className:"btn-back",children:"← Back to Registry"}),a.jsx("h1",{children:n.name}),a.jsx("p",{className:"subtitle",children:n.description}),a.jsxs("p",{className:"server-id",children:["ID: ",n.providedId]})]}),a.jsx("div",{className:"header-actions",children:a.jsx(ro,{})})]}),l&&a.jsx("div",{className:"error-message",children:l}),a.jsxs("div",{className:"info-section",children:[a.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[a.jsx("h2",{className:"section-title",children:"Information"}),a.jsx("button",{onClick:se,className:"btn-secondary btn-sm",children:"Edit"})]}),a.jsx("div",{className:"section-divider"}),a.jsxs("div",{className:"info-grid",children:[a.jsxs("div",{className:"info-item",children:[a.jsx("span",{className:"info-label",children:"Name"}),a.jsx("span",{className:"info-value",children:n.name})]}),a.jsxs("div",{className:"info-item",children:[a.jsx("span",{className:"info-label",children:"ID"}),a.jsx("span",{className:"info-value mono",children:n.providedId})]}),i.length>0&&a.jsxs("div",{className:"info-item",children:[a.jsx("span",{className:"info-label",children:"Connections"}),a.jsx("span",{className:"info-value",children:i.map(I=>I.friendlyName).join(", ")})]}),r.length>0&&a.jsxs("div",{className:"info-item",children:[a.jsx("span",{className:"info-label",children:"Scopes"}),a.jsx("span",{className:"info-value",children:r.map(I=>I.id).join(", ")})]}),n.url&&a.jsxs("div",{className:"info-item inspector-command-item",children:[a.jsx("span",{className:"info-label",children:"Inspector Command"}),a.jsxs("div",{className:"inspector-command",children:[a.jsxs("code",{className:"inspector-code",children:["npx @modelcontextprotocol/inspector --transport http --server-url ",n.url]}),a.jsx("button",{className:"btn-secondary btn-sm copy-btn",onClick:()=>{navigator.clipboard.writeText(`npx @modelcontextprotocol/inspector --transport http --server-url ${n.url}`)},title:"Copy to clipboard",children:"Copy"})]})]})]}),g?a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"section-divider"}),a.jsxs("div",{className:"metadata-section",children:[a.jsxs("div",{className:"metadata-header",children:[a.jsx("span",{className:"metadata-status",children:"✓ Authorization Server Metadata found"}),a.jsx("button",{onClick:()=>$(!V),className:"btn-link",children:V?"Hide":"Show"})]}),V&&a.jsxs("div",{className:"metadata-content",children:[a.jsx("p",{className:"metadata-url",children:m==null?void 0:m.toString()}),a.jsx("pre",{className:"metadata-json",children:JSON.stringify(g,null,2)})]})]})]}):null]}),a.jsxs("div",{className:"admin-section",children:[a.jsx("h2",{className:"section-title",children:"Administration"}),a.jsx("div",{className:"section-divider"}),a.jsxs("div",{className:"admin-subsection",children:[a.jsx("div",{className:"subsection-header",children:a.jsx("h3",{children:"Permissions"})}),a.jsx("p",{className:"subsection-description",children:"Define the scopes (permissions) that will be available for MCP clients to request when connecting to this server."}),r.length===0?a.jsx("div",{className:"proper-table",children:a.jsx("div",{className:"table-add-row",onClick:()=>_("scope"),children:a.jsx("div",{className:"add-row-cell",children:a.jsx("span",{className:"add-row-text",children:"Add permission..."})})})}):a.jsxs("div",{className:"proper-table",children:[a.jsxs("div",{className:"table-header",children:[a.jsx("div",{className:"table-col-name",children:"Scope Name"}),a.jsx("div",{className:"table-col-description",children:"Description"}),a.jsx("div",{className:"table-col-actions"})]}),r.map(I=>a.jsxs("div",{className:"table-body-row",children:[a.jsx("div",{className:"table-col-name",children:I.id}),a.jsx("div",{className:"table-col-description",children:I.description}),a.jsx("div",{className:"table-col-actions",children:a.jsx("button",{onClick:()=>pl(I.id),className:"btn-delete-small",children:"Delete"})})]},I.id)),a.jsx("div",{className:"table-add-row",onClick:()=>_("scope"),children:a.jsx("div",{className:"add-row-cell",children:a.jsx("span",{className:"add-row-text",children:"Add permission..."})})})]})]}),a.jsx("div",{className:"section-divider"}),a.jsxs("div",{className:"admin-subsection",children:[a.jsx("div",{className:"subsection-header",children:a.jsx("h3",{children:"Connections"})}),a.jsx("p",{className:"subsection-description",children:"Configure connections to downstream systems that support OAuth. The MCP server acts as a secure proxy, managing authentication and authorization on behalf of clients."}),i.length===0?a.jsx("div",{className:"proper-table",children:a.jsx("div",{className:"table-add-row",onClick:()=>_("connection"),children:a.jsx("div",{className:"add-row-cell",children:a.jsx("span",{className:"add-row-text",children:"Add connection..."})})})}):a.jsxs("div",{className:"proper-table",children:[a.jsxs("div",{className:"table-header",children:[a.jsx("div",{className:"table-col-name",children:"Connection Name"}),a.jsx("div",{className:"table-col-description",children:"Description"}),a.jsx("div",{className:"table-col-actions"})]}),i.map(I=>a.jsxs("div",{className:"table-body-row",children:[a.jsx("div",{className:"table-col-name",children:I.friendlyName}),a.jsx("div",{className:"table-col-description",children:I.providedId&&a.jsx("span",{className:"mono",children:I.providedId})}),a.jsxs("div",{className:"table-col-actions",children:[a.jsx("button",{onClick:()=>ue(I.id),className:"btn-secondary btn-sm",children:"Edit"}),a.jsx("button",{onClick:()=>ml(I.id),className:"btn-delete-small",children:"Delete"})]})]},I.id)),a.jsx("div",{className:"table-add-row",onClick:()=>_("connection"),children:a.jsx("div",{className:"add-row-cell",children:a.jsx("span",{className:"add-row-text",children:"Add connection..."})})})]})]}),i.length>0&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"section-divider"}),a.jsxs("div",{className:"admin-subsection",children:[a.jsx("div",{className:"subsection-header",children:a.jsx("h3",{children:"Scope Mappings"})}),a.jsx("p",{className:"subsection-description",children:"Map MCP server scopes to downstream connection scopes. When a client requests an MCP scope, the server will request the corresponding downstream scopes from the configured connections."}),o.length===0?a.jsx("div",{className:"mapping-group",children:a.jsx("div",{className:"table-add-row",onClick:()=>r.length>0&&_("mapping"),style:{opacity:r.length===0?.5:1,cursor:r.length===0?"not-allowed":"pointer"},children:a.jsx("span",{className:"add-row-text",children:r.length===0?"Add permissions first to create mappings...":"Add scope mapping..."})})}):a.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[Object.entries(vo).map(([I,W])=>a.jsxs("div",{className:"mapping-group",children:[a.jsxs("div",{className:"mapping-group-header",children:[W.scope.id," → ",Object.keys(W.connections).length," connection",Object.keys(W.connections).length!==1?"s":""]}),a.jsx("div",{className:"mapping-items",children:Object.entries(W.connections).map(([Te,mt])=>mt.mappings.map(Ut=>a.jsxs("div",{className:"mapping-item",children:[a.jsxs("div",{children:[a.jsx("div",{style:{fontSize:"14px",fontWeight:500,color:"#1a202c",marginBottom:"4px"},children:mt.connection.friendlyName}),a.jsx("div",{className:"mapping-item-scope",children:Ut.downstreamScope})]}),a.jsx("button",{onClick:()=>gl(Ut.id),className:"btn-delete-small",title:"Delete mapping",children:"Delete"})]},Ut.id)))})]},I)),a.jsx("div",{className:"mapping-group",children:a.jsx("div",{className:"table-add-row",onClick:()=>r.length>0&&_("mapping"),style:{opacity:r.length===0?.5:1,cursor:r.length===0?"not-allowed":"pointer"},children:a.jsx("span",{className:"add-row-text",children:r.length===0?"Add permissions first to create mappings...":"Add scope mapping..."})})})]})]})]})]}),a.jsxs("div",{className:"admin-section",children:[a.jsx("h2",{className:"section-title",children:"Authorizations"}),a.jsx("div",{className:"section-divider"}),a.jsx("p",{className:"subsection-description",style:{marginBottom:"16px"},children:"Live monitoring of MCP client authorizations and their authentication state"}),b.length===0?a.jsx("p",{style:{color:"#888",fontSize:"14px"},children:"No active authorizations"}):a.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:b.sort((I,W)=>new Date(W.updatedAt).getTime()-new Date(I.updatedAt).getTime()).map(I=>a.jsxs("div",{style:{backgroundColor:"#f8f9fa",border:"1px solid #e9ecef",borderRadius:"8px",padding:"16px"},children:[a.jsx("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",marginBottom:"12px"},children:a.jsxs("div",{style:{flex:1},children:[a.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"4px"},children:[a.jsx("h3",{style:{margin:0,fontSize:"16px",fontWeight:600},children:I.mcpAuthorizationFlow.clientName??"Unknown Client"}),a.jsx("span",{style:{fontSize:"11px",padding:"2px 8px",borderRadius:"4px",backgroundColor:I.status===Wt.status.AUTHORIZATION_CODE_EXCHANGED?"#d4edda":I.status===Wt.status.MCP_AUTH_FLOW_STARTED?"#cfe2ff":I.status===Wt.status.CONNECTIONS_FLOW_STARTED?"#fff3cd":I.status===Wt.status.USER_CONSENT_REJECTED?"#f8d7da":"#e2e3e5",color:I.status===Wt.status.AUTHORIZATION_CODE_EXCHANGED?"#155724":I.status===Wt.status.MCP_AUTH_FLOW_STARTED?"#084298":I.status===Wt.status.CONNECTIONS_FLOW_STARTED?"#664d03":I.status===Wt.status.USER_CONSENT_REJECTED?"#842029":"#383d41"},children:I.status.replace(/_/g," ").toUpperCase()})]}),a.jsxs("div",{style:{fontSize:"11px",color:"#6c757d",lineHeight:"1.5"},children:[I.actor&&a.jsxs("div",{style:{marginBottom:"4px"},children:[a.jsx("strong",{children:"User:"})," ",I.actor.displayName," (",I.actor.slug,")"]}),a.jsxs("div",{children:["Journey ID: ",I.id]}),a.jsxs("div",{children:["Started: ",new Date(I.createdAt).toLocaleString()]}),a.jsxs("div",{children:["Last Update: ",new Date(I.updatedAt).toLocaleString()]})]})]})}),a.jsxs("div",{style:{marginBottom:"12px",paddingLeft:"16px",borderLeft:"2px solid #dee2e6"},children:[a.jsx("div",{style:{fontSize:"14px",fontWeight:500,color:"#495057",marginBottom:"4px"},children:"MCP Authorization"}),a.jsxs("div",{style:{fontSize:"11px",color:"#6c757d",lineHeight:"1.5"},children:[a.jsxs("div",{children:["Status: ",a.jsx("span",{style:{fontWeight:500,color:I.mcpAuthorizationFlow.status===Pi.status.AUTHORIZATION_CODE_EXCHANGED?"#28a745":I.mcpAuthorizationFlow.status===Pi.status.CLIENT_REGISTERED?"#007bff":I.mcpAuthorizationFlow.status===Pi.status.USER_CONSENT_REJECTED?"#dc3545":"#6c757d"},children:I.mcpAuthorizationFlow.status.replace(/_/g," ")})]}),I.mcpAuthorizationFlow.scope&&a.jsxs("div",{children:["Scopes: ",I.mcpAuthorizationFlow.scope]}),I.mcpAuthorizationFlow.authorizationCodeExpiresAt&&a.jsxs("div",{children:["Code Expires: ",new Date(I.mcpAuthorizationFlow.authorizationCodeExpiresAt).toLocaleString()]}),a.jsxs("div",{children:["Code Used: ",I.mcpAuthorizationFlow.authorizationCodeUsed?"Yes":"No"]})]})]}),I.connectionAuthorizationFlows.length>0&&a.jsxs("div",{style:{paddingLeft:"16px",borderLeft:"2px solid #dee2e6"},children:[a.jsxs("div",{style:{fontSize:"14px",fontWeight:500,color:"#495057",marginBottom:"8px"},children:["Downstream Connections (",I.connectionAuthorizationFlows.length,")"]}),a.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:I.connectionAuthorizationFlows.map(W=>a.jsxs("div",{style:{backgroundColor:"#ffffff",borderRadius:"4px",padding:"12px"},children:[a.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"4px"},children:[a.jsx("span",{style:{fontSize:"14px",fontWeight:500},children:W.connectionName??"Unknown Connection"}),a.jsx("span",{style:{fontSize:"11px",padding:"2px 8px",borderRadius:"4px",backgroundColor:W.status===Cn.status.AUTHORIZED?"#d4edda":W.status===Cn.status.PENDING?"#fff3cd":(W.status===Cn.status.FAILED,"#f8d7da"),color:W.status===Cn.status.AUTHORIZED?"#155724":W.status===Cn.status.PENDING?"#664d03":W.status===Cn.status.FAILED?"#842029":"#721c24"},children:W.status})]}),a.jsxs("div",{style:{fontSize:"11px",color:"#6c757d",lineHeight:"1.5"},children:[W.tokenExpiresAt&&a.jsxs("div",{children:["Token Expires: ",new Date(W.tokenExpiresAt).toLocaleString()]}),a.jsxs("div",{children:["Created: ",new Date(W.createdAt).toLocaleString()]})]})]},W.id))})]})]},I.id))})]}),E==="scope"&&a.jsx("div",{className:"modal-overlay",onClick:()=>_(null),children:a.jsxs("div",{className:"modal-content",onClick:I=>I.stopPropagation(),children:[a.jsx("h2",{children:"Create Permission"}),a.jsxs("form",{onSubmit:Se,children:[a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"scopeId",children:"Scope ID"}),a.jsx("input",{type:"text",id:"scopeId",value:F.scopeId,onChange:I=>D({...F,scopeId:I.target.value}),placeholder:"e.g., tool:read",required:!0})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"scopeDescription",children:"Description"}),a.jsx("textarea",{id:"scopeDescription",value:F.description,onChange:I=>D({...F,description:I.target.value}),placeholder:"What does this scope provide?",rows:3,required:!0})]}),a.jsxs("div",{className:"form-actions",children:[a.jsx("button",{type:"button",onClick:()=>_(null),className:"btn-secondary",children:"Cancel"}),a.jsx("button",{type:"submit",className:"btn-primary",children:"Create Scope"})]})]})]})}),E==="connection"&&a.jsx("div",{className:"modal-overlay",onClick:()=>_(null),children:a.jsxs("div",{className:"modal-content",onClick:I=>I.stopPropagation(),children:[a.jsx("h2",{children:"Create Connection"}),a.jsxs("form",{onSubmit:rt,autoComplete:"off",children:[a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"friendlyName",children:"Friendly Name"}),a.jsx("input",{type:"text",id:"friendlyName",value:C.friendlyName,onChange:I=>B({...C,friendlyName:I.target.value}),placeholder:"e.g., GitHub OAuth",autoComplete:"off",required:!0})]}),a.jsxs("div",{className:"form-group",children:[a.jsxs("label",{htmlFor:"providedId",children:["Provided ID ",a.jsx("span",{style:{color:"#888",fontWeight:"normal"},children:"(optional)"})]}),a.jsx("input",{type:"text",id:"providedId",value:C.providedId,onChange:I=>B({...C,providedId:I.target.value}),placeholder:"e.g., google-oauth, github-integration",pattern:"[a-zA-Z0-9_-]+",title:"Only alphanumeric characters, dashes, and underscores are allowed",autoComplete:"off"}),a.jsx("small",{style:{color:"#888",fontSize:"0.85em",marginTop:"4px",display:"block"},children:"Unique identifier for token exchange (alphanumeric, dash, underscore only)"})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"clientId",children:"Client ID"}),a.jsx("input",{type:"text",id:"clientId",value:C.clientId,onChange:I=>B({...C,clientId:I.target.value}),autoComplete:"off",required:!0})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"clientSecret",children:"Client Secret"}),a.jsx("input",{type:"password",id:"clientSecret",value:C.clientSecret,onChange:I=>B({...C,clientSecret:I.target.value}),autoComplete:"new-password",required:!0})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"authorizeUrl",children:"Authorize URL"}),a.jsx("input",{type:"url",id:"authorizeUrl",value:C.authorizeUrl,onChange:I=>B({...C,authorizeUrl:I.target.value}),placeholder:"https://...",required:!0})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"tokenUrl",children:"Token URL"}),a.jsx("input",{type:"url",id:"tokenUrl",value:C.tokenUrl,onChange:I=>B({...C,tokenUrl:I.target.value}),placeholder:"https://...",required:!0})]}),a.jsxs("div",{className:"form-actions",children:[a.jsx("button",{type:"button",onClick:()=>_(null),className:"btn-secondary",children:"Cancel"}),a.jsx("button",{type:"submit",className:"btn-primary",children:"Create Connection"})]})]})]})}),E==="edit-connection"&&a.jsx("div",{className:"modal-overlay",onClick:()=>_(null),children:a.jsxs("div",{className:"modal-content",onClick:I=>I.stopPropagation(),children:[a.jsx("h2",{children:"Edit Connection"}),a.jsxs("form",{onSubmit:pt,autoComplete:"off",children:[a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"editFriendlyName",children:"Friendly Name"}),a.jsx("input",{type:"text",id:"editFriendlyName",value:C.friendlyName,onChange:I=>B({...C,friendlyName:I.target.value}),placeholder:"e.g., GitHub OAuth",autoComplete:"off",required:!0})]}),a.jsxs("div",{className:"form-group",children:[a.jsxs("label",{htmlFor:"editProvidedId",children:["Provided ID ",a.jsx("span",{style:{color:"#888",fontWeight:"normal"},children:"(optional)"})]}),a.jsx("input",{type:"text",id:"editProvidedId",value:C.providedId,onChange:I=>B({...C,providedId:I.target.value}),placeholder:"e.g., google-oauth, github-integration",pattern:"[a-zA-Z0-9_-]+",title:"Only alphanumeric characters, dashes, and underscores are allowed",autoComplete:"off"}),a.jsx("small",{style:{color:"#888",fontSize:"0.85em",marginTop:"4px",display:"block"},children:"Unique identifier for token exchange (alphanumeric, dash, underscore only)"})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"editClientId",children:"Client ID"}),a.jsx("input",{type:"text",id:"editClientId",value:C.clientId,onChange:I=>B({...C,clientId:I.target.value}),autoComplete:"off",required:!0})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"editClientSecret",children:"Client Secret (leave blank to keep current)"}),a.jsx("input",{type:"password",id:"editClientSecret",value:C.clientSecret,onChange:I=>B({...C,clientSecret:I.target.value}),placeholder:"Enter new secret or leave blank",autoComplete:"new-password"})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"editAuthorizeUrl",children:"Authorize URL"}),a.jsx("input",{type:"url",id:"editAuthorizeUrl",value:C.authorizeUrl,onChange:I=>B({...C,authorizeUrl:I.target.value}),placeholder:"https://...",required:!0})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"editTokenUrl",children:"Token URL"}),a.jsx("input",{type:"url",id:"editTokenUrl",value:C.tokenUrl,onChange:I=>B({...C,tokenUrl:I.target.value}),placeholder:"https://...",required:!0})]}),a.jsxs("div",{className:"form-actions",children:[a.jsx("button",{type:"button",onClick:()=>{_(null),P(null),B({clientId:"",clientSecret:"",authorizeUrl:"",tokenUrl:"",friendlyName:"",providedId:""})},className:"btn-secondary",children:"Cancel"}),a.jsx("button",{type:"submit",className:"btn-primary",children:"Update Connection"})]})]})]})}),E==="edit-server"&&a.jsx("div",{className:"modal-overlay",onClick:()=>_(null),children:a.jsxs("div",{className:"modal-content",onClick:I=>I.stopPropagation(),children:[a.jsx("h2",{children:"Edit Server"}),a.jsxs("form",{onSubmit:T,children:[a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"editServerName",children:"Name"}),a.jsx("input",{type:"text",id:"editServerName",value:H.name,onChange:I=>G({...H,name:I.target.value}),placeholder:"e.g., GitHub Integration",required:!0})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"editServerDescription",children:"Description"}),a.jsx("textarea",{id:"editServerDescription",value:H.description,onChange:I=>G({...H,description:I.target.value}),placeholder:"What does this server provide?",rows:3,required:!0})]}),a.jsxs("div",{className:"form-group",children:[a.jsxs("label",{htmlFor:"editServerUrl",children:["URL ",a.jsx("span",{style:{color:"#888",fontWeight:"normal"},children:"(optional)"})]}),a.jsx("input",{type:"url",id:"editServerUrl",value:H.url,onChange:I=>G({...H,url:I.target.value}),placeholder:"http://localhost:3000/api/v1/mcp"})]}),a.jsxs("div",{className:"form-actions",children:[a.jsx("button",{type:"button",onClick:()=>{_(null),G({name:"",description:"",url:""})},className:"btn-secondary",children:"Cancel"}),a.jsx("button",{type:"submit",className:"btn-primary",children:"Update Server"})]})]})]})}),E==="mapping"&&a.jsx("div",{className:"modal-overlay",onClick:()=>_(null),children:a.jsxs("div",{className:"modal-content",onClick:I=>I.stopPropagation(),children:[a.jsx("h2",{children:"Create Scope Mapping"}),a.jsxs("form",{onSubmit:Bt,children:[a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"mappingScopeId",children:"MCP Scope"}),a.jsxs("select",{id:"mappingScopeId",value:w.scopeId,onChange:I=>J({...w,scopeId:I.target.value}),required:!0,children:[a.jsx("option",{value:"",children:"Select a scope"}),r.map(I=>a.jsx("option",{value:I.id,children:I.id},I.id))]})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{children:"Connection & Downstream Scope Mappings"}),w.mappings.map((I,W)=>a.jsxs("div",{className:"mapping-row",children:[a.jsxs("select",{value:I.connectionId,onChange:Te=>Vn(W,"connectionId",Te.target.value),required:!0,className:"mapping-connection-select",children:[a.jsx("option",{value:"",children:"Select a connection"}),i.map(Te=>a.jsx("option",{value:Te.id,children:Te.friendlyName},Te.id))]}),a.jsx("input",{type:"text",value:I.downstreamScope,onChange:Te=>Vn(W,"downstreamScope",Te.target.value),placeholder:"e.g., repo:read",required:!0,className:"mapping-scope-input"}),w.mappings.length>1&&a.jsx("button",{type:"button",onClick:()=>yn(W),className:"btn-remove","aria-label":"Remove mapping",children:"×"})]},W)),a.jsx("button",{type:"button",onClick:gn,className:"btn-add-mapping",children:"+ Add Entry"})]}),a.jsxs("div",{className:"form-actions",children:[a.jsx("button",{type:"button",onClick:()=>_(null),className:"btn-secondary",children:"Cancel"}),a.jsx("button",{type:"submit",className:"btn-primary",children:"Create Mapping"})]})]})]})}),O&&a.jsx(od,{message:O.message,onConfirm:O.onConfirm,onCancel:()=>R(null)})]}):a.jsx("div",{className:"error-message",children:"Server not found"})}L.BASE=hr;function d_(){pr("Authorization Consent - taico");const[e]=w1(),t=e.get("flow"),[n,r]=k.useState(null),[i,o]=k.useState(!0),[s,l]=k.useState(null),[u,c]=k.useState(!1);k.useEffect(()=>{if(!t){l("No authorization flow ID provided"),o(!1);return}f()},[t]);const f=async()=>{if(t){o(!0),l(null);try{const y=await U1.authorizationControllerGetConsentMetadata(t);r(y)}catch(y){l(y instanceof Error?y.message:"Failed to load authorization details")}finally{o(!1)}}},d=async y=>{if(!(!n||!t)){c(!0),l(null);try{const x={flow_id:t,approved:y},S=L.BASE??"",g=document.createElement("form");g.method="POST",g.action=`${S}/api/v1/auth/authorize/mcp/${n.server.providedId}/0.0.0`,Object.entries(x).forEach(([m,v])=>{const b=document.createElement("input");b.type="hidden",b.name=m,b.value=String(v),g.appendChild(b)}),document.body.appendChild(g),g.submit()}catch(x){l(x instanceof Error?x.message:"Failed to submit consent decision"),c(!1)}}},h=()=>{n&&d(!0)},p=()=>{n&&d(!1)};return i?a.jsx("div",{className:"consent-page",children:a.jsx("div",{className:"consent-container",children:a.jsxs("div",{className:"loading-state",children:[a.jsx("div",{className:"spinner"}),a.jsx("p",{children:"Loading authorization details..."})]})})}):s||!n?a.jsx("div",{className:"consent-page",children:a.jsx("div",{className:"consent-container",children:a.jsxs("div",{className:"error-state",children:[a.jsx("h1",{children:"Authorization Error"}),a.jsx("p",{className:"error-message",children:s||"Invalid authorization request"}),a.jsx(ro,{})]})})}):a.jsx("div",{className:"consent-page",children:a.jsxs("div",{className:"consent-container",children:[a.jsxs("div",{className:"consent-header",children:[a.jsx("div",{className:"oauth-icon",children:"🔐"}),a.jsx("h1",{children:"Authorization Request"}),a.jsx("p",{className:"subtitle",children:"Review the following authorization request carefully"})]}),a.jsxs("div",{className:"consent-details",children:[a.jsxs("div",{className:"detail-section",children:[a.jsx("h2",{children:"WHO is requesting access"}),a.jsxs("div",{className:"client-info",children:[a.jsxs("div",{className:"info-row",children:[a.jsx("span",{className:"label",children:"Client Name:"}),a.jsx("span",{className:"value",children:n.client.clientName})]}),a.jsxs("div",{className:"info-row",children:[a.jsx("span",{className:"label",children:"Client ID:"}),a.jsx("span",{className:"value",children:a.jsx("code",{children:n.client.clientId})})]})]})]}),a.jsxs("div",{className:"detail-section",children:[a.jsx("h2",{children:"WHAT access is requested"}),n.scopes&&n.scopes.length>0?a.jsxs(a.Fragment,{children:[a.jsx("ul",{className:"scopes-list",children:n.scopes.map(y=>a.jsx("li",{children:a.jsx("span",{className:"scope-badge",children:y})},y))}),a.jsx("p",{style:{marginTop:"12px",fontSize:"13px",color:"#7f8c8d",marginBottom:0},children:"These permissions determine what the client can do on your behalf."})]}):a.jsx("p",{style:{fontSize:"13px",color:"#7f8c8d",marginBottom:0},children:"No specific permissions requested."})]}),a.jsxs("div",{className:"detail-section",children:[a.jsx("h2",{children:"WHERE access is granted"}),a.jsxs("div",{className:"server-info",children:[a.jsx("div",{className:"server-name",children:n.server.name}),a.jsxs("div",{className:"server-id",children:["Server ID: ",n.server.providedId]})]}),a.jsxs("div",{className:"resource-info",style:{marginTop:"16px"},children:[a.jsx("div",{style:{fontSize:"13px",color:"#7f8c8d",marginBottom:"8px"},children:"Resource:"}),a.jsx("code",{children:n.resource})]})]}),a.jsxs("div",{className:"detail-section",children:[a.jsx("h2",{children:"Redirect Information"}),a.jsx("div",{className:"client-info",children:a.jsxs("div",{className:"info-row",children:[a.jsx("span",{className:"label",children:"Redirect URI:"}),a.jsx("span",{className:"value",children:a.jsx("code",{children:n.redirectUri})})]})}),a.jsx("p",{style:{marginTop:"12px",fontSize:"13px",color:"#7f8c8d",marginBottom:0},children:"After authorization, you will be redirected to this URL."})]})]}),s&&a.jsx("div",{className:"error-banner",children:s}),a.jsxs("div",{className:"consent-actions",children:[a.jsx("button",{type:"button",className:"btn-deny",onClick:p,disabled:u,children:"Deny"}),a.jsx("button",{type:"button",className:"btn-approve",onClick:h,disabled:u,children:u?"Approving...":"Approve"})]}),a.jsxs("div",{className:"consent-footer",children:[a.jsxs("p",{children:["By approving, you authorize ",a.jsx("strong",{children:n.client.clientName})," to access the specified resources with the requested permissions."]}),a.jsx(ro,{})]})]})})}const np="agents-sidebar-collapsed";function f_(){const{agentId:e,sessionId:t}=fr(),n=Le(),[r,i]=k.useState(()=>{const u=localStorage.getItem(np);return u!==null?u==="true":no()});k.useEffect(()=>{localStorage.setItem(np,String(r))},[r]);const o=()=>{i(!r)},s=window.location.pathname.includes("/agents/admin"),l=window.location.pathname==="/agents"||window.location.pathname==="/agents/";return a.jsxs("div",{className:"agents-with-sidebar",children:[a.jsxs("aside",{className:`sidebar-app-specific ${r?"collapsed":""}`,children:[a.jsx("nav",{className:"sidebar-content",children:!r&&a.jsxs("div",{children:[a.jsx("div",{className:"agents-sidebar-header",children:a.jsxs("h2",{className:"agents-sidebar-title",children:["🤖 Agents",a.jsx("span",{className:"agents-status-dot disconnected",title:"WebSocket disconnected"})]})}),a.jsx("div",{className:"agents-sidebar-section",children:a.jsxs("div",{className:"agents-nav-list",children:[a.jsx("div",{className:`agents-nav-item ${l?"active":""}`,onClick:()=>n("/agents"),role:"button",tabIndex:0,onKeyDown:u=>{(u.key==="Enter"||u.key===" ")&&n("/agents")},title:"Agents",children:"🤖 Agents"}),a.jsx("div",{className:`agents-nav-item ${s?"active":""}`,onClick:()=>n("/agents/admin"),role:"button",tabIndex:0,onKeyDown:u=>{(u.key==="Enter"||u.key===" ")&&n("/agents/admin")},title:"Admin",children:"⚙️ Admin"})]})}),a.jsxs("div",{className:"agents-sidebar-section",children:[a.jsx("h3",{className:"agents-sidebar-section-title",children:"History"}),a.jsxs("div",{className:"agents-history-list",children:[a.jsx("div",{className:"agents-history-item",children:"Loading sessions..."}),!1,!1]})]})]})}),a.jsx("button",{className:"sidebar-toggle",onClick:o,"aria-label":r?"Expand sidebar":"Collapse sidebar",children:r?"→":"←"})]}),a.jsx("main",{className:"agents-content",children:a.jsx(bc,{})})]})}L.BASE=hr;const sd=()=>{const[e,t]=k.useState(!1),[n,r]=k.useState(null),[i,o]=k.useState([]),[s,l]=k.useState(null);k.useEffect(()=>{u()},[]);const u=async()=>{t(!0),r(null);try{const d=await Gl.agentsControllerListAgents();o(d.items||[])}catch(d){r(d instanceof Error?d.message:"Failed to load agents")}finally{t(!1)}};return{agents:i,selectedAgent:s,isLoading:e,error:n,loadAgents:u,loadAgentDetails:async d=>{t(!0),r(null);try{const h=await Gl.agentsControllerGetAgentBySlug(d);l(h)}catch(h){r(h instanceof Error?h.message:"Failed to load agent details")}finally{t(!1)}},createAgent:async d=>{t(!0),r(null);try{const h=await Gl.agentsControllerCreateAgent(d);return await u(),h}catch(h){return r(h instanceof Error?h.message:"Failed to create agent"),null}finally{t(!1)}}}};function h_(){const e=Le(),{agents:t,isLoading:n,error:r}=sd();return a.jsxs("div",{className:"agents-home",children:[a.jsxs("div",{className:"agents-home-header",children:[a.jsx("h2",{children:"Available Agents"}),a.jsx("p",{children:"Select an agent to start a new conversation"})]}),n&&a.jsx("div",{className:"agents-loading",children:"Loading agents..."}),r&&a.jsxs("div",{className:"agents-error",children:["Error: ",r]}),!n&&!r&&t.length===0&&a.jsx("div",{className:"agents-empty",children:"No agents available. Create one in the admin panel."}),a.jsx("div",{className:"agents-admin-grid",children:t.map(i=>a.jsxs("div",{className:"agent-admin-card",onClick:()=>e(`/agents/${i.slug||i.actorId}/session/new`),role:"button",tabIndex:0,onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&e(`/agents/${i.slug||i.actorId}/session/new`)},children:[a.jsxs("div",{className:"agent-admin-card-header",children:[a.jsx("h3",{children:i.name}),a.jsx("span",{className:`agent-status ${i.isActive?"active":"inactive"}`,children:i.isActive?"Active":"Inactive"})]}),a.jsxs("p",{className:"agent-slug",children:["@",i.slug]}),a.jsx("p",{className:"agent-description",children:typeof i.description=="string"?i.description:i.description?JSON.stringify(i.description):"No description available"}),a.jsxs("p",{className:"agent-tools",children:["Tools: ",i.allowedTools.length>0?i.allowedTools.join(", "):"None"]})]},i.actorId))})]})}function p_(){const{agents:e,isLoading:t,error:n,createAgent:r}=sd(),i=Le(),[o,s]=k.useState(!1),[l,u]=k.useState({slug:"",name:"",description:"",systemPrompt:"",allowedTools:"",statusTriggers:"",isActive:!0}),c=async f=>{f.preventDefault();try{const d=await r({slug:l.slug,name:l.name,description:l.description,systemPrompt:l.systemPrompt,allowedTools:l.allowedTools.split(",").map(h=>h.trim()).filter(Boolean),statusTriggers:l.statusTriggers.split(",").map(h=>h.trim()).filter(Boolean),isActive:l.isActive});s(!1),u({slug:"",name:"",description:"",systemPrompt:"",allowedTools:"",statusTriggers:"",isActive:!0}),d&&i(`/agents/${d.actorId}/admin`)}catch(d){console.error("Failed to create agent",d)}};return a.jsxs("div",{className:"agents-admin-list",children:[a.jsxs("div",{className:"agents-admin-header",children:[a.jsxs("div",{children:[a.jsx("h1",{children:"Agents Admin"}),a.jsx("p",{className:"subtitle",children:"Manage agents and their configurations"})]}),a.jsx("div",{className:"header-actions",children:a.jsx("button",{onClick:()=>s(!0),className:"btn-primary",children:"+ Create Agent"})})]}),n&&a.jsx("div",{className:"error-message",children:n}),t?a.jsx("div",{className:"loading",children:"Loading agents..."}):a.jsx("div",{className:"agents-admin-grid",children:e.length===0?a.jsxs("div",{className:"empty-state",children:[a.jsx("p",{children:"No agents created yet."}),a.jsx("button",{onClick:()=>s(!0),className:"btn-primary",children:"Create your first agent"})]}):e.map(f=>a.jsxs("div",{className:"agent-admin-card",onClick:()=>i(`/agents/${f.actorId}/admin`),children:[a.jsxs("div",{className:"agent-admin-card-header",children:[a.jsx("h3",{children:f.name}),a.jsx("span",{className:`agent-status ${f.isActive?"active":"inactive"}`,children:f.isActive?"Active":"Inactive"})]}),a.jsxs("p",{className:"agent-slug",children:["@",f.slug]}),a.jsx("p",{className:"agent-description",children:typeof f.description=="string"?f.description:"No description"}),a.jsxs("p",{className:"agent-tools",children:["Tools: ",f.allowedTools.length>0?f.allowedTools.join(", "):"None"]})]},f.actorId))}),o&&a.jsx("div",{className:"modal-overlay",onClick:()=>s(!1),children:a.jsxs("div",{className:"modal-content",onClick:f=>f.stopPropagation(),children:[a.jsx("h2",{children:"Create Agent"}),a.jsxs("form",{onSubmit:c,children:[a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"slug",children:"Slug"}),a.jsx("input",{type:"text",id:"slug",value:l.slug,onChange:f=>u({...l,slug:f.target.value}),placeholder:"e.g., code-assistant",required:!0}),a.jsx("small",{children:"Unique identifier (lowercase, hyphens allowed)"})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"name",children:"Name"}),a.jsx("input",{type:"text",id:"name",value:l.name,onChange:f=>u({...l,name:f.target.value}),placeholder:"e.g., Code Assistant",required:!0})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"description",children:"Description"}),a.jsx("textarea",{id:"description",value:l.description,onChange:f=>u({...l,description:f.target.value}),placeholder:"Brief description of this agent",rows:2})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"systemPrompt",children:"System Prompt"}),a.jsx("textarea",{id:"systemPrompt",value:l.systemPrompt,onChange:f=>u({...l,systemPrompt:f.target.value}),placeholder:"Core instructions/persona for this agent",rows:5,required:!0})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"allowedTools",children:"Allowed Tools"}),a.jsx("input",{type:"text",id:"allowedTools",value:l.allowedTools,onChange:f=>u({...l,allowedTools:f.target.value}),placeholder:"e.g., filesystem, browser, calculator (comma-separated)"}),a.jsx("small",{children:"Comma-separated list of tool identifiers"})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"statusTriggers",children:"Status triggers"}),a.jsx("input",{type:"text",id:"statusTriggers",value:l.statusTriggers,onChange:f=>u({...l,statusTriggers:f.target.value}),placeholder:"e.g., NOT_STARTED, IN_PROGRESS, FOR_REVIEW, DONE (comma-separated)"}),a.jsx("small",{children:"Comma-separated list of tool identifiers"})]}),a.jsx("div",{className:"form-group",children:a.jsxs("label",{className:"checkbox-label",children:[a.jsx("input",{type:"checkbox",checked:l.isActive,onChange:f=>u({...l,isActive:f.target.checked})}),a.jsx("span",{children:"Active (available for assignment)"})]})}),a.jsxs("div",{className:"form-actions",children:[a.jsx("button",{type:"button",onClick:()=>s(!1),className:"btn-secondary",children:"Cancel"}),a.jsx("button",{type:"submit",className:"btn-primary",children:"Create Agent"})]})]})]})})]})}function m_(){var y;const{agentId:e}=fr(),t=Le(),{selectedAgent:n,isLoading:r,error:i,loadAgentDetails:o}=sd(),[s,l]=k.useState(!1),[u,c]=k.useState(null),[f,d]=k.useState({slug:"",name:"",description:"",systemPrompt:"",allowedTools:"",isActive:!0});k.useEffect(()=>{e&&o(e)},[e]),k.useEffect(()=>{var x;n&&d({slug:n.slug,name:n.name,description:((x=n.description)==null?void 0:x.toString())||"",systemPrompt:n.systemPrompt,allowedTools:n.allowedTools.join(", "),isActive:n.isActive})},[n]);const h=async x=>{if(x.preventDefault(),!!e)try{throw new Error("update agent not implemented in the backend")}catch(S){console.error("Failed to update agent",S)}},p=async()=>{e&&c({message:"Are you sure you want to delete this agent? This action cannot be undone.",onConfirm:async()=>{try{throw new Error("delete agent not implemented in the backend")}catch(x){console.error("Failed to delete agent",x),c(null)}}})};return r&&!n?a.jsx("div",{className:"loading",children:"Loading agent details..."}):n?(console.log(n.statusTriggers),a.jsxs("div",{className:"agent-admin-detail",children:[a.jsxs("div",{className:"agent-admin-detail-header",children:[a.jsxs("div",{children:[a.jsx("button",{onClick:()=>t("/agents/admin"),className:"btn-back",children:"← Back to Agents"}),a.jsx("h1",{children:n.name}),a.jsxs("p",{className:"agent-slug",children:["@",n.slug]}),a.jsx("span",{className:`agent-status ${n.isActive?"active":"inactive"}`,children:n.isActive?"Active":"Inactive"})]}),a.jsx("div",{className:"header-actions",children:s?a.jsx("button",{onClick:()=>l(!1),className:"btn-secondary",children:"Cancel Edit"}):a.jsxs(a.Fragment,{children:[a.jsx("button",{onClick:()=>l(!0),className:"btn-secondary",children:"Edit Agent"}),a.jsx("button",{onClick:p,className:"btn-delete",children:"Delete Agent"})]})})]}),i&&a.jsx("div",{className:"error-message",children:i}),s?a.jsxs("form",{onSubmit:h,className:"agent-edit-form",children:[a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"slug",children:"Slug"}),a.jsx("input",{type:"text",id:"slug",value:f.slug,onChange:x=>d({...f,slug:x.target.value}),placeholder:"e.g., code-assistant",required:!0}),a.jsx("small",{children:"Unique identifier (lowercase, hyphens allowed)"})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"name",children:"Name"}),a.jsx("input",{type:"text",id:"name",value:f.name,onChange:x=>d({...f,name:x.target.value}),placeholder:"e.g., Code Assistant",required:!0})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"description",children:"Description"}),a.jsx("textarea",{id:"description",value:f.description,onChange:x=>d({...f,description:x.target.value}),placeholder:"Brief description of this agent",rows:2})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"systemPrompt",children:"System Prompt"}),a.jsx("textarea",{id:"systemPrompt",value:f.systemPrompt,onChange:x=>d({...f,systemPrompt:x.target.value}),placeholder:"Core instructions/persona for this agent",rows:10,required:!0})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"allowedTools",children:"Allowed Tools"}),a.jsx("input",{type:"text",id:"allowedTools",value:f.allowedTools,onChange:x=>d({...f,allowedTools:x.target.value}),placeholder:"e.g., filesystem, browser, calculator (comma-separated)"}),a.jsx("small",{children:"Comma-separated list of tool identifiers"})]}),a.jsx("div",{className:"form-group",children:a.jsxs("label",{className:"checkbox-label",children:[a.jsx("input",{type:"checkbox",checked:f.isActive,onChange:x=>d({...f,isActive:x.target.checked})}),a.jsx("span",{children:"Active (available for assignment)"})]})}),a.jsxs("div",{className:"form-actions",children:[a.jsx("button",{type:"button",onClick:()=>l(!1),className:"btn-secondary",children:"Cancel"}),a.jsx("button",{type:"submit",className:"btn-primary",children:"Save Changes"})]})]}):a.jsxs("div",{className:"agent-detail-sections",children:[a.jsxs("div",{className:"detail-section",children:[a.jsx("h2",{children:"Basic Information"}),a.jsxs("div",{className:"detail-content",children:[a.jsxs("div",{className:"detail-field",children:[a.jsx("label",{children:"Name"}),a.jsx("p",{children:n.name})]}),a.jsxs("div",{className:"detail-field",children:[a.jsx("label",{children:"Slug"}),a.jsxs("p",{children:["@",n.slug]})]}),a.jsxs("div",{className:"detail-field",children:[a.jsx("label",{children:"Description"}),a.jsx("p",{children:((y=n.description)==null?void 0:y.toString())||"No description"})]}),a.jsxs("div",{className:"detail-field",children:[a.jsx("label",{children:"Status"}),a.jsx("p",{children:n.isActive?"Active":"Inactive"})]})]})]}),a.jsxs("div",{className:"detail-section",children:[a.jsx("h2",{children:"System Prompt"}),a.jsx("div",{className:"detail-content",children:a.jsx("pre",{className:"system-prompt-display",children:n.systemPrompt})})]}),a.jsxs("div",{className:"detail-section",children:[a.jsx("h2",{children:"Status Triggers"}),a.jsx("div",{className:"detail-content",children:n.statusTriggers.length>0?a.jsx("div",{className:"tools-list",children:n.statusTriggers.map((x,S)=>a.jsx("span",{className:"tool-badge",children:x},S))}):a.jsx("p",{className:"empty-text",children:"No status triggers configured"})})]}),a.jsxs("div",{className:"detail-section",children:[a.jsx("h2",{children:"Tag Triggers"}),a.jsx("div",{className:"detail-content",children:n.tagTriggers.length>0?a.jsx("div",{className:"tools-list",children:n.tagTriggers.map((x,S)=>a.jsx("span",{className:"tool-badge",children:x},S))}):a.jsx("p",{className:"empty-text",children:"No tag triggers configured"})})]}),a.jsxs("div",{className:"detail-section",children:[a.jsx("h2",{children:"Allowed Tools"}),a.jsx("div",{className:"detail-content",children:n.allowedTools.length>0?a.jsx("div",{className:"tools-list",children:n.allowedTools.map((x,S)=>a.jsx("span",{className:"tool-badge",children:x},S))}):a.jsx("p",{className:"empty-text",children:"No tools configured"})})]}),a.jsxs("div",{className:"detail-section",children:[a.jsx("h2",{children:"Metadata"}),a.jsxs("div",{className:"detail-content",children:[a.jsxs("div",{className:"detail-field",children:[a.jsx("label",{children:"Created At"}),a.jsx("p",{children:new Date(n.createdAt).toLocaleString()})]}),a.jsxs("div",{className:"detail-field",children:[a.jsx("label",{children:"Last Updated"}),a.jsx("p",{children:new Date(n.updatedAt).toLocaleString()})]}),a.jsxs("div",{className:"detail-field",children:[a.jsx("label",{children:"Row Version"}),a.jsx("p",{children:n.rowVersion})]})]})]})]}),u&&a.jsx(od,{message:u.message,onConfirm:u.onConfirm,onCancel:()=>c(null)})]})):a.jsx("div",{className:"error-message",children:"Agent not found"})}function g_(){const{logout:e}=Pc(),t=Le();return Ke(),k.useEffect(()=>{(async()=>{await e(),t("/login",{replace:!0})})()},[e,t]),a.jsx("div",{className:"logout-page",children:a.jsx("div",{className:"logout-container",children:a.jsx("div",{className:"logout-card",children:a.jsxs("div",{className:"logout-header",children:[a.jsx("h1",{className:"logout-title",children:"Logging Out..."}),a.jsx("p",{className:"logout-subtitle",children:"You are being logged out. Please wait."})]})})})})}function y_(){return G1()?a.jsx(X0,{}):a.jsx(K0,{})}function x_(){return a.jsx(y1,{basename:T1,children:a.jsx(H1,{children:a.jsxs(qw,{children:[a.jsx(je,{path:"/login",element:a.jsx(W1,{})}),a.jsx(je,{path:"/logout",element:a.jsx(g_,{})}),a.jsxs(je,{element:a.jsx($1,{children:a.jsx(K1,{})}),children:[a.jsx(je,{index:!0,element:a.jsx(Q1,{})}),a.jsx(je,{path:"tasks",element:a.jsx(y_,{})}),a.jsx(je,{path:"mcp-registry",element:a.jsx(a_,{})}),a.jsx(je,{path:"mcp-registry/:serverId",element:a.jsx(c_,{})}),a.jsx(je,{path:"consent",element:a.jsx(d_,{})}),a.jsxs(je,{path:"context",element:a.jsx(nS,{}),children:[a.jsx(je,{index:!0,element:a.jsx(rS,{})}),a.jsx(je,{path:"new",element:a.jsx(ep,{})}),a.jsx(je,{path:"page/:pageId",element:a.jsx(s_,{})}),a.jsx(je,{path:"page/:pageId/edit",element:a.jsx(l_,{})}),a.jsx(je,{path:"page/:pageId/new",element:a.jsx(ep,{})})]}),a.jsxs(je,{path:"agents",element:a.jsx(f_,{}),children:[a.jsx(je,{index:!0,element:a.jsx(h_,{})}),a.jsx(je,{path:"admin",element:a.jsx(p_,{})}),a.jsx(je,{path:":agentId/admin",element:a.jsx(m_,{})})]})]})]})})})}gg(document.getElementById("root")).render(a.jsx(k.StrictMode,{children:a.jsx("div",{className:"app-shell",children:a.jsx(x_,{})})}));