@taico/taico 0.0.4 → 0.0.5
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.
- package/dist/agents/agent-tokens.controller.js +1 -1
- package/dist/agents/agent-tokens.controller.js.map +1 -1
- package/dist/agents/agents.controller.js +7 -1
- package/dist/agents/agents.controller.js.map +1 -1
- package/dist/agents/agents.service.js +44 -2
- package/dist/agents/agents.service.js.map +1 -1
- package/dist/agents/dto/patch-agent.dto.d.ts +7 -1
- package/dist/agents/dto/patch-agent.dto.js +73 -1
- package/dist/agents/dto/patch-agent.dto.js.map +1 -1
- package/dist/agents/dto/service/agents.service.types.d.ts +7 -1
- package/dist/app-init/agent/prompts.d.ts +2 -1
- package/dist/app-init/agent/prompts.js +22 -7
- package/dist/app-init/agent/prompts.js.map +1 -1
- package/dist/app-init/agent/taico.agent.d.ts +2 -0
- package/dist/app-init/agent/taico.agent.js +18 -0
- package/dist/app-init/agent/taico.agent.js.map +1 -0
- package/dist/app-init/app-init.runner.js +33 -11
- package/dist/app-init/app-init.runner.js.map +1 -1
- package/dist/app-init/mcp/context.mcp.js +1 -0
- package/dist/app-init/mcp/context.mcp.js.map +1 -1
- package/dist/app-init/mcp/playwright.mcp.d.ts +2 -0
- package/dist/app-init/mcp/playwright.mcp.js +14 -0
- package/dist/app-init/mcp/playwright.mcp.js.map +1 -0
- package/dist/app-init/mcp/tasks.mcp.js +1 -0
- package/dist/app-init/mcp/tasks.mcp.js.map +1 -1
- package/dist/app.module.js +23 -1
- package/dist/app.module.js.map +1 -1
- package/dist/auth/core/scopes/all-api.scopes.js +2 -0
- package/dist/auth/core/scopes/all-api.scopes.js.map +1 -1
- package/dist/auth-journeys/entities/connection-authorization-flow.entity.js +4 -4
- package/dist/auth-journeys/entities/connection-authorization-flow.entity.js.map +1 -1
- package/dist/authorization-server/authorization.controller.js +26 -1
- package/dist/authorization-server/authorization.controller.js.map +1 -1
- package/dist/authorization-server/dto/introspect-token-response.dto.d.ts +10 -10
- package/dist/authorization-server/dto/introspect-token-response.dto.js +21 -21
- package/dist/authorization-server/dto/introspect-token-response.dto.js.map +1 -1
- package/dist/authorization-server/dto/service/token.service.types.d.ts +26 -0
- package/dist/authorization-server/dto/service/token.service.types.js +3 -0
- package/dist/authorization-server/dto/service/token.service.types.js.map +1 -0
- package/dist/authorization-server/issued-access-token.service.d.ts +15 -0
- package/dist/authorization-server/issued-access-token.service.js +17 -0
- package/dist/authorization-server/issued-access-token.service.js.map +1 -1
- package/dist/authorization-server/token.service.d.ts +2 -3
- package/dist/authorization-server/token.service.js +6 -6
- package/dist/authorization-server/token.service.js.map +1 -1
- package/dist/common/utils/keyed-debounce-batch-processor.util.d.ts +17 -0
- package/dist/common/utils/keyed-debounce-batch-processor.util.js +76 -0
- package/dist/common/utils/keyed-debounce-batch-processor.util.js.map +1 -0
- package/dist/config/env.config.d.ts +6 -0
- package/dist/config/env.config.js +28 -0
- package/dist/config/env.config.js.map +1 -1
- package/dist/context/context.mcp.gateway.d.ts +3 -1
- package/dist/context/context.mcp.gateway.js +72 -28
- package/dist/context/context.mcp.gateway.js.map +1 -1
- package/dist/discovery/discovery.service.js +7 -0
- package/dist/discovery/discovery.service.js.map +1 -1
- package/dist/errors/http/error-catalog.js +42 -0
- package/dist/errors/http/error-catalog.js.map +1 -1
- package/dist/identity-provider/dto/actor-response.dto.d.ts +2 -0
- package/dist/identity-provider/dto/actor-response.dto.js +10 -0
- package/dist/identity-provider/dto/actor-response.dto.js.map +1 -1
- package/dist/llm/llm.module.d.ts +2 -0
- package/dist/llm/llm.module.js +21 -0
- package/dist/llm/llm.module.js.map +1 -0
- package/dist/llm/openai-responses.service.d.ts +9 -0
- package/dist/llm/openai-responses.service.js +51 -0
- package/dist/llm/openai-responses.service.js.map +1 -0
- package/dist/mcp-registry/dto/create-server.dto.d.ts +4 -0
- package/dist/mcp-registry/dto/create-server.dto.js +39 -1
- package/dist/mcp-registry/dto/create-server.dto.js.map +1 -1
- package/dist/mcp-registry/dto/index.d.ts +1 -0
- package/dist/mcp-registry/dto/index.js +1 -0
- package/dist/mcp-registry/dto/index.js.map +1 -1
- package/dist/mcp-registry/dto/server-response.dto.d.ts +4 -0
- package/dist/mcp-registry/dto/server-response.dto.js +29 -0
- package/dist/mcp-registry/dto/server-response.dto.js.map +1 -1
- package/dist/mcp-registry/dto/service/mcp-registry.service.types.d.ts +27 -3
- package/dist/mcp-registry/dto/update-server.dto.d.ts +4 -0
- package/dist/mcp-registry/dto/update-server.dto.js +40 -0
- package/dist/mcp-registry/dto/update-server.dto.js.map +1 -1
- package/dist/mcp-registry/entities/mcp-server.entity.d.ts +4 -0
- package/dist/mcp-registry/entities/mcp-server.entity.js +16 -0
- package/dist/mcp-registry/entities/mcp-server.entity.js.map +1 -1
- package/dist/mcp-registry/errors/mcp-registry.errors.d.ts +4 -0
- package/dist/mcp-registry/errors/mcp-registry.errors.js +8 -1
- package/dist/mcp-registry/errors/mcp-registry.errors.js.map +1 -1
- package/dist/mcp-registry/mcp-registry.controller.js +12 -1
- package/dist/mcp-registry/mcp-registry.controller.js.map +1 -1
- package/dist/mcp-registry/mcp-registry.service.d.ts +2 -0
- package/dist/mcp-registry/mcp-registry.service.js +80 -7
- package/dist/mcp-registry/mcp-registry.service.js.map +1 -1
- package/dist/mcp-registry/mcp-server.types.d.ts +4 -0
- package/dist/mcp-registry/mcp-server.types.js +7 -0
- package/dist/mcp-registry/mcp-server.types.js.map +1 -0
- package/dist/migrations/1700000000001-AlignConnectionAuthFlowColumns.d.ts +6 -0
- package/dist/migrations/1700000000001-AlignConnectionAuthFlowColumns.js +46 -0
- package/dist/migrations/1700000000001-AlignConnectionAuthFlowColumns.js.map +1 -0
- package/dist/migrations/{1700000000001-UpdateAgentTypeConstraint.d.ts → 1700000000002-UpdateAgentTypeConstraint.d.ts} +1 -1
- package/dist/migrations/{1700000000001-UpdateAgentTypeConstraint.js → 1700000000002-UpdateAgentTypeConstraint.js} +5 -5
- package/dist/migrations/{1700000000001-UpdateAgentTypeConstraint.js.map → 1700000000002-UpdateAgentTypeConstraint.js.map} +1 -1
- package/dist/migrations/1739500000000-AddTaskBlueprintsAndScheduledTasks.d.ts +5 -0
- package/dist/migrations/1739500000000-AddTaskBlueprintsAndScheduledTasks.js +60 -0
- package/dist/migrations/1739500000000-AddTaskBlueprintsAndScheduledTasks.js.map +1 -0
- package/dist/migrations/1739750000000-RefactorThreadsForHeadlessConversations.d.ts +6 -0
- package/dist/migrations/1739750000000-RefactorThreadsForHeadlessConversations.js +109 -0
- package/dist/migrations/1739750000000-RefactorThreadsForHeadlessConversations.js.map +1 -0
- package/dist/migrations/1739844333000-RemoveRoleFromThreadMessage.d.ts +6 -0
- package/dist/migrations/1739844333000-RemoveRoleFromThreadMessage.js +61 -0
- package/dist/migrations/1739844333000-RemoveRoleFromThreadMessage.js.map +1 -0
- package/dist/migrations/1740000000000-AddSecretsTable.d.ts +5 -0
- package/dist/migrations/1740000000000-AddSecretsTable.js +32 -0
- package/dist/migrations/1740000000000-AddSecretsTable.js.map +1 -0
- package/dist/migrations/1740500000000-AddMcpServerTransportConfig.d.ts +5 -0
- package/dist/migrations/1740500000000-AddMcpServerTransportConfig.js +52 -0
- package/dist/migrations/1740500000000-AddMcpServerTransportConfig.js.map +1 -0
- package/dist/migrations/1741000000000-AddChatSessionIdToThreads.d.ts +6 -0
- package/dist/migrations/1741000000000-AddChatSessionIdToThreads.js +52 -0
- package/dist/migrations/1741000000000-AddChatSessionIdToThreads.js.map +1 -0
- package/dist/public/assets/index-BpWAKFIY.css +1 -0
- package/dist/public/assets/index-gfAmuo9i.js +11 -0
- package/dist/public/beta/assets/index-B-4bxmRw.js +85 -0
- package/dist/public/beta/index.html +1 -1
- package/dist/public/index.html +2 -2
- package/dist/secrets/dto/http/create-secret.dto.d.ts +5 -0
- package/dist/secrets/dto/http/create-secret.dto.js +50 -0
- package/dist/secrets/dto/http/create-secret.dto.js.map +1 -0
- package/dist/secrets/dto/http/secret-params.dto.d.ts +3 -0
- package/dist/secrets/dto/http/secret-params.dto.js +27 -0
- package/dist/secrets/dto/http/secret-params.dto.js.map +1 -0
- package/dist/secrets/dto/http/secret-response.dto.d.ts +15 -0
- package/dist/secrets/dto/http/secret-response.dto.js +112 -0
- package/dist/secrets/dto/http/secret-response.dto.js.map +1 -0
- package/dist/secrets/dto/http/update-secret.dto.d.ts +5 -0
- package/dist/secrets/dto/http/update-secret.dto.js +54 -0
- package/dist/secrets/dto/http/update-secret.dto.js.map +1 -0
- package/dist/secrets/dto/service/secrets.service.types.d.ts +26 -0
- package/dist/secrets/dto/service/secrets.service.types.js +3 -0
- package/dist/secrets/dto/service/secrets.service.types.js.map +1 -0
- package/dist/secrets/errors/secrets.errors.d.ts +21 -0
- package/dist/secrets/errors/secrets.errors.js +43 -0
- package/dist/secrets/errors/secrets.errors.js.map +1 -0
- package/dist/secrets/secret.entity.d.ts +14 -0
- package/dist/secrets/secret.entity.js +75 -0
- package/dist/secrets/secret.entity.js.map +1 -0
- package/dist/secrets/secrets-encryption.service.d.ts +8 -0
- package/dist/secrets/secrets-encryption.service.js +130 -0
- package/dist/secrets/secrets-encryption.service.js.map +1 -0
- package/dist/secrets/secrets.controller.d.ts +18 -0
- package/dist/secrets/secrets.controller.js +160 -0
- package/dist/secrets/secrets.controller.js.map +1 -0
- package/dist/secrets/secrets.module.d.ts +2 -0
- package/dist/secrets/secrets.module.js +31 -0
- package/dist/secrets/secrets.module.js.map +1 -0
- package/dist/secrets/secrets.scopes.d.ts +16 -0
- package/dist/secrets/secrets.scopes.js +19 -0
- package/dist/secrets/secrets.scopes.js.map +1 -0
- package/dist/secrets/secrets.service.d.ts +17 -0
- package/dist/secrets/secrets.service.js +147 -0
- package/dist/secrets/secrets.service.js.map +1 -0
- package/dist/task-blueprints/dto/create-scheduled-task.dto.d.ts +5 -0
- package/dist/task-blueprints/dto/create-scheduled-task.dto.js +49 -0
- package/dist/task-blueprints/dto/create-scheduled-task.dto.js.map +1 -0
- package/dist/task-blueprints/dto/create-task-blueprint.dto.d.ts +7 -0
- package/dist/task-blueprints/dto/create-task-blueprint.dto.js +72 -0
- package/dist/task-blueprints/dto/create-task-blueprint.dto.js.map +1 -0
- package/dist/task-blueprints/dto/list-scheduled-tasks-query.dto.d.ts +5 -0
- package/dist/task-blueprints/dto/list-scheduled-tasks-query.dto.js +62 -0
- package/dist/task-blueprints/dto/list-scheduled-tasks-query.dto.js.map +1 -0
- package/dist/task-blueprints/dto/list-task-blueprints-query.dto.d.ts +4 -0
- package/dist/task-blueprints/dto/list-task-blueprints-query.dto.js +45 -0
- package/dist/task-blueprints/dto/list-task-blueprints-query.dto.js.map +1 -0
- package/dist/task-blueprints/dto/scheduled-task-list-response.dto.d.ts +9 -0
- package/dist/task-blueprints/dto/scheduled-task-list-response.dto.js +58 -0
- package/dist/task-blueprints/dto/scheduled-task-list-response.dto.js.map +1 -0
- package/dist/task-blueprints/dto/scheduled-task-params.dto.d.ts +3 -0
- package/dist/task-blueprints/dto/scheduled-task-params.dto.js +27 -0
- package/dist/task-blueprints/dto/scheduled-task-params.dto.js.map +1 -0
- package/dist/task-blueprints/dto/scheduled-task-response.dto.d.ts +15 -0
- package/dist/task-blueprints/dto/scheduled-task-response.dto.js +115 -0
- package/dist/task-blueprints/dto/scheduled-task-response.dto.js.map +1 -0
- package/dist/task-blueprints/dto/service/scheduled-tasks.service.types.d.ts +34 -0
- package/dist/task-blueprints/dto/service/scheduled-tasks.service.types.js +3 -0
- package/dist/task-blueprints/dto/service/scheduled-tasks.service.types.js.map +1 -0
- package/dist/task-blueprints/dto/service/task-blueprints.service.types.d.ts +41 -0
- package/dist/task-blueprints/dto/service/task-blueprints.service.types.js +3 -0
- package/dist/task-blueprints/dto/service/task-blueprints.service.types.js.map +1 -0
- package/dist/task-blueprints/dto/task-blueprint-list-response.dto.d.ts +9 -0
- package/dist/task-blueprints/dto/task-blueprint-list-response.dto.js +58 -0
- package/dist/task-blueprints/dto/task-blueprint-list-response.dto.js.map +1 -0
- package/dist/task-blueprints/dto/task-blueprint-params.dto.d.ts +3 -0
- package/dist/task-blueprints/dto/task-blueprint-params.dto.js +27 -0
- package/dist/task-blueprints/dto/task-blueprint-params.dto.js.map +1 -0
- package/dist/task-blueprints/dto/task-blueprint-response.dto.d.ts +17 -0
- package/dist/task-blueprints/dto/task-blueprint-response.dto.js +127 -0
- package/dist/task-blueprints/dto/task-blueprint-response.dto.js.map +1 -0
- package/dist/task-blueprints/dto/update-scheduled-task.dto.d.ts +4 -0
- package/dist/task-blueprints/dto/update-scheduled-task.dto.js +38 -0
- package/dist/task-blueprints/dto/update-scheduled-task.dto.js.map +1 -0
- package/dist/task-blueprints/dto/update-task-blueprint.dto.d.ts +7 -0
- package/dist/task-blueprints/dto/update-task-blueprint.dto.js +73 -0
- package/dist/task-blueprints/dto/update-task-blueprint.dto.js.map +1 -0
- package/dist/task-blueprints/errors/task-blueprints.errors.d.ts +16 -0
- package/dist/task-blueprints/errors/task-blueprints.errors.js +37 -0
- package/dist/task-blueprints/errors/task-blueprints.errors.js.map +1 -0
- package/dist/task-blueprints/scheduled-task.entity.d.ts +14 -0
- package/dist/task-blueprints/scheduled-task.entity.js +79 -0
- package/dist/task-blueprints/scheduled-task.entity.js.map +1 -0
- package/dist/task-blueprints/scheduled-tasks.controller.d.ts +16 -0
- package/dist/task-blueprints/scheduled-tasks.controller.js +144 -0
- package/dist/task-blueprints/scheduled-tasks.controller.js.map +1 -0
- package/dist/task-blueprints/scheduled-tasks.service.d.ts +24 -0
- package/dist/task-blueprints/scheduled-tasks.service.js +258 -0
- package/dist/task-blueprints/scheduled-tasks.service.js.map +1 -0
- package/dist/task-blueprints/task-blueprint.entity.d.ts +19 -0
- package/dist/task-blueprints/task-blueprint.entity.js +107 -0
- package/dist/task-blueprints/task-blueprint.entity.js.map +1 -0
- package/dist/task-blueprints/task-blueprints.controller.d.ts +19 -0
- package/dist/task-blueprints/task-blueprints.controller.js +169 -0
- package/dist/task-blueprints/task-blueprints.controller.js.map +1 -0
- package/dist/task-blueprints/task-blueprints.module.d.ts +2 -0
- package/dist/task-blueprints/task-blueprints.module.js +44 -0
- package/dist/task-blueprints/task-blueprints.module.js.map +1 -0
- package/dist/task-blueprints/task-blueprints.service.d.ts +30 -0
- package/dist/task-blueprints/task-blueprints.service.js +286 -0
- package/dist/task-blueprints/task-blueprints.service.js.map +1 -0
- package/dist/task-blueprints/task-scheduler.service.d.ts +9 -0
- package/dist/task-blueprints/task-scheduler.service.js +99 -0
- package/dist/task-blueprints/task-scheduler.service.js.map +1 -0
- package/dist/tasks/dto/service/tasks.service.types.d.ts +2 -0
- package/dist/tasks/tasks.mcp.gateway.d.ts +3 -1
- package/dist/tasks/tasks.mcp.gateway.js +166 -50
- package/dist/tasks/tasks.mcp.gateway.js.map +1 -1
- package/dist/tasks/tasks.service.js +22 -0
- package/dist/tasks/tasks.service.js.map +1 -1
- package/dist/threads/chat.service.d.ts +34 -0
- package/dist/threads/chat.service.js +162 -0
- package/dist/threads/chat.service.js.map +1 -0
- package/dist/threads/dto/create-thread-message.dto.d.ts +3 -0
- package/dist/threads/dto/create-thread-message.dto.js +27 -0
- package/dist/threads/dto/create-thread-message.dto.js.map +1 -0
- package/dist/threads/dto/create-thread.dto.d.ts +1 -1
- package/dist/threads/dto/create-thread.dto.js +3 -2
- package/dist/threads/dto/create-thread.dto.js.map +1 -1
- package/dist/threads/dto/list-thread-messages-query.dto.d.ts +4 -0
- package/dist/threads/dto/list-thread-messages-query.dto.js +49 -0
- package/dist/threads/dto/list-thread-messages-query.dto.js.map +1 -0
- package/dist/threads/dto/list-thread-messages-response.dto.d.ts +9 -0
- package/dist/threads/dto/list-thread-messages-response.dto.js +58 -0
- package/dist/threads/dto/list-thread-messages-response.dto.js.map +1 -0
- package/dist/threads/dto/service/threads.service.types.d.ts +28 -2
- package/dist/threads/dto/thread-list-item-response.dto.d.ts +1 -0
- package/dist/threads/dto/thread-list-item-response.dto.js +10 -0
- package/dist/threads/dto/thread-list-item-response.dto.js.map +1 -1
- package/dist/threads/dto/thread-message-response.dto.d.ts +14 -0
- package/dist/threads/dto/thread-message-response.dto.js +103 -0
- package/dist/threads/dto/thread-message-response.dto.js.map +1 -0
- package/dist/threads/dto/thread-response.dto.d.ts +2 -1
- package/dist/threads/dto/thread-response.dto.js +16 -3
- package/dist/threads/dto/thread-response.dto.js.map +1 -1
- package/dist/threads/dto/update-thread.dto.js.map +1 -1
- package/dist/threads/events/threads.events.d.ts +47 -0
- package/dist/threads/events/threads.events.js +60 -0
- package/dist/threads/events/threads.events.js.map +1 -0
- package/dist/threads/openai-mcp-server-factory.service.d.ts +5 -0
- package/dist/threads/openai-mcp-server-factory.service.js +114 -0
- package/dist/threads/openai-mcp-server-factory.service.js.map +1 -0
- package/dist/threads/thread-message.entity.d.ts +11 -0
- package/dist/threads/thread-message.entity.js +59 -0
- package/dist/threads/thread-message.entity.js.map +1 -0
- package/dist/threads/thread-state-reconciler.service.d.ts +26 -0
- package/dist/threads/thread-state-reconciler.service.js +266 -0
- package/dist/threads/thread-state-reconciler.service.js.map +1 -0
- package/dist/threads/thread-title.service.d.ts +11 -0
- package/dist/threads/thread-title.service.js +75 -0
- package/dist/threads/thread-title.service.js.map +1 -0
- package/dist/threads/thread.entity.d.ts +4 -1
- package/dist/threads/thread.entity.js +13 -2
- package/dist/threads/thread.entity.js.map +1 -1
- package/dist/threads/threads-state.service.spec.js +1 -0
- package/dist/threads/threads-state.service.spec.js.map +1 -1
- package/dist/threads/threads.controller.d.ts +7 -0
- package/dist/threads/threads.controller.js +72 -0
- package/dist/threads/threads.controller.js.map +1 -1
- package/dist/threads/threads.gateway.d.ts +32 -0
- package/dist/threads/threads.gateway.js +172 -0
- package/dist/threads/threads.gateway.js.map +1 -0
- package/dist/threads/threads.module.js +21 -1
- package/dist/threads/threads.module.js.map +1 -1
- package/dist/threads/threads.service.d.ts +24 -3
- package/dist/threads/threads.service.js +224 -19
- package/dist/threads/threads.service.js.map +1 -1
- package/dist/threads/threads.service.spec.js +2 -0
- package/dist/threads/threads.service.spec.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +11 -8
- package/dist/public/assets/index-BCPnRhO0.js +0 -11
- package/dist/public/assets/index-_FDBdUKK.css +0 -1
- package/dist/public/beta/assets/index-S66NF8rC.js +0 -85
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
var ux=Object.defineProperty;var od=e=>{throw TypeError(e)};var cx=(e,t,n)=>t in e?ux(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var yr=(e,t,n)=>cx(e,typeof t!="symbol"?t+"":t,n),sd=(e,t,n)=>t.has(e)||od("Cannot "+n);var le=(e,t,n)=>(sd(e,t,"read from private field"),n?n.call(e):t.get(e)),xn=(e,t,n)=>t.has(e)?od("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Tt=(e,t,n,r)=>(sd(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 Gh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Kh={exports:{}},Us={},Qh={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"),dx=Symbol.for("react.portal"),fx=Symbol.for("react.fragment"),hx=Symbol.for("react.strict_mode"),px=Symbol.for("react.profiler"),mx=Symbol.for("react.provider"),gx=Symbol.for("react.context"),yx=Symbol.for("react.forward_ref"),xx=Symbol.for("react.suspense"),vx=Symbol.for("react.memo"),kx=Symbol.for("react.lazy"),ld=Symbol.iterator;function wx(e){return e===null||typeof e!="object"?null:(e=ld&&e[ld]||e["@@iterator"],typeof e=="function"?e:null)}var Yh={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Xh=Object.assign,Jh={};function Qr(e,t,n){this.props=e,this.context=t,this.refs=Jh,this.updater=n||Yh}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 Zh(){}Zh.prototype=Qr.prototype;function ju(e,t,n){this.props=e,this.context=t,this.refs=Jh,this.updater=n||Yh}var _u=ju.prototype=new Zh;_u.constructor=ju;Xh(_u,Qr.prototype);_u.isPureReactComponent=!0;var ad=Array.isArray,ep=Object.prototype.hasOwnProperty,Iu={current:null},tp={key:!0,ref:!0,__self:!0,__source:!0};function np(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)ep.call(t,r)&&!tp.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 Sx(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 Cx(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var ud=/\/+/g;function yl(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Cx(""+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 dx:s=!0}}if(s)return s=e,i=i(s),e=r===""?"."+yl(s,0):r,ad(i)?(n="",e!=null&&(n=e.replace(ud,"$&/")+"/"),qo(i,t,n,"",function(c){return c})):i!=null&&(Au(i)&&(i=Sx(i,n+(!i.key||s&&s.key===i.key?"":(""+i.key).replace(ud,"$&/")+"/")+e)),t.push(i)),1;if(s=0,r=r===""?".":r+":",ad(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=wx(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 Ex(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},bx={ReactCurrentDispatcher:qe,ReactCurrentBatchConfig:Go,ReactCurrentOwner:Iu};function rp(){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=fx;ee.Profiler=px;ee.PureComponent=ju;ee.StrictMode=hx;ee.Suspense=xx;ee.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=bx;ee.act=rp;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=Xh({},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)ep.call(t,u)&&!tp.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:gx,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:mx,_context:e},e.Consumer=e};ee.createElement=np;ee.createFactory=function(e){var t=np.bind(null,e);return t.type=e,t};ee.createRef=function(){return{current:null}};ee.forwardRef=function(e){return{$$typeof:yx,render:e}};ee.isValidElement=Au;ee.lazy=function(e){return{$$typeof:kx,_payload:{_status:-1,_result:e},_init:Ex}};ee.memo=function(e,t){return{$$typeof:vx,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=rp;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";Qh.exports=ee;var k=Qh.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 Nx=k,Tx=Symbol.for("react.element"),jx=Symbol.for("react.fragment"),_x=Object.prototype.hasOwnProperty,Ix=Nx.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Ax={key:!0,ref:!0,__self:!0,__source:!0};function ip(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)_x.call(t,r)&&!Ax.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:Tx,type:e,key:o,ref:s,props:i,_owner:Ix.current}}Us.Fragment=jx;Us.jsx=ip;Us.jsxs=ip;Kh.exports=Us;var a=Kh.exports,op={exports:{}},dt={},sp={exports:{}},lp={};/**
|
|
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 N(C){if(x=!1,v(C),!y)if(n(u)!==null)y=!0,O(j);else{var B=n(c);B!==null&&L(N,B.startTime-C)}}function j(C,B){y=!1,x&&(x=!1,g(D),D=-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&&L(N,Se.startTime-B),T=!1}return T}finally{d=null,h=w,p=!1}}var E=!1,_=null,D=-1,R=5,b=-1;function P(){return!(e.unstable_now()-b<R)}function V(){if(_!==null){var C=e.unstable_now();b=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 U=new MessageChannel,G=U.port2;U.port1.onmessage=V,$=function(){G.postMessage(null)}}else $=function(){S(V,0)};function O(C){_=C,E||(E=!0,$())}function L(C,B){D=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,O(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(D),D=-1):x=!0,L(N,w-J))):(C.sortIndex=se,t(u,C),y||p||(y=!0,O(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}}}})(lp);sp.exports=lp;var Rx=sp.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 Px=k,ct=Rx;function F(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 ap=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++)ap.add(t[e])}var un=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),fa=Object.prototype.hasOwnProperty,Dx=/^[: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]*$/,cd={},dd={};function Lx(e){return fa.call(dd,e)?!0:fa.call(cd,e)?!1:Dx.test(e)?dd[e]=!0:(cd[e]=!0,!1)}function Ox(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 Fx(e,t,n,r){if(t===null||typeof t>"u"||Ox(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 Le={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Le[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];Le[t]=new Ge(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Le[e]=new Ge(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Le[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){Le[e]=new Ge(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Le[e]=new Ge(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Le[e]=new Ge(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Le[e]=new Ge(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Le[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);Le[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);Le[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);Le[t]=new Ge(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Le[e]=new Ge(e,1,!1,e.toLowerCase(),null,!1,!1)});Le.xlinkHref=new Ge("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Le[e]=new Ge(e,1,!1,e.toLowerCase(),null,!0,!0)});function Du(e,t,n,r){var i=Le.hasOwnProperty(t)?Le[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Fx(t,n,i,r)&&(n=null),r||i===null?Lx(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=Px.__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"),Lu=Symbol.for("react.strict_mode"),ha=Symbol.for("react.profiler"),up=Symbol.for("react.provider"),cp=Symbol.for("react.context"),Ou=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"),dp=Symbol.for("react.offscreen"),fd=Symbol.iterator;function si(e){return e===null||typeof e!="object"?null:(e=fd&&e[fd]||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 zx(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 Lu:return"StrictMode";case pa:return"Suspense";case ma:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case cp:return(e.displayName||"Context")+".Consumer";case up:return(e._context.displayName||"Context")+".Provider";case Ou: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 Mx(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===Lu?"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 fp(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Bx(e){var t=fp(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=Bx(e))}function hp(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=fp(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 hd(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 pp(e,t){t=t.checked,t!=null&&Du(e,"checked",t,!1)}function xa(e,t){pp(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 pd(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(F(91));return ke({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function md(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(F(92));if(ki(n)){if(1<n.length)throw Error(F(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Mn(n)}}function mp(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 gd(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function gp(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"?gp(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Co,yp=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},Ux=["Webkit","ms","Moz","O"];Object.keys(Ei).forEach(function(e){Ux.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ei[t]=Ei[e]})});function xp(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 vp(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=xp(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Hx=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(Hx[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(F(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(F(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(F(61))}if(t.style!=null&&typeof t.style!="object")throw Error(F(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 ba=null,Dr=null,Lr=null;function yd(e){if(e=uo(e)){if(typeof ba!="function")throw Error(F(280));var t=e.stateNode;t&&(t=qs(t),ba(e.stateNode,e.type,t))}}function kp(e){Dr?Lr?Lr.push(e):Lr=[e]:Dr=e}function wp(){if(Dr){var e=Dr,t=Lr;if(Lr=Dr=null,yd(e),t)for(e=0;e<t.length;e++)yd(t[e])}}function Sp(e,t){return e(t)}function Cp(){}var wl=!1;function Ep(e,t,n){if(wl)return e(t,n);wl=!0;try{return Sp(e,t,n)}finally{wl=!1,(Dr!==null||Lr!==null)&&(Cp(),wp())}}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(F(231,t,typeof n));return n}var Na=!1;if(un)try{var li={};Object.defineProperty(li,"passive",{get:function(){Na=!0}}),window.addEventListener("test",li,li),window.removeEventListener("test",li,li)}catch{Na=!1}function $x(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 bi=!1,hs=null,ps=!1,Ta=null,Wx={onError:function(e){bi=!0,hs=e}};function Vx(e,t,n,r,i,o,s,l,u){bi=!1,hs=null,$x.apply(Wx,arguments)}function qx(e,t,n,r,i,o,s,l,u){if(Vx.apply(this,arguments),bi){if(bi){var c=hs;bi=!1,hs=null}else throw Error(F(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 bp(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 xd(e){if(dr(e)!==e)throw Error(F(188))}function Gx(e){var t=e.alternate;if(!t){if(t=dr(e),t===null)throw Error(F(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 xd(i),e;if(o===r)return xd(i),t;o=o.sibling}throw Error(F(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(F(189))}}if(n.alternate!==r)throw Error(F(190))}if(n.tag!==3)throw Error(F(188));return n.stateNode.current===n?e:t}function Np(e){return e=Gx(e),e!==null?Tp(e):null}function Tp(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Tp(e);if(t!==null)return t;e=e.sibling}return null}var jp=ct.unstable_scheduleCallback,vd=ct.unstable_cancelCallback,Kx=ct.unstable_shouldYield,Qx=ct.unstable_requestPaint,Ce=ct.unstable_now,Yx=ct.unstable_getCurrentPriorityLevel,Mu=ct.unstable_ImmediatePriority,_p=ct.unstable_UserBlockingPriority,ms=ct.unstable_NormalPriority,Xx=ct.unstable_LowPriority,Ip=ct.unstable_IdlePriority,Hs=null,Qt=null;function Jx(e){if(Qt&&typeof Qt.onCommitFiberRoot=="function")try{Qt.onCommitFiberRoot(Hs,e,void 0,(e.current.flags&128)===128)}catch{}}var Ot=Math.clz32?Math.clz32:tv,Zx=Math.log,ev=Math.LN2;function tv(e){return e>>>=0,e===0?32:31-(Zx(e)/ev|0)|0}var Eo=64,bo=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-Ot(t),i=1<<n,r|=e[n],t&=~i;return r}function nv(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 rv(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var s=31-Ot(o),l=1<<s,u=i[s];u===-1?(!(l&n)||l&r)&&(i[s]=nv(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 Ap(){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-Ot(t),e[t]=n}function iv(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-Ot(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-Ot(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var ae=0;function Rp(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Pp,Uu,Dp,Lp,Op,_a=!1,No=[],In=null,An=null,Rn=null,Ui=new Map,Hi=new Map,En=[],ov="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 kd(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 sv(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 Fp(e){var t=Xn(e.target);if(t!==null){var n=dr(t);if(n!==null){if(t=n.tag,t===13){if(t=bp(n),t!==null){e.blockedOn=t,Op(e.priority,function(){Dp(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 wd(e,t,n){Ko(e)&&n.delete(t)}function lv(){_a=!1,In!==null&&Ko(In)&&(In=null),An!==null&&Ko(An)&&(An=null),Rn!==null&&Ko(Rn)&&(Rn=null),Ui.forEach(wd),Hi.forEach(wd)}function ui(e,t){e.blockedOn===t&&(e.blockedOn=null,_a||(_a=!0,ct.unstable_scheduleCallback(ct.unstable_NormalPriority,lv)))}function $i(e){function t(i){return ui(i,e)}if(0<No.length){ui(No[0],e);for(var n=1;n<No.length;n++){var r=No[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);)Fp(n),n.blockedOn===null&&En.shift()}var Or=pn.ReactCurrentBatchConfig,ys=!0;function av(e,t,n,r){var i=ae,o=Or.transition;Or.transition=null;try{ae=1,Hu(e,t,n,r)}finally{ae=i,Or.transition=o}}function uv(e,t,n,r){var i=ae,o=Or.transition;Or.transition=null;try{ae=4,Hu(e,t,n,r)}finally{ae=i,Or.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),kd(e,r);else if(sv(i,e,t,n,r))r.stopPropagation();else if(kd(e,r),t&4&&-1<ov.indexOf(e)){for(;i!==null;){var o=uo(i);if(o!==null&&Pp(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=bp(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 zp(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(Yx()){case Mu:return 1;case _p:return 4;case ms:case Xx:return 16;case Ip:return 536870912;default:return 16}default:return 16}}var jn=null,$u=null,Qo=null;function Mp(){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 Sd(){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:Sd,this.isPropagationStopped=Sd,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}),cv=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}}),Cd=ft($s),dv=ke({},$s,{dataTransfer:0}),fv=ft(dv),hv=ke({},ao,{relatedTarget:0}),bl=ft(hv),pv=ke({},Yr,{animationName:0,elapsedTime:0,pseudoElement:0}),mv=ft(pv),gv=ke({},Yr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),yv=ft(gv),xv=ke({},Yr,{data:0}),Ed=ft(xv),vv={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},kv={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"},wv={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Sv(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=wv[e])?!!t[e]:!1}function Vu(){return Sv}var Cv=ke({},ao,{key:function(e){if(e.key){var t=vv[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"?kv[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}}),Ev=ft(Cv),bv=ke({},$s,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),bd=ft(bv),Nv=ke({},ao,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Vu}),Tv=ft(Nv),jv=ke({},Yr,{propertyName:0,elapsedTime:0,pseudoElement:0}),_v=ft(jv),Iv=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}),Av=ft(Iv),Rv=[9,13,27,32],qu=un&&"CompositionEvent"in window,Ni=null;un&&"documentMode"in document&&(Ni=document.documentMode);var Pv=un&&"TextEvent"in window&&!Ni,Bp=un&&(!qu||Ni&&8<Ni&&11>=Ni),Nd=" ",Td=!1;function Up(e,t){switch(e){case"keyup":return Rv.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hp(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Cr=!1;function Dv(e,t){switch(e){case"compositionend":return Hp(t);case"keypress":return t.which!==32?null:(Td=!0,Nd);case"textInput":return e=t.data,e===Nd&&Td?null:e;default:return null}}function Lv(e,t){if(Cr)return e==="compositionend"||!qu&&Up(e,t)?(e=Mp(),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 Bp&&t.locale!=="ko"?null:t.data;default:return null}}var Ov={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 jd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Ov[e.type]:t==="textarea"}function $p(e,t,n,r){kp(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 Fv(e){em(e,0)}function Ws(e){var t=Nr(e);if(hp(t))return e}function zv(e,t){if(e==="change")return t}var Wp=!1;if(un){var Nl;if(un){var Tl="oninput"in document;if(!Tl){var _d=document.createElement("div");_d.setAttribute("oninput","return;"),Tl=typeof _d.oninput=="function"}Nl=Tl}else Nl=!1;Wp=Nl&&(!document.documentMode||9<document.documentMode)}function Id(){Ti&&(Ti.detachEvent("onpropertychange",Vp),Wi=Ti=null)}function Vp(e){if(e.propertyName==="value"&&Ws(Wi)){var t=[];$p(t,Wi,e,zu(e)),Ep(Fv,t)}}function Mv(e,t,n){e==="focusin"?(Id(),Ti=t,Wi=n,Ti.attachEvent("onpropertychange",Vp)):e==="focusout"&&Id()}function Bv(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ws(Wi)}function Uv(e,t){if(e==="click")return Ws(t)}function Hv(e,t){if(e==="input"||e==="change")return Ws(t)}function $v(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Mt=typeof Object.is=="function"?Object.is:$v;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 Ad(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Rd(e,t){var n=Ad(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=Ad(n)}}function qp(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?qp(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Gp(){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 Wv(e){var t=Gp(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&qp(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=Rd(n,o);var s=Rd(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 Vv=un&&"documentMode"in document&&11>=document.documentMode,Er=null,Aa=null,ji=null,Ra=!1;function Pd(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 br={animationend:jo("Animation","AnimationEnd"),animationiteration:jo("Animation","AnimationIteration"),animationstart:jo("Animation","AnimationStart"),transitionend:jo("Transition","TransitionEnd")},jl={},Kp={};un&&(Kp=document.createElement("div").style,"AnimationEvent"in window||(delete br.animationend.animation,delete br.animationiteration.animation,delete br.animationstart.animation),"TransitionEvent"in window||delete br.transitionend.transition);function Vs(e){if(jl[e])return jl[e];if(!br[e])return e;var t=br[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Kp)return jl[e]=t[n];return e}var Qp=Vs("animationend"),Yp=Vs("animationiteration"),Xp=Vs("animationstart"),Jp=Vs("transitionend"),Zp=new Map,Dd="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){Zp.set(e,t),cr(t,[e])}for(var _l=0;_l<Dd.length;_l++){var Il=Dd[_l],qv=Il.toLowerCase(),Gv=Il[0].toUpperCase()+Il.slice(1);Un(qv,"on"+Gv)}Un(Qp,"onAnimationEnd");Un(Yp,"onAnimationIteration");Un(Xp,"onAnimationStart");Un("dblclick","onDoubleClick");Un("focusin","onFocus");Un("focusout","onBlur");Un(Jp,"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(" "),Kv=new Set("cancel close invalid load scroll toggle".split(" ").concat(Si));function Ld(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,qx(r,t,void 0,e),e.currentTarget=null}function em(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;Ld(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;Ld(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)||(tm(t,e,2,!1),n.add(r))}function Al(e,t,n){var r=0;t&&(r|=4),tm(n,e,r,t)}var _o="_reactListening"+Math.random().toString(36).slice(2);function qi(e){if(!e[_o]){e[_o]=!0,ap.forEach(function(n){n!=="selectionchange"&&(Kv.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 tm(e,t,n,r){switch(zp(t)){case 1:var i=av;break;case 4:i=uv;break;default:i=Hu}n=i.bind(null,t,n,e),i=void 0,!Na||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}Ep(function(){var c=o,f=zu(n),d=[];e:{var h=Zp.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=Ev;break;case"focusin":y="focus",p=bl;break;case"focusout":y="blur",p=bl;break;case"beforeblur":case"afterblur":p=bl;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=Cd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=fv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=Tv;break;case Qp:case Yp:case Xp:p=mv;break;case Jp:p=_v;break;case"scroll":p=cv;break;case"wheel":p=Av;break;case"copy":case"cut":case"paste":p=yv;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=bd}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 N=v.stateNode;if(v.tag===5&&N!==null&&(v=N,g!==null&&(N=Bi(m,g),N!=null&&x.push(Gi(m,N,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=Cd,N="onMouseLeave",g="onMouseEnter",m="mouse",(e==="pointerout"||e==="pointerover")&&(x=bd,N="onPointerLeave",g="onPointerEnter",m="pointer"),S=p==null?h:Nr(p),v=y==null?h:Nr(y),h=new x(N,m+"leave",p,n,f),h.target=S,h.relatedTarget=v,N=null,Xn(f)===c&&(x=new x(g,m+"enter",y,n,f),x.target=v,x.relatedTarget=S,N=x),S=N,p&&y)t:{for(x=p,g=y,m=0,v=x;v;v=xr(v))m++;for(v=0,N=g;N;N=xr(N))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&&Od(d,h,p,x,!1),y!==null&&S!==null&&Od(d,S,y,x,!0)}}e:{if(h=c?Nr(c):window,p=h.nodeName&&h.nodeName.toLowerCase(),p==="select"||p==="input"&&h.type==="file")var j=zv;else if(jd(h))if(Wp)j=Hv;else{j=Bv;var E=Mv}else(p=h.nodeName)&&p.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(j=Uv);if(j&&(j=j(e,c))){$p(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?Nr(c):window,e){case"focusin":(jd(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,Pd(d,n,f);break;case"selectionchange":if(Vv)break;case"keydown":case"keyup":Pd(d,n,f)}var _;if(qu)e:{switch(e){case"compositionstart":var D="onCompositionStart";break e;case"compositionend":D="onCompositionEnd";break e;case"compositionupdate":D="onCompositionUpdate";break e}D=void 0}else Cr?Up(e,n)&&(D="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(D="onCompositionStart");D&&(Bp&&n.locale!=="ko"&&(Cr||D!=="onCompositionStart"?D==="onCompositionEnd"&&Cr&&(_=Mp()):(jn=f,$u="value"in jn?jn.value:jn.textContent,Cr=!0)),E=vs(c,D),0<E.length&&(D=new Ed(D,e,null,n,f),d.push({event:D,listeners:E}),_?D.data=_:(_=Hp(n),_!==null&&(D.data=_)))),(_=Pv?Dv(e,n):Lv(e,n))&&(c=vs(c,"onBeforeInput"),0<c.length&&(f=new Ed("onBeforeInput","beforeinput",null,n,f),d.push({event:f,listeners:c}),f.data=_))}em(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 Od(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 Qv=/\r\n?/g,Yv=/\u0000|\uFFFD/g;function Fd(e){return(typeof e=="string"?e:""+e).replace(Qv,`
|
|
38
|
+
`).replace(Yv,"")}function Io(e,t,n){if(t=Fd(t),Fd(e)!==t&&n)throw Error(F(425))}function ks(){}var Pa=null,Da=null;function La(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 Oa=typeof setTimeout=="function"?setTimeout:void 0,Xv=typeof clearTimeout=="function"?clearTimeout:void 0,zd=typeof Promise=="function"?Promise:void 0,Jv=typeof queueMicrotask=="function"?queueMicrotask:typeof zd<"u"?function(e){return zd.resolve(null).then(e).catch(Zv)}:Oa;function Zv(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 Md(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,ek="__reactListeners$"+Xr,tk="__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=Md(e);e!==null;){if(n=e[Kt])return n;e=Md(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 Nr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(F(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),Je=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 Ze(e){return e=e.childContextTypes,e!=null}function ws(){me(Je),me(Ue)}function Bd(e,t,n){if(Ue.current!==Bn)throw Error(F(168));he(Ue,t),he(Je,n)}function nm(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(F(108,Mx(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(Je,Je.current),!0}function Ud(e,t,n){var r=e.stateNode;if(!r)throw Error(F(169));n?(e=nm(e,t,rr),r.__reactInternalMemoizedMergedChildContext=e,me(Je),me(Ue),he(Ue,e)):me(Je),he(Je,n)}var on=null,Gs=!1,Dl=!1;function rm(e){on===null?on=[e]:on.push(e)}function nk(e){Gs=!0,rm(e)}function $n(){if(!Dl&&on!==null){Dl=!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)),jp(Mu,$n),i}finally{ae=t,Dl=!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 im(e,t,n){gt[yt++]=sn,gt[yt++]=ln,gt[yt++]=ir,ir=e;var r=sn;e=ln;var i=32-Ot(r)-1;r&=~(1<<i),n+=1;var o=32-Ot(t)+i;if(30<o){var s=i-i%5;o=(r&(1<<s)-1).toString(32),r>>=s,i-=s,sn=1<<32-Ot(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),im(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,Dt=null;function om(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 Hd(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(!Hd(e,t)){if(Ma(e))throw Error(F(418));t=Pn(n.nextSibling);var r=at;t&&Hd(e,t)?om(r,n):(e.flags=e.flags&-4097|2,ge=!1,at=e)}}else{if(Ma(e))throw Error(F(418));e.flags=e.flags&-4097|2,ge=!1,at=e}}}function $d(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 $d(e),ge=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!La(e.type,e.memoizedProps)),t&&(t=lt)){if(Ma(e))throw sm(),Error(F(418));for(;t;)om(e,t),t=Pn(t.nextSibling)}if($d(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(F(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 sm(){for(var e=lt;e;)e=Pn(e.nextSibling)}function $r(){lt=at=null,ge=!1}function Yu(e){Dt===null?Dt=[e]:Dt.push(e)}var rk=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(F(309));var r=n.stateNode}if(!r)throw Error(F(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(F(284));if(!n._owner)throw Error(F(290,e))}return e}function Ro(e,t){throw e=Object.prototype.toString.call(t),Error(F(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Wd(e){var t=e._init;return t(e._payload)}function lm(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,N){return m===null||m.tag!==6?(m=Ul(v,g.mode,N),m.return=g,m):(m=i(m,v),m.return=g,m)}function u(g,m,v,N){var j=v.type;return j===Sr?f(g,m,v.props.children,N,v.key):m!==null&&(m.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===wn&&Wd(j)===m.type)?(N=i(m,v.props),N.ref=di(g,m,v),N.return=g,N):(N=rs(v.type,v.key,v.props,null,g.mode,N),N.ref=di(g,m,v),N.return=g,N)}function c(g,m,v,N){return m===null||m.tag!==4||m.stateNode.containerInfo!==v.containerInfo||m.stateNode.implementation!==v.implementation?(m=Hl(v,g.mode,N),m.return=g,m):(m=i(m,v.children||[]),m.return=g,m)}function f(g,m,v,N,j){return m===null||m.tag!==7?(m=nr(v,g.mode,N,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 N=m._init;return d(g,N(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,N){var j=m!==null?m.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return j!==null?null:l(g,m,""+v,N);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case wo:return v.key===j?u(g,m,v,N):null;case wr:return v.key===j?c(g,m,v,N):null;case wn:return j=v._init,h(g,m,j(v._payload),N)}if(ki(v)||si(v))return j!==null?null:f(g,m,v,N,null);Ro(g,v)}return null}function p(g,m,v,N,j){if(typeof N=="string"&&N!==""||typeof N=="number")return g=g.get(v)||null,l(m,g,""+N,j);if(typeof N=="object"&&N!==null){switch(N.$$typeof){case wo:return g=g.get(N.key===null?v:N.key)||null,u(m,g,N,j);case wr:return g=g.get(N.key===null?v:N.key)||null,c(m,g,N,j);case wn:var E=N._init;return p(g,m,v,E(N._payload),j)}if(ki(N)||si(N))return g=g.get(v)||null,f(m,g,N,j,null);Ro(m,N)}return null}function y(g,m,v,N){for(var j=null,E=null,_=m,D=m=0,R=null;_!==null&&D<v.length;D++){_.index>D?(R=_,_=null):R=_.sibling;var b=h(g,_,v[D],N);if(b===null){_===null&&(_=R);break}e&&_&&b.alternate===null&&t(g,_),m=o(b,m,D),E===null?j=b:E.sibling=b,E=b,_=R}if(D===v.length)return n(g,_),ge&&Kn(g,D),j;if(_===null){for(;D<v.length;D++)_=d(g,v[D],N),_!==null&&(m=o(_,m,D),E===null?j=_:E.sibling=_,E=_);return ge&&Kn(g,D),j}for(_=r(g,_);D<v.length;D++)R=p(_,g,D,v[D],N),R!==null&&(e&&R.alternate!==null&&_.delete(R.key===null?D:R.key),m=o(R,m,D),E===null?j=R:E.sibling=R,E=R);return e&&_.forEach(function(P){return t(g,P)}),ge&&Kn(g,D),j}function x(g,m,v,N){var j=si(v);if(typeof j!="function")throw Error(F(150));if(v=j.call(v),v==null)throw Error(F(151));for(var E=j=null,_=m,D=m=0,R=null,b=v.next();_!==null&&!b.done;D++,b=v.next()){_.index>D?(R=_,_=null):R=_.sibling;var P=h(g,_,b.value,N);if(P===null){_===null&&(_=R);break}e&&_&&P.alternate===null&&t(g,_),m=o(P,m,D),E===null?j=P:E.sibling=P,E=P,_=R}if(b.done)return n(g,_),ge&&Kn(g,D),j;if(_===null){for(;!b.done;D++,b=v.next())b=d(g,b.value,N),b!==null&&(m=o(b,m,D),E===null?j=b:E.sibling=b,E=b);return ge&&Kn(g,D),j}for(_=r(g,_);!b.done;D++,b=v.next())b=p(_,g,D,b.value,N),b!==null&&(e&&b.alternate!==null&&_.delete(b.key===null?D:b.key),m=o(b,m,D),E===null?j=b:E.sibling=b,E=b);return e&&_.forEach(function(V){return t(g,V)}),ge&&Kn(g,D),j}function S(g,m,v,N){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&&Wd(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,N,v.key),m.return=g,g=m):(N=rs(v.type,v.key,v.props,null,g.mode,N),N.ref=di(g,m,v),N.return=g,g=N)}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,N),m.return=g,g=m}return s(g);case wn:return E=v._init,S(g,m,E(v._payload),N)}if(ki(v))return y(g,m,v,N);if(si(v))return x(g,m,v,N);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,N),m.return=g,g=m),s(g)):n(g,m)}return S}var Wr=lm(!0),am=lm(!1),bs=Hn(null),Ns=null,Ir=null,Xu=null;function Ju(){Xu=Ir=Ns=null}function Zu(e){var t=bs.current;me(bs),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){Ns=e,Xu=Ir=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Xe=!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(Ns===null)throw Error(F(308));Ir=e,Ns.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 um(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 cm(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 Dn(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 Vd(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 qd(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(F(191,i));i.call(r)}}}var co={},Yt=Hn(co),Qi=Hn(co),Yi=Hn(co);function Zn(e){if(e===co)throw Error(F(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 dm(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 Ll=[];function ic(){for(var e=0;e<Ll.length;e++)Ll[e]._workInProgressVersionPrimary=null;Ll.length=0}var Jo=pn.ReactCurrentDispatcher,Ol=pn.ReactCurrentBatchConfig,or=0,ve=null,_e=null,Ae=null,_s=!1,_i=!1,Xi=0,ik=0;function Fe(){throw Error(F(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?ak:uk,e=n(r,i),_i){o=0;do{if(_i=!1,Xi=0,25<=o)throw Error(F(301));o+=1,Ae=_e=null,t.updateQueue=null,Jo.current=ck,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(F(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(F(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(F(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)||(Xe=!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(F(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)||(Xe=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function fm(){}function hm(e,t){var n=ve,r=Ct(),i=t(),o=!Mt(r.memoizedState,i);if(o&&(r.memoizedState=i,Xe=!0),r=r.queue,ac(gm.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||Ae!==null&&Ae.memoizedState.tag&1){if(n.flags|=2048,Zi(9,mm.bind(null,n,r,i,t),void 0,null),Re===null)throw Error(F(349));or&30||pm(n,t,i)}return i}function pm(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 mm(e,t,n,r){t.value=n,t.getSnapshot=r,ym(t)&&xm(e)}function gm(e,t,n){return n(function(){ym(t)&&xm(e)})}function ym(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Mt(e,n)}catch{return!0}}function xm(e){var t=dn(e,1);t!==null&&Ft(t,e,1,-1)}function Gd(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=lk.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 vm(){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 Kd(e,t){return Zo(8390656,8,e,t)}function ac(e,t){return Ks(2048,8,e,t)}function km(e,t){return Ks(4,2,e,t)}function wm(e,t){return Ks(4,4,e,t)}function Sm(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 Cm(e,t,n){return n=n!=null?n.concat([e]):null,Ks(4,4,Sm.bind(null,t,e),n)}function uc(){}function Em(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 bm(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 Nm(e,t,n){return or&21?(Mt(n,t)||(n=Ap(),ve.lanes|=n,sr|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Xe=!0),e.memoizedState=n)}function ok(e,t){var n=ae;ae=n!==0&&4>n?n:4,e(!0);var r=Ol.transition;Ol.transition={};try{e(!1),t()}finally{ae=n,Ol.transition=r}}function Tm(){return Ct().memoizedState}function sk(e,t,n){var r=On(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},jm(e))_m(t,n);else if(n=um(e,t,n,r),n!==null){var i=Ve();Ft(n,e,r,i),Im(n,t,r)}}function lk(e,t,n){var r=On(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(jm(e))_m(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=um(e,t,i,r),n!==null&&(i=Ve(),Ft(n,e,r,i),Im(n,t,r))}}function jm(e){var t=e.alternate;return e===ve||t!==null&&t===ve}function _m(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 Im(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},ak={readContext:St,useCallback:function(e,t){return $t().memoizedState=[e,t===void 0?null:t],e},useContext:St,useEffect:Kd,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Zo(4194308,4,Sm.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=sk.bind(null,ve,e),[r.memoizedState,e]},useRef:function(e){var t=$t();return e={current:e},t.memoizedState=e},useState:Gd,useDebugValue:uc,useDeferredValue:function(e){return $t().memoizedState=e},useTransition:function(){var e=Gd(!1),t=e[0];return e=ok.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(F(407));n=n()}else{if(n=t(),Re===null)throw Error(F(349));or&30||pm(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Kd(gm.bind(null,r,o,e),[e]),r.flags|=2048,Zi(9,mm.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-Ot(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Xi++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=ik++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},uk={readContext:St,useCallback:Em,useContext:St,useEffect:ac,useImperativeHandle:Cm,useInsertionEffect:km,useLayoutEffect:wm,useMemo:bm,useReducer:Fl,useRef:vm,useState:function(){return Fl(Ji)},useDebugValue:uc,useDeferredValue:function(e){var t=Ct();return Nm(t,_e.memoizedState,e)},useTransition:function(){var e=Fl(Ji)[0],t=Ct().memoizedState;return[e,t]},useMutableSource:fm,useSyncExternalStore:hm,useId:Tm,unstable_isNewReconciler:!1},ck={readContext:St,useCallback:Em,useContext:St,useEffect:ac,useImperativeHandle:Cm,useInsertionEffect:km,useLayoutEffect:wm,useMemo:bm,useReducer:zl,useRef:vm,useState:function(){return zl(Ji)},useDebugValue:uc,useDeferredValue:function(e){var t=Ct();return _e===null?t.memoizedState=e:Nm(t,_e.memoizedState,e)},useTransition:function(){var e=zl(Ji)[0],t=Ct().memoizedState;return[e,t]},useMutableSource:fm,useSyncExternalStore:hm,useId:Tm,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=On(e),o=an(r,i);o.payload=t,n!=null&&(o.callback=n),t=Dn(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=On(e),o=an(r,i);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=Dn(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=On(e),i=an(n,r);i.tag=2,t!=null&&(i.callback=t),t=Dn(e,i,r),t!==null&&(Ft(t,e,r,n),Xo(t,e,r))}};function Qd(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 Am(e,t,n){var r=!1,i=Bn,o=t.contextType;return typeof o=="object"&&o!==null?o=St(o):(i=Ze(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 Yd(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=Ze(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+=zx(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 dk=typeof WeakMap=="function"?WeakMap:Map;function Rm(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 Pm(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"&&(Ln===null?Ln=new Set([this]):Ln.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function Xd(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new dk;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=bk.bind(null,e,t,n),t.then(e,e))}function Jd(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 Zd(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,Dn(n,t,1))),n.lanes|=1),e)}var fk=pn.ReactCurrentOwner,Xe=!1;function $e(e,t,n,r){t.child=e===null?am(t,null,n,r):Wr(t,e.child,n,r)}function ef(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&&!Xe?(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 tf(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,Dm(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 Dm(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(Vi(o,r)&&e.ref===t.ref)if(Xe=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(Xe=!0);else return t.lanes=e.lanes,fn(e,t,i)}return Va(e,t,n,r,i)}function Lm(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 Om(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=Ze(n)?rr:Ue.current;return o=Hr(t,o),Fr(t,i),n=sc(e,t,n,r,o,i),r=lc(),e!==null&&!Xe?(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 nf(e,t,n,r,i){if(Ze(n)){var o=!0;Ss(t)}else o=!1;if(Fr(t,i),t.stateNode===null)es(e,t),Am(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=Ze(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)&&Yd(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||Je.current||Sn?(typeof f=="function"&&(Ha(t,n,f,r),u=t.memoizedState),(l=Sn||Qd(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,cm(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=Ze(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)&&Yd(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||Je.current||Sn?(typeof p=="function"&&(Ha(t,n,p,r),y=t.memoizedState),(c=Sn||Qd(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){Om(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return i&&Ud(t,n,!1),fn(e,t,o);r=t.stateNode,fk.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&&Ud(t,n,!0),t.child}function Fm(e){var t=e.stateNode;t.pendingContext?Bd(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Bd(e,t.context,!1),nc(e,t.containerInfo)}function rf(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 zm(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 hk(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 hk(e,t,n,r,i,o,s){if(n)return t.flags&256?(t.flags&=-257,r=Ml(Error(F(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(F(419)),r=Ml(o,r,void 0),Po(e,t,s,r)}if(l=(s&e.childLanes)!==0,Xe||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(F(421))),Po(e,t,s,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=Nk.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,lt=Pn(i.nextSibling),at=t,ge=!0,Dt=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 of(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 Mm(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&&of(e,n,t);else if(e.tag===19)of(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(F(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 pk(e,t,n){switch(t.tag){case 3:Fm(t),$r();break;case 5:dm(t);break;case 1:Ze(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(bs,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?zm(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 Mm(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,Lm(e,t,n)}return fn(e,t,n)}var Bm,Qa,Um,Hm;Bm=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(){};Um=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)}};Hm=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 mk(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 Ze(t.type)&&ws(),ze(t),null;case 3:return r=t.stateNode,Vr(),me(Je),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,Dt!==null&&(ru(Dt),Dt=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)Um(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(F(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":hd(r,o),pe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},pe("invalid",r);break;case"textarea":md(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),pd(r,o,!0);break;case"textarea":So(r),gd(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=gp(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,Bm(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":hd(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":md(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"?vp(e,u):o==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&yp(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&&Du(e,o,u,s))}switch(n){case"input":So(e),pd(e,r,!1);break;case"textarea":So(e),gd(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)Hm(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(F(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&<!==null&&t.mode&1&&!(t.flags&128))sm(),$r(),t.flags|=98560,o=!1;else if(o=Ao(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(F(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(F(317));o[Kt]=t}else $r(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ze(t),o=!1}else Dt!==null&&(ru(Dt),Dt=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 Ze(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(F(156,t.tag))}function gk(e,t){switch(Qu(t),t.tag){case 1:return Ze(t.type)&&ws(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Vr(),me(Je),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(F(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 Do=!1,Me=!1,yk=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 sf=!1;function xk(e,t){if(Pa=ys,e=Gp(),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(Da={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(F(163))}}catch(N){we(t,t.return,N)}if(e=t.sibling,e!==null){e.return=t.return,K=e;break}K=t.return}return y=sf,sf=!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 $m(e){var t=e.alternate;t!==null&&(e.alternate=null,$m(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[ek],delete t[tk])),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 Wm(e){return e.tag===5||e.tag===3||e.tag===4}function lf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Wm(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;)Vm(e,t,n),n=n.sibling}function Vm(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 af(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new yk),t.forEach(function(r){var i=Tk.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(F(160));Vm(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;)qm(t,e),t=t.sibling}function qm(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&&pp(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"?vp(i,d):f==="dangerouslySetInnerHTML"?yp(i,d):f==="children"?Mi(i,d):Du(i,f,d,c)}switch(l){case"input":xa(i,o);break;case"textarea":mp(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(F(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&&af(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){cf(d);continue}}p!==null?(p.return=h,K=p):cf(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=xp("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&&af(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(Wm(n)){var r=n;break e}n=n.return}throw Error(F(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Mi(i,""),r.flags&=-33);var o=lf(e);Za(e,o,i);break;case 3:case 4:var s=r.stateNode.containerInfo,l=lf(e);Ja(e,l,s);break;default:throw Error(F(161))}}catch(u){we(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function vk(e,t,n){K=e,Gm(e)}function Gm(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||Do;if(!s){var l=i.alternate,u=l!==null&&l.memoizedState!==null||Me;l=Do;var c=Me;if(Do=s,(Me=u)&&!c)for(K=i;K!==null;)s=K,u=s.child,s.tag===22&&s.memoizedState!==null?df(i):u!==null?(u.return=s,K=u):df(i);for(;o!==null;)K=o,Gm(o),o=o.sibling;K=i,Do=l,Me=c}uf(e)}else i.subtreeFlags&8772&&o!==null?(o.return=i,K=o):uf(e)}}function uf(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&&qd(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}qd(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(F(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 cf(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 df(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 kk=Math.ceil,As=pn.ReactCurrentDispatcher,dc=pn.ReactCurrentOwner,wt=pn.ReactCurrentBatchConfig,oe=0,Re=null,be=null,De=0,st=0,Rr=Hn(0),Ie=0,eo=null,sr=0,Xs=0,fc=0,Ai=null,Ye=null,hc=0,Gr=1/0,rn=null,Rs=!1,eu=null,Ln=null,Lo=!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 On(e){return e.mode&1?oe&2&&De!==0?De&-De:rk.transition!==null?(ns===0&&(ns=Ap()),ns):(e=ae,e!==0||(e=window.event,e=e===void 0?16:zp(e.type)),e):1}function Ft(e,t,n,r){if(50<Ri)throw Ri=0,tu=null,Error(F(185));lo(e,n,r),(!(oe&2)||e!==Re)&&(e===Re&&(!(oe&2)&&(Xs|=n),Ie===4&&bn(e,De)),et(e,r),n===1&&oe===0&&!(t.mode&1)&&(Gr=Ce()+500,Gs&&$n()))}function et(e,t){var n=e.callbackNode;rv(e,t);var r=gs(e,e===Re?De:0);if(r===0)n!==null&&vd(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&vd(n),t===1)e.tag===0?nk(ff.bind(null,e)):rm(ff.bind(null,e)),Jv(function(){!(oe&6)&&$n()}),n=null;else{switch(Rp(r)){case 1:n=Mu;break;case 4:n=_p;break;case 16:n=ms;break;case 536870912:n=Ip;break;default:n=ms}n=tg(n,Km.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Km(e,t){if(ts=-1,ns=0,oe&6)throw Error(F(327));var n=e.callbackNode;if(zr()&&e.callbackNode!==n)return null;var r=gs(e,e===Re?De:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Ds(e,r);else{t=r;var i=oe;oe|=2;var o=Ym();(Re!==e||De!==t)&&(rn=null,Gr=Ce()+500,tr(e,t));do try{Ck();break}catch(l){Qm(e,l)}while(!0);Ju(),As.current=o,oe=i,be!==null?t=0:(Re=null,De=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),bn(e,r),et(e,Ce()),n;if(t===6)bn(e,r);else{if(i=e.current.alternate,!(r&30)&&!wk(i)&&(t=Ds(e,r),t===2&&(o=ja(e),o!==0&&(r=o,t=nu(e,o))),t===1))throw n=eo,tr(e,0),bn(e,r),et(e,Ce()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(F(345));case 2:Qn(e,Ye,rn);break;case 3:if(bn(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=Oa(Qn.bind(null,e,Ye,rn),t);break}Qn(e,Ye,rn);break;case 4:if(bn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var s=31-Ot(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*kk(r/1960))-r,10<r){e.timeoutHandle=Oa(Qn.bind(null,e,Ye,rn),r);break}Qn(e,Ye,rn);break;case 5:Qn(e,Ye,rn);break;default:throw Error(F(329))}}}return et(e,Ce()),e.callbackNode===n?Km.bind(null,e):null}function nu(e,t){var n=Ai;return e.current.memoizedState.isDehydrated&&(tr(e,t).flags|=256),e=Ds(e,t),e!==2&&(t=Ye,Ye=n,t!==null&&ru(t)),e}function ru(e){Ye===null?Ye=e:Ye.push.apply(Ye,e)}function wk(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 bn(e,t){for(t&=~fc,t&=~Xs,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Ot(t),r=1<<n;e[n]=-1,t&=~r}}function ff(e){if(oe&6)throw Error(F(327));zr();var t=gs(e,0);if(!(t&1))return et(e,Ce()),null;var n=Ds(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),bn(e,t),et(e,Ce()),n;if(n===6)throw Error(F(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Qn(e,Ye,rn),et(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,Xv(n)),be!==null)for(n=be.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(Je),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,be=e=Fn(e.current,null),De=st=t,Ie=0,eo=null,fc=Xs=sr=0,Ye=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 Qm(e,t){do{var n=be;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,be=null;break}e:{var o=e,s=n.return,l=n,u=t;if(t=De,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=Jd(s);if(p!==null){p.flags&=-257,Zd(p,s,l,o,t),p.mode&1&&Xd(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)){Xd(o,c,t),gc();break e}u=Error(F(426))}}else if(ge&&l.mode&1){var S=Jd(s);if(S!==null){!(S.flags&65536)&&(S.flags|=256),Zd(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=Rm(o,u,t);Vd(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"&&(Ln===null||!Ln.has(v)))){o.flags|=65536,t&=-t,o.lanes|=t;var N=Pm(o,l,t);Vd(o,N);break e}}o=o.return}while(o!==null)}Jm(n)}catch(j){t=j,be===n&&n!==null&&(be=n=n.return);continue}break}while(!0)}function Ym(){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)||bn(Re,De)}function Ds(e,t){var n=oe;oe|=2;var r=Ym();(Re!==e||De!==t)&&(rn=null,tr(e,t));do try{Sk();break}catch(i){Qm(e,i)}while(!0);if(Ju(),oe=n,As.current=r,be!==null)throw Error(F(261));return Re=null,De=0,Ie}function Sk(){for(;be!==null;)Xm(be)}function Ck(){for(;be!==null&&!Kx();)Xm(be)}function Xm(e){var t=eg(e.alternate,e,st);e.memoizedProps=e.pendingProps,t===null?Jm(e):be=t,dc.current=null}function Jm(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=gk(n,t),n!==null){n.flags&=32767,be=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ie=6,be=null;return}}else if(n=mk(n,t,st),n!==null){be=n;return}if(t=t.sibling,t!==null){be=t;return}be=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,Ek(e,t,n,r)}finally{wt.transition=i,ae=r}return null}function Ek(e,t,n,r){do zr();while(_n!==null);if(oe&6)throw Error(F(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(F(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(iv(e,o),e===Re&&(be=Re=null,De=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Lo||(Lo=!0,tg(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,xk(e,n),qm(n,e),Wv(Da),ys=!!Pa,Da=Pa=null,e.current=n,vk(n),Qx(),oe=l,ae=s,wt.transition=o}else e.current=n;if(Lo&&(Lo=!1,_n=e,Ps=i),o=e.pendingLanes,o===0&&(Ln=null),Jx(n.stateNode),et(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=Rp(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(F(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($m(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 N=l.sibling;if(N!==null){N.return=l.return,K=N;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 hf(e,t,n){t=qr(n,t),t=Rm(e,t,1),e=Dn(e,t,1),t=Ve(),e!==null&&(lo(e,1,t),et(e,t))}function we(e,t,n){if(e.tag===3)hf(e,e,n);else for(;t!==null;){if(t.tag===3){hf(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Ln===null||!Ln.has(r))){e=qr(n,e),e=Pm(t,e,1),t=Dn(t,e,1),e=Ve(),t!==null&&(lo(t,1,e),et(t,e));break}}t=t.return}}function bk(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Ve(),e.pingedLanes|=e.suspendedLanes&n,Re===e&&(De&n)===n&&(Ie===4||Ie===3&&(De&130023424)===De&&500>Ce()-hc?tr(e,0):fc|=n),et(e,t)}function Zm(e,t){t===0&&(e.mode&1?(t=bo,bo<<=1,!(bo&130023424)&&(bo=4194304)):t=1);var n=Ve();e=dn(e,t),e!==null&&(lo(e,t,n),et(e,n))}function Nk(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Zm(e,n)}function Tk(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(F(314))}r!==null&&r.delete(t),Zm(e,n)}var eg;eg=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Je.current)Xe=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Xe=!1,pk(e,t,n);Xe=!!(e.flags&131072)}else Xe=!1,ge&&t.flags&1048576&&im(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,Ze(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=_k(r),e=It(r,e),i){case 0:t=Va(null,t,r,e,n);break e;case 1:t=nf(null,t,r,e,n);break e;case 11:t=ef(null,t,r,e,n);break e;case 14:t=tf(null,t,r,It(r.type,e),n);break e}throw Error(F(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),nf(e,t,r,i,n);case 3:e:{if(Fm(t),e===null)throw Error(F(387));r=t.pendingProps,o=t.memoizedState,i=o.element,cm(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(F(423)),t),t=rf(e,t,r,n,i);break e}else if(r!==i){i=qr(Error(F(424)),t),t=rf(e,t,r,n,i);break e}else for(lt=Pn(t.stateNode.containerInfo.firstChild),at=t,ge=!0,Dt=null,n=am(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 dm(t),e===null&&Ba(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,La(r,i)?s=null:o!==null&&La(r,o)&&(t.flags|=32),Om(e,t),$e(e,t,s,n),t.child;case 6:return e===null&&Ba(t),null;case 13:return zm(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),ef(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(bs,r._currentValue),r._currentValue=s,o!==null)if(Mt(o.value,s)){if(o.children===i.children&&!Je.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(F(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),tf(e,t,r,i,n);case 15:return Dm(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,Ze(r)?(e=!0,Ss(t)):e=!1,Fr(t,n),Am(t,r,i),$a(t,r,i,n),qa(null,t,r,!0,e,n);case 19:return Mm(e,t,n);case 22:return Lm(e,t,n)}throw Error(F(156,t.tag))};function tg(e,t){return jp(e,t)}function jk(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 jk(e,t,n,r)}function yc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function _k(e){if(typeof e=="function")return yc(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ou)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 Lu: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 dp:return Js(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case up:s=10;break e;case cp:s=9;break e;case Ou:s=11;break e;case Fu:s=14;break e;case wn:s=16,r=null;break e}throw Error(F(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=dp,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 Ik(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 Ik(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 Ak(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 ng(e){if(!e)return Bn;e=e._reactInternals;e:{if(dr(e)!==e||e.tag!==1)throw Error(F(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ze(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(F(171))}if(e.tag===1){var n=e.type;if(Ze(n))return nm(e,n,t)}return t}function rg(e,t,n,r,i,o,s,l,u){return e=xc(n,r,!0,e,i,o,s,l,u),e.context=ng(null),n=e.current,r=Ve(),i=On(n),o=an(r,i),o.callback=t??null,Dn(n,o,i),e.current.lanes=i,lo(e,i,r),et(e,r),e}function Zs(e,t,n,r){var i=t.current,o=Ve(),s=On(i);return n=ng(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=Dn(i,t,s),e!==null&&(Ft(e,i,s,o),Xo(e,i,s)),s}function Ls(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 pf(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){pf(e,t),(e=e.alternate)&&pf(e,t)}function Rk(){return null}var ig=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(F(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=Lp();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&&Fp(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 mf(){}function Pk(e,t,n,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var c=Ls(s);o.call(c)}}var s=rg(t,r,e,0,null,!1,!1,"",mf);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=Ls(u);l.call(c)}}var u=xc(e,0,!1,null,null,!1,!1,"",mf);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=Ls(s);l.call(u)}}Zs(t,s,e,i)}else s=Pk(n,t,e,i,r);return Ls(s)}Pp=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),et(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)}};Dp=function(e){if(e.tag===13){var t=On(e),n=dn(e,t);if(n!==null){var r=Ve();Ft(n,e,t,r)}vc(e,t)}};Lp=function(){return ae};Op=function(e,t){var n=ae;try{return ae=e,t()}finally{ae=n}};ba=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(F(90));hp(r),xa(r,i)}}}break;case"textarea":mp(e,n);break;case"select":t=n.value,t!=null&&Pr(e,!!n.multiple,t,!1)}};Sp=pc;Cp=lr;var Dk={usingClientEntryPoint:!1,Events:[uo,Nr,qs,kp,wp,pc]},hi={findFiberByHostInstance:Xn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Lk={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=Np(e),e===null?null:e.stateNode},findFiberByHostInstance:hi.findFiberByHostInstance||Rk,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 Oo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Oo.isDisabled&&Oo.supportsFiber)try{Hs=Oo.inject(Lk),Qt=Oo}catch{}}dt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Dk;dt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!wc(t))throw Error(F(200));return Ak(e,t,null,n)};dt.createRoot=function(e,t){if(!wc(e))throw Error(F(299));var n=!1,r="",i=ig;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(F(188)):(e=Object.keys(e).join(","),Error(F(268,e)));return e=Np(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(F(200));return nl(null,e,t,!0,n)};dt.hydrateRoot=function(e,t,n){if(!wc(e))throw Error(F(405));var r=n!=null&&n.hydratedSources||null,i=!1,o="",s=ig;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=rg(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(F(200));return nl(null,e,t,!1,n)};dt.unmountComponentAtNode=function(e){if(!tl(e))throw Error(F(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(F(200));if(e==null||e._reactInternals===void 0)throw Error(F(38));return nl(e,t,n,!1,r)};dt.version="18.3.1-next-f1338f8080-20240426";function og(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(og)}catch(e){console.error(e)}}og(),op.exports=dt;var Ok=op.exports,sg,gf=Ok;sg=gf.createRoot,gf.hydrateRoot;/**
|
|
41
|
+
* react-router v7.13.1
|
|
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 yf="popstate";function xf(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function Fk(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 Mk(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 zk(){return Math.random().toString(36).substring(2,10)}function vf(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||zk(),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 Mk(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=xf(S)?S:iu(x.location,S,g);c=f()+1;let v=vf(m,c),N=x.createHref(m.unstable_mask||m);try{s.pushState(v,"",N)}catch(j){if(j instanceof DOMException&&j.name==="DataCloneError")throw j;i.location.assign(N)}o&&u&&u({action:l,location:x.location,delta:1})}function p(S,g){l="REPLACE";let m=xf(S)?S:iu(x.location,S,g);c=f();let v=vf(m,c),N=x.createHref(m.unstable_mask||m);s.replaceState(v,"",N),o&&u&&u({action:l,location:x.location,delta:0})}function y(S){return Bk(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(yf,d),u=S,()=>{i.removeEventListener(yf,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 Bk(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 lg(e,t,n="/"){return Uk(e,t,n,!1)}function Uk(e,t,n,r){let i=typeof t=="string"?Jr(t):t,o=hn(i.pathname||"/",n);if(o==null)return null;let s=ag(e);Hk(s);let l=null;for(let u=0;l==null&&u<s.length;++u){let c=Zk(o);l=Xk(s[u],c,r)}return l}function ag(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}".`),ag(s.children,t,h,d,u)),!(s.path==null&&!s.index)&&t.push({path:d,score:Qk(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 ug(s.path))o(s,l,!0,c)}),t}function ug(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=ug(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 Hk(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Yk(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var $k=/^:[\w-]+$/,Wk=3,Vk=2,qk=1,Gk=10,Kk=-2,kf=e=>e==="*";function Qk(e,t){let n=e.split("/"),r=n.length;return n.some(kf)&&(r+=Kk),t&&(r+=Vk),n.filter(i=>!kf(i)).reduce((i,o)=>i+($k.test(o)?Wk:o===""?qk:Gk),r)}function Yk(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 Xk(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=Os({path:u.relativePath,caseSensitive:u.caseSensitive,end:c},f),h=u.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=Os({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:rw(Xt([o,d.pathnameBase])),route:h}),d.pathnameBase!=="/"&&(o=Xt([o,d.pathnameBase]))}return s}function Os(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Jk(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 Jk(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 Zk(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 ew=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function tw(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=wf(n.substring(1),"/"):o=wf(n,t)):o=t,{pathname:o,search:iw(r),hash:ow(i)}}function wf(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 nw(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Sc(e){let t=nw(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=tw(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,"/"),rw=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),iw=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,ow=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,sw=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 lw(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function aw(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var cg=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function dg(e,t){let n=e;if(typeof n!="string"||!ew.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(cg)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 fg=["POST","PUT","PATCH","DELETE"];new Set(fg);var uw=["GET",...fg];new Set(uw);var Zr=k.createContext(null);Zr.displayName="DataRouter";var il=k.createContext(null);il.displayName="DataRouterState";var cw=k.createContext(!1),hg=k.createContext({isTransitioning:!1});hg.displayName="ViewTransition";var dw=k.createContext(new Map);dw.displayName="Fetchers";var fw=k.createContext(null);fw.displayName="Await";var ht=k.createContext(null);ht.displayName="Navigation";var fo=k.createContext(null);fo.displayName="Location";var bt=k.createContext({outlet:null,matches:[],isDataRoute:!1});bt.displayName="Route";var Cc=k.createContext(null);Cc.displayName="RouteError";var pg="REACT_ROUTER_ERROR",hw="REDIRECT",pw="ROUTE_ERROR_RESPONSE";function mw(e){if(e.startsWith(`${pg}:${hw}:{`))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 gw(e){if(e.startsWith(`${pg}:${pw}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new sw(t.status,t.statusText,t.data)}catch{}}function yw(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 tt(){return ye(ei(),"useLocation() may be used only in the context of a <Router> component."),k.useContext(fo).location}var mg="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function gg(e){k.useContext(ht).static||k.useLayoutEffect(e)}function Oe(){let{isDataRoute:e}=k.useContext(bt);return e?Rw():xw()}function xw(){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(bt),{pathname:i}=tt(),o=JSON.stringify(Sc(r)),s=k.useRef(!1);return gg(()=>{s.current=!0}),k.useCallback((u,c={})=>{if(Et(s.current,mg),!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 vw=k.createContext(null);function kw(e){let t=k.useContext(bt).outlet;return k.useMemo(()=>t&&k.createElement(vw.Provider,{value:e},t),[t,e])}function fr(){let{matches:e}=k.useContext(bt),t=e[e.length-1];return t?t.params:{}}function ho(e,{relative:t}={}){let{matches:n}=k.useContext(bt),{pathname:r}=tt(),i=JSON.stringify(Sc(n));return k.useMemo(()=>rl(e,JSON.parse(i),r,t==="path"),[e,i,r,t])}function ww(e,t){return yg(e,t)}function yg(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(bt),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||"";vg(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=tt(),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=lg(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=Nw(y&&y.map(g=>Object.assign({},g,{params:Object.assign({},s,g.params),pathname:Xt([u,r.encodeLocation?r.encodeLocation(g.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?u:Xt([u,r.encodeLocation?r.encodeLocation(g.pathnameBase.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 Sw(){let e=Aw(),t=lw(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 Cw=k.createElement(Sw,null),xg=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=gw(e.digest);n&&(e=n)}let t=e!==void 0?k.createElement(bt.Provider,{value:this.props.routeContext},k.createElement(Cc.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?k.createElement(Ew,{error:e},t):t}};xg.contextType=cw;var Wl=new WeakMap;function Ew({children:e,error:t}){let{basename:n}=k.useContext(ht);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=mw(t.digest);if(r){let i=Wl.get(t);if(i)throw i;let o=dg(r.location,n);if(cg&&!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 bw({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(bt.Provider,{value:e},n)}function Nw(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:aw(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||Cw,s&&(l<0&&h===0?(vg("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(bw,{match:d,routeContext:{outlet:f,matches:g,isDataRoute:r!=null},children:v})};return r&&(d.route.ErrorBoundary||d.route.errorElement||h===0)?k.createElement(xg,{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 Tw(e){let t=k.useContext(Zr);return ye(t,Ec(e)),t}function jw(e){let t=k.useContext(il);return ye(t,Ec(e)),t}function _w(e){let t=k.useContext(bt);return ye(t,Ec(e)),t}function bc(e){let t=_w(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 Iw(){return bc("useRouteId")}function Aw(){var r;let e=k.useContext(Cc),t=jw("useRouteError"),n=bc("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function Rw(){let{router:e}=Tw("useNavigate"),t=bc("useNavigate"),n=k.useRef(!1);return gg(()=>{n.current=!0}),k.useCallback(async(i,o={})=>{Et(n.current,mg),n.current&&(typeof i=="number"?await e.navigate(i):await e.navigate(i,{fromRouteId:t,...o}))},[e,t])}var Sf={};function vg(e,t,n){!t&&!Sf[e]&&(Sf[e]=!0,Et(!1,n))}k.memo(Pw);function Pw({routes:e,future:t,state:n,isStatic:r,onError:i}){return yg(e,void 0,{state:n,isStatic:r,onError:i})}function Dw({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(bt),{pathname:s}=tt(),l=Oe(),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 Nc(e){return kw(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 Lw({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 Ow({children:e,location:t}){return ww(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 Fw(e){return ol(e)&&e.tagName.toLowerCase()==="button"}function zw(e){return ol(e)&&e.tagName.toLowerCase()==="form"}function Mw(e){return ol(e)&&e.tagName.toLowerCase()==="input"}function Bw(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Uw(e,t){return e.button===0&&(!t||t==="_self")&&!Bw(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 Hw(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 $w(){if(Fo===null)try{new FormData(document.createElement("form"),0),Fo=!1}catch{Fo=!0}return Fo}var Ww=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Vl(e){return e!=null&&!Ww.has(e)?(Et(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${os}"`),null):e}function Vw(e,t){let n,r,i,o,s;if(zw(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(Fw(e)||Mw(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),!$w()){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 qw(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 Gw(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 Kw(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 Qw(e,t,n){let r=await Promise.all(e.map(async i=>{let o=t.routes[i.route.id];if(o){let s=await Gw(o,n);return s.links?s.links():[]}return[]}));return Zw(r.flat(1).filter(Kw).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function Cf(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 Yw(e,t,{includeHydrateFallback:n}={}){return Xw(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 Xw(e){return[...new Set(e)]}function Jw(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function Zw(e,t){let n=new Set;return new Set(t),e.reduce((r,i)=>{let o=JSON.stringify(Jw(i));return n.has(o)||(n.add(o),r.push({key:o,link:i})),r},[])}function kg(){let e=k.useContext(Zr);return Tc(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function e1(){let e=k.useContext(il);return Tc(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var jc=k.createContext(void 0);jc.displayName="FrameworkContext";function wg(){let e=k.useContext(jc);return Tc(e,"You must render this element inside a <HydratedRouter> element"),e}function t1(e,t){let n=k.useContext(jc),[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 n1({page:e,...t}){let{router:n}=kg(),r=k.useMemo(()=>lg(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?k.createElement(i1,{page:e,matches:r,...t}):null}function r1(e){let{manifest:t,routeModules:n}=wg(),[r,i]=k.useState([]);return k.useEffect(()=>{let o=!1;return Qw(e,t,n).then(s=>{o||i(s)}),()=>{o=!0}},[e,t,n]),r}function i1({page:e,matches:t,...n}){let r=tt(),{future:i,manifest:o,routeModules:s}=wg(),{basename:l}=kg(),{loaderData:u,matches:c}=e1(),f=k.useMemo(()=>Cf(e,t,c,o,r,"data"),[e,t,c,o,r]),d=k.useMemo(()=>Cf(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 N;let v=o.routes[m.route.id];!v||!v.hasLoader||(!f.some(j=>j.route.id===m.route.id)&&m.route.id in u&&((N=s[m.route.id])!=null&&N.shouldRevalidate)||v.hasClientLoader?S=!0:x.add(m.route.id))}),x.size===0)return[];let g=qw(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(()=>Yw(d,o),[d,o]),y=r1(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 o1(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var s1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{s1&&(window.__reactRouterVersion="7.13.1")}catch{}function l1({basename:e,children:t,unstable_useTransitions:n,window:r}){let i=k.useRef();i.current==null&&(i.current=Fk({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(Lw,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:o,unstable_useTransitions:n})}var Sg=/^(?:[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"&&Sg.test(f),N=dg(f,S);f=N.to;let j=yw(f,{relative:i}),E=tt(),_=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[D,R,b]=t1(r,y),P=c1(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 $=!(N.isExternal||o),U=k.createElement("a",{...y,...b,href:($?_:void 0)||N.absoluteURL||j,onClick:$?V:t,ref:o1(x,R),target:c,"data-discover":!v&&n==="render"?"true":void 0});return D&&!v?k.createElement(k.Fragment,null,U,k.createElement(n1,{page:j})):U});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=tt(),p=k.useContext(il),{navigator:y,basename:x}=k.useContext(ht),S=p!=null&&g1(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 N=g!=="/"&&g.endsWith("/")?g.length-1:g.length;let j=m===g||!i&&m.startsWith(g)&&m.charAt(N)==="/",E=v!=null&&(v===g||!i&&v.startsWith(g)&&v.charAt(g.length)==="/"),_={isActive:j,isPending:E,isTransitioning:S},D=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 b=typeof o=="function"?o(_):o;return k.createElement(ar,{...c,"aria-current":D,className:R,ref:f,style:b,to:s,viewTransition:l},typeof u=="function"?u(_):u)});lu.displayName="NavLink";var a1=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=p1(),g=m1(l,{relative:c}),m=s.toLowerCase()==="get"?"get":"post",v=typeof l=="string"&&Sg.test(l),N=j=>{if(u&&u(j),j.defaultPrevented)return;j.preventDefault();let E=j.nativeEvent.submitter,_=(E==null?void 0:E.getAttribute("formmethod"))||s,D=()=>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(()=>D()):D()};return k.createElement("form",{ref:y,method:m,action:g,onSubmit:r?u:N,...p,"data-discover":!v&&e==="render"?"true":void 0})});a1.displayName="Form";function u1(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Cg(e){let t=k.useContext(Zr);return ye(t,u1(e)),t}function c1(e,{target:t,replace:n,unstable_mask:r,state:i,preventScrollReset:o,relative:s,viewTransition:l,unstable_defaultShouldRevalidate:u,unstable_useTransitions:c}={}){let f=Oe(),d=tt(),h=ho(e,{relative:s});return k.useCallback(p=>{if(Uw(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 d1(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=tt(),i=k.useMemo(()=>Hw(r.search,n.current?null:t.current),[r.search]),o=Oe(),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 f1=0,h1=()=>`__${String(++f1)}__`;function p1(){let{router:e}=Cg("useSubmit"),{basename:t}=k.useContext(ht),n=Iw(),r=e.fetch,i=e.navigate;return k.useCallback(async(o,s={})=>{let{action:l,method:u,encType:c,formData:f,body:d}=Vw(o,t);if(s.navigate===!1){let h=s.fetcherKey||h1();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 m1(e,{relative:t}={}){let{basename:n}=k.useContext(ht),r=k.useContext(bt);ye(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),o={...ho(e||".",{relative:t})},s=tt();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 g1(e,{relative:t}={}){let n=k.useContext(hg);ye(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Cg("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 Os(i.pathname,s)!=null||Os(i.pathname,o)!=null}const y1="/beta";class Ef 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 x1 extends Error{constructor(t){super(t),this.name="CancelError"}get isCancelled(){return!0}}var qt,Gt,At,Nn,er,Br,Tn;class v1{constructor(t){xn(this,qt);xn(this,Gt);xn(this,At);xn(this,Nn);xn(this,er);xn(this,Br);xn(this,Tn);Tt(this,qt,!1),Tt(this,Gt,!1),Tt(this,At,!1),Tt(this,Nn,[]),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,Nn).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,Nn).length)try{for(const t of le(this,Nn))t()}catch(t){console.warn("Cancellation threw an error",t);return}le(this,Nn).length=0,le(this,Tn)&&le(this,Tn).call(this,new x1("Request aborted"))}}get isCancelled(){return le(this,At)}}qt=new WeakMap,Gt=new WeakMap,At=new WeakMap,Nn=new WeakMap,er=new WeakMap,Br=new WeakMap,Tn=new WeakMap;const z={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 bf;(function(e){(function(t){t.HUMAN="human",t.AGENT="agent"})(e.type||(e.type={}))})(bf||(bf={}));var Nf;(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={}))})(Nf||(Nf={}));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 Tf;(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={}))})(Tf||(Tf={}));var jf;(function(e){(function(t){t.NONE="none",t.CLIENT_SECRET_BASIC="client_secret_basic"})(e.token_endpoint_auth_method||(e.token_endpoint_auth_method={}))})(jf||(jf={}));var Cn;(function(e){(function(t){t.PENDING="pending",t.AUTHORIZED="authorized",t.FAILED="failed"})(e.status||(e.status={}))})(Cn||(Cn={}));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 au;(function(e){(function(t){t.HTTP="http",t.STDIO="stdio"})(e.type||(e.type={}))})(au||(au={}));var If;(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={}))})(If||(If={}));var Af;(function(e){(function(t){t.ACCESS_TOKEN="access_token",t.REFRESH_TOKEN="refresh_token"})(e.token_type_hint||(e.token_type_hint={}))})(Af||(Af={}));var Rf;(function(e){(function(t){t.BEARER="Bearer"})(e.token_type||(e.token_type={}))})(Rf||(Rf={}));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 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 Df;(function(e){(function(t){t.NONE="none",t.CLIENT_SECRET_BASIC="client_secret_basic"})(e.token_endpoint_auth_method||(e.token_endpoint_auth_method={}))})(Df||(Df={}));var Lf;(function(e){(function(t){t.HTTP="http",t.STDIO="stdio"})(e.type||(e.type={}))})(Lf||(Lf={}));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 Of;(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={}))})(Of||(Of={}));var Ff;(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={}))})(Ff||(Ff={}));var zf;(function(e){(function(t){t.AUTHORIZATION_CODE="authorization_code",t.REFRESH_TOKEN="refresh_token"})(e.grant_type||(e.grant_type={}))})(zf||(zf={}));var Mf;(function(e){(function(t){t.BEARER="Bearer"})(e.token_type||(e.token_type={}))})(Mf||(Mf={}));var Bf;(function(e){(function(t){t.HTTP="http",t.STDIO="stdio"})(e.type||(e.type={}))})(Bf||(Bf={}));var Uf;(function(e){(function(t){t.ADMIN="admin",t.STANDARD="standard"})(e.role||(e.role={}))})(Uf||(Uf={}));const _c=e=>e!=null,po=e=>typeof e=="string",ql=e=>po(e)&&e!=="",Ic=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]),Eg=e=>e instanceof FormData,k1=e=>{try{return btoa(e)}catch{return Buffer.from(e).toString("base64")}},w1=e=>{const t=[],n=(i,o)=>{t.push(`${encodeURIComponent(i)}=${encodeURIComponent(String(o))}`)},r=(i,o)=>{_c(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("&")}`:""},S1=(e,t)=>{const n=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}${w1(t.query)}`:i},C1=e=>{if(e.formData){const t=new FormData,n=(r,i)=>{po(i)||Ic(i)?t.append(r,i):t.append(r,JSON.stringify(i))};return Object.entries(e.formData).filter(([r,i])=>_c(i)).forEach(([r,i])=>{Array.isArray(i)?i.forEach(o=>n(r,o)):n(r,i)}),t}},zo=async(e,t)=>t,E1=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])=>_c(u)).reduce((l,[u,c])=>({...l,[u]:String(c)}),{});if(ql(n)&&(s.Authorization=`Bearer ${n}`),ql(r)&&ql(i)){const l=k1(`${r}:${i}`);s.Authorization=`Basic ${l}`}return t.body!==void 0&&(t.mediaType?s["Content-Type"]=t.mediaType:Ic(t.body)?s["Content-Type"]=t.body.type||"application/octet-stream":po(t.body)?s["Content-Type"]="text/plain":Eg(t.body)||(s["Content-Type"]="application/json")),new Headers(s)},b1=e=>{var t;if(e.body!==void 0)return(t=e.mediaType)!=null&&t.includes("/json")?JSON.stringify(e.body):po(e.body)||Ic(e.body)||Eg(e.body)?e.body:JSON.stringify(e.body)},N1=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 s(()=>l.abort()),await fetch(n,u)},T1=(e,t)=>{if(t){const n=e.headers.get(t);if(po(n))return n}},j1=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)}},_1=(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 Ef(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 Ef(e,t,`Generic Error: status: ${i}; status text: ${o}; body: ${s}`)}},H=(e,t)=>new v1(async(n,r,i)=>{try{const o=S1(e,t),s=C1(t),l=b1(t),u=await E1(e,t);if(!i.isCancelled){const c=await N1(e,t,o,l,s,u,i),f=await j1(c),d=T1(c,t.responseHeader),h={url:o,ok:c.ok,status:c.status,statusText:c.statusText,body:d??f};_1(t,h),n(h.body)}}catch(o){r(o)}});class Gl{static agentsControllerCreateAgent(t){return H(z,{method:"POST",url:"/api/v1/agents",body:t,mediaType:"application/json"})}static agentsControllerListAgents(t,n=1,r=20){return H(z,{method:"GET",url:"/api/v1/agents",query:{isActive:t,page:n,limit:r}})}static agentsControllerGetAgentBySlug(t){return H(z,{method:"GET",url:"/api/v1/agents/{slug}",path:{slug:t}})}static agentsControllerPatchAgent(t,n){return H(z,{method:"PATCH",url:"/api/v1/agents/{actorId}",path:{actorId:t},body:n,mediaType:"application/json"})}static agentsControllerDeleteAgent(t){return H(z,{method:"DELETE",url:"/api/v1/agents/{actorId}",path:{actorId:t}})}}class I1{static authJourneysControllerGetAuthJourneys(t){return H(z,{method:"GET",url:"/api/v1/auth-journeys/servers/{serverId}",path:{serverId:t},errors:{404:"Server not found"}})}}class A1{static clientRegistrationControllerRegisterClient(t,n,r){return H(z,{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){return H(z,{method:"GET",url:"/api/v1/auth/clients/{clientId}",path:{clientId:t},errors:{404:"Client not found"}})}static clientRegistrationControllerListClients(){return H(z,{method:"GET",url:"/api/v1/auth/clients"})}static authorizationControllerAuthorize(t,n,r,i,o,s,l,u,c,f){return H(z,{method:"GET",url:"/api/v1/auth/authorize/mcp/{serverIdentifier}/{version}",path:{serverIdentifier:u,version:c},query:{response_type:t,scope:f,client_id:n,code_challenge:r,code_challenge_method:i,redirect_uri:o,state:s,resource:l},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){return H(z,{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){return H(z,{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){return H(z,{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){return H(z,{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){return H(z,{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){return H(z,{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(){return H(z,{method:"GET",url:"/api/v1/auth/scopes"})}}class _t{static contextControllerCreateBlock(t){return H(z,{method:"POST",url:"/api/v1/context/blocks",body:t,mediaType:"application/json",errors:{400:"Invalid input data"}})}static contextControllerListBlocks(t){return H(z,{method:"GET",url:"/api/v1/context/blocks",query:{tag:t}})}static contextControllerGetBlockTree(){return H(z,{method:"GET",url:"/api/v1/context/blocks/tree"})}static contextControllerGetBlock(t){return H(z,{method:"GET",url:"/api/v1/context/blocks/{id}",path:{id:t}})}static contextControllerUpdateBlock(t,n){return H(z,{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){return H(z,{method:"DELETE",url:"/api/v1/context/blocks/{id}",path:{id:t}})}static contextControllerAppendToBlock(t,n){return H(z,{method:"POST",url:"/api/v1/context/blocks/{id}/append",path:{id:t},body:n,mediaType:"application/json"})}static contextControllerReorderBlock(t,n){return H(z,{method:"PATCH",url:"/api/v1/context/blocks/{id}/reorder",path:{id:t},body:n,mediaType:"application/json"})}static contextControllerMoveBlock(t,n){return H(z,{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){return H(z,{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){return H(z,{method:"DELETE",url:"/api/v1/context/blocks/{id}/tags/{tagId}",path:{id:t,tagId:n}})}static contextControllerHandleMcpGet(){return H(z,{method:"GET",url:"/api/v1/context/blocks/mcp"})}static contextControllerHandleMcpPost(){return H(z,{method:"POST",url:"/api/v1/context/blocks/mcp"})}static contextControllerHandleMcpPut(){return H(z,{method:"PUT",url:"/api/v1/context/blocks/mcp"})}static contextControllerHandleMcpDelete(){return H(z,{method:"DELETE",url:"/api/v1/context/blocks/mcp"})}static contextControllerHandleMcpPatch(){return H(z,{method:"PATCH",url:"/api/v1/context/blocks/mcp"})}static contextControllerHandleMcpOptions(){return H(z,{method:"OPTIONS",url:"/api/v1/context/blocks/mcp"})}static contextControllerHandleMcpHead(){return H(z,{method:"HEAD",url:"/api/v1/context/blocks/mcp"})}}class bg{static metaControllerCreateTag(t){return H(z,{method:"POST",url:"/api/v1/meta/tags",body:t,mediaType:"application/json",errors:{400:"Invalid input data"}})}static metaControllerGetAllTags(){return H(z,{method:"GET",url:"/api/v1/meta/tags"})}static metaControllerGetTagColors(){return H(z,{method:"GET",url:"/api/v1/meta/tags/colors"})}static metaControllerDeleteTag(t){return H(z,{method:"DELETE",url:"/api/v1/meta/tags/{tagId}",path:{tagId:t},errors:{404:"Tag not found"}})}}class Lt{static tasksControllerCreateTask(t){return H(z,{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){return H(z,{method:"GET",url:"/api/v1/tasks/tasks",query:{assignee:t,sessionId:n,tag:r,page:i,limit:o}})}static tasksControllerUpdateTask(t,n){return H(z,{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){return H(z,{method:"DELETE",url:"/api/v1/tasks/tasks/{id}",path:{id:t},errors:{404:"Task not found"}})}static tasksControllerGetTask(t){return H(z,{method:"GET",url:"/api/v1/tasks/tasks/{id}",path:{id:t},errors:{404:"Task not found"}})}static tasksControllerAssignTask(t,n){return H(z,{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){return H(z,{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){return H(z,{method:"GET",url:"/api/v1/tasks/tasks/search/query",query:{query:t,limit:n,threshold:r}})}static tasksControllerAddComment(t,n){return H(z,{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){return H(z,{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){return H(z,{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){return H(z,{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){return H(z,{method:"DELETE",url:"/api/v1/tasks/tasks/{id}/tags/{tagId}",path:{id:t,tagId:n},errors:{404:"Task not found"}})}static tasksControllerCreateInputRequest(t,n){return H(z,{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){return H(z,{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(){return H(z,{method:"GET",url:"/api/v1/tasks/tasks/mcp"})}static tasksControllerHandleMcpPost(){return H(z,{method:"POST",url:"/api/v1/tasks/tasks/mcp"})}static tasksControllerHandleMcpPut(){return H(z,{method:"PUT",url:"/api/v1/tasks/tasks/mcp"})}static tasksControllerHandleMcpDelete(){return H(z,{method:"DELETE",url:"/api/v1/tasks/tasks/mcp"})}static tasksControllerHandleMcpPatch(){return H(z,{method:"PATCH",url:"/api/v1/tasks/tasks/mcp"})}static tasksControllerHandleMcpOptions(){return H(z,{method:"OPTIONS",url:"/api/v1/tasks/tasks/mcp"})}static tasksControllerHandleMcpHead(){return H(z,{method:"HEAD",url:"/api/v1/tasks/tasks/mcp"})}}class Ke{static mcpRegistryControllerCreateServer(t){return H(z,{method:"POST",url:"/api/v1/mcp/servers",body:t,mediaType:"application/json",errors:{409:"Server with providedId already exists"}})}static mcpRegistryControllerListServers(t,n){return H(z,{method:"GET",url:"/api/v1/mcp/servers",query:{page:t,limit:n}})}static mcpRegistryControllerGetServer(t){return H(z,{method:"GET",url:"/api/v1/mcp/servers/{serverId}",path:{serverId:t},errors:{404:"Server not found"}})}static mcpRegistryControllerUpdateServer(t,n){return H(z,{method:"PATCH",url:"/api/v1/mcp/servers/{serverId}",path:{serverId:t},body:n,mediaType:"application/json",errors:{404:"Server not found"}})}static mcpRegistryControllerDeleteServer(t){return H(z,{method:"DELETE",url:"/api/v1/mcp/servers/{serverId}",path:{serverId:t},errors:{404:"Server not found",409:"Server has dependencies"}})}static mcpRegistryControllerCreateScopes(t,n){return H(z,{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){return H(z,{method:"GET",url:"/api/v1/mcp/servers/{serverId}/scopes",path:{serverId:t},errors:{404:"Server not found"}})}static mcpRegistryControllerGetScope(t,n){return H(z,{method:"GET",url:"/api/v1/mcp/servers/{serverId}/scopes/{scopeId}",path:{serverId:t,scopeId:n},errors:{404:"Scope not found"}})}static mcpRegistryControllerDeleteScope(t,n){return H(z,{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){return H(z,{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){return H(z,{method:"GET",url:"/api/v1/mcp/servers/{serverId}/connections",path:{serverId:t},errors:{404:"Server not found"}})}static mcpRegistryControllerGetConnection(t){return H(z,{method:"GET",url:"/api/v1/mcp/connections/{connectionId}",path:{connectionId:t},errors:{404:"Connection not found"}})}static mcpRegistryControllerUpdateConnection(t,n){return H(z,{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){return H(z,{method:"DELETE",url:"/api/v1/mcp/connections/{connectionId}",path:{connectionId:t},errors:{404:"Connection not found",409:"Connection has mappings"}})}static mcpRegistryControllerCreateMapping(t,n){return H(z,{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){return H(z,{method:"GET",url:"/api/v1/mcp/servers/{serverId}/scopes/{scopeId}/mappings",path:{serverId:t,scopeId:n},errors:{404:"Scope not found"}})}static mcpRegistryControllerDeleteMapping(t){return H(z,{method:"DELETE",url:"/api/v1/mcp/mappings/{mappingId}",path:{mappingId:t},errors:{404:"Mapping not found"}})}}class mi{static webAuthControllerLogin(t){return H(z,{method:"POST",url:"/api/v1/auth/login",body:t,mediaType:"application/json",errors:{401:"Invalid credentials"}})}static webAuthControllerRefresh(){return H(z,{method:"POST",url:"/api/v1/auth/refresh",errors:{401:"Invalid or expired refresh token"}})}static webAuthControllerLogout(){return H(z,{method:"POST",url:"/api/v1/auth/logout"})}static webAuthControllerMe(){return H(z,{method:"GET",url:"/api/v1/auth/me",errors:{401:"Not authenticated"}})}static webAuthControllerChangePassword(t){return H(z,{method:"POST",url:"/api/v1/auth/change-password",body:t,mediaType:"application/json",errors:{401:"Not authenticated or current password is incorrect"}})}}const Ng=()=>"",Tg=e=>e,hr=Ng();z.BASE=hr;z.CREDENTIALS="include";z.BASE=hr;const jg=k.createContext(void 0);function R1({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(jg.Provider,{value:u,children:e})}function Ac(){const e=k.useContext(jg);if(e===void 0)throw new Error("useAuth must be used within an AuthProvider");return e}function P1({children:e}){const{isAuthenticated:t,isLoading:n}=Ac(),r=tt();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(Dw,{to:"/login",state:{from:r},replace:!0})}function D1(){var p,y;const[e,t]=k.useState(""),[n,r]=k.useState(""),[i,o]=k.useState(""),[s,l]=k.useState(!1),{login:u}=Ac(),c=Oe(),d=((y=(p=tt().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 L1({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 O1=768;function no(){return window.innerWidth<O1}function F1(){const[e,t]=k.useState(()=>no());return k.useEffect(()=>{const n=()=>{t(no())};return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[]),e}const Hf="app-nav-collapsed";function z1(){const[e,t]=k.useState(()=>{const r=localStorage.getItem(Hf);return r!==null?r==="true":no()});k.useEffect(()=>{localStorage.setItem(Hf,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(L1,{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(Nc,{})})]})}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 M1(){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 _g=({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 B1({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(_g,{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)})]})]})}z.BASE=hr;function Ig(){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 Ag({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 Rc=({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 bg.metaControllerGetAllTags();h(v)}catch(v){console.error("Failed to load tags:",v)}})()},[]),k.useEffect(()=>{const v=setTimeout(()=>{if(r.trim().length>0){const N=r.trim().toLowerCase(),j=d.filter(E=>E.name.toLowerCase().includes(N)&&!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 N;const v=m.trim();v&&!e.includes(v)&&t([...e,v]),i(""),s([]),u(!1),f(-1),(N=p.current)==null||N.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),N=(v==null?void 0:v.color)||"#3B82F6";return a.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:"2px",backgroundColor:N,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 U1({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 H1={name:"",description:"",assignee:"",sessionId:"",tagNames:[],dependsOnIds:[]};function $1({onClose:e}){const{toasts:t,showToast:n,removeToast:r}=Ig(),[i,o,s]=U1({key:"create-task-draft",defaultValue:H1}),[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 Lt.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 N=((m=v==null?void 0:v.body)==null?void 0:m.detail)||(v==null?void 0:v.message)||"Failed to create task";n(`Error: ${N}`,"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(Rc,{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(Ag,{message:g.message,type:g.type,onClose:()=>r(g.id)},g.id))]})})}const re=uu.status;function Rg({task:e,onClose:t,onUpdate:n}){var R,b,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(((b=e.tags)==null?void 0:b.map($=>$.name))||[]),[d,h]=k.useState(""),[p,y]=k.useState(""),[x,S]=k.useState(!1),[g,m]=k.useState("");k.useEffect(()=>{const $=U=>{U.key==="Escape"&&t()};return document.addEventListener("keydown",$),()=>{document.removeEventListener("keydown",$)}},[t]);const v=async()=>{var $;if(r!==e.description)try{const U=await Lt.tasksControllerUpdateTask(e.id,{description:r});n(U),m("")}catch(U){console.error("Failed to update task:",U);const G=(($=U==null?void 0:U.body)==null?void 0:$.detail)||(U==null?void 0:U.message)||"Failed to update description";m(G)}},N=async()=>{console.log("NOT IMPLEMENTED - ASSIGNEE STRUCTURE CHANGED")},j=async()=>{var $;if(d.trim())try{await Lt.tasksControllerAddComment(e.id,{content:d});const U=await Lt.tasksControllerGetTask(e.id);n(U),h(""),m("")}catch(U){console.error("Failed to add comment:",U);const G=(($=U==null?void 0:U.body)==null?void 0:$.detail)||(U==null?void 0:U.message)||"Failed to add comment";m(G)}},E=async $=>{var U;try{const G={status:$};$===re.DONE&&p.trim()&&(G.comment=p);const O=await Lt.tasksControllerChangeStatus(e.id,G);n(O),y(""),m("")}catch(G){console.error("Failed to change status:",G);const O=((U=G==null?void 0:G.body)==null?void 0:U.detail)||(G==null?void 0:G.message)||"Failed to change status";m(O)}},_=async()=>{var $;try{await Lt.tasksControllerDeleteTask(e.id),t()}catch(U){console.error("Failed to delete task:",U);const G=(($=U==null?void 0:U.body)==null?void 0:$.detail)||(U==null?void 0:U.message)||"Failed to delete task";m(G)}},D=async $=>{var U,G;f($);try{const O=await Lt.tasksControllerUpdateTask(e.id,{tagNames:$});n(O),m("")}catch(O){console.error("Failed to update tags:",O);const L=((U=O==null?void 0:O.body)==null?void 0:U.detail)||(O==null?void 0:O.message)||"Failed to update tags";m(L),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.slug}`:"@",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:N,className:"btn-primary",children:"Update Assignment"})]})]}),a.jsxs("div",{className:"detail-section",children:[a.jsx("h3",{children:"Tags"}),a.jsx(Rc,{value:c,onChange:D,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"},Pg=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Dg=typeof ArrayBuffer=="function",Lg=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Pc=({type:e,data:t},n,r)=>Pg&&t instanceof Blob?n?r(t):$f(t,r):Dg&&(t instanceof ArrayBuffer||Lg(t))?n?r(t):$f(new Blob([t]),r):r(Zt[e]+(t||"")),$f=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function Wf(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Kl;function W1(e,t){if(Pg&&e.data instanceof Blob)return e.data.arrayBuffer().then(Wf).then(t);if(Dg&&(e.data instanceof ArrayBuffer||Lg(e.data)))return t(Wf(e.data));Pc(e,!1,n=>{Kl||(Kl=new TextEncoder),t(Kl.encode(n))})}const Vf="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ci=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<Vf.length;e++)Ci[Vf.charCodeAt(e)]=e;const V1=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},q1=typeof ArrayBuffer=="function",Dc=(e,t)=>{if(typeof e!="string")return{type:"message",data:Og(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:G1(e.substring(1),t)}:ss[n]?e.length>1?{type:ss[n],data:e.substring(1)}:{type:ss[n]}:cu},G1=(e,t)=>{if(q1){const n=V1(e);return Og(n,t)}else return{base64:!0,data:e}},Og=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},Fg="",K1=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,s)=>{Pc(o,!1,l=>{r[s]=l,++i===n&&t(r.join(Fg))})})},Q1=(e,t)=>{const n=e.split(Fg),r=[];for(let i=0;i<n.length;i++){const o=Dc(n[i],t);if(r.push(o),o.type==="error")break}return r};function Y1(){return new TransformStream({transform(e,t){W1(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 X1(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(Dc(o?u:Ql.decode(u),t)),r=0}if(i===0||i>e){l.enqueue(cu);break}}}})}const zg=4;function Ne(e){if(e)return J1(e)}function J1(e){for(var t in Ne.prototype)e[t]=Ne.prototype[t];return e}Ne.prototype.on=Ne.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Ne.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};Ne.prototype.off=Ne.prototype.removeListener=Ne.prototype.removeAllListeners=Ne.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};Ne.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};Ne.prototype.emitReserved=Ne.prototype.emit;Ne.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};Ne.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")(),Z1="arraybuffer";function Mg(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const e0=xt.setTimeout,t0=xt.clearTimeout;function ll(e,t){t.useNativeTimers?(e.setTimeoutFn=e0.bind(xt),e.clearTimeoutFn=t0.bind(xt)):(e.setTimeoutFn=xt.setTimeout.bind(xt),e.clearTimeoutFn=xt.clearTimeout.bind(xt))}const n0=1.33;function r0(e){return typeof e=="string"?i0(e):Math.ceil((e.byteLength||e.size)*n0)}function i0(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 Bg(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function o0(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function s0(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 l0 extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Lc extends Ne{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 l0(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=Dc(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=o0(t);return n.length?"?"+n:""}}class a0 extends Lc{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)};Q1(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,K1(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]=Bg()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let Ug=!1;try{Ug=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const u0=Ug;function c0(){}class d0 extends a0{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 Ne{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=Mg(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=c0,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",qf);else if(typeof addEventListener=="function"){const e="onpagehide"in xt?"pagehide":"unload";addEventListener(e,qf,!1)}}function qf(){for(let e in Jt.requests)Jt.requests.hasOwnProperty(e)&&Jt.requests[e].abort()}const f0=function(){const e=Hg({xdomain:!1});return e&&e.responseType!==null}();class h0 extends d0{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=f0&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Jt(Hg,this.uri(),t)}}function Hg(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||u0))return new XMLHttpRequest}catch{}if(!t)try{return new xt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const $g=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class p0 extends Lc{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=$g?{}:Mg(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;Pc(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]=Bg()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Yl=xt.WebSocket||xt.MozWebSocket;class m0 extends p0{createSocket(t,n,r){return $g?new Yl(t,n,r):n?new Yl(t,n):new Yl(t)}doWrite(t,n){this.ws.send(n)}}class g0 extends Lc{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=X1(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=Y1();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 y0={websocket:m0,webtransport:g0,polling:h0},x0=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,v0=["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=x0.exec(e||""),o={},s=14;for(;s--;)o[v0[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=k0(o,o.path),o.queryKey=w0(o,o.query),o}function k0(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 w0(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 Ne{constructor(t,n){if(super(),this.binaryType=Z1,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=s0(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=zg,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+=r0(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=zg;class S0 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 C0=class extends S0{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=>y0[i]).filter(i=>!!i)),super(t,r)}};function E0(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 b0=typeof ArrayBuffer=="function",N0=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Wg=Object.prototype.toString,T0=typeof Blob=="function"||typeof Blob<"u"&&Wg.call(Blob)==="[object BlobConstructor]",j0=typeof File=="function"||typeof File<"u"&&Wg.call(File)==="[object FileConstructor]";function Oc(e){return b0&&(e instanceof ArrayBuffer||N0(e))||T0&&e instanceof Blob||j0&&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(Oc(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 _0(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(Oc(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 I0(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 A0=["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 R0{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=_0(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}class Fc extends Ne{constructor(t){super(),this.reviver=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 P0(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Oc(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");r.attachments=Number(s)}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(Fc.isPayloadValid(r.type,o))r.data=o;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case ne.CONNECT:return Gf(n);case ne.DISCONNECT:return n===void 0;case ne.CONNECT_ERROR:return typeof n=="string"||Gf(n);case ne.EVENT:case ne.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&A0.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 P0{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=I0(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function Gf(e){return Object.prototype.toString.call(e)==="[object Object]"}const D0=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Fc,Encoder:R0,get PacketType(){return ne}},Symbol.toStringTag,{value:"Module"}));function Pt(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const L0=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Vg extends Ne{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(L0.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 Ne{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||D0;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 C0(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 Vg(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 Di(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=E0(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(Di,{Manager:mu,Socket:Vg,io:Di,connect:Di});const O0=Tg("/tasks"),qg=()=>{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 Lt.tasksControllerListTasks();o(f(p.items))}catch(p){r(p instanceof Error?p.message:"Failed to load tasks")}finally{t(!1)}},h=()=>{const p=Di(O0,{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 Lt.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 Lt.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 F0(){const{tasks:e,isConnected:t}=qg(),[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(B1,{task:c,onClick:()=>r(c)},c.id))]})]},l))}),i&&a.jsx($1,{onClose:()=>o(!1)}),n&&a.jsx(Rg,{task:n,onClose:()=>r(null),onUpdate:l=>r(l)})]})}function z0(){const[e,t]=k.useState(!1),n=tt(),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 M0=[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 B0(){const{tasks:e,isConnected:t}=qg(),[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(z0,{}),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(_g,{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:M0.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(Rg,{task:n,onClose:()=>r(null),onUpdate:d=>r(d)}),i&&a.jsx(U0,{onClose:()=>o(!1)})]})}function U0({onClose:e}){const{toasts:t,showToast:n,removeToast:r}=Ig(),[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 N;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 Lt.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=((N=j==null?void 0:j.body)==null?void 0:N.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(Rc,{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(Ag,{message:v.message,type:v.type,onClose:()=>r(v.id)},v.id))]})})}function Gg(e,t){return t?e.id===t?!0:e.children?e.children.some(n=>Gg(n,t)):!1:!1}const H0=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&&Gg(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 $0({pages:e,currentPageId:t,onPageClick:n}){const r=Oe(),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(H0,{page:s,level:0,isActive:s.id===t,currentPageId:t,onPageClick:n,onAddChild:o},s.id))})}z.BASE=hr;const W0=Tg("/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),N=k.useCallback(async()=>{o(!0),x(null);try{const O=await _t.contextControllerListBlocks();t(O.items)}catch(O){x(O instanceof Error?O.message:"Failed to load wiki pages")}finally{o(!1)}},[]),j=k.useCallback(async O=>{l(!0),x(null),r(null);try{const L=await _t.contextControllerGetBlock(O);r(L)}catch(L){x(L instanceof Error?L.message:"Failed to fetch wiki page")}finally{l(!1)}},[]),E=k.useCallback(async O=>{c(!0),x(null);try{const L=await _t.contextControllerCreateBlock(O);return t(C=>{const B=C.filter(w=>w.id!==L.id);return[{id:L.id,title:L.title,createdBy:L.createdBy,createdByActorId:L.createdByActorId,tags:L.tags,parentId:L.parentId,order:L.order,createdAt:L.createdAt,updatedAt:L.updatedAt},...B]}),r(L),L}catch(L){throw x(L instanceof Error?L.message:"Failed to create wiki page"),L}finally{c(!1)}},[]),_=k.useCallback(O=>{j(O)},[j]),D=k.useCallback(async(O,L)=>{d(!0),x(null);try{const C=await _t.contextControllerUpdateBlock(O,L);return t(B=>B.map(w=>w.id===O?{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)===O&&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 O=>{p(!0),x(null);try{await _t.contextControllerDeleteBlock(O),t(L=>L.filter(C=>C.id!==O)),(n==null?void 0:n.id)===O&&r(null)}catch(L){throw x(L instanceof Error?L.message:"Failed to delete page"),L}finally{p(!1)}},[n]),b=k.useCallback(async(O,L)=>{d(!0),x(null);try{const C=await _t.contextControllerAppendToBlock(O,{content:L});return(n==null?void 0:n.id)===O&&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(O,L)=>{x(null);try{const C=await _t.contextControllerAddTagToBlock(O,L);return t(B=>B.map(w=>w.id===O?{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)===O&&r(C),C}catch(C){throw x(C instanceof Error?C.message:"Failed to add tag"),C}},[n]),V=k.useCallback(async(O,L)=>{x(null);try{const C=await _t.contextControllerRemoveTagFromBlock(O,L);return t(B=>B.map(w=>w.id===O?{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)===O&&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(O){throw x(O instanceof Error?O.message:"Failed to fetch page tree"),O}},[]),U=k.useCallback(async(O,L)=>{x(null);try{const C=await _t.contextControllerReorderBlock(O,{newOrder:L});return t(B=>B.map(w=>w.id===O?{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)===O&&r(C),C}catch(C){throw x(C instanceof Error?C.message:"Failed to reorder page"),C}},[n]),G=k.useCallback(async(O,L)=>{x(null);try{const C=await _t.contextControllerMoveBlock(O,{newParentId:L});return t(B=>B.map(w=>w.id===O?{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)===O&&r(C),C}catch(C){throw x(C instanceof Error?C.message:"Failed to move page"),C}},[n]);return k.useEffect(()=>{const O=Di(W0,{transports:["websocket","polling"],withCredentials:!0});return O.on("connect",()=>{console.log("Connected to Context websocket"),O.emit("context.subscribe",{},L=>{L.ok?(console.log(L),console.log("Subscribed to room:",L.room),v(!0)):(console.error("Failed to subscribe to room"),v(!1))}),v(!0),N()}),O.on("disconnect",()=>{console.log("Context WebSocket disconnected"),v(!1)}),O.on("page.created",L=>{t(C=>C.some(B=>B.id===L.id)?C:[{id:L.id,title:L.title,createdBy:L.createdBy,createdByActorId:L.createdByActorId,tags:L.tags,parentId:L.parentId,order:L.order,createdAt:L.createdAt,updatedAt:L.updatedAt},...C])}),O.on("page.updated",L=>{t(C=>C.map(B=>B.id===L.id?{id:L.id,title:L.title,createdBy:L.createdBy,createdByActorId:L.createdByActorId,tags:L.tags,parentId:L.parentId,order:L.order,createdAt:L.createdAt,updatedAt:L.updatedAt}:B)),(n==null?void 0:n.id)===L.id&&r(L)}),O.on("page.deleted",({pageId:L})=>{t(C=>C.filter(B=>B.id!==L)),(n==null?void 0:n.id)===L&&r(null)}),g(O),()=>{O.disconnect()}},[N,n==null?void 0:n.id]),k.useEffect(()=>{N()},[N]),{pages:e,selectedPage:n,isLoadingList:i,isLoadingPage:s,isCreating:u,isUpdating:f,isDeleting:h,error:y,isConnected:m,socket:S,loadPages:N,createPage:E,selectPage:_,updatePage:D,appendToPage:b,deletePage:R,addTagToPage:P,removeTagFromPage:V,getPageTree:$,reorderPage:U,movePage:G}},Kf="context-sidebar-collapsed";function V0(){const{pageId:e}=fr(),t=Oe(),{getPageTree:n,isConnected:r,socket:i}=mo(),[o,s]=k.useState([]),[l,u]=k.useState(!1),[c,f]=k.useState(()=>{const y=localStorage.getItem(Kf);return y!==null?y==="true":no()});k.useEffect(()=>{localStorage.setItem(Kf,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($0,{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(Nc,{})})]})}const Kg=({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 q0(){const e=Oe(),{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(Kg,{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 G0=({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 bg.metaControllerGetAllTags();h(v)}catch(v){console.error("Failed to load tags:",v)}})()},[]),k.useEffect(()=>{const v=setTimeout(()=>{if(r.trim().length>0){const N=r.trim().toLowerCase(),j=d.filter(E=>E.name.toLowerCase().includes(N)&&!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 N;const v=m.trim();v&&!e.includes(v)&&t([...e,v]),i(""),s([]),u(!1),f(-1),(N=p.current)==null||N.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),N=(v==null?void 0:v.color)||"#3B82F6";return a.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:"2px",backgroundColor:N,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 K0(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Q0=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Y0=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,X0={};function Qf(e,t){return(X0.jsx?Y0:Q0).test(e)}const J0=/[ \t\n\f\r]/g;function Z0(e){return typeof e=="object"?e.type==="text"?Yf(e.value):!1:Yf(e)}function Yf(e){return e.replace(J0,"")===""}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 Qg(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 eS=0;const X=mr(),Ee=mr(),yu=mr(),M=mr(),fe=mr(),Mr=mr(),ot=mr();function mr(){return 2**++eS}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 zc extends nt{constructor(t,n,r,i){let o=-1;if(super(t,n),Xf(this,"space",i),typeof r=="number")for(;++o<Xl.length;){const s=Xl[o];Xf(this,Xl[o],(r&xu[s])===xu[s])}}}zc.prototype.defined=!0;function Xf(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 zc(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 Yg=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 Xg(e,t){return t in e?e[t]:t}function Jg(e,t){return Xg(e,t.toLowerCase())}const tS=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:Jg}),nS=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:Xg}),Zg=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()}}),ey=ni({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Jg}),ty=ni({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),rS={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"},iS=/[A-Z]/g,Jf=/-[a-z]/g,oS=/^data[-\w.:]+$/i;function sS(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"&&oS.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(Jf,aS);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!Jf.test(o)){let s=o.replace(iS,lS);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=zc}return new i(r,t)}function lS(e){return"-"+e.toLowerCase()}function aS(e){return e.charAt(1).toUpperCase()}const uS=Qg([Yg,tS,Zg,ey,ty],"html"),Mc=Qg([Yg,nS,Zg,ey,ty],"svg");function cS(e){return e.join(" ").trim()}var Bc={},Zf=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,dS=/\n/g,fS=/^\s*/,hS=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,pS=/^:\s*/,mS=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,gS=/^[;\s]*/,yS=/^\s+|\s+$/g,xS=`
|
|
52
|
+
`,eh="/",th="*",Yn="",vS="comment",kS="declaration";function wS(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(dS);x&&(n+=x.length);var S=y.lastIndexOf(xS);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(fS)}function f(y){var x;for(y=y||[];x=d();)x!==!1&&y.push(x);return y}function d(){var y=o();if(!(eh!=e.charAt(0)||th!=e.charAt(1))){for(var x=2;Yn!=e.charAt(x)&&(th!=e.charAt(x)||eh!=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:vS,comment:S})}}function h(){var y=o(),x=u(hS);if(x){if(d(),!u(pS))return l("property missing ':'");var S=u(mS),g=y({type:kS,property:nh(x[0].replace(Zf,Yn)),value:S?nh(S[0].replace(Zf,Yn)):Yn});return u(gS),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 nh(e){return e?e.replace(yS,Yn):Yn}var SS=wS,CS=ds&&ds.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Bc,"__esModule",{value:!0});Bc.default=bS;const ES=CS(SS);function bS(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,ES.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 NS=/^--[a-zA-Z0-9_-]+$/,TS=/-([a-z])/g,jS=/^[^-]+$/,_S=/^-(webkit|moz|ms|o|khtml)-/,IS=/^-(ms)-/,AS=function(e){return!e||jS.test(e)||NS.test(e)},RS=function(e,t){return t.toUpperCase()},rh=function(e,t){return"".concat(t,"-")},PS=function(e,t){return t===void 0&&(t={}),AS(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(IS,rh):e=e.replace(_S,rh),e.replace(TS,RS))};al.camelCase=PS;var DS=ds&&ds.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},LS=DS(Bc),OS=al;function vu(e,t){var n={};return!e||typeof e!="string"||(0,LS.default)(e,function(r,i){r&&i&&(n[(0,OS.camelCase)(r,t)]=i)}),n}vu.default=vu;var FS=vu;const zS=Gh(FS),ny=ry("end"),Uc=ry("start");function ry(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 MS(e){const t=Uc(e),n=ny(e);if(t&&n)return{start:t,end:n}}function Li(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?ih(e.position):"start"in e||"end"in e?ih(e):"line"in e||"column"in e?ku(e):""}function ku(e){return oh(e&&e.line)+":"+oh(e&&e.column)}function ih(e){return ku(e&&e.start)+"-"+ku(e&&e.end)}function oh(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=Li(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 Hc={}.hasOwnProperty,BS=new Map,US=/[A-Z]/g,HS=new Set(["table","tbody","thead","tfoot","tr"]),$S=new Set(["td","th"]),iy="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function WS(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=JS(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=XS(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"?Mc:uS,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=oy(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function oy(e,t,n){if(t.type==="element")return VS(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return qS(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return KS(e,t,n);if(t.type==="mdxjsEsm")return GS(e,t);if(t.type==="root")return QS(e,t,n);if(t.type==="text")return YS(e,t)}function VS(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Mc,e.schema=i),e.ancestors.push(t);const o=ly(e,t.tagName,!1),s=ZS(e,t);let l=Wc(e,t);return HS.has(t.tagName)&&(l=l.filter(function(u){return typeof u=="string"?!Z0(u):!0})),sy(e,s,o,t),$c(s,l),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function qS(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 GS(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);io(e,t.position)}function KS(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Mc,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:ly(e,t.name,!0),s=eC(e,t),l=Wc(e,t);return sy(e,s,o,t),$c(s,l),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function QS(e,t,n){const r={};return $c(r,Wc(e,t)),e.create(t,e.Fragment,r,n)}function YS(e,t){return t.value}function sy(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function $c(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function XS(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 JS(e,t){return n;function n(r,i,o,s){const l=Array.isArray(o.children),u=Uc(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 ZS(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Hc.call(t.properties,i)){const o=tC(e,i,t.properties[i]);if(o){const[s,l]=o;e.tableCellAlignToStyle&&s==="align"&&typeof l=="string"&&$S.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 eC(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 Wc(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:BS;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=oy(e,o,s);l!==void 0&&n.push(l)}return n}function tC(e,t,n){const r=sS(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?K0(n):cS(n)),r.property==="style"){let i=typeof n=="object"?n:nC(e,String(n));return e.stylePropertyNameCase==="css"&&(i=rC(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?rS[r.property]||r.property:r.attribute,n]}}function nC(e,t){try{return zS(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=iy+"#cannot-parse-style-attribute",i}}function ly(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=Qf(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=Qf(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Hc.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=iy+"#cannot-handle-mdx-estrees-without-createevaluater",n}function rC(e){const t={};let n;for(n in e)Hc.call(e,n)&&(t[iC(n)]=e[n]);return t}function iC(e){let t=e.replace(US,oC);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function oC(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"]},sC={};function Vc(e,t){const n=sC,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return ay(e,r,i)}function ay(e,t,n){if(lC(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 sh(e.children,t,n)}return Array.isArray(e)?sh(e,t,n):""}function sh(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=ay(e[i],t,n);return r.join("")}function lC(e){return!!(e&&typeof e=="object")}const lh=document.createElement("i");function qc(e){const t="&"+e+";";lh.innerHTML=t;const n=lh.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 ah={}.hasOwnProperty;function uy(e){const t={};let n=-1;for(;++n<e.length;)aC(t,e[n]);return t}function aC(e,t){let n;for(n in t){const i=(ah.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let s;if(o)for(s in o){ah.call(i,s)||(i[s]=[]);const l=o[s];uC(i[s],Array.isArray(l)?l:l?[l]:[])}}}function uC(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 cy(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]/),cC=Wn(/[#-'*+\--9=?A-Z^-~]/);function Fs(e){return e!==null&&(e<32||e===127)}const wu=Wn(/\d/),dC=Wn(/[\dA-Fa-f]/),fC=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 hC={tokenize:pC};function pC(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 mC={tokenize:gC},uh={tokenize:yC};function gC(e){const t=this,n=[];let r=0,i,o,s;return l;function l(v){if(r<n.length){const N=n[r];return t.containerState=N[1],e.attempt(N[0].continuation,u,c)(v)}return c(v)}function u(v){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&m();const N=t.events.length;let j=N,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 _=N;for(;_<t.events.length;)t.events[_][1].end={...E},_++;return ut(t.events,j+1,0,t.events.slice(N)),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(uh,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(uh,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,N){const j=t.sliceStream(v);if(N&&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 D=_,R,b;for(;D--;)if(t.events[D][0]==="exit"&&t.events[D][1].type==="chunkFlow"){if(R){b=t.events[D][1].end;break}R=!0}for(g(r),E=_;E<t.events.length;)t.events[E][1].end={...b},E++;ut(t.events,D+1,0,t.events.slice(_)),t.events.length=E}}function g(v){let N=n.length;for(;N-- >v;){const j=n[N];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 yC(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:xC,tokenize:vC};function xC(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};ch(d,-u),ch(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 vC(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 ch(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const kC={name:"autolink",tokenize:wC};function wC(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):cC(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:SC};function SC(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 dy={continuation:{tokenize:EC},exit:bC,name:"blockQuote",tokenize:CC};function CC(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 EC(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(dy,t,n)(s)}}function bC(e){e.exit("blockQuote")}const fy={name:"characterEscape",tokenize:NC};function NC(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 fC(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const hy={name:"characterReference",tokenize:TC};function TC(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=dC,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&&!qc(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 dh={partial:!0,tokenize:_C},fh={concrete:!0,name:"codeFenced",tokenize:jC};function jC(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(dh,x,N)(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,N,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(dh,x,N)(E):(e.enter("codeFlowValue"),v(E))}function v(E){return E===null||Q(E)?(e.exit("codeFlowValue"),m(E)):(e.consume(E),v)}function N(E){return e.exit("codeFenced"),t(E)}function j(E,_,D){let R=0;return b;function b(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)):D(G)}function $(G){return G===l?(R++,E.consume(G),$):R>=s?(E.exit("codeFencedFenceSequence"),Z(G)?ie(E,U,"whitespace")(G):U(G)):D(G)}function U(G){return G===null||Q(G)?(E.exit("codeFencedFence"),_(G)):D(G)}}}function _C(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:AC},IC={partial:!0,tokenize:RC};function AC(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(IC,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 RC(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 PC={name:"codeText",previous:LC,resolve:DC,tokenize:OC};function DC(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 LC(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function OC(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 FC{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 py(e){const t={};let n=-1,r,i,o,s,l,u,c;const f=new FC(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,zC(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 zC(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 MC={resolve:UC,tokenize:HC},BC={partial:!0,tokenize:$C};function UC(e){return py(e),e}function HC(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(BC,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 $C(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 my(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 gy(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 yy(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 Oi(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 WC={name:"definition",tokenize:qC},VC={partial:!0,tokenize:GC};function qC(e,t,n){const r=this;let i;return o;function o(p){return e.enter("definition"),s(p)}function s(p){return gy.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)?Oi(e,c)(p):c(p)}function c(p){return my(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function f(p){return e.attempt(VC,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 GC(e,t,n){return r;function r(l){return de(l)?Oi(e,i)(l):n(l)}function i(l){return yy(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 KC={name:"hardBreakEscape",tokenize:QC};function QC(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 YC={name:"headingAtx",resolve:XC,tokenize:JC};function XC(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 JC(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 ZC=["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"],hh=["pre","script","style","textarea"],eE={concrete:!0,name:"htmlFlow",resolveTo:rE,tokenize:iE},tE={partial:!0,tokenize:sE},nE={partial:!0,tokenize:oE};function rE(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 iE(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&&hh.includes(rt)?(i=1,r.interrupt?t(T):V(T)):ZC.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):b(T)}function v(T){return T===47?(e.consume(T),b):T===58||T===95||We(T)?(e.consume(T),N):Z(T)?(e.consume(T),v):b(T)}function N(T){return T===45||T===46||T===58||T===95||Be(T)?(e.consume(T),N):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):D(T)}function _(T){return T===u?(e.consume(T),u=null,R):T===null||Q(T)?n(T):(e.consume(T),_)}function D(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),D)}function R(T){return T===47||T===62||Z(T)?v(T):n(T)}function b(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),O):T===60&&i===1?(e.consume(T),L):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(tE,se,$)(T)):T===null||Q(T)?(e.exit("htmlFlowData"),$(T)):(e.consume(T),V)}function $(T){return e.check(nE,U,se)(T)}function U(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 O(T){return T===45?(e.consume(T),w):V(T)}function L(T){return T===47?(e.consume(T),s="",C):V(T)}function C(T){if(T===62){const Se=s.toLowerCase();return hh.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 oE(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 sE(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(yo,t,n)}}const lE={name:"htmlText",tokenize:aE};function aE(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),D):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,L(w)):(e.consume(w),d)}function h(w){return w===45?(e.consume(w),p):d(w)}function p(w){return w===62?O(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,L(w)):(e.consume(w),x)}function S(w){return w===93?(e.consume(w),g):x(w)}function g(w){return w===62?O(w):w===93?(e.consume(w),g):x(w)}function m(w){return w===null||w===62?O(w):Q(w)?(s=m,L(w)):(e.consume(w),m)}function v(w){return w===null?n(w):w===63?(e.consume(w),N):Q(w)?(s=v,L(w)):(e.consume(w),v)}function N(w){return w===62?O(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=_,L(w)):Z(w)?(e.consume(w),_):O(w)}function D(w){return w===45||Be(w)?(e.consume(w),D):w===47||w===62||de(w)?R(w):n(w)}function R(w){return w===47?(e.consume(w),O):w===58||w===95||We(w)?(e.consume(w),b):Q(w)?(s=R,L(w)):Z(w)?(e.consume(w),R):O(w)}function b(w){return w===45||w===46||w===58||w===95||Be(w)?(e.consume(w),b):P(w)}function P(w){return w===61?(e.consume(w),V):Q(w)?(s=P,L(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,L(w)):Z(w)?(e.consume(w),V):(e.consume(w),U)}function $(w){return w===i?(e.consume(w),i=void 0,G):w===null?n(w):Q(w)?(s=$,L(w)):(e.consume(w),$)}function U(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),U)}function G(w){return w===47||w===62||de(w)?R(w):n(w)}function O(w){return w===62?(e.consume(w),e.exit("htmlTextData"),e.exit("htmlText"),t):n(w)}function L(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 Gc={name:"labelEnd",resolveAll:fE,resolveTo:hE,tokenize:pE},uE={tokenize:mE},cE={tokenize:gE},dE={tokenize:yE};function fE(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 hE(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 pE(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(uE,f,s?f:d)(h):h===91?e.attempt(cE,f,s?c:d)(h):s?f(h):d(h)}function c(h){return e.attempt(dE,f,d)(h)}function f(h){return t(h)}function d(h){return o._balanced=!0,n(h)}}function mE(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)?Oi(e,o)(d):o(d)}function o(d){return d===41?f(d):my(e,s,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function s(d){return de(d)?Oi(e,u)(d):f(d)}function l(d){return n(d)}function u(d){return d===34||d===39||d===40?yy(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):f(d)}function c(d){return de(d)?Oi(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 gE(e,t,n){const r=this;return i;function i(l){return gy.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 yE(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 xE={name:"labelStartImage",resolveAll:Gc.resolveAll,tokenize:vE};function vE(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 kE={name:"labelStartLink",resolveAll:Gc.resolveAll,tokenize:wE};function wE(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:SE};function SE(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:CE};function CE(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 Qe={continuation:{tokenize:TE},exit:_E,name:"list",tokenize:NE},EE={partial:!0,tokenize:IE},bE={partial:!0,tokenize:jE};function NE(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(EE,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 TE(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(bE,t,s)(l))}function s(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,ie(e,e.attempt(Qe,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function jE(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 _E(e){e.exit(this.containerState.type)}function IE(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 ph={name:"setextUnderline",resolveTo:AE,tokenize:RE};function AE(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 RE(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 PE={tokenize:DE};function DE(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(MC,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 LE={resolveAll:vy()},OE=xy("string"),FE=xy("text");function xy(e){return{resolveAll:vy(e==="text"?zE: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 vy(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 zE(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 ME={42:Qe,43:Qe,45:Qe,48:Qe,49:Qe,50:Qe,51:Qe,52:Qe,53:Qe,54:Qe,55:Qe,56:Qe,57:Qe,62:dy},BE={91:WC},UE={[-2]:Zl,[-1]:Zl,32:Zl},HE={35:YC,42:us,45:[ph,us],60:eE,61:ph,95:us,96:fh,126:fh},$E={38:hy,92:fy},WE={[-5]:ea,[-4]:ea,[-3]:ea,33:xE,38:hy,42:Su,60:[kC,lE],91:kE,92:[KC,fy],93:Gc,95:Su,96:PC},VE={null:[Su,LE]},qE={null:[42,95]},GE={null:[]},KE=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:qE,contentInitial:BE,disable:GE,document:ME,flow:HE,flowInitial:UE,insideSpan:VE,string:$E,text:WE},Symbol.toStringTag,{value:"Module"}));function QE(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:N,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?[]:(D(t,0),c.events=cl(o,c.events,c),c.events)}function h(P,V){return XE(p(P),V)}function p(P){return YE(s,P)}function y(){const{_bufferIndex:P,_index:V,line:$,column:U,offset:G}=r;return{_bufferIndex:P,_index:V,line:$,column:U,offset:G}}function x(P){i[P.line]=P.column,b()}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,b()):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 N(P){const V=l.pop();return V.end=y(),c.events.push(["exit",V,c]),V}function j(P,V){D(P,V.from)}function E(P,V){V.restore()}function _(P,V){return $;function $(U,G,O){let L,C,B,w;return Array.isArray(U)?se(U):"tokenize"in U?se([U]):J(U);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 L=ue,C=0,ue.length===0?O: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<L.length?T(L[C]):O}}}function D(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,U=c.events.length,G=Array.from(l);return{from:U,restore:O};function O(){r=P,c.previous=V,c.currentConstruct=$,c.events.length=U,l=G,b()}}function b(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function YE(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 XE(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 JE(e){const r={constructs:uy([KE,...(e||{}).extensions||[]]),content:i(hC),defined:[],document:i(mC),flow:i(PE),lazy:{},string:i(OE),text:i(FE)};return r;function i(o){return s;function s(l){return QE(r,o,l)}}}function ZE(e){for(;!py(e););return e}const mh=/[\0\t\n\r]/g;function eb(){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(mh.lastIndex=d,c=mh.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 tb=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function nb(e){return e.replace(tb,rb)}function rb(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return cy(n.slice(o?2:1),o?16:10)}return qc(n)||e}const ky={}.hasOwnProperty;function ib(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),ob(n)(ZE(JE(n).document().write(eb()(e,t,!0))))}function ob(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(ix),listItemValue:h,listOrdered:o(Ut,d),listUnordered:o(Ut),paragraph:o(ox),reference:T,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(vo),strong:o(sx),thematicBreak:o(ax)},exit:{atxHeading:u(),atxHeadingSequence:j,autolink:u(),autolinkEmail:gn,autolinkProtocol:Bt,blockQuote:u(),characterEscapeValue:b,characterReferenceMarkerHexadecimal:rt,characterReferenceMarkerNumeric:rt,characterReferenceValue:ue,characterReference:pt,codeFenced:u(S),codeFencedFence:x,codeFencedFenceInfo:p,codeFencedFenceMeta:y,codeFlowValue:b,codeIndented:u(g),codeText:u(G),codeTextData:b,data:b,definition:u(),definitionDestinationString:N,definitionLabelString:m,definitionTitleString:v,emphasis:u(),hardBreakEscape:u(V),hardBreakTrailing:u(V),htmlFlow:u($),htmlFlowData:b,htmlText:u(U),htmlTextData:b,image:u(L),label:B,labelText:C,lineEnding:P,link:u(O),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:Se,resourceDestinationString:w,resourceTitleString:J,resource:se,setextHeading:u(D),setextHeadingLineSequence:_,setextHeadingText:E,strong:u(),thematicBreak:u()}};wy(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 Nt=te.pop();ce=i(A,Nt,ce)}for(ce=-1;++ce<A.length;){const Nt=t[A[ce][0]];ky.call(Nt,A[ce][1].type)&&Nt[A[ce][1].type].call(Object.assign({sliceSerialize:A[ce][2].sliceSerialize},Y),A[ce][1])}if(Y.tokenStack.length>0){const Nt=Y.tokenStack[Y.tokenStack.length-1];(Nt[1]||gh).call(Y,void 0,Nt[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,Nt=!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",Nt=!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=Nt,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]||gh).call(this,A,te[0]));else throw new Error("Cannot close `"+A.type+"` ("+Li({start:A.start,end:A.end})+"): it’s not open");Y.position.end=kn(A.end)}function f(){return Vc(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 N(){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 D(){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=lx(),te.position={start:kn(A.start),end:void 0},Y.push(te)),this.stack.push(te)}function b(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),b.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 U(){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 O(){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 L(){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=nb(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=cy(q,Y==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):te=qc(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){b.call(this,A);const q=this.stack[this.stack.length-1];q.url=this.sliceSerialize(A)}function gn(A){b.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 ix(A){return{type:"listItem",spread:A._spread,checked:null,children:[]}}function ox(){return{type:"paragraph",children:[]}}function sx(){return{type:"strong",children:[]}}function lx(){return{type:"text",value:""}}function ax(){return{type:"thematicBreak"}}}function kn(e){return{line:e.line,column:e.column,offset:e.offset}}function wy(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?wy(e,r):sb(e,r)}}function sb(e,t){let n;for(n in t)if(ky.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 gh(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Li({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Li({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Li({start:t.start,end:t.end})+") is still open")}function lb(e){const t=this;t.parser=n;function n(r){return ib(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function ab(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function ub(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
55
|
+
`}]}function cb(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 db(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function fb(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function hb(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=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 pb(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 mb(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Sy(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 gb(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Sy(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 yb(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 xb(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 vb(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Sy(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 kb(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 wb(e,t,n){const r=e.all(t),i=n?Sb(n):Cy(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 Sb(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=Cy(n[r])}return t}function Cy(e){const t=e.spread;return t??e.children.length>1}function Cb(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 Eb(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function bb(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Nb(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Tb(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=Uc(t.children[1]),u=ny(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 jb(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 _b(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const yh=9,xh=32;function Ib(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(vh(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(vh(t.slice(i),i>0,!1)),o.join("")}function vh(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===yh||o===xh;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===yh||o===xh;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Ab(e,t){const n={type:"text",value:Ib(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Rb(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Pb={blockquote:ab,break:ub,code:cb,delete:db,emphasis:fb,footnoteReference:hb,heading:pb,html:mb,imageReference:gb,image:yb,inlineCode:xb,linkReference:vb,link:kb,listItem:wb,list:Cb,paragraph:Eb,root:bb,strong:Nb,table:Tb,tableCell:_b,tableRow:jb,text:Ab,thematicBreak:Rb,toml:Ho,yaml:Ho,definition:Ho,footnoteDefinition:Ho};function Ho(){}const Ey=-1,dl=0,Fi=1,zs=2,Kc=3,Qc=4,Yc=5,Xc=6,by=7,Ny=8,kh=typeof self=="object"?self:globalThis,Db=(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 Ey: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 Kc:return n(new Date(s),i);case Qc:{const{source:l,flags:u}=s;return n(new RegExp(l,u),i)}case Yc:{const l=n(new Map,i);for(const[u,c]of s)l.set(r(u),r(c));return l}case Xc:{const l=n(new Set,i);for(const u of s)l.add(r(u));return l}case by:{const{name:l,message:u}=s;return n(new kh[l](u),i)}case Ny: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 kh[o](s),i)};return r},wh=e=>Db(new Map,e)(0),vr="",{toString:Lb}={},{keys:Ob}=Object,xi=e=>{const t=typeof e;if(t!=="object"||!e)return[dl,t];const n=Lb.call(e).slice(8,-1);switch(n){case"Array":return[Fi,vr];case"Object":return[zs,vr];case"Date":return[Kc,vr];case"RegExp":return[Qc,vr];case"Map":return[Yc,vr];case"Set":return[Xc,vr];case"DataView":return[Fi,n]}return n.includes("Array")?[Fi,n]:n.includes("Error")?[by,n]:[zs,n]},$o=([e,t])=>e===dl&&(t==="function"||t==="symbol"),Fb=(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=Ny,f=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);f=null;break;case"undefined":return i([Ey],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 Ob(s))(e||!$o(xi(s[h])))&&f.push([o(h),o(s[h])]);return d}case Kc:return i([l,s.toISOString()],s);case Qc:{const{source:f,flags:d}=s;return i([l,{source:f,flags:d}],s)}case Yc:{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 Xc:{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},Sh=(e,{json:t,lossy:n}={})=>{const r=[];return Fb(!(t||n),!!t,new Map,r)(e),r},Ms=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?wh(Sh(e,t)):structuredClone(e):(e,t)=>wh(Sh(e,t));function zb(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 Mb(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Bb(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||zb,r=e.options.footnoteBackLabel||Mb,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 Wb;if(typeof e=="function")return hl(e);if(typeof e=="object")return Array.isArray(e)?Ub(e):Hb(e);if(typeof e=="string")return $b(e);throw new Error("Expected function, string, or object as test")};function Ub(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 Hb(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 $b(e){return hl(t);function t(n){return n&&n.type===e}}function hl(e){return t;function t(n,r,i){return!!(Vb(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Wb(){return!0}function Vb(e){return e!==null&&typeof e=="object"&&"type"in e}const Ty=[],qb=!0,Cu=!1,Gb="skip";function jy(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=Ty,y,x,S;if((!t||o(u,c,f[f.length-1]||void 0))&&(p=Kb(n(u,f)),p[0]===Cu))return p;if("children"in u&&u.children){const g=u;if(g.children&&p[0]!==Gb)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 Kb(e){return Array.isArray(e)?e:typeof e=="number"?[qb,e]:e==null?Ty:[e]}function Jc(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),jy(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,Qb={};function Yb(e,t){const n=t||Qb,r=new Map,i=new Map,o=new Map,s={...Pb,...n.handlers},l={all:c,applyData:Jb,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:s,one:u,options:n,patch:Xb,wrap:eN};return Jc(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||Zb)(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=Ch(y.value)),!Array.isArray(y)&&y.type==="element")){const x=y.children[0];x&&x.type==="text"&&(x.value=Ch(x.value))}Array.isArray(y)?d.push(...y):d.push(y)}}}return d}}function Xb(e,t){e.position&&(t.position=MS(e))}function Jb(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 Zb(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 eN(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 Ch(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Eh(e,t){const n=Yb(e,t),r=n.one(e,void 0),i=Bb(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 tN(e,t){return e&&"run"in e?async function(n,r){const i=Eh(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Eh(n,{file:r,...e||t})}}function bh(e){if(e)throw e}var cs=Object.prototype.hasOwnProperty,_y=Object.prototype.toString,Nh=Object.defineProperty,Th=Object.getOwnPropertyDescriptor,jh=function(t){return typeof Array.isArray=="function"?Array.isArray(t):_y.call(t)==="[object Array]"},_h=function(t){if(!t||_y.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)},Ih=function(t,n){Nh&&n.name==="__proto__"?Nh(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Ah=function(t,n){if(n==="__proto__")if(cs.call(t,n)){if(Th)return Th(t,n).value}else return;return t[n]},nN=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=Ah(l,n),i=Ah(t,n),l!==i&&(f&&i&&(_h(i)||(o=jh(i)))?(o?(o=!1,s=r&&jh(r)?r:[]):s=r&&_h(r)?r:{},Ih(l,{name:n,newValue:e(f,s,i)})):typeof i<"u"&&Ih(l,{name:n,newValue:i}));return l};const ta=Gh(nN);function bu(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 rN(){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?iN(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 iN(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:oN,dirname:sN,extname:lN,join:aN,sep:"/"};function oN(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 sN(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 lN(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 aN(...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?".":uN(n)}function uN(e){xo(e);const t=e.codePointAt(0)===47;let n=cN(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function cN(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 dN={cwd:fN};function fN(){return"/"}function Nu(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function hN(e){if(typeof e=="string")e=new URL(e);else if(!Nu(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 pN(e)}function pN(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 Iy{constructor(t){let n;t?Nu(t)?n={path:t}:typeof t=="string"||mN(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":dN.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){Rh(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"),Rh(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){Nu(t)&&(t=hN(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 Rh(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function mN(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const gN=function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o},yN={}.hasOwnProperty;class Zc extends gN{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=rN()}copy(){const t=new Zc;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):yN.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);kN(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),Dh("processSync","process",n),r;function i(o,s){n=!0,bh(o),r=s}}run(t,n,r){Ph(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),Dh("runSync","run",r),i;function o(s,l){bh(s),i=l,r=!0}}stringify(t,n){this.freeze();const r=Wo(n),i=this.compiler||this.Compiler;return sa("stringify",i),Ph(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];bu(x)&&bu(p)&&(p=ta(!0,x,p)),r[h]=[c,p,...y]}}}}const xN=new Zc().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 Ph(e){if(!bu(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Dh(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Wo(e){return vN(e)?e:new Iy(e)}function vN(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function kN(e){return typeof e=="string"||wN(e)}function wN(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const SN="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Lh=[],Oh={allowDangerousHtml:!0},CN=/^(https?|ircs?|mailto|xmpp)$/i,EN=[{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 bN(e){const t=NN(e),n=TN(e);return jN(t.runSync(t.parse(n),n),e)}function NN(e){const t=e.rehypePlugins||Lh,n=e.remarkPlugins||Lh,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Oh}:Oh;return xN().use(lb).use(n).use(tN,r).use(t)}function TN(e){const t=e.children||"",n=new Iy;return typeof t=="string"&&(n.value=t),n}function jN(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,s=t.skipHtml,l=t.unwrapDisallowed,u=t.urlTransform||_N;for(const f of EN)Object.hasOwn(t,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+SN+f.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),Jc(e,c),WS(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 _N(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||CN.test(e.slice(0,t))?e:""}function Fh(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 IN(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Ay(e,t,n){const i=fl((n||{}).ignore||[]),o=AN(t);let s=-1;for(;++s<o.length;)jy(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 N=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=N+1:(y!==N&&m.push({type:"text",value:c.value.slice(y,N)}),Array.isArray(E)?m.push(...E):E&&m.push(E),y=N+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 AN(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([RN(i[0]),PN(i[1])])}return t}function RN(e){return typeof e=="string"?new RegExp(IN(e),"g"):e}function PN(e){return typeof e=="function"?e:function(){return e}}const aa="phrasing",ua=["autolink","link","image","label"];function DN(){return{transforms:[UN],enter:{literalAutolink:ON,literalAutolinkEmail:ca,literalAutolinkHttp:ca,literalAutolinkWww:ca},exit:{literalAutolink:BN,literalAutolinkEmail:MN,literalAutolinkHttp:FN,literalAutolinkWww:zN}}}function LN(){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 ON(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function ca(e){this.config.enter.autolinkProtocol.call(this,e)}function FN(e){this.config.exit.autolinkProtocol.call(this,e)}function zN(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 MN(e){this.config.exit.autolinkEmail.call(this,e)}function BN(e){this.exit(e)}function UN(e){Ay(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,HN],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),$N]],{ignore:["link","linkReference"]})}function HN(e,t,n,r,i){let o="";if(!Ry(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!WN(n)))return!1;const s=VN(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 $N(e,t,n,r){return!Ry(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function WN(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 VN(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=Fh(e,"(");let o=Fh(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 Ry(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||ur(n)||ul(n))&&(!t||n!==47)}Py.peek=eT;function qN(){this.buffer()}function GN(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function KN(){this.buffer()}function QN(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function YN(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 XN(e){this.exit(e)}function JN(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 ZN(e){this.exit(e)}function eT(){return"["}function Py(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 tT(){return{enter:{gfmFootnoteCallString:qN,gfmFootnoteCall:GN,gfmFootnoteDefinitionLabelString:KN,gfmFootnoteDefinition:QN},exit:{gfmFootnoteCallString:YN,gfmFootnoteCall:XN,gfmFootnoteDefinitionLabelString:JN,gfmFootnoteDefinition:ZN}}}function nT(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Py},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?Dy:rT))),c(),u}}function rT(e,t,n){return t===0?e:Dy(e,t,n)}function Dy(e,t,n){return(n?"":" ")+e}const iT=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Ly.peek=uT;function oT(){return{canContainEols:["delete"],enter:{strikethrough:lT},exit:{strikethrough:aT}}}function sT(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:iT}],handlers:{delete:Ly}}}function lT(e){this.enter({type:"delete",children:[]},e)}function aT(e){this.exit(e)}function Ly(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 uT(){return"~"}function cT(e){return e.length}function dT(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||cT,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=fT(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]=zh(r[d]);else{const x=zh(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="",N="";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),N=" ".repeat(j/2-.5)):(v=" ".repeat(j/2),N=v):N=" ".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(N),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 fT(e){return e==null?"":String(e)}function zh(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 hT(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()),pT);return i(),s}function pT(e,t,n){return">"+(n?"":" ")+e}function mT(e,t){return Mh(e,t.inConstruct,!0)&&!Mh(e,t.notInConstruct,!1)}function Mh(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 Bh(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
67
|
+
`&&mT(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
68
|
+
`}function gT(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 yT(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 xT(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 vT(e,t,n,r){const i=xT(n),o=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(yT(e,n)){const d=n.enter("codeIndented"),h=n.indentLines(o,kT);return d(),h}const l=n.createTracker(r),u=i.repeat(Math.max(gT(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 kT(e,t,n){return(n?"":" ")+e}function ed(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 wT(e,t,n,r){const i=ed(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 ST(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}}Oy.peek=CT;function Oy(e,t,n,r){const i=ST(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 CT(e,t,n){return n.options.emphasis||"*"}function ET(e,t){let n=!1;return Jc(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)&&Vc(e)&&(t.options.setext||n))}function bT(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(ET(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}Fy.peek=NT;function Fy(e){return e.value||""}function NT(){return"<"}zy.peek=TT;function zy(e,t,n,r){const i=ed(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 TT(){return"!"}My.peek=jT;function My(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 jT(){return"!"}By.peek=_T;function By(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 _T(){return"`"}function Uy(e,t){const n=Vc(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))}Hy.peek=IT;function Hy(e,t,n,r){const i=ed(n),o=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let l,u;if(Uy(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 IT(e,t,n){return Uy(e,n)?"<":"["}$y.peek=AT;function $y(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 AT(){return"["}function td(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 RT(e){const t=td(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 PT(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 Wy(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 DT(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let s=e.ordered?PT(n):td(n);const l=e.ordered?s==="."?")":".":RT(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),Wy(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 LT(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 OT(e,t,n,r){const i=LT(n);let o=n.bulletCurrent||td(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 FT(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),s=n.containerPhrasing(e,r);return o(),i(),s}const zT=fl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function MT(e,t,n,r){return(e.children.some(function(s){return zT(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function BT(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Vy.peek=UT;function Vy(e,t,n,r){const i=BT(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 UT(e,t,n){return n.options.strong||"*"}function HT(e,t,n,r){return n.safe(e.value,r)}function $T(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 WT(e,t,n){const r=(Wy(n)+(n.options.ruleSpaces?" ":"")).repeat($T(n));return n.options.ruleSpaces?r.slice(0,-1):r}const qy={blockquote:hT,break:Bh,code:vT,definition:wT,emphasis:Oy,hardBreak:Bh,heading:bT,html:Fy,image:zy,imageReference:My,inlineCode:By,link:Hy,linkReference:$y,list:DT,listItem:OT,paragraph:FT,root:MT,strong:Vy,text:HT,thematicBreak:WT};function VT(){return{enter:{table:qT,tableData:Uh,tableHeader:Uh,tableRow:KT},exit:{codeText:QT,table:GT,tableData:da,tableHeader:da,tableRow:da}}}function qT(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 GT(e){this.exit(e),this.data.inTable=void 0}function KT(e){this.enter({type:"tableRow",children:[]},e)}function da(e){this.exit(e)}function Uh(e){this.enter({type:"tableCell",children:[]},e)}function QT(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,YT));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function YT(e,t){return t==="|"?t:e}function XT(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 dT(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=qy.inlineCode(p,y,x);return x.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}function JT(){return{exit:{taskListCheckValueChecked:Hh,taskListCheckValueUnchecked:Hh,paragraph:ej}}}function ZT(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:tj}}}function Hh(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function ej(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 tj(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=qy.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 nj(){return[DN(),tT(),oT(),VT(),JT()]}function rj(e){return{extensions:[LN(),nT(e),sT(),XT(e),ZT()]}}const ij={tokenize:cj,partial:!0},Gy={tokenize:dj,partial:!0},Ky={tokenize:fj,partial:!0},Qy={tokenize:hj,partial:!0},oj={tokenize:pj,partial:!0},Yy={name:"wwwAutolink",tokenize:aj,previous:Jy},Xy={name:"protocolAutolink",tokenize:uj,previous:Zy},mn={name:"emailAutolink",tokenize:lj,previous:ex},en={};function sj(){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,Xy];en[104]=[mn,Xy];en[87]=[mn,Yy];en[119]=[mn,Yy];function lj(e,t,n){const r=this;let i,o;return s;function s(d){return!Tu(d)||!ex.call(r,r.previous)||nd(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(oj,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 aj(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!Jy.call(r,r.previous)||nd(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(ij,e.attempt(Gy,e.attempt(Ky,o),n),n)(s))}function o(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function uj(e,t,n){const r=this;let i="",o=!1;return s;function s(d){return(d===72||d===104)&&Zy.call(r,r.previous)&&!nd(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(Gy,e.attempt(Ky,f),n)(d)}function f(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function cj(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 dj(e,t,n){let r,i,o;return s;function s(c){return c===46||c===95?e.check(Qy,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 fj(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(Qy,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 hj(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 pj(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return Be(o)?n(o):t(o)}}function Jy(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||de(e)}function Zy(e){return!We(e)}function ex(e){return!(e===47||Tu(e))}function Tu(e){return e===43||e===45||e===46||e===95||Be(e)}function nd(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 mj={tokenize:Cj,partial:!0};function gj(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:kj,continuation:{tokenize:wj},exit:Sj}},text:{91:{name:"gfmFootnoteCall",tokenize:vj},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:yj,resolveTo:xj}}}}function yj(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 xj(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 vj(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 kj(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 wj(e,t,n){return e.check(yo,t,e.attempt(mj,t,n))}function Sj(e){e.exit("gfmFootnoteDefinition")}function Cj(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 Ej(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 bj{constructor(){this.map=[]}add(t,n,r){Nj(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 Nj(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 Tj(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 jj(){return{flow:{null:{name:"table",tokenize:_j,resolveAll:Ij}}}}function _j(e,t,n){const r=this;let i=0,o=0,s;return l;function l(b){let P=r.events.length-1;for(;P>-1;){const U=r.events[P][1].type;if(U==="lineEnding"||U==="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(b):$(b)}function u(b){return e.enter("tableHead"),e.enter("tableRow"),c(b)}function c(b){return b===124||(s=!0,o+=1),f(b)}function f(b){return b===null?n(b):Q(b)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),p):n(b):Z(b)?ie(e,f,"whitespace")(b):(o+=1,s&&(s=!1,i+=1),b===124?(e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),s=!0,f):(e.enter("data"),d(b)))}function d(b){return b===null||b===124||de(b)?(e.exit("data"),f(b)):(e.consume(b),b===92?h:d)}function h(b){return b===92||b===124?(e.consume(b),d):d(b)}function p(b){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(b):(e.enter("tableDelimiterRow"),s=!1,Z(b)?ie(e,y,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):y(b))}function y(b){return b===45||b===58?S(b):b===124?(s=!0,e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),x):j(b)}function x(b){return Z(b)?ie(e,S,"whitespace")(b):S(b)}function S(b){return b===58?(o+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(b),e.exit("tableDelimiterMarker"),g):b===45?(o+=1,g(b)):b===null||Q(b)?N(b):j(b)}function g(b){return b===45?(e.enter("tableDelimiterFiller"),m(b)):j(b)}function m(b){return b===45?(e.consume(b),m):b===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(b),e.exit("tableDelimiterMarker"),v):(e.exit("tableDelimiterFiller"),v(b))}function v(b){return Z(b)?ie(e,N,"whitespace")(b):N(b)}function N(b){return b===124?y(b):b===null||Q(b)?!s||i!==o?j(b):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(b)):j(b)}function j(b){return n(b)}function E(b){return e.enter("tableRow"),_(b)}function _(b){return b===124?(e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),_):b===null||Q(b)?(e.exit("tableRow"),t(b)):Z(b)?ie(e,_,"whitespace")(b):(e.enter("data"),D(b))}function D(b){return b===null||b===124||de(b)?(e.exit("data"),_(b)):(e.consume(b),b===92?R:D)}function R(b){return b===92||b===124?(e.consume(b),D):D(b)}}function Ij(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 bj;for(;++n<e.length;){const p=e[n],y=p[1];p[0]==="enter"?y.type==="tableHead"?(l=!1,u!==0&&($h(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&&$h(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=Tj(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 $h(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 Aj={name:"tasklistCheck",tokenize:Pj};function Rj(){return{text:{91:Aj}}}function Pj(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:Dj},t,n)(u):n(u)}}function Dj(e,t,n){return ie(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function Lj(e){return uy([sj(),gj(),Ej(e),jj(),Rj()])}const Oj={};function Fj(e){const t=this,n=e||Oj,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Lj(n)),o.push(nj()),s.push(rj(n))}function zj(e){Ay(e,[/\r?\n|\r/g,Mj])}function Mj(){return{type:"break"}}function Bj(){return function(e){zj(e)}}function tx({content:e}){return a.jsx("div",{className:"context-markdownXXX",children:a.jsx(bN,{remarkPlugins:[Fj,Bj],children:e.replace(/\\n/g,`
|
|
80
|
+
`)})})}function Uj({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 Hj=[{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 $j(e,t){return{id:e.id,label:e.label,description:e.description,action:()=>t(e.markdown.before,e.markdown.after)}}function Wj(e){return Hj.map(t=>$j(t,e))}function Vj({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=Wj((y,x="")=>{if(!i.current)return;const S=i.current,g=o.startPosition,m=S.selectionEnd,v=e.substring(0,g),N=e.substring(m),j=v+y+x+N;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,N=g.split(`
|
|
85
|
+
`).length;s({active:!0,query:"",position:{x:m.left+16,y:m.top+N*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(Uj,{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(tx,{content:e}):a.jsx("div",{className:"rich-editor-empty",children:"Nothing to preview yet"})})]})]})})}function qj(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 nx({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(N=>N.name))||[]),[p,y]=k.useState(()=>{if(e==="create"&&s)return s;const N=t==null?void 0:t.parentId;return typeof N=="string"?N:null}),[x,S]=k.useState(""),g=k.useMemo(()=>{if(e==="create")return n;{const N=qj(t.id,n);return n.filter(j=>!N.has(j.id))}},[e,n,t]);k.useEffect(()=>{const N=j=>{j.key==="Escape"&&i()};return document.addEventListener("keydown",N),()=>{document.removeEventListener("keydown",N)}},[i]);const m=async N=>{var j,E;N.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 D=!1;l!==t.title&&(_.title=l,D=!0),c!==t.content&&(_.content=c,D=!0);const R=((j=t.tags)==null?void 0:j.map(V=>V.name))||[];JSON.stringify(d.sort())!==JSON.stringify(R.sort())&&(_.tagNames=d,D=!0);const P=typeof t.parentId=="string"?t.parentId:null;if(p!==P&&(_.parentId=p,D=!0),!D){S("No changes to save");return}await r(_)}S("")}catch(_){const D=((E=_==null?void 0:_.body)==null?void 0:E.detail)||(_==null?void 0:_.message)||`Failed to ${e==="create"?"create":"update"} page`;S(D)}};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:N=>u(N.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:N=>y(N.target.value||null),disabled:o,children:[a.jsx("option",{value:"",children:"None (top level)"}),g.map(N=>a.jsx("option",{value:N.id,children:N.title},N.id))]})]}),a.jsxs("div",{className:"context-form-group",children:[a.jsx("label",{htmlFor:`${e}-content`,children:"Content *"}),a.jsx(Vj,{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(G0,{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 Wh(){const e=Oe(),{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(nx,{mode:"create",pages:n,onSubmit:s,onCancel:()=>e("/context"),isSubmitting:r,defaultParentId:t})]})}function rd({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 Gj(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 Kj({pageId:e,pages:t}){const n=Gj(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 Vh(e){try{return new Date(e).toLocaleString()}catch{return e}}function Qj(){const{pageId:e}=fr(),t=Oe(),{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(Kj,{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 ",Vh(r.createdAt)]}),a.jsx("span",{children:"•"}),a.jsxs("span",{children:["Last edited ",Vh(r.updatedAt)]})]})]}),r.tags&&r.tags.length>0&&a.jsx("div",{className:"context-page-detail-tags",children:r.tags.map(g=>a.jsx(Kg,{tag:g},g.name))}),a.jsx("div",{className:"context-page-detail-content",children:a.jsx(tx,{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(rd,{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 Yj(){const{pageId:e}=fr(),t=Oe(),{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(nx,{mode:"edit",page:n,pages:r,onSubmit:u,onCancel:()=>t(`/context/page/${e}`),isSubmitting:i})]}):a.jsx("div",{className:"context-status",children:"Loading..."})}z.BASE=hr;const rx=()=>{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 Ke.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[b,P,V]=await Promise.all([Ke.mcpRegistryControllerGetServer(R),Ke.mcpRegistryControllerListScopes(R),Ke.mcpRegistryControllerListConnections(R)]);if(l(b),c(P||[]),d(V||[]),P&&P.length>0){const $=[];for(const U of P)try{const G=await Ke.mcpRegistryControllerListMappings(R,U.id);G&&$.push(...G)}catch(G){console.error(`Failed to load mappings for scope ${U.id}`,G)}p($)}}catch(b){r(b instanceof Error?b.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 b=await Ke.mcpRegistryControllerCreateServer({...R,type:R.type??au.type.HTTP});return await y(),b}catch(b){throw r(b instanceof Error?b.message:"Failed to create server"),b}finally{t(!1)}},updateServer:async(R,b)=>{t(!0),r(null);try{const P=await Ke.mcpRegistryControllerUpdateServer(R,b);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,b,P)=>{t(!0),r(null);try{await Ke.mcpRegistryControllerCreateScopes(R,[{id:b,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,b)=>{t(!0),r(null);try{await Ke.mcpRegistryControllerCreateConnection(R,b),(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,b)=>{t(!0),r(null);try{await Ke.mcpRegistryControllerUpdateConnection(R,b),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,b)=>{t(!0),r(null);try{await Ke.mcpRegistryControllerCreateMapping(R,b),(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,b)=>{t(!0),r(null);try{await Ke.mcpRegistryControllerDeleteScope(R,b),(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 Ke.mcpRegistryControllerDeleteConnection(R),s&&await x(s.id)}catch(b){throw r(b instanceof Error?b.message:"Failed to delete connection"),b}finally{t(!1)}},deleteMapping:async R=>{t(!0),r(null);try{await Ke.mcpRegistryControllerDeleteMapping(R),s&&await x(s.id)}catch(b){throw r(b instanceof Error?b.message:"Failed to delete mapping"),b}finally{t(!1)}}}};function Xj(){pr("Tools");const{servers:e,isLoading:t,error:n,createServer:r}=rx(),i=Oe(),[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 Jj=()=>{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=Ng(),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 Zj(){const{serverId:e}=fr(),t=Oe(),{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}=rx(),{metadata:g,authorizationServerMetadataUrl:m,loadMetadata:v}=Jj(),[N,j]=k.useState([]),[E,_]=k.useState(null),[D,R]=k.useState(null),[b,P]=k.useState(null),[V,$]=k.useState(!1),[U,G]=k.useState({name:"",description:"",url:""}),[O,L]=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),I1.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={};U.name&&(W.name=U.name),U.description&&(W.description=U.description),U.url&&(W.url=U.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,O.scopeId,O.description),_(null),L({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(),!!b)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(b,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"}),N.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:N.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:O.scopeId,onChange:I=>L({...O,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:O.description,onChange:I=>L({...O,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:U.name,onChange:I=>G({...U,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:U.description,onChange:I=>G({...U,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:U.url,onChange:I=>G({...U,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"})]})]})]})}),D&&a.jsx(rd,{message:D.message,onConfirm:D.onConfirm,onCancel:()=>R(null)})]}):a.jsx("div",{className:"error-message",children:"Server not found"})}z.BASE=hr;function e_(){pr("Authorization Consent - taico");const[e]=d1(),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 A1.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=z.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 N=document.createElement("input");N.type="hidden",N.name=m,N.value=String(v),g.appendChild(N)}),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 qh="agents-sidebar-collapsed";function t_(){const{agentId:e,sessionId:t}=fr(),n=Oe(),[r,i]=k.useState(()=>{const u=localStorage.getItem(qh);return u!==null?u==="true":no()});k.useEffect(()=>{localStorage.setItem(qh,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(Nc,{})})]})}z.BASE=hr;const id=()=>{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 n_(){const e=Oe(),{agents:t,isLoading:n,error:r}=id();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 r_(){const{agents:e,isLoading:t,error:n,createAgent:r}=id(),i=Oe(),[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 i_(){var y;const{agentId:e}=fr(),t=Oe(),{selectedAgent:n,isLoading:r,error:i,loadAgentDetails:o}=id(),[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(rd,{message:u.message,onConfirm:u.onConfirm,onCancel:()=>c(null)})]})):a.jsx("div",{className:"error-message",children:"Agent not found"})}function o_(){const{logout:e}=Ac(),t=Oe();return tt(),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 s_(){return F1()?a.jsx(B0,{}):a.jsx(F0,{})}function l_(){return a.jsx(l1,{basename:y1,children:a.jsx(R1,{children:a.jsxs(Ow,{children:[a.jsx(je,{path:"/login",element:a.jsx(D1,{})}),a.jsx(je,{path:"/logout",element:a.jsx(o_,{})}),a.jsxs(je,{element:a.jsx(P1,{children:a.jsx(z1,{})}),children:[a.jsx(je,{index:!0,element:a.jsx(M1,{})}),a.jsx(je,{path:"tasks",element:a.jsx(s_,{})}),a.jsx(je,{path:"mcp-registry",element:a.jsx(Xj,{})}),a.jsx(je,{path:"mcp-registry/:serverId",element:a.jsx(Zj,{})}),a.jsx(je,{path:"consent",element:a.jsx(e_,{})}),a.jsxs(je,{path:"context",element:a.jsx(V0,{}),children:[a.jsx(je,{index:!0,element:a.jsx(q0,{})}),a.jsx(je,{path:"new",element:a.jsx(Wh,{})}),a.jsx(je,{path:"page/:pageId",element:a.jsx(Qj,{})}),a.jsx(je,{path:"page/:pageId/edit",element:a.jsx(Yj,{})}),a.jsx(je,{path:"page/:pageId/new",element:a.jsx(Wh,{})})]}),a.jsxs(je,{path:"agents",element:a.jsx(t_,{}),children:[a.jsx(je,{index:!0,element:a.jsx(n_,{})}),a.jsx(je,{path:"admin",element:a.jsx(r_,{})}),a.jsx(je,{path:":agentId/admin",element:a.jsx(i_,{})})]})]})]})})})}sg(document.getElementById("root")).render(a.jsx(k.StrictMode,{children:a.jsx("div",{className:"app-shell",children:a.jsx(l_,{})})}));
|