@slopus/rig 0.0.1
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/LICENSE +21 -0
- package/README.md +129 -0
- package/dist/agent/Agent.d.ts +73 -0
- package/dist/agent/Agent.d.ts.map +1 -0
- package/dist/agent/Agent.js +247 -0
- package/dist/agent/agentMessageToText.d.ts +3 -0
- package/dist/agent/agentMessageToText.d.ts.map +1 -0
- package/dist/agent/agentMessageToText.js +20 -0
- package/dist/agent/agentsMdProjectDocMaxBytes.d.ts +2 -0
- package/dist/agent/agentsMdProjectDocMaxBytes.d.ts.map +1 -0
- package/dist/agent/agentsMdProjectDocMaxBytes.js +1 -0
- package/dist/agent/assistantMessageToAgentMessage.d.ts +4 -0
- package/dist/agent/assistantMessageToAgentMessage.d.ts.map +1 -0
- package/dist/agent/assistantMessageToAgentMessage.js +32 -0
- package/dist/agent/buildAncestorDirs.d.ts +2 -0
- package/dist/agent/buildAncestorDirs.d.ts.map +1 -0
- package/dist/agent/buildAncestorDirs.js +16 -0
- package/dist/agent/contentBlockToText.d.ts +3 -0
- package/dist/agent/contentBlockToText.d.ts.map +1 -0
- package/dist/agent/contentBlockToText.js +6 -0
- package/dist/agent/context/AgentContext.d.ts +9 -0
- package/dist/agent/context/AgentContext.d.ts.map +1 -0
- package/dist/agent/context/AgentContext.js +1 -0
- package/dist/agent/context/BashContext.d.ts +18 -0
- package/dist/agent/context/BashContext.d.ts.map +1 -0
- package/dist/agent/context/BashContext.js +1 -0
- package/dist/agent/context/FileSystemContext.d.ts +25 -0
- package/dist/agent/context/FileSystemContext.d.ts.map +1 -0
- package/dist/agent/context/FileSystemContext.js +1 -0
- package/dist/agent/context/SubagentContext.d.ts +18 -0
- package/dist/agent/context/SubagentContext.d.ts.map +1 -0
- package/dist/agent/context/SubagentContext.js +1 -0
- package/dist/agent/context/capOutput.d.ts +2 -0
- package/dist/agent/context/capOutput.d.ts.map +1 -0
- package/dist/agent/context/capOutput.js +7 -0
- package/dist/agent/context/createJustBashAgentContext.d.ts +4 -0
- package/dist/agent/context/createJustBashAgentContext.d.ts.map +1 -0
- package/dist/agent/context/createJustBashAgentContext.js +8 -0
- package/dist/agent/context/createJustBashBashContext.d.ts +4 -0
- package/dist/agent/context/createJustBashBashContext.d.ts.map +1 -0
- package/dist/agent/context/createJustBashBashContext.js +31 -0
- package/dist/agent/context/createJustBashFileSystemContext.d.ts +4 -0
- package/dist/agent/context/createJustBashFileSystemContext.d.ts.map +1 -0
- package/dist/agent/context/createJustBashFileSystemContext.js +31 -0
- package/dist/agent/context/createNodeAgentContext.d.ts +8 -0
- package/dist/agent/context/createNodeAgentContext.d.ts.map +1 -0
- package/dist/agent/context/createNodeAgentContext.js +11 -0
- package/dist/agent/context/createNodeBashContext.d.ts +8 -0
- package/dist/agent/context/createNodeBashContext.d.ts.map +1 -0
- package/dist/agent/context/createNodeBashContext.js +23 -0
- package/dist/agent/context/createNodeFileSystemContext.d.ts +6 -0
- package/dist/agent/context/createNodeFileSystemContext.d.ts.map +1 -0
- package/dist/agent/context/createNodeFileSystemContext.js +43 -0
- package/dist/agent/context/toFileSystemStat.d.ts +9 -0
- package/dist/agent/context/toFileSystemStat.d.ts.map +1 -0
- package/dist/agent/context/toFileSystemStat.js +9 -0
- package/dist/agent/createSubagentInstructions.d.ts +2 -0
- package/dist/agent/createSubagentInstructions.d.ts.map +1 -0
- package/dist/agent/createSubagentInstructions.js +16 -0
- package/dist/agent/createSystemPrompt.d.ts +12 -0
- package/dist/agent/createSystemPrompt.d.ts.map +1 -0
- package/dist/agent/createSystemPrompt.js +28 -0
- package/dist/agent/findAgentsMdPaths.d.ts +3 -0
- package/dist/agent/findAgentsMdPaths.d.ts.map +1 -0
- package/dist/agent/findAgentsMdPaths.js +18 -0
- package/dist/agent/findLastAgentResponseText.d.ts +3 -0
- package/dist/agent/findLastAgentResponseText.d.ts.map +1 -0
- package/dist/agent/findLastAgentResponseText.js +17 -0
- package/dist/agent/findProjectRoot.d.ts +3 -0
- package/dist/agent/findProjectRoot.d.ts.map +1 -0
- package/dist/agent/findProjectRoot.js +17 -0
- package/dist/agent/formatAgentsMdInstructions.d.ts +2 -0
- package/dist/agent/formatAgentsMdInstructions.d.ts.map +1 -0
- package/dist/agent/formatAgentsMdInstructions.js +7 -0
- package/dist/agent/index.d.ts +32 -0
- package/dist/agent/index.d.ts.map +1 -0
- package/dist/agent/index.js +20 -0
- package/dist/agent/isFileAtPath.d.ts +3 -0
- package/dist/agent/isFileAtPath.d.ts.map +1 -0
- package/dist/agent/isFileAtPath.js +8 -0
- package/dist/agent/isInvalidImageRequestError.d.ts +2 -0
- package/dist/agent/isInvalidImageRequestError.d.ts.map +1 -0
- package/dist/agent/isInvalidImageRequestError.js +36 -0
- package/dist/agent/loadAgentsMdInstructions.d.ts +3 -0
- package/dist/agent/loadAgentsMdInstructions.d.ts.map +1 -0
- package/dist/agent/loadAgentsMdInstructions.js +22 -0
- package/dist/agent/loop.d.ts +28 -0
- package/dist/agent/loop.d.ts.map +1 -0
- package/dist/agent/loop.js +369 -0
- package/dist/agent/prepareProviderImageContent.d.ts +4 -0
- package/dist/agent/prepareProviderImageContent.d.ts.map +1 -0
- package/dist/agent/prepareProviderImageContent.js +27 -0
- package/dist/agent/prepareProviderMessageImages.d.ts +4 -0
- package/dist/agent/prepareProviderMessageImages.d.ts.map +1 -0
- package/dist/agent/prepareProviderMessageImages.js +21 -0
- package/dist/agent/printAgentMessageToConsole.d.ts +6 -0
- package/dist/agent/printAgentMessageToConsole.d.ts.map +1 -0
- package/dist/agent/printAgentMessageToConsole.js +11 -0
- package/dist/agent/prompts/claudeCodeSystemPrompt.d.ts +2 -0
- package/dist/agent/prompts/claudeCodeSystemPrompt.d.ts.map +1 -0
- package/dist/agent/prompts/claudeCodeSystemPrompt.js +1 -0
- package/dist/agent/prompts/gpt54SystemPrompt.d.ts +2 -0
- package/dist/agent/prompts/gpt54SystemPrompt.d.ts.map +1 -0
- package/dist/agent/prompts/gpt54SystemPrompt.js +1 -0
- package/dist/agent/prompts/gpt55SystemPrompt.d.ts +2 -0
- package/dist/agent/prompts/gpt55SystemPrompt.d.ts.map +1 -0
- package/dist/agent/prompts/gpt55SystemPrompt.js +1 -0
- package/dist/agent/prompts/kimiSystemPrompt.d.ts +2 -0
- package/dist/agent/prompts/kimiSystemPrompt.d.ts.map +1 -0
- package/dist/agent/prompts/kimiSystemPrompt.js +1 -0
- package/dist/agent/readAgentsMdFile.d.ts +3 -0
- package/dist/agent/readAgentsMdFile.d.ts.map +1 -0
- package/dist/agent/readAgentsMdFile.js +8 -0
- package/dist/agent/replaceLastTurnToolResultImages.d.ts +3 -0
- package/dist/agent/replaceLastTurnToolResultImages.d.ts.map +1 -0
- package/dist/agent/replaceLastTurnToolResultImages.js +33 -0
- package/dist/agent/selectSystemPromptForModel.d.ts +3 -0
- package/dist/agent/selectSystemPromptForModel.d.ts.map +1 -0
- package/dist/agent/selectSystemPromptForModel.js +35 -0
- package/dist/agent/selectToolsForModel.d.ts +8 -0
- package/dist/agent/selectToolsForModel.d.ts.map +1 -0
- package/dist/agent/selectToolsForModel.js +19 -0
- package/dist/agent/skills/Skill.d.ts +8 -0
- package/dist/agent/skills/Skill.d.ts.map +1 -0
- package/dist/agent/skills/Skill.js +1 -0
- package/dist/agent/skills/SkillFrontmatter.d.ts +6 -0
- package/dist/agent/skills/SkillFrontmatter.d.ts.map +1 -0
- package/dist/agent/skills/SkillFrontmatter.js +1 -0
- package/dist/agent/skills/escapeXml.d.ts +2 -0
- package/dist/agent/skills/escapeXml.d.ts.map +1 -0
- package/dist/agent/skills/escapeXml.js +8 -0
- package/dist/agent/skills/findSkillFilePaths.d.ts +3 -0
- package/dist/agent/skills/findSkillFilePaths.d.ts.map +1 -0
- package/dist/agent/skills/findSkillFilePaths.js +44 -0
- package/dist/agent/skills/findSkillRootPaths.d.ts +3 -0
- package/dist/agent/skills/findSkillRootPaths.d.ts.map +1 -0
- package/dist/agent/skills/findSkillRootPaths.js +30 -0
- package/dist/agent/skills/formatSkillInvocation.d.ts +3 -0
- package/dist/agent/skills/formatSkillInvocation.d.ts.map +1 -0
- package/dist/agent/skills/formatSkillInvocation.js +12 -0
- package/dist/agent/skills/formatSkillsForPrompt.d.ts +3 -0
- package/dist/agent/skills/formatSkillsForPrompt.d.ts.map +1 -0
- package/dist/agent/skills/formatSkillsForPrompt.js +25 -0
- package/dist/agent/skills/isDirectoryAtPath.d.ts +3 -0
- package/dist/agent/skills/isDirectoryAtPath.d.ts.map +1 -0
- package/dist/agent/skills/isDirectoryAtPath.js +8 -0
- package/dist/agent/skills/isFileAtPath.d.ts +3 -0
- package/dist/agent/skills/isFileAtPath.d.ts.map +1 -0
- package/dist/agent/skills/isFileAtPath.js +8 -0
- package/dist/agent/skills/isValidSkillDescription.d.ts +2 -0
- package/dist/agent/skills/isValidSkillDescription.d.ts.map +1 -0
- package/dist/agent/skills/isValidSkillDescription.js +7 -0
- package/dist/agent/skills/isValidSkillName.d.ts +2 -0
- package/dist/agent/skills/isValidSkillName.d.ts.map +1 -0
- package/dist/agent/skills/isValidSkillName.js +9 -0
- package/dist/agent/skills/loadSkillFromFile.d.ts +4 -0
- package/dist/agent/skills/loadSkillFromFile.d.ts.map +1 -0
- package/dist/agent/skills/loadSkillFromFile.js +36 -0
- package/dist/agent/skills/loadSkillInstructions.d.ts +3 -0
- package/dist/agent/skills/loadSkillInstructions.d.ts.map +1 -0
- package/dist/agent/skills/loadSkillInstructions.js +5 -0
- package/dist/agent/skills/loadSkills.d.ts +4 -0
- package/dist/agent/skills/loadSkills.d.ts.map +1 -0
- package/dist/agent/skills/loadSkills.js +15 -0
- package/dist/agent/skills/parseSkillFrontmatter.d.ts +7 -0
- package/dist/agent/skills/parseSkillFrontmatter.d.ts.map +1 -0
- package/dist/agent/skills/parseSkillFrontmatter.js +26 -0
- package/dist/agent/systemContentBlockToText.d.ts +3 -0
- package/dist/agent/systemContentBlockToText.d.ts.map +1 -0
- package/dist/agent/systemContentBlockToText.js +6 -0
- package/dist/agent/systemMessageToText.d.ts +3 -0
- package/dist/agent/systemMessageToText.d.ts.map +1 -0
- package/dist/agent/systemMessageToText.js +4 -0
- package/dist/agent/types.d.ts +111 -0
- package/dist/agent/types.d.ts.map +1 -0
- package/dist/agent/types.js +7 -0
- package/dist/app/AppTranscriptEntry.d.ts +9 -0
- package/dist/app/AppTranscriptEntry.d.ts.map +1 -0
- package/dist/app/AppTranscriptEntry.js +1 -0
- package/dist/app/CodingAssistantAgentBackend.d.ts +20 -0
- package/dist/app/CodingAssistantAgentBackend.d.ts.map +1 -0
- package/dist/app/CodingAssistantAgentBackend.js +1 -0
- package/dist/app/CodingAssistantApp.d.ts +47 -0
- package/dist/app/CodingAssistantApp.d.ts.map +1 -0
- package/dist/app/CodingAssistantApp.js +1895 -0
- package/dist/app/CodingAssistantRuntime.d.ts +11 -0
- package/dist/app/CodingAssistantRuntime.d.ts.map +1 -0
- package/dist/app/CodingAssistantRuntime.js +1 -0
- package/dist/app/StartupStatusApp.d.ts +17 -0
- package/dist/app/StartupStatusApp.d.ts.map +1 -0
- package/dist/app/StartupStatusApp.js +101 -0
- package/dist/app/createAgentMarkdownTheme.d.ts +3 -0
- package/dist/app/createAgentMarkdownTheme.d.ts.map +1 -0
- package/dist/app/createAgentMarkdownTheme.js +39 -0
- package/dist/app/createCodingAssistantAgent.d.ts +19 -0
- package/dist/app/createCodingAssistantAgent.d.ts.map +1 -0
- package/dist/app/createCodingAssistantAgent.js +77 -0
- package/dist/app/createDefaultInstructions.d.ts +2 -0
- package/dist/app/createDefaultInstructions.d.ts.map +1 -0
- package/dist/app/createDefaultInstructions.js +8 -0
- package/dist/app/createSelectionPanel.d.ts +11 -0
- package/dist/app/createSelectionPanel.d.ts.map +1 -0
- package/dist/app/createSelectionPanel.js +64 -0
- package/dist/app/createSlashCommands.d.ts +6 -0
- package/dist/app/createSlashCommands.d.ts.map +1 -0
- package/dist/app/createSlashCommands.js +46 -0
- package/dist/app/createStopOnceHandler.d.ts +2 -0
- package/dist/app/createStopOnceHandler.d.ts.map +1 -0
- package/dist/app/createStopOnceHandler.js +9 -0
- package/dist/app/describeModelChoice.d.ts +5 -0
- package/dist/app/describeModelChoice.d.ts.map +1 -0
- package/dist/app/describeModelChoice.js +13 -0
- package/dist/app/describeReasoningLevel.d.ts +5 -0
- package/dist/app/describeReasoningLevel.d.ts.map +1 -0
- package/dist/app/describeReasoningLevel.js +21 -0
- package/dist/app/encodeModelChoice.d.ts +2 -0
- package/dist/app/encodeModelChoice.d.ts.map +1 -0
- package/dist/app/encodeModelChoice.js +3 -0
- package/dist/app/ensureSessionCanResume.d.ts +3 -0
- package/dist/app/ensureSessionCanResume.d.ts.map +1 -0
- package/dist/app/ensureSessionCanResume.js +5 -0
- package/dist/app/formatActivityElapsedTime.d.ts +2 -0
- package/dist/app/formatActivityElapsedTime.d.ts.map +1 -0
- package/dist/app/formatActivityElapsedTime.js +15 -0
- package/dist/app/formatSessionSummaries.d.ts +6 -0
- package/dist/app/formatSessionSummaries.d.ts.map +1 -0
- package/dist/app/formatSessionSummaries.js +73 -0
- package/dist/app/highlightAgentCode.d.ts +2 -0
- package/dist/app/highlightAgentCode.d.ts.map +1 -0
- package/dist/app/highlightAgentCode.js +82 -0
- package/dist/app/humanizeProviderId.d.ts +2 -0
- package/dist/app/humanizeProviderId.d.ts.map +1 -0
- package/dist/app/humanizeProviderId.js +22 -0
- package/dist/app/humanizeReasoningLevel.d.ts +2 -0
- package/dist/app/humanizeReasoningLevel.d.ts.map +1 -0
- package/dist/app/humanizeReasoningLevel.js +28 -0
- package/dist/app/index.d.ts +17 -0
- package/dist/app/index.d.ts.map +1 -0
- package/dist/app/index.js +8 -0
- package/dist/app/isMainModule.d.ts +2 -0
- package/dist/app/isMainModule.d.ts.map +1 -0
- package/dist/app/isMainModule.js +6 -0
- package/dist/app/main.d.ts +2 -0
- package/dist/app/main.d.ts.map +1 -0
- package/dist/app/main.js +64 -0
- package/dist/app/readClipboardImage.d.ts +10 -0
- package/dist/app/readClipboardImage.d.ts.map +1 -0
- package/dist/app/readClipboardImage.js +134 -0
- package/dist/app/readPackageVersion.d.ts +2 -0
- package/dist/app/readPackageVersion.d.ts.map +1 -0
- package/dist/app/readPackageVersion.js +11 -0
- package/dist/app/renderActivityWave.d.ts +3 -0
- package/dist/app/renderActivityWave.d.ts.map +1 -0
- package/dist/app/renderActivityWave.js +28 -0
- package/dist/app/renderAgentMarkdown.d.ts +7 -0
- package/dist/app/renderAgentMarkdown.d.ts.map +1 -0
- package/dist/app/renderAgentMarkdown.js +23 -0
- package/dist/app/resolvePortlessCliPath.d.ts +2 -0
- package/dist/app/resolvePortlessCliPath.d.ts.map +1 -0
- package/dist/app/resolvePortlessCliPath.js +31 -0
- package/dist/app/runApp.d.ts +12 -0
- package/dist/app/runApp.d.ts.map +1 -0
- package/dist/app/runApp.js +157 -0
- package/dist/app/runDaemonCommand.d.ts +3 -0
- package/dist/app/runDaemonCommand.d.ts.map +1 -0
- package/dist/app/runDaemonCommand.js +50 -0
- package/dist/app/runMonit.d.ts +6 -0
- package/dist/app/runMonit.d.ts.map +1 -0
- package/dist/app/runMonit.js +13 -0
- package/dist/app/runWebCommand.d.ts +2 -0
- package/dist/app/runWebCommand.d.ts.map +1 -0
- package/dist/app/runWebCommand.js +52 -0
- package/dist/app/web/createWebHttpServer.d.ts +8 -0
- package/dist/app/web/createWebHttpServer.d.ts.map +1 -0
- package/dist/app/web/createWebHttpServer.js +150 -0
- package/dist/app/web/runWebServer.d.ts +2 -0
- package/dist/app/web/runWebServer.d.ts.map +1 -0
- package/dist/app/web/runWebServer.js +63 -0
- package/dist/app/web/webPortlessRoute.d.ts +3 -0
- package/dist/app/web/webPortlessRoute.d.ts.map +1 -0
- package/dist/app/web/webPortlessRoute.js +2 -0
- package/dist/client/ProtocolHttpClient.d.ts +42 -0
- package/dist/client/ProtocolHttpClient.d.ts.map +1 -0
- package/dist/client/ProtocolHttpClient.js +181 -0
- package/dist/client/RemoteAgent.d.ts +28 -0
- package/dist/client/RemoteAgent.d.ts.map +1 -0
- package/dist/client/RemoteAgent.js +270 -0
- package/dist/client/ensureLocalProtocolServer.d.ts +13 -0
- package/dist/client/ensureLocalProtocolServer.d.ts.map +1 -0
- package/dist/client/ensureLocalProtocolServer.js +112 -0
- package/dist/client/index.d.ts +4 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +3 -0
- package/dist/config/createConfigFile.d.ts +3 -0
- package/dist/config/createConfigFile.d.ts.map +1 -0
- package/dist/config/createConfigFile.js +22 -0
- package/dist/config/defaultConfig.d.ts +3 -0
- package/dist/config/defaultConfig.d.ts.map +1 -0
- package/dist/config/defaultConfig.js +8 -0
- package/dist/config/getDefaultGlobalConfigPath.d.ts +2 -0
- package/dist/config/getDefaultGlobalConfigPath.d.ts.map +1 -0
- package/dist/config/getDefaultGlobalConfigPath.js +6 -0
- package/dist/config/getDefaultLocalConfigPath.d.ts +2 -0
- package/dist/config/getDefaultLocalConfigPath.d.ts.map +1 -0
- package/dist/config/getDefaultLocalConfigPath.js +4 -0
- package/dist/config/getDefaultRuntimeConfigPath.d.ts +2 -0
- package/dist/config/getDefaultRuntimeConfigPath.d.ts.map +1 -0
- package/dist/config/getDefaultRuntimeConfigPath.js +6 -0
- package/dist/config/index.d.ts +13 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +11 -0
- package/dist/config/loadConfig.d.ts +3 -0
- package/dist/config/loadConfig.d.ts.map +1 -0
- package/dist/config/loadConfig.js +20 -0
- package/dist/config/mergeConfigValues.d.ts +3 -0
- package/dist/config/mergeConfigValues.d.ts.map +1 -0
- package/dist/config/mergeConfigValues.js +22 -0
- package/dist/config/parseConfigToml.d.ts +3 -0
- package/dist/config/parseConfigToml.d.ts.map +1 -0
- package/dist/config/parseConfigToml.js +50 -0
- package/dist/config/readConfigFile.d.ts +3 -0
- package/dist/config/readConfigFile.d.ts.map +1 -0
- package/dist/config/readConfigFile.js +25 -0
- package/dist/config/resolveConfigPaths.d.ts +3 -0
- package/dist/config/resolveConfigPaths.d.ts.map +1 -0
- package/dist/config/resolveConfigPaths.js +10 -0
- package/dist/config/types.d.ts +51 -0
- package/dist/config/types.d.ts.map +1 -0
- package/dist/config/types.js +1 -0
- package/dist/config/writeRuntimeConfig.d.ts +3 -0
- package/dist/config/writeRuntimeConfig.d.ts.map +1 -0
- package/dist/config/writeRuntimeConfig.js +31 -0
- package/dist/config/writeRuntimeConfigDefaults.d.ts +3 -0
- package/dist/config/writeRuntimeConfigDefaults.d.ts.map +1 -0
- package/dist/config/writeRuntimeConfigDefaults.js +4 -0
- package/dist/main.d.ts +3 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +10 -0
- package/dist/processes/NativeProxessManager.d.ts +27 -0
- package/dist/processes/NativeProxessManager.d.ts.map +1 -0
- package/dist/processes/NativeProxessManager.js +330 -0
- package/dist/processes/index.d.ts +4 -0
- package/dist/processes/index.d.ts.map +1 -0
- package/dist/processes/index.js +2 -0
- package/dist/processes/killProcessTree.d.ts +2 -0
- package/dist/processes/killProcessTree.d.ts.map +1 -0
- package/dist/processes/killProcessTree.js +31 -0
- package/dist/processes/types.d.ts +34 -0
- package/dist/processes/types.d.ts.map +1 -0
- package/dist/processes/types.js +1 -0
- package/dist/protocol/EventId.d.ts +2 -0
- package/dist/protocol/EventId.d.ts.map +1 -0
- package/dist/protocol/EventId.js +1 -0
- package/dist/protocol/SessionProtocol.d.ts +191 -0
- package/dist/protocol/SessionProtocol.d.ts.map +1 -0
- package/dist/protocol/SessionProtocol.js +1 -0
- package/dist/protocol/createEventIdFactory.d.ts +6 -0
- package/dist/protocol/createEventIdFactory.d.ts.map +1 -0
- package/dist/protocol/createEventIdFactory.js +36 -0
- package/dist/protocol/index.d.ts +4 -0
- package/dist/protocol/index.d.ts.map +1 -0
- package/dist/protocol/index.js +1 -0
- package/dist/providers/applyBedrockAdaptiveThinking.d.ts +2 -0
- package/dist/providers/applyBedrockAdaptiveThinking.d.ts.map +1 -0
- package/dist/providers/applyBedrockAdaptiveThinking.js +17 -0
- package/dist/providers/applyBedrockGlmThinking.d.ts +2 -0
- package/dist/providers/applyBedrockGlmThinking.d.ts.map +1 -0
- package/dist/providers/applyBedrockGlmThinking.js +19 -0
- package/dist/providers/applyBedrockKimiThinking.d.ts +2 -0
- package/dist/providers/applyBedrockKimiThinking.d.ts.map +1 -0
- package/dist/providers/applyBedrockKimiThinking.js +15 -0
- package/dist/providers/applyBedrockOpenAIResponse.d.ts +4 -0
- package/dist/providers/applyBedrockOpenAIResponse.d.ts.map +1 -0
- package/dist/providers/applyBedrockOpenAIResponse.js +25 -0
- package/dist/providers/applyCodexImageDetailsToPayload.d.ts +2 -0
- package/dist/providers/applyCodexImageDetailsToPayload.d.ts.map +1 -0
- package/dist/providers/applyCodexImageDetailsToPayload.js +34 -0
- package/dist/providers/bedrock-model-routes.d.ts +29 -0
- package/dist/providers/bedrock-model-routes.d.ts.map +1 -0
- package/dist/providers/bedrock-model-routes.js +301 -0
- package/dist/providers/bedrock-openai-types.d.ts +6 -0
- package/dist/providers/bedrock-openai-types.d.ts.map +1 -0
- package/dist/providers/bedrock-openai-types.js +1 -0
- package/dist/providers/bedrock.d.ts +14 -0
- package/dist/providers/bedrock.d.ts.map +1 -0
- package/dist/providers/bedrock.js +49 -0
- package/dist/providers/classifyCodexErrorCode.d.ts +3 -0
- package/dist/providers/classifyCodexErrorCode.d.ts.map +1 -0
- package/dist/providers/classifyCodexErrorCode.js +11 -0
- package/dist/providers/claude-sdk.d.ts +12 -0
- package/dist/providers/claude-sdk.d.ts.map +1 -0
- package/dist/providers/claude-sdk.js +814 -0
- package/dist/providers/codex.d.ts +12 -0
- package/dist/providers/codex.d.ts.map +1 -0
- package/dist/providers/codex.js +76 -0
- package/dist/providers/collectImageDetails.d.ts +3 -0
- package/dist/providers/collectImageDetails.d.ts.map +1 -0
- package/dist/providers/collectImageDetails.js +14 -0
- package/dist/providers/createBedrockMantleStream.d.ts +13 -0
- package/dist/providers/createBedrockMantleStream.d.ts.map +1 -0
- package/dist/providers/createBedrockMantleStream.js +234 -0
- package/dist/providers/createBedrockOpenAIClient.d.ts +7 -0
- package/dist/providers/createBedrockOpenAIClient.d.ts.map +1 -0
- package/dist/providers/createBedrockOpenAIClient.js +7 -0
- package/dist/providers/createBedrockOpenAIRequest.d.ts +9 -0
- package/dist/providers/createBedrockOpenAIRequest.d.ts.map +1 -0
- package/dist/providers/createBedrockOpenAIRequest.js +30 -0
- package/dist/providers/createBedrockRuntimeStream.d.ts +14 -0
- package/dist/providers/createBedrockRuntimeStream.d.ts.map +1 -0
- package/dist/providers/createBedrockRuntimeStream.js +41 -0
- package/dist/providers/createInferenceStream.d.ts +3 -0
- package/dist/providers/createInferenceStream.d.ts.map +1 -0
- package/dist/providers/createInferenceStream.js +45 -0
- package/dist/providers/createPiBedrockRuntimeModel.d.ts +4 -0
- package/dist/providers/createPiBedrockRuntimeModel.d.ts.map +1 -0
- package/dist/providers/createPiBedrockRuntimeModel.js +20 -0
- package/dist/providers/finishBedrockOpenAIOutputItem.d.ts +5 -0
- package/dist/providers/finishBedrockOpenAIOutputItem.d.ts.map +1 -0
- package/dist/providers/finishBedrockOpenAIOutputItem.js +53 -0
- package/dist/providers/getBedrockModelRoute.d.ts +3 -0
- package/dist/providers/getBedrockModelRoute.d.ts.map +1 -0
- package/dist/providers/getBedrockModelRoute.js +4 -0
- package/dist/providers/isBedrockModelAvailableInRegion.d.ts +3 -0
- package/dist/providers/isBedrockModelAvailableInRegion.d.ts.map +1 -0
- package/dist/providers/isBedrockModelAvailableInRegion.js +3 -0
- package/dist/providers/models.d.ts +21 -0
- package/dist/providers/models.d.ts.map +1 -0
- package/dist/providers/models.js +96 -0
- package/dist/providers/parseOpenAIToolArguments.d.ts +2 -0
- package/dist/providers/parseOpenAIToolArguments.d.ts.map +1 -0
- package/dist/providers/parseOpenAIToolArguments.js +11 -0
- package/dist/providers/pi-bridge.d.ts +8 -0
- package/dist/providers/pi-bridge.d.ts.map +1 -0
- package/dist/providers/pi-bridge.js +246 -0
- package/dist/providers/readBedrockBearerToken.d.ts +2 -0
- package/dist/providers/readBedrockBearerToken.d.ts.map +1 -0
- package/dist/providers/readBedrockBearerToken.js +4 -0
- package/dist/providers/readClaudeCodeOAuthToken.d.ts +2 -0
- package/dist/providers/readClaudeCodeOAuthToken.d.ts.map +1 -0
- package/dist/providers/readClaudeCodeOAuthToken.js +51 -0
- package/dist/providers/replaceAssistantContent.d.ts +3 -0
- package/dist/providers/replaceAssistantContent.d.ts.map +1 -0
- package/dist/providers/replaceAssistantContent.js +5 -0
- package/dist/providers/requestAnthropicMessage.d.ts +6 -0
- package/dist/providers/requestAnthropicMessage.d.ts.map +1 -0
- package/dist/providers/requestAnthropicMessage.js +36 -0
- package/dist/providers/resolveBedrockRegion.d.ts +2 -0
- package/dist/providers/resolveBedrockRegion.d.ts.map +1 -0
- package/dist/providers/resolveBedrockRegion.js +3 -0
- package/dist/providers/resolveBedrockRuntimeModelId.d.ts +3 -0
- package/dist/providers/resolveBedrockRuntimeModelId.d.ts.map +1 -0
- package/dist/providers/resolveBedrockRuntimeModelId.js +8 -0
- package/dist/providers/resolveClaudeCodeExecutablePath.d.ts +2 -0
- package/dist/providers/resolveClaudeCodeExecutablePath.d.ts.map +1 -0
- package/dist/providers/resolveClaudeCodeExecutablePath.js +28 -0
- package/dist/providers/toBedrockAssistantContent.d.ts +4 -0
- package/dist/providers/toBedrockAssistantContent.d.ts.map +1 -0
- package/dist/providers/toBedrockAssistantContent.js +18 -0
- package/dist/providers/toOpenAIReasoningEffort.d.ts +3 -0
- package/dist/providers/toOpenAIReasoningEffort.d.ts.map +1 -0
- package/dist/providers/toOpenAIReasoningEffort.js +14 -0
- package/dist/providers/toOpenAIResponseInput.d.ts +4 -0
- package/dist/providers/toOpenAIResponseInput.d.ts.map +1 -0
- package/dist/providers/toOpenAIResponseInput.js +81 -0
- package/dist/providers/toOpenAIResponseTools.d.ts +4 -0
- package/dist/providers/toOpenAIResponseTools.d.ts.map +1 -0
- package/dist/providers/toOpenAIResponseTools.js +9 -0
- package/dist/providers/toPiReasoningLevel.d.ts +3 -0
- package/dist/providers/toPiReasoningLevel.d.ts.map +1 -0
- package/dist/providers/toPiReasoningLevel.js +16 -0
- package/dist/providers/types.d.ts +187 -0
- package/dist/providers/types.d.ts.map +1 -0
- package/dist/providers/types.js +18 -0
- package/dist/server/AgentSessionManager.d.ts +19 -0
- package/dist/server/AgentSessionManager.d.ts.map +1 -0
- package/dist/server/AgentSessionManager.js +65 -0
- package/dist/server/InMemorySession.d.ts +88 -0
- package/dist/server/InMemorySession.d.ts.map +1 -0
- package/dist/server/InMemorySession.js +676 -0
- package/dist/server/InMemorySessionStore.d.ts +19 -0
- package/dist/server/InMemorySessionStore.d.ts.map +1 -0
- package/dist/server/InMemorySessionStore.js +69 -0
- package/dist/server/LocalServerPaths.d.ts +10 -0
- package/dist/server/LocalServerPaths.d.ts.map +1 -0
- package/dist/server/LocalServerPaths.js +14 -0
- package/dist/server/PersistentSessionStore.d.ts +28 -0
- package/dist/server/PersistentSessionStore.d.ts.map +1 -0
- package/dist/server/PersistentSessionStore.js +619 -0
- package/dist/server/SessionEventLog.d.ts +17 -0
- package/dist/server/SessionEventLog.d.ts.map +1 -0
- package/dist/server/SessionEventLog.js +42 -0
- package/dist/server/SessionStore.d.ts +13 -0
- package/dist/server/SessionStore.d.ts.map +1 -0
- package/dist/server/SessionStore.js +1 -0
- package/dist/server/createModelCatalog.d.ts +7 -0
- package/dist/server/createModelCatalog.d.ts.map +1 -0
- package/dist/server/createModelCatalog.js +40 -0
- package/dist/server/createProtocolHttpServer.d.ts +12 -0
- package/dist/server/createProtocolHttpServer.d.ts.map +1 -0
- package/dist/server/createProtocolHttpServer.js +280 -0
- package/dist/server/generateSessionTitle.d.ts +8 -0
- package/dist/server/generateSessionTitle.d.ts.map +1 -0
- package/dist/server/generateSessionTitle.js +59 -0
- package/dist/server/getDefaultSessionDatabasePath.d.ts +2 -0
- package/dist/server/getDefaultSessionDatabasePath.d.ts.map +1 -0
- package/dist/server/getDefaultSessionDatabasePath.js +6 -0
- package/dist/server/getProviderIdForModel.d.ts +3 -0
- package/dist/server/getProviderIdForModel.d.ts.map +1 -0
- package/dist/server/getProviderIdForModel.js +4 -0
- package/dist/server/index.d.ts +15 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +14 -0
- package/dist/server/prepareLocalServerDirectory.d.ts +2 -0
- package/dist/server/prepareLocalServerDirectory.d.ts.map +1 -0
- package/dist/server/prepareLocalServerDirectory.js +5 -0
- package/dist/server/readLocalServerToken.d.ts +2 -0
- package/dist/server/readLocalServerToken.d.ts.map +1 -0
- package/dist/server/readLocalServerToken.js +4 -0
- package/dist/server/removeStaleSocket.d.ts +2 -0
- package/dist/server/removeStaleSocket.d.ts.map +1 -0
- package/dist/server/removeStaleSocket.js +19 -0
- package/dist/server/resolveInitialModelSelection.d.ts +8 -0
- package/dist/server/resolveInitialModelSelection.d.ts.map +1 -0
- package/dist/server/resolveInitialModelSelection.js +31 -0
- package/dist/server/runLocalProtocolServer.d.ts +6 -0
- package/dist/server/runLocalProtocolServer.d.ts.map +1 -0
- package/dist/server/runLocalProtocolServer.js +82 -0
- package/dist/server/uniqueModelsById.d.ts +3 -0
- package/dist/server/uniqueModelsById.d.ts.map +1 -0
- package/dist/server/uniqueModelsById.js +3 -0
- package/dist/server/writeLocalServerToken.d.ts +2 -0
- package/dist/server/writeLocalServerToken.d.ts.map +1 -0
- package/dist/server/writeLocalServerToken.js +11 -0
- package/dist/tools/Agent.d.ts +9 -0
- package/dist/tools/Agent.d.ts.map +1 -0
- package/dist/tools/Agent.js +49 -0
- package/dist/tools/claude/Bash.d.ts +12 -0
- package/dist/tools/claude/Bash.d.ts.map +1 -0
- package/dist/tools/claude/Bash.js +30 -0
- package/dist/tools/claude/Edit.d.ts +13 -0
- package/dist/tools/claude/Edit.d.ts.map +1 -0
- package/dist/tools/claude/Edit.js +44 -0
- package/dist/tools/claude/Glob.d.ts +7 -0
- package/dist/tools/claude/Glob.d.ts.map +1 -0
- package/dist/tools/claude/Glob.js +36 -0
- package/dist/tools/claude/Grep.d.ts +19 -0
- package/dist/tools/claude/Grep.d.ts.map +1 -0
- package/dist/tools/claude/Grep.js +103 -0
- package/dist/tools/claude/Read.d.ts +18 -0
- package/dist/tools/claude/Read.d.ts.map +1 -0
- package/dist/tools/claude/Read.js +84 -0
- package/dist/tools/claude/TodoWrite.d.ts +10 -0
- package/dist/tools/claude/TodoWrite.d.ts.map +1 -0
- package/dist/tools/claude/TodoWrite.js +27 -0
- package/dist/tools/claude/WebFetch.d.ts +29 -0
- package/dist/tools/claude/WebFetch.d.ts.map +1 -0
- package/dist/tools/claude/WebFetch.js +114 -0
- package/dist/tools/claude/WebSearch.d.ts +35 -0
- package/dist/tools/claude/WebSearch.d.ts.map +1 -0
- package/dist/tools/claude/WebSearch.js +83 -0
- package/dist/tools/claude/Write.d.ts +7 -0
- package/dist/tools/claude/Write.d.ts.map +1 -0
- package/dist/tools/claude/Write.js +32 -0
- package/dist/tools/claude/index.d.ts +107 -0
- package/dist/tools/claude/index.d.ts.map +1 -0
- package/dist/tools/claude/index.js +29 -0
- package/dist/tools/claude/webFetch/applyPromptToMarkdown.d.ts +3 -0
- package/dist/tools/claude/webFetch/applyPromptToMarkdown.d.ts.map +1 -0
- package/dist/tools/claude/webFetch/applyPromptToMarkdown.js +21 -0
- package/dist/tools/claude/webFetch/cache.d.ts +6 -0
- package/dist/tools/claude/webFetch/cache.d.ts.map +1 -0
- package/dist/tools/claude/webFetch/cache.js +15 -0
- package/dist/tools/claude/webFetch/checkWebFetchDomain.d.ts +2 -0
- package/dist/tools/claude/webFetch/checkWebFetchDomain.d.ts.map +1 -0
- package/dist/tools/claude/webFetch/checkWebFetchDomain.js +29 -0
- package/dist/tools/claude/webFetch/createTimedSignal.d.ts +6 -0
- package/dist/tools/claude/webFetch/createTimedSignal.d.ts.map +1 -0
- package/dist/tools/claude/webFetch/createTimedSignal.js +18 -0
- package/dist/tools/claude/webFetch/getTurndownService.d.ts +3 -0
- package/dist/tools/claude/webFetch/getTurndownService.d.ts.map +1 -0
- package/dist/tools/claude/webFetch/getTurndownService.js +5 -0
- package/dist/tools/claude/webFetch/getUrlMarkdownContent.d.ts +3 -0
- package/dist/tools/claude/webFetch/getUrlMarkdownContent.d.ts.map +1 -0
- package/dist/tools/claude/webFetch/getUrlMarkdownContent.js +46 -0
- package/dist/tools/claude/webFetch/getWithPermittedRedirects.d.ts +7 -0
- package/dist/tools/claude/webFetch/getWithPermittedRedirects.d.ts.map +1 -0
- package/dist/tools/claude/webFetch/getWithPermittedRedirects.js +50 -0
- package/dist/tools/claude/webFetch/isBinaryContentType.d.ts +2 -0
- package/dist/tools/claude/webFetch/isBinaryContentType.d.ts.map +1 -0
- package/dist/tools/claude/webFetch/isBinaryContentType.js +15 -0
- package/dist/tools/claude/webFetch/isPermittedWebFetchRedirect.d.ts +2 -0
- package/dist/tools/claude/webFetch/isPermittedWebFetchRedirect.d.ts.map +1 -0
- package/dist/tools/claude/webFetch/isPermittedWebFetchRedirect.js +18 -0
- package/dist/tools/claude/webFetch/isPreapprovedWebFetchUrl.d.ts +2 -0
- package/dist/tools/claude/webFetch/isPreapprovedWebFetchUrl.d.ts.map +1 -0
- package/dist/tools/claude/webFetch/isPreapprovedWebFetchUrl.js +111 -0
- package/dist/tools/claude/webFetch/makeWebFetchModelPrompt.d.ts +2 -0
- package/dist/tools/claude/webFetch/makeWebFetchModelPrompt.d.ts.map +1 -0
- package/dist/tools/claude/webFetch/makeWebFetchModelPrompt.js +17 -0
- package/dist/tools/claude/webFetch/persistWebFetchBinary.d.ts +2 -0
- package/dist/tools/claude/webFetch/persistWebFetchBinary.d.ts.map +1 -0
- package/dist/tools/claude/webFetch/persistWebFetchBinary.js +29 -0
- package/dist/tools/claude/webFetch/readWebFetchResponse.d.ts +2 -0
- package/dist/tools/claude/webFetch/readWebFetchResponse.d.ts.map +1 -0
- package/dist/tools/claude/webFetch/readWebFetchResponse.js +26 -0
- package/dist/tools/claude/webFetch/types.d.ts +17 -0
- package/dist/tools/claude/webFetch/types.d.ts.map +1 -0
- package/dist/tools/claude/webFetch/types.js +1 -0
- package/dist/tools/claude/webFetch/validateWebFetchUrl.d.ts +2 -0
- package/dist/tools/claude/webFetch/validateWebFetchUrl.d.ts.map +1 -0
- package/dist/tools/claude/webFetch/validateWebFetchUrl.js +19 -0
- package/dist/tools/claude/webSearch/formatWebSearchOutput.d.ts +3 -0
- package/dist/tools/claude/webSearch/formatWebSearchOutput.d.ts.map +1 -0
- package/dist/tools/claude/webSearch/formatWebSearchOutput.js +17 -0
- package/dist/tools/claude/webSearch/makeWebSearchOutput.d.ts +4 -0
- package/dist/tools/claude/webSearch/makeWebSearchOutput.d.ts.map +1 -0
- package/dist/tools/claude/webSearch/makeWebSearchOutput.js +40 -0
- package/dist/tools/claude/webSearch/performWebSearch.d.ts +3 -0
- package/dist/tools/claude/webSearch/performWebSearch.d.ts.map +1 -0
- package/dist/tools/claude/webSearch/performWebSearch.js +32 -0
- package/dist/tools/claude/webSearch/types.d.ts +19 -0
- package/dist/tools/claude/webSearch/types.d.ts.map +1 -0
- package/dist/tools/claude/webSearch/types.js +1 -0
- package/dist/tools/codex/apply_patch.d.ts +7 -0
- package/dist/tools/codex/apply_patch.d.ts.map +1 -0
- package/dist/tools/codex/apply_patch.js +24 -0
- package/dist/tools/codex/exec_command.d.ts +15 -0
- package/dist/tools/codex/exec_command.d.ts.map +1 -0
- package/dist/tools/codex/exec_command.js +45 -0
- package/dist/tools/codex/index.d.ts +37 -0
- package/dist/tools/codex/index.d.ts.map +1 -0
- package/dist/tools/codex/index.js +14 -0
- package/dist/tools/codex/view_image.d.ts +8 -0
- package/dist/tools/codex/view_image.d.ts.map +1 -0
- package/dist/tools/codex/view_image.js +64 -0
- package/dist/tools/codex/write_stdin.d.ts +9 -0
- package/dist/tools/codex/write_stdin.d.ts.map +1 -0
- package/dist/tools/codex/write_stdin.js +29 -0
- package/dist/tools/index.d.ts +6 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +5 -0
- package/dist/tools/pi/bash.d.ts +7 -0
- package/dist/tools/pi/bash.d.ts.map +1 -0
- package/dist/tools/pi/bash.js +31 -0
- package/dist/tools/pi/edit.d.ts +14 -0
- package/dist/tools/pi/edit.d.ts.map +1 -0
- package/dist/tools/pi/edit.js +73 -0
- package/dist/tools/pi/find.d.ts +8 -0
- package/dist/tools/pi/find.d.ts.map +1 -0
- package/dist/tools/pi/find.js +32 -0
- package/dist/tools/pi/grep.d.ts +12 -0
- package/dist/tools/pi/grep.d.ts.map +1 -0
- package/dist/tools/pi/grep.js +55 -0
- package/dist/tools/pi/index.d.ts +65 -0
- package/dist/tools/pi/index.d.ts.map +1 -0
- package/dist/tools/pi/index.js +23 -0
- package/dist/tools/pi/ls.d.ts +7 -0
- package/dist/tools/pi/ls.d.ts.map +1 -0
- package/dist/tools/pi/ls.js +31 -0
- package/dist/tools/pi/read.d.ts +13 -0
- package/dist/tools/pi/read.d.ts.map +1 -0
- package/dist/tools/pi/read.js +32 -0
- package/dist/tools/pi/write.d.ts +9 -0
- package/dist/tools/pi/write.d.ts.map +1 -0
- package/dist/tools/pi/write.js +22 -0
- package/dist/tools/testing/createJustBashToolHarness.d.ts +18 -0
- package/dist/tools/testing/createJustBashToolHarness.d.ts.map +1 -0
- package/dist/tools/testing/createJustBashToolHarness.js +33 -0
- package/dist/tools/testing/validImageFixtures.d.ts +7 -0
- package/dist/tools/testing/validImageFixtures.d.ts.map +1 -0
- package/dist/tools/testing/validImageFixtures.js +6 -0
- package/dist/tools/utils/ImageProcessingError.d.ts +4 -0
- package/dist/tools/utils/ImageProcessingError.d.ts.map +1 -0
- package/dist/tools/utils/ImageProcessingError.js +6 -0
- package/dist/tools/utils/content.d.ts +11 -0
- package/dist/tools/utils/content.d.ts.map +1 -0
- package/dist/tools/utils/content.js +24 -0
- package/dist/tools/utils/countTextLines.d.ts +2 -0
- package/dist/tools/utils/countTextLines.d.ts.map +1 -0
- package/dist/tools/utils/countTextLines.js +6 -0
- package/dist/tools/utils/file.d.ts +90 -0
- package/dist/tools/utils/file.d.ts.map +1 -0
- package/dist/tools/utils/file.js +331 -0
- package/dist/tools/utils/getImageProcessor.d.ts +3 -0
- package/dist/tools/utils/getImageProcessor.d.ts.map +1 -0
- package/dist/tools/utils/getImageProcessor.js +9 -0
- package/dist/tools/utils/image.d.ts +2 -0
- package/dist/tools/utils/image.d.ts.map +1 -0
- package/dist/tools/utils/image.js +15 -0
- package/dist/tools/utils/index.d.ts +17 -0
- package/dist/tools/utils/index.d.ts.map +1 -0
- package/dist/tools/utils/index.js +16 -0
- package/dist/tools/utils/patch.d.ts +7 -0
- package/dist/tools/utils/patch.d.ts.map +1 -0
- package/dist/tools/utils/patch.js +107 -0
- package/dist/tools/utils/path.d.ts +4 -0
- package/dist/tools/utils/path.d.ts.map +1 -0
- package/dist/tools/utils/path.js +17 -0
- package/dist/tools/utils/prepareImageForClaude.d.ts +7 -0
- package/dist/tools/utils/prepareImageForClaude.d.ts.map +1 -0
- package/dist/tools/utils/prepareImageForClaude.js +195 -0
- package/dist/tools/utils/prepareImageForPrompt.d.ts +12 -0
- package/dist/tools/utils/prepareImageForPrompt.d.ts.map +1 -0
- package/dist/tools/utils/prepareImageForPrompt.js +100 -0
- package/dist/tools/utils/promptImageOutputDimensions.d.ts +10 -0
- package/dist/tools/utils/promptImageOutputDimensions.d.ts.map +1 -0
- package/dist/tools/utils/promptImageOutputDimensions.js +26 -0
- package/dist/tools/utils/search.d.ts +34 -0
- package/dist/tools/utils/search.d.ts.map +1 -0
- package/dist/tools/utils/search.js +133 -0
- package/dist/tools/utils/shell.d.ts +27 -0
- package/dist/tools/utils/shell.d.ts.map +1 -0
- package/dist/tools/utils/shell.js +48 -0
- package/dist/tools/utils/singleLineText.d.ts +2 -0
- package/dist/tools/utils/singleLineText.d.ts.map +1 -0
- package/dist/tools/utils/singleLineText.js +3 -0
- package/dist/tools/utils/summarizeShellOutput.d.ts +4 -0
- package/dist/tools/utils/summarizeShellOutput.d.ts.map +1 -0
- package/dist/tools/utils/summarizeShellOutput.js +11 -0
- package/dist/tools/utils/summarizeTextOutput.d.ts +2 -0
- package/dist/tools/utils/summarizeTextOutput.d.ts.map +1 -0
- package/dist/tools/utils/summarizeTextOutput.js +12 -0
- package/dist/web/assets/abap-BdImnpbu.js +1 -0
- package/dist/web/assets/actionscript-3-CoDkCxhg.js +1 -0
- package/dist/web/assets/ada-bCR0ucgS.js +1 -0
- package/dist/web/assets/andromeeda-C4gqWexZ.js +1 -0
- package/dist/web/assets/angular-html-DA-rfuFy.js +1 -0
- package/dist/web/assets/angular-ts-BrjP3tb8.js +1 -0
- package/dist/web/assets/apache-Pmp26Uib.js +1 -0
- package/dist/web/assets/apex-Dqspr-GT.js +1 -0
- package/dist/web/assets/apl-CORt7UWP.js +1 -0
- package/dist/web/assets/applescript-Co6uUVPk.js +1 -0
- package/dist/web/assets/ara-BRHolxvo.js +1 -0
- package/dist/web/assets/asciidoc-Ve4PFQV2.js +1 -0
- package/dist/web/assets/asm-D_Q5rh1f.js +1 -0
- package/dist/web/assets/astro-HNnZUWAn.js +1 -0
- package/dist/web/assets/aurora-x-D-2ljcwZ.js +1 -0
- package/dist/web/assets/awk-DMzUqQB5.js +1 -0
- package/dist/web/assets/ayu-dark-DYE7WIF3.js +1 -0
- package/dist/web/assets/ayu-light-BA47KaF1.js +1 -0
- package/dist/web/assets/ayu-mirage-32ctXXKs.js +1 -0
- package/dist/web/assets/ballerina-BFfxhgS-.js +1 -0
- package/dist/web/assets/bat-BkioyH1T.js +1 -0
- package/dist/web/assets/beancount-k_qm7-4y.js +1 -0
- package/dist/web/assets/berry-uYugtg8r.js +1 -0
- package/dist/web/assets/bibtex-CHM0blh-.js +1 -0
- package/dist/web/assets/bicep-Bmn6On1c.js +1 -0
- package/dist/web/assets/bird2-BIv1doCn.js +1 -0
- package/dist/web/assets/blade-2xfisSek.js +1 -0
- package/dist/web/assets/bsl-BO_Y6i37.js +1 -0
- package/dist/web/assets/c-BIGW1oBm.js +1 -0
- package/dist/web/assets/c3-MRO5bC_T.js +1 -0
- package/dist/web/assets/cadence-Bv_4Rxtq.js +1 -0
- package/dist/web/assets/cairo-KRGpt6FW.js +1 -0
- package/dist/web/assets/catppuccin-frappe-DFWUc33u.js +1 -0
- package/dist/web/assets/catppuccin-latte-C9dUb6Cb.js +1 -0
- package/dist/web/assets/catppuccin-macchiato-DQyhUUbL.js +1 -0
- package/dist/web/assets/catppuccin-mocha-D87Tk5Gz.js +1 -0
- package/dist/web/assets/clarity-D53aC0YG.js +1 -0
- package/dist/web/assets/clojure-P80f7IUj.js +1 -0
- package/dist/web/assets/cmake-D1j8_8rp.js +1 -0
- package/dist/web/assets/cobol-nBiQ_Alo.js +1 -0
- package/dist/web/assets/codeowners-Bp6g37R7.js +1 -0
- package/dist/web/assets/codeql-DsOJ9woJ.js +1 -0
- package/dist/web/assets/coffee-Ch7k5sss.js +1 -0
- package/dist/web/assets/common-lisp-Cg-RD9OK.js +1 -0
- package/dist/web/assets/coq-DkFqJrB1.js +1 -0
- package/dist/web/assets/cpp-UfJy6YNI.js +1 -0
- package/dist/web/assets/crystal-DGywbUpC.js +1 -0
- package/dist/web/assets/csharp-DSvCPggb.js +1 -0
- package/dist/web/assets/css-CLj8gQPS.js +1 -0
- package/dist/web/assets/csv-fuZLfV_i.js +1 -0
- package/dist/web/assets/cue-D82EKSYY.js +1 -0
- package/dist/web/assets/cypher-COkxafJQ.js +1 -0
- package/dist/web/assets/d-85-TOEBH.js +1 -0
- package/dist/web/assets/dark-plus-C3mMm8J8.js +1 -0
- package/dist/web/assets/dart-bE4Kk8sk.js +1 -0
- package/dist/web/assets/dax-CEL-wOlO.js +1 -0
- package/dist/web/assets/desktop-BmXAJ9_W.js +1 -0
- package/dist/web/assets/diff-D97Zzqfu.js +1 -0
- package/dist/web/assets/docker-BcOcwvcX.js +1 -0
- package/dist/web/assets/dotenv-Da5cRb03.js +1 -0
- package/dist/web/assets/dracula-BzJJZx-M.js +1 -0
- package/dist/web/assets/dracula-soft-BXkSAIEj.js +1 -0
- package/dist/web/assets/dream-maker-BtqSS_iP.js +1 -0
- package/dist/web/assets/edge-FbVlp4U3.js +1 -0
- package/dist/web/assets/elixir-CkH2-t6x.js +1 -0
- package/dist/web/assets/elm-DbKCFpqz.js +1 -0
- package/dist/web/assets/emacs-lisp-CXvaQtF9.js +1 -0
- package/dist/web/assets/erb-Dm6A9KJ5.js +1 -0
- package/dist/web/assets/erlang-DsQrWhSR.js +1 -0
- package/dist/web/assets/everforest-dark-BgDCqdQA.js +1 -0
- package/dist/web/assets/everforest-light-C8M2exoo.js +1 -0
- package/dist/web/assets/fennel-BYunw83y.js +1 -0
- package/dist/web/assets/fish-BvzEVeQv.js +1 -0
- package/dist/web/assets/fluent-C4IJs8-o.js +1 -0
- package/dist/web/assets/fortran-fixed-form-CkoXwp7k.js +1 -0
- package/dist/web/assets/fortran-free-form-BxgE0vQu.js +1 -0
- package/dist/web/assets/fsharp-CXgrBDvD.js +1 -0
- package/dist/web/assets/gdresource-BOOCDP_w.js +1 -0
- package/dist/web/assets/gdscript-C5YyOfLZ.js +1 -0
- package/dist/web/assets/gdshader-DkwncUOv.js +1 -0
- package/dist/web/assets/genie-D0YGMca9.js +1 -0
- package/dist/web/assets/gherkin-DyxjwDmM.js +1 -0
- package/dist/web/assets/git-commit-F4YmCXRG.js +1 -0
- package/dist/web/assets/git-rebase-r7XF79zn.js +1 -0
- package/dist/web/assets/github-dark-DHJKELXO.js +1 -0
- package/dist/web/assets/github-dark-default-Cuk6v7N8.js +1 -0
- package/dist/web/assets/github-dark-dimmed-DH5Ifo-i.js +1 -0
- package/dist/web/assets/github-dark-high-contrast-E3gJ1_iC.js +1 -0
- package/dist/web/assets/github-light-DAi9KRSo.js +1 -0
- package/dist/web/assets/github-light-default-D7oLnXFd.js +1 -0
- package/dist/web/assets/github-light-high-contrast-BfjtVDDH.js +1 -0
- package/dist/web/assets/gleam-BspZqrRM.js +1 -0
- package/dist/web/assets/glimmer-js-ByusRIyA.js +1 -0
- package/dist/web/assets/glimmer-ts-BfAWNZQY.js +1 -0
- package/dist/web/assets/glsl-DplSGwfg.js +1 -0
- package/dist/web/assets/gn-n2N0HUVH.js +1 -0
- package/dist/web/assets/gnuplot-DdkO51Og.js +1 -0
- package/dist/web/assets/go-C27-OAKa.js +1 -0
- package/dist/web/assets/graphql-ChdNCCLP.js +1 -0
- package/dist/web/assets/groovy-gcz8RCvz.js +1 -0
- package/dist/web/assets/gruvbox-dark-hard-CFHQjOhq.js +1 -0
- package/dist/web/assets/gruvbox-dark-medium-GsRaNv29.js +1 -0
- package/dist/web/assets/gruvbox-dark-soft-CVdnzihN.js +1 -0
- package/dist/web/assets/gruvbox-light-hard-CH1njM8p.js +1 -0
- package/dist/web/assets/gruvbox-light-medium-DRw_LuNl.js +1 -0
- package/dist/web/assets/gruvbox-light-soft-hJgmCMqR.js +1 -0
- package/dist/web/assets/hack-DbPARsA_.js +1 -0
- package/dist/web/assets/haml-D5jkg6IW.js +1 -0
- package/dist/web/assets/handlebars-BpdQsYii.js +1 -0
- package/dist/web/assets/haskell-Df6bDoY_.js +1 -0
- package/dist/web/assets/haxe-CzTSHFRz.js +1 -0
- package/dist/web/assets/hcl-BWvSN4gD.js +1 -0
- package/dist/web/assets/highlighted-body-OFNGDK62-CyimQElG.js +1 -0
- package/dist/web/assets/hjson-D5-asLiD.js +1 -0
- package/dist/web/assets/hlsl-D3lLCCz7.js +1 -0
- package/dist/web/assets/horizon-BUw7H-hv.js +1 -0
- package/dist/web/assets/horizon-bright-CUuTKBJd.js +1 -0
- package/dist/web/assets/houston-DnULxvSX.js +1 -0
- package/dist/web/assets/html-derivative-DlHx6ybY.js +1 -0
- package/dist/web/assets/html-pp8916En.js +1 -0
- package/dist/web/assets/http-jrhK8wxY.js +1 -0
- package/dist/web/assets/hurl-irOxFIW8.js +1 -0
- package/dist/web/assets/hxml-Bvhsp5Yf.js +1 -0
- package/dist/web/assets/hy-DFXneXwc.js +1 -0
- package/dist/web/assets/imba-DGztddWO.js +1 -0
- package/dist/web/assets/index-D5rSlaXz.js +341 -0
- package/dist/web/assets/index-YIUxhOuk.css +1 -0
- package/dist/web/assets/ini-BEwlwnbL.js +1 -0
- package/dist/web/assets/java-CylS5w8V.js +1 -0
- package/dist/web/assets/javascript-wDzz0qaB.js +1 -0
- package/dist/web/assets/jinja-f2NsQr07.js +1 -0
- package/dist/web/assets/jison-wvAkD_A8.js +1 -0
- package/dist/web/assets/json-Cp-IABpG.js +1 -0
- package/dist/web/assets/json5-C9tS-k6U.js +1 -0
- package/dist/web/assets/jsonc-Des-eS-w.js +1 -0
- package/dist/web/assets/jsonl-DcaNXYhu.js +1 -0
- package/dist/web/assets/jsonnet-DFQXde-d.js +1 -0
- package/dist/web/assets/jssm-C2t-YnRu.js +1 -0
- package/dist/web/assets/jsx-g9-lgVsj.js +1 -0
- package/dist/web/assets/julia-D7OTSIA_.js +1 -0
- package/dist/web/assets/just-CUsbIsdP.js +1 -0
- package/dist/web/assets/kanagawa-dragon-CkXjmgJE.js +1 -0
- package/dist/web/assets/kanagawa-lotus-CfQXZHmo.js +1 -0
- package/dist/web/assets/kanagawa-wave-DWedfzmr.js +1 -0
- package/dist/web/assets/kdl-DV7GczEv.js +1 -0
- package/dist/web/assets/kotlin-BdnUsdx6.js +1 -0
- package/dist/web/assets/kusto-wEQ09or8.js +1 -0
- package/dist/web/assets/laserwave-DUszq2jm.js +1 -0
- package/dist/web/assets/latex-CaSxy8MP.js +1 -0
- package/dist/web/assets/lean-BZvkOJ9d.js +1 -0
- package/dist/web/assets/less-B1dDrJ26.js +1 -0
- package/dist/web/assets/light-plus-B7mTdjB0.js +1 -0
- package/dist/web/assets/liquid-C0sCDyMI.js +1 -0
- package/dist/web/assets/llvm-DjAJT7YJ.js +1 -0
- package/dist/web/assets/log-2UxHyX5q.js +1 -0
- package/dist/web/assets/logo-BtOb2qkB.js +1 -0
- package/dist/web/assets/lua-BaeVxFsk.js +1 -0
- package/dist/web/assets/luau-KW6xsasC.js +1 -0
- package/dist/web/assets/make-CHLpvVh8.js +1 -0
- package/dist/web/assets/markdown-Cvjx9yec.js +1 -0
- package/dist/web/assets/marko-DjSrsDqO.js +1 -0
- package/dist/web/assets/material-theme-D5KoaKCx.js +1 -0
- package/dist/web/assets/material-theme-darker-BfHTSMKl.js +1 -0
- package/dist/web/assets/material-theme-lighter-B0m2ddpp.js +1 -0
- package/dist/web/assets/material-theme-ocean-CyktbL80.js +1 -0
- package/dist/web/assets/material-theme-palenight-Csfq5Kiy.js +1 -0
- package/dist/web/assets/matlab-D7o27uSR.js +1 -0
- package/dist/web/assets/mdc-DTYItulj.js +1 -0
- package/dist/web/assets/mdx-Cmh6b_Ma.js +1 -0
- package/dist/web/assets/mermaid-mWjccvbQ.js +1 -0
- package/dist/web/assets/min-dark-CafNBF8u.js +1 -0
- package/dist/web/assets/min-light-CTRr51gU.js +1 -0
- package/dist/web/assets/mipsasm-CKIfxQSi.js +1 -0
- package/dist/web/assets/mojo-rZm6bMo-.js +1 -0
- package/dist/web/assets/monokai-D4h5O-jR.js +1 -0
- package/dist/web/assets/moonbit-_H4v1dQx.js +1 -0
- package/dist/web/assets/move-IF9eRakj.js +1 -0
- package/dist/web/assets/narrat-DRg8JJMk.js +1 -0
- package/dist/web/assets/nextflow-C-mBbutL.js +1 -0
- package/dist/web/assets/nextflow-groovy-vE_lwT2v.js +1 -0
- package/dist/web/assets/nginx-BpAMiNFr.js +1 -0
- package/dist/web/assets/night-owl-C39BiMTA.js +1 -0
- package/dist/web/assets/night-owl-light-CMTm3GFP.js +1 -0
- package/dist/web/assets/nim-BIad80T-.js +1 -0
- package/dist/web/assets/nix-CwoSXNpI.js +1 -0
- package/dist/web/assets/nord-Ddv68eIx.js +1 -0
- package/dist/web/assets/nushell-Cz2AlsmD.js +1 -0
- package/dist/web/assets/objective-c-DXmwc3jG.js +1 -0
- package/dist/web/assets/objective-cpp-CLxacb5B.js +1 -0
- package/dist/web/assets/ocaml-C0hk2d4L.js +1 -0
- package/dist/web/assets/odin-BBf5iR-q.js +1 -0
- package/dist/web/assets/one-dark-pro-DVMEJ2y_.js +1 -0
- package/dist/web/assets/one-light-C3Wv6jpd.js +1 -0
- package/dist/web/assets/openscad-C4EeE6gA.js +1 -0
- package/dist/web/assets/pascal-D93ZcfNL.js +1 -0
- package/dist/web/assets/perl-B9cMNwum.js +1 -0
- package/dist/web/assets/php-Csjmro_R.js +1 -0
- package/dist/web/assets/pkl-u5AG7uiY.js +1 -0
- package/dist/web/assets/plastic-3e1v2bzS.js +1 -0
- package/dist/web/assets/plsql-ChMvpjG-.js +1 -0
- package/dist/web/assets/po-BTJTHyun.js +1 -0
- package/dist/web/assets/poimandres-CS3Unz2-.js +1 -0
- package/dist/web/assets/polar-C0HS_06l.js +1 -0
- package/dist/web/assets/postcss-CXtECtnM.js +1 -0
- package/dist/web/assets/powerquery-CEu0bR-o.js +1 -0
- package/dist/web/assets/powershell-Dpen1YoG.js +1 -0
- package/dist/web/assets/prisma-Dd19v3D-.js +1 -0
- package/dist/web/assets/prolog-CbFg5uaA.js +1 -0
- package/dist/web/assets/proto-C7zT0LnQ.js +1 -0
- package/dist/web/assets/pug-DKIMFp6K.js +1 -0
- package/dist/web/assets/puppet-BMWR74SV.js +1 -0
- package/dist/web/assets/purescript-CklMAg4u.js +1 -0
- package/dist/web/assets/python-B6aJPvgy.js +1 -0
- package/dist/web/assets/qml-3beO22l8.js +1 -0
- package/dist/web/assets/qmldir-C8lEn-DE.js +1 -0
- package/dist/web/assets/qss-IeuSbFQv.js +1 -0
- package/dist/web/assets/r-Dspwwk_N.js +1 -0
- package/dist/web/assets/racket-BqYA7rlc.js +1 -0
- package/dist/web/assets/raku-DXvB9xmW.js +1 -0
- package/dist/web/assets/razor-BjBPvh-w.js +1 -0
- package/dist/web/assets/red-bN70gL4F.js +1 -0
- package/dist/web/assets/reg-C-SQnVFl.js +1 -0
- package/dist/web/assets/regexp-CDVJQ6XC.js +1 -0
- package/dist/web/assets/rel-C3B-1QV4.js +1 -0
- package/dist/web/assets/riscv-BM1_JUlF.js +1 -0
- package/dist/web/assets/ron-D8l8udqQ.js +1 -0
- package/dist/web/assets/rose-pine-dawn-DHQR4-dF.js +1 -0
- package/dist/web/assets/rose-pine-moon-D4_iv3hh.js +1 -0
- package/dist/web/assets/rose-pine-qdsjHGoJ.js +1 -0
- package/dist/web/assets/rosmsg-BJDFO7_C.js +1 -0
- package/dist/web/assets/rst-CpCqk9r5.js +1 -0
- package/dist/web/assets/ruby-DyJCeAvU.js +1 -0
- package/dist/web/assets/rust-B1yitclQ.js +1 -0
- package/dist/web/assets/sas-DEy46yEz.js +1 -0
- package/dist/web/assets/sass-Cj5Yp3dK.js +1 -0
- package/dist/web/assets/scala-C151Ov-r.js +1 -0
- package/dist/web/assets/scheme-C98Dy4si.js +1 -0
- package/dist/web/assets/scss-D5BDwBP9.js +1 -0
- package/dist/web/assets/sdbl-DVxCFoDh.js +1 -0
- package/dist/web/assets/shaderlab-Dg9Lc6iA.js +1 -0
- package/dist/web/assets/shellscript-Yzrsuije.js +1 -0
- package/dist/web/assets/shellsession-BADoaaVG.js +1 -0
- package/dist/web/assets/slack-dark-BthQWCQV.js +1 -0
- package/dist/web/assets/slack-ochin-DqwNpetd.js +1 -0
- package/dist/web/assets/smalltalk-BERRCDM3.js +1 -0
- package/dist/web/assets/snazzy-light-Bw305WKR.js +1 -0
- package/dist/web/assets/solarized-dark-DXbdFlpD.js +1 -0
- package/dist/web/assets/solarized-light-L9t79GZl.js +1 -0
- package/dist/web/assets/solidity-rGO070M0.js +1 -0
- package/dist/web/assets/soy-8wufbnw4.js +1 -0
- package/dist/web/assets/sparql-rVzFXLq3.js +1 -0
- package/dist/web/assets/splunk-BtCnVYZw.js +1 -0
- package/dist/web/assets/sql-CRqJ_cUM.js +1 -0
- package/dist/web/assets/ssh-config-_ykCGR6B.js +1 -0
- package/dist/web/assets/stata-DI20mbqo.js +1 -0
- package/dist/web/assets/stylus-BEDo0Tqx.js +1 -0
- package/dist/web/assets/surrealql-Bq5Q-fJD.js +1 -0
- package/dist/web/assets/svelte-Cy7k_4gC.js +1 -0
- package/dist/web/assets/swift-D82vCrfD.js +1 -0
- package/dist/web/assets/synthwave-84-CbfX1IO0.js +1 -0
- package/dist/web/assets/system-verilog-CnnmHF94.js +1 -0
- package/dist/web/assets/systemd-4A_iFExJ.js +1 -0
- package/dist/web/assets/talonscript-CkByrt1z.js +1 -0
- package/dist/web/assets/tasl-QIJgUcNo.js +1 -0
- package/dist/web/assets/tcl-dwOrl1Do.js +1 -0
- package/dist/web/assets/templ-DhtptRzy.js +1 -0
- package/dist/web/assets/terraform-BETggiCN.js +1 -0
- package/dist/web/assets/tex-idrVyKtj.js +1 -0
- package/dist/web/assets/tokyo-night-hegEt444.js +1 -0
- package/dist/web/assets/toml-vGWfd6FD.js +1 -0
- package/dist/web/assets/ts-tags-D351s5mN.js +1 -0
- package/dist/web/assets/tsv-B_m7g4N7.js +1 -0
- package/dist/web/assets/tsx-COt5Ahok.js +1 -0
- package/dist/web/assets/turtle-BsS91CYL.js +1 -0
- package/dist/web/assets/twig-CW1WmMYd.js +1 -0
- package/dist/web/assets/typescript-BPQ3VLAy.js +1 -0
- package/dist/web/assets/typespec-CAFt9gP4.js +1 -0
- package/dist/web/assets/typst-DHCkPAjA.js +1 -0
- package/dist/web/assets/v-BcVCzyr7.js +1 -0
- package/dist/web/assets/vala-CsfeWuGM.js +1 -0
- package/dist/web/assets/vb-D17OF-Vu.js +1 -0
- package/dist/web/assets/verilog-BQ8w6xss.js +1 -0
- package/dist/web/assets/vesper-DRje8inN.js +1 -0
- package/dist/web/assets/vhdl-CeAyd5Ju.js +1 -0
- package/dist/web/assets/viml-CJc9bBzg.js +1 -0
- package/dist/web/assets/vitesse-black-Bkuqu6BP.js +1 -0
- package/dist/web/assets/vitesse-dark-D0r3Knsf.js +1 -0
- package/dist/web/assets/vitesse-light-CVO1_9PV.js +1 -0
- package/dist/web/assets/vue-D2xRrEX4.js +1 -0
- package/dist/web/assets/vue-html-AaS7Mt5G.js +1 -0
- package/dist/web/assets/vue-vine-BoDAl6tE.js +1 -0
- package/dist/web/assets/vyper-CDx5xZoG.js +1 -0
- package/dist/web/assets/wasm-CG6Dc4jp.js +1 -0
- package/dist/web/assets/wasm-MzD3tlZU.js +1 -0
- package/dist/web/assets/wenyan-BV7otONQ.js +1 -0
- package/dist/web/assets/wgsl-Dx-B1_4e.js +1 -0
- package/dist/web/assets/wikitext-BhOHFoWU.js +1 -0
- package/dist/web/assets/wit-5i3qLPDT.js +1 -0
- package/dist/web/assets/wolfram-lXgVvXCa.js +1 -0
- package/dist/web/assets/xml-sdJ4AIDG.js +1 -0
- package/dist/web/assets/xsl-CtQFsRM5.js +1 -0
- package/dist/web/assets/yaml-Buea-lGh.js +1 -0
- package/dist/web/assets/zenscript-DVFEvuxE.js +1 -0
- package/dist/web/assets/zig-VOosw3JB.js +1 -0
- package/dist/web/index.html +13 -0
- package/package.json +99 -0
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-DA-rfuFy.js","assets/html-pp8916En.js","assets/javascript-wDzz0qaB.js","assets/css-CLj8gQPS.js","assets/angular-ts-BrjP3tb8.js","assets/scss-D5BDwBP9.js","assets/apl-CORt7UWP.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/json-Cp-IABpG.js","assets/astro-HNnZUWAn.js","assets/typescript-BPQ3VLAy.js","assets/postcss-CXtECtnM.js","assets/tsx-COt5Ahok.js","assets/blade-2xfisSek.js","assets/html-derivative-DlHx6ybY.js","assets/sql-CRqJ_cUM.js","assets/bsl-BO_Y6i37.js","assets/sdbl-DVxCFoDh.js","assets/cairo-KRGpt6FW.js","assets/python-B6aJPvgy.js","assets/cobol-nBiQ_Alo.js","assets/coffee-Ch7k5sss.js","assets/cpp-UfJy6YNI.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/c-BIGW1oBm.js","assets/crystal-DGywbUpC.js","assets/shellscript-Yzrsuije.js","assets/edge-FbVlp4U3.js","assets/elixir-CkH2-t6x.js","assets/elm-DbKCFpqz.js","assets/erb-Dm6A9KJ5.js","assets/ruby-DyJCeAvU.js","assets/haml-D5jkg6IW.js","assets/graphql-ChdNCCLP.js","assets/jsx-g9-lgVsj.js","assets/lua-BaeVxFsk.js","assets/yaml-Buea-lGh.js","assets/erlang-DsQrWhSR.js","assets/markdown-Cvjx9yec.js","assets/fortran-fixed-form-CkoXwp7k.js","assets/fortran-free-form-BxgE0vQu.js","assets/fsharp-CXgrBDvD.js","assets/gdresource-BOOCDP_w.js","assets/gdshader-DkwncUOv.js","assets/gdscript-C5YyOfLZ.js","assets/git-commit-F4YmCXRG.js","assets/diff-D97Zzqfu.js","assets/git-rebase-r7XF79zn.js","assets/glimmer-js-ByusRIyA.js","assets/glimmer-ts-BfAWNZQY.js","assets/hack-DbPARsA_.js","assets/handlebars-BpdQsYii.js","assets/http-jrhK8wxY.js","assets/hurl-irOxFIW8.js","assets/csv-fuZLfV_i.js","assets/hxml-Bvhsp5Yf.js","assets/haxe-CzTSHFRz.js","assets/jinja-f2NsQr07.js","assets/jison-wvAkD_A8.js","assets/julia-D7OTSIA_.js","assets/r-Dspwwk_N.js","assets/just-CUsbIsdP.js","assets/perl-B9cMNwum.js","assets/latex-CaSxy8MP.js","assets/tex-idrVyKtj.js","assets/liquid-C0sCDyMI.js","assets/marko-DjSrsDqO.js","assets/less-B1dDrJ26.js","assets/mdc-DTYItulj.js","assets/nextflow-C-mBbutL.js","assets/nextflow-groovy-vE_lwT2v.js","assets/nginx-BpAMiNFr.js","assets/nim-BIad80T-.js","assets/php-Csjmro_R.js","assets/pug-DKIMFp6K.js","assets/qml-3beO22l8.js","assets/razor-BjBPvh-w.js","assets/csharp-DSvCPggb.js","assets/rst-CpCqk9r5.js","assets/cmake-D1j8_8rp.js","assets/sas-DEy46yEz.js","assets/shaderlab-Dg9Lc6iA.js","assets/hlsl-D3lLCCz7.js","assets/shellsession-BADoaaVG.js","assets/soy-8wufbnw4.js","assets/sparql-rVzFXLq3.js","assets/turtle-BsS91CYL.js","assets/stata-DI20mbqo.js","assets/surrealql-Bq5Q-fJD.js","assets/svelte-Cy7k_4gC.js","assets/templ-DhtptRzy.js","assets/go-C27-OAKa.js","assets/ts-tags-D351s5mN.js","assets/twig-CW1WmMYd.js","assets/vue-D2xRrEX4.js","assets/vue-html-AaS7Mt5G.js","assets/vue-vine-BoDAl6tE.js","assets/stylus-BEDo0Tqx.js","assets/xsl-CtQFsRM5.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
function qO(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();function og(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Zm={exports:{}},bl={};var K_;function YO(){if(K_)return bl;K_=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,o){var l=null;if(o!==void 0&&(l=""+o),i.key!==void 0&&(l=""+i.key),"key"in i){o={};for(var c in i)c!=="key"&&(o[c]=i[c])}else o=i;return i=o.ref,{$$typeof:e,type:r,key:l,ref:i!==void 0?i:null,props:o}}return bl.Fragment=t,bl.jsx=n,bl.jsxs=n,bl}var Z_;function XO(){return Z_||(Z_=1,Zm.exports=YO()),Zm.exports}var _=XO(),Jm={exports:{}},Me={};var J_;function QO(){if(J_)return Me;J_=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),E=Symbol.iterator;function y(z){return z===null||typeof z!="object"?null:(z=E&&z[E]||z["@@iterator"],typeof z=="function"?z:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,C={};function w(z,te,D){this.props=z,this.context=te,this.refs=C,this.updater=D||T}w.prototype.isReactComponent={},w.prototype.setState=function(z,te){if(typeof z!="object"&&typeof z!="function"&&z!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,z,te,"setState")},w.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};function k(){}k.prototype=w.prototype;function N(z,te,D){this.props=z,this.context=te,this.refs=C,this.updater=D||T}var M=N.prototype=new k;M.constructor=N,S(M,w.prototype),M.isPureReactComponent=!0;var U=Array.isArray;function P(){}var V={H:null,A:null,T:null,S:null},G=Object.prototype.hasOwnProperty;function ie(z,te,D){var ge=D.ref;return{$$typeof:e,type:z,key:te,ref:ge!==void 0?ge:null,props:D}}function $(z,te){return ie(z.type,te,z.props)}function X(z){return typeof z=="object"&&z!==null&&z.$$typeof===e}function J(z){var te={"=":"=0",":":"=2"};return"$"+z.replace(/[=:]/g,function(D){return te[D]})}var he=/\/+/g;function ue(z,te){return typeof z=="object"&&z!==null&&z.key!=null?J(""+z.key):te.toString(36)}function re(z){switch(z.status){case"fulfilled":return z.value;case"rejected":throw z.reason;default:switch(typeof z.status=="string"?z.then(P,P):(z.status="pending",z.then(function(te){z.status==="pending"&&(z.status="fulfilled",z.value=te)},function(te){z.status==="pending"&&(z.status="rejected",z.reason=te)})),z.status){case"fulfilled":return z.value;case"rejected":throw z.reason}}throw z}function j(z,te,D,ge,Ee){var ye=typeof z;(ye==="undefined"||ye==="boolean")&&(z=null);var be=!1;if(z===null)be=!0;else switch(ye){case"bigint":case"string":case"number":be=!0;break;case"object":switch(z.$$typeof){case e:case t:be=!0;break;case p:return be=z._init,j(be(z._payload),te,D,ge,Ee)}}if(be)return Ee=Ee(z),be=ge===""?"."+ue(z,0):ge,U(Ee)?(D="",be!=null&&(D=be.replace(he,"$&/")+"/"),j(Ee,te,D,"",function(De){return De})):Ee!=null&&(X(Ee)&&(Ee=$(Ee,D+(Ee.key==null||z&&z.key===Ee.key?"":(""+Ee.key).replace(he,"$&/")+"/")+be)),te.push(Ee)),1;be=0;var ke=ge===""?".":ge+":";if(U(z))for(var Te=0;Te<z.length;Te++)ge=z[Te],ye=ke+ue(ge,Te),be+=j(ge,te,D,ye,Ee);else if(Te=y(z),typeof Te=="function")for(z=Te.call(z),Te=0;!(ge=z.next()).done;)ge=ge.value,ye=ke+ue(ge,Te++),be+=j(ge,te,D,ye,Ee);else if(ye==="object"){if(typeof z.then=="function")return j(re(z),te,D,ge,Ee);throw te=String(z),Error("Objects are not valid as a React child (found: "+(te==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":te)+"). If you meant to render a collection of children, use an array instead.")}return be}function ee(z,te,D){if(z==null)return z;var ge=[],Ee=0;return j(z,ge,"","",function(ye){return te.call(D,ye,Ee++)}),ge}function ce(z){if(z._status===-1){var te=z._result;te=te(),te.then(function(D){(z._status===0||z._status===-1)&&(z._status=1,z._result=D)},function(D){(z._status===0||z._status===-1)&&(z._status=2,z._result=D)}),z._status===-1&&(z._status=0,z._result=te)}if(z._status===1)return z._result.default;throw z._result}var xe=typeof reportError=="function"?reportError:function(z){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var te=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof z=="object"&&z!==null&&typeof z.message=="string"?String(z.message):String(z),error:z});if(!window.dispatchEvent(te))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",z);return}console.error(z)},O={map:ee,forEach:function(z,te,D){ee(z,function(){te.apply(this,arguments)},D)},count:function(z){var te=0;return ee(z,function(){te++}),te},toArray:function(z){return ee(z,function(te){return te})||[]},only:function(z){if(!X(z))throw Error("React.Children.only expected to receive a single React element child.");return z}};return Me.Activity=m,Me.Children=O,Me.Component=w,Me.Fragment=n,Me.Profiler=i,Me.PureComponent=N,Me.StrictMode=r,Me.Suspense=f,Me.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=V,Me.__COMPILER_RUNTIME={__proto__:null,c:function(z){return V.H.useMemoCache(z)}},Me.cache=function(z){return function(){return z.apply(null,arguments)}},Me.cacheSignal=function(){return null},Me.cloneElement=function(z,te,D){if(z==null)throw Error("The argument must be a React element, but you passed "+z+".");var ge=S({},z.props),Ee=z.key;if(te!=null)for(ye in te.key!==void 0&&(Ee=""+te.key),te)!G.call(te,ye)||ye==="key"||ye==="__self"||ye==="__source"||ye==="ref"&&te.ref===void 0||(ge[ye]=te[ye]);var ye=arguments.length-2;if(ye===1)ge.children=D;else if(1<ye){for(var be=Array(ye),ke=0;ke<ye;ke++)be[ke]=arguments[ke+2];ge.children=be}return ie(z.type,Ee,ge)},Me.createContext=function(z){return z={$$typeof:l,_currentValue:z,_currentValue2:z,_threadCount:0,Provider:null,Consumer:null},z.Provider=z,z.Consumer={$$typeof:o,_context:z},z},Me.createElement=function(z,te,D){var ge,Ee={},ye=null;if(te!=null)for(ge in te.key!==void 0&&(ye=""+te.key),te)G.call(te,ge)&&ge!=="key"&&ge!=="__self"&&ge!=="__source"&&(Ee[ge]=te[ge]);var be=arguments.length-2;if(be===1)Ee.children=D;else if(1<be){for(var ke=Array(be),Te=0;Te<be;Te++)ke[Te]=arguments[Te+2];Ee.children=ke}if(z&&z.defaultProps)for(ge in be=z.defaultProps,be)Ee[ge]===void 0&&(Ee[ge]=be[ge]);return ie(z,ye,Ee)},Me.createRef=function(){return{current:null}},Me.forwardRef=function(z){return{$$typeof:c,render:z}},Me.isValidElement=X,Me.lazy=function(z){return{$$typeof:p,_payload:{_status:-1,_result:z},_init:ce}},Me.memo=function(z,te){return{$$typeof:h,type:z,compare:te===void 0?null:te}},Me.startTransition=function(z){var te=V.T,D={};V.T=D;try{var ge=z(),Ee=V.S;Ee!==null&&Ee(D,ge),typeof ge=="object"&&ge!==null&&typeof ge.then=="function"&&ge.then(P,xe)}catch(ye){xe(ye)}finally{te!==null&&D.types!==null&&(te.types=D.types),V.T=te}},Me.unstable_useCacheRefresh=function(){return V.H.useCacheRefresh()},Me.use=function(z){return V.H.use(z)},Me.useActionState=function(z,te,D){return V.H.useActionState(z,te,D)},Me.useCallback=function(z,te){return V.H.useCallback(z,te)},Me.useContext=function(z){return V.H.useContext(z)},Me.useDebugValue=function(){},Me.useDeferredValue=function(z,te){return V.H.useDeferredValue(z,te)},Me.useEffect=function(z,te){return V.H.useEffect(z,te)},Me.useEffectEvent=function(z){return V.H.useEffectEvent(z)},Me.useId=function(){return V.H.useId()},Me.useImperativeHandle=function(z,te,D){return V.H.useImperativeHandle(z,te,D)},Me.useInsertionEffect=function(z,te){return V.H.useInsertionEffect(z,te)},Me.useLayoutEffect=function(z,te){return V.H.useLayoutEffect(z,te)},Me.useMemo=function(z,te){return V.H.useMemo(z,te)},Me.useOptimistic=function(z,te){return V.H.useOptimistic(z,te)},Me.useReducer=function(z,te,D){return V.H.useReducer(z,te,D)},Me.useRef=function(z){return V.H.useRef(z)},Me.useState=function(z){return V.H.useState(z)},Me.useSyncExternalStore=function(z,te,D){return V.H.useSyncExternalStore(z,te,D)},Me.useTransition=function(){return V.H.useTransition()},Me.version="19.2.7",Me}var ex;function lg(){return ex||(ex=1,Jm.exports=QO()),Jm.exports}var v=lg();const WO=og(v),au=qO({__proto__:null,default:WO},[v]);var ep={exports:{}},El={},tp={exports:{}},np={};var tx;function KO(){return tx||(tx=1,(function(e){function t(j,ee){var ce=j.length;j.push(ee);e:for(;0<ce;){var xe=ce-1>>>1,O=j[xe];if(0<i(O,ee))j[xe]=ee,j[ce]=O,ce=xe;else break e}}function n(j){return j.length===0?null:j[0]}function r(j){if(j.length===0)return null;var ee=j[0],ce=j.pop();if(ce!==ee){j[0]=ce;e:for(var xe=0,O=j.length,z=O>>>1;xe<z;){var te=2*(xe+1)-1,D=j[te],ge=te+1,Ee=j[ge];if(0>i(D,ce))ge<O&&0>i(Ee,D)?(j[xe]=Ee,j[ge]=ce,xe=ge):(j[xe]=D,j[te]=ce,xe=te);else if(ge<O&&0>i(Ee,ce))j[xe]=Ee,j[ge]=ce,xe=ge;else break e}}return ee}function i(j,ee){var ce=j.sortIndex-ee.sortIndex;return ce!==0?ce:j.id-ee.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var f=[],h=[],p=1,m=null,E=3,y=!1,T=!1,S=!1,C=!1,w=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate<"u"?setImmediate:null;function M(j){for(var ee=n(h);ee!==null;){if(ee.callback===null)r(h);else if(ee.startTime<=j)r(h),ee.sortIndex=ee.expirationTime,t(f,ee);else break;ee=n(h)}}function U(j){if(S=!1,M(j),!T)if(n(f)!==null)T=!0,P||(P=!0,J());else{var ee=n(h);ee!==null&&re(U,ee.startTime-j)}}var P=!1,V=-1,G=5,ie=-1;function $(){return C?!0:!(e.unstable_now()-ie<G)}function X(){if(C=!1,P){var j=e.unstable_now();ie=j;var ee=!0;try{e:{T=!1,S&&(S=!1,k(V),V=-1),y=!0;var ce=E;try{t:{for(M(j),m=n(f);m!==null&&!(m.expirationTime>j&&$());){var xe=m.callback;if(typeof xe=="function"){m.callback=null,E=m.priorityLevel;var O=xe(m.expirationTime<=j);if(j=e.unstable_now(),typeof O=="function"){m.callback=O,M(j),ee=!0;break t}m===n(f)&&r(f),M(j)}else r(f);m=n(f)}if(m!==null)ee=!0;else{var z=n(h);z!==null&&re(U,z.startTime-j),ee=!1}}break e}finally{m=null,E=ce,y=!1}ee=void 0}}finally{ee?J():P=!1}}}var J;if(typeof N=="function")J=function(){N(X)};else if(typeof MessageChannel<"u"){var he=new MessageChannel,ue=he.port2;he.port1.onmessage=X,J=function(){ue.postMessage(null)}}else J=function(){w(X,0)};function re(j,ee){V=w(function(){j(e.unstable_now())},ee)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(j){j.callback=null},e.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):G=0<j?Math.floor(1e3/j):5},e.unstable_getCurrentPriorityLevel=function(){return E},e.unstable_next=function(j){switch(E){case 1:case 2:case 3:var ee=3;break;default:ee=E}var ce=E;E=ee;try{return j()}finally{E=ce}},e.unstable_requestPaint=function(){C=!0},e.unstable_runWithPriority=function(j,ee){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var ce=E;E=j;try{return ee()}finally{E=ce}},e.unstable_scheduleCallback=function(j,ee,ce){var xe=e.unstable_now();switch(typeof ce=="object"&&ce!==null?(ce=ce.delay,ce=typeof ce=="number"&&0<ce?xe+ce:xe):ce=xe,j){case 1:var O=-1;break;case 2:O=250;break;case 5:O=1073741823;break;case 4:O=1e4;break;default:O=5e3}return O=ce+O,j={id:p++,callback:ee,priorityLevel:j,startTime:ce,expirationTime:O,sortIndex:-1},ce>xe?(j.sortIndex=ce,t(h,j),n(f)===null&&j===n(h)&&(S?(k(V),V=-1):S=!0,re(U,ce-xe))):(j.sortIndex=O,t(f,j),T||y||(T=!0,P||(P=!0,J()))),j},e.unstable_shouldYield=$,e.unstable_wrapCallback=function(j){var ee=E;return function(){var ce=E;E=ee;try{return j.apply(this,arguments)}finally{E=ce}}}})(np)),np}var nx;function ZO(){return nx||(nx=1,tp.exports=KO()),tp.exports}var rp={exports:{}},rn={};var rx;function JO(){if(rx)return rn;rx=1;var e=lg();function t(f){var h="https://react.dev/errors/"+f;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)h+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+f+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},i=Symbol.for("react.portal");function o(f,h,p){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:m==null?null:""+m,children:f,containerInfo:h,implementation:p}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(f,h){if(f==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return rn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,rn.createPortal=function(f,h){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return o(f,h,null,p)},rn.flushSync=function(f){var h=l.T,p=r.p;try{if(l.T=null,r.p=2,f)return f()}finally{l.T=h,r.p=p,r.d.f()}},rn.preconnect=function(f,h){typeof f=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,r.d.C(f,h))},rn.prefetchDNS=function(f){typeof f=="string"&&r.d.D(f)},rn.preinit=function(f,h){if(typeof f=="string"&&h&&typeof h.as=="string"){var p=h.as,m=c(p,h.crossOrigin),E=typeof h.integrity=="string"?h.integrity:void 0,y=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;p==="style"?r.d.S(f,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:m,integrity:E,fetchPriority:y}):p==="script"&&r.d.X(f,{crossOrigin:m,integrity:E,fetchPriority:y,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},rn.preinitModule=function(f,h){if(typeof f=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var p=c(h.as,h.crossOrigin);r.d.M(f,{crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&r.d.M(f)},rn.preload=function(f,h){if(typeof f=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var p=h.as,m=c(p,h.crossOrigin);r.d.L(f,p,{crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},rn.preloadModule=function(f,h){if(typeof f=="string")if(h){var p=c(h.as,h.crossOrigin);r.d.m(f,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else r.d.m(f)},rn.requestFormReset=function(f){r.d.r(f)},rn.unstable_batchedUpdates=function(f,h){return f(h)},rn.useFormState=function(f,h,p){return l.H.useFormState(f,h,p)},rn.useFormStatus=function(){return l.H.useHostTransitionStatus()},rn.version="19.2.7",rn}var ax;function R2(){if(ax)return rp.exports;ax=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),rp.exports=JO(),rp.exports}var ix;function eL(){if(ix)return El;ix=1;var e=ZO(),t=lg(),n=R2();function r(a){var s="https://react.dev/errors/"+a;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)s+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+a+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function o(a){var s=a,u=a;if(a.alternate)for(;s.return;)s=s.return;else{a=s;do s=a,(s.flags&4098)!==0&&(u=s.return),a=s.return;while(a)}return s.tag===3?u:null}function l(a){if(a.tag===13){var s=a.memoizedState;if(s===null&&(a=a.alternate,a!==null&&(s=a.memoizedState)),s!==null)return s.dehydrated}return null}function c(a){if(a.tag===31){var s=a.memoizedState;if(s===null&&(a=a.alternate,a!==null&&(s=a.memoizedState)),s!==null)return s.dehydrated}return null}function f(a){if(o(a)!==a)throw Error(r(188))}function h(a){var s=a.alternate;if(!s){if(s=o(a),s===null)throw Error(r(188));return s!==a?null:a}for(var u=a,d=s;;){var g=u.return;if(g===null)break;var b=g.alternate;if(b===null){if(d=g.return,d!==null){u=d;continue}break}if(g.child===b.child){for(b=g.child;b;){if(b===u)return f(g),a;if(b===d)return f(g),s;b=b.sibling}throw Error(r(188))}if(u.return!==d.return)u=g,d=b;else{for(var A=!1,R=g.child;R;){if(R===u){A=!0,u=g,d=b;break}if(R===d){A=!0,d=g,u=b;break}R=R.sibling}if(!A){for(R=b.child;R;){if(R===u){A=!0,u=b,d=g;break}if(R===d){A=!0,d=b,u=g;break}R=R.sibling}if(!A)throw Error(r(189))}}if(u.alternate!==d)throw Error(r(190))}if(u.tag!==3)throw Error(r(188));return u.stateNode.current===u?a:s}function p(a){var s=a.tag;if(s===5||s===26||s===27||s===6)return a;for(a=a.child;a!==null;){if(s=p(a),s!==null)return s;a=a.sibling}return null}var m=Object.assign,E=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),T=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),k=Symbol.for("react.consumer"),N=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),U=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),V=Symbol.for("react.memo"),G=Symbol.for("react.lazy"),ie=Symbol.for("react.activity"),$=Symbol.for("react.memo_cache_sentinel"),X=Symbol.iterator;function J(a){return a===null||typeof a!="object"?null:(a=X&&a[X]||a["@@iterator"],typeof a=="function"?a:null)}var he=Symbol.for("react.client.reference");function ue(a){if(a==null)return null;if(typeof a=="function")return a.$$typeof===he?null:a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case S:return"Fragment";case w:return"Profiler";case C:return"StrictMode";case U:return"Suspense";case P:return"SuspenseList";case ie:return"Activity"}if(typeof a=="object")switch(a.$$typeof){case T:return"Portal";case N:return a.displayName||"Context";case k:return(a._context.displayName||"Context")+".Consumer";case M:var s=a.render;return a=a.displayName,a||(a=s.displayName||s.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case V:return s=a.displayName||null,s!==null?s:ue(a.type)||"Memo";case G:s=a._payload,a=a._init;try{return ue(a(s))}catch{}}return null}var re=Array.isArray,j=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce={pending:!1,data:null,method:null,action:null},xe=[],O=-1;function z(a){return{current:a}}function te(a){0>O||(a.current=xe[O],xe[O]=null,O--)}function D(a,s){O++,xe[O]=a.current,a.current=s}var ge=z(null),Ee=z(null),ye=z(null),be=z(null);function ke(a,s){switch(D(ye,s),D(Ee,a),D(ge,null),s.nodeType){case 9:case 11:a=(a=s.documentElement)&&(a=a.namespaceURI)?__(a):0;break;default:if(a=s.tagName,s=s.namespaceURI)s=__(s),a=x_(s,a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}te(ge),D(ge,a)}function Te(){te(ge),te(Ee),te(ye)}function De(a){a.memoizedState!==null&&D(be,a);var s=ge.current,u=x_(s,a.type);s!==u&&(D(Ee,a),D(ge,u))}function je(a){Ee.current===a&&(te(ge),te(Ee)),be.current===a&&(te(be),hl._currentValue=ce)}var Je,kt;function it(a){if(Je===void 0)try{throw Error()}catch(u){var s=u.stack.trim().match(/\n( *(at )?)/);Je=s&&s[1]||"",kt=-1<u.stack.indexOf(`
|
|
3
|
+
at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
4
|
+
`+Je+a+kt}var On=!1;function En(a,s){if(!a||On)return"";On=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var d={DetermineComponentFrameRoot:function(){try{if(s){var fe=function(){throw Error()};if(Object.defineProperty(fe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(fe,[])}catch(ne){var Z=ne}Reflect.construct(a,[],fe)}else{try{fe.call()}catch(ne){Z=ne}a.call(fe.prototype)}}else{try{throw Error()}catch(ne){Z=ne}(fe=a())&&typeof fe.catch=="function"&&fe.catch(function(){})}}catch(ne){if(ne&&Z&&typeof ne.stack=="string")return[ne.stack,Z.stack]}return[null,null]}};d.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var g=Object.getOwnPropertyDescriptor(d.DetermineComponentFrameRoot,"name");g&&g.configurable&&Object.defineProperty(d.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var b=d.DetermineComponentFrameRoot(),A=b[0],R=b[1];if(A&&R){var F=A.split(`
|
|
5
|
+
`),K=R.split(`
|
|
6
|
+
`);for(g=d=0;d<F.length&&!F[d].includes("DetermineComponentFrameRoot");)d++;for(;g<K.length&&!K[g].includes("DetermineComponentFrameRoot");)g++;if(d===F.length||g===K.length)for(d=F.length-1,g=K.length-1;1<=d&&0<=g&&F[d]!==K[g];)g--;for(;1<=d&&0<=g;d--,g--)if(F[d]!==K[g]){if(d!==1||g!==1)do if(d--,g--,0>g||F[d]!==K[g]){var se=`
|
|
7
|
+
`+F[d].replace(" at new "," at ");return a.displayName&&se.includes("<anonymous>")&&(se=se.replace("<anonymous>",a.displayName)),se}while(1<=d&&0<=g);break}}}finally{On=!1,Error.prepareStackTrace=u}return(u=a?a.displayName||a.name:"")?it(u):""}function xr(a,s){switch(a.tag){case 26:case 27:case 5:return it(a.type);case 16:return it("Lazy");case 13:return a.child!==s&&s!==null?it("Suspense Fallback"):it("Suspense");case 19:return it("SuspenseList");case 0:case 15:return En(a.type,!1);case 11:return En(a.type.render,!1);case 1:return En(a.type,!0);case 31:return it("Activity");default:return""}}function He(a){try{var s="",u=null;do s+=xr(a,u),u=a,a=a.return;while(a);return s}catch(d){return`
|
|
8
|
+
Error generating stack: `+d.message+`
|
|
9
|
+
`+d.stack}}var st=Object.prototype.hasOwnProperty,Gt=e.unstable_scheduleCallback,yn=e.unstable_cancelCallback,Hr=e.unstable_shouldYield,jd=e.unstable_requestPaint,fn=e.unstable_now,Ud=e.unstable_getCurrentPriorityLevel,oe=e.unstable_ImmediatePriority,_e=e.unstable_UserBlockingPriority,Le=e.unstable_NormalPriority,Ve=e.unstable_LowPriority,ot=e.unstable_IdlePriority,Ln=e.log,zr=e.unstable_setDisableYieldValue,dn=null,jt=null;function _n(a){if(typeof Ln=="function"&&zr(a),jt&&typeof jt.setStrictMode=="function")try{jt.setStrictMode(dn,a)}catch{}}var pt=Math.clz32?Math.clz32:L3,Ea=Math.log,or=Math.LN2;function L3(a){return a>>>=0,a===0?32:31-(Ea(a)/or|0)|0}var Eu=256,yu=262144,_u=4194304;function ci(a){var s=a&42;if(s!==0)return s;switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return a&261888;case 262144:case 524288:case 1048576:case 2097152:return a&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return a&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return a}}function xu(a,s,u){var d=a.pendingLanes;if(d===0)return 0;var g=0,b=a.suspendedLanes,A=a.pingedLanes;a=a.warmLanes;var R=d&134217727;return R!==0?(d=R&~b,d!==0?g=ci(d):(A&=R,A!==0?g=ci(A):u||(u=R&~a,u!==0&&(g=ci(u))))):(R=d&~b,R!==0?g=ci(R):A!==0?g=ci(A):u||(u=d&~a,u!==0&&(g=ci(u)))),g===0?0:s!==0&&s!==g&&(s&b)===0&&(b=g&-g,u=s&-s,b>=u||b===32&&(u&4194048)!==0)?s:g}function Co(a,s){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&s)===0}function I3(a,s){switch(a){case 1:case 2:case 4:case 8:case 64:return s+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function tb(){var a=_u;return _u<<=1,(_u&62914560)===0&&(_u=4194304),a}function Hd(a){for(var s=[],u=0;31>u;u++)s.push(a);return s}function wo(a,s){a.pendingLanes|=s,s!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function D3(a,s,u,d,g,b){var A=a.pendingLanes;a.pendingLanes=u,a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0,a.expiredLanes&=u,a.entangledLanes&=u,a.errorRecoveryDisabledLanes&=u,a.shellSuspendCounter=0;var R=a.entanglements,F=a.expirationTimes,K=a.hiddenUpdates;for(u=A&~u;0<u;){var se=31-pt(u),fe=1<<se;R[se]=0,F[se]=-1;var Z=K[se];if(Z!==null)for(K[se]=null,se=0;se<Z.length;se++){var ne=Z[se];ne!==null&&(ne.lane&=-536870913)}u&=~fe}d!==0&&nb(a,d,0),b!==0&&g===0&&a.tag!==0&&(a.suspendedLanes|=b&~(A&~s))}function nb(a,s,u){a.pendingLanes|=s,a.suspendedLanes&=~s;var d=31-pt(s);a.entangledLanes|=s,a.entanglements[d]=a.entanglements[d]|1073741824|u&261930}function rb(a,s){var u=a.entangledLanes|=s;for(a=a.entanglements;u;){var d=31-pt(u),g=1<<d;g&s|a[d]&s&&(a[d]|=s),u&=~g}}function ab(a,s){var u=s&-s;return u=(u&42)!==0?1:zd(u),(u&(a.suspendedLanes|s))!==0?0:u}function zd(a){switch(a){case 2:a=1;break;case 8:a=4;break;case 32:a=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:a=128;break;case 268435456:a=134217728;break;default:a=0}return a}function Fd(a){return a&=-a,2<a?8<a?(a&134217727)!==0?32:268435456:8:2}function ib(){var a=ee.p;return a!==0?a:(a=window.event,a===void 0?32:V_(a.type))}function sb(a,s){var u=ee.p;try{return ee.p=a,s()}finally{ee.p=u}}var ya=Math.random().toString(36).slice(2),Zt="__reactFiber$"+ya,xn="__reactProps$"+ya,ss="__reactContainer$"+ya,$d="__reactEvents$"+ya,M3="__reactListeners$"+ya,P3="__reactHandles$"+ya,ob="__reactResources$"+ya,ko="__reactMarker$"+ya;function Vd(a){delete a[Zt],delete a[xn],delete a[$d],delete a[M3],delete a[P3]}function os(a){var s=a[Zt];if(s)return s;for(var u=a.parentNode;u;){if(s=u[ss]||u[Zt]){if(u=s.alternate,s.child!==null||u!==null&&u.child!==null)for(a=k_(a);a!==null;){if(u=a[Zt])return u;a=k_(a)}return s}a=u,u=a.parentNode}return null}function ls(a){if(a=a[Zt]||a[ss]){var s=a.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return a}return null}function No(a){var s=a.tag;if(s===5||s===26||s===27||s===6)return a.stateNode;throw Error(r(33))}function us(a){var s=a[ob];return s||(s=a[ob]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function qt(a){a[ko]=!0}var lb=new Set,ub={};function fi(a,s){cs(a,s),cs(a+"Capture",s)}function cs(a,s){for(ub[a]=s,a=0;a<s.length;a++)lb.add(s[a])}var B3=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),cb={},fb={};function j3(a){return st.call(fb,a)?!0:st.call(cb,a)?!1:B3.test(a)?fb[a]=!0:(cb[a]=!0,!1)}function Tu(a,s,u){if(j3(s))if(u===null)a.removeAttribute(s);else{switch(typeof u){case"undefined":case"function":case"symbol":a.removeAttribute(s);return;case"boolean":var d=s.toLowerCase().slice(0,5);if(d!=="data-"&&d!=="aria-"){a.removeAttribute(s);return}}a.setAttribute(s,""+u)}}function vu(a,s,u){if(u===null)a.removeAttribute(s);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(s);return}a.setAttribute(s,""+u)}}function Fr(a,s,u,d){if(d===null)a.removeAttribute(u);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(u);return}a.setAttributeNS(s,u,""+d)}}function Gn(a){switch(typeof a){case"bigint":case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function db(a){var s=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function U3(a,s,u){var d=Object.getOwnPropertyDescriptor(a.constructor.prototype,s);if(!a.hasOwnProperty(s)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var g=d.get,b=d.set;return Object.defineProperty(a,s,{configurable:!0,get:function(){return g.call(this)},set:function(A){u=""+A,b.call(this,A)}}),Object.defineProperty(a,s,{enumerable:d.enumerable}),{getValue:function(){return u},setValue:function(A){u=""+A},stopTracking:function(){a._valueTracker=null,delete a[s]}}}}function Gd(a){if(!a._valueTracker){var s=db(a)?"checked":"value";a._valueTracker=U3(a,s,""+a[s])}}function hb(a){if(!a)return!1;var s=a._valueTracker;if(!s)return!0;var u=s.getValue(),d="";return a&&(d=db(a)?a.checked?"true":"false":a.value),a=d,a!==u?(s.setValue(a),!0):!1}function Su(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}var H3=/[\n"\\]/g;function qn(a){return a.replace(H3,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function qd(a,s,u,d,g,b,A,R){a.name="",A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"?a.type=A:a.removeAttribute("type"),s!=null?A==="number"?(s===0&&a.value===""||a.value!=s)&&(a.value=""+Gn(s)):a.value!==""+Gn(s)&&(a.value=""+Gn(s)):A!=="submit"&&A!=="reset"||a.removeAttribute("value"),s!=null?Yd(a,A,Gn(s)):u!=null?Yd(a,A,Gn(u)):d!=null&&a.removeAttribute("value"),g==null&&b!=null&&(a.defaultChecked=!!b),g!=null&&(a.checked=g&&typeof g!="function"&&typeof g!="symbol"),R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"?a.name=""+Gn(R):a.removeAttribute("name")}function mb(a,s,u,d,g,b,A,R){if(b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(a.type=b),s!=null||u!=null){if(!(b!=="submit"&&b!=="reset"||s!=null)){Gd(a);return}u=u!=null?""+Gn(u):"",s=s!=null?""+Gn(s):u,R||s===a.value||(a.value=s),a.defaultValue=s}d=d??g,d=typeof d!="function"&&typeof d!="symbol"&&!!d,a.checked=R?a.checked:!!d,a.defaultChecked=!!d,A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"&&(a.name=A),Gd(a)}function Yd(a,s,u){s==="number"&&Su(a.ownerDocument)===a||a.defaultValue===""+u||(a.defaultValue=""+u)}function fs(a,s,u,d){if(a=a.options,s){s={};for(var g=0;g<u.length;g++)s["$"+u[g]]=!0;for(u=0;u<a.length;u++)g=s.hasOwnProperty("$"+a[u].value),a[u].selected!==g&&(a[u].selected=g),g&&d&&(a[u].defaultSelected=!0)}else{for(u=""+Gn(u),s=null,g=0;g<a.length;g++){if(a[g].value===u){a[g].selected=!0,d&&(a[g].defaultSelected=!0);return}s!==null||a[g].disabled||(s=a[g])}s!==null&&(s.selected=!0)}}function pb(a,s,u){if(s!=null&&(s=""+Gn(s),s!==a.value&&(a.value=s),u==null)){a.defaultValue!==s&&(a.defaultValue=s);return}a.defaultValue=u!=null?""+Gn(u):""}function gb(a,s,u,d){if(s==null){if(d!=null){if(u!=null)throw Error(r(92));if(re(d)){if(1<d.length)throw Error(r(93));d=d[0]}u=d}u==null&&(u=""),s=u}u=Gn(s),a.defaultValue=u,d=a.textContent,d===u&&d!==""&&d!==null&&(a.value=d),Gd(a)}function ds(a,s){if(s){var u=a.firstChild;if(u&&u===a.lastChild&&u.nodeType===3){u.nodeValue=s;return}}a.textContent=s}var z3=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function bb(a,s,u){var d=s.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?d?a.setProperty(s,""):s==="float"?a.cssFloat="":a[s]="":d?a.setProperty(s,u):typeof u!="number"||u===0||z3.has(s)?s==="float"?a.cssFloat=u:a[s]=(""+u).trim():a[s]=u+"px"}function Eb(a,s,u){if(s!=null&&typeof s!="object")throw Error(r(62));if(a=a.style,u!=null){for(var d in u)!u.hasOwnProperty(d)||s!=null&&s.hasOwnProperty(d)||(d.indexOf("--")===0?a.setProperty(d,""):d==="float"?a.cssFloat="":a[d]="");for(var g in s)d=s[g],s.hasOwnProperty(g)&&u[g]!==d&&bb(a,g,d)}else for(var b in s)s.hasOwnProperty(b)&&bb(a,b,s[b])}function Xd(a){if(a.indexOf("-")===-1)return!1;switch(a){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var F3=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),$3=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Au(a){return $3.test(""+a)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":a}function $r(){}var Qd=null;function Wd(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var hs=null,ms=null;function yb(a){var s=ls(a);if(s&&(a=s.stateNode)){var u=a[xn]||null;e:switch(a=s.stateNode,s.type){case"input":if(qd(a,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name),s=u.name,u.type==="radio"&&s!=null){for(u=a;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll('input[name="'+qn(""+s)+'"][type="radio"]'),s=0;s<u.length;s++){var d=u[s];if(d!==a&&d.form===a.form){var g=d[xn]||null;if(!g)throw Error(r(90));qd(d,g.value,g.defaultValue,g.defaultValue,g.checked,g.defaultChecked,g.type,g.name)}}for(s=0;s<u.length;s++)d=u[s],d.form===a.form&&hb(d)}break e;case"textarea":pb(a,u.value,u.defaultValue);break e;case"select":s=u.value,s!=null&&fs(a,!!u.multiple,s,!1)}}}var Kd=!1;function _b(a,s,u){if(Kd)return a(s,u);Kd=!0;try{var d=a(s);return d}finally{if(Kd=!1,(hs!==null||ms!==null)&&(dc(),hs&&(s=hs,a=ms,ms=hs=null,yb(s),a)))for(s=0;s<a.length;s++)yb(a[s])}}function Ro(a,s){var u=a.stateNode;if(u===null)return null;var d=u[xn]||null;if(d===null)return null;u=d[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(d=!d.disabled)||(a=a.type,d=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!d;break e;default:a=!1}if(a)return null;if(u&&typeof u!="function")throw Error(r(231,s,typeof u));return u}var Vr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Zd=!1;if(Vr)try{var Oo={};Object.defineProperty(Oo,"passive",{get:function(){Zd=!0}}),window.addEventListener("test",Oo,Oo),window.removeEventListener("test",Oo,Oo)}catch{Zd=!1}var _a=null,Jd=null,Cu=null;function xb(){if(Cu)return Cu;var a,s=Jd,u=s.length,d,g="value"in _a?_a.value:_a.textContent,b=g.length;for(a=0;a<u&&s[a]===g[a];a++);var A=u-a;for(d=1;d<=A&&s[u-d]===g[b-d];d++);return Cu=g.slice(a,1<d?1-d:void 0)}function wu(a){var s=a.keyCode;return"charCode"in a?(a=a.charCode,a===0&&s===13&&(a=13)):a=s,a===10&&(a=13),32<=a||a===13?a:0}function ku(){return!0}function Tb(){return!1}function Tn(a){function s(u,d,g,b,A){this._reactName=u,this._targetInst=g,this.type=d,this.nativeEvent=b,this.target=A,this.currentTarget=null;for(var R in a)a.hasOwnProperty(R)&&(u=a[R],this[R]=u?u(b):b[R]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?ku:Tb,this.isPropagationStopped=Tb,this}return m(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=ku)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=ku)},persist:function(){},isPersistent:ku}),s}var di={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Nu=Tn(di),Lo=m({},di,{view:0,detail:0}),V3=Tn(Lo),eh,th,Io,Ru=m({},Lo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:rh,button:0,buttons:0,relatedTarget:function(a){return a.relatedTarget===void 0?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){return"movementX"in a?a.movementX:(a!==Io&&(Io&&a.type==="mousemove"?(eh=a.screenX-Io.screenX,th=a.screenY-Io.screenY):th=eh=0,Io=a),eh)},movementY:function(a){return"movementY"in a?a.movementY:th}}),vb=Tn(Ru),G3=m({},Ru,{dataTransfer:0}),q3=Tn(G3),Y3=m({},Lo,{relatedTarget:0}),nh=Tn(Y3),X3=m({},di,{animationName:0,elapsedTime:0,pseudoElement:0}),Q3=Tn(X3),W3=m({},di,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),K3=Tn(W3),Z3=m({},di,{data:0}),Sb=Tn(Z3),J3={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},eR={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"},tR={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function nR(a){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(a):(a=tR[a])?!!s[a]:!1}function rh(){return nR}var rR=m({},Lo,{key:function(a){if(a.key){var s=J3[a.key]||a.key;if(s!=="Unidentified")return s}return a.type==="keypress"?(a=wu(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?eR[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:rh,charCode:function(a){return a.type==="keypress"?wu(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?wu(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),aR=Tn(rR),iR=m({},Ru,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ab=Tn(iR),sR=m({},Lo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:rh}),oR=Tn(sR),lR=m({},di,{propertyName:0,elapsedTime:0,pseudoElement:0}),uR=Tn(lR),cR=m({},Ru,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),fR=Tn(cR),dR=m({},di,{newState:0,oldState:0}),hR=Tn(dR),mR=[9,13,27,32],ah=Vr&&"CompositionEvent"in window,Do=null;Vr&&"documentMode"in document&&(Do=document.documentMode);var pR=Vr&&"TextEvent"in window&&!Do,Cb=Vr&&(!ah||Do&&8<Do&&11>=Do),wb=" ",kb=!1;function Nb(a,s){switch(a){case"keyup":return mR.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Rb(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var ps=!1;function gR(a,s){switch(a){case"compositionend":return Rb(s);case"keypress":return s.which!==32?null:(kb=!0,wb);case"textInput":return a=s.data,a===wb&&kb?null:a;default:return null}}function bR(a,s){if(ps)return a==="compositionend"||!ah&&Nb(a,s)?(a=xb(),Cu=Jd=_a=null,ps=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return Cb&&s.locale!=="ko"?null:s.data;default:return null}}var ER={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 Ob(a){var s=a&&a.nodeName&&a.nodeName.toLowerCase();return s==="input"?!!ER[a.type]:s==="textarea"}function Lb(a,s,u,d){hs?ms?ms.push(d):ms=[d]:hs=d,s=yc(s,"onChange"),0<s.length&&(u=new Nu("onChange","change",null,u,d),a.push({event:u,listeners:s}))}var Mo=null,Po=null;function yR(a){m_(a,0)}function Ou(a){var s=No(a);if(hb(s))return a}function Ib(a,s){if(a==="change")return s}var Db=!1;if(Vr){var ih;if(Vr){var sh="oninput"in document;if(!sh){var Mb=document.createElement("div");Mb.setAttribute("oninput","return;"),sh=typeof Mb.oninput=="function"}ih=sh}else ih=!1;Db=ih&&(!document.documentMode||9<document.documentMode)}function Pb(){Mo&&(Mo.detachEvent("onpropertychange",Bb),Po=Mo=null)}function Bb(a){if(a.propertyName==="value"&&Ou(Po)){var s=[];Lb(s,Po,a,Wd(a)),_b(yR,s)}}function _R(a,s,u){a==="focusin"?(Pb(),Mo=s,Po=u,Mo.attachEvent("onpropertychange",Bb)):a==="focusout"&&Pb()}function xR(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return Ou(Po)}function TR(a,s){if(a==="click")return Ou(s)}function vR(a,s){if(a==="input"||a==="change")return Ou(s)}function SR(a,s){return a===s&&(a!==0||1/a===1/s)||a!==a&&s!==s}var In=typeof Object.is=="function"?Object.is:SR;function Bo(a,s){if(In(a,s))return!0;if(typeof a!="object"||a===null||typeof s!="object"||s===null)return!1;var u=Object.keys(a),d=Object.keys(s);if(u.length!==d.length)return!1;for(d=0;d<u.length;d++){var g=u[d];if(!st.call(s,g)||!In(a[g],s[g]))return!1}return!0}function jb(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function Ub(a,s){var u=jb(a);a=0;for(var d;u;){if(u.nodeType===3){if(d=a+u.textContent.length,a<=s&&d>=s)return{node:u,offset:s-a};a=d}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=jb(u)}}function Hb(a,s){return a&&s?a===s?!0:a&&a.nodeType===3?!1:s&&s.nodeType===3?Hb(a,s.parentNode):"contains"in a?a.contains(s):a.compareDocumentPosition?!!(a.compareDocumentPosition(s)&16):!1:!1}function zb(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var s=Su(a.document);s instanceof a.HTMLIFrameElement;){try{var u=typeof s.contentWindow.location.href=="string"}catch{u=!1}if(u)a=s.contentWindow;else break;s=Su(a.document)}return s}function oh(a){var s=a&&a.nodeName&&a.nodeName.toLowerCase();return s&&(s==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||s==="textarea"||a.contentEditable==="true")}var AR=Vr&&"documentMode"in document&&11>=document.documentMode,gs=null,lh=null,jo=null,uh=!1;function Fb(a,s,u){var d=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;uh||gs==null||gs!==Su(d)||(d=gs,"selectionStart"in d&&oh(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),jo&&Bo(jo,d)||(jo=d,d=yc(lh,"onSelect"),0<d.length&&(s=new Nu("onSelect","select",null,s,u),a.push({event:s,listeners:d}),s.target=gs)))}function hi(a,s){var u={};return u[a.toLowerCase()]=s.toLowerCase(),u["Webkit"+a]="webkit"+s,u["Moz"+a]="moz"+s,u}var bs={animationend:hi("Animation","AnimationEnd"),animationiteration:hi("Animation","AnimationIteration"),animationstart:hi("Animation","AnimationStart"),transitionrun:hi("Transition","TransitionRun"),transitionstart:hi("Transition","TransitionStart"),transitioncancel:hi("Transition","TransitionCancel"),transitionend:hi("Transition","TransitionEnd")},ch={},$b={};Vr&&($b=document.createElement("div").style,"AnimationEvent"in window||(delete bs.animationend.animation,delete bs.animationiteration.animation,delete bs.animationstart.animation),"TransitionEvent"in window||delete bs.transitionend.transition);function mi(a){if(ch[a])return ch[a];if(!bs[a])return a;var s=bs[a],u;for(u in s)if(s.hasOwnProperty(u)&&u in $b)return ch[a]=s[u];return a}var Vb=mi("animationend"),Gb=mi("animationiteration"),qb=mi("animationstart"),CR=mi("transitionrun"),wR=mi("transitionstart"),kR=mi("transitioncancel"),Yb=mi("transitionend"),Xb=new Map,fh="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");fh.push("scrollEnd");function lr(a,s){Xb.set(a,s),fi(s,[a])}var Lu=typeof reportError=="function"?reportError:function(a){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof a=="object"&&a!==null&&typeof a.message=="string"?String(a.message):String(a),error:a});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",a);return}console.error(a)},Yn=[],Es=0,dh=0;function Iu(){for(var a=Es,s=dh=Es=0;s<a;){var u=Yn[s];Yn[s++]=null;var d=Yn[s];Yn[s++]=null;var g=Yn[s];Yn[s++]=null;var b=Yn[s];if(Yn[s++]=null,d!==null&&g!==null){var A=d.pending;A===null?g.next=g:(g.next=A.next,A.next=g),d.pending=g}b!==0&&Qb(u,g,b)}}function Du(a,s,u,d){Yn[Es++]=a,Yn[Es++]=s,Yn[Es++]=u,Yn[Es++]=d,dh|=d,a.lanes|=d,a=a.alternate,a!==null&&(a.lanes|=d)}function hh(a,s,u,d){return Du(a,s,u,d),Mu(a)}function pi(a,s){return Du(a,null,null,s),Mu(a)}function Qb(a,s,u){a.lanes|=u;var d=a.alternate;d!==null&&(d.lanes|=u);for(var g=!1,b=a.return;b!==null;)b.childLanes|=u,d=b.alternate,d!==null&&(d.childLanes|=u),b.tag===22&&(a=b.stateNode,a===null||a._visibility&1||(g=!0)),a=b,b=b.return;return a.tag===3?(b=a.stateNode,g&&s!==null&&(g=31-pt(u),a=b.hiddenUpdates,d=a[g],d===null?a[g]=[s]:d.push(s),s.lane=u|536870912),b):null}function Mu(a){if(50<sl)throw sl=0,Tm=null,Error(r(185));for(var s=a.return;s!==null;)a=s,s=a.return;return a.tag===3?a.stateNode:null}var ys={};function NR(a,s,u,d){this.tag=a,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Dn(a,s,u,d){return new NR(a,s,u,d)}function mh(a){return a=a.prototype,!(!a||!a.isReactComponent)}function Gr(a,s){var u=a.alternate;return u===null?(u=Dn(a.tag,s,a.key,a.mode),u.elementType=a.elementType,u.type=a.type,u.stateNode=a.stateNode,u.alternate=a,a.alternate=u):(u.pendingProps=s,u.type=a.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=a.flags&65011712,u.childLanes=a.childLanes,u.lanes=a.lanes,u.child=a.child,u.memoizedProps=a.memoizedProps,u.memoizedState=a.memoizedState,u.updateQueue=a.updateQueue,s=a.dependencies,u.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},u.sibling=a.sibling,u.index=a.index,u.ref=a.ref,u.refCleanup=a.refCleanup,u}function Wb(a,s){a.flags&=65011714;var u=a.alternate;return u===null?(a.childLanes=0,a.lanes=s,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=u.childLanes,a.lanes=u.lanes,a.child=u.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=u.memoizedProps,a.memoizedState=u.memoizedState,a.updateQueue=u.updateQueue,a.type=u.type,s=u.dependencies,a.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),a}function Pu(a,s,u,d,g,b){var A=0;if(d=a,typeof a=="function")mh(a)&&(A=1);else if(typeof a=="string")A=DO(a,u,ge.current)?26:a==="html"||a==="head"||a==="body"?27:5;else e:switch(a){case ie:return a=Dn(31,u,s,g),a.elementType=ie,a.lanes=b,a;case S:return gi(u.children,g,b,s);case C:A=8,g|=24;break;case w:return a=Dn(12,u,s,g|2),a.elementType=w,a.lanes=b,a;case U:return a=Dn(13,u,s,g),a.elementType=U,a.lanes=b,a;case P:return a=Dn(19,u,s,g),a.elementType=P,a.lanes=b,a;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case N:A=10;break e;case k:A=9;break e;case M:A=11;break e;case V:A=14;break e;case G:A=16,d=null;break e}A=29,u=Error(r(130,a===null?"null":typeof a,"")),d=null}return s=Dn(A,u,s,g),s.elementType=a,s.type=d,s.lanes=b,s}function gi(a,s,u,d){return a=Dn(7,a,d,s),a.lanes=u,a}function ph(a,s,u){return a=Dn(6,a,null,s),a.lanes=u,a}function Kb(a){var s=Dn(18,null,null,0);return s.stateNode=a,s}function gh(a,s,u){return s=Dn(4,a.children!==null?a.children:[],a.key,s),s.lanes=u,s.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},s}var Zb=new WeakMap;function Xn(a,s){if(typeof a=="object"&&a!==null){var u=Zb.get(a);return u!==void 0?u:(s={value:a,source:s,stack:He(s)},Zb.set(a,s),s)}return{value:a,source:s,stack:He(s)}}var _s=[],xs=0,Bu=null,Uo=0,Qn=[],Wn=0,xa=null,Tr=1,vr="";function qr(a,s){_s[xs++]=Uo,_s[xs++]=Bu,Bu=a,Uo=s}function Jb(a,s,u){Qn[Wn++]=Tr,Qn[Wn++]=vr,Qn[Wn++]=xa,xa=a;var d=Tr;a=vr;var g=32-pt(d)-1;d&=~(1<<g),u+=1;var b=32-pt(s)+g;if(30<b){var A=g-g%5;b=(d&(1<<A)-1).toString(32),d>>=A,g-=A,Tr=1<<32-pt(s)+g|u<<g|d,vr=b+a}else Tr=1<<b|u<<g|d,vr=a}function bh(a){a.return!==null&&(qr(a,1),Jb(a,1,0))}function Eh(a){for(;a===Bu;)Bu=_s[--xs],_s[xs]=null,Uo=_s[--xs],_s[xs]=null;for(;a===xa;)xa=Qn[--Wn],Qn[Wn]=null,vr=Qn[--Wn],Qn[Wn]=null,Tr=Qn[--Wn],Qn[Wn]=null}function eE(a,s){Qn[Wn++]=Tr,Qn[Wn++]=vr,Qn[Wn++]=xa,Tr=s.id,vr=s.overflow,xa=a}var Jt=null,_t=null,Ke=!1,Ta=null,Kn=!1,yh=Error(r(519));function va(a){var s=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ho(Xn(s,a)),yh}function tE(a){var s=a.stateNode,u=a.type,d=a.memoizedProps;switch(s[Zt]=a,s[xn]=d,u){case"dialog":qe("cancel",s),qe("close",s);break;case"iframe":case"object":case"embed":qe("load",s);break;case"video":case"audio":for(u=0;u<ll.length;u++)qe(ll[u],s);break;case"source":qe("error",s);break;case"img":case"image":case"link":qe("error",s),qe("load",s);break;case"details":qe("toggle",s);break;case"input":qe("invalid",s),mb(s,d.value,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name,!0);break;case"select":qe("invalid",s);break;case"textarea":qe("invalid",s),gb(s,d.value,d.defaultValue,d.children)}u=d.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||s.textContent===""+u||d.suppressHydrationWarning===!0||E_(s.textContent,u)?(d.popover!=null&&(qe("beforetoggle",s),qe("toggle",s)),d.onScroll!=null&&qe("scroll",s),d.onScrollEnd!=null&&qe("scrollend",s),d.onClick!=null&&(s.onclick=$r),s=!0):s=!1,s||va(a,!0)}function nE(a){for(Jt=a.return;Jt;)switch(Jt.tag){case 5:case 31:case 13:Kn=!1;return;case 27:case 3:Kn=!0;return;default:Jt=Jt.return}}function Ts(a){if(a!==Jt)return!1;if(!Ke)return nE(a),Ke=!0,!1;var s=a.tag,u;if((u=s!==3&&s!==27)&&((u=s===5)&&(u=a.type,u=!(u!=="form"&&u!=="button")||Bm(a.type,a.memoizedProps)),u=!u),u&&_t&&va(a),nE(a),s===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));_t=w_(a)}else if(s===31){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));_t=w_(a)}else s===27?(s=_t,Ba(a.type)?(a=Fm,Fm=null,_t=a):_t=s):_t=Jt?Jn(a.stateNode.nextSibling):null;return!0}function bi(){_t=Jt=null,Ke=!1}function _h(){var a=Ta;return a!==null&&(Cn===null?Cn=a:Cn.push.apply(Cn,a),Ta=null),a}function Ho(a){Ta===null?Ta=[a]:Ta.push(a)}var xh=z(null),Ei=null,Yr=null;function Sa(a,s,u){D(xh,s._currentValue),s._currentValue=u}function Xr(a){a._currentValue=xh.current,te(xh)}function Th(a,s,u){for(;a!==null;){var d=a.alternate;if((a.childLanes&s)!==s?(a.childLanes|=s,d!==null&&(d.childLanes|=s)):d!==null&&(d.childLanes&s)!==s&&(d.childLanes|=s),a===u)break;a=a.return}}function vh(a,s,u,d){var g=a.child;for(g!==null&&(g.return=a);g!==null;){var b=g.dependencies;if(b!==null){var A=g.child;b=b.firstContext;e:for(;b!==null;){var R=b;b=g;for(var F=0;F<s.length;F++)if(R.context===s[F]){b.lanes|=u,R=b.alternate,R!==null&&(R.lanes|=u),Th(b.return,u,a),d||(A=null);break e}b=R.next}}else if(g.tag===18){if(A=g.return,A===null)throw Error(r(341));A.lanes|=u,b=A.alternate,b!==null&&(b.lanes|=u),Th(A,u,a),A=null}else A=g.child;if(A!==null)A.return=g;else for(A=g;A!==null;){if(A===a){A=null;break}if(g=A.sibling,g!==null){g.return=A.return,A=g;break}A=A.return}g=A}}function vs(a,s,u,d){a=null;for(var g=s,b=!1;g!==null;){if(!b){if((g.flags&524288)!==0)b=!0;else if((g.flags&262144)!==0)break}if(g.tag===10){var A=g.alternate;if(A===null)throw Error(r(387));if(A=A.memoizedProps,A!==null){var R=g.type;In(g.pendingProps.value,A.value)||(a!==null?a.push(R):a=[R])}}else if(g===be.current){if(A=g.alternate,A===null)throw Error(r(387));A.memoizedState.memoizedState!==g.memoizedState.memoizedState&&(a!==null?a.push(hl):a=[hl])}g=g.return}a!==null&&vh(s,a,u,d),s.flags|=262144}function ju(a){for(a=a.firstContext;a!==null;){if(!In(a.context._currentValue,a.memoizedValue))return!0;a=a.next}return!1}function yi(a){Ei=a,Yr=null,a=a.dependencies,a!==null&&(a.firstContext=null)}function en(a){return rE(Ei,a)}function Uu(a,s){return Ei===null&&yi(a),rE(a,s)}function rE(a,s){var u=s._currentValue;if(s={context:s,memoizedValue:u,next:null},Yr===null){if(a===null)throw Error(r(308));Yr=s,a.dependencies={lanes:0,firstContext:s},a.flags|=524288}else Yr=Yr.next=s;return u}var RR=typeof AbortController<"u"?AbortController:function(){var a=[],s=this.signal={aborted:!1,addEventListener:function(u,d){a.push(d)}};this.abort=function(){s.aborted=!0,a.forEach(function(u){return u()})}},OR=e.unstable_scheduleCallback,LR=e.unstable_NormalPriority,It={$$typeof:N,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Sh(){return{controller:new RR,data:new Map,refCount:0}}function zo(a){a.refCount--,a.refCount===0&&OR(LR,function(){a.controller.abort()})}var Fo=null,Ah=0,Ss=0,As=null;function IR(a,s){if(Fo===null){var u=Fo=[];Ah=0,Ss=km(),As={status:"pending",value:void 0,then:function(d){u.push(d)}}}return Ah++,s.then(aE,aE),s}function aE(){if(--Ah===0&&Fo!==null){As!==null&&(As.status="fulfilled");var a=Fo;Fo=null,Ss=0,As=null;for(var s=0;s<a.length;s++)(0,a[s])()}}function DR(a,s){var u=[],d={status:"pending",value:null,reason:null,then:function(g){u.push(g)}};return a.then(function(){d.status="fulfilled",d.value=s;for(var g=0;g<u.length;g++)(0,u[g])(s)},function(g){for(d.status="rejected",d.reason=g,g=0;g<u.length;g++)(0,u[g])(void 0)}),d}var iE=j.S;j.S=function(a,s){Fy=fn(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&IR(a,s),iE!==null&&iE(a,s)};var _i=z(null);function Ch(){var a=_i.current;return a!==null?a:gt.pooledCache}function Hu(a,s){s===null?D(_i,_i.current):D(_i,s.pool)}function sE(){var a=Ch();return a===null?null:{parent:It._currentValue,pool:a}}var Cs=Error(r(460)),wh=Error(r(474)),zu=Error(r(542)),Fu={then:function(){}};function oE(a){return a=a.status,a==="fulfilled"||a==="rejected"}function lE(a,s,u){switch(u=a[u],u===void 0?a.push(s):u!==s&&(s.then($r,$r),s=u),s.status){case"fulfilled":return s.value;case"rejected":throw a=s.reason,cE(a),a;default:if(typeof s.status=="string")s.then($r,$r);else{if(a=gt,a!==null&&100<a.shellSuspendCounter)throw Error(r(482));a=s,a.status="pending",a.then(function(d){if(s.status==="pending"){var g=s;g.status="fulfilled",g.value=d}},function(d){if(s.status==="pending"){var g=s;g.status="rejected",g.reason=d}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw a=s.reason,cE(a),a}throw Ti=s,Cs}}function xi(a){try{var s=a._init;return s(a._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(Ti=u,Cs):u}}var Ti=null;function uE(){if(Ti===null)throw Error(r(459));var a=Ti;return Ti=null,a}function cE(a){if(a===Cs||a===zu)throw Error(r(483))}var ws=null,$o=0;function $u(a){var s=$o;return $o+=1,ws===null&&(ws=[]),lE(ws,a,s)}function Vo(a,s){s=s.props.ref,a.ref=s!==void 0?s:null}function Vu(a,s){throw s.$$typeof===E?Error(r(525)):(a=Object.prototype.toString.call(s),Error(r(31,a==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":a)))}function fE(a){function s(Y,q){if(a){var W=Y.deletions;W===null?(Y.deletions=[q],Y.flags|=16):W.push(q)}}function u(Y,q){if(!a)return null;for(;q!==null;)s(Y,q),q=q.sibling;return null}function d(Y){for(var q=new Map;Y!==null;)Y.key!==null?q.set(Y.key,Y):q.set(Y.index,Y),Y=Y.sibling;return q}function g(Y,q){return Y=Gr(Y,q),Y.index=0,Y.sibling=null,Y}function b(Y,q,W){return Y.index=W,a?(W=Y.alternate,W!==null?(W=W.index,W<q?(Y.flags|=67108866,q):W):(Y.flags|=67108866,q)):(Y.flags|=1048576,q)}function A(Y){return a&&Y.alternate===null&&(Y.flags|=67108866),Y}function R(Y,q,W,le){return q===null||q.tag!==6?(q=ph(W,Y.mode,le),q.return=Y,q):(q=g(q,W),q.return=Y,q)}function F(Y,q,W,le){var Ne=W.type;return Ne===S?se(Y,q,W.props.children,le,W.key):q!==null&&(q.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===G&&xi(Ne)===q.type)?(q=g(q,W.props),Vo(q,W),q.return=Y,q):(q=Pu(W.type,W.key,W.props,null,Y.mode,le),Vo(q,W),q.return=Y,q)}function K(Y,q,W,le){return q===null||q.tag!==4||q.stateNode.containerInfo!==W.containerInfo||q.stateNode.implementation!==W.implementation?(q=gh(W,Y.mode,le),q.return=Y,q):(q=g(q,W.children||[]),q.return=Y,q)}function se(Y,q,W,le,Ne){return q===null||q.tag!==7?(q=gi(W,Y.mode,le,Ne),q.return=Y,q):(q=g(q,W),q.return=Y,q)}function fe(Y,q,W){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return q=ph(""+q,Y.mode,W),q.return=Y,q;if(typeof q=="object"&&q!==null){switch(q.$$typeof){case y:return W=Pu(q.type,q.key,q.props,null,Y.mode,W),Vo(W,q),W.return=Y,W;case T:return q=gh(q,Y.mode,W),q.return=Y,q;case G:return q=xi(q),fe(Y,q,W)}if(re(q)||J(q))return q=gi(q,Y.mode,W,null),q.return=Y,q;if(typeof q.then=="function")return fe(Y,$u(q),W);if(q.$$typeof===N)return fe(Y,Uu(Y,q),W);Vu(Y,q)}return null}function Z(Y,q,W,le){var Ne=q!==null?q.key:null;if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return Ne!==null?null:R(Y,q,""+W,le);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case y:return W.key===Ne?F(Y,q,W,le):null;case T:return W.key===Ne?K(Y,q,W,le):null;case G:return W=xi(W),Z(Y,q,W,le)}if(re(W)||J(W))return Ne!==null?null:se(Y,q,W,le,null);if(typeof W.then=="function")return Z(Y,q,$u(W),le);if(W.$$typeof===N)return Z(Y,q,Uu(Y,W),le);Vu(Y,W)}return null}function ne(Y,q,W,le,Ne){if(typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint")return Y=Y.get(W)||null,R(q,Y,""+le,Ne);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case y:return Y=Y.get(le.key===null?W:le.key)||null,F(q,Y,le,Ne);case T:return Y=Y.get(le.key===null?W:le.key)||null,K(q,Y,le,Ne);case G:return le=xi(le),ne(Y,q,W,le,Ne)}if(re(le)||J(le))return Y=Y.get(W)||null,se(q,Y,le,Ne,null);if(typeof le.then=="function")return ne(Y,q,W,$u(le),Ne);if(le.$$typeof===N)return ne(Y,q,W,Uu(q,le),Ne);Vu(q,le)}return null}function Ae(Y,q,W,le){for(var Ne=null,nt=null,Ce=q,Ue=q=0,Qe=null;Ce!==null&&Ue<W.length;Ue++){Ce.index>Ue?(Qe=Ce,Ce=null):Qe=Ce.sibling;var rt=Z(Y,Ce,W[Ue],le);if(rt===null){Ce===null&&(Ce=Qe);break}a&&Ce&&rt.alternate===null&&s(Y,Ce),q=b(rt,q,Ue),nt===null?Ne=rt:nt.sibling=rt,nt=rt,Ce=Qe}if(Ue===W.length)return u(Y,Ce),Ke&&qr(Y,Ue),Ne;if(Ce===null){for(;Ue<W.length;Ue++)Ce=fe(Y,W[Ue],le),Ce!==null&&(q=b(Ce,q,Ue),nt===null?Ne=Ce:nt.sibling=Ce,nt=Ce);return Ke&&qr(Y,Ue),Ne}for(Ce=d(Ce);Ue<W.length;Ue++)Qe=ne(Ce,Y,Ue,W[Ue],le),Qe!==null&&(a&&Qe.alternate!==null&&Ce.delete(Qe.key===null?Ue:Qe.key),q=b(Qe,q,Ue),nt===null?Ne=Qe:nt.sibling=Qe,nt=Qe);return a&&Ce.forEach(function(Fa){return s(Y,Fa)}),Ke&&qr(Y,Ue),Ne}function Oe(Y,q,W,le){if(W==null)throw Error(r(151));for(var Ne=null,nt=null,Ce=q,Ue=q=0,Qe=null,rt=W.next();Ce!==null&&!rt.done;Ue++,rt=W.next()){Ce.index>Ue?(Qe=Ce,Ce=null):Qe=Ce.sibling;var Fa=Z(Y,Ce,rt.value,le);if(Fa===null){Ce===null&&(Ce=Qe);break}a&&Ce&&Fa.alternate===null&&s(Y,Ce),q=b(Fa,q,Ue),nt===null?Ne=Fa:nt.sibling=Fa,nt=Fa,Ce=Qe}if(rt.done)return u(Y,Ce),Ke&&qr(Y,Ue),Ne;if(Ce===null){for(;!rt.done;Ue++,rt=W.next())rt=fe(Y,rt.value,le),rt!==null&&(q=b(rt,q,Ue),nt===null?Ne=rt:nt.sibling=rt,nt=rt);return Ke&&qr(Y,Ue),Ne}for(Ce=d(Ce);!rt.done;Ue++,rt=W.next())rt=ne(Ce,Y,Ue,rt.value,le),rt!==null&&(a&&rt.alternate!==null&&Ce.delete(rt.key===null?Ue:rt.key),q=b(rt,q,Ue),nt===null?Ne=rt:nt.sibling=rt,nt=rt);return a&&Ce.forEach(function(GO){return s(Y,GO)}),Ke&&qr(Y,Ue),Ne}function ht(Y,q,W,le){if(typeof W=="object"&&W!==null&&W.type===S&&W.key===null&&(W=W.props.children),typeof W=="object"&&W!==null){switch(W.$$typeof){case y:e:{for(var Ne=W.key;q!==null;){if(q.key===Ne){if(Ne=W.type,Ne===S){if(q.tag===7){u(Y,q.sibling),le=g(q,W.props.children),le.return=Y,Y=le;break e}}else if(q.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===G&&xi(Ne)===q.type){u(Y,q.sibling),le=g(q,W.props),Vo(le,W),le.return=Y,Y=le;break e}u(Y,q);break}else s(Y,q);q=q.sibling}W.type===S?(le=gi(W.props.children,Y.mode,le,W.key),le.return=Y,Y=le):(le=Pu(W.type,W.key,W.props,null,Y.mode,le),Vo(le,W),le.return=Y,Y=le)}return A(Y);case T:e:{for(Ne=W.key;q!==null;){if(q.key===Ne)if(q.tag===4&&q.stateNode.containerInfo===W.containerInfo&&q.stateNode.implementation===W.implementation){u(Y,q.sibling),le=g(q,W.children||[]),le.return=Y,Y=le;break e}else{u(Y,q);break}else s(Y,q);q=q.sibling}le=gh(W,Y.mode,le),le.return=Y,Y=le}return A(Y);case G:return W=xi(W),ht(Y,q,W,le)}if(re(W))return Ae(Y,q,W,le);if(J(W)){if(Ne=J(W),typeof Ne!="function")throw Error(r(150));return W=Ne.call(W),Oe(Y,q,W,le)}if(typeof W.then=="function")return ht(Y,q,$u(W),le);if(W.$$typeof===N)return ht(Y,q,Uu(Y,W),le);Vu(Y,W)}return typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint"?(W=""+W,q!==null&&q.tag===6?(u(Y,q.sibling),le=g(q,W),le.return=Y,Y=le):(u(Y,q),le=ph(W,Y.mode,le),le.return=Y,Y=le),A(Y)):u(Y,q)}return function(Y,q,W,le){try{$o=0;var Ne=ht(Y,q,W,le);return ws=null,Ne}catch(Ce){if(Ce===Cs||Ce===zu)throw Ce;var nt=Dn(29,Ce,null,Y.mode);return nt.lanes=le,nt.return=Y,nt}}}var vi=fE(!0),dE=fE(!1),Aa=!1;function kh(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Nh(a,s){a=a.updateQueue,s.updateQueue===a&&(s.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,callbacks:null})}function Ca(a){return{lane:a,tag:0,payload:null,callback:null,next:null}}function wa(a,s,u){var d=a.updateQueue;if(d===null)return null;if(d=d.shared,(at&2)!==0){var g=d.pending;return g===null?s.next=s:(s.next=g.next,g.next=s),d.pending=s,s=Mu(a),Qb(a,null,u),s}return Du(a,d,s,u),Mu(a)}function Go(a,s,u){if(s=s.updateQueue,s!==null&&(s=s.shared,(u&4194048)!==0)){var d=s.lanes;d&=a.pendingLanes,u|=d,s.lanes=u,rb(a,u)}}function Rh(a,s){var u=a.updateQueue,d=a.alternate;if(d!==null&&(d=d.updateQueue,u===d)){var g=null,b=null;if(u=u.firstBaseUpdate,u!==null){do{var A={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};b===null?g=b=A:b=b.next=A,u=u.next}while(u!==null);b===null?g=b=s:b=b.next=s}else g=b=s;u={baseState:d.baseState,firstBaseUpdate:g,lastBaseUpdate:b,shared:d.shared,callbacks:d.callbacks},a.updateQueue=u;return}a=u.lastBaseUpdate,a===null?u.firstBaseUpdate=s:a.next=s,u.lastBaseUpdate=s}var Oh=!1;function qo(){if(Oh){var a=As;if(a!==null)throw a}}function Yo(a,s,u,d){Oh=!1;var g=a.updateQueue;Aa=!1;var b=g.firstBaseUpdate,A=g.lastBaseUpdate,R=g.shared.pending;if(R!==null){g.shared.pending=null;var F=R,K=F.next;F.next=null,A===null?b=K:A.next=K,A=F;var se=a.alternate;se!==null&&(se=se.updateQueue,R=se.lastBaseUpdate,R!==A&&(R===null?se.firstBaseUpdate=K:R.next=K,se.lastBaseUpdate=F))}if(b!==null){var fe=g.baseState;A=0,se=K=F=null,R=b;do{var Z=R.lane&-536870913,ne=Z!==R.lane;if(ne?(Xe&Z)===Z:(d&Z)===Z){Z!==0&&Z===Ss&&(Oh=!0),se!==null&&(se=se.next={lane:0,tag:R.tag,payload:R.payload,callback:null,next:null});e:{var Ae=a,Oe=R;Z=s;var ht=u;switch(Oe.tag){case 1:if(Ae=Oe.payload,typeof Ae=="function"){fe=Ae.call(ht,fe,Z);break e}fe=Ae;break e;case 3:Ae.flags=Ae.flags&-65537|128;case 0:if(Ae=Oe.payload,Z=typeof Ae=="function"?Ae.call(ht,fe,Z):Ae,Z==null)break e;fe=m({},fe,Z);break e;case 2:Aa=!0}}Z=R.callback,Z!==null&&(a.flags|=64,ne&&(a.flags|=8192),ne=g.callbacks,ne===null?g.callbacks=[Z]:ne.push(Z))}else ne={lane:Z,tag:R.tag,payload:R.payload,callback:R.callback,next:null},se===null?(K=se=ne,F=fe):se=se.next=ne,A|=Z;if(R=R.next,R===null){if(R=g.shared.pending,R===null)break;ne=R,R=ne.next,ne.next=null,g.lastBaseUpdate=ne,g.shared.pending=null}}while(!0);se===null&&(F=fe),g.baseState=F,g.firstBaseUpdate=K,g.lastBaseUpdate=se,b===null&&(g.shared.lanes=0),La|=A,a.lanes=A,a.memoizedState=fe}}function hE(a,s){if(typeof a!="function")throw Error(r(191,a));a.call(s)}function mE(a,s){var u=a.callbacks;if(u!==null)for(a.callbacks=null,a=0;a<u.length;a++)hE(u[a],s)}var ks=z(null),Gu=z(0);function pE(a,s){a=ra,D(Gu,a),D(ks,s),ra=a|s.baseLanes}function Lh(){D(Gu,ra),D(ks,ks.current)}function Ih(){ra=Gu.current,te(ks),te(Gu)}var Mn=z(null),Zn=null;function ka(a){var s=a.alternate;D(Nt,Nt.current&1),D(Mn,a),Zn===null&&(s===null||ks.current!==null||s.memoizedState!==null)&&(Zn=a)}function Dh(a){D(Nt,Nt.current),D(Mn,a),Zn===null&&(Zn=a)}function gE(a){a.tag===22?(D(Nt,Nt.current),D(Mn,a),Zn===null&&(Zn=a)):Na()}function Na(){D(Nt,Nt.current),D(Mn,Mn.current)}function Pn(a){te(Mn),Zn===a&&(Zn=null),te(Nt)}var Nt=z(0);function qu(a){for(var s=a;s!==null;){if(s.tag===13){var u=s.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||Hm(u)||zm(u)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===a)break;for(;s.sibling===null;){if(s.return===null||s.return===a)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Qr=0,Be=null,ft=null,Dt=null,Yu=!1,Ns=!1,Si=!1,Xu=0,Xo=0,Rs=null,MR=0;function At(){throw Error(r(321))}function Mh(a,s){if(s===null)return!1;for(var u=0;u<s.length&&u<a.length;u++)if(!In(a[u],s[u]))return!1;return!0}function Ph(a,s,u,d,g,b){return Qr=b,Be=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,j.H=a===null||a.memoizedState===null?JE:Kh,Si=!1,b=u(d,g),Si=!1,Ns&&(b=EE(s,u,d,g)),bE(a),b}function bE(a){j.H=Ko;var s=ft!==null&&ft.next!==null;if(Qr=0,Dt=ft=Be=null,Yu=!1,Xo=0,Rs=null,s)throw Error(r(300));a===null||Mt||(a=a.dependencies,a!==null&&ju(a)&&(Mt=!0))}function EE(a,s,u,d){Be=a;var g=0;do{if(Ns&&(Rs=null),Xo=0,Ns=!1,25<=g)throw Error(r(301));if(g+=1,Dt=ft=null,a.updateQueue!=null){var b=a.updateQueue;b.lastEffect=null,b.events=null,b.stores=null,b.memoCache!=null&&(b.memoCache.index=0)}j.H=ey,b=s(u,d)}while(Ns);return b}function PR(){var a=j.H,s=a.useState()[0];return s=typeof s.then=="function"?Qo(s):s,a=a.useState()[0],(ft!==null?ft.memoizedState:null)!==a&&(Be.flags|=1024),s}function Bh(){var a=Xu!==0;return Xu=0,a}function jh(a,s,u){s.updateQueue=a.updateQueue,s.flags&=-2053,a.lanes&=~u}function Uh(a){if(Yu){for(a=a.memoizedState;a!==null;){var s=a.queue;s!==null&&(s.pending=null),a=a.next}Yu=!1}Qr=0,Dt=ft=Be=null,Ns=!1,Xo=Xu=0,Rs=null}function hn(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Dt===null?Be.memoizedState=Dt=a:Dt=Dt.next=a,Dt}function Rt(){if(ft===null){var a=Be.alternate;a=a!==null?a.memoizedState:null}else a=ft.next;var s=Dt===null?Be.memoizedState:Dt.next;if(s!==null)Dt=s,ft=a;else{if(a===null)throw Be.alternate===null?Error(r(467)):Error(r(310));ft=a,a={memoizedState:ft.memoizedState,baseState:ft.baseState,baseQueue:ft.baseQueue,queue:ft.queue,next:null},Dt===null?Be.memoizedState=Dt=a:Dt=Dt.next=a}return Dt}function Qu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Qo(a){var s=Xo;return Xo+=1,Rs===null&&(Rs=[]),a=lE(Rs,a,s),s=Be,(Dt===null?s.memoizedState:Dt.next)===null&&(s=s.alternate,j.H=s===null||s.memoizedState===null?JE:Kh),a}function Wu(a){if(a!==null&&typeof a=="object"){if(typeof a.then=="function")return Qo(a);if(a.$$typeof===N)return en(a)}throw Error(r(438,String(a)))}function Hh(a){var s=null,u=Be.updateQueue;if(u!==null&&(s=u.memoCache),s==null){var d=Be.alternate;d!==null&&(d=d.updateQueue,d!==null&&(d=d.memoCache,d!=null&&(s={data:d.data.map(function(g){return g.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),u===null&&(u=Qu(),Be.updateQueue=u),u.memoCache=s,u=s.data[s.index],u===void 0)for(u=s.data[s.index]=Array(a),d=0;d<a;d++)u[d]=$;return s.index++,u}function Wr(a,s){return typeof s=="function"?s(a):s}function Ku(a){var s=Rt();return zh(s,ft,a)}function zh(a,s,u){var d=a.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=u;var g=a.baseQueue,b=d.pending;if(b!==null){if(g!==null){var A=g.next;g.next=b.next,b.next=A}s.baseQueue=g=b,d.pending=null}if(b=a.baseState,g===null)a.memoizedState=b;else{s=g.next;var R=A=null,F=null,K=s,se=!1;do{var fe=K.lane&-536870913;if(fe!==K.lane?(Xe&fe)===fe:(Qr&fe)===fe){var Z=K.revertLane;if(Z===0)F!==null&&(F=F.next={lane:0,revertLane:0,gesture:null,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null}),fe===Ss&&(se=!0);else if((Qr&Z)===Z){K=K.next,Z===Ss&&(se=!0);continue}else fe={lane:0,revertLane:K.revertLane,gesture:null,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null},F===null?(R=F=fe,A=b):F=F.next=fe,Be.lanes|=Z,La|=Z;fe=K.action,Si&&u(b,fe),b=K.hasEagerState?K.eagerState:u(b,fe)}else Z={lane:fe,revertLane:K.revertLane,gesture:K.gesture,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null},F===null?(R=F=Z,A=b):F=F.next=Z,Be.lanes|=fe,La|=fe;K=K.next}while(K!==null&&K!==s);if(F===null?A=b:F.next=R,!In(b,a.memoizedState)&&(Mt=!0,se&&(u=As,u!==null)))throw u;a.memoizedState=b,a.baseState=A,a.baseQueue=F,d.lastRenderedState=b}return g===null&&(d.lanes=0),[a.memoizedState,d.dispatch]}function Fh(a){var s=Rt(),u=s.queue;if(u===null)throw Error(r(311));u.lastRenderedReducer=a;var d=u.dispatch,g=u.pending,b=s.memoizedState;if(g!==null){u.pending=null;var A=g=g.next;do b=a(b,A.action),A=A.next;while(A!==g);In(b,s.memoizedState)||(Mt=!0),s.memoizedState=b,s.baseQueue===null&&(s.baseState=b),u.lastRenderedState=b}return[b,d]}function yE(a,s,u){var d=Be,g=Rt(),b=Ke;if(b){if(u===void 0)throw Error(r(407));u=u()}else u=s();var A=!In((ft||g).memoizedState,u);if(A&&(g.memoizedState=u,Mt=!0),g=g.queue,Gh(TE.bind(null,d,g,a),[a]),g.getSnapshot!==s||A||Dt!==null&&Dt.memoizedState.tag&1){if(d.flags|=2048,Os(9,{destroy:void 0},xE.bind(null,d,g,u,s),null),gt===null)throw Error(r(349));b||(Qr&127)!==0||_E(d,s,u)}return u}function _E(a,s,u){a.flags|=16384,a={getSnapshot:s,value:u},s=Be.updateQueue,s===null?(s=Qu(),Be.updateQueue=s,s.stores=[a]):(u=s.stores,u===null?s.stores=[a]:u.push(a))}function xE(a,s,u,d){s.value=u,s.getSnapshot=d,vE(s)&&SE(a)}function TE(a,s,u){return u(function(){vE(s)&&SE(a)})}function vE(a){var s=a.getSnapshot;a=a.value;try{var u=s();return!In(a,u)}catch{return!0}}function SE(a){var s=pi(a,2);s!==null&&wn(s,a,2)}function $h(a){var s=hn();if(typeof a=="function"){var u=a;if(a=u(),Si){_n(!0);try{u()}finally{_n(!1)}}}return s.memoizedState=s.baseState=a,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wr,lastRenderedState:a},s}function AE(a,s,u,d){return a.baseState=u,zh(a,ft,typeof d=="function"?d:Wr)}function BR(a,s,u,d,g){if(ec(a))throw Error(r(485));if(a=s.action,a!==null){var b={payload:g,action:a,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(A){b.listeners.push(A)}};j.T!==null?u(!0):b.isTransition=!1,d(b),u=s.pending,u===null?(b.next=s.pending=b,CE(s,b)):(b.next=u.next,s.pending=u.next=b)}}function CE(a,s){var u=s.action,d=s.payload,g=a.state;if(s.isTransition){var b=j.T,A={};j.T=A;try{var R=u(g,d),F=j.S;F!==null&&F(A,R),wE(a,s,R)}catch(K){Vh(a,s,K)}finally{b!==null&&A.types!==null&&(b.types=A.types),j.T=b}}else try{b=u(g,d),wE(a,s,b)}catch(K){Vh(a,s,K)}}function wE(a,s,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(d){kE(a,s,d)},function(d){return Vh(a,s,d)}):kE(a,s,u)}function kE(a,s,u){s.status="fulfilled",s.value=u,NE(s),a.state=u,s=a.pending,s!==null&&(u=s.next,u===s?a.pending=null:(u=u.next,s.next=u,CE(a,u)))}function Vh(a,s,u){var d=a.pending;if(a.pending=null,d!==null){d=d.next;do s.status="rejected",s.reason=u,NE(s),s=s.next;while(s!==d)}a.action=null}function NE(a){a=a.listeners;for(var s=0;s<a.length;s++)(0,a[s])()}function RE(a,s){return s}function OE(a,s){if(Ke){var u=gt.formState;if(u!==null){e:{var d=Be;if(Ke){if(_t){t:{for(var g=_t,b=Kn;g.nodeType!==8;){if(!b){g=null;break t}if(g=Jn(g.nextSibling),g===null){g=null;break t}}b=g.data,g=b==="F!"||b==="F"?g:null}if(g){_t=Jn(g.nextSibling),d=g.data==="F!";break e}}va(d)}d=!1}d&&(s=u[0])}}return u=hn(),u.memoizedState=u.baseState=s,d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:RE,lastRenderedState:s},u.queue=d,u=WE.bind(null,Be,d),d.dispatch=u,d=$h(!1),b=Wh.bind(null,Be,!1,d.queue),d=hn(),g={state:s,dispatch:null,action:a,pending:null},d.queue=g,u=BR.bind(null,Be,g,b,u),g.dispatch=u,d.memoizedState=a,[s,u,!1]}function LE(a){var s=Rt();return IE(s,ft,a)}function IE(a,s,u){if(s=zh(a,s,RE)[0],a=Ku(Wr)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var d=Qo(s)}catch(A){throw A===Cs?zu:A}else d=s;s=Rt();var g=s.queue,b=g.dispatch;return u!==s.memoizedState&&(Be.flags|=2048,Os(9,{destroy:void 0},jR.bind(null,g,u),null)),[d,b,a]}function jR(a,s){a.action=s}function DE(a){var s=Rt(),u=ft;if(u!==null)return IE(s,u,a);Rt(),s=s.memoizedState,u=Rt();var d=u.queue.dispatch;return u.memoizedState=a,[s,d,!1]}function Os(a,s,u,d){return a={tag:a,create:u,deps:d,inst:s,next:null},s=Be.updateQueue,s===null&&(s=Qu(),Be.updateQueue=s),u=s.lastEffect,u===null?s.lastEffect=a.next=a:(d=u.next,u.next=a,a.next=d,s.lastEffect=a),a}function ME(){return Rt().memoizedState}function Zu(a,s,u,d){var g=hn();Be.flags|=a,g.memoizedState=Os(1|s,{destroy:void 0},u,d===void 0?null:d)}function Ju(a,s,u,d){var g=Rt();d=d===void 0?null:d;var b=g.memoizedState.inst;ft!==null&&d!==null&&Mh(d,ft.memoizedState.deps)?g.memoizedState=Os(s,b,u,d):(Be.flags|=a,g.memoizedState=Os(1|s,b,u,d))}function PE(a,s){Zu(8390656,8,a,s)}function Gh(a,s){Ju(2048,8,a,s)}function UR(a){Be.flags|=4;var s=Be.updateQueue;if(s===null)s=Qu(),Be.updateQueue=s,s.events=[a];else{var u=s.events;u===null?s.events=[a]:u.push(a)}}function BE(a){var s=Rt().memoizedState;return UR({ref:s,nextImpl:a}),function(){if((at&2)!==0)throw Error(r(440));return s.impl.apply(void 0,arguments)}}function jE(a,s){return Ju(4,2,a,s)}function UE(a,s){return Ju(4,4,a,s)}function HE(a,s){if(typeof s=="function"){a=a();var u=s(a);return function(){typeof u=="function"?u():s(null)}}if(s!=null)return a=a(),s.current=a,function(){s.current=null}}function zE(a,s,u){u=u!=null?u.concat([a]):null,Ju(4,4,HE.bind(null,s,a),u)}function qh(){}function FE(a,s){var u=Rt();s=s===void 0?null:s;var d=u.memoizedState;return s!==null&&Mh(s,d[1])?d[0]:(u.memoizedState=[a,s],a)}function $E(a,s){var u=Rt();s=s===void 0?null:s;var d=u.memoizedState;if(s!==null&&Mh(s,d[1]))return d[0];if(d=a(),Si){_n(!0);try{a()}finally{_n(!1)}}return u.memoizedState=[d,s],d}function Yh(a,s,u){return u===void 0||(Qr&1073741824)!==0&&(Xe&261930)===0?a.memoizedState=s:(a.memoizedState=u,a=Vy(),Be.lanes|=a,La|=a,u)}function VE(a,s,u,d){return In(u,s)?u:ks.current!==null?(a=Yh(a,u,d),In(a,s)||(Mt=!0),a):(Qr&42)===0||(Qr&1073741824)!==0&&(Xe&261930)===0?(Mt=!0,a.memoizedState=u):(a=Vy(),Be.lanes|=a,La|=a,s)}function GE(a,s,u,d,g){var b=ee.p;ee.p=b!==0&&8>b?b:8;var A=j.T,R={};j.T=R,Wh(a,!1,s,u);try{var F=g(),K=j.S;if(K!==null&&K(R,F),F!==null&&typeof F=="object"&&typeof F.then=="function"){var se=DR(F,d);Wo(a,s,se,Un(a))}else Wo(a,s,d,Un(a))}catch(fe){Wo(a,s,{then:function(){},status:"rejected",reason:fe},Un())}finally{ee.p=b,A!==null&&R.types!==null&&(A.types=R.types),j.T=A}}function HR(){}function Xh(a,s,u,d){if(a.tag!==5)throw Error(r(476));var g=qE(a).queue;GE(a,g,s,ce,u===null?HR:function(){return YE(a),u(d)})}function qE(a){var s=a.memoizedState;if(s!==null)return s;s={memoizedState:ce,baseState:ce,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wr,lastRenderedState:ce},next:null};var u={};return s.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wr,lastRenderedState:u},next:null},a.memoizedState=s,a=a.alternate,a!==null&&(a.memoizedState=s),s}function YE(a){var s=qE(a);s.next===null&&(s=a.alternate.memoizedState),Wo(a,s.next.queue,{},Un())}function Qh(){return en(hl)}function XE(){return Rt().memoizedState}function QE(){return Rt().memoizedState}function zR(a){for(var s=a.return;s!==null;){switch(s.tag){case 24:case 3:var u=Un();a=Ca(u);var d=wa(s,a,u);d!==null&&(wn(d,s,u),Go(d,s,u)),s={cache:Sh()},a.payload=s;return}s=s.return}}function FR(a,s,u){var d=Un();u={lane:d,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},ec(a)?KE(s,u):(u=hh(a,s,u,d),u!==null&&(wn(u,a,d),ZE(u,s,d)))}function WE(a,s,u){var d=Un();Wo(a,s,u,d)}function Wo(a,s,u,d){var g={lane:d,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(ec(a))KE(s,g);else{var b=a.alternate;if(a.lanes===0&&(b===null||b.lanes===0)&&(b=s.lastRenderedReducer,b!==null))try{var A=s.lastRenderedState,R=b(A,u);if(g.hasEagerState=!0,g.eagerState=R,In(R,A))return Du(a,s,g,0),gt===null&&Iu(),!1}catch{}if(u=hh(a,s,g,d),u!==null)return wn(u,a,d),ZE(u,s,d),!0}return!1}function Wh(a,s,u,d){if(d={lane:2,revertLane:km(),gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},ec(a)){if(s)throw Error(r(479))}else s=hh(a,u,d,2),s!==null&&wn(s,a,2)}function ec(a){var s=a.alternate;return a===Be||s!==null&&s===Be}function KE(a,s){Ns=Yu=!0;var u=a.pending;u===null?s.next=s:(s.next=u.next,u.next=s),a.pending=s}function ZE(a,s,u){if((u&4194048)!==0){var d=s.lanes;d&=a.pendingLanes,u|=d,s.lanes=u,rb(a,u)}}var Ko={readContext:en,use:Wu,useCallback:At,useContext:At,useEffect:At,useImperativeHandle:At,useLayoutEffect:At,useInsertionEffect:At,useMemo:At,useReducer:At,useRef:At,useState:At,useDebugValue:At,useDeferredValue:At,useTransition:At,useSyncExternalStore:At,useId:At,useHostTransitionStatus:At,useFormState:At,useActionState:At,useOptimistic:At,useMemoCache:At,useCacheRefresh:At};Ko.useEffectEvent=At;var JE={readContext:en,use:Wu,useCallback:function(a,s){return hn().memoizedState=[a,s===void 0?null:s],a},useContext:en,useEffect:PE,useImperativeHandle:function(a,s,u){u=u!=null?u.concat([a]):null,Zu(4194308,4,HE.bind(null,s,a),u)},useLayoutEffect:function(a,s){return Zu(4194308,4,a,s)},useInsertionEffect:function(a,s){Zu(4,2,a,s)},useMemo:function(a,s){var u=hn();s=s===void 0?null:s;var d=a();if(Si){_n(!0);try{a()}finally{_n(!1)}}return u.memoizedState=[d,s],d},useReducer:function(a,s,u){var d=hn();if(u!==void 0){var g=u(s);if(Si){_n(!0);try{u(s)}finally{_n(!1)}}}else g=s;return d.memoizedState=d.baseState=g,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:g},d.queue=a,a=a.dispatch=FR.bind(null,Be,a),[d.memoizedState,a]},useRef:function(a){var s=hn();return a={current:a},s.memoizedState=a},useState:function(a){a=$h(a);var s=a.queue,u=WE.bind(null,Be,s);return s.dispatch=u,[a.memoizedState,u]},useDebugValue:qh,useDeferredValue:function(a,s){var u=hn();return Yh(u,a,s)},useTransition:function(){var a=$h(!1);return a=GE.bind(null,Be,a.queue,!0,!1),hn().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,s,u){var d=Be,g=hn();if(Ke){if(u===void 0)throw Error(r(407));u=u()}else{if(u=s(),gt===null)throw Error(r(349));(Xe&127)!==0||_E(d,s,u)}g.memoizedState=u;var b={value:u,getSnapshot:s};return g.queue=b,PE(TE.bind(null,d,b,a),[a]),d.flags|=2048,Os(9,{destroy:void 0},xE.bind(null,d,b,u,s),null),u},useId:function(){var a=hn(),s=gt.identifierPrefix;if(Ke){var u=vr,d=Tr;u=(d&~(1<<32-pt(d)-1)).toString(32)+u,s="_"+s+"R_"+u,u=Xu++,0<u&&(s+="H"+u.toString(32)),s+="_"}else u=MR++,s="_"+s+"r_"+u.toString(32)+"_";return a.memoizedState=s},useHostTransitionStatus:Qh,useFormState:OE,useActionState:OE,useOptimistic:function(a){var s=hn();s.memoizedState=s.baseState=a;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=u,s=Wh.bind(null,Be,!0,u),u.dispatch=s,[a,s]},useMemoCache:Hh,useCacheRefresh:function(){return hn().memoizedState=zR.bind(null,Be)},useEffectEvent:function(a){var s=hn(),u={impl:a};return s.memoizedState=u,function(){if((at&2)!==0)throw Error(r(440));return u.impl.apply(void 0,arguments)}}},Kh={readContext:en,use:Wu,useCallback:FE,useContext:en,useEffect:Gh,useImperativeHandle:zE,useInsertionEffect:jE,useLayoutEffect:UE,useMemo:$E,useReducer:Ku,useRef:ME,useState:function(){return Ku(Wr)},useDebugValue:qh,useDeferredValue:function(a,s){var u=Rt();return VE(u,ft.memoizedState,a,s)},useTransition:function(){var a=Ku(Wr)[0],s=Rt().memoizedState;return[typeof a=="boolean"?a:Qo(a),s]},useSyncExternalStore:yE,useId:XE,useHostTransitionStatus:Qh,useFormState:LE,useActionState:LE,useOptimistic:function(a,s){var u=Rt();return AE(u,ft,a,s)},useMemoCache:Hh,useCacheRefresh:QE};Kh.useEffectEvent=BE;var ey={readContext:en,use:Wu,useCallback:FE,useContext:en,useEffect:Gh,useImperativeHandle:zE,useInsertionEffect:jE,useLayoutEffect:UE,useMemo:$E,useReducer:Fh,useRef:ME,useState:function(){return Fh(Wr)},useDebugValue:qh,useDeferredValue:function(a,s){var u=Rt();return ft===null?Yh(u,a,s):VE(u,ft.memoizedState,a,s)},useTransition:function(){var a=Fh(Wr)[0],s=Rt().memoizedState;return[typeof a=="boolean"?a:Qo(a),s]},useSyncExternalStore:yE,useId:XE,useHostTransitionStatus:Qh,useFormState:DE,useActionState:DE,useOptimistic:function(a,s){var u=Rt();return ft!==null?AE(u,ft,a,s):(u.baseState=a,[a,u.queue.dispatch])},useMemoCache:Hh,useCacheRefresh:QE};ey.useEffectEvent=BE;function Zh(a,s,u,d){s=a.memoizedState,u=u(d,s),u=u==null?s:m({},s,u),a.memoizedState=u,a.lanes===0&&(a.updateQueue.baseState=u)}var Jh={enqueueSetState:function(a,s,u){a=a._reactInternals;var d=Un(),g=Ca(d);g.payload=s,u!=null&&(g.callback=u),s=wa(a,g,d),s!==null&&(wn(s,a,d),Go(s,a,d))},enqueueReplaceState:function(a,s,u){a=a._reactInternals;var d=Un(),g=Ca(d);g.tag=1,g.payload=s,u!=null&&(g.callback=u),s=wa(a,g,d),s!==null&&(wn(s,a,d),Go(s,a,d))},enqueueForceUpdate:function(a,s){a=a._reactInternals;var u=Un(),d=Ca(u);d.tag=2,s!=null&&(d.callback=s),s=wa(a,d,u),s!==null&&(wn(s,a,u),Go(s,a,u))}};function ty(a,s,u,d,g,b,A){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(d,b,A):s.prototype&&s.prototype.isPureReactComponent?!Bo(u,d)||!Bo(g,b):!0}function ny(a,s,u,d){a=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(u,d),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(u,d),s.state!==a&&Jh.enqueueReplaceState(s,s.state,null)}function Ai(a,s){var u=s;if("ref"in s){u={};for(var d in s)d!=="ref"&&(u[d]=s[d])}if(a=a.defaultProps){u===s&&(u=m({},u));for(var g in a)u[g]===void 0&&(u[g]=a[g])}return u}function ry(a){Lu(a)}function ay(a){console.error(a)}function iy(a){Lu(a)}function tc(a,s){try{var u=a.onUncaughtError;u(s.value,{componentStack:s.stack})}catch(d){setTimeout(function(){throw d})}}function sy(a,s,u){try{var d=a.onCaughtError;d(u.value,{componentStack:u.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(g){setTimeout(function(){throw g})}}function em(a,s,u){return u=Ca(u),u.tag=3,u.payload={element:null},u.callback=function(){tc(a,s)},u}function oy(a){return a=Ca(a),a.tag=3,a}function ly(a,s,u,d){var g=u.type.getDerivedStateFromError;if(typeof g=="function"){var b=d.value;a.payload=function(){return g(b)},a.callback=function(){sy(s,u,d)}}var A=u.stateNode;A!==null&&typeof A.componentDidCatch=="function"&&(a.callback=function(){sy(s,u,d),typeof g!="function"&&(Ia===null?Ia=new Set([this]):Ia.add(this));var R=d.stack;this.componentDidCatch(d.value,{componentStack:R!==null?R:""})})}function $R(a,s,u,d,g){if(u.flags|=32768,d!==null&&typeof d=="object"&&typeof d.then=="function"){if(s=u.alternate,s!==null&&vs(s,u,g,!0),u=Mn.current,u!==null){switch(u.tag){case 31:case 13:return Zn===null?hc():u.alternate===null&&Ct===0&&(Ct=3),u.flags&=-257,u.flags|=65536,u.lanes=g,d===Fu?u.flags|=16384:(s=u.updateQueue,s===null?u.updateQueue=new Set([d]):s.add(d),Am(a,d,g)),!1;case 22:return u.flags|=65536,d===Fu?u.flags|=16384:(s=u.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([d])},u.updateQueue=s):(u=s.retryQueue,u===null?s.retryQueue=new Set([d]):u.add(d)),Am(a,d,g)),!1}throw Error(r(435,u.tag))}return Am(a,d,g),hc(),!1}if(Ke)return s=Mn.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=g,d!==yh&&(a=Error(r(422),{cause:d}),Ho(Xn(a,u)))):(d!==yh&&(s=Error(r(423),{cause:d}),Ho(Xn(s,u))),a=a.current.alternate,a.flags|=65536,g&=-g,a.lanes|=g,d=Xn(d,u),g=em(a.stateNode,d,g),Rh(a,g),Ct!==4&&(Ct=2)),!1;var b=Error(r(520),{cause:d});if(b=Xn(b,u),il===null?il=[b]:il.push(b),Ct!==4&&(Ct=2),s===null)return!0;d=Xn(d,u),u=s;do{switch(u.tag){case 3:return u.flags|=65536,a=g&-g,u.lanes|=a,a=em(u.stateNode,d,a),Rh(u,a),!1;case 1:if(s=u.type,b=u.stateNode,(u.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Ia===null||!Ia.has(b))))return u.flags|=65536,g&=-g,u.lanes|=g,g=oy(g),ly(g,a,u,d),Rh(u,g),!1}u=u.return}while(u!==null);return!1}var tm=Error(r(461)),Mt=!1;function tn(a,s,u,d){s.child=a===null?dE(s,null,u,d):vi(s,a.child,u,d)}function uy(a,s,u,d,g){u=u.render;var b=s.ref;if("ref"in d){var A={};for(var R in d)R!=="ref"&&(A[R]=d[R])}else A=d;return yi(s),d=Ph(a,s,u,A,b,g),R=Bh(),a!==null&&!Mt?(jh(a,s,g),Kr(a,s,g)):(Ke&&R&&bh(s),s.flags|=1,tn(a,s,d,g),s.child)}function cy(a,s,u,d,g){if(a===null){var b=u.type;return typeof b=="function"&&!mh(b)&&b.defaultProps===void 0&&u.compare===null?(s.tag=15,s.type=b,fy(a,s,b,d,g)):(a=Pu(u.type,null,d,s,s.mode,g),a.ref=s.ref,a.return=s,s.child=a)}if(b=a.child,!um(a,g)){var A=b.memoizedProps;if(u=u.compare,u=u!==null?u:Bo,u(A,d)&&a.ref===s.ref)return Kr(a,s,g)}return s.flags|=1,a=Gr(b,d),a.ref=s.ref,a.return=s,s.child=a}function fy(a,s,u,d,g){if(a!==null){var b=a.memoizedProps;if(Bo(b,d)&&a.ref===s.ref)if(Mt=!1,s.pendingProps=d=b,um(a,g))(a.flags&131072)!==0&&(Mt=!0);else return s.lanes=a.lanes,Kr(a,s,g)}return nm(a,s,u,d,g)}function dy(a,s,u,d){var g=d.children,b=a!==null?a.memoizedState:null;if(a===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),d.mode==="hidden"){if((s.flags&128)!==0){if(b=b!==null?b.baseLanes|u:u,a!==null){for(d=s.child=a.child,g=0;d!==null;)g=g|d.lanes|d.childLanes,d=d.sibling;d=g&~b}else d=0,s.child=null;return hy(a,s,b,u,d)}if((u&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},a!==null&&Hu(s,b!==null?b.cachePool:null),b!==null?pE(s,b):Lh(),gE(s);else return d=s.lanes=536870912,hy(a,s,b!==null?b.baseLanes|u:u,u,d)}else b!==null?(Hu(s,b.cachePool),pE(s,b),Na(),s.memoizedState=null):(a!==null&&Hu(s,null),Lh(),Na());return tn(a,s,g,u),s.child}function Zo(a,s){return a!==null&&a.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function hy(a,s,u,d,g){var b=Ch();return b=b===null?null:{parent:It._currentValue,pool:b},s.memoizedState={baseLanes:u,cachePool:b},a!==null&&Hu(s,null),Lh(),gE(s),a!==null&&vs(a,s,d,!0),s.childLanes=g,null}function nc(a,s){return s=ac({mode:s.mode,children:s.children},a.mode),s.ref=a.ref,a.child=s,s.return=a,s}function my(a,s,u){return vi(s,a.child,null,u),a=nc(s,s.pendingProps),a.flags|=2,Pn(s),s.memoizedState=null,a}function VR(a,s,u){var d=s.pendingProps,g=(s.flags&128)!==0;if(s.flags&=-129,a===null){if(Ke){if(d.mode==="hidden")return a=nc(s,d),s.lanes=536870912,Zo(null,a);if(Dh(s),(a=_t)?(a=C_(a,Kn),a=a!==null&&a.data==="&"?a:null,a!==null&&(s.memoizedState={dehydrated:a,treeContext:xa!==null?{id:Tr,overflow:vr}:null,retryLane:536870912,hydrationErrors:null},u=Kb(a),u.return=s,s.child=u,Jt=s,_t=null)):a=null,a===null)throw va(s);return s.lanes=536870912,null}return nc(s,d)}var b=a.memoizedState;if(b!==null){var A=b.dehydrated;if(Dh(s),g)if(s.flags&256)s.flags&=-257,s=my(a,s,u);else if(s.memoizedState!==null)s.child=a.child,s.flags|=128,s=null;else throw Error(r(558));else if(Mt||vs(a,s,u,!1),g=(u&a.childLanes)!==0,Mt||g){if(d=gt,d!==null&&(A=ab(d,u),A!==0&&A!==b.retryLane))throw b.retryLane=A,pi(a,A),wn(d,a,A),tm;hc(),s=my(a,s,u)}else a=b.treeContext,_t=Jn(A.nextSibling),Jt=s,Ke=!0,Ta=null,Kn=!1,a!==null&&eE(s,a),s=nc(s,d),s.flags|=4096;return s}return a=Gr(a.child,{mode:d.mode,children:d.children}),a.ref=s.ref,s.child=a,a.return=s,a}function rc(a,s){var u=s.ref;if(u===null)a!==null&&a.ref!==null&&(s.flags|=4194816);else{if(typeof u!="function"&&typeof u!="object")throw Error(r(284));(a===null||a.ref!==u)&&(s.flags|=4194816)}}function nm(a,s,u,d,g){return yi(s),u=Ph(a,s,u,d,void 0,g),d=Bh(),a!==null&&!Mt?(jh(a,s,g),Kr(a,s,g)):(Ke&&d&&bh(s),s.flags|=1,tn(a,s,u,g),s.child)}function py(a,s,u,d,g,b){return yi(s),s.updateQueue=null,u=EE(s,d,u,g),bE(a),d=Bh(),a!==null&&!Mt?(jh(a,s,b),Kr(a,s,b)):(Ke&&d&&bh(s),s.flags|=1,tn(a,s,u,b),s.child)}function gy(a,s,u,d,g){if(yi(s),s.stateNode===null){var b=ys,A=u.contextType;typeof A=="object"&&A!==null&&(b=en(A)),b=new u(d,b),s.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,b.updater=Jh,s.stateNode=b,b._reactInternals=s,b=s.stateNode,b.props=d,b.state=s.memoizedState,b.refs={},kh(s),A=u.contextType,b.context=typeof A=="object"&&A!==null?en(A):ys,b.state=s.memoizedState,A=u.getDerivedStateFromProps,typeof A=="function"&&(Zh(s,u,A,d),b.state=s.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(A=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),A!==b.state&&Jh.enqueueReplaceState(b,b.state,null),Yo(s,d,b,g),qo(),b.state=s.memoizedState),typeof b.componentDidMount=="function"&&(s.flags|=4194308),d=!0}else if(a===null){b=s.stateNode;var R=s.memoizedProps,F=Ai(u,R);b.props=F;var K=b.context,se=u.contextType;A=ys,typeof se=="object"&&se!==null&&(A=en(se));var fe=u.getDerivedStateFromProps;se=typeof fe=="function"||typeof b.getSnapshotBeforeUpdate=="function",R=s.pendingProps!==R,se||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(R||K!==A)&&ny(s,b,d,A),Aa=!1;var Z=s.memoizedState;b.state=Z,Yo(s,d,b,g),qo(),K=s.memoizedState,R||Z!==K||Aa?(typeof fe=="function"&&(Zh(s,u,fe,d),K=s.memoizedState),(F=Aa||ty(s,u,F,d,Z,K,A))?(se||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(s.flags|=4194308)):(typeof b.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=d,s.memoizedState=K),b.props=d,b.state=K,b.context=A,d=F):(typeof b.componentDidMount=="function"&&(s.flags|=4194308),d=!1)}else{b=s.stateNode,Nh(a,s),A=s.memoizedProps,se=Ai(u,A),b.props=se,fe=s.pendingProps,Z=b.context,K=u.contextType,F=ys,typeof K=="object"&&K!==null&&(F=en(K)),R=u.getDerivedStateFromProps,(K=typeof R=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(A!==fe||Z!==F)&&ny(s,b,d,F),Aa=!1,Z=s.memoizedState,b.state=Z,Yo(s,d,b,g),qo();var ne=s.memoizedState;A!==fe||Z!==ne||Aa||a!==null&&a.dependencies!==null&&ju(a.dependencies)?(typeof R=="function"&&(Zh(s,u,R,d),ne=s.memoizedState),(se=Aa||ty(s,u,se,d,Z,ne,F)||a!==null&&a.dependencies!==null&&ju(a.dependencies))?(K||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(d,ne,F),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(d,ne,F)),typeof b.componentDidUpdate=="function"&&(s.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof b.componentDidUpdate!="function"||A===a.memoizedProps&&Z===a.memoizedState||(s.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||A===a.memoizedProps&&Z===a.memoizedState||(s.flags|=1024),s.memoizedProps=d,s.memoizedState=ne),b.props=d,b.state=ne,b.context=F,d=se):(typeof b.componentDidUpdate!="function"||A===a.memoizedProps&&Z===a.memoizedState||(s.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||A===a.memoizedProps&&Z===a.memoizedState||(s.flags|=1024),d=!1)}return b=d,rc(a,s),d=(s.flags&128)!==0,b||d?(b=s.stateNode,u=d&&typeof u.getDerivedStateFromError!="function"?null:b.render(),s.flags|=1,a!==null&&d?(s.child=vi(s,a.child,null,g),s.child=vi(s,null,u,g)):tn(a,s,u,g),s.memoizedState=b.state,a=s.child):a=Kr(a,s,g),a}function by(a,s,u,d){return bi(),s.flags|=256,tn(a,s,u,d),s.child}var rm={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function am(a){return{baseLanes:a,cachePool:sE()}}function im(a,s,u){return a=a!==null?a.childLanes&~u:0,s&&(a|=jn),a}function Ey(a,s,u){var d=s.pendingProps,g=!1,b=(s.flags&128)!==0,A;if((A=b)||(A=a!==null&&a.memoizedState===null?!1:(Nt.current&2)!==0),A&&(g=!0,s.flags&=-129),A=(s.flags&32)!==0,s.flags&=-33,a===null){if(Ke){if(g?ka(s):Na(),(a=_t)?(a=C_(a,Kn),a=a!==null&&a.data!=="&"?a:null,a!==null&&(s.memoizedState={dehydrated:a,treeContext:xa!==null?{id:Tr,overflow:vr}:null,retryLane:536870912,hydrationErrors:null},u=Kb(a),u.return=s,s.child=u,Jt=s,_t=null)):a=null,a===null)throw va(s);return zm(a)?s.lanes=32:s.lanes=536870912,null}var R=d.children;return d=d.fallback,g?(Na(),g=s.mode,R=ac({mode:"hidden",children:R},g),d=gi(d,g,u,null),R.return=s,d.return=s,R.sibling=d,s.child=R,d=s.child,d.memoizedState=am(u),d.childLanes=im(a,A,u),s.memoizedState=rm,Zo(null,d)):(ka(s),sm(s,R))}var F=a.memoizedState;if(F!==null&&(R=F.dehydrated,R!==null)){if(b)s.flags&256?(ka(s),s.flags&=-257,s=om(a,s,u)):s.memoizedState!==null?(Na(),s.child=a.child,s.flags|=128,s=null):(Na(),R=d.fallback,g=s.mode,d=ac({mode:"visible",children:d.children},g),R=gi(R,g,u,null),R.flags|=2,d.return=s,R.return=s,d.sibling=R,s.child=d,vi(s,a.child,null,u),d=s.child,d.memoizedState=am(u),d.childLanes=im(a,A,u),s.memoizedState=rm,s=Zo(null,d));else if(ka(s),zm(R)){if(A=R.nextSibling&&R.nextSibling.dataset,A)var K=A.dgst;A=K,d=Error(r(419)),d.stack="",d.digest=A,Ho({value:d,source:null,stack:null}),s=om(a,s,u)}else if(Mt||vs(a,s,u,!1),A=(u&a.childLanes)!==0,Mt||A){if(A=gt,A!==null&&(d=ab(A,u),d!==0&&d!==F.retryLane))throw F.retryLane=d,pi(a,d),wn(A,a,d),tm;Hm(R)||hc(),s=om(a,s,u)}else Hm(R)?(s.flags|=192,s.child=a.child,s=null):(a=F.treeContext,_t=Jn(R.nextSibling),Jt=s,Ke=!0,Ta=null,Kn=!1,a!==null&&eE(s,a),s=sm(s,d.children),s.flags|=4096);return s}return g?(Na(),R=d.fallback,g=s.mode,F=a.child,K=F.sibling,d=Gr(F,{mode:"hidden",children:d.children}),d.subtreeFlags=F.subtreeFlags&65011712,K!==null?R=Gr(K,R):(R=gi(R,g,u,null),R.flags|=2),R.return=s,d.return=s,d.sibling=R,s.child=d,Zo(null,d),d=s.child,R=a.child.memoizedState,R===null?R=am(u):(g=R.cachePool,g!==null?(F=It._currentValue,g=g.parent!==F?{parent:F,pool:F}:g):g=sE(),R={baseLanes:R.baseLanes|u,cachePool:g}),d.memoizedState=R,d.childLanes=im(a,A,u),s.memoizedState=rm,Zo(a.child,d)):(ka(s),u=a.child,a=u.sibling,u=Gr(u,{mode:"visible",children:d.children}),u.return=s,u.sibling=null,a!==null&&(A=s.deletions,A===null?(s.deletions=[a],s.flags|=16):A.push(a)),s.child=u,s.memoizedState=null,u)}function sm(a,s){return s=ac({mode:"visible",children:s},a.mode),s.return=a,a.child=s}function ac(a,s){return a=Dn(22,a,null,s),a.lanes=0,a}function om(a,s,u){return vi(s,a.child,null,u),a=sm(s,s.pendingProps.children),a.flags|=2,s.memoizedState=null,a}function yy(a,s,u){a.lanes|=s;var d=a.alternate;d!==null&&(d.lanes|=s),Th(a.return,s,u)}function lm(a,s,u,d,g,b){var A=a.memoizedState;A===null?a.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:d,tail:u,tailMode:g,treeForkCount:b}:(A.isBackwards=s,A.rendering=null,A.renderingStartTime=0,A.last=d,A.tail=u,A.tailMode=g,A.treeForkCount=b)}function _y(a,s,u){var d=s.pendingProps,g=d.revealOrder,b=d.tail;d=d.children;var A=Nt.current,R=(A&2)!==0;if(R?(A=A&1|2,s.flags|=128):A&=1,D(Nt,A),tn(a,s,d,u),d=Ke?Uo:0,!R&&a!==null&&(a.flags&128)!==0)e:for(a=s.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&yy(a,u,s);else if(a.tag===19)yy(a,u,s);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===s)break e;for(;a.sibling===null;){if(a.return===null||a.return===s)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}switch(g){case"forwards":for(u=s.child,g=null;u!==null;)a=u.alternate,a!==null&&qu(a)===null&&(g=u),u=u.sibling;u=g,u===null?(g=s.child,s.child=null):(g=u.sibling,u.sibling=null),lm(s,!1,g,u,b,d);break;case"backwards":case"unstable_legacy-backwards":for(u=null,g=s.child,s.child=null;g!==null;){if(a=g.alternate,a!==null&&qu(a)===null){s.child=g;break}a=g.sibling,g.sibling=u,u=g,g=a}lm(s,!0,u,null,b,d);break;case"together":lm(s,!1,null,null,void 0,d);break;default:s.memoizedState=null}return s.child}function Kr(a,s,u){if(a!==null&&(s.dependencies=a.dependencies),La|=s.lanes,(u&s.childLanes)===0)if(a!==null){if(vs(a,s,u,!1),(u&s.childLanes)===0)return null}else return null;if(a!==null&&s.child!==a.child)throw Error(r(153));if(s.child!==null){for(a=s.child,u=Gr(a,a.pendingProps),s.child=u,u.return=s;a.sibling!==null;)a=a.sibling,u=u.sibling=Gr(a,a.pendingProps),u.return=s;u.sibling=null}return s.child}function um(a,s){return(a.lanes&s)!==0?!0:(a=a.dependencies,!!(a!==null&&ju(a)))}function GR(a,s,u){switch(s.tag){case 3:ke(s,s.stateNode.containerInfo),Sa(s,It,a.memoizedState.cache),bi();break;case 27:case 5:De(s);break;case 4:ke(s,s.stateNode.containerInfo);break;case 10:Sa(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,Dh(s),null;break;case 13:var d=s.memoizedState;if(d!==null)return d.dehydrated!==null?(ka(s),s.flags|=128,null):(u&s.child.childLanes)!==0?Ey(a,s,u):(ka(s),a=Kr(a,s,u),a!==null?a.sibling:null);ka(s);break;case 19:var g=(a.flags&128)!==0;if(d=(u&s.childLanes)!==0,d||(vs(a,s,u,!1),d=(u&s.childLanes)!==0),g){if(d)return _y(a,s,u);s.flags|=128}if(g=s.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),D(Nt,Nt.current),d)break;return null;case 22:return s.lanes=0,dy(a,s,u,s.pendingProps);case 24:Sa(s,It,a.memoizedState.cache)}return Kr(a,s,u)}function xy(a,s,u){if(a!==null)if(a.memoizedProps!==s.pendingProps)Mt=!0;else{if(!um(a,u)&&(s.flags&128)===0)return Mt=!1,GR(a,s,u);Mt=(a.flags&131072)!==0}else Mt=!1,Ke&&(s.flags&1048576)!==0&&Jb(s,Uo,s.index);switch(s.lanes=0,s.tag){case 16:e:{var d=s.pendingProps;if(a=xi(s.elementType),s.type=a,typeof a=="function")mh(a)?(d=Ai(a,d),s.tag=1,s=gy(null,s,a,d,u)):(s.tag=0,s=nm(null,s,a,d,u));else{if(a!=null){var g=a.$$typeof;if(g===M){s.tag=11,s=uy(null,s,a,d,u);break e}else if(g===V){s.tag=14,s=cy(null,s,a,d,u);break e}}throw s=ue(a)||a,Error(r(306,s,""))}}return s;case 0:return nm(a,s,s.type,s.pendingProps,u);case 1:return d=s.type,g=Ai(d,s.pendingProps),gy(a,s,d,g,u);case 3:e:{if(ke(s,s.stateNode.containerInfo),a===null)throw Error(r(387));d=s.pendingProps;var b=s.memoizedState;g=b.element,Nh(a,s),Yo(s,d,null,u);var A=s.memoizedState;if(d=A.cache,Sa(s,It,d),d!==b.cache&&vh(s,[It],u,!0),qo(),d=A.element,b.isDehydrated)if(b={element:d,isDehydrated:!1,cache:A.cache},s.updateQueue.baseState=b,s.memoizedState=b,s.flags&256){s=by(a,s,d,u);break e}else if(d!==g){g=Xn(Error(r(424)),s),Ho(g),s=by(a,s,d,u);break e}else for(a=s.stateNode.containerInfo,a.nodeType===9?a=a.body:a=a.nodeName==="HTML"?a.ownerDocument.body:a,_t=Jn(a.firstChild),Jt=s,Ke=!0,Ta=null,Kn=!0,u=dE(s,null,d,u),s.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(bi(),d===g){s=Kr(a,s,u);break e}tn(a,s,d,u)}s=s.child}return s;case 26:return rc(a,s),a===null?(u=L_(s.type,null,s.pendingProps,null))?s.memoizedState=u:Ke||(u=s.type,a=s.pendingProps,d=_c(ye.current).createElement(u),d[Zt]=s,d[xn]=a,nn(d,u,a),qt(d),s.stateNode=d):s.memoizedState=L_(s.type,a.memoizedProps,s.pendingProps,a.memoizedState),null;case 27:return De(s),a===null&&Ke&&(d=s.stateNode=N_(s.type,s.pendingProps,ye.current),Jt=s,Kn=!0,g=_t,Ba(s.type)?(Fm=g,_t=Jn(d.firstChild)):_t=g),tn(a,s,s.pendingProps.children,u),rc(a,s),a===null&&(s.flags|=4194304),s.child;case 5:return a===null&&Ke&&((g=d=_t)&&(d=xO(d,s.type,s.pendingProps,Kn),d!==null?(s.stateNode=d,Jt=s,_t=Jn(d.firstChild),Kn=!1,g=!0):g=!1),g||va(s)),De(s),g=s.type,b=s.pendingProps,A=a!==null?a.memoizedProps:null,d=b.children,Bm(g,b)?d=null:A!==null&&Bm(g,A)&&(s.flags|=32),s.memoizedState!==null&&(g=Ph(a,s,PR,null,null,u),hl._currentValue=g),rc(a,s),tn(a,s,d,u),s.child;case 6:return a===null&&Ke&&((a=u=_t)&&(u=TO(u,s.pendingProps,Kn),u!==null?(s.stateNode=u,Jt=s,_t=null,a=!0):a=!1),a||va(s)),null;case 13:return Ey(a,s,u);case 4:return ke(s,s.stateNode.containerInfo),d=s.pendingProps,a===null?s.child=vi(s,null,d,u):tn(a,s,d,u),s.child;case 11:return uy(a,s,s.type,s.pendingProps,u);case 7:return tn(a,s,s.pendingProps,u),s.child;case 8:return tn(a,s,s.pendingProps.children,u),s.child;case 12:return tn(a,s,s.pendingProps.children,u),s.child;case 10:return d=s.pendingProps,Sa(s,s.type,d.value),tn(a,s,d.children,u),s.child;case 9:return g=s.type._context,d=s.pendingProps.children,yi(s),g=en(g),d=d(g),s.flags|=1,tn(a,s,d,u),s.child;case 14:return cy(a,s,s.type,s.pendingProps,u);case 15:return fy(a,s,s.type,s.pendingProps,u);case 19:return _y(a,s,u);case 31:return VR(a,s,u);case 22:return dy(a,s,u,s.pendingProps);case 24:return yi(s),d=en(It),a===null?(g=Ch(),g===null&&(g=gt,b=Sh(),g.pooledCache=b,b.refCount++,b!==null&&(g.pooledCacheLanes|=u),g=b),s.memoizedState={parent:d,cache:g},kh(s),Sa(s,It,g)):((a.lanes&u)!==0&&(Nh(a,s),Yo(s,null,null,u),qo()),g=a.memoizedState,b=s.memoizedState,g.parent!==d?(g={parent:d,cache:d},s.memoizedState=g,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=g),Sa(s,It,d)):(d=b.cache,Sa(s,It,d),d!==g.cache&&vh(s,[It],u,!0))),tn(a,s,s.pendingProps.children,u),s.child;case 29:throw s.pendingProps}throw Error(r(156,s.tag))}function Zr(a){a.flags|=4}function cm(a,s,u,d,g){if((s=(a.mode&32)!==0)&&(s=!1),s){if(a.flags|=16777216,(g&335544128)===g)if(a.stateNode.complete)a.flags|=8192;else if(Xy())a.flags|=8192;else throw Ti=Fu,wh}else a.flags&=-16777217}function Ty(a,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)a.flags&=-16777217;else if(a.flags|=16777216,!B_(s))if(Xy())a.flags|=8192;else throw Ti=Fu,wh}function ic(a,s){s!==null&&(a.flags|=4),a.flags&16384&&(s=a.tag!==22?tb():536870912,a.lanes|=s,Ms|=s)}function Jo(a,s){if(!Ke)switch(a.tailMode){case"hidden":s=a.tail;for(var u=null;s!==null;)s.alternate!==null&&(u=s),s=s.sibling;u===null?a.tail=null:u.sibling=null;break;case"collapsed":u=a.tail;for(var d=null;u!==null;)u.alternate!==null&&(d=u),u=u.sibling;d===null?s||a.tail===null?a.tail=null:a.tail.sibling=null:d.sibling=null}}function xt(a){var s=a.alternate!==null&&a.alternate.child===a.child,u=0,d=0;if(s)for(var g=a.child;g!==null;)u|=g.lanes|g.childLanes,d|=g.subtreeFlags&65011712,d|=g.flags&65011712,g.return=a,g=g.sibling;else for(g=a.child;g!==null;)u|=g.lanes|g.childLanes,d|=g.subtreeFlags,d|=g.flags,g.return=a,g=g.sibling;return a.subtreeFlags|=d,a.childLanes=u,s}function qR(a,s,u){var d=s.pendingProps;switch(Eh(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return xt(s),null;case 1:return xt(s),null;case 3:return u=s.stateNode,d=null,a!==null&&(d=a.memoizedState.cache),s.memoizedState.cache!==d&&(s.flags|=2048),Xr(It),Te(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(a===null||a.child===null)&&(Ts(s)?Zr(s):a===null||a.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,_h())),xt(s),null;case 26:var g=s.type,b=s.memoizedState;return a===null?(Zr(s),b!==null?(xt(s),Ty(s,b)):(xt(s),cm(s,g,null,d,u))):b?b!==a.memoizedState?(Zr(s),xt(s),Ty(s,b)):(xt(s),s.flags&=-16777217):(a=a.memoizedProps,a!==d&&Zr(s),xt(s),cm(s,g,a,d,u)),null;case 27:if(je(s),u=ye.current,g=s.type,a!==null&&s.stateNode!=null)a.memoizedProps!==d&&Zr(s);else{if(!d){if(s.stateNode===null)throw Error(r(166));return xt(s),null}a=ge.current,Ts(s)?tE(s):(a=N_(g,d,u),s.stateNode=a,Zr(s))}return xt(s),null;case 5:if(je(s),g=s.type,a!==null&&s.stateNode!=null)a.memoizedProps!==d&&Zr(s);else{if(!d){if(s.stateNode===null)throw Error(r(166));return xt(s),null}if(b=ge.current,Ts(s))tE(s);else{var A=_c(ye.current);switch(b){case 1:b=A.createElementNS("http://www.w3.org/2000/svg",g);break;case 2:b=A.createElementNS("http://www.w3.org/1998/Math/MathML",g);break;default:switch(g){case"svg":b=A.createElementNS("http://www.w3.org/2000/svg",g);break;case"math":b=A.createElementNS("http://www.w3.org/1998/Math/MathML",g);break;case"script":b=A.createElement("div"),b.innerHTML="<script><\/script>",b=b.removeChild(b.firstChild);break;case"select":b=typeof d.is=="string"?A.createElement("select",{is:d.is}):A.createElement("select"),d.multiple?b.multiple=!0:d.size&&(b.size=d.size);break;default:b=typeof d.is=="string"?A.createElement(g,{is:d.is}):A.createElement(g)}}b[Zt]=s,b[xn]=d;e:for(A=s.child;A!==null;){if(A.tag===5||A.tag===6)b.appendChild(A.stateNode);else if(A.tag!==4&&A.tag!==27&&A.child!==null){A.child.return=A,A=A.child;continue}if(A===s)break e;for(;A.sibling===null;){if(A.return===null||A.return===s)break e;A=A.return}A.sibling.return=A.return,A=A.sibling}s.stateNode=b;e:switch(nn(b,g,d),g){case"button":case"input":case"select":case"textarea":d=!!d.autoFocus;break e;case"img":d=!0;break e;default:d=!1}d&&Zr(s)}}return xt(s),cm(s,s.type,a===null?null:a.memoizedProps,s.pendingProps,u),null;case 6:if(a&&s.stateNode!=null)a.memoizedProps!==d&&Zr(s);else{if(typeof d!="string"&&s.stateNode===null)throw Error(r(166));if(a=ye.current,Ts(s)){if(a=s.stateNode,u=s.memoizedProps,d=null,g=Jt,g!==null)switch(g.tag){case 27:case 5:d=g.memoizedProps}a[Zt]=s,a=!!(a.nodeValue===u||d!==null&&d.suppressHydrationWarning===!0||E_(a.nodeValue,u)),a||va(s,!0)}else a=_c(a).createTextNode(d),a[Zt]=s,s.stateNode=a}return xt(s),null;case 31:if(u=s.memoizedState,a===null||a.memoizedState!==null){if(d=Ts(s),u!==null){if(a===null){if(!d)throw Error(r(318));if(a=s.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(557));a[Zt]=s}else bi(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;xt(s),a=!1}else u=_h(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=u),a=!0;if(!a)return s.flags&256?(Pn(s),s):(Pn(s),null);if((s.flags&128)!==0)throw Error(r(558))}return xt(s),null;case 13:if(d=s.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(g=Ts(s),d!==null&&d.dehydrated!==null){if(a===null){if(!g)throw Error(r(318));if(g=s.memoizedState,g=g!==null?g.dehydrated:null,!g)throw Error(r(317));g[Zt]=s}else bi(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;xt(s),g=!1}else g=_h(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=g),g=!0;if(!g)return s.flags&256?(Pn(s),s):(Pn(s),null)}return Pn(s),(s.flags&128)!==0?(s.lanes=u,s):(u=d!==null,a=a!==null&&a.memoizedState!==null,u&&(d=s.child,g=null,d.alternate!==null&&d.alternate.memoizedState!==null&&d.alternate.memoizedState.cachePool!==null&&(g=d.alternate.memoizedState.cachePool.pool),b=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(b=d.memoizedState.cachePool.pool),b!==g&&(d.flags|=2048)),u!==a&&u&&(s.child.flags|=8192),ic(s,s.updateQueue),xt(s),null);case 4:return Te(),a===null&&Lm(s.stateNode.containerInfo),xt(s),null;case 10:return Xr(s.type),xt(s),null;case 19:if(te(Nt),d=s.memoizedState,d===null)return xt(s),null;if(g=(s.flags&128)!==0,b=d.rendering,b===null)if(g)Jo(d,!1);else{if(Ct!==0||a!==null&&(a.flags&128)!==0)for(a=s.child;a!==null;){if(b=qu(a),b!==null){for(s.flags|=128,Jo(d,!1),a=b.updateQueue,s.updateQueue=a,ic(s,a),s.subtreeFlags=0,a=u,u=s.child;u!==null;)Wb(u,a),u=u.sibling;return D(Nt,Nt.current&1|2),Ke&&qr(s,d.treeForkCount),s.child}a=a.sibling}d.tail!==null&&fn()>cc&&(s.flags|=128,g=!0,Jo(d,!1),s.lanes=4194304)}else{if(!g)if(a=qu(b),a!==null){if(s.flags|=128,g=!0,a=a.updateQueue,s.updateQueue=a,ic(s,a),Jo(d,!0),d.tail===null&&d.tailMode==="hidden"&&!b.alternate&&!Ke)return xt(s),null}else 2*fn()-d.renderingStartTime>cc&&u!==536870912&&(s.flags|=128,g=!0,Jo(d,!1),s.lanes=4194304);d.isBackwards?(b.sibling=s.child,s.child=b):(a=d.last,a!==null?a.sibling=b:s.child=b,d.last=b)}return d.tail!==null?(a=d.tail,d.rendering=a,d.tail=a.sibling,d.renderingStartTime=fn(),a.sibling=null,u=Nt.current,D(Nt,g?u&1|2:u&1),Ke&&qr(s,d.treeForkCount),a):(xt(s),null);case 22:case 23:return Pn(s),Ih(),d=s.memoizedState!==null,a!==null?a.memoizedState!==null!==d&&(s.flags|=8192):d&&(s.flags|=8192),d?(u&536870912)!==0&&(s.flags&128)===0&&(xt(s),s.subtreeFlags&6&&(s.flags|=8192)):xt(s),u=s.updateQueue,u!==null&&ic(s,u.retryQueue),u=null,a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),d=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(d=s.memoizedState.cachePool.pool),d!==u&&(s.flags|=2048),a!==null&&te(_i),null;case 24:return u=null,a!==null&&(u=a.memoizedState.cache),s.memoizedState.cache!==u&&(s.flags|=2048),Xr(It),xt(s),null;case 25:return null;case 30:return null}throw Error(r(156,s.tag))}function YR(a,s){switch(Eh(s),s.tag){case 1:return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 3:return Xr(It),Te(),a=s.flags,(a&65536)!==0&&(a&128)===0?(s.flags=a&-65537|128,s):null;case 26:case 27:case 5:return je(s),null;case 31:if(s.memoizedState!==null){if(Pn(s),s.alternate===null)throw Error(r(340));bi()}return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 13:if(Pn(s),a=s.memoizedState,a!==null&&a.dehydrated!==null){if(s.alternate===null)throw Error(r(340));bi()}return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 19:return te(Nt),null;case 4:return Te(),null;case 10:return Xr(s.type),null;case 22:case 23:return Pn(s),Ih(),a!==null&&te(_i),a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 24:return Xr(It),null;case 25:return null;default:return null}}function vy(a,s){switch(Eh(s),s.tag){case 3:Xr(It),Te();break;case 26:case 27:case 5:je(s);break;case 4:Te();break;case 31:s.memoizedState!==null&&Pn(s);break;case 13:Pn(s);break;case 19:te(Nt);break;case 10:Xr(s.type);break;case 22:case 23:Pn(s),Ih(),a!==null&&te(_i);break;case 24:Xr(It)}}function el(a,s){try{var u=s.updateQueue,d=u!==null?u.lastEffect:null;if(d!==null){var g=d.next;u=g;do{if((u.tag&a)===a){d=void 0;var b=u.create,A=u.inst;d=b(),A.destroy=d}u=u.next}while(u!==g)}}catch(R){ut(s,s.return,R)}}function Ra(a,s,u){try{var d=s.updateQueue,g=d!==null?d.lastEffect:null;if(g!==null){var b=g.next;d=b;do{if((d.tag&a)===a){var A=d.inst,R=A.destroy;if(R!==void 0){A.destroy=void 0,g=s;var F=u,K=R;try{K()}catch(se){ut(g,F,se)}}}d=d.next}while(d!==b)}}catch(se){ut(s,s.return,se)}}function Sy(a){var s=a.updateQueue;if(s!==null){var u=a.stateNode;try{mE(s,u)}catch(d){ut(a,a.return,d)}}}function Ay(a,s,u){u.props=Ai(a.type,a.memoizedProps),u.state=a.memoizedState;try{u.componentWillUnmount()}catch(d){ut(a,s,d)}}function tl(a,s){try{var u=a.ref;if(u!==null){switch(a.tag){case 26:case 27:case 5:var d=a.stateNode;break;case 30:d=a.stateNode;break;default:d=a.stateNode}typeof u=="function"?a.refCleanup=u(d):u.current=d}}catch(g){ut(a,s,g)}}function Sr(a,s){var u=a.ref,d=a.refCleanup;if(u!==null)if(typeof d=="function")try{d()}catch(g){ut(a,s,g)}finally{a.refCleanup=null,a=a.alternate,a!=null&&(a.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(g){ut(a,s,g)}else u.current=null}function Cy(a){var s=a.type,u=a.memoizedProps,d=a.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":u.autoFocus&&d.focus();break e;case"img":u.src?d.src=u.src:u.srcSet&&(d.srcset=u.srcSet)}}catch(g){ut(a,a.return,g)}}function fm(a,s,u){try{var d=a.stateNode;pO(d,a.type,u,s),d[xn]=s}catch(g){ut(a,a.return,g)}}function wy(a){return a.tag===5||a.tag===3||a.tag===26||a.tag===27&&Ba(a.type)||a.tag===4}function dm(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||wy(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.tag===27&&Ba(a.type)||a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function hm(a,s,u){var d=a.tag;if(d===5||d===6)a=a.stateNode,s?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(a,s):(s=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,s.appendChild(a),u=u._reactRootContainer,u!=null||s.onclick!==null||(s.onclick=$r));else if(d!==4&&(d===27&&Ba(a.type)&&(u=a.stateNode,s=null),a=a.child,a!==null))for(hm(a,s,u),a=a.sibling;a!==null;)hm(a,s,u),a=a.sibling}function sc(a,s,u){var d=a.tag;if(d===5||d===6)a=a.stateNode,s?u.insertBefore(a,s):u.appendChild(a);else if(d!==4&&(d===27&&Ba(a.type)&&(u=a.stateNode),a=a.child,a!==null))for(sc(a,s,u),a=a.sibling;a!==null;)sc(a,s,u),a=a.sibling}function ky(a){var s=a.stateNode,u=a.memoizedProps;try{for(var d=a.type,g=s.attributes;g.length;)s.removeAttributeNode(g[0]);nn(s,d,u),s[Zt]=a,s[xn]=u}catch(b){ut(a,a.return,b)}}var Jr=!1,Pt=!1,mm=!1,Ny=typeof WeakSet=="function"?WeakSet:Set,Yt=null;function XR(a,s){if(a=a.containerInfo,Mm=wc,a=zb(a),oh(a)){if("selectionStart"in a)var u={start:a.selectionStart,end:a.selectionEnd};else e:{u=(u=a.ownerDocument)&&u.defaultView||window;var d=u.getSelection&&u.getSelection();if(d&&d.rangeCount!==0){u=d.anchorNode;var g=d.anchorOffset,b=d.focusNode;d=d.focusOffset;try{u.nodeType,b.nodeType}catch{u=null;break e}var A=0,R=-1,F=-1,K=0,se=0,fe=a,Z=null;t:for(;;){for(var ne;fe!==u||g!==0&&fe.nodeType!==3||(R=A+g),fe!==b||d!==0&&fe.nodeType!==3||(F=A+d),fe.nodeType===3&&(A+=fe.nodeValue.length),(ne=fe.firstChild)!==null;)Z=fe,fe=ne;for(;;){if(fe===a)break t;if(Z===u&&++K===g&&(R=A),Z===b&&++se===d&&(F=A),(ne=fe.nextSibling)!==null)break;fe=Z,Z=fe.parentNode}fe=ne}u=R===-1||F===-1?null:{start:R,end:F}}else u=null}u=u||{start:0,end:0}}else u=null;for(Pm={focusedElem:a,selectionRange:u},wc=!1,Yt=s;Yt!==null;)if(s=Yt,a=s.child,(s.subtreeFlags&1028)!==0&&a!==null)a.return=s,Yt=a;else for(;Yt!==null;){switch(s=Yt,b=s.alternate,a=s.flags,s.tag){case 0:if((a&4)!==0&&(a=s.updateQueue,a=a!==null?a.events:null,a!==null))for(u=0;u<a.length;u++)g=a[u],g.ref.impl=g.nextImpl;break;case 11:case 15:break;case 1:if((a&1024)!==0&&b!==null){a=void 0,u=s,g=b.memoizedProps,b=b.memoizedState,d=u.stateNode;try{var Ae=Ai(u.type,g);a=d.getSnapshotBeforeUpdate(Ae,b),d.__reactInternalSnapshotBeforeUpdate=a}catch(Oe){ut(u,u.return,Oe)}}break;case 3:if((a&1024)!==0){if(a=s.stateNode.containerInfo,u=a.nodeType,u===9)Um(a);else if(u===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":Um(a);break;default:a.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((a&1024)!==0)throw Error(r(163))}if(a=s.sibling,a!==null){a.return=s.return,Yt=a;break}Yt=s.return}}function Ry(a,s,u){var d=u.flags;switch(u.tag){case 0:case 11:case 15:ta(a,u),d&4&&el(5,u);break;case 1:if(ta(a,u),d&4)if(a=u.stateNode,s===null)try{a.componentDidMount()}catch(A){ut(u,u.return,A)}else{var g=Ai(u.type,s.memoizedProps);s=s.memoizedState;try{a.componentDidUpdate(g,s,a.__reactInternalSnapshotBeforeUpdate)}catch(A){ut(u,u.return,A)}}d&64&&Sy(u),d&512&&tl(u,u.return);break;case 3:if(ta(a,u),d&64&&(a=u.updateQueue,a!==null)){if(s=null,u.child!==null)switch(u.child.tag){case 27:case 5:s=u.child.stateNode;break;case 1:s=u.child.stateNode}try{mE(a,s)}catch(A){ut(u,u.return,A)}}break;case 27:s===null&&d&4&&ky(u);case 26:case 5:ta(a,u),s===null&&d&4&&Cy(u),d&512&&tl(u,u.return);break;case 12:ta(a,u);break;case 31:ta(a,u),d&4&&Iy(a,u);break;case 13:ta(a,u),d&4&&Dy(a,u),d&64&&(a=u.memoizedState,a!==null&&(a=a.dehydrated,a!==null&&(u=rO.bind(null,u),vO(a,u))));break;case 22:if(d=u.memoizedState!==null||Jr,!d){s=s!==null&&s.memoizedState!==null||Pt,g=Jr;var b=Pt;Jr=d,(Pt=s)&&!b?na(a,u,(u.subtreeFlags&8772)!==0):ta(a,u),Jr=g,Pt=b}break;case 30:break;default:ta(a,u)}}function Oy(a){var s=a.alternate;s!==null&&(a.alternate=null,Oy(s)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(s=a.stateNode,s!==null&&Vd(s)),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}var Tt=null,vn=!1;function ea(a,s,u){for(u=u.child;u!==null;)Ly(a,s,u),u=u.sibling}function Ly(a,s,u){if(jt&&typeof jt.onCommitFiberUnmount=="function")try{jt.onCommitFiberUnmount(dn,u)}catch{}switch(u.tag){case 26:Pt||Sr(u,s),ea(a,s,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:Pt||Sr(u,s);var d=Tt,g=vn;Ba(u.type)&&(Tt=u.stateNode,vn=!1),ea(a,s,u),cl(u.stateNode),Tt=d,vn=g;break;case 5:Pt||Sr(u,s);case 6:if(d=Tt,g=vn,Tt=null,ea(a,s,u),Tt=d,vn=g,Tt!==null)if(vn)try{(Tt.nodeType===9?Tt.body:Tt.nodeName==="HTML"?Tt.ownerDocument.body:Tt).removeChild(u.stateNode)}catch(b){ut(u,s,b)}else try{Tt.removeChild(u.stateNode)}catch(b){ut(u,s,b)}break;case 18:Tt!==null&&(vn?(a=Tt,S_(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,u.stateNode),$s(a)):S_(Tt,u.stateNode));break;case 4:d=Tt,g=vn,Tt=u.stateNode.containerInfo,vn=!0,ea(a,s,u),Tt=d,vn=g;break;case 0:case 11:case 14:case 15:Ra(2,u,s),Pt||Ra(4,u,s),ea(a,s,u);break;case 1:Pt||(Sr(u,s),d=u.stateNode,typeof d.componentWillUnmount=="function"&&Ay(u,s,d)),ea(a,s,u);break;case 21:ea(a,s,u);break;case 22:Pt=(d=Pt)||u.memoizedState!==null,ea(a,s,u),Pt=d;break;default:ea(a,s,u)}}function Iy(a,s){if(s.memoizedState===null&&(a=s.alternate,a!==null&&(a=a.memoizedState,a!==null))){a=a.dehydrated;try{$s(a)}catch(u){ut(s,s.return,u)}}}function Dy(a,s){if(s.memoizedState===null&&(a=s.alternate,a!==null&&(a=a.memoizedState,a!==null&&(a=a.dehydrated,a!==null))))try{$s(a)}catch(u){ut(s,s.return,u)}}function QR(a){switch(a.tag){case 31:case 13:case 19:var s=a.stateNode;return s===null&&(s=a.stateNode=new Ny),s;case 22:return a=a.stateNode,s=a._retryCache,s===null&&(s=a._retryCache=new Ny),s;default:throw Error(r(435,a.tag))}}function oc(a,s){var u=QR(a);s.forEach(function(d){if(!u.has(d)){u.add(d);var g=aO.bind(null,a,d);d.then(g,g)}})}function Sn(a,s){var u=s.deletions;if(u!==null)for(var d=0;d<u.length;d++){var g=u[d],b=a,A=s,R=A;e:for(;R!==null;){switch(R.tag){case 27:if(Ba(R.type)){Tt=R.stateNode,vn=!1;break e}break;case 5:Tt=R.stateNode,vn=!1;break e;case 3:case 4:Tt=R.stateNode.containerInfo,vn=!0;break e}R=R.return}if(Tt===null)throw Error(r(160));Ly(b,A,g),Tt=null,vn=!1,b=g.alternate,b!==null&&(b.return=null),g.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)My(s,a),s=s.sibling}var ur=null;function My(a,s){var u=a.alternate,d=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:Sn(s,a),An(a),d&4&&(Ra(3,a,a.return),el(3,a),Ra(5,a,a.return));break;case 1:Sn(s,a),An(a),d&512&&(Pt||u===null||Sr(u,u.return)),d&64&&Jr&&(a=a.updateQueue,a!==null&&(d=a.callbacks,d!==null&&(u=a.shared.hiddenCallbacks,a.shared.hiddenCallbacks=u===null?d:u.concat(d))));break;case 26:var g=ur;if(Sn(s,a),An(a),d&512&&(Pt||u===null||Sr(u,u.return)),d&4){var b=u!==null?u.memoizedState:null;if(d=a.memoizedState,u===null)if(d===null)if(a.stateNode===null){e:{d=a.type,u=a.memoizedProps,g=g.ownerDocument||g;t:switch(d){case"title":b=g.getElementsByTagName("title")[0],(!b||b[ko]||b[Zt]||b.namespaceURI==="http://www.w3.org/2000/svg"||b.hasAttribute("itemprop"))&&(b=g.createElement(d),g.head.insertBefore(b,g.querySelector("head > title"))),nn(b,d,u),b[Zt]=a,qt(b),d=b;break e;case"link":var A=M_("link","href",g).get(d+(u.href||""));if(A){for(var R=0;R<A.length;R++)if(b=A[R],b.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&b.getAttribute("rel")===(u.rel==null?null:u.rel)&&b.getAttribute("title")===(u.title==null?null:u.title)&&b.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){A.splice(R,1);break t}}b=g.createElement(d),nn(b,d,u),g.head.appendChild(b);break;case"meta":if(A=M_("meta","content",g).get(d+(u.content||""))){for(R=0;R<A.length;R++)if(b=A[R],b.getAttribute("content")===(u.content==null?null:""+u.content)&&b.getAttribute("name")===(u.name==null?null:u.name)&&b.getAttribute("property")===(u.property==null?null:u.property)&&b.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&b.getAttribute("charset")===(u.charSet==null?null:u.charSet)){A.splice(R,1);break t}}b=g.createElement(d),nn(b,d,u),g.head.appendChild(b);break;default:throw Error(r(468,d))}b[Zt]=a,qt(b),d=b}a.stateNode=d}else P_(g,a.type,a.stateNode);else a.stateNode=D_(g,d,a.memoizedProps);else b!==d?(b===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):b.count--,d===null?P_(g,a.type,a.stateNode):D_(g,d,a.memoizedProps)):d===null&&a.stateNode!==null&&fm(a,a.memoizedProps,u.memoizedProps)}break;case 27:Sn(s,a),An(a),d&512&&(Pt||u===null||Sr(u,u.return)),u!==null&&d&4&&fm(a,a.memoizedProps,u.memoizedProps);break;case 5:if(Sn(s,a),An(a),d&512&&(Pt||u===null||Sr(u,u.return)),a.flags&32){g=a.stateNode;try{ds(g,"")}catch(Ae){ut(a,a.return,Ae)}}d&4&&a.stateNode!=null&&(g=a.memoizedProps,fm(a,g,u!==null?u.memoizedProps:g)),d&1024&&(mm=!0);break;case 6:if(Sn(s,a),An(a),d&4){if(a.stateNode===null)throw Error(r(162));d=a.memoizedProps,u=a.stateNode;try{u.nodeValue=d}catch(Ae){ut(a,a.return,Ae)}}break;case 3:if(vc=null,g=ur,ur=xc(s.containerInfo),Sn(s,a),ur=g,An(a),d&4&&u!==null&&u.memoizedState.isDehydrated)try{$s(s.containerInfo)}catch(Ae){ut(a,a.return,Ae)}mm&&(mm=!1,Py(a));break;case 4:d=ur,ur=xc(a.stateNode.containerInfo),Sn(s,a),An(a),ur=d;break;case 12:Sn(s,a),An(a);break;case 31:Sn(s,a),An(a),d&4&&(d=a.updateQueue,d!==null&&(a.updateQueue=null,oc(a,d)));break;case 13:Sn(s,a),An(a),a.child.flags&8192&&a.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(uc=fn()),d&4&&(d=a.updateQueue,d!==null&&(a.updateQueue=null,oc(a,d)));break;case 22:g=a.memoizedState!==null;var F=u!==null&&u.memoizedState!==null,K=Jr,se=Pt;if(Jr=K||g,Pt=se||F,Sn(s,a),Pt=se,Jr=K,An(a),d&8192)e:for(s=a.stateNode,s._visibility=g?s._visibility&-2:s._visibility|1,g&&(u===null||F||Jr||Pt||Ci(a)),u=null,s=a;;){if(s.tag===5||s.tag===26){if(u===null){F=u=s;try{if(b=F.stateNode,g)A=b.style,typeof A.setProperty=="function"?A.setProperty("display","none","important"):A.display="none";else{R=F.stateNode;var fe=F.memoizedProps.style,Z=fe!=null&&fe.hasOwnProperty("display")?fe.display:null;R.style.display=Z==null||typeof Z=="boolean"?"":(""+Z).trim()}}catch(Ae){ut(F,F.return,Ae)}}}else if(s.tag===6){if(u===null){F=s;try{F.stateNode.nodeValue=g?"":F.memoizedProps}catch(Ae){ut(F,F.return,Ae)}}}else if(s.tag===18){if(u===null){F=s;try{var ne=F.stateNode;g?A_(ne,!0):A_(F.stateNode,!1)}catch(Ae){ut(F,F.return,Ae)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===a)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===a)break e;for(;s.sibling===null;){if(s.return===null||s.return===a)break e;u===s&&(u=null),s=s.return}u===s&&(u=null),s.sibling.return=s.return,s=s.sibling}d&4&&(d=a.updateQueue,d!==null&&(u=d.retryQueue,u!==null&&(d.retryQueue=null,oc(a,u))));break;case 19:Sn(s,a),An(a),d&4&&(d=a.updateQueue,d!==null&&(a.updateQueue=null,oc(a,d)));break;case 30:break;case 21:break;default:Sn(s,a),An(a)}}function An(a){var s=a.flags;if(s&2){try{for(var u,d=a.return;d!==null;){if(wy(d)){u=d;break}d=d.return}if(u==null)throw Error(r(160));switch(u.tag){case 27:var g=u.stateNode,b=dm(a);sc(a,b,g);break;case 5:var A=u.stateNode;u.flags&32&&(ds(A,""),u.flags&=-33);var R=dm(a);sc(a,R,A);break;case 3:case 4:var F=u.stateNode.containerInfo,K=dm(a);hm(a,K,F);break;default:throw Error(r(161))}}catch(se){ut(a,a.return,se)}a.flags&=-3}s&4096&&(a.flags&=-4097)}function Py(a){if(a.subtreeFlags&1024)for(a=a.child;a!==null;){var s=a;Py(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),a=a.sibling}}function ta(a,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)Ry(a,s.alternate,s),s=s.sibling}function Ci(a){for(a=a.child;a!==null;){var s=a;switch(s.tag){case 0:case 11:case 14:case 15:Ra(4,s,s.return),Ci(s);break;case 1:Sr(s,s.return);var u=s.stateNode;typeof u.componentWillUnmount=="function"&&Ay(s,s.return,u),Ci(s);break;case 27:cl(s.stateNode);case 26:case 5:Sr(s,s.return),Ci(s);break;case 22:s.memoizedState===null&&Ci(s);break;case 30:Ci(s);break;default:Ci(s)}a=a.sibling}}function na(a,s,u){for(u=u&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var d=s.alternate,g=a,b=s,A=b.flags;switch(b.tag){case 0:case 11:case 15:na(g,b,u),el(4,b);break;case 1:if(na(g,b,u),d=b,g=d.stateNode,typeof g.componentDidMount=="function")try{g.componentDidMount()}catch(K){ut(d,d.return,K)}if(d=b,g=d.updateQueue,g!==null){var R=d.stateNode;try{var F=g.shared.hiddenCallbacks;if(F!==null)for(g.shared.hiddenCallbacks=null,g=0;g<F.length;g++)hE(F[g],R)}catch(K){ut(d,d.return,K)}}u&&A&64&&Sy(b),tl(b,b.return);break;case 27:ky(b);case 26:case 5:na(g,b,u),u&&d===null&&A&4&&Cy(b),tl(b,b.return);break;case 12:na(g,b,u);break;case 31:na(g,b,u),u&&A&4&&Iy(g,b);break;case 13:na(g,b,u),u&&A&4&&Dy(g,b);break;case 22:b.memoizedState===null&&na(g,b,u),tl(b,b.return);break;case 30:break;default:na(g,b,u)}s=s.sibling}}function pm(a,s){var u=null;a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),a=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(a=s.memoizedState.cachePool.pool),a!==u&&(a!=null&&a.refCount++,u!=null&&zo(u))}function gm(a,s){a=null,s.alternate!==null&&(a=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==a&&(s.refCount++,a!=null&&zo(a))}function cr(a,s,u,d){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)By(a,s,u,d),s=s.sibling}function By(a,s,u,d){var g=s.flags;switch(s.tag){case 0:case 11:case 15:cr(a,s,u,d),g&2048&&el(9,s);break;case 1:cr(a,s,u,d);break;case 3:cr(a,s,u,d),g&2048&&(a=null,s.alternate!==null&&(a=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==a&&(s.refCount++,a!=null&&zo(a)));break;case 12:if(g&2048){cr(a,s,u,d),a=s.stateNode;try{var b=s.memoizedProps,A=b.id,R=b.onPostCommit;typeof R=="function"&&R(A,s.alternate===null?"mount":"update",a.passiveEffectDuration,-0)}catch(F){ut(s,s.return,F)}}else cr(a,s,u,d);break;case 31:cr(a,s,u,d);break;case 13:cr(a,s,u,d);break;case 23:break;case 22:b=s.stateNode,A=s.alternate,s.memoizedState!==null?b._visibility&2?cr(a,s,u,d):nl(a,s):b._visibility&2?cr(a,s,u,d):(b._visibility|=2,Ls(a,s,u,d,(s.subtreeFlags&10256)!==0||!1)),g&2048&&pm(A,s);break;case 24:cr(a,s,u,d),g&2048&&gm(s.alternate,s);break;default:cr(a,s,u,d)}}function Ls(a,s,u,d,g){for(g=g&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var b=a,A=s,R=u,F=d,K=A.flags;switch(A.tag){case 0:case 11:case 15:Ls(b,A,R,F,g),el(8,A);break;case 23:break;case 22:var se=A.stateNode;A.memoizedState!==null?se._visibility&2?Ls(b,A,R,F,g):nl(b,A):(se._visibility|=2,Ls(b,A,R,F,g)),g&&K&2048&&pm(A.alternate,A);break;case 24:Ls(b,A,R,F,g),g&&K&2048&&gm(A.alternate,A);break;default:Ls(b,A,R,F,g)}s=s.sibling}}function nl(a,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var u=a,d=s,g=d.flags;switch(d.tag){case 22:nl(u,d),g&2048&&pm(d.alternate,d);break;case 24:nl(u,d),g&2048&&gm(d.alternate,d);break;default:nl(u,d)}s=s.sibling}}var rl=8192;function Is(a,s,u){if(a.subtreeFlags&rl)for(a=a.child;a!==null;)jy(a,s,u),a=a.sibling}function jy(a,s,u){switch(a.tag){case 26:Is(a,s,u),a.flags&rl&&a.memoizedState!==null&&MO(u,ur,a.memoizedState,a.memoizedProps);break;case 5:Is(a,s,u);break;case 3:case 4:var d=ur;ur=xc(a.stateNode.containerInfo),Is(a,s,u),ur=d;break;case 22:a.memoizedState===null&&(d=a.alternate,d!==null&&d.memoizedState!==null?(d=rl,rl=16777216,Is(a,s,u),rl=d):Is(a,s,u));break;default:Is(a,s,u)}}function Uy(a){var s=a.alternate;if(s!==null&&(a=s.child,a!==null)){s.child=null;do s=a.sibling,a.sibling=null,a=s;while(a!==null)}}function al(a){var s=a.deletions;if((a.flags&16)!==0){if(s!==null)for(var u=0;u<s.length;u++){var d=s[u];Yt=d,zy(d,a)}Uy(a)}if(a.subtreeFlags&10256)for(a=a.child;a!==null;)Hy(a),a=a.sibling}function Hy(a){switch(a.tag){case 0:case 11:case 15:al(a),a.flags&2048&&Ra(9,a,a.return);break;case 3:al(a);break;case 12:al(a);break;case 22:var s=a.stateNode;a.memoizedState!==null&&s._visibility&2&&(a.return===null||a.return.tag!==13)?(s._visibility&=-3,lc(a)):al(a);break;default:al(a)}}function lc(a){var s=a.deletions;if((a.flags&16)!==0){if(s!==null)for(var u=0;u<s.length;u++){var d=s[u];Yt=d,zy(d,a)}Uy(a)}for(a=a.child;a!==null;){switch(s=a,s.tag){case 0:case 11:case 15:Ra(8,s,s.return),lc(s);break;case 22:u=s.stateNode,u._visibility&2&&(u._visibility&=-3,lc(s));break;default:lc(s)}a=a.sibling}}function zy(a,s){for(;Yt!==null;){var u=Yt;switch(u.tag){case 0:case 11:case 15:Ra(8,u,s);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var d=u.memoizedState.cachePool.pool;d!=null&&d.refCount++}break;case 24:zo(u.memoizedState.cache)}if(d=u.child,d!==null)d.return=u,Yt=d;else e:for(u=a;Yt!==null;){d=Yt;var g=d.sibling,b=d.return;if(Oy(d),d===u){Yt=null;break e}if(g!==null){g.return=b,Yt=g;break e}Yt=b}}}var WR={getCacheForType:function(a){var s=en(It),u=s.data.get(a);return u===void 0&&(u=a(),s.data.set(a,u)),u},cacheSignal:function(){return en(It).controller.signal}},KR=typeof WeakMap=="function"?WeakMap:Map,at=0,gt=null,Ge=null,Xe=0,lt=0,Bn=null,Oa=!1,Ds=!1,bm=!1,ra=0,Ct=0,La=0,wi=0,Em=0,jn=0,Ms=0,il=null,Cn=null,ym=!1,uc=0,Fy=0,cc=1/0,fc=null,Ia=null,Ut=0,Da=null,Ps=null,aa=0,_m=0,xm=null,$y=null,sl=0,Tm=null;function Un(){return(at&2)!==0&&Xe!==0?Xe&-Xe:j.T!==null?km():ib()}function Vy(){if(jn===0)if((Xe&536870912)===0||Ke){var a=yu;yu<<=1,(yu&3932160)===0&&(yu=262144),jn=a}else jn=536870912;return a=Mn.current,a!==null&&(a.flags|=32),jn}function wn(a,s,u){(a===gt&&(lt===2||lt===9)||a.cancelPendingCommit!==null)&&(Bs(a,0),Ma(a,Xe,jn,!1)),wo(a,u),((at&2)===0||a!==gt)&&(a===gt&&((at&2)===0&&(wi|=u),Ct===4&&Ma(a,Xe,jn,!1)),Ar(a))}function Gy(a,s,u){if((at&6)!==0)throw Error(r(327));var d=!u&&(s&127)===0&&(s&a.expiredLanes)===0||Co(a,s),g=d?eO(a,s):Sm(a,s,!0),b=d;do{if(g===0){Ds&&!d&&Ma(a,s,0,!1);break}else{if(u=a.current.alternate,b&&!ZR(u)){g=Sm(a,s,!1),b=!1;continue}if(g===2){if(b=s,a.errorRecoveryDisabledLanes&b)var A=0;else A=a.pendingLanes&-536870913,A=A!==0?A:A&536870912?536870912:0;if(A!==0){s=A;e:{var R=a;g=il;var F=R.current.memoizedState.isDehydrated;if(F&&(Bs(R,A).flags|=256),A=Sm(R,A,!1),A!==2){if(bm&&!F){R.errorRecoveryDisabledLanes|=b,wi|=b,g=4;break e}b=Cn,Cn=g,b!==null&&(Cn===null?Cn=b:Cn.push.apply(Cn,b))}g=A}if(b=!1,g!==2)continue}}if(g===1){Bs(a,0),Ma(a,s,0,!0);break}e:{switch(d=a,b=g,b){case 0:case 1:throw Error(r(345));case 4:if((s&4194048)!==s)break;case 6:Ma(d,s,jn,!Oa);break e;case 2:Cn=null;break;case 3:case 5:break;default:throw Error(r(329))}if((s&62914560)===s&&(g=uc+300-fn(),10<g)){if(Ma(d,s,jn,!Oa),xu(d,0,!0)!==0)break e;aa=s,d.timeoutHandle=T_(qy.bind(null,d,u,Cn,fc,ym,s,jn,wi,Ms,Oa,b,"Throttled",-0,0),g);break e}qy(d,u,Cn,fc,ym,s,jn,wi,Ms,Oa,b,null,-0,0)}}break}while(!0);Ar(a)}function qy(a,s,u,d,g,b,A,R,F,K,se,fe,Z,ne){if(a.timeoutHandle=-1,fe=s.subtreeFlags,fe&8192||(fe&16785408)===16785408){fe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:$r},jy(s,b,fe);var Ae=(b&62914560)===b?uc-fn():(b&4194048)===b?Fy-fn():0;if(Ae=PO(fe,Ae),Ae!==null){aa=b,a.cancelPendingCommit=Ae(e_.bind(null,a,s,b,u,d,g,A,R,F,se,fe,null,Z,ne)),Ma(a,b,A,!K);return}}e_(a,s,b,u,d,g,A,R,F)}function ZR(a){for(var s=a;;){var u=s.tag;if((u===0||u===11||u===15)&&s.flags&16384&&(u=s.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var d=0;d<u.length;d++){var g=u[d],b=g.getSnapshot;g=g.value;try{if(!In(b(),g))return!1}catch{return!1}}if(u=s.child,s.subtreeFlags&16384&&u!==null)u.return=s,s=u;else{if(s===a)break;for(;s.sibling===null;){if(s.return===null||s.return===a)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Ma(a,s,u,d){s&=~Em,s&=~wi,a.suspendedLanes|=s,a.pingedLanes&=~s,d&&(a.warmLanes|=s),d=a.expirationTimes;for(var g=s;0<g;){var b=31-pt(g),A=1<<b;d[b]=-1,g&=~A}u!==0&&nb(a,u,s)}function dc(){return(at&6)===0?(ol(0),!1):!0}function vm(){if(Ge!==null){if(lt===0)var a=Ge.return;else a=Ge,Yr=Ei=null,Uh(a),ws=null,$o=0,a=Ge;for(;a!==null;)vy(a.alternate,a),a=a.return;Ge=null}}function Bs(a,s){var u=a.timeoutHandle;u!==-1&&(a.timeoutHandle=-1,EO(u)),u=a.cancelPendingCommit,u!==null&&(a.cancelPendingCommit=null,u()),aa=0,vm(),gt=a,Ge=u=Gr(a.current,null),Xe=s,lt=0,Bn=null,Oa=!1,Ds=Co(a,s),bm=!1,Ms=jn=Em=wi=La=Ct=0,Cn=il=null,ym=!1,(s&8)!==0&&(s|=s&32);var d=a.entangledLanes;if(d!==0)for(a=a.entanglements,d&=s;0<d;){var g=31-pt(d),b=1<<g;s|=a[g],d&=~b}return ra=s,Iu(),u}function Yy(a,s){Be=null,j.H=Ko,s===Cs||s===zu?(s=uE(),lt=3):s===wh?(s=uE(),lt=4):lt=s===tm?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,Bn=s,Ge===null&&(Ct=1,tc(a,Xn(s,a.current)))}function Xy(){var a=Mn.current;return a===null?!0:(Xe&4194048)===Xe?Zn===null:(Xe&62914560)===Xe||(Xe&536870912)!==0?a===Zn:!1}function Qy(){var a=j.H;return j.H=Ko,a===null?Ko:a}function Wy(){var a=j.A;return j.A=WR,a}function hc(){Ct=4,Oa||(Xe&4194048)!==Xe&&Mn.current!==null||(Ds=!0),(La&134217727)===0&&(wi&134217727)===0||gt===null||Ma(gt,Xe,jn,!1)}function Sm(a,s,u){var d=at;at|=2;var g=Qy(),b=Wy();(gt!==a||Xe!==s)&&(fc=null,Bs(a,s)),s=!1;var A=Ct;e:do try{if(lt!==0&&Ge!==null){var R=Ge,F=Bn;switch(lt){case 8:vm(),A=6;break e;case 3:case 2:case 9:case 6:Mn.current===null&&(s=!0);var K=lt;if(lt=0,Bn=null,js(a,R,F,K),u&&Ds){A=0;break e}break;default:K=lt,lt=0,Bn=null,js(a,R,F,K)}}JR(),A=Ct;break}catch(se){Yy(a,se)}while(!0);return s&&a.shellSuspendCounter++,Yr=Ei=null,at=d,j.H=g,j.A=b,Ge===null&&(gt=null,Xe=0,Iu()),A}function JR(){for(;Ge!==null;)Ky(Ge)}function eO(a,s){var u=at;at|=2;var d=Qy(),g=Wy();gt!==a||Xe!==s?(fc=null,cc=fn()+500,Bs(a,s)):Ds=Co(a,s);e:do try{if(lt!==0&&Ge!==null){s=Ge;var b=Bn;t:switch(lt){case 1:lt=0,Bn=null,js(a,s,b,1);break;case 2:case 9:if(oE(b)){lt=0,Bn=null,Zy(s);break}s=function(){lt!==2&<!==9||gt!==a||(lt=7),Ar(a)},b.then(s,s);break e;case 3:lt=7;break e;case 4:lt=5;break e;case 7:oE(b)?(lt=0,Bn=null,Zy(s)):(lt=0,Bn=null,js(a,s,b,7));break;case 5:var A=null;switch(Ge.tag){case 26:A=Ge.memoizedState;case 5:case 27:var R=Ge;if(A?B_(A):R.stateNode.complete){lt=0,Bn=null;var F=R.sibling;if(F!==null)Ge=F;else{var K=R.return;K!==null?(Ge=K,mc(K)):Ge=null}break t}}lt=0,Bn=null,js(a,s,b,5);break;case 6:lt=0,Bn=null,js(a,s,b,6);break;case 8:vm(),Ct=6;break e;default:throw Error(r(462))}}tO();break}catch(se){Yy(a,se)}while(!0);return Yr=Ei=null,j.H=d,j.A=g,at=u,Ge!==null?0:(gt=null,Xe=0,Iu(),Ct)}function tO(){for(;Ge!==null&&!Hr();)Ky(Ge)}function Ky(a){var s=xy(a.alternate,a,ra);a.memoizedProps=a.pendingProps,s===null?mc(a):Ge=s}function Zy(a){var s=a,u=s.alternate;switch(s.tag){case 15:case 0:s=py(u,s,s.pendingProps,s.type,void 0,Xe);break;case 11:s=py(u,s,s.pendingProps,s.type.render,s.ref,Xe);break;case 5:Uh(s);default:vy(u,s),s=Ge=Wb(s,ra),s=xy(u,s,ra)}a.memoizedProps=a.pendingProps,s===null?mc(a):Ge=s}function js(a,s,u,d){Yr=Ei=null,Uh(s),ws=null,$o=0;var g=s.return;try{if($R(a,g,s,u,Xe)){Ct=1,tc(a,Xn(u,a.current)),Ge=null;return}}catch(b){if(g!==null)throw Ge=g,b;Ct=1,tc(a,Xn(u,a.current)),Ge=null;return}s.flags&32768?(Ke||d===1?a=!0:Ds||(Xe&536870912)!==0?a=!1:(Oa=a=!0,(d===2||d===9||d===3||d===6)&&(d=Mn.current,d!==null&&d.tag===13&&(d.flags|=16384))),Jy(s,a)):mc(s)}function mc(a){var s=a;do{if((s.flags&32768)!==0){Jy(s,Oa);return}a=s.return;var u=qR(s.alternate,s,ra);if(u!==null){Ge=u;return}if(s=s.sibling,s!==null){Ge=s;return}Ge=s=a}while(s!==null);Ct===0&&(Ct=5)}function Jy(a,s){do{var u=YR(a.alternate,a);if(u!==null){u.flags&=32767,Ge=u;return}if(u=a.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!s&&(a=a.sibling,a!==null)){Ge=a;return}Ge=a=u}while(a!==null);Ct=6,Ge=null}function e_(a,s,u,d,g,b,A,R,F){a.cancelPendingCommit=null;do pc();while(Ut!==0);if((at&6)!==0)throw Error(r(327));if(s!==null){if(s===a.current)throw Error(r(177));if(b=s.lanes|s.childLanes,b|=dh,D3(a,u,b,A,R,F),a===gt&&(Ge=gt=null,Xe=0),Ps=s,Da=a,aa=u,_m=b,xm=g,$y=d,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(a.callbackNode=null,a.callbackPriority=0,iO(Le,function(){return i_(),null})):(a.callbackNode=null,a.callbackPriority=0),d=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||d){d=j.T,j.T=null,g=ee.p,ee.p=2,A=at,at|=4;try{XR(a,s,u)}finally{at=A,ee.p=g,j.T=d}}Ut=1,t_(),n_(),r_()}}function t_(){if(Ut===1){Ut=0;var a=Da,s=Ps,u=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||u){u=j.T,j.T=null;var d=ee.p;ee.p=2;var g=at;at|=4;try{My(s,a);var b=Pm,A=zb(a.containerInfo),R=b.focusedElem,F=b.selectionRange;if(A!==R&&R&&R.ownerDocument&&Hb(R.ownerDocument.documentElement,R)){if(F!==null&&oh(R)){var K=F.start,se=F.end;if(se===void 0&&(se=K),"selectionStart"in R)R.selectionStart=K,R.selectionEnd=Math.min(se,R.value.length);else{var fe=R.ownerDocument||document,Z=fe&&fe.defaultView||window;if(Z.getSelection){var ne=Z.getSelection(),Ae=R.textContent.length,Oe=Math.min(F.start,Ae),ht=F.end===void 0?Oe:Math.min(F.end,Ae);!ne.extend&&Oe>ht&&(A=ht,ht=Oe,Oe=A);var Y=Ub(R,Oe),q=Ub(R,ht);if(Y&&q&&(ne.rangeCount!==1||ne.anchorNode!==Y.node||ne.anchorOffset!==Y.offset||ne.focusNode!==q.node||ne.focusOffset!==q.offset)){var W=fe.createRange();W.setStart(Y.node,Y.offset),ne.removeAllRanges(),Oe>ht?(ne.addRange(W),ne.extend(q.node,q.offset)):(W.setEnd(q.node,q.offset),ne.addRange(W))}}}}for(fe=[],ne=R;ne=ne.parentNode;)ne.nodeType===1&&fe.push({element:ne,left:ne.scrollLeft,top:ne.scrollTop});for(typeof R.focus=="function"&&R.focus(),R=0;R<fe.length;R++){var le=fe[R];le.element.scrollLeft=le.left,le.element.scrollTop=le.top}}wc=!!Mm,Pm=Mm=null}finally{at=g,ee.p=d,j.T=u}}a.current=s,Ut=2}}function n_(){if(Ut===2){Ut=0;var a=Da,s=Ps,u=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||u){u=j.T,j.T=null;var d=ee.p;ee.p=2;var g=at;at|=4;try{Ry(a,s.alternate,s)}finally{at=g,ee.p=d,j.T=u}}Ut=3}}function r_(){if(Ut===4||Ut===3){Ut=0,jd();var a=Da,s=Ps,u=aa,d=$y;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?Ut=5:(Ut=0,Ps=Da=null,a_(a,a.pendingLanes));var g=a.pendingLanes;if(g===0&&(Ia=null),Fd(u),s=s.stateNode,jt&&typeof jt.onCommitFiberRoot=="function")try{jt.onCommitFiberRoot(dn,s,void 0,(s.current.flags&128)===128)}catch{}if(d!==null){s=j.T,g=ee.p,ee.p=2,j.T=null;try{for(var b=a.onRecoverableError,A=0;A<d.length;A++){var R=d[A];b(R.value,{componentStack:R.stack})}}finally{j.T=s,ee.p=g}}(aa&3)!==0&&pc(),Ar(a),g=a.pendingLanes,(u&261930)!==0&&(g&42)!==0?a===Tm?sl++:(sl=0,Tm=a):sl=0,ol(0)}}function a_(a,s){(a.pooledCacheLanes&=s)===0&&(s=a.pooledCache,s!=null&&(a.pooledCache=null,zo(s)))}function pc(){return t_(),n_(),r_(),i_()}function i_(){if(Ut!==5)return!1;var a=Da,s=_m;_m=0;var u=Fd(aa),d=j.T,g=ee.p;try{ee.p=32>u?32:u,j.T=null,u=xm,xm=null;var b=Da,A=aa;if(Ut=0,Ps=Da=null,aa=0,(at&6)!==0)throw Error(r(331));var R=at;if(at|=4,Hy(b.current),By(b,b.current,A,u),at=R,ol(0,!1),jt&&typeof jt.onPostCommitFiberRoot=="function")try{jt.onPostCommitFiberRoot(dn,b)}catch{}return!0}finally{ee.p=g,j.T=d,a_(a,s)}}function s_(a,s,u){s=Xn(u,s),s=em(a.stateNode,s,2),a=wa(a,s,2),a!==null&&(wo(a,2),Ar(a))}function ut(a,s,u){if(a.tag===3)s_(a,a,u);else for(;s!==null;){if(s.tag===3){s_(s,a,u);break}else if(s.tag===1){var d=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(Ia===null||!Ia.has(d))){a=Xn(u,a),u=oy(2),d=wa(s,u,2),d!==null&&(ly(u,d,s,a),wo(d,2),Ar(d));break}}s=s.return}}function Am(a,s,u){var d=a.pingCache;if(d===null){d=a.pingCache=new KR;var g=new Set;d.set(s,g)}else g=d.get(s),g===void 0&&(g=new Set,d.set(s,g));g.has(u)||(bm=!0,g.add(u),a=nO.bind(null,a,s,u),s.then(a,a))}function nO(a,s,u){var d=a.pingCache;d!==null&&d.delete(s),a.pingedLanes|=a.suspendedLanes&u,a.warmLanes&=~u,gt===a&&(Xe&u)===u&&(Ct===4||Ct===3&&(Xe&62914560)===Xe&&300>fn()-uc?(at&2)===0&&Bs(a,0):Em|=u,Ms===Xe&&(Ms=0)),Ar(a)}function o_(a,s){s===0&&(s=tb()),a=pi(a,s),a!==null&&(wo(a,s),Ar(a))}function rO(a){var s=a.memoizedState,u=0;s!==null&&(u=s.retryLane),o_(a,u)}function aO(a,s){var u=0;switch(a.tag){case 31:case 13:var d=a.stateNode,g=a.memoizedState;g!==null&&(u=g.retryLane);break;case 19:d=a.stateNode;break;case 22:d=a.stateNode._retryCache;break;default:throw Error(r(314))}d!==null&&d.delete(s),o_(a,u)}function iO(a,s){return Gt(a,s)}var gc=null,Us=null,Cm=!1,bc=!1,wm=!1,Pa=0;function Ar(a){a!==Us&&a.next===null&&(Us===null?gc=Us=a:Us=Us.next=a),bc=!0,Cm||(Cm=!0,oO())}function ol(a,s){if(!wm&&bc){wm=!0;do for(var u=!1,d=gc;d!==null;){if(a!==0){var g=d.pendingLanes;if(g===0)var b=0;else{var A=d.suspendedLanes,R=d.pingedLanes;b=(1<<31-pt(42|a)+1)-1,b&=g&~(A&~R),b=b&201326741?b&201326741|1:b?b|2:0}b!==0&&(u=!0,f_(d,b))}else b=Xe,b=xu(d,d===gt?b:0,d.cancelPendingCommit!==null||d.timeoutHandle!==-1),(b&3)===0||Co(d,b)||(u=!0,f_(d,b));d=d.next}while(u);wm=!1}}function sO(){l_()}function l_(){bc=Cm=!1;var a=0;Pa!==0&&bO()&&(a=Pa);for(var s=fn(),u=null,d=gc;d!==null;){var g=d.next,b=u_(d,s);b===0?(d.next=null,u===null?gc=g:u.next=g,g===null&&(Us=u)):(u=d,(a!==0||(b&3)!==0)&&(bc=!0)),d=g}Ut!==0&&Ut!==5||ol(a),Pa!==0&&(Pa=0)}function u_(a,s){for(var u=a.suspendedLanes,d=a.pingedLanes,g=a.expirationTimes,b=a.pendingLanes&-62914561;0<b;){var A=31-pt(b),R=1<<A,F=g[A];F===-1?((R&u)===0||(R&d)!==0)&&(g[A]=I3(R,s)):F<=s&&(a.expiredLanes|=R),b&=~R}if(s=gt,u=Xe,u=xu(a,a===s?u:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),d=a.callbackNode,u===0||a===s&&(lt===2||lt===9)||a.cancelPendingCommit!==null)return d!==null&&d!==null&&yn(d),a.callbackNode=null,a.callbackPriority=0;if((u&3)===0||Co(a,u)){if(s=u&-u,s===a.callbackPriority)return s;switch(d!==null&&yn(d),Fd(u)){case 2:case 8:u=_e;break;case 32:u=Le;break;case 268435456:u=ot;break;default:u=Le}return d=c_.bind(null,a),u=Gt(u,d),a.callbackPriority=s,a.callbackNode=u,s}return d!==null&&d!==null&&yn(d),a.callbackPriority=2,a.callbackNode=null,2}function c_(a,s){if(Ut!==0&&Ut!==5)return a.callbackNode=null,a.callbackPriority=0,null;var u=a.callbackNode;if(pc()&&a.callbackNode!==u)return null;var d=Xe;return d=xu(a,a===gt?d:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),d===0?null:(Gy(a,d,s),u_(a,fn()),a.callbackNode!=null&&a.callbackNode===u?c_.bind(null,a):null)}function f_(a,s){if(pc())return null;Gy(a,s,!0)}function oO(){yO(function(){(at&6)!==0?Gt(oe,sO):l_()})}function km(){if(Pa===0){var a=Ss;a===0&&(a=Eu,Eu<<=1,(Eu&261888)===0&&(Eu=256)),Pa=a}return Pa}function d_(a){return a==null||typeof a=="symbol"||typeof a=="boolean"?null:typeof a=="function"?a:Au(""+a)}function h_(a,s){var u=s.ownerDocument.createElement("input");return u.name=s.name,u.value=s.value,a.id&&u.setAttribute("form",a.id),s.parentNode.insertBefore(u,s),a=new FormData(a),u.parentNode.removeChild(u),a}function lO(a,s,u,d,g){if(s==="submit"&&u&&u.stateNode===g){var b=d_((g[xn]||null).action),A=d.submitter;A&&(s=(s=A[xn]||null)?d_(s.formAction):A.getAttribute("formAction"),s!==null&&(b=s,A=null));var R=new Nu("action","action",null,d,g);a.push({event:R,listeners:[{instance:null,listener:function(){if(d.defaultPrevented){if(Pa!==0){var F=A?h_(g,A):new FormData(g);Xh(u,{pending:!0,data:F,method:g.method,action:b},null,F)}}else typeof b=="function"&&(R.preventDefault(),F=A?h_(g,A):new FormData(g),Xh(u,{pending:!0,data:F,method:g.method,action:b},b,F))},currentTarget:g}]})}}for(var Nm=0;Nm<fh.length;Nm++){var Rm=fh[Nm],uO=Rm.toLowerCase(),cO=Rm[0].toUpperCase()+Rm.slice(1);lr(uO,"on"+cO)}lr(Vb,"onAnimationEnd"),lr(Gb,"onAnimationIteration"),lr(qb,"onAnimationStart"),lr("dblclick","onDoubleClick"),lr("focusin","onFocus"),lr("focusout","onBlur"),lr(CR,"onTransitionRun"),lr(wR,"onTransitionStart"),lr(kR,"onTransitionCancel"),lr(Yb,"onTransitionEnd"),cs("onMouseEnter",["mouseout","mouseover"]),cs("onMouseLeave",["mouseout","mouseover"]),cs("onPointerEnter",["pointerout","pointerover"]),cs("onPointerLeave",["pointerout","pointerover"]),fi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),fi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),fi("onBeforeInput",["compositionend","keypress","textInput","paste"]),fi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),fi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),fi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ll="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(" "),fO=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ll));function m_(a,s){s=(s&4)!==0;for(var u=0;u<a.length;u++){var d=a[u],g=d.event;d=d.listeners;e:{var b=void 0;if(s)for(var A=d.length-1;0<=A;A--){var R=d[A],F=R.instance,K=R.currentTarget;if(R=R.listener,F!==b&&g.isPropagationStopped())break e;b=R,g.currentTarget=K;try{b(g)}catch(se){Lu(se)}g.currentTarget=null,b=F}else for(A=0;A<d.length;A++){if(R=d[A],F=R.instance,K=R.currentTarget,R=R.listener,F!==b&&g.isPropagationStopped())break e;b=R,g.currentTarget=K;try{b(g)}catch(se){Lu(se)}g.currentTarget=null,b=F}}}}function qe(a,s){var u=s[$d];u===void 0&&(u=s[$d]=new Set);var d=a+"__bubble";u.has(d)||(p_(s,a,2,!1),u.add(d))}function Om(a,s,u){var d=0;s&&(d|=4),p_(u,a,d,s)}var Ec="_reactListening"+Math.random().toString(36).slice(2);function Lm(a){if(!a[Ec]){a[Ec]=!0,lb.forEach(function(u){u!=="selectionchange"&&(fO.has(u)||Om(u,!1,a),Om(u,!0,a))});var s=a.nodeType===9?a:a.ownerDocument;s===null||s[Ec]||(s[Ec]=!0,Om("selectionchange",!1,s))}}function p_(a,s,u,d){switch(V_(s)){case 2:var g=UO;break;case 8:g=HO;break;default:g=Ym}u=g.bind(null,s,u,a),g=void 0,!Zd||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(g=!0),d?g!==void 0?a.addEventListener(s,u,{capture:!0,passive:g}):a.addEventListener(s,u,!0):g!==void 0?a.addEventListener(s,u,{passive:g}):a.addEventListener(s,u,!1)}function Im(a,s,u,d,g){var b=d;if((s&1)===0&&(s&2)===0&&d!==null)e:for(;;){if(d===null)return;var A=d.tag;if(A===3||A===4){var R=d.stateNode.containerInfo;if(R===g)break;if(A===4)for(A=d.return;A!==null;){var F=A.tag;if((F===3||F===4)&&A.stateNode.containerInfo===g)return;A=A.return}for(;R!==null;){if(A=os(R),A===null)return;if(F=A.tag,F===5||F===6||F===26||F===27){d=b=A;continue e}R=R.parentNode}}d=d.return}_b(function(){var K=b,se=Wd(u),fe=[];e:{var Z=Xb.get(a);if(Z!==void 0){var ne=Nu,Ae=a;switch(a){case"keypress":if(wu(u)===0)break e;case"keydown":case"keyup":ne=aR;break;case"focusin":Ae="focus",ne=nh;break;case"focusout":Ae="blur",ne=nh;break;case"beforeblur":case"afterblur":ne=nh;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ne=vb;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ne=q3;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ne=oR;break;case Vb:case Gb:case qb:ne=Q3;break;case Yb:ne=uR;break;case"scroll":case"scrollend":ne=V3;break;case"wheel":ne=fR;break;case"copy":case"cut":case"paste":ne=K3;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ne=Ab;break;case"toggle":case"beforetoggle":ne=hR}var Oe=(s&4)!==0,ht=!Oe&&(a==="scroll"||a==="scrollend"),Y=Oe?Z!==null?Z+"Capture":null:Z;Oe=[];for(var q=K,W;q!==null;){var le=q;if(W=le.stateNode,le=le.tag,le!==5&&le!==26&&le!==27||W===null||Y===null||(le=Ro(q,Y),le!=null&&Oe.push(ul(q,le,W))),ht)break;q=q.return}0<Oe.length&&(Z=new ne(Z,Ae,null,u,se),fe.push({event:Z,listeners:Oe}))}}if((s&7)===0){e:{if(Z=a==="mouseover"||a==="pointerover",ne=a==="mouseout"||a==="pointerout",Z&&u!==Qd&&(Ae=u.relatedTarget||u.fromElement)&&(os(Ae)||Ae[ss]))break e;if((ne||Z)&&(Z=se.window===se?se:(Z=se.ownerDocument)?Z.defaultView||Z.parentWindow:window,ne?(Ae=u.relatedTarget||u.toElement,ne=K,Ae=Ae?os(Ae):null,Ae!==null&&(ht=o(Ae),Oe=Ae.tag,Ae!==ht||Oe!==5&&Oe!==27&&Oe!==6)&&(Ae=null)):(ne=null,Ae=K),ne!==Ae)){if(Oe=vb,le="onMouseLeave",Y="onMouseEnter",q="mouse",(a==="pointerout"||a==="pointerover")&&(Oe=Ab,le="onPointerLeave",Y="onPointerEnter",q="pointer"),ht=ne==null?Z:No(ne),W=Ae==null?Z:No(Ae),Z=new Oe(le,q+"leave",ne,u,se),Z.target=ht,Z.relatedTarget=W,le=null,os(se)===K&&(Oe=new Oe(Y,q+"enter",Ae,u,se),Oe.target=W,Oe.relatedTarget=ht,le=Oe),ht=le,ne&&Ae)t:{for(Oe=dO,Y=ne,q=Ae,W=0,le=Y;le;le=Oe(le))W++;le=0;for(var Ne=q;Ne;Ne=Oe(Ne))le++;for(;0<W-le;)Y=Oe(Y),W--;for(;0<le-W;)q=Oe(q),le--;for(;W--;){if(Y===q||q!==null&&Y===q.alternate){Oe=Y;break t}Y=Oe(Y),q=Oe(q)}Oe=null}else Oe=null;ne!==null&&g_(fe,Z,ne,Oe,!1),Ae!==null&&ht!==null&&g_(fe,ht,Ae,Oe,!0)}}e:{if(Z=K?No(K):window,ne=Z.nodeName&&Z.nodeName.toLowerCase(),ne==="select"||ne==="input"&&Z.type==="file")var nt=Ib;else if(Ob(Z))if(Db)nt=vR;else{nt=xR;var Ce=_R}else ne=Z.nodeName,!ne||ne.toLowerCase()!=="input"||Z.type!=="checkbox"&&Z.type!=="radio"?K&&Xd(K.elementType)&&(nt=Ib):nt=TR;if(nt&&(nt=nt(a,K))){Lb(fe,nt,u,se);break e}Ce&&Ce(a,Z,K),a==="focusout"&&K&&Z.type==="number"&&K.memoizedProps.value!=null&&Yd(Z,"number",Z.value)}switch(Ce=K?No(K):window,a){case"focusin":(Ob(Ce)||Ce.contentEditable==="true")&&(gs=Ce,lh=K,jo=null);break;case"focusout":jo=lh=gs=null;break;case"mousedown":uh=!0;break;case"contextmenu":case"mouseup":case"dragend":uh=!1,Fb(fe,u,se);break;case"selectionchange":if(AR)break;case"keydown":case"keyup":Fb(fe,u,se)}var Ue;if(ah)e:{switch(a){case"compositionstart":var Qe="onCompositionStart";break e;case"compositionend":Qe="onCompositionEnd";break e;case"compositionupdate":Qe="onCompositionUpdate";break e}Qe=void 0}else ps?Nb(a,u)&&(Qe="onCompositionEnd"):a==="keydown"&&u.keyCode===229&&(Qe="onCompositionStart");Qe&&(Cb&&u.locale!=="ko"&&(ps||Qe!=="onCompositionStart"?Qe==="onCompositionEnd"&&ps&&(Ue=xb()):(_a=se,Jd="value"in _a?_a.value:_a.textContent,ps=!0)),Ce=yc(K,Qe),0<Ce.length&&(Qe=new Sb(Qe,a,null,u,se),fe.push({event:Qe,listeners:Ce}),Ue?Qe.data=Ue:(Ue=Rb(u),Ue!==null&&(Qe.data=Ue)))),(Ue=pR?gR(a,u):bR(a,u))&&(Qe=yc(K,"onBeforeInput"),0<Qe.length&&(Ce=new Sb("onBeforeInput","beforeinput",null,u,se),fe.push({event:Ce,listeners:Qe}),Ce.data=Ue)),lO(fe,a,K,u,se)}m_(fe,s)})}function ul(a,s,u){return{instance:a,listener:s,currentTarget:u}}function yc(a,s){for(var u=s+"Capture",d=[];a!==null;){var g=a,b=g.stateNode;if(g=g.tag,g!==5&&g!==26&&g!==27||b===null||(g=Ro(a,u),g!=null&&d.unshift(ul(a,g,b)),g=Ro(a,s),g!=null&&d.push(ul(a,g,b))),a.tag===3)return d;a=a.return}return[]}function dO(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5&&a.tag!==27);return a||null}function g_(a,s,u,d,g){for(var b=s._reactName,A=[];u!==null&&u!==d;){var R=u,F=R.alternate,K=R.stateNode;if(R=R.tag,F!==null&&F===d)break;R!==5&&R!==26&&R!==27||K===null||(F=K,g?(K=Ro(u,b),K!=null&&A.unshift(ul(u,K,F))):g||(K=Ro(u,b),K!=null&&A.push(ul(u,K,F)))),u=u.return}A.length!==0&&a.push({event:s,listeners:A})}var hO=/\r\n?/g,mO=/\u0000|\uFFFD/g;function b_(a){return(typeof a=="string"?a:""+a).replace(hO,`
|
|
10
|
+
`).replace(mO,"")}function E_(a,s){return s=b_(s),b_(a)===s}function dt(a,s,u,d,g,b){switch(u){case"children":typeof d=="string"?s==="body"||s==="textarea"&&d===""||ds(a,d):(typeof d=="number"||typeof d=="bigint")&&s!=="body"&&ds(a,""+d);break;case"className":vu(a,"class",d);break;case"tabIndex":vu(a,"tabindex",d);break;case"dir":case"role":case"viewBox":case"width":case"height":vu(a,u,d);break;case"style":Eb(a,d,b);break;case"data":if(s!=="object"){vu(a,"data",d);break}case"src":case"href":if(d===""&&(s!=="a"||u!=="href")){a.removeAttribute(u);break}if(d==null||typeof d=="function"||typeof d=="symbol"||typeof d=="boolean"){a.removeAttribute(u);break}d=Au(""+d),a.setAttribute(u,d);break;case"action":case"formAction":if(typeof d=="function"){a.setAttribute(u,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof b=="function"&&(u==="formAction"?(s!=="input"&&dt(a,s,"name",g.name,g,null),dt(a,s,"formEncType",g.formEncType,g,null),dt(a,s,"formMethod",g.formMethod,g,null),dt(a,s,"formTarget",g.formTarget,g,null)):(dt(a,s,"encType",g.encType,g,null),dt(a,s,"method",g.method,g,null),dt(a,s,"target",g.target,g,null)));if(d==null||typeof d=="symbol"||typeof d=="boolean"){a.removeAttribute(u);break}d=Au(""+d),a.setAttribute(u,d);break;case"onClick":d!=null&&(a.onclick=$r);break;case"onScroll":d!=null&&qe("scroll",a);break;case"onScrollEnd":d!=null&&qe("scrollend",a);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(r(61));if(u=d.__html,u!=null){if(g.children!=null)throw Error(r(60));a.innerHTML=u}}break;case"multiple":a.multiple=d&&typeof d!="function"&&typeof d!="symbol";break;case"muted":a.muted=d&&typeof d!="function"&&typeof d!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(d==null||typeof d=="function"||typeof d=="boolean"||typeof d=="symbol"){a.removeAttribute("xlink:href");break}u=Au(""+d),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":d!=null&&typeof d!="function"&&typeof d!="symbol"?a.setAttribute(u,""+d):a.removeAttribute(u);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":d&&typeof d!="function"&&typeof d!="symbol"?a.setAttribute(u,""):a.removeAttribute(u);break;case"capture":case"download":d===!0?a.setAttribute(u,""):d!==!1&&d!=null&&typeof d!="function"&&typeof d!="symbol"?a.setAttribute(u,d):a.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":d!=null&&typeof d!="function"&&typeof d!="symbol"&&!isNaN(d)&&1<=d?a.setAttribute(u,d):a.removeAttribute(u);break;case"rowSpan":case"start":d==null||typeof d=="function"||typeof d=="symbol"||isNaN(d)?a.removeAttribute(u):a.setAttribute(u,d);break;case"popover":qe("beforetoggle",a),qe("toggle",a),Tu(a,"popover",d);break;case"xlinkActuate":Fr(a,"http://www.w3.org/1999/xlink","xlink:actuate",d);break;case"xlinkArcrole":Fr(a,"http://www.w3.org/1999/xlink","xlink:arcrole",d);break;case"xlinkRole":Fr(a,"http://www.w3.org/1999/xlink","xlink:role",d);break;case"xlinkShow":Fr(a,"http://www.w3.org/1999/xlink","xlink:show",d);break;case"xlinkTitle":Fr(a,"http://www.w3.org/1999/xlink","xlink:title",d);break;case"xlinkType":Fr(a,"http://www.w3.org/1999/xlink","xlink:type",d);break;case"xmlBase":Fr(a,"http://www.w3.org/XML/1998/namespace","xml:base",d);break;case"xmlLang":Fr(a,"http://www.w3.org/XML/1998/namespace","xml:lang",d);break;case"xmlSpace":Fr(a,"http://www.w3.org/XML/1998/namespace","xml:space",d);break;case"is":Tu(a,"is",d);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=F3.get(u)||u,Tu(a,u,d))}}function Dm(a,s,u,d,g,b){switch(u){case"style":Eb(a,d,b);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(r(61));if(u=d.__html,u!=null){if(g.children!=null)throw Error(r(60));a.innerHTML=u}}break;case"children":typeof d=="string"?ds(a,d):(typeof d=="number"||typeof d=="bigint")&&ds(a,""+d);break;case"onScroll":d!=null&&qe("scroll",a);break;case"onScrollEnd":d!=null&&qe("scrollend",a);break;case"onClick":d!=null&&(a.onclick=$r);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ub.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(g=u.endsWith("Capture"),s=u.slice(2,g?u.length-7:void 0),b=a[xn]||null,b=b!=null?b[u]:null,typeof b=="function"&&a.removeEventListener(s,b,g),typeof d=="function")){typeof b!="function"&&b!==null&&(u in a?a[u]=null:a.hasAttribute(u)&&a.removeAttribute(u)),a.addEventListener(s,d,g);break e}u in a?a[u]=d:d===!0?a.setAttribute(u,""):Tu(a,u,d)}}}function nn(a,s,u){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":qe("error",a),qe("load",a);var d=!1,g=!1,b;for(b in u)if(u.hasOwnProperty(b)){var A=u[b];if(A!=null)switch(b){case"src":d=!0;break;case"srcSet":g=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:dt(a,s,b,A,u,null)}}g&&dt(a,s,"srcSet",u.srcSet,u,null),d&&dt(a,s,"src",u.src,u,null);return;case"input":qe("invalid",a);var R=b=A=g=null,F=null,K=null;for(d in u)if(u.hasOwnProperty(d)){var se=u[d];if(se!=null)switch(d){case"name":g=se;break;case"type":A=se;break;case"checked":F=se;break;case"defaultChecked":K=se;break;case"value":b=se;break;case"defaultValue":R=se;break;case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(r(137,s));break;default:dt(a,s,d,se,u,null)}}mb(a,b,R,F,K,A,g,!1);return;case"select":qe("invalid",a),d=A=b=null;for(g in u)if(u.hasOwnProperty(g)&&(R=u[g],R!=null))switch(g){case"value":b=R;break;case"defaultValue":A=R;break;case"multiple":d=R;default:dt(a,s,g,R,u,null)}s=b,u=A,a.multiple=!!d,s!=null?fs(a,!!d,s,!1):u!=null&&fs(a,!!d,u,!0);return;case"textarea":qe("invalid",a),b=g=d=null;for(A in u)if(u.hasOwnProperty(A)&&(R=u[A],R!=null))switch(A){case"value":d=R;break;case"defaultValue":g=R;break;case"children":b=R;break;case"dangerouslySetInnerHTML":if(R!=null)throw Error(r(91));break;default:dt(a,s,A,R,u,null)}gb(a,d,g,b);return;case"option":for(F in u)u.hasOwnProperty(F)&&(d=u[F],d!=null)&&(F==="selected"?a.selected=d&&typeof d!="function"&&typeof d!="symbol":dt(a,s,F,d,u,null));return;case"dialog":qe("beforetoggle",a),qe("toggle",a),qe("cancel",a),qe("close",a);break;case"iframe":case"object":qe("load",a);break;case"video":case"audio":for(d=0;d<ll.length;d++)qe(ll[d],a);break;case"image":qe("error",a),qe("load",a);break;case"details":qe("toggle",a);break;case"embed":case"source":case"link":qe("error",a),qe("load",a);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(K in u)if(u.hasOwnProperty(K)&&(d=u[K],d!=null))switch(K){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:dt(a,s,K,d,u,null)}return;default:if(Xd(s)){for(se in u)u.hasOwnProperty(se)&&(d=u[se],d!==void 0&&Dm(a,s,se,d,u,void 0));return}}for(R in u)u.hasOwnProperty(R)&&(d=u[R],d!=null&&dt(a,s,R,d,u,null))}function pO(a,s,u,d){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var g=null,b=null,A=null,R=null,F=null,K=null,se=null;for(ne in u){var fe=u[ne];if(u.hasOwnProperty(ne)&&fe!=null)switch(ne){case"checked":break;case"value":break;case"defaultValue":F=fe;default:d.hasOwnProperty(ne)||dt(a,s,ne,null,d,fe)}}for(var Z in d){var ne=d[Z];if(fe=u[Z],d.hasOwnProperty(Z)&&(ne!=null||fe!=null))switch(Z){case"type":b=ne;break;case"name":g=ne;break;case"checked":K=ne;break;case"defaultChecked":se=ne;break;case"value":A=ne;break;case"defaultValue":R=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(r(137,s));break;default:ne!==fe&&dt(a,s,Z,ne,d,fe)}}qd(a,A,R,F,K,se,b,g);return;case"select":ne=A=R=Z=null;for(b in u)if(F=u[b],u.hasOwnProperty(b)&&F!=null)switch(b){case"value":break;case"multiple":ne=F;default:d.hasOwnProperty(b)||dt(a,s,b,null,d,F)}for(g in d)if(b=d[g],F=u[g],d.hasOwnProperty(g)&&(b!=null||F!=null))switch(g){case"value":Z=b;break;case"defaultValue":R=b;break;case"multiple":A=b;default:b!==F&&dt(a,s,g,b,d,F)}s=R,u=A,d=ne,Z!=null?fs(a,!!u,Z,!1):!!d!=!!u&&(s!=null?fs(a,!!u,s,!0):fs(a,!!u,u?[]:"",!1));return;case"textarea":ne=Z=null;for(R in u)if(g=u[R],u.hasOwnProperty(R)&&g!=null&&!d.hasOwnProperty(R))switch(R){case"value":break;case"children":break;default:dt(a,s,R,null,d,g)}for(A in d)if(g=d[A],b=u[A],d.hasOwnProperty(A)&&(g!=null||b!=null))switch(A){case"value":Z=g;break;case"defaultValue":ne=g;break;case"children":break;case"dangerouslySetInnerHTML":if(g!=null)throw Error(r(91));break;default:g!==b&&dt(a,s,A,g,d,b)}pb(a,Z,ne);return;case"option":for(var Ae in u)Z=u[Ae],u.hasOwnProperty(Ae)&&Z!=null&&!d.hasOwnProperty(Ae)&&(Ae==="selected"?a.selected=!1:dt(a,s,Ae,null,d,Z));for(F in d)Z=d[F],ne=u[F],d.hasOwnProperty(F)&&Z!==ne&&(Z!=null||ne!=null)&&(F==="selected"?a.selected=Z&&typeof Z!="function"&&typeof Z!="symbol":dt(a,s,F,Z,d,ne));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Oe in u)Z=u[Oe],u.hasOwnProperty(Oe)&&Z!=null&&!d.hasOwnProperty(Oe)&&dt(a,s,Oe,null,d,Z);for(K in d)if(Z=d[K],ne=u[K],d.hasOwnProperty(K)&&Z!==ne&&(Z!=null||ne!=null))switch(K){case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(r(137,s));break;default:dt(a,s,K,Z,d,ne)}return;default:if(Xd(s)){for(var ht in u)Z=u[ht],u.hasOwnProperty(ht)&&Z!==void 0&&!d.hasOwnProperty(ht)&&Dm(a,s,ht,void 0,d,Z);for(se in d)Z=d[se],ne=u[se],!d.hasOwnProperty(se)||Z===ne||Z===void 0&&ne===void 0||Dm(a,s,se,Z,d,ne);return}}for(var Y in u)Z=u[Y],u.hasOwnProperty(Y)&&Z!=null&&!d.hasOwnProperty(Y)&&dt(a,s,Y,null,d,Z);for(fe in d)Z=d[fe],ne=u[fe],!d.hasOwnProperty(fe)||Z===ne||Z==null&&ne==null||dt(a,s,fe,Z,d,ne)}function y_(a){switch(a){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function gO(){if(typeof performance.getEntriesByType=="function"){for(var a=0,s=0,u=performance.getEntriesByType("resource"),d=0;d<u.length;d++){var g=u[d],b=g.transferSize,A=g.initiatorType,R=g.duration;if(b&&R&&y_(A)){for(A=0,R=g.responseEnd,d+=1;d<u.length;d++){var F=u[d],K=F.startTime;if(K>R)break;var se=F.transferSize,fe=F.initiatorType;se&&y_(fe)&&(F=F.responseEnd,A+=se*(F<R?1:(R-K)/(F-K)))}if(--d,s+=8*(b+A)/(g.duration/1e3),a++,10<a)break}}if(0<a)return s/a/1e6}return navigator.connection&&(a=navigator.connection.downlink,typeof a=="number")?a:5}var Mm=null,Pm=null;function _c(a){return a.nodeType===9?a:a.ownerDocument}function __(a){switch(a){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function x_(a,s){if(a===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return a===1&&s==="foreignObject"?0:a}function Bm(a,s){return a==="textarea"||a==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var jm=null;function bO(){var a=window.event;return a&&a.type==="popstate"?a===jm?!1:(jm=a,!0):(jm=null,!1)}var T_=typeof setTimeout=="function"?setTimeout:void 0,EO=typeof clearTimeout=="function"?clearTimeout:void 0,v_=typeof Promise=="function"?Promise:void 0,yO=typeof queueMicrotask=="function"?queueMicrotask:typeof v_<"u"?function(a){return v_.resolve(null).then(a).catch(_O)}:T_;function _O(a){setTimeout(function(){throw a})}function Ba(a){return a==="head"}function S_(a,s){var u=s,d=0;do{var g=u.nextSibling;if(a.removeChild(u),g&&g.nodeType===8)if(u=g.data,u==="/$"||u==="/&"){if(d===0){a.removeChild(g),$s(s);return}d--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")d++;else if(u==="html")cl(a.ownerDocument.documentElement);else if(u==="head"){u=a.ownerDocument.head,cl(u);for(var b=u.firstChild;b;){var A=b.nextSibling,R=b.nodeName;b[ko]||R==="SCRIPT"||R==="STYLE"||R==="LINK"&&b.rel.toLowerCase()==="stylesheet"||u.removeChild(b),b=A}}else u==="body"&&cl(a.ownerDocument.body);u=g}while(u);$s(s)}function A_(a,s){var u=a;a=0;do{var d=u.nextSibling;if(u.nodeType===1?s?(u._stashedDisplay=u.style.display,u.style.display="none"):(u.style.display=u._stashedDisplay||"",u.getAttribute("style")===""&&u.removeAttribute("style")):u.nodeType===3&&(s?(u._stashedText=u.nodeValue,u.nodeValue=""):u.nodeValue=u._stashedText||""),d&&d.nodeType===8)if(u=d.data,u==="/$"){if(a===0)break;a--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||a++;u=d}while(u)}function Um(a){var s=a.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var u=s;switch(s=s.nextSibling,u.nodeName){case"HTML":case"HEAD":case"BODY":Um(u),Vd(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}a.removeChild(u)}}function xO(a,s,u,d){for(;a.nodeType===1;){var g=u;if(a.nodeName.toLowerCase()!==s.toLowerCase()){if(!d&&(a.nodeName!=="INPUT"||a.type!=="hidden"))break}else if(d){if(!a[ko])switch(s){case"meta":if(!a.hasAttribute("itemprop"))break;return a;case"link":if(b=a.getAttribute("rel"),b==="stylesheet"&&a.hasAttribute("data-precedence"))break;if(b!==g.rel||a.getAttribute("href")!==(g.href==null||g.href===""?null:g.href)||a.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin)||a.getAttribute("title")!==(g.title==null?null:g.title))break;return a;case"style":if(a.hasAttribute("data-precedence"))break;return a;case"script":if(b=a.getAttribute("src"),(b!==(g.src==null?null:g.src)||a.getAttribute("type")!==(g.type==null?null:g.type)||a.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin))&&b&&a.hasAttribute("async")&&!a.hasAttribute("itemprop"))break;return a;default:return a}}else if(s==="input"&&a.type==="hidden"){var b=g.name==null?null:""+g.name;if(g.type==="hidden"&&a.getAttribute("name")===b)return a}else return a;if(a=Jn(a.nextSibling),a===null)break}return null}function TO(a,s,u){if(s==="")return null;for(;a.nodeType!==3;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!u||(a=Jn(a.nextSibling),a===null))return null;return a}function C_(a,s){for(;a.nodeType!==8;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!s||(a=Jn(a.nextSibling),a===null))return null;return a}function Hm(a){return a.data==="$?"||a.data==="$~"}function zm(a){return a.data==="$!"||a.data==="$?"&&a.ownerDocument.readyState!=="loading"}function vO(a,s){var u=a.ownerDocument;if(a.data==="$~")a._reactRetry=s;else if(a.data!=="$?"||u.readyState!=="loading")s();else{var d=function(){s(),u.removeEventListener("DOMContentLoaded",d)};u.addEventListener("DOMContentLoaded",d),a._reactRetry=d}}function Jn(a){for(;a!=null;a=a.nextSibling){var s=a.nodeType;if(s===1||s===3)break;if(s===8){if(s=a.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return a}var Fm=null;function w_(a){a=a.nextSibling;for(var s=0;a;){if(a.nodeType===8){var u=a.data;if(u==="/$"||u==="/&"){if(s===0)return Jn(a.nextSibling);s--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||s++}a=a.nextSibling}return null}function k_(a){a=a.previousSibling;for(var s=0;a;){if(a.nodeType===8){var u=a.data;if(u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"){if(s===0)return a;s--}else u!=="/$"&&u!=="/&"||s++}a=a.previousSibling}return null}function N_(a,s,u){switch(s=_c(u),a){case"html":if(a=s.documentElement,!a)throw Error(r(452));return a;case"head":if(a=s.head,!a)throw Error(r(453));return a;case"body":if(a=s.body,!a)throw Error(r(454));return a;default:throw Error(r(451))}}function cl(a){for(var s=a.attributes;s.length;)a.removeAttributeNode(s[0]);Vd(a)}var er=new Map,R_=new Set;function xc(a){return typeof a.getRootNode=="function"?a.getRootNode():a.nodeType===9?a:a.ownerDocument}var ia=ee.d;ee.d={f:SO,r:AO,D:CO,C:wO,L:kO,m:NO,X:OO,S:RO,M:LO};function SO(){var a=ia.f(),s=dc();return a||s}function AO(a){var s=ls(a);s!==null&&s.tag===5&&s.type==="form"?YE(s):ia.r(a)}var Hs=typeof document>"u"?null:document;function O_(a,s,u){var d=Hs;if(d&&typeof s=="string"&&s){var g=qn(s);g='link[rel="'+a+'"][href="'+g+'"]',typeof u=="string"&&(g+='[crossorigin="'+u+'"]'),R_.has(g)||(R_.add(g),a={rel:a,crossOrigin:u,href:s},d.querySelector(g)===null&&(s=d.createElement("link"),nn(s,"link",a),qt(s),d.head.appendChild(s)))}}function CO(a){ia.D(a),O_("dns-prefetch",a,null)}function wO(a,s){ia.C(a,s),O_("preconnect",a,s)}function kO(a,s,u){ia.L(a,s,u);var d=Hs;if(d&&a&&s){var g='link[rel="preload"][as="'+qn(s)+'"]';s==="image"&&u&&u.imageSrcSet?(g+='[imagesrcset="'+qn(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(g+='[imagesizes="'+qn(u.imageSizes)+'"]')):g+='[href="'+qn(a)+'"]';var b=g;switch(s){case"style":b=zs(a);break;case"script":b=Fs(a)}er.has(b)||(a=m({rel:"preload",href:s==="image"&&u&&u.imageSrcSet?void 0:a,as:s},u),er.set(b,a),d.querySelector(g)!==null||s==="style"&&d.querySelector(fl(b))||s==="script"&&d.querySelector(dl(b))||(s=d.createElement("link"),nn(s,"link",a),qt(s),d.head.appendChild(s)))}}function NO(a,s){ia.m(a,s);var u=Hs;if(u&&a){var d=s&&typeof s.as=="string"?s.as:"script",g='link[rel="modulepreload"][as="'+qn(d)+'"][href="'+qn(a)+'"]',b=g;switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":b=Fs(a)}if(!er.has(b)&&(a=m({rel:"modulepreload",href:a},s),er.set(b,a),u.querySelector(g)===null)){switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(dl(b)))return}d=u.createElement("link"),nn(d,"link",a),qt(d),u.head.appendChild(d)}}}function RO(a,s,u){ia.S(a,s,u);var d=Hs;if(d&&a){var g=us(d).hoistableStyles,b=zs(a);s=s||"default";var A=g.get(b);if(!A){var R={loading:0,preload:null};if(A=d.querySelector(fl(b)))R.loading=5;else{a=m({rel:"stylesheet",href:a,"data-precedence":s},u),(u=er.get(b))&&$m(a,u);var F=A=d.createElement("link");qt(F),nn(F,"link",a),F._p=new Promise(function(K,se){F.onload=K,F.onerror=se}),F.addEventListener("load",function(){R.loading|=1}),F.addEventListener("error",function(){R.loading|=2}),R.loading|=4,Tc(A,s,d)}A={type:"stylesheet",instance:A,count:1,state:R},g.set(b,A)}}}function OO(a,s){ia.X(a,s);var u=Hs;if(u&&a){var d=us(u).hoistableScripts,g=Fs(a),b=d.get(g);b||(b=u.querySelector(dl(g)),b||(a=m({src:a,async:!0},s),(s=er.get(g))&&Vm(a,s),b=u.createElement("script"),qt(b),nn(b,"link",a),u.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},d.set(g,b))}}function LO(a,s){ia.M(a,s);var u=Hs;if(u&&a){var d=us(u).hoistableScripts,g=Fs(a),b=d.get(g);b||(b=u.querySelector(dl(g)),b||(a=m({src:a,async:!0,type:"module"},s),(s=er.get(g))&&Vm(a,s),b=u.createElement("script"),qt(b),nn(b,"link",a),u.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},d.set(g,b))}}function L_(a,s,u,d){var g=(g=ye.current)?xc(g):null;if(!g)throw Error(r(446));switch(a){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(s=zs(u.href),u=us(g).hoistableStyles,d=u.get(s),d||(d={type:"style",instance:null,count:0,state:null},u.set(s,d)),d):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){a=zs(u.href);var b=us(g).hoistableStyles,A=b.get(a);if(A||(g=g.ownerDocument||g,A={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},b.set(a,A),(b=g.querySelector(fl(a)))&&!b._p&&(A.instance=b,A.state.loading=5),er.has(a)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},er.set(a,u),b||IO(g,a,u,A.state))),s&&d===null)throw Error(r(528,""));return A}if(s&&d!==null)throw Error(r(529,""));return null;case"script":return s=u.async,u=u.src,typeof u=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=Fs(u),u=us(g).hoistableScripts,d=u.get(s),d||(d={type:"script",instance:null,count:0,state:null},u.set(s,d)),d):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,a))}}function zs(a){return'href="'+qn(a)+'"'}function fl(a){return'link[rel="stylesheet"]['+a+"]"}function I_(a){return m({},a,{"data-precedence":a.precedence,precedence:null})}function IO(a,s,u,d){a.querySelector('link[rel="preload"][as="style"]['+s+"]")?d.loading=1:(s=a.createElement("link"),d.preload=s,s.addEventListener("load",function(){return d.loading|=1}),s.addEventListener("error",function(){return d.loading|=2}),nn(s,"link",u),qt(s),a.head.appendChild(s))}function Fs(a){return'[src="'+qn(a)+'"]'}function dl(a){return"script[async]"+a}function D_(a,s,u){if(s.count++,s.instance===null)switch(s.type){case"style":var d=a.querySelector('style[data-href~="'+qn(u.href)+'"]');if(d)return s.instance=d,qt(d),d;var g=m({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return d=(a.ownerDocument||a).createElement("style"),qt(d),nn(d,"style",g),Tc(d,u.precedence,a),s.instance=d;case"stylesheet":g=zs(u.href);var b=a.querySelector(fl(g));if(b)return s.state.loading|=4,s.instance=b,qt(b),b;d=I_(u),(g=er.get(g))&&$m(d,g),b=(a.ownerDocument||a).createElement("link"),qt(b);var A=b;return A._p=new Promise(function(R,F){A.onload=R,A.onerror=F}),nn(b,"link",d),s.state.loading|=4,Tc(b,u.precedence,a),s.instance=b;case"script":return b=Fs(u.src),(g=a.querySelector(dl(b)))?(s.instance=g,qt(g),g):(d=u,(g=er.get(b))&&(d=m({},u),Vm(d,g)),a=a.ownerDocument||a,g=a.createElement("script"),qt(g),nn(g,"link",d),a.head.appendChild(g),s.instance=g);case"void":return null;default:throw Error(r(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(d=s.instance,s.state.loading|=4,Tc(d,u.precedence,a));return s.instance}function Tc(a,s,u){for(var d=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),g=d.length?d[d.length-1]:null,b=g,A=0;A<d.length;A++){var R=d[A];if(R.dataset.precedence===s)b=R;else if(b!==g)break}b?b.parentNode.insertBefore(a,b.nextSibling):(s=u.nodeType===9?u.head:u,s.insertBefore(a,s.firstChild))}function $m(a,s){a.crossOrigin==null&&(a.crossOrigin=s.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=s.referrerPolicy),a.title==null&&(a.title=s.title)}function Vm(a,s){a.crossOrigin==null&&(a.crossOrigin=s.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=s.referrerPolicy),a.integrity==null&&(a.integrity=s.integrity)}var vc=null;function M_(a,s,u){if(vc===null){var d=new Map,g=vc=new Map;g.set(u,d)}else g=vc,d=g.get(u),d||(d=new Map,g.set(u,d));if(d.has(a))return d;for(d.set(a,null),u=u.getElementsByTagName(a),g=0;g<u.length;g++){var b=u[g];if(!(b[ko]||b[Zt]||a==="link"&&b.getAttribute("rel")==="stylesheet")&&b.namespaceURI!=="http://www.w3.org/2000/svg"){var A=b.getAttribute(s)||"";A=a+A;var R=d.get(A);R?R.push(b):d.set(A,[b])}}return d}function P_(a,s,u){a=a.ownerDocument||a,a.head.insertBefore(u,s==="title"?a.querySelector("head > title"):null)}function DO(a,s,u){if(u===1||s.itemProp!=null)return!1;switch(a){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;return s.rel==="stylesheet"?(a=s.disabled,typeof s.precedence=="string"&&a==null):!0;case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function B_(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}function MO(a,s,u,d){if(u.type==="stylesheet"&&(typeof d.media!="string"||matchMedia(d.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var g=zs(d.href),b=s.querySelector(fl(g));if(b){s=b._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(a.count++,a=Sc.bind(a),s.then(a,a)),u.state.loading|=4,u.instance=b,qt(b);return}b=s.ownerDocument||s,d=I_(d),(g=er.get(g))&&$m(d,g),b=b.createElement("link"),qt(b);var A=b;A._p=new Promise(function(R,F){A.onload=R,A.onerror=F}),nn(b,"link",d),u.instance=b}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(u,s),(s=u.state.preload)&&(u.state.loading&3)===0&&(a.count++,u=Sc.bind(a),s.addEventListener("load",u),s.addEventListener("error",u))}}var Gm=0;function PO(a,s){return a.stylesheets&&a.count===0&&Cc(a,a.stylesheets),0<a.count||0<a.imgCount?function(u){var d=setTimeout(function(){if(a.stylesheets&&Cc(a,a.stylesheets),a.unsuspend){var b=a.unsuspend;a.unsuspend=null,b()}},6e4+s);0<a.imgBytes&&Gm===0&&(Gm=62500*gO());var g=setTimeout(function(){if(a.waitingForImages=!1,a.count===0&&(a.stylesheets&&Cc(a,a.stylesheets),a.unsuspend)){var b=a.unsuspend;a.unsuspend=null,b()}},(a.imgBytes>Gm?50:800)+s);return a.unsuspend=u,function(){a.unsuspend=null,clearTimeout(d),clearTimeout(g)}}:null}function Sc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Cc(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var Ac=null;function Cc(a,s){a.stylesheets=null,a.unsuspend!==null&&(a.count++,Ac=new Map,s.forEach(BO,a),Ac=null,Sc.call(a))}function BO(a,s){if(!(s.state.loading&4)){var u=Ac.get(a);if(u)var d=u.get(null);else{u=new Map,Ac.set(a,u);for(var g=a.querySelectorAll("link[data-precedence],style[data-precedence]"),b=0;b<g.length;b++){var A=g[b];(A.nodeName==="LINK"||A.getAttribute("media")!=="not all")&&(u.set(A.dataset.precedence,A),d=A)}d&&u.set(null,d)}g=s.instance,A=g.getAttribute("data-precedence"),b=u.get(A)||d,b===d&&u.set(null,g),u.set(A,g),this.count++,d=Sc.bind(this),g.addEventListener("load",d),g.addEventListener("error",d),b?b.parentNode.insertBefore(g,b.nextSibling):(a=a.nodeType===9?a.head:a,a.insertBefore(g,a.firstChild)),s.state.loading|=4}}var hl={$$typeof:N,Provider:null,Consumer:null,_currentValue:ce,_currentValue2:ce,_threadCount:0};function jO(a,s,u,d,g,b,A,R,F){this.tag=1,this.containerInfo=a,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Hd(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Hd(0),this.hiddenUpdates=Hd(null),this.identifierPrefix=d,this.onUncaughtError=g,this.onCaughtError=b,this.onRecoverableError=A,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=F,this.incompleteTransitions=new Map}function j_(a,s,u,d,g,b,A,R,F,K,se,fe){return a=new jO(a,s,u,A,F,K,se,fe,R),s=1,b===!0&&(s|=24),b=Dn(3,null,null,s),a.current=b,b.stateNode=a,s=Sh(),s.refCount++,a.pooledCache=s,s.refCount++,b.memoizedState={element:d,isDehydrated:u,cache:s},kh(b),a}function U_(a){return a?(a=ys,a):ys}function H_(a,s,u,d,g,b){g=U_(g),d.context===null?d.context=g:d.pendingContext=g,d=Ca(s),d.payload={element:u},b=b===void 0?null:b,b!==null&&(d.callback=b),u=wa(a,d,s),u!==null&&(wn(u,a,s),Go(u,a,s))}function z_(a,s){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var u=a.retryLane;a.retryLane=u!==0&&u<s?u:s}}function qm(a,s){z_(a,s),(a=a.alternate)&&z_(a,s)}function F_(a){if(a.tag===13||a.tag===31){var s=pi(a,67108864);s!==null&&wn(s,a,67108864),qm(a,67108864)}}function $_(a){if(a.tag===13||a.tag===31){var s=Un();s=zd(s);var u=pi(a,s);u!==null&&wn(u,a,s),qm(a,s)}}var wc=!0;function UO(a,s,u,d){var g=j.T;j.T=null;var b=ee.p;try{ee.p=2,Ym(a,s,u,d)}finally{ee.p=b,j.T=g}}function HO(a,s,u,d){var g=j.T;j.T=null;var b=ee.p;try{ee.p=8,Ym(a,s,u,d)}finally{ee.p=b,j.T=g}}function Ym(a,s,u,d){if(wc){var g=Xm(d);if(g===null)Im(a,s,d,kc,u),G_(a,d);else if(FO(g,a,s,u,d))d.stopPropagation();else if(G_(a,d),s&4&&-1<zO.indexOf(a)){for(;g!==null;){var b=ls(g);if(b!==null)switch(b.tag){case 3:if(b=b.stateNode,b.current.memoizedState.isDehydrated){var A=ci(b.pendingLanes);if(A!==0){var R=b;for(R.pendingLanes|=2,R.entangledLanes|=2;A;){var F=1<<31-pt(A);R.entanglements[1]|=F,A&=~F}Ar(b),(at&6)===0&&(cc=fn()+500,ol(0))}}break;case 31:case 13:R=pi(b,2),R!==null&&wn(R,b,2),dc(),qm(b,2)}if(b=Xm(d),b===null&&Im(a,s,d,kc,u),b===g)break;g=b}g!==null&&d.stopPropagation()}else Im(a,s,d,null,u)}}function Xm(a){return a=Wd(a),Qm(a)}var kc=null;function Qm(a){if(kc=null,a=os(a),a!==null){var s=o(a);if(s===null)a=null;else{var u=s.tag;if(u===13){if(a=l(s),a!==null)return a;a=null}else if(u===31){if(a=c(s),a!==null)return a;a=null}else if(u===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;a=null}else s!==a&&(a=null)}}return kc=a,null}function V_(a){switch(a){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Ud()){case oe:return 2;case _e:return 8;case Le:case Ve:return 32;case ot:return 268435456;default:return 32}default:return 32}}var Wm=!1,ja=null,Ua=null,Ha=null,ml=new Map,pl=new Map,za=[],zO="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function G_(a,s){switch(a){case"focusin":case"focusout":ja=null;break;case"dragenter":case"dragleave":Ua=null;break;case"mouseover":case"mouseout":Ha=null;break;case"pointerover":case"pointerout":ml.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":pl.delete(s.pointerId)}}function gl(a,s,u,d,g,b){return a===null||a.nativeEvent!==b?(a={blockedOn:s,domEventName:u,eventSystemFlags:d,nativeEvent:b,targetContainers:[g]},s!==null&&(s=ls(s),s!==null&&F_(s)),a):(a.eventSystemFlags|=d,s=a.targetContainers,g!==null&&s.indexOf(g)===-1&&s.push(g),a)}function FO(a,s,u,d,g){switch(s){case"focusin":return ja=gl(ja,a,s,u,d,g),!0;case"dragenter":return Ua=gl(Ua,a,s,u,d,g),!0;case"mouseover":return Ha=gl(Ha,a,s,u,d,g),!0;case"pointerover":var b=g.pointerId;return ml.set(b,gl(ml.get(b)||null,a,s,u,d,g)),!0;case"gotpointercapture":return b=g.pointerId,pl.set(b,gl(pl.get(b)||null,a,s,u,d,g)),!0}return!1}function q_(a){var s=os(a.target);if(s!==null){var u=o(s);if(u!==null){if(s=u.tag,s===13){if(s=l(u),s!==null){a.blockedOn=s,sb(a.priority,function(){$_(u)});return}}else if(s===31){if(s=c(u),s!==null){a.blockedOn=s,sb(a.priority,function(){$_(u)});return}}else if(s===3&&u.stateNode.current.memoizedState.isDehydrated){a.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}a.blockedOn=null}function Nc(a){if(a.blockedOn!==null)return!1;for(var s=a.targetContainers;0<s.length;){var u=Xm(a.nativeEvent);if(u===null){u=a.nativeEvent;var d=new u.constructor(u.type,u);Qd=d,u.target.dispatchEvent(d),Qd=null}else return s=ls(u),s!==null&&F_(s),a.blockedOn=u,!1;s.shift()}return!0}function Y_(a,s,u){Nc(a)&&u.delete(s)}function $O(){Wm=!1,ja!==null&&Nc(ja)&&(ja=null),Ua!==null&&Nc(Ua)&&(Ua=null),Ha!==null&&Nc(Ha)&&(Ha=null),ml.forEach(Y_),pl.forEach(Y_)}function Rc(a,s){a.blockedOn===s&&(a.blockedOn=null,Wm||(Wm=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,$O)))}var Oc=null;function X_(a){Oc!==a&&(Oc=a,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Oc===a&&(Oc=null);for(var s=0;s<a.length;s+=3){var u=a[s],d=a[s+1],g=a[s+2];if(typeof d!="function"){if(Qm(d||u)===null)continue;break}var b=ls(u);b!==null&&(a.splice(s,3),s-=3,Xh(b,{pending:!0,data:g,method:u.method,action:d},d,g))}}))}function $s(a){function s(F){return Rc(F,a)}ja!==null&&Rc(ja,a),Ua!==null&&Rc(Ua,a),Ha!==null&&Rc(Ha,a),ml.forEach(s),pl.forEach(s);for(var u=0;u<za.length;u++){var d=za[u];d.blockedOn===a&&(d.blockedOn=null)}for(;0<za.length&&(u=za[0],u.blockedOn===null);)q_(u),u.blockedOn===null&&za.shift();if(u=(a.ownerDocument||a).$$reactFormReplay,u!=null)for(d=0;d<u.length;d+=3){var g=u[d],b=u[d+1],A=g[xn]||null;if(typeof b=="function")A||X_(u);else if(A){var R=null;if(b&&b.hasAttribute("formAction")){if(g=b,A=b[xn]||null)R=A.formAction;else if(Qm(g)!==null)continue}else R=A.action;typeof R=="function"?u[d+1]=R:(u.splice(d,3),d-=3),X_(u)}}}function Q_(){function a(b){b.canIntercept&&b.info==="react-transition"&&b.intercept({handler:function(){return new Promise(function(A){return g=A})},focusReset:"manual",scroll:"manual"})}function s(){g!==null&&(g(),g=null),d||setTimeout(u,20)}function u(){if(!d&&!navigation.transition){var b=navigation.currentEntry;b&&b.url!=null&&navigation.navigate(b.url,{state:b.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var d=!1,g=null;return navigation.addEventListener("navigate",a),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(u,100),function(){d=!0,navigation.removeEventListener("navigate",a),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),g!==null&&(g(),g=null)}}}function Km(a){this._internalRoot=a}Lc.prototype.render=Km.prototype.render=function(a){var s=this._internalRoot;if(s===null)throw Error(r(409));var u=s.current,d=Un();H_(u,d,a,s,null,null)},Lc.prototype.unmount=Km.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var s=a.containerInfo;H_(a.current,2,null,a,null,null),dc(),s[ss]=null}};function Lc(a){this._internalRoot=a}Lc.prototype.unstable_scheduleHydration=function(a){if(a){var s=ib();a={blockedOn:null,target:a,priority:s};for(var u=0;u<za.length&&s!==0&&s<za[u].priority;u++);za.splice(u,0,a),u===0&&q_(a)}};var W_=t.version;if(W_!=="19.2.7")throw Error(r(527,W_,"19.2.7"));ee.findDOMNode=function(a){var s=a._reactInternals;if(s===void 0)throw typeof a.render=="function"?Error(r(188)):(a=Object.keys(a).join(","),Error(r(268,a)));return a=h(s),a=a!==null?p(a):null,a=a===null?null:a.stateNode,a};var VO={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:j,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ic=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ic.isDisabled&&Ic.supportsFiber)try{dn=Ic.inject(VO),jt=Ic}catch{}}return El.createRoot=function(a,s){if(!i(a))throw Error(r(299));var u=!1,d="",g=ry,b=ay,A=iy;return s!=null&&(s.unstable_strictMode===!0&&(u=!0),s.identifierPrefix!==void 0&&(d=s.identifierPrefix),s.onUncaughtError!==void 0&&(g=s.onUncaughtError),s.onCaughtError!==void 0&&(b=s.onCaughtError),s.onRecoverableError!==void 0&&(A=s.onRecoverableError)),s=j_(a,1,!1,null,null,u,d,null,g,b,A,Q_),a[ss]=s.current,Lm(a),new Km(s)},El.hydrateRoot=function(a,s,u){if(!i(a))throw Error(r(299));var d=!1,g="",b=ry,A=ay,R=iy,F=null;return u!=null&&(u.unstable_strictMode===!0&&(d=!0),u.identifierPrefix!==void 0&&(g=u.identifierPrefix),u.onUncaughtError!==void 0&&(b=u.onUncaughtError),u.onCaughtError!==void 0&&(A=u.onCaughtError),u.onRecoverableError!==void 0&&(R=u.onRecoverableError),u.formState!==void 0&&(F=u.formState)),s=j_(a,1,!0,s,u??null,d,g,F,b,A,R,Q_),s.context=U_(null),u=s.current,d=Un(),d=zd(d),g=Ca(d),g.callback=null,wa(u,g,d),u=d,s.current.lanes=u,wo(s,u),Ar(s),a[ss]=s.current,Lm(a),new Lc(s)},El.version="19.2.7",El}var sx;function tL(){if(sx)return ep.exports;sx=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),ep.exports=eL(),ep.exports}var nL=tL();const O2=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const rL=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const aL=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const ox=e=>{const t=aL(e);return t.charAt(0).toUpperCase()+t.slice(1)};var ap={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const iL=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},sL=v.createContext({}),oL=()=>v.useContext(sL),lL=v.forwardRef(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i="",children:o,iconNode:l,...c},f)=>{const{size:h=24,strokeWidth:p=2,absoluteStrokeWidth:m=!1,color:E="currentColor",className:y=""}=oL()??{},T=r??m?Number(n??p)*24/Number(t??h):n??p;return v.createElement("svg",{ref:f,...ap,width:t??h??ap.width,height:t??h??ap.height,stroke:e??E,strokeWidth:T,className:O2("lucide",y,i),...!o&&!iL(c)&&{"aria-hidden":"true"},...c},[...l.map(([S,C])=>v.createElement(S,C)),...Array.isArray(o)?o:[o]])});const ct=(e,t)=>{const n=v.forwardRef(({className:r,...i},o)=>v.createElement(lL,{ref:o,iconNode:t,className:O2(`lucide-${rL(ox(e))}`,`lucide-${e}`,r),...i}));return n.displayName=ox(e),n};const uL=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],cL=ct("arrow-down",uL);const fL=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],L2=ct("arrow-left",fL);const dL=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],hL=ct("arrow-right",dL);const mL=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],pL=ct("brain",mL);const gL=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],bL=ct("check",gL);const EL=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Xf=ct("chevron-down",EL);const yL=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],I2=ct("chevron-right",yL);const _L=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],xL=ct("chevron-up",_L);const TL=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],a0=ct("circle-alert",TL);const vL=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],SL=ct("circle-check-big",vL);const AL=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],CL=ct("circle-check",AL);const wL=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"9",x2:"15",y1:"15",y2:"9",key:"1dfufj"}]],D2=ct("circle-slash",wL);const kL=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],M2=ct("circle-x",kL);const NL=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],RL=ct("circle",NL);const OL=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],LL=ct("clock",OL);const IL=[["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}],["path",{d:"m9 10-5 5 5 5",key:"1kshq7"}]],DL=ct("corner-down-left",IL);const ML=[["circle",{cx:"12",cy:"18",r:"3",key:"1mpf1b"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["path",{d:"M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9",key:"1uq4wg"}],["path",{d:"M12 12v3",key:"158kv8"}]],P2=ct("git-fork",ML);const PL=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],ug=ct("loader-circle",PL);const BL=[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]],jL=ct("lock-keyhole",BL);const UL=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],HL=ct("message-square",UL);const zL=[["path",{d:"M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z",key:"1n2ejm"}],["path",{d:"M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1",key:"1qfcsi"}]],B2=ct("messages-square",zL);const FL=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]],$L=ct("panel-right",FL);const VL=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],j2=ct("paperclip",VL);const GL=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],qL=ct("plus",GL);const YL=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],XL=ct("rotate-ccw",YL);const QL=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],U2=ct("square",QL);const WL=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],lx=ct("triangle-alert",WL);const KL=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],H2=ct("wrench",KL);const ZL=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],cg=ct("x",ZL);function z2(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=z2(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Qf(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=z2(e))&&(r&&(r+=" "),r+=t);return r}const ux=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,cx=Qf,fg=(e,t)=>n=>{var r;if(t?.variants==null)return cx(e,n?.class,n?.className);const{variants:i,defaultVariants:o}=t,l=Object.keys(i).map(h=>{const p=n?.[h],m=o?.[h];if(p===null)return null;const E=ux(p)||ux(m);return i[h][E]}),c=n&&Object.entries(n).reduce((h,p)=>{let[m,E]=p;return E===void 0||(h[m]=E),h},{}),f=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((h,p)=>{let{class:m,className:E,...y}=p;return Object.entries(y).every(T=>{let[S,C]=T;return Array.isArray(C)?C.includes({...o,...c}[S]):{...o,...c}[S]===C})?[...h,m,E]:h},[]);return cx(e,l,f,n?.class,n?.className)};var Ki=R2();function fx(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function JL(...e){return t=>{let n=!1;const r=e.map(i=>{const o=fx(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():fx(e[i],null)}}}}function St(...e){return v.useCallback(JL(...e),e)}function oo(e){const t=v.forwardRef((n,r)=>{let{children:i,...o}=n,l=null,c=!1;const f=[];dx(i)&&typeof Dc=="function"&&(i=Dc(i._payload)),v.Children.forEach(i,E=>{if(aI(E)){c=!0;const y=E;let T="child"in y.props?y.props.child:y.props.children;dx(T)&&typeof Dc=="function"&&(T=Dc(T._payload)),l=tI(y,T),f.push(l?.props?.children)}else f.push(E)}),l?l=v.cloneElement(l,void 0,f):!c&&v.Children.count(i)===1&&v.isValidElement(i)&&(l=i);const h=l?rI(l):void 0,p=St(r,h);if(!l){if(i||i===0)throw new Error(c?lI(e):oI(e));return i}const m=nI(o,l.props??{});return l.type!==v.Fragment&&(m.ref=r?p:h),v.cloneElement(l,m)});return t.displayName=`${e}.Slot`,t}var F2=oo("Slot"),eI=Symbol.for("radix.slottable"),tI=(e,t)=>{if("child"in e.props){const n=e.props.child;return v.isValidElement(n)?v.cloneElement(n,void 0,e.props.children(n.props.children)):null}return v.isValidElement(t)?t:null};function nI(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...c)=>{const f=o(...c);return i(...c),f}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function rI(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function aI(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===eI}var iI=Symbol.for("react.lazy");function dx(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===iI&&"_payload"in e&&sI(e._payload)}function sI(e){return typeof e=="object"&&e!==null&&"then"in e}var oI=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,lI=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,Dc=au[" use ".trim().toString()],uI=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],We=uI.reduce((e,t)=>{const n=oo(`Primitive.${t}`),r=v.forwardRef((i,o)=>{const{asChild:l,...c}=i,f=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),_.jsx(f,{...c,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function cI(e,t){e&&Ki.flushSync(()=>e.dispatchEvent(t))}var $2=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),fI="VisuallyHidden",dI=v.forwardRef((e,t)=>_.jsx(We.span,{...e,ref:t,style:{...$2,...e.style}}));dI.displayName=fI;function Zi(e,t=[]){let n=[];function r(o,l){const c=v.createContext(l);c.displayName=o+"Context";const f=n.length;n=[...n,l];const h=m=>{const{scope:E,children:y,...T}=m,S=E?.[e]?.[f]||c,C=v.useMemo(()=>T,Object.values(T));return _.jsx(S.Provider,{value:C,children:y})};h.displayName=o+"Provider";function p(m,E){const y=E?.[e]?.[f]||c,T=v.useContext(y);if(T)return T;if(l!==void 0)return l;throw new Error(`\`${m}\` must be used within \`${o}\``)}return[h,p]}const i=()=>{const o=n.map(l=>v.createContext(l));return function(c){const f=c?.[e]||o;return v.useMemo(()=>({[`__scope${e}`]:{...c,[e]:f}}),[c,f])}};return i.scopeName=e,[r,hI(i,...t)]}function hI(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const l=r.reduce((c,{useScope:f,scopeName:h})=>{const m=f(o)[`__scope${h}`];return{...c,...m}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}function V2(e){const t=e+"CollectionProvider",[n,r]=Zi(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=S=>{const{scope:C,children:w}=S,k=v.useRef(null),N=v.useRef(new Map).current;return _.jsx(i,{scope:C,itemMap:N,collectionRef:k,children:w})};l.displayName=t;const c=e+"CollectionSlot",f=oo(c),h=v.forwardRef((S,C)=>{const{scope:w,children:k}=S,N=o(c,w),M=St(C,N.collectionRef);return _.jsx(f,{ref:M,children:k})});h.displayName=c;const p=e+"CollectionItemSlot",m="data-radix-collection-item",E=oo(p),y=v.forwardRef((S,C)=>{const{scope:w,children:k,...N}=S,M=v.useRef(null),U=St(C,M),P=o(p,w);return v.useEffect(()=>(P.itemMap.set(M,{ref:M,...N}),()=>{P.itemMap.delete(M)})),_.jsx(E,{[m]:"",ref:U,children:k})});y.displayName=p;function T(S){const C=o(e+"CollectionConsumer",S);return v.useCallback(()=>{const k=C.collectionRef.current;if(!k)return[];const N=Array.from(k.querySelectorAll(`[${m}]`));return Array.from(C.itemMap.values()).sort((P,V)=>N.indexOf(P.ref.current)-N.indexOf(V.ref.current))},[C.collectionRef,C.itemMap])}return[{Provider:l,Slot:h,ItemSlot:y},T,r]}function Ze(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}var $t=globalThis?.document?v.useLayoutEffect:()=>{},hx=au[" useEffectEvent ".trim().toString()],mx=au[" useInsertionEffect ".trim().toString()];function mI(e){if(typeof hx=="function")return hx(e);const t=v.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof mx=="function"?mx(()=>{t.current=e}):$t(()=>{t.current=e}),v.useMemo(()=>((...n)=>t.current?.(...n)),[])}var pI=au[" useInsertionEffect ".trim().toString()]||$t;function ei({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,o,l]=gI({defaultProp:t,onChange:n}),c=e!==void 0,f=c?e:i;{const p=v.useRef(e!==void 0);v.useEffect(()=>{const m=p.current;m!==c&&console.warn(`${r} is changing from ${m?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),p.current=c},[c,r])}const h=v.useCallback(p=>{if(c){const m=bI(p)?p(e):p;m!==e&&l.current?.(m)}else o(p)},[c,e,o,l]);return[f,h]}function gI({defaultProp:e,onChange:t}){const[n,r]=v.useState(e),i=v.useRef(n),o=v.useRef(t);return pI(()=>{o.current=t},[t]),v.useEffect(()=>{i.current!==n&&(o.current?.(n),i.current=n)},[n,i]),[n,r,o]}function bI(e){return typeof e=="function"}function EI(e,t){return v.useReducer((n,r)=>t[n][r]??n,e)}var Ji=e=>{const{present:t,children:n}=e,r=yI(t),i=typeof n=="function"?n({present:r.isPresent}):v.Children.only(n),o=_I(r.ref,xI(i));return typeof n=="function"||r.isPresent?v.cloneElement(i,{ref:o}):null};Ji.displayName="Presence";function yI(e){const[t,n]=v.useState(),r=v.useRef(null),i=v.useRef(e),o=v.useRef("none"),l=e?"mounted":"unmounted",[c,f]=EI(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const h=Mc(r.current);o.current=c==="mounted"?h:"none"},[c]),$t(()=>{const h=r.current,p=i.current;if(p!==e){const E=o.current,y=Mc(h);e?f("MOUNT"):y==="none"||h?.display==="none"?f("UNMOUNT"):f(p&&E!==y?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,f]),$t(()=>{if(t){let h;const p=t.ownerDocument.defaultView??window,m=y=>{const S=Mc(r.current).includes(CSS.escape(y.animationName));if(y.target===t&&S&&(f("ANIMATION_END"),!i.current)){const C=t.style.animationFillMode;t.style.animationFillMode="forwards",h=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=C)})}},E=y=>{y.target===t&&(o.current=Mc(r.current))};return t.addEventListener("animationstart",E),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{p.clearTimeout(h),t.removeEventListener("animationstart",E),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:v.useCallback(h=>{r.current=h?getComputedStyle(h):null,n(h)},[])}}function px(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function _I(...e){const t=v.useRef(e);return t.current=e,v.useCallback(n=>{const r=t.current;let i=!1;const o=r.map(l=>{const c=px(l,n);return!i&&typeof c=="function"&&(i=!0),c});if(i)return()=>{for(let l=0;l<o.length;l++){const c=o[l];typeof c=="function"?c():px(r[l],null)}}},[])}function Mc(e){return e?.animationName||"none"}function xI(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var TI=au[" useId ".trim().toString()]||(()=>{}),vI=0;function fa(e){const[t,n]=v.useState(TI());return $t(()=>{n(r=>r??String(vI++))},[e]),e||(t?`radix-${t}`:"")}var Wf="Collapsible",[SI]=Zi(Wf),[AI,dg]=SI(Wf),G2=v.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:o,onOpenChange:l,...c}=e,[f,h]=ei({prop:r,defaultProp:i??!1,onChange:l,caller:Wf});return _.jsx(AI,{scope:n,disabled:o,contentId:fa(),open:f,onOpenToggle:v.useCallback(()=>h(p=>!p),[h]),children:_.jsx(We.div,{"data-state":mg(f),"data-disabled":o?"":void 0,...c,ref:t})})});G2.displayName=Wf;var q2="CollapsibleTrigger",Y2=v.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,i=dg(q2,n);return _.jsx(We.button,{type:"button","aria-controls":i.open?i.contentId:void 0,"aria-expanded":i.open||!1,"data-state":mg(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:t,onClick:Ze(e.onClick,i.onOpenToggle)})});Y2.displayName=q2;var hg="CollapsibleContent",X2=v.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=dg(hg,e.__scopeCollapsible);return _.jsx(Ji,{present:n||i.open,children:({present:o})=>_.jsx(CI,{...r,ref:t,present:o})})});X2.displayName=hg;var CI=v.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...o}=e,l=dg(hg,n),[c,f]=v.useState(r),h=v.useRef(null),p=St(t,h),m=v.useRef(0),E=m.current,y=v.useRef(0),T=y.current,S=l.open||c,C=v.useRef(S),w=v.useRef(void 0);return v.useEffect(()=>{const k=requestAnimationFrame(()=>C.current=!1);return()=>cancelAnimationFrame(k)},[]),$t(()=>{const k=h.current;if(k){w.current=w.current||{transitionDuration:k.style.transitionDuration,animationName:k.style.animationName},k.style.transitionDuration="0s",k.style.animationName="none";const N=k.getBoundingClientRect();m.current=N.height,y.current=N.width,C.current||(k.style.transitionDuration=w.current.transitionDuration,k.style.animationName=w.current.animationName),f(r)}},[l.open,r]),_.jsx(We.div,{"data-state":mg(l.open),"data-disabled":l.disabled?"":void 0,id:l.contentId,hidden:!S,...o,ref:p,style:{"--radix-collapsible-content-height":E?`${E}px`:void 0,"--radix-collapsible-content-width":T?`${T}px`:void 0,...e.style},children:S&&i})});function mg(e){return e?"open":"closed"}var wI=G2,kI=v.createContext(void 0);function pg(e){const t=v.useContext(kI);return e||t||"ltr"}function da(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>((...n)=>t.current?.(...n)),[])}var NI="DismissableLayer",i0="dismissableLayer.update",RI="dismissableLayer.pointerDownOutside",OI="dismissableLayer.focusOutside",gx,gg=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),bg=v.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:l,onInteractOutside:c,onDismiss:f,...h}=e,p=v.useContext(gg),[m,E]=v.useState(null),y=m?.ownerDocument??globalThis?.document,[,T]=v.useState({}),S=St(t,E),C=Array.from(p.layers),[w]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),k=C.indexOf(w),N=m?C.indexOf(m):-1,M=p.layersWithOutsidePointerEventsDisabled.size>0,U=N>=k,P=v.useRef(!1),V=MI(X=>{const J=X.target;if(!(J instanceof Node))return;const he=[...p.branches].some(ue=>ue.contains(J));!U||he||(o?.(X),c?.(X),X.defaultPrevented||f?.())},{ownerDocument:y,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:P,dismissableSurfaces:p.dismissableSurfaces}),G=PI(X=>{if(r&&P.current)return;const J=X.target;[...p.branches].some(ue=>ue.contains(J))||(l?.(X),c?.(X),X.defaultPrevented||f?.())},y),ie=m?N===C.length-1:!1,$=mI(X=>{X.key==="Escape"&&(i?.(X),!X.defaultPrevented&&f&&(X.preventDefault(),f()))});return v.useEffect(()=>{if(ie)return y.addEventListener("keydown",$,{capture:!0}),()=>y.removeEventListener("keydown",$,{capture:!0})},[y,ie]),v.useEffect(()=>{if(m)return n&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(gx=y.body.style.pointerEvents,y.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(m)),p.layers.add(m),bx(),()=>{n&&(p.layersWithOutsidePointerEventsDisabled.delete(m),p.layersWithOutsidePointerEventsDisabled.size===0&&(y.body.style.pointerEvents=gx))}},[m,y,n,p]),v.useEffect(()=>()=>{m&&(p.layers.delete(m),p.layersWithOutsidePointerEventsDisabled.delete(m),bx())},[m,p]),v.useEffect(()=>{const X=()=>T({});return document.addEventListener(i0,X),()=>document.removeEventListener(i0,X)},[]),_.jsx(We.div,{...h,ref:S,style:{pointerEvents:M?U?"auto":"none":void 0,...e.style},onFocusCapture:Ze(e.onFocusCapture,G.onFocusCapture),onBlurCapture:Ze(e.onBlurCapture,G.onBlurCapture),onPointerDownCapture:Ze(e.onPointerDownCapture,V.onPointerDownCapture)})});bg.displayName=NI;var LI="DismissableLayerBranch",II=v.forwardRef((e,t)=>{const n=v.useContext(gg),r=v.useRef(null),i=St(t,r);return v.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),_.jsx(We.div,{...e,ref:i})});II.displayName=LI;function DI(){const e=v.useContext(gg),[t,n]=v.useState(null);return v.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}function MI(e,t){const{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:o}=t,l=da(e),c=v.useRef(!1),f=v.useRef(!1),h=v.useRef(new Map),p=v.useRef(()=>{});return v.useEffect(()=>{function m(){f.current=!1,i.current=!1,h.current.clear()}function E(){return Array.from(h.current.values()).some(Boolean)}function y(k){if(!f.current)return;const N=k.target;N instanceof Node&&[...o].some(U=>U.contains(N))||h.current.set(k.type,!0),k.type==="click"&&window.setTimeout(()=>{f.current&&p.current()},0)}function T(k){f.current&&h.current.set(k.type,!1)}const S=k=>{if(k.target&&!c.current){let N=function(){n.removeEventListener("click",p.current);const U=E();m(),U||Q2(RI,l,M,{discrete:!0})};const M={originalEvent:k};f.current=!0,i.current=r&&k.button===0,h.current.clear(),!r||k.button!==0?N():(n.removeEventListener("click",p.current),p.current=N,n.addEventListener("click",p.current,{once:!0}))}else n.removeEventListener("click",p.current),m();c.current=!1},C=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const k of C)n.addEventListener(k,y,!0),n.addEventListener(k,T);const w=window.setTimeout(()=>{n.addEventListener("pointerdown",S)},0);return()=>{window.clearTimeout(w),n.removeEventListener("pointerdown",S),n.removeEventListener("click",p.current);for(const k of C)n.removeEventListener(k,y,!0),n.removeEventListener(k,T)}},[n,l,r,i,o]),{onPointerDownCapture:()=>c.current=!0}}function PI(e,t=globalThis?.document){const n=da(e),r=v.useRef(!1);return v.useEffect(()=>{const i=o=>{o.target&&!r.current&&Q2(OI,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function bx(){const e=new CustomEvent(i0);document.dispatchEvent(e)}function Q2(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?cI(i,o):i.dispatchEvent(o)}var ip="focusScope.autoFocusOnMount",sp="focusScope.autoFocusOnUnmount",Ex={bubbles:!1,cancelable:!0},BI="FocusScope",Eg=v.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...l}=e,[c,f]=v.useState(null),h=da(i),p=da(o),m=v.useRef(null),E=St(t,f),y=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(r){let S=function(N){if(y.paused||!c)return;const M=N.target;c.contains(M)?m.current=M:Ga(m.current,{select:!0})},C=function(N){if(y.paused||!c)return;const M=N.relatedTarget;M!==null&&(c.contains(M)||Ga(m.current,{select:!0}))},w=function(N){if(document.activeElement===document.body)for(const U of N)U.removedNodes.length>0&&Ga(c)};document.addEventListener("focusin",S),document.addEventListener("focusout",C);const k=new MutationObserver(w);return c&&k.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",C),k.disconnect()}}},[r,c,y.paused]),v.useEffect(()=>{if(c){_x.add(y);const S=document.activeElement;if(!c.contains(S)){const w=new CustomEvent(ip,Ex);c.addEventListener(ip,h),c.dispatchEvent(w),w.defaultPrevented||(jI($I(W2(c)),{select:!0}),document.activeElement===S&&Ga(c))}return()=>{c.removeEventListener(ip,h),setTimeout(()=>{const w=new CustomEvent(sp,Ex);c.addEventListener(sp,p),c.dispatchEvent(w),w.defaultPrevented||Ga(S??document.body,{select:!0}),c.removeEventListener(sp,p),_x.remove(y)},0)}}},[c,h,p,y]);const T=v.useCallback(S=>{if(!n&&!r||y.paused)return;const C=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,w=document.activeElement;if(C&&w){const k=S.currentTarget,[N,M]=UI(k);N&&M?!S.shiftKey&&w===M?(S.preventDefault(),n&&Ga(N,{select:!0})):S.shiftKey&&w===N&&(S.preventDefault(),n&&Ga(M,{select:!0})):w===k&&S.preventDefault()}},[n,r,y.paused]);return _.jsx(We.div,{tabIndex:-1,...l,ref:E,onKeyDown:T})});Eg.displayName=BI;function jI(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ga(r,{select:t}),document.activeElement!==n)return}function UI(e){const t=W2(e),n=yx(t,e),r=yx(t.reverse(),e);return[n,r]}function W2(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function yx(e,t){for(const n of e)if(!HI(n,{upTo:t}))return n}function HI(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function zI(e){return e instanceof HTMLInputElement&&"select"in e}function Ga(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&zI(e)&&t&&e.select()}}var _x=FI();function FI(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=xx(e,t),e.unshift(t)},remove(t){e=xx(e,t),e[0]?.resume()}}}function xx(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function $I(e){return e.filter(t=>t.tagName!=="A")}var VI="Portal",yg=v.forwardRef((e,t)=>{const{container:n,...r}=e,[i,o]=v.useState(!1);$t(()=>o(!0),[]);const l=n||i&&globalThis?.document?.body;return l?Ki.createPortal(_.jsx(We.div,{...r,ref:t}),l):null});yg.displayName=VI;var Pc=0,Vs=null;function K2(){v.useEffect(()=>{Vs||(Vs={start:Tx(),end:Tx()});const{start:e,end:t}=Vs;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),Pc++,()=>{Pc===1&&(Vs?.start.remove(),Vs?.end.remove(),Vs=null),Pc=Math.max(0,Pc-1)}},[])}function Tx(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Lr=function(){return Lr=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Lr.apply(this,arguments)};function Z2(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function GI(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var lf="right-scroll-bar-position",uf="width-before-scroll-bar",qI="with-scroll-bars-hidden",YI="--removed-body-scroll-bar-size";function op(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function XI(e,t){var n=v.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var QI=typeof window<"u"?v.useLayoutEffect:v.useEffect,vx=new WeakMap;function WI(e,t){var n=XI(null,function(r){return e.forEach(function(i){return op(i,r)})});return QI(function(){var r=vx.get(n);if(r){var i=new Set(r),o=new Set(e),l=n.current;i.forEach(function(c){o.has(c)||op(c,null)}),o.forEach(function(c){i.has(c)||op(c,l)})}vx.set(n,e)},[e]),n}function KI(e){return e}function ZI(e,t){t===void 0&&(t=KI);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var l=t(o,r);return n.push(l),function(){n=n.filter(function(c){return c!==l})}},assignSyncMedium:function(o){for(r=!0;n.length;){var l=n;n=[],l.forEach(o)}n={push:function(c){return o(c)},filter:function(){return n}}},assignMedium:function(o){r=!0;var l=[];if(n.length){var c=n;n=[],c.forEach(o),l=n}var f=function(){var p=l;l=[],p.forEach(o)},h=function(){return Promise.resolve().then(f)};h(),n={push:function(p){l.push(p),h()},filter:function(p){return l=l.filter(p),n}}}};return i}function JI(e){e===void 0&&(e={});var t=ZI(null);return t.options=Lr({async:!0,ssr:!1},e),t}var J2=function(e){var t=e.sideCar,n=Z2(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return v.createElement(r,Lr({},n))};J2.isSideCarExport=!0;function e6(e,t){return e.useMedium(t),J2}var eS=JI(),lp=function(){},Kf=v.forwardRef(function(e,t){var n=v.useRef(null),r=v.useState({onScrollCapture:lp,onWheelCapture:lp,onTouchMoveCapture:lp}),i=r[0],o=r[1],l=e.forwardProps,c=e.children,f=e.className,h=e.removeScrollBar,p=e.enabled,m=e.shards,E=e.sideCar,y=e.noRelative,T=e.noIsolation,S=e.inert,C=e.allowPinchZoom,w=e.as,k=w===void 0?"div":w,N=e.gapMode,M=Z2(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),U=E,P=WI([n,t]),V=Lr(Lr({},M),i);return v.createElement(v.Fragment,null,p&&v.createElement(U,{sideCar:eS,removeScrollBar:h,shards:m,noRelative:y,noIsolation:T,inert:S,setCallbacks:o,allowPinchZoom:!!C,lockRef:n,gapMode:N}),l?v.cloneElement(v.Children.only(c),Lr(Lr({},V),{ref:P})):v.createElement(k,Lr({},V,{className:f,ref:P}),c))});Kf.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Kf.classNames={fullWidth:uf,zeroRight:lf};var t6=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function n6(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=t6();return t&&e.setAttribute("nonce",t),e}function r6(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function a6(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var i6=function(){var e=0,t=null;return{add:function(n){e==0&&(t=n6())&&(r6(t,n),a6(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},s6=function(){var e=i6();return function(t,n){v.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},tS=function(){var e=s6(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},o6={left:0,top:0,right:0,gap:0},up=function(e){return parseInt(e||"",10)||0},l6=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[up(n),up(r),up(i)]},u6=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return o6;var t=l6(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},c6=tS(),no="data-scroll-locked",f6=function(e,t,n,r){var i=e.left,o=e.top,l=e.right,c=e.gap;return n===void 0&&(n="margin"),`
|
|
11
|
+
.`.concat(qI,` {
|
|
12
|
+
overflow: hidden `).concat(r,`;
|
|
13
|
+
padding-right: `).concat(c,"px ").concat(r,`;
|
|
14
|
+
}
|
|
15
|
+
body[`).concat(no,`] {
|
|
16
|
+
overflow: hidden `).concat(r,`;
|
|
17
|
+
overscroll-behavior: contain;
|
|
18
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
19
|
+
padding-left: `.concat(i,`px;
|
|
20
|
+
padding-top: `).concat(o,`px;
|
|
21
|
+
padding-right: `).concat(l,`px;
|
|
22
|
+
margin-left:0;
|
|
23
|
+
margin-top:0;
|
|
24
|
+
margin-right: `).concat(c,"px ").concat(r,`;
|
|
25
|
+
`),n==="padding"&&"padding-right: ".concat(c,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.`).concat(lf,` {
|
|
29
|
+
right: `).concat(c,"px ").concat(r,`;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.`).concat(uf,` {
|
|
33
|
+
margin-right: `).concat(c,"px ").concat(r,`;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.`).concat(lf," .").concat(lf,` {
|
|
37
|
+
right: 0 `).concat(r,`;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.`).concat(uf," .").concat(uf,` {
|
|
41
|
+
margin-right: 0 `).concat(r,`;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
body[`).concat(no,`] {
|
|
45
|
+
`).concat(YI,": ").concat(c,`px;
|
|
46
|
+
}
|
|
47
|
+
`)},Sx=function(){var e=parseInt(document.body.getAttribute(no)||"0",10);return isFinite(e)?e:0},d6=function(){v.useEffect(function(){return document.body.setAttribute(no,(Sx()+1).toString()),function(){var e=Sx()-1;e<=0?document.body.removeAttribute(no):document.body.setAttribute(no,e.toString())}},[])},h6=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;d6();var o=v.useMemo(function(){return u6(i)},[i]);return v.createElement(c6,{styles:f6(o,!t,i,n?"":"!important")})},s0=!1;if(typeof window<"u")try{var Bc=Object.defineProperty({},"passive",{get:function(){return s0=!0,!0}});window.addEventListener("test",Bc,Bc),window.removeEventListener("test",Bc,Bc)}catch{s0=!1}var Gs=s0?{passive:!1}:!1,m6=function(e){return e.tagName==="TEXTAREA"},nS=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!m6(e)&&n[t]==="visible")},p6=function(e){return nS(e,"overflowY")},g6=function(e){return nS(e,"overflowX")},Ax=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=rS(e,r);if(i){var o=aS(e,r),l=o[1],c=o[2];if(l>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},b6=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},E6=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},rS=function(e,t){return e==="v"?p6(t):g6(t)},aS=function(e,t){return e==="v"?b6(t):E6(t)},y6=function(e,t){return e==="h"&&t==="rtl"?-1:1},_6=function(e,t,n,r,i){var o=y6(e,window.getComputedStyle(t).direction),l=o*r,c=n.target,f=t.contains(c),h=!1,p=l>0,m=0,E=0;do{if(!c)break;var y=aS(e,c),T=y[0],S=y[1],C=y[2],w=S-C-o*T;(T||w)&&rS(e,c)&&(m+=w,E+=T);var k=c.parentNode;c=k&&k.nodeType===Node.DOCUMENT_FRAGMENT_NODE?k.host:k}while(!f&&c!==document.body||f&&(t.contains(c)||t===c));return(p&&Math.abs(m)<1||!p&&Math.abs(E)<1)&&(h=!0),h},jc=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Cx=function(e){return[e.deltaX,e.deltaY]},wx=function(e){return e&&"current"in e?e.current:e},x6=function(e,t){return e[0]===t[0]&&e[1]===t[1]},T6=function(e){return`
|
|
48
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
49
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
50
|
+
`)},v6=0,qs=[];function S6(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),i=v.useState(v6++)[0],o=v.useState(tS)[0],l=v.useRef(e);v.useEffect(function(){l.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var S=GI([e.lockRef.current],(e.shards||[]).map(wx),!0).filter(Boolean);return S.forEach(function(C){return C.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),S.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var c=v.useCallback(function(S,C){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!l.current.allowPinchZoom;var w=jc(S),k=n.current,N="deltaX"in S?S.deltaX:k[0]-w[0],M="deltaY"in S?S.deltaY:k[1]-w[1],U,P=S.target,V=Math.abs(N)>Math.abs(M)?"h":"v";if("touches"in S&&V==="h"&&P.type==="range")return!1;var G=window.getSelection(),ie=G&&G.anchorNode,$=ie?ie===P||ie.contains(P):!1;if($)return!1;var X=Ax(V,P);if(!X)return!0;if(X?U=V:(U=V==="v"?"h":"v",X=Ax(V,P)),!X)return!1;if(!r.current&&"changedTouches"in S&&(N||M)&&(r.current=U),!U)return!0;var J=r.current||U;return _6(J,C,S,J==="h"?N:M)},[]),f=v.useCallback(function(S){var C=S;if(!(!qs.length||qs[qs.length-1]!==o)){var w="deltaY"in C?Cx(C):jc(C),k=t.current.filter(function(U){return U.name===C.type&&(U.target===C.target||C.target===U.shadowParent)&&x6(U.delta,w)})[0];if(k&&k.should){C.cancelable&&C.preventDefault();return}if(!k){var N=(l.current.shards||[]).map(wx).filter(Boolean).filter(function(U){return U.contains(C.target)}),M=N.length>0?c(C,N[0]):!l.current.noIsolation;M&&C.cancelable&&C.preventDefault()}}},[]),h=v.useCallback(function(S,C,w,k){var N={name:S,delta:C,target:w,should:k,shadowParent:A6(w)};t.current.push(N),setTimeout(function(){t.current=t.current.filter(function(M){return M!==N})},1)},[]),p=v.useCallback(function(S){n.current=jc(S),r.current=void 0},[]),m=v.useCallback(function(S){h(S.type,Cx(S),S.target,c(S,e.lockRef.current))},[]),E=v.useCallback(function(S){h(S.type,jc(S),S.target,c(S,e.lockRef.current))},[]);v.useEffect(function(){return qs.push(o),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:E}),document.addEventListener("wheel",f,Gs),document.addEventListener("touchmove",f,Gs),document.addEventListener("touchstart",p,Gs),function(){qs=qs.filter(function(S){return S!==o}),document.removeEventListener("wheel",f,Gs),document.removeEventListener("touchmove",f,Gs),document.removeEventListener("touchstart",p,Gs)}},[]);var y=e.removeScrollBar,T=e.inert;return v.createElement(v.Fragment,null,T?v.createElement(o,{styles:T6(i)}):null,y?v.createElement(h6,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function A6(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const C6=e6(eS,S6);var _g=v.forwardRef(function(e,t){return v.createElement(Kf,Lr({},e,{ref:t,sideCar:C6}))});_g.classNames=Kf.classNames;var w6=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ys=new WeakMap,Uc=new WeakMap,Hc={},cp=0,iS=function(e){return e&&(e.host||iS(e.parentNode))},k6=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=iS(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},N6=function(e,t,n,r){var i=k6(t,Array.isArray(e)?e:[e]);Hc[n]||(Hc[n]=new WeakMap);var o=Hc[n],l=[],c=new Set,f=new Set(i),h=function(m){!m||c.has(m)||(c.add(m),h(m.parentNode))};i.forEach(h);var p=function(m){!m||f.has(m)||Array.prototype.forEach.call(m.children,function(E){if(c.has(E))p(E);else try{var y=E.getAttribute(r),T=y!==null&&y!=="false",S=(Ys.get(E)||0)+1,C=(o.get(E)||0)+1;Ys.set(E,S),o.set(E,C),l.push(E),S===1&&T&&Uc.set(E,!0),C===1&&E.setAttribute(n,"true"),T||E.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",E,w)}})};return p(t),c.clear(),cp++,function(){l.forEach(function(m){var E=Ys.get(m)-1,y=o.get(m)-1;Ys.set(m,E),o.set(m,y),E||(Uc.has(m)||m.removeAttribute(r),Uc.delete(m)),y||m.removeAttribute(n)}),cp--,cp||(Ys=new WeakMap,Ys=new WeakMap,Uc=new WeakMap,Hc={})}},sS=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=w6(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),N6(r,i,n,"aria-hidden")):function(){return null}},Zf="Dialog",[oS]=Zi(Zf),[R6,Er]=oS(Zf),lS=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:l=!0}=e,c=v.useRef(null),f=v.useRef(null),[h,p]=ei({prop:r,defaultProp:i??!1,onChange:o,caller:Zf});return _.jsx(R6,{scope:t,triggerRef:c,contentRef:f,contentId:fa(),titleId:fa(),descriptionId:fa(),open:h,onOpenChange:p,onOpenToggle:v.useCallback(()=>p(m=>!m),[p]),modal:l,children:n})};lS.displayName=Zf;var uS="DialogTrigger",cS=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Er(uS,n),o=St(t,i.triggerRef);return _.jsx(We.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":Tg(i.open),...r,ref:o,onClick:Ze(e.onClick,i.onOpenToggle)})});cS.displayName=uS;var xg="DialogPortal",[O6,fS]=oS(xg,{forceMount:void 0}),dS=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,o=Er(xg,t);return _.jsx(O6,{scope:t,forceMount:n,children:v.Children.map(r,l=>_.jsx(Ji,{present:n||o.open,children:_.jsx(yg,{asChild:!0,container:i,children:l})}))})};dS.displayName=xg;var yf="DialogOverlay",hS=v.forwardRef((e,t)=>{const n=fS(yf,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=Er(yf,e.__scopeDialog);return o.modal?_.jsx(Ji,{present:r||o.open,children:_.jsx(I6,{...i,ref:t})}):null});hS.displayName=yf;var L6=oo("DialogOverlay.RemoveScroll"),I6=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Er(yf,n),o=DI(),l=St(t,o);return _.jsx(_g,{as:L6,allowPinchZoom:!0,shards:[i.contentRef],children:_.jsx(We.div,{"data-state":Tg(i.open),...r,ref:l,style:{pointerEvents:"auto",...r.style}})})}),lo="DialogContent",mS=v.forwardRef((e,t)=>{const n=fS(lo,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=Er(lo,e.__scopeDialog);return _.jsx(Ji,{present:r||o.open,children:o.modal?_.jsx(D6,{...i,ref:t}):_.jsx(M6,{...i,ref:t})})});mS.displayName=lo;var D6=v.forwardRef((e,t)=>{const n=Er(lo,e.__scopeDialog),r=v.useRef(null),i=St(t,n.contentRef,r);return v.useEffect(()=>{const o=r.current;if(o)return sS(o)},[]),_.jsx(pS,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:Ze(e.onCloseAutoFocus,o=>{o.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Ze(e.onPointerDownOutside,o=>{const l=o.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0;(l.button===2||c)&&o.preventDefault()}),onFocusOutside:Ze(e.onFocusOutside,o=>o.preventDefault())})}),M6=v.forwardRef((e,t)=>{const n=Er(lo,e.__scopeDialog),r=v.useRef(!1),i=v.useRef(!1);return _.jsx(pS,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(r.current||n.triggerRef.current?.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const l=o.target;n.triggerRef.current?.contains(l)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),pS=v.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...l}=e,c=Er(lo,n);return K2(),_.jsx(_.Fragment,{children:_.jsx(Eg,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:_.jsx(bg,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":Tg(c.open),...l,ref:t,deferPointerDownOutside:!0,onDismiss:()=>c.onOpenChange(!1)})})})}),gS="DialogTitle",bS=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Er(gS,n);return _.jsx(We.h2,{id:i.titleId,...r,ref:t})});bS.displayName=gS;var ES="DialogDescription",yS=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Er(ES,n);return _.jsx(We.p,{id:i.descriptionId,...r,ref:t})});yS.displayName=ES;var _S="DialogClose",Jf=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Er(_S,n);return _.jsx(We.button,{type:"button",...r,ref:t,onClick:Ze(e.onClick,()=>i.onOpenChange(!1))})});Jf.displayName=_S;function Tg(e){return e?"open":"closed"}function P6(e){const t=v.useRef({value:e,previous:e});return v.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function B6(e){const[t,n]=v.useState(void 0);return $t(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let l,c;if("borderBoxSize"in o){const f=o.borderBoxSize,h=Array.isArray(f)?f[0]:f;l=h.inlineSize,c=h.blockSize}else l=e.offsetWidth,c=e.offsetHeight;n({width:l,height:c})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const j6=["top","right","bottom","left"],ti=Math.min,zn=Math.max,_f=Math.round,zc=Math.floor,Dr=e=>({x:e,y:e}),U6={left:"right",right:"left",bottom:"top",top:"bottom"};function o0(e,t,n){return zn(e,ti(t,n))}function ha(e,t){return typeof e=="function"?e(t):e}function ma(e){return e.split("-")[0]}function mo(e){return e.split("-")[1]}function vg(e){return e==="x"?"y":"x"}function Sg(e){return e==="y"?"height":"width"}function Ir(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Ag(e){return vg(Ir(e))}function H6(e,t,n){n===void 0&&(n=!1);const r=mo(e),i=Ag(e),o=Sg(i);let l=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=xf(l)),[l,xf(l)]}function z6(e){const t=xf(e);return[l0(e),t,l0(t)]}function l0(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const kx=["left","right"],Nx=["right","left"],F6=["top","bottom"],$6=["bottom","top"];function V6(e,t,n){switch(e){case"top":case"bottom":return n?t?Nx:kx:t?kx:Nx;case"left":case"right":return t?F6:$6;default:return[]}}function G6(e,t,n,r){const i=mo(e);let o=V6(ma(e),n==="start",r);return i&&(o=o.map(l=>l+"-"+i),t&&(o=o.concat(o.map(l0)))),o}function xf(e){const t=ma(e);return U6[t]+e.slice(t.length)}function q6(e){return{top:0,right:0,bottom:0,left:0,...e}}function xS(e){return typeof e!="number"?q6(e):{top:e,right:e,bottom:e,left:e}}function Tf(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Rx(e,t,n){let{reference:r,floating:i}=e;const o=Ir(t),l=Ag(t),c=Sg(l),f=ma(t),h=o==="y",p=r.x+r.width/2-i.width/2,m=r.y+r.height/2-i.height/2,E=r[c]/2-i[c]/2;let y;switch(f){case"top":y={x:p,y:r.y-i.height};break;case"bottom":y={x:p,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:m};break;case"left":y={x:r.x-i.width,y:m};break;default:y={x:r.x,y:r.y}}switch(mo(t)){case"start":y[l]-=E*(n&&h?-1:1);break;case"end":y[l]+=E*(n&&h?-1:1);break}return y}async function Y6(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:l,elements:c,strategy:f}=e,{boundary:h="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:E=!1,padding:y=0}=ha(t,e),T=xS(y),C=c[E?m==="floating"?"reference":"floating":m],w=Tf(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(C)))==null||n?C:C.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(c.floating)),boundary:h,rootBoundary:p,strategy:f})),k=m==="floating"?{x:r,y:i,width:l.floating.width,height:l.floating.height}:l.reference,N=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c.floating)),M=await(o.isElement==null?void 0:o.isElement(N))?await(o.getScale==null?void 0:o.getScale(N))||{x:1,y:1}:{x:1,y:1},U=Tf(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:k,offsetParent:N,strategy:f}):k);return{top:(w.top-U.top+T.top)/M.y,bottom:(U.bottom-w.bottom+T.bottom)/M.y,left:(w.left-U.left+T.left)/M.x,right:(U.right-w.right+T.right)/M.x}}const X6=50,Q6=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:l}=n,c=l.detectOverflow?l:{...l,detectOverflow:Y6},f=await(l.isRTL==null?void 0:l.isRTL(t));let h=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:p,y:m}=Rx(h,r,f),E=r,y=0;const T={};for(let S=0;S<o.length;S++){const C=o[S];if(!C)continue;const{name:w,fn:k}=C,{x:N,y:M,data:U,reset:P}=await k({x:p,y:m,initialPlacement:r,placement:E,strategy:i,middlewareData:T,rects:h,platform:c,elements:{reference:e,floating:t}});p=N??p,m=M??m,T[w]={...T[w],...U},P&&y<X6&&(y++,typeof P=="object"&&(P.placement&&(E=P.placement),P.rects&&(h=P.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:i}):P.rects),{x:p,y:m}=Rx(h,E,f)),S=-1)}return{x:p,y:m,placement:E,strategy:i,middlewareData:T}},W6=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:l,elements:c,middlewareData:f}=t,{element:h,padding:p=0}=ha(e,t)||{};if(h==null)return{};const m=xS(p),E={x:n,y:r},y=Ag(i),T=Sg(y),S=await l.getDimensions(h),C=y==="y",w=C?"top":"left",k=C?"bottom":"right",N=C?"clientHeight":"clientWidth",M=o.reference[T]+o.reference[y]-E[y]-o.floating[T],U=E[y]-o.reference[y],P=await(l.getOffsetParent==null?void 0:l.getOffsetParent(h));let V=P?P[N]:0;(!V||!await(l.isElement==null?void 0:l.isElement(P)))&&(V=c.floating[N]||o.floating[T]);const G=M/2-U/2,ie=V/2-S[T]/2-1,$=ti(m[w],ie),X=ti(m[k],ie),J=$,he=V-S[T]-X,ue=V/2-S[T]/2+G,re=o0(J,ue,he),j=!f.arrow&&mo(i)!=null&&ue!==re&&o.reference[T]/2-(ue<J?$:X)-S[T]/2<0,ee=j?ue<J?ue-J:ue-he:0;return{[y]:E[y]+ee,data:{[y]:re,centerOffset:ue-re-ee,...j&&{alignmentOffset:ee}},reset:j}}}),K6=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:l,initialPlacement:c,platform:f,elements:h}=t,{mainAxis:p=!0,crossAxis:m=!0,fallbackPlacements:E,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:T="none",flipAlignment:S=!0,...C}=ha(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const w=ma(i),k=Ir(c),N=ma(c)===c,M=await(f.isRTL==null?void 0:f.isRTL(h.floating)),U=E||(N||!S?[xf(c)]:z6(c)),P=T!=="none";!E&&P&&U.push(...G6(c,S,T,M));const V=[c,...U],G=await f.detectOverflow(t,C),ie=[];let $=((r=o.flip)==null?void 0:r.overflows)||[];if(p&&ie.push(G[w]),m){const ue=H6(i,l,M);ie.push(G[ue[0]],G[ue[1]])}if($=[...$,{placement:i,overflows:ie}],!ie.every(ue=>ue<=0)){var X,J;const ue=(((X=o.flip)==null?void 0:X.index)||0)+1,re=V[ue];if(re&&(!(m==="alignment"?k!==Ir(re):!1)||$.every(ce=>Ir(ce.placement)===k?ce.overflows[0]>0:!0)))return{data:{index:ue,overflows:$},reset:{placement:re}};let j=(J=$.filter(ee=>ee.overflows[0]<=0).sort((ee,ce)=>ee.overflows[1]-ce.overflows[1])[0])==null?void 0:J.placement;if(!j)switch(y){case"bestFit":{var he;const ee=(he=$.filter(ce=>{if(P){const xe=Ir(ce.placement);return xe===k||xe==="y"}return!0}).map(ce=>[ce.placement,ce.overflows.filter(xe=>xe>0).reduce((xe,O)=>xe+O,0)]).sort((ce,xe)=>ce[1]-xe[1])[0])==null?void 0:he[0];ee&&(j=ee);break}case"initialPlacement":j=c;break}if(i!==j)return{reset:{placement:j}}}return{}}}};function Ox(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Lx(e){return j6.some(t=>e[t]>=0)}const Z6=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:i="referenceHidden",...o}=ha(e,t);switch(i){case"referenceHidden":{const l=await r.detectOverflow(t,{...o,elementContext:"reference"}),c=Ox(l,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:Lx(c)}}}case"escaped":{const l=await r.detectOverflow(t,{...o,altBoundary:!0}),c=Ox(l,n.floating);return{data:{escapedOffsets:c,escaped:Lx(c)}}}default:return{}}}}},TS=new Set(["left","top"]);async function J6(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),l=ma(n),c=mo(n),f=Ir(n)==="y",h=TS.has(l)?-1:1,p=o&&f?-1:1,m=ha(t,e);let{mainAxis:E,crossAxis:y,alignmentAxis:T}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return c&&typeof T=="number"&&(y=c==="end"?T*-1:T),f?{x:y*p,y:E*h}:{x:E*h,y:y*p}}const eD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:l,middlewareData:c}=t,f=await J6(t,e);return l===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:i+f.x,y:o+f.y,data:{...f,placement:l}}}}},tD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i,platform:o}=t,{mainAxis:l=!0,crossAxis:c=!1,limiter:f={fn:w=>{let{x:k,y:N}=w;return{x:k,y:N}}},...h}=ha(e,t),p={x:n,y:r},m=await o.detectOverflow(t,h),E=Ir(ma(i)),y=vg(E);let T=p[y],S=p[E];if(l){const w=y==="y"?"top":"left",k=y==="y"?"bottom":"right",N=T+m[w],M=T-m[k];T=o0(N,T,M)}if(c){const w=E==="y"?"top":"left",k=E==="y"?"bottom":"right",N=S+m[w],M=S-m[k];S=o0(N,S,M)}const C=f.fn({...t,[y]:T,[E]:S});return{...C,data:{x:C.x-n,y:C.y-r,enabled:{[y]:l,[E]:c}}}}}},nD=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:l}=t,{offset:c=0,mainAxis:f=!0,crossAxis:h=!0}=ha(e,t),p={x:n,y:r},m=Ir(i),E=vg(m);let y=p[E],T=p[m];const S=ha(c,t),C=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(f){const N=E==="y"?"height":"width",M=o.reference[E]-o.floating[N]+C.mainAxis,U=o.reference[E]+o.reference[N]-C.mainAxis;y<M?y=M:y>U&&(y=U)}if(h){var w,k;const N=E==="y"?"width":"height",M=TS.has(ma(i)),U=o.reference[m]-o.floating[N]+(M&&((w=l.offset)==null?void 0:w[m])||0)+(M?0:C.crossAxis),P=o.reference[m]+o.reference[N]+(M?0:((k=l.offset)==null?void 0:k[m])||0)-(M?C.crossAxis:0);T<U?T=U:T>P&&(T=P)}return{[E]:y,[m]:T}}}},rD=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:l,elements:c}=t,{apply:f=()=>{},...h}=ha(e,t),p=await l.detectOverflow(t,h),m=ma(i),E=mo(i),y=Ir(i)==="y",{width:T,height:S}=o.floating;let C,w;m==="top"||m==="bottom"?(C=m,w=E===(await(l.isRTL==null?void 0:l.isRTL(c.floating))?"start":"end")?"left":"right"):(w=m,C=E==="end"?"top":"bottom");const k=S-p.top-p.bottom,N=T-p.left-p.right,M=ti(S-p[C],k),U=ti(T-p[w],N),P=!t.middlewareData.shift;let V=M,G=U;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(G=N),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(V=k),P&&!E){const $=zn(p.left,0),X=zn(p.right,0),J=zn(p.top,0),he=zn(p.bottom,0);y?G=T-2*($!==0||X!==0?$+X:zn(p.left,p.right)):V=S-2*(J!==0||he!==0?J+he:zn(p.top,p.bottom))}await f({...t,availableWidth:G,availableHeight:V});const ie=await l.getDimensions(c.floating);return T!==ie.width||S!==ie.height?{reset:{rects:!0}}:{}}}};function ed(){return typeof window<"u"}function po(e){return vS(e)?(e.nodeName||"").toLowerCase():"#document"}function Fn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Pr(e){var t;return(t=(vS(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function vS(e){return ed()?e instanceof Node||e instanceof Fn(e).Node:!1}function gr(e){return ed()?e instanceof Element||e instanceof Fn(e).Element:!1}function pa(e){return ed()?e instanceof HTMLElement||e instanceof Fn(e).HTMLElement:!1}function Ix(e){return!ed()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Fn(e).ShadowRoot}function iu(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=br(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!=="inline"&&i!=="contents"}function aD(e){return/^(table|td|th)$/.test(po(e))}function td(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const iD=/transform|translate|scale|rotate|perspective|filter/,sD=/paint|layout|strict|content/,ki=e=>!!e&&e!=="none";let fp;function Cg(e){const t=gr(e)?br(e):e;return ki(t.transform)||ki(t.translate)||ki(t.scale)||ki(t.rotate)||ki(t.perspective)||!wg()&&(ki(t.backdropFilter)||ki(t.filter))||iD.test(t.willChange||"")||sD.test(t.contain||"")}function oD(e){let t=ni(e);for(;pa(t)&&!uo(t);){if(Cg(t))return t;if(td(t))return null;t=ni(t)}return null}function wg(){return fp==null&&(fp=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),fp}function uo(e){return/^(html|body|#document)$/.test(po(e))}function br(e){return Fn(e).getComputedStyle(e)}function nd(e){return gr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ni(e){if(po(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ix(e)&&e.host||Pr(e);return Ix(t)?t.host:t}function SS(e){const t=ni(e);return uo(t)?e.ownerDocument?e.ownerDocument.body:e.body:pa(t)&&iu(t)?t:SS(t)}function ql(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=SS(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),l=Fn(i);if(o){const c=u0(l);return t.concat(l,l.visualViewport||[],iu(i)?i:[],c&&n?ql(c):[])}else return t.concat(i,ql(i,[],n))}function u0(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function AS(e){const t=br(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=pa(e),o=i?e.offsetWidth:n,l=i?e.offsetHeight:r,c=_f(n)!==o||_f(r)!==l;return c&&(n=o,r=l),{width:n,height:r,$:c}}function kg(e){return gr(e)?e:e.contextElement}function ro(e){const t=kg(e);if(!pa(t))return Dr(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=AS(t);let l=(o?_f(n.width):n.width)/r,c=(o?_f(n.height):n.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!c||!Number.isFinite(c))&&(c=1),{x:l,y:c}}const lD=Dr(0);function CS(e){const t=Fn(e);return!wg()||!t.visualViewport?lD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function uD(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Fn(e)?!1:t}function Gi(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=kg(e);let l=Dr(1);t&&(r?gr(r)&&(l=ro(r)):l=ro(e));const c=uD(o,n,r)?CS(o):Dr(0);let f=(i.left+c.x)/l.x,h=(i.top+c.y)/l.y,p=i.width/l.x,m=i.height/l.y;if(o){const E=Fn(o),y=r&&gr(r)?Fn(r):r;let T=E,S=u0(T);for(;S&&r&&y!==T;){const C=ro(S),w=S.getBoundingClientRect(),k=br(S),N=w.left+(S.clientLeft+parseFloat(k.paddingLeft))*C.x,M=w.top+(S.clientTop+parseFloat(k.paddingTop))*C.y;f*=C.x,h*=C.y,p*=C.x,m*=C.y,f+=N,h+=M,T=Fn(S),S=u0(T)}}return Tf({width:p,height:m,x:f,y:h})}function rd(e,t){const n=nd(e).scrollLeft;return t?t.left+n:Gi(Pr(e)).left+n}function wS(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-rd(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function cD(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",l=Pr(r),c=t?td(t.floating):!1;if(r===l||c&&o)return n;let f={scrollLeft:0,scrollTop:0},h=Dr(1);const p=Dr(0),m=pa(r);if((m||!m&&!o)&&((po(r)!=="body"||iu(l))&&(f=nd(r)),m)){const y=Gi(r);h=ro(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const E=l&&!m&&!o?wS(l,f):Dr(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-f.scrollLeft*h.x+p.x+E.x,y:n.y*h.y-f.scrollTop*h.y+p.y+E.y}}function fD(e){return Array.from(e.getClientRects())}function dD(e){const t=Pr(e),n=nd(e),r=e.ownerDocument.body,i=zn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=zn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+rd(e);const c=-n.scrollTop;return br(r).direction==="rtl"&&(l+=zn(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:l,y:c}}const Dx=25;function hD(e,t){const n=Fn(e),r=Pr(e),i=n.visualViewport;let o=r.clientWidth,l=r.clientHeight,c=0,f=0;if(i){o=i.width,l=i.height;const p=wg();(!p||p&&t==="fixed")&&(c=i.offsetLeft,f=i.offsetTop)}const h=rd(r);if(h<=0){const p=r.ownerDocument,m=p.body,E=getComputedStyle(m),y=p.compatMode==="CSS1Compat"&&parseFloat(E.marginLeft)+parseFloat(E.marginRight)||0,T=Math.abs(r.clientWidth-m.clientWidth-y);T<=Dx&&(o-=T)}else h<=Dx&&(o+=h);return{width:o,height:l,x:c,y:f}}function mD(e,t){const n=Gi(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=pa(e)?ro(e):Dr(1),l=e.clientWidth*o.x,c=e.clientHeight*o.y,f=i*o.x,h=r*o.y;return{width:l,height:c,x:f,y:h}}function Mx(e,t,n){let r;if(t==="viewport")r=hD(e,n);else if(t==="document")r=dD(Pr(e));else if(gr(t))r=mD(t,n);else{const i=CS(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Tf(r)}function kS(e,t){const n=ni(e);return n===t||!gr(n)||uo(n)?!1:br(n).position==="fixed"||kS(n,t)}function pD(e,t){const n=t.get(e);if(n)return n;let r=ql(e,[],!1).filter(c=>gr(c)&&po(c)!=="body"),i=null;const o=br(e).position==="fixed";let l=o?ni(e):e;for(;gr(l)&&!uo(l);){const c=br(l),f=Cg(l);!f&&c.position==="fixed"&&(i=null),(o?!f&&!i:!f&&c.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||iu(l)&&!f&&kS(e,l))?r=r.filter(p=>p!==l):i=c,l=ni(l)}return t.set(e,r),r}function gD(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const l=[...n==="clippingAncestors"?td(t)?[]:pD(t,this._c):[].concat(n),r],c=Mx(t,l[0],i);let f=c.top,h=c.right,p=c.bottom,m=c.left;for(let E=1;E<l.length;E++){const y=Mx(t,l[E],i);f=zn(y.top,f),h=ti(y.right,h),p=ti(y.bottom,p),m=zn(y.left,m)}return{width:h-m,height:p-f,x:m,y:f}}function bD(e){const{width:t,height:n}=AS(e);return{width:t,height:n}}function ED(e,t,n){const r=pa(t),i=Pr(t),o=n==="fixed",l=Gi(e,!0,o,t);let c={scrollLeft:0,scrollTop:0};const f=Dr(0);function h(){f.x=rd(i)}if(r||!r&&!o)if((po(t)!=="body"||iu(i))&&(c=nd(t)),r){const y=Gi(t,!0,o,t);f.x=y.x+t.clientLeft,f.y=y.y+t.clientTop}else i&&h();o&&!r&&i&&h();const p=i&&!r&&!o?wS(i,c):Dr(0),m=l.left+c.scrollLeft-f.x-p.x,E=l.top+c.scrollTop-f.y-p.y;return{x:m,y:E,width:l.width,height:l.height}}function dp(e){return br(e).position==="static"}function Px(e,t){if(!pa(e)||br(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Pr(e)===n&&(n=n.ownerDocument.body),n}function NS(e,t){const n=Fn(e);if(td(e))return n;if(!pa(e)){let i=ni(e);for(;i&&!uo(i);){if(gr(i)&&!dp(i))return i;i=ni(i)}return n}let r=Px(e,t);for(;r&&aD(r)&&dp(r);)r=Px(r,t);return r&&uo(r)&&dp(r)&&!Cg(r)?n:r||oD(e)||n}const yD=async function(e){const t=this.getOffsetParent||NS,n=this.getDimensions,r=await n(e.floating);return{reference:ED(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function _D(e){return br(e).direction==="rtl"}const xD={convertOffsetParentRelativeRectToViewportRelativeRect:cD,getDocumentElement:Pr,getClippingRect:gD,getOffsetParent:NS,getElementRects:yD,getClientRects:fD,getDimensions:bD,getScale:ro,isElement:gr,isRTL:_D};function RS(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function TD(e,t){let n=null,r;const i=Pr(e);function o(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function l(c,f){c===void 0&&(c=!1),f===void 0&&(f=1),o();const h=e.getBoundingClientRect(),{left:p,top:m,width:E,height:y}=h;if(c||t(),!E||!y)return;const T=zc(m),S=zc(i.clientWidth-(p+E)),C=zc(i.clientHeight-(m+y)),w=zc(p),N={rootMargin:-T+"px "+-S+"px "+-C+"px "+-w+"px",threshold:zn(0,ti(1,f))||1};let M=!0;function U(P){const V=P[0].intersectionRatio;if(V!==f){if(!M)return l();V?l(!1,V):r=setTimeout(()=>{l(!1,1e-7)},1e3)}V===1&&!RS(h,e.getBoundingClientRect())&&l(),M=!1}try{n=new IntersectionObserver(U,{...N,root:i.ownerDocument})}catch{n=new IntersectionObserver(U,N)}n.observe(e)}return l(!0),o}function vD(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:f=!1}=r,h=kg(e),p=i||o?[...h?ql(h):[],...t?ql(t):[]]:[];p.forEach(w=>{i&&w.addEventListener("scroll",n,{passive:!0}),o&&w.addEventListener("resize",n)});const m=h&&c?TD(h,n):null;let E=-1,y=null;l&&(y=new ResizeObserver(w=>{let[k]=w;k&&k.target===h&&y&&t&&(y.unobserve(t),cancelAnimationFrame(E),E=requestAnimationFrame(()=>{var N;(N=y)==null||N.observe(t)})),n()}),h&&!f&&y.observe(h),t&&y.observe(t));let T,S=f?Gi(e):null;f&&C();function C(){const w=Gi(e);S&&!RS(S,w)&&n(),S=w,T=requestAnimationFrame(C)}return n(),()=>{var w;p.forEach(k=>{i&&k.removeEventListener("scroll",n),o&&k.removeEventListener("resize",n)}),m?.(),(w=y)==null||w.disconnect(),y=null,f&&cancelAnimationFrame(T)}}const SD=eD,AD=tD,CD=K6,wD=rD,kD=Z6,Bx=W6,ND=nD,RD=(e,t,n)=>{const r=new Map,i={platform:xD,...n},o={...i.platform,_c:r};return Q6(e,t,{...i,platform:o})};var OD=typeof document<"u",LD=function(){},cf=OD?v.useLayoutEffect:LD;function vf(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!vf(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!vf(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function OS(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function jx(e,t){const n=OS(e);return Math.round(t*n)/n}function hp(e){const t=v.useRef(e);return cf(()=>{t.current=e}),t}function ID(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:l}={},transform:c=!0,whileElementsMounted:f,open:h}=e,[p,m]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[E,y]=v.useState(r);vf(E,r)||y(r);const[T,S]=v.useState(null),[C,w]=v.useState(null),k=v.useCallback(ce=>{ce!==P.current&&(P.current=ce,S(ce))},[]),N=v.useCallback(ce=>{ce!==V.current&&(V.current=ce,w(ce))},[]),M=o||T,U=l||C,P=v.useRef(null),V=v.useRef(null),G=v.useRef(p),ie=f!=null,$=hp(f),X=hp(i),J=hp(h),he=v.useCallback(()=>{if(!P.current||!V.current)return;const ce={placement:t,strategy:n,middleware:E};X.current&&(ce.platform=X.current),RD(P.current,V.current,ce).then(xe=>{const O={...xe,isPositioned:J.current!==!1};ue.current&&!vf(G.current,O)&&(G.current=O,Ki.flushSync(()=>{m(O)}))})},[E,t,n,X,J]);cf(()=>{h===!1&&G.current.isPositioned&&(G.current.isPositioned=!1,m(ce=>({...ce,isPositioned:!1})))},[h]);const ue=v.useRef(!1);cf(()=>(ue.current=!0,()=>{ue.current=!1}),[]),cf(()=>{if(M&&(P.current=M),U&&(V.current=U),M&&U){if($.current)return $.current(M,U,he);he()}},[M,U,he,$,ie]);const re=v.useMemo(()=>({reference:P,floating:V,setReference:k,setFloating:N}),[k,N]),j=v.useMemo(()=>({reference:M,floating:U}),[M,U]),ee=v.useMemo(()=>{const ce={position:n,left:0,top:0};if(!j.floating)return ce;const xe=jx(j.floating,p.x),O=jx(j.floating,p.y);return c?{...ce,transform:"translate("+xe+"px, "+O+"px)",...OS(j.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:xe,top:O}},[n,c,j.floating,p.x,p.y]);return v.useMemo(()=>({...p,update:he,refs:re,elements:j,floatingStyles:ee}),[p,he,re,j,ee])}const DD=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Bx({element:r.current,padding:i}).fn(n):{}:r?Bx({element:r,padding:i}).fn(n):{}}}},MD=(e,t)=>{const n=SD(e);return{name:n.name,fn:n.fn,options:[e,t]}},PD=(e,t)=>{const n=AD(e);return{name:n.name,fn:n.fn,options:[e,t]}},BD=(e,t)=>({fn:ND(e).fn,options:[e,t]}),jD=(e,t)=>{const n=CD(e);return{name:n.name,fn:n.fn,options:[e,t]}},UD=(e,t)=>{const n=wD(e);return{name:n.name,fn:n.fn,options:[e,t]}},HD=(e,t)=>{const n=kD(e);return{name:n.name,fn:n.fn,options:[e,t]}},zD=(e,t)=>{const n=DD(e);return{name:n.name,fn:n.fn,options:[e,t]}};var FD="Arrow",LS=v.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...o}=e;return _.jsx(We.svg,{...o,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:_.jsx("polygon",{points:"0,0 30,0 15,10"})})});LS.displayName=FD;var $D=LS,Ng="Popper",[IS,DS]=Zi(Ng),[VD,MS]=IS(Ng),PS=e=>{const{__scopePopper:t,children:n}=e,[r,i]=v.useState(null),[o,l]=v.useState(void 0);return _.jsx(VD,{scope:t,anchor:r,onAnchorChange:i,placementState:o,setPlacementState:l,children:n})};PS.displayName=Ng;var BS="PopperAnchor",jS=v.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=MS(BS,n),l=v.useRef(null),c=o.onAnchorChange,f=v.useCallback(T=>{l.current=T,T&&c(T)},[c]),h=St(t,f),p=v.useRef(null);v.useEffect(()=>{if(!r)return;const T=p.current;p.current=r.current,T!==p.current&&c(p.current)});const m=o.placementState&&Og(o.placementState),E=m?.[0],y=m?.[1];return r?null:_.jsx(We.div,{"data-radix-popper-side":E,"data-radix-popper-align":y,...i,ref:h})});jS.displayName=BS;var Rg="PopperContent",[GD,qD]=IS(Rg),US=v.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:l=0,arrowPadding:c=0,avoidCollisions:f=!0,collisionBoundary:h=[],collisionPadding:p=0,sticky:m="partial",hideWhenDetached:E=!1,updatePositionStrategy:y="optimized",onPlaced:T,...S}=e,C=MS(Rg,n),[w,k]=v.useState(null),N=St(t,k),[M,U]=v.useState(null),P=B6(M),V=P?.width??0,G=P?.height??0,ie=r+(o!=="center"?"-"+o:""),$=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},X=Array.isArray(h)?h:[h],J=X.length>0,he={padding:$,boundary:X.filter(XD),altBoundary:J},{refs:ue,floatingStyles:re,placement:j,isPositioned:ee,middlewareData:ce}=ID({strategy:"fixed",placement:ie,whileElementsMounted:(...ke)=>vD(...ke,{animationFrame:y==="always"}),elements:{reference:C.anchor},middleware:[MD({mainAxis:i+G,alignmentAxis:l}),f&&PD({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?BD():void 0,...he}),f&&jD({...he}),UD({...he,apply:({elements:ke,rects:Te,availableWidth:De,availableHeight:je})=>{const{width:Je,height:kt}=Te.reference,it=ke.floating.style;it.setProperty("--radix-popper-available-width",`${De}px`),it.setProperty("--radix-popper-available-height",`${je}px`),it.setProperty("--radix-popper-anchor-width",`${Je}px`),it.setProperty("--radix-popper-anchor-height",`${kt}px`)}}),M&&zD({element:M,padding:c}),QD({arrowWidth:V,arrowHeight:G}),E&&HD({strategy:"referenceHidden",...he,boundary:J?he.boundary:void 0})]}),xe=C.setPlacementState;$t(()=>(xe(j),()=>{xe(void 0)}),[j,xe]);const[O,z]=Og(j),te=da(T);$t(()=>{ee&&te?.()},[ee,te]);const D=ce.arrow?.x,ge=ce.arrow?.y,Ee=ce.arrow?.centerOffset!==0,[ye,be]=v.useState();return $t(()=>{w&&be(window.getComputedStyle(w).zIndex)},[w]),_.jsx("div",{ref:ue.setFloating,"data-radix-popper-content-wrapper":"",style:{...re,transform:ee?re.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ye,"--radix-popper-transform-origin":[ce.transformOrigin?.x,ce.transformOrigin?.y].join(" "),...ce.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:_.jsx(GD,{scope:n,placedSide:O,placedAlign:z,onArrowChange:U,arrowX:D,arrowY:ge,shouldHideArrow:Ee,children:_.jsx(We.div,{"data-side":O,"data-align":z,...S,ref:N,style:{...S.style,animation:ee?void 0:"none"}})})})});US.displayName=Rg;var HS="PopperArrow",YD={top:"bottom",right:"left",bottom:"top",left:"right"},zS=v.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,o=qD(HS,r),l=YD[o.placedSide];return _.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:_.jsx($D,{...i,ref:n,style:{...i.style,display:"block"}})})});zS.displayName=HS;function XD(e){return e!==null}var QD=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:i}=t,l=i.arrow?.centerOffset!==0,c=l?0:e.arrowWidth,f=l?0:e.arrowHeight,[h,p]=Og(n),m={start:"0%",center:"50%",end:"100%"}[p],E=(i.arrow?.x??0)+c/2,y=(i.arrow?.y??0)+f/2;let T="",S="";return h==="bottom"?(T=l?m:`${E}px`,S=`${-f}px`):h==="top"?(T=l?m:`${E}px`,S=`${r.floating.height+f}px`):h==="right"?(T=`${-f}px`,S=l?m:`${y}px`):h==="left"&&(T=`${r.floating.width+f}px`,S=l?m:`${y}px`),{data:{x:T,y:S}}}});function Og(e){const[t,n="center"]=e.split("-");return[t,n]}var WD=PS,KD=jS,ZD=US,JD=zS,mp="rovingFocusGroup.onEntryFocus",e4={bubbles:!1,cancelable:!0},su="RovingFocusGroup",[c0,FS,t4]=V2(su),[n4,$S]=Zi(su,[t4]),[r4,a4]=n4(su),VS=v.forwardRef((e,t)=>_.jsx(c0.Provider,{scope:e.__scopeRovingFocusGroup,children:_.jsx(c0.Slot,{scope:e.__scopeRovingFocusGroup,children:_.jsx(i4,{...e,ref:t})})}));VS.displayName=su;var i4=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:l,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:f,onEntryFocus:h,preventScrollOnEntryFocus:p=!1,...m}=e,E=v.useRef(null),y=St(t,E),T=pg(o),[S,C]=ei({prop:l,defaultProp:c??null,onChange:f,caller:su}),[w,k]=v.useState(!1),N=da(h),M=FS(n),U=v.useRef(!1),[P,V]=v.useState(0);return v.useEffect(()=>{const G=E.current;if(G)return G.addEventListener(mp,N),()=>G.removeEventListener(mp,N)},[N]),_.jsx(r4,{scope:n,orientation:r,dir:T,loop:i,currentTabStopId:S,onItemFocus:v.useCallback(G=>C(G),[C]),onItemShiftTab:v.useCallback(()=>k(!0),[]),onFocusableItemAdd:v.useCallback(()=>V(G=>G+1),[]),onFocusableItemRemove:v.useCallback(()=>V(G=>G-1),[]),children:_.jsx(We.div,{tabIndex:w||P===0?-1:0,"data-orientation":r,...m,ref:y,style:{outline:"none",...e.style},onMouseDown:Ze(e.onMouseDown,()=>{U.current=!0}),onFocus:Ze(e.onFocus,G=>{const ie=!U.current;if(G.target===G.currentTarget&&ie&&!w){const $=new CustomEvent(mp,e4);if(G.currentTarget.dispatchEvent($),!$.defaultPrevented){const X=M().filter(j=>j.focusable),J=X.find(j=>j.active),he=X.find(j=>j.id===S),re=[J,he,...X].filter(Boolean).map(j=>j.ref.current);YS(re,p)}}U.current=!1}),onBlur:Ze(e.onBlur,()=>k(!1))})})}),GS="RovingFocusGroupItem",qS=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,children:l,...c}=e,f=fa(),h=o||f,p=a4(GS,n),m=p.currentTabStopId===h,E=FS(n),{onFocusableItemAdd:y,onFocusableItemRemove:T,currentTabStopId:S}=p;return v.useEffect(()=>{if(r)return y(),()=>T()},[r,y,T]),_.jsx(c0.ItemSlot,{scope:n,id:h,focusable:r,active:i,children:_.jsx(We.span,{tabIndex:m?0:-1,"data-orientation":p.orientation,...c,ref:t,onMouseDown:Ze(e.onMouseDown,C=>{r?p.onItemFocus(h):C.preventDefault()}),onFocus:Ze(e.onFocus,()=>p.onItemFocus(h)),onKeyDown:Ze(e.onKeyDown,C=>{if(C.key==="Tab"&&C.shiftKey){p.onItemShiftTab();return}if(C.target!==C.currentTarget)return;const w=l4(C,p.orientation,p.dir);if(w!==void 0){if(C.metaKey||C.ctrlKey||C.altKey||C.shiftKey)return;C.preventDefault();let N=E().filter(M=>M.focusable).map(M=>M.ref.current);if(w==="last")N.reverse();else if(w==="prev"||w==="next"){w==="prev"&&N.reverse();const M=N.indexOf(C.currentTarget);N=p.loop?u4(N,M+1):N.slice(M+1)}setTimeout(()=>YS(N))}}),children:typeof l=="function"?l({isCurrentTabStop:m,hasTabStop:S!=null}):l})})});qS.displayName=GS;var s4={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function o4(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function l4(e,t,n){const r=o4(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return s4[r]}function YS(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function u4(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var c4=VS,f4=qS;function Ux(e,[t,n]){return Math.min(n,Math.max(t,e))}var d4=[" ","Enter","ArrowUp","ArrowDown"],h4=[" ","Enter"],qi="Select",[ad,id,m4]=V2(qi),[es]=Zi(qi,[m4,DS]),sd=DS(),[p4,si]=es(qi),[g4,b4]=es(qi),E4="SelectProvider";function XS(e){const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:o,value:l,defaultValue:c,onValueChange:f,dir:h,name:p,autoComplete:m,disabled:E,required:y,form:T,internal_do_not_use_render:S}=e,C=sd(t),[w,k]=v.useState(null),[N,M]=v.useState(null),[U,P]=v.useState(!1),V=pg(h),[G,ie]=ei({prop:r,defaultProp:i??!1,onChange:o,caller:qi}),[$,X]=ei({prop:l,defaultProp:c,onChange:f,caller:qi}),J=v.useRef(null),he=w?!!T||!!w.closest("form"):!0,[ue,re]=v.useState(new Set),j=fa(),ee=Array.from(ue).map(z=>z.props.value).join(";"),ce=v.useCallback(z=>{re(te=>new Set(te).add(z))},[]),xe=v.useCallback(z=>{re(te=>{const D=new Set(te);return D.delete(z),D})},[]),O={required:y,trigger:w,onTriggerChange:k,valueNode:N,onValueNodeChange:M,valueNodeHasChildren:U,onValueNodeHasChildrenChange:P,contentId:j,value:$,onValueChange:X,open:G,onOpenChange:ie,dir:V,triggerPointerDownPosRef:J,disabled:E,name:p,autoComplete:m,form:T,nativeOptions:ue,nativeSelectKey:ee,isFormControl:he};return _.jsx(WD,{...C,children:_.jsx(p4,{scope:t,...O,children:_.jsx(ad.Provider,{scope:t,children:_.jsx(g4,{scope:t,onNativeOptionAdd:ce,onNativeOptionRemove:xe,children:I4(S)?S(O):n})})})})}XS.displayName=E4;var QS=e=>{const{__scopeSelect:t,children:n,...r}=e;return _.jsx(XS,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:i})=>_.jsxs(_.Fragment,{children:[n,i?_.jsx(vA,{__scopeSelect:t}):null]})})};QS.displayName=qi;var WS="SelectTrigger",KS=v.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,o=sd(n),l=si(WS,n),c=l.disabled||r,f=St(t,l.onTriggerChange),h=id(n),p=v.useRef("touch"),[m,E,y]=SA(S=>{const C=h().filter(N=>!N.disabled),w=C.find(N=>N.value===l.value),k=AA(C,S,w);k!==void 0&&l.onValueChange(k.value)}),T=S=>{c||(l.onOpenChange(!0),y()),S&&(l.triggerPointerDownPosRef.current={x:Math.round(S.pageX),y:Math.round(S.pageY)})};return _.jsx(KD,{asChild:!0,...o,children:_.jsx(We.button,{type:"button",role:"combobox","aria-controls":l.open?l.contentId:void 0,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":od(l.value)?"":void 0,...i,ref:f,onClick:Ze(i.onClick,S=>{S.currentTarget.focus(),p.current!=="mouse"&&T(S)}),onPointerDown:Ze(i.onPointerDown,S=>{p.current=S.pointerType;const C=S.target;C.hasPointerCapture(S.pointerId)&&C.releasePointerCapture(S.pointerId),S.button===0&&S.ctrlKey===!1&&S.pointerType==="mouse"&&(T(S),S.preventDefault())}),onKeyDown:Ze(i.onKeyDown,S=>{const C=m.current!=="";!(S.ctrlKey||S.altKey||S.metaKey)&&S.key.length===1&&E(S.key),!(C&&S.key===" ")&&d4.includes(S.key)&&(T(),S.preventDefault())})})})});KS.displayName=WS;var ZS="SelectValue",JS=v.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:o,placeholder:l="",...c}=e,f=si(ZS,n),{onValueNodeHasChildrenChange:h}=f,p=o!==void 0,m=St(t,f.onValueNodeChange);$t(()=>{h(p)},[h,p]);const E=od(f.value);return _.jsx(We.span,{...c,asChild:E?!1:c.asChild,ref:m,style:{pointerEvents:"none"},children:_.jsx(v.Fragment,{children:E?l:o},E?"placeholder":"value")})});JS.displayName=ZS;var y4="SelectIcon",eA=v.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return _.jsx(We.span,{"aria-hidden":!0,...i,ref:t,children:r||"▼"})});eA.displayName=y4;var tA="SelectPortal",[_4,x4]=es(tA,{forceMount:void 0}),nA=e=>{const{__scopeSelect:t,forceMount:n,...r}=e;return _.jsx(_4,{scope:e.__scopeSelect,forceMount:n,children:_.jsx(yg,{asChild:!0,...r})})};nA.displayName=tA;var ri="SelectContent",rA=v.forwardRef((e,t)=>{const n=x4(ri,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,o=si(ri,e.__scopeSelect),[l,c]=v.useState();return $t(()=>{c(new DocumentFragment)},[]),_.jsx(Ji,{present:r||o.open,children:({present:f})=>f?_.jsx(sA,{...i,ref:t}):_.jsx(aA,{...i,fragment:l})})});rA.displayName=ri;var aA=v.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,fragment:i}=e;return i?Ki.createPortal(_.jsx(iA,{scope:n,children:_.jsx(ad.Slot,{scope:n,children:_.jsx("div",{ref:t,children:r})})}),i):null});aA.displayName="SelectContentFragment";var fr=10,[iA,oi]=es(ri),T4="SelectContentImpl",v4=oo("SelectContent.RemoveScroll"),sA=v.forwardRef((e,t)=>{const{__scopeSelect:n}=e,{position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:o,onPointerDownOutside:l,side:c,sideOffset:f,align:h,alignOffset:p,arrowPadding:m,collisionBoundary:E,collisionPadding:y,sticky:T,hideWhenDetached:S,avoidCollisions:C,...w}=e,k=si(ri,n),[N,M]=v.useState(null),[U,P]=v.useState(null),V=St(t,M),[G,ie]=v.useState(null),[$,X]=v.useState(null),J=id(n),[he,ue]=v.useState(!1),re=v.useRef(!1);v.useEffect(()=>{if(N)return sS(N)},[N]),K2();const j=v.useCallback(be=>{const[ke,...Te]=J().map(Je=>Je.ref.current),[De]=Te.slice(-1),je=document.activeElement;for(const Je of be)if(Je===je||(Je?.scrollIntoView({block:"nearest"}),Je===ke&&U&&(U.scrollTop=0),Je===De&&U&&(U.scrollTop=U.scrollHeight),Je?.focus(),document.activeElement!==je))return},[J,U]),ee=v.useCallback(()=>j([G,N]),[j,G,N]);v.useEffect(()=>{he&&ee()},[he,ee]);const{onOpenChange:ce,triggerPointerDownPosRef:xe}=k;v.useEffect(()=>{if(N){let be={x:0,y:0};const ke=De=>{be={x:Math.abs(Math.round(De.pageX)-(xe.current?.x??0)),y:Math.abs(Math.round(De.pageY)-(xe.current?.y??0))}},Te=De=>{be.x<=10&&be.y<=10?De.preventDefault():De.composedPath().includes(N)||ce(!1),document.removeEventListener("pointermove",ke),xe.current=null};return xe.current!==null&&(document.addEventListener("pointermove",ke),document.addEventListener("pointerup",Te,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ke),document.removeEventListener("pointerup",Te,{capture:!0})}}},[N,ce,xe]),v.useEffect(()=>{const be=()=>ce(!1);return window.addEventListener("blur",be),window.addEventListener("resize",be),()=>{window.removeEventListener("blur",be),window.removeEventListener("resize",be)}},[ce]);const[O,z]=SA(be=>{const ke=J().filter(je=>!je.disabled),Te=ke.find(je=>je.ref.current===document.activeElement),De=AA(ke,be,Te);De&&setTimeout(()=>De.ref.current?.focus())}),te=v.useCallback((be,ke,Te)=>{const De=!re.current&&!Te;(k.value!==void 0&&k.value===ke||De)&&(ie(be),De&&(re.current=!0))},[k.value]),D=v.useCallback(()=>N?.focus(),[N]),ge=v.useCallback((be,ke,Te)=>{const De=!re.current&&!Te;(k.value!==void 0&&k.value===ke||De)&&X(be)},[k.value]),Ee=r==="popper"?f0:oA,ye=Ee===f0?{side:c,sideOffset:f,align:h,alignOffset:p,arrowPadding:m,collisionBoundary:E,collisionPadding:y,sticky:T,hideWhenDetached:S,avoidCollisions:C}:{};return _.jsx(iA,{scope:n,content:N,viewport:U,onViewportChange:P,itemRefCallback:te,selectedItem:G,onItemLeave:D,itemTextRefCallback:ge,focusSelectedItem:ee,selectedItemText:$,position:r,isPositioned:he,searchRef:O,children:_.jsx(_g,{as:v4,allowPinchZoom:!0,children:_.jsx(Eg,{asChild:!0,trapped:k.open,onMountAutoFocus:be=>{be.preventDefault()},onUnmountAutoFocus:Ze(i,be=>{k.trigger?.focus({preventScroll:!0}),be.preventDefault()}),children:_.jsx(bg,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:be=>be.preventDefault(),onDismiss:()=>k.onOpenChange(!1),children:_.jsx(Ee,{role:"listbox",id:k.contentId,"data-state":k.open?"open":"closed",dir:k.dir,onContextMenu:be=>be.preventDefault(),...w,...ye,onPlaced:()=>ue(!0),ref:V,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:Ze(w.onKeyDown,be=>{const ke=be.ctrlKey||be.altKey||be.metaKey;if(be.key==="Tab"&&be.preventDefault(),!ke&&be.key.length===1&&z(be.key),["ArrowUp","ArrowDown","Home","End"].includes(be.key)){let De=J().filter(je=>!je.disabled).map(je=>je.ref.current);if(["ArrowUp","End"].includes(be.key)&&(De=De.slice().reverse()),["ArrowUp","ArrowDown"].includes(be.key)){const je=be.target,Je=De.indexOf(je);De=De.slice(Je+1)}setTimeout(()=>j(De)),be.preventDefault()}})})})})})})});sA.displayName=T4;var S4="SelectItemAlignedPosition",oA=v.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,o=si(ri,n),l=oi(ri,n),[c,f]=v.useState(null),[h,p]=v.useState(null),m=St(t,p),E=id(n),y=v.useRef(!1),T=v.useRef(!0),{viewport:S,selectedItem:C,selectedItemText:w,focusSelectedItem:k}=l,N=v.useCallback(()=>{if(o.trigger&&o.valueNode&&c&&h&&S&&C&&w){const V=o.trigger.getBoundingClientRect(),G=h.getBoundingClientRect(),ie=o.valueNode.getBoundingClientRect(),$=w.getBoundingClientRect();if(o.dir!=="rtl"){const je=$.left-G.left,Je=ie.left-je,kt=V.left-Je,it=V.width+kt,On=Math.max(it,G.width),En=window.innerWidth-fr,xr=Ux(Je,[fr,Math.max(fr,En-On)]);c.style.minWidth=it+"px",c.style.left=xr+"px"}else{const je=G.right-$.right,Je=window.innerWidth-ie.right-je,kt=window.innerWidth-V.right-Je,it=V.width+kt,On=Math.max(it,G.width),En=window.innerWidth-fr,xr=Ux(Je,[fr,Math.max(fr,En-On)]);c.style.minWidth=it+"px",c.style.right=xr+"px"}const X=E(),J=window.innerHeight-fr*2,he=S.scrollHeight,ue=window.getComputedStyle(h),re=parseInt(ue.borderTopWidth,10),j=parseInt(ue.paddingTop,10),ee=parseInt(ue.borderBottomWidth,10),ce=parseInt(ue.paddingBottom,10),xe=re+j+he+ce+ee,O=Math.min(C.offsetHeight*5,xe),z=window.getComputedStyle(S),te=parseInt(z.paddingTop,10),D=parseInt(z.paddingBottom,10),ge=V.top+V.height/2-fr,Ee=J-ge,ye=C.offsetHeight/2,be=C.offsetTop+ye,ke=re+j+be,Te=xe-ke;if(ke<=ge){const je=X.length>0&&C===X[X.length-1].ref.current;c.style.bottom="0px";const Je=h.clientHeight-S.offsetTop-S.offsetHeight,kt=Math.max(Ee,ye+(je?D:0)+Je+ee),it=ke+kt;c.style.height=it+"px"}else{const je=X.length>0&&C===X[0].ref.current;c.style.top="0px";const kt=Math.max(ge,re+S.offsetTop+(je?te:0)+ye)+Te;c.style.height=kt+"px",S.scrollTop=ke-ge+S.offsetTop}c.style.margin=`${fr}px 0`,c.style.minHeight=O+"px",c.style.maxHeight=J+"px",r?.(),requestAnimationFrame(()=>y.current=!0)}},[E,o.trigger,o.valueNode,c,h,S,C,w,o.dir,r]);$t(()=>N(),[N]);const[M,U]=v.useState();$t(()=>{h&&U(window.getComputedStyle(h).zIndex)},[h]);const P=v.useCallback(V=>{V&&T.current===!0&&(N(),k?.(),T.current=!1)},[N,k]);return _.jsx(C4,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:y,onScrollButtonChange:P,children:_.jsx("div",{ref:f,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:M},children:_.jsx(We.div,{...i,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});oA.displayName=S4;var A4="SelectPopperPosition",f0=v.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=fr,...o}=e,l=sd(n);return _.jsx(ZD,{...l,...o,ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});f0.displayName=A4;var[C4,Lg]=es(ri,{}),d0="SelectViewport",lA=v.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,o=oi(d0,n),l=Lg(d0,n),c=St(t,o.onViewportChange),f=v.useRef(0);return _.jsxs(_.Fragment,{children:[_.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),_.jsx(ad.Slot,{scope:n,children:_.jsx(We.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:Ze(i.onScroll,h=>{const p=h.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:E}=l;if(E?.current&&m){const y=Math.abs(f.current-p.scrollTop);if(y>0){const T=window.innerHeight-fr*2,S=parseFloat(m.style.minHeight),C=parseFloat(m.style.height),w=Math.max(S,C);if(w<T){const k=w+y,N=Math.min(T,k),M=k-N;m.style.height=N+"px",m.style.bottom==="0px"&&(p.scrollTop=M>0?M:0,m.style.justifyContent="flex-end")}}}f.current=p.scrollTop})})})]})});lA.displayName=d0;var uA="SelectGroup",[w4,k4]=es(uA),cA=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=fa();return _.jsx(w4,{scope:n,id:i,children:_.jsx(We.div,{role:"group","aria-labelledby":i,...r,ref:t})})});cA.displayName=uA;var fA="SelectLabel",dA=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=k4(fA,n);return _.jsx(We.div,{id:i.id,...r,ref:t})});dA.displayName=fA;var Sf="SelectItem",[N4,hA]=es(Sf),mA=v.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:o,...l}=e,c=si(Sf,n),f=oi(Sf,n),h=c.value===r,[p,m]=v.useState(o??""),[E,y]=v.useState(!1),T=da(N=>f.itemRefCallback?.(N,r,i)),S=St(t,T),C=fa(),w=v.useRef("touch"),k=()=>{i||(c.onValueChange(r),c.onOpenChange(!1))};return _.jsx(N4,{scope:n,value:r,disabled:i,textId:C,isSelected:h,onItemTextChange:v.useCallback(N=>{m(M=>M||(N?.textContent??"").trim())},[]),children:_.jsx(ad.ItemSlot,{scope:n,value:r,disabled:i,textValue:p,children:_.jsx(We.div,{role:"option","aria-labelledby":C,"data-highlighted":E?"":void 0,"aria-selected":h&&E,"data-state":h?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...l,ref:S,onFocus:Ze(l.onFocus,()=>y(!0)),onBlur:Ze(l.onBlur,()=>y(!1)),onClick:Ze(l.onClick,()=>{w.current!=="mouse"&&k()}),onPointerUp:Ze(l.onPointerUp,()=>{w.current==="mouse"&&k()}),onPointerDown:Ze(l.onPointerDown,N=>{w.current=N.pointerType}),onPointerMove:Ze(l.onPointerMove,N=>{w.current=N.pointerType,i?f.onItemLeave?.():w.current==="mouse"&&N.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ze(l.onPointerLeave,N=>{N.currentTarget===document.activeElement&&f.onItemLeave?.()}),onKeyDown:Ze(l.onKeyDown,N=>{f.searchRef?.current!==""&&N.key===" "||(h4.includes(N.key)&&k(),N.key===" "&&N.preventDefault())})})})})});mA.displayName=Sf;var Nl="SelectItemText",pA=v.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...o}=e,l=si(Nl,n),c=oi(Nl,n),f=hA(Nl,n),h=b4(Nl,n),[p,m]=v.useState(null),E=da(k=>c.itemTextRefCallback?.(k,f.value,f.disabled)),y=St(t,m,f.onItemTextChange,E),T=p?.textContent,S=v.useMemo(()=>_.jsx("option",{value:f.value,disabled:f.disabled,children:T},f.value),[f.disabled,f.value,T]),{onNativeOptionAdd:C,onNativeOptionRemove:w}=h;return $t(()=>(C(S),()=>w(S)),[C,w,S]),_.jsxs(_.Fragment,{children:[_.jsx(We.span,{id:f.textId,...o,ref:y}),f.isSelected&&l.valueNode&&!l.valueNodeHasChildren&&!od(l.value)?Ki.createPortal(o.children,l.valueNode):null]})});pA.displayName=Nl;var gA="SelectItemIndicator",bA=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return hA(gA,n).isSelected?_.jsx(We.span,{"aria-hidden":!0,...r,ref:t}):null});bA.displayName=gA;var h0="SelectScrollUpButton",EA=v.forwardRef((e,t)=>{const n=oi(h0,e.__scopeSelect),r=Lg(h0,e.__scopeSelect),[i,o]=v.useState(!1),l=St(t,r.onScrollButtonChange);return $t(()=>{if(n.viewport&&n.isPositioned){let c=function(){const h=f.scrollTop>0;o(h)};const f=n.viewport;return c(),f.addEventListener("scroll",c),()=>f.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),i?_.jsx(_A,{...e,ref:l,onAutoScroll:()=>{const{viewport:c,selectedItem:f}=n;c&&f&&(c.scrollTop=c.scrollTop-f.offsetHeight)}}):null});EA.displayName=h0;var m0="SelectScrollDownButton",yA=v.forwardRef((e,t)=>{const n=oi(m0,e.__scopeSelect),r=Lg(m0,e.__scopeSelect),[i,o]=v.useState(!1),l=St(t,r.onScrollButtonChange);return $t(()=>{if(n.viewport&&n.isPositioned){let c=function(){const h=f.scrollHeight-f.clientHeight,p=Math.ceil(f.scrollTop)<h;o(p)};const f=n.viewport;return c(),f.addEventListener("scroll",c),()=>f.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),i?_.jsx(_A,{...e,ref:l,onAutoScroll:()=>{const{viewport:c,selectedItem:f}=n;c&&f&&(c.scrollTop=c.scrollTop+f.offsetHeight)}}):null});yA.displayName=m0;var _A=v.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,o=oi("SelectScrollButton",n),l=v.useRef(null),c=id(n),f=v.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return v.useEffect(()=>()=>f(),[f]),$t(()=>{c().find(p=>p.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[c]),_.jsx(We.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:Ze(i.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(r,50))}),onPointerMove:Ze(i.onPointerMove,()=>{o.onItemLeave?.(),l.current===null&&(l.current=window.setInterval(r,50))}),onPointerLeave:Ze(i.onPointerLeave,()=>{f()})})}),R4="SelectSeparator",O4=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return _.jsx(We.div,{"aria-hidden":!0,...r,ref:t})});O4.displayName=R4;var xA="SelectArrow",L4=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=sd(n);return oi(xA,n).position==="popper"?_.jsx(JD,{...i,...r,ref:t}):null});L4.displayName=xA;var TA="SelectBubbleInput",vA=v.forwardRef(({__scopeSelect:e,...t},n)=>{const r=si(TA,e),{value:i,onValueChange:o,required:l,disabled:c,name:f,autoComplete:h,form:p}=r,{nativeOptions:m,nativeSelectKey:E}=r,y=v.useRef(null),T=St(n,y),S=i??"",C=P6(S),w=Array.from(m).some(k=>(k.props.value??"")==="");return v.useEffect(()=>{const k=y.current;if(!k)return;const N=window.HTMLSelectElement.prototype,U=Object.getOwnPropertyDescriptor(N,"value").set;if(C!==S&&U){const P=new Event("change",{bubbles:!0});U.call(k,S),k.dispatchEvent(P)}},[C,S]),_.jsxs(We.select,{"aria-hidden":!0,required:l,tabIndex:-1,name:f,autoComplete:h,disabled:c,form:p,onChange:k=>o(k.target.value),...t,style:{...$2,...t.style},ref:T,defaultValue:S,children:[od(i)&&!w?_.jsx("option",{value:""}):null,Array.from(m)]},E)});vA.displayName=TA;function I4(e){return typeof e=="function"}function od(e){return e===""||e===void 0}function SA(e){const t=da(e),n=v.useRef(""),r=v.useRef(0),i=v.useCallback(l=>{const c=n.current+l;t(c),(function f(h){n.current=h,window.clearTimeout(r.current),h!==""&&(r.current=window.setTimeout(()=>f(""),1e3))})(c)},[t]),o=v.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,o]}function AA(e,t,n){const i=t.length>1&&Array.from(t).every(h=>h===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let l=D4(e,Math.max(o,0));i.length===1&&(l=l.filter(h=>h!==n));const f=l.find(h=>h.textValue.toLowerCase().startsWith(i.toLowerCase()));return f!==n?f:void 0}function D4(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var M4="Separator",Hx="horizontal",P4=["horizontal","vertical"],CA=v.forwardRef((e,t)=>{const{decorative:n,orientation:r=Hx,...i}=e,o=B4(r)?r:Hx,c=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return _.jsx(We.div,{"data-orientation":o,...c,...i,ref:t})});CA.displayName=M4;function B4(e){return P4.includes(e)}var j4=CA,ld="Tabs",[U4]=Zi(ld,[$S]),wA=$S(),[H4,Ig]=U4(ld),kA=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:o,orientation:l="horizontal",dir:c,activationMode:f="automatic",...h}=e,p=pg(c),[m,E]=ei({prop:r,onChange:i,defaultProp:o??"",caller:ld});return _.jsx(H4,{scope:n,baseId:fa(),value:m,onValueChange:E,orientation:l,dir:p,activationMode:f,children:_.jsx(We.div,{dir:p,"data-orientation":l,...h,ref:t})})});kA.displayName=ld;var NA="TabsList",RA=v.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,o=Ig(NA,n),l=wA(n);return _.jsx(c4,{asChild:!0,...l,orientation:o.orientation,dir:o.dir,loop:r,children:_.jsx(We.div,{role:"tablist","aria-orientation":o.orientation,...i,ref:t})})});RA.displayName=NA;var OA="TabsTrigger",LA=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...o}=e,l=Ig(OA,n),c=wA(n),f=MA(l.baseId,r),h=PA(l.baseId,r),p=r===l.value;return _.jsx(f4,{asChild:!0,...c,focusable:!i,active:p,children:_.jsx(We.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":h,"data-state":p?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:f,...o,ref:t,onMouseDown:Ze(e.onMouseDown,m=>{!i&&m.button===0&&m.ctrlKey===!1?l.onValueChange(r):m.preventDefault()}),onKeyDown:Ze(e.onKeyDown,m=>{[" ","Enter"].includes(m.key)&&l.onValueChange(r)}),onFocus:Ze(e.onFocus,()=>{const m=l.activationMode!=="manual";!p&&!i&&m&&l.onValueChange(r)})})})});LA.displayName=OA;var IA="TabsContent",DA=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:o,...l}=e,c=Ig(IA,n),f=MA(c.baseId,r),h=PA(c.baseId,r),p=r===c.value,m=v.useRef(p);return v.useEffect(()=>{const E=requestAnimationFrame(()=>m.current=!1);return()=>cancelAnimationFrame(E)},[]),_.jsx(Ji,{present:i||p,children:({present:E})=>_.jsx(We.div,{"data-state":p?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":f,hidden:!E,id:h,tabIndex:0,...l,ref:t,style:{...e.style,animationDuration:m.current?"0s":void 0},children:E&&o})})});DA.displayName=IA;function MA(e,t){return`${e}-trigger-${t}`}function PA(e,t){return`${e}-content-${t}`}var z4=kA,F4=RA,$4=LA,V4=DA;const G4=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},q4=(e,t)=>({classGroupId:e,validator:t}),BA=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Af="-",zx=[],Y4="arbitrary..",X4=e=>{const t=W4(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return Q4(l);const c=l.split(Af),f=c[0]===""&&c.length>1?1:0;return jA(c,f,t)},getConflictingClassGroupIds:(l,c)=>{if(c){const f=r[l],h=n[l];return f?h?G4(h,f):f:h||zx}return n[l]||zx}}},jA=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],o=n.nextPart.get(i);if(o){const h=jA(e,t+1,o);if(h)return h}const l=n.validators;if(l===null)return;const c=t===0?e.join(Af):e.slice(t).join(Af),f=l.length;for(let h=0;h<f;h++){const p=l[h];if(p.validator(c))return p.classGroupId}},Q4=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?Y4+r:void 0})(),W4=e=>{const{theme:t,classGroups:n}=e;return K4(n,t)},K4=(e,t)=>{const n=BA();for(const r in e){const i=e[r];Dg(i,n,r,t)}return n},Dg=(e,t,n,r)=>{const i=e.length;for(let o=0;o<i;o++){const l=e[o];Z4(l,t,n,r)}},Z4=(e,t,n,r)=>{if(typeof e=="string"){J4(e,t,n);return}if(typeof e=="function"){e5(e,t,n,r);return}t5(e,t,n,r)},J4=(e,t,n)=>{const r=e===""?t:UA(t,e);r.classGroupId=n},e5=(e,t,n,r)=>{if(n5(e)){Dg(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(q4(n,e))},t5=(e,t,n,r)=>{const i=Object.entries(e),o=i.length;for(let l=0;l<o;l++){const[c,f]=i[l];Dg(f,UA(t,c),n,r)}},UA=(e,t)=>{let n=e;const r=t.split(Af),i=r.length;for(let o=0;o<i;o++){const l=r[o];let c=n.nextPart.get(l);c||(c=BA(),n.nextPart.set(l,c)),n=c}return n},n5=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,r5=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const i=(o,l)=>{n[o]=l,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(o){let l=n[o];if(l!==void 0)return l;if((l=r[o])!==void 0)return i(o,l),l},set(o,l){o in n?n[o]=l:i(o,l)}}},p0="!",Fx=":",a5=[],$x=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),i5=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const o=[];let l=0,c=0,f=0,h;const p=i.length;for(let S=0;S<p;S++){const C=i[S];if(l===0&&c===0){if(C===Fx){o.push(i.slice(f,S)),f=S+1;continue}if(C==="/"){h=S;continue}}C==="["?l++:C==="]"?l--:C==="("?c++:C===")"&&c--}const m=o.length===0?i:i.slice(f);let E=m,y=!1;m.endsWith(p0)?(E=m.slice(0,-1),y=!0):m.startsWith(p0)&&(E=m.slice(1),y=!0);const T=h&&h>f?h-f:void 0;return $x(o,y,E,T)};if(t){const i=t+Fx,o=r;r=l=>l.startsWith(i)?o(l.slice(i.length)):$x(a5,!1,l,void 0,!0)}if(n){const i=r;r=o=>n({className:o,parseClassName:i})}return r},s5=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let i=[];for(let o=0;o<n.length;o++){const l=n[o],c=l[0]==="[",f=t.has(l);c||f?(i.length>0&&(i.sort(),r.push(...i),i=[]),r.push(l)):i.push(l)}return i.length>0&&(i.sort(),r.push(...i)),r}},o5=e=>({cache:r5(e.cacheSize),parseClassName:i5(e),sortModifiers:s5(e),postfixLookupClassGroupIds:l5(e),...X4(e)}),l5=e=>{const t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let r=0;r<n.length;r++)t[n[r]]=!0;return t},u5=/\s+/,c5=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:o,postfixLookupClassGroupIds:l}=t,c=[],f=e.trim().split(u5);let h="";for(let p=f.length-1;p>=0;p-=1){const m=f[p],{isExternal:E,modifiers:y,hasImportantModifier:T,baseClassName:S,maybePostfixModifierPosition:C}=n(m);if(E){h=m+(h.length>0?" "+h:h);continue}let w=!!C,k;if(w){const V=S.substring(0,C);k=r(V);const G=k&&l[k]?r(S):void 0;G&&G!==k&&(k=G,w=!1)}else k=r(S);if(!k){if(!w){h=m+(h.length>0?" "+h:h);continue}if(k=r(S),!k){h=m+(h.length>0?" "+h:h);continue}w=!1}const N=y.length===0?"":y.length===1?y[0]:o(y).join(":"),M=T?N+p0:N,U=M+k;if(c.indexOf(U)>-1)continue;c.push(U);const P=i(k,w);for(let V=0;V<P.length;++V){const G=P[V];c.push(M+G)}h=m+(h.length>0?" "+h:h)}return h},f5=(...e)=>{let t=0,n,r,i="";for(;t<e.length;)(n=e[t++])&&(r=HA(n))&&(i&&(i+=" "),i+=r);return i},HA=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=HA(e[r]))&&(n&&(n+=" "),n+=t);return n},d5=(e,...t)=>{let n,r,i,o;const l=f=>{const h=t.reduce((p,m)=>m(p),e());return n=o5(h),r=n.cache.get,i=n.cache.set,o=c,c(f)},c=f=>{const h=r(f);if(h)return h;const p=c5(f,n);return i(f,p),p};return o=l,(...f)=>o(f5(...f))},h5=[],Ht=e=>{const t=n=>n[e]||h5;return t.isThemeGetter=!0,t},zA=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,FA=/^\((?:(\w[\w-]*):)?(.+)\)$/i,m5=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,p5=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,g5=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,b5=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,E5=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,y5=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,$a=e=>m5.test(e),ze=e=>!!e&&!Number.isNaN(Number(e)),Cr=e=>!!e&&Number.isInteger(Number(e)),pp=e=>e.endsWith("%")&&ze(e.slice(0,-1)),sa=e=>p5.test(e),$A=()=>!0,_5=e=>g5.test(e)&&!b5.test(e),Mg=()=>!1,x5=e=>E5.test(e),T5=e=>y5.test(e),v5=e=>!ve(e)&&!Se(e),S5=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),A5=e=>li(e,qA,Mg),ve=e=>zA.test(e),Ni=e=>li(e,YA,_5),Vx=e=>li(e,I5,ze),C5=e=>li(e,QA,$A),w5=e=>li(e,XA,Mg),Gx=e=>li(e,VA,Mg),k5=e=>li(e,GA,T5),Fc=e=>li(e,WA,x5),Se=e=>FA.test(e),yl=e=>ts(e,YA),N5=e=>ts(e,XA),qx=e=>ts(e,VA),R5=e=>ts(e,qA),O5=e=>ts(e,GA),$c=e=>ts(e,WA,!0),L5=e=>ts(e,QA,!0),li=(e,t,n)=>{const r=zA.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},ts=(e,t,n=!1)=>{const r=FA.exec(e);return r?r[1]?t(r[1]):n:!1},VA=e=>e==="position"||e==="percentage",GA=e=>e==="image"||e==="url",qA=e=>e==="length"||e==="size"||e==="bg-size",YA=e=>e==="length",I5=e=>e==="number",XA=e=>e==="family-name",QA=e=>e==="number"||e==="weight",WA=e=>e==="shadow",D5=()=>{const e=Ht("color"),t=Ht("font"),n=Ht("text"),r=Ht("font-weight"),i=Ht("tracking"),o=Ht("leading"),l=Ht("breakpoint"),c=Ht("container"),f=Ht("spacing"),h=Ht("radius"),p=Ht("shadow"),m=Ht("inset-shadow"),E=Ht("text-shadow"),y=Ht("drop-shadow"),T=Ht("blur"),S=Ht("perspective"),C=Ht("aspect"),w=Ht("ease"),k=Ht("animate"),N=()=>["auto","avoid","all","avoid-page","page","left","right","column"],M=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],U=()=>[...M(),Se,ve],P=()=>["auto","hidden","clip","visible","scroll"],V=()=>["auto","contain","none"],G=()=>[Se,ve,f],ie=()=>[$a,"full","auto",...G()],$=()=>[Cr,"none","subgrid",Se,ve],X=()=>["auto",{span:["full",Cr,Se,ve]},Cr,Se,ve],J=()=>[Cr,"auto",Se,ve],he=()=>["auto","min","max","fr",Se,ve],ue=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],re=()=>["start","end","center","stretch","center-safe","end-safe"],j=()=>["auto",...G()],ee=()=>[$a,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...G()],ce=()=>[$a,"screen","full","dvw","lvw","svw","min","max","fit",...G()],xe=()=>[$a,"screen","full","lh","dvh","lvh","svh","min","max","fit",...G()],O=()=>[e,Se,ve],z=()=>[...M(),qx,Gx,{position:[Se,ve]}],te=()=>["no-repeat",{repeat:["","x","y","space","round"]}],D=()=>["auto","cover","contain",R5,A5,{size:[Se,ve]}],ge=()=>[pp,yl,Ni],Ee=()=>["","none","full",h,Se,ve],ye=()=>["",ze,yl,Ni],be=()=>["solid","dashed","dotted","double"],ke=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Te=()=>[ze,pp,qx,Gx],De=()=>["","none",T,Se,ve],je=()=>["none",ze,Se,ve],Je=()=>["none",ze,Se,ve],kt=()=>[ze,Se,ve],it=()=>[$a,"full",...G()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[sa],breakpoint:[sa],color:[$A],container:[sa],"drop-shadow":[sa],ease:["in","out","in-out"],font:[v5],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[sa],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[sa],shadow:[sa],spacing:["px",ze],text:[sa],"text-shadow":[sa],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",$a,ve,Se,C]}],container:["container"],"container-type":[{"@container":["","normal","size",Se,ve]}],"container-named":[S5],columns:[{columns:[ze,ve,Se,c]}],"break-after":[{"break-after":N()}],"break-before":[{"break-before":N()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:U()}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:V()}],"overscroll-x":[{"overscroll-x":V()}],"overscroll-y":[{"overscroll-y":V()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ie()}],"inset-x":[{"inset-x":ie()}],"inset-y":[{"inset-y":ie()}],start:[{"inset-s":ie(),start:ie()}],end:[{"inset-e":ie(),end:ie()}],"inset-bs":[{"inset-bs":ie()}],"inset-be":[{"inset-be":ie()}],top:[{top:ie()}],right:[{right:ie()}],bottom:[{bottom:ie()}],left:[{left:ie()}],visibility:["visible","invisible","collapse"],z:[{z:[Cr,"auto",Se,ve]}],basis:[{basis:[$a,"full","auto",c,...G()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ze,$a,"auto","initial","none",ve]}],grow:[{grow:["",ze,Se,ve]}],shrink:[{shrink:["",ze,Se,ve]}],order:[{order:[Cr,"first","last","none",Se,ve]}],"grid-cols":[{"grid-cols":$()}],"col-start-end":[{col:X()}],"col-start":[{"col-start":J()}],"col-end":[{"col-end":J()}],"grid-rows":[{"grid-rows":$()}],"row-start-end":[{row:X()}],"row-start":[{"row-start":J()}],"row-end":[{"row-end":J()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":he()}],"auto-rows":[{"auto-rows":he()}],gap:[{gap:G()}],"gap-x":[{"gap-x":G()}],"gap-y":[{"gap-y":G()}],"justify-content":[{justify:[...ue(),"normal"]}],"justify-items":[{"justify-items":[...re(),"normal"]}],"justify-self":[{"justify-self":["auto",...re()]}],"align-content":[{content:["normal",...ue()]}],"align-items":[{items:[...re(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...re(),{baseline:["","last"]}]}],"place-content":[{"place-content":ue()}],"place-items":[{"place-items":[...re(),"baseline"]}],"place-self":[{"place-self":["auto",...re()]}],p:[{p:G()}],px:[{px:G()}],py:[{py:G()}],ps:[{ps:G()}],pe:[{pe:G()}],pbs:[{pbs:G()}],pbe:[{pbe:G()}],pt:[{pt:G()}],pr:[{pr:G()}],pb:[{pb:G()}],pl:[{pl:G()}],m:[{m:j()}],mx:[{mx:j()}],my:[{my:j()}],ms:[{ms:j()}],me:[{me:j()}],mbs:[{mbs:j()}],mbe:[{mbe:j()}],mt:[{mt:j()}],mr:[{mr:j()}],mb:[{mb:j()}],ml:[{ml:j()}],"space-x":[{"space-x":G()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":G()}],"space-y-reverse":["space-y-reverse"],size:[{size:ee()}],"inline-size":[{inline:["auto",...ce()]}],"min-inline-size":[{"min-inline":["auto",...ce()]}],"max-inline-size":[{"max-inline":["none",...ce()]}],"block-size":[{block:["auto",...xe()]}],"min-block-size":[{"min-block":["auto",...xe()]}],"max-block-size":[{"max-block":["none",...xe()]}],w:[{w:[c,"screen",...ee()]}],"min-w":[{"min-w":[c,"screen","none",...ee()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[l]},...ee()]}],h:[{h:["screen","lh",...ee()]}],"min-h":[{"min-h":["screen","lh","none",...ee()]}],"max-h":[{"max-h":["screen","lh",...ee()]}],"font-size":[{text:["base",n,yl,Ni]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,L5,C5]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",pp,ve]}],"font-family":[{font:[N5,w5,t]}],"font-features":[{"font-features":[ve]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,Se,ve]}],"line-clamp":[{"line-clamp":[ze,"none",Se,Vx]}],leading:[{leading:[o,...G()]}],"list-image":[{"list-image":["none",Se,ve]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Se,ve]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:O()}],"text-color":[{text:O()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...be(),"wavy"]}],"text-decoration-thickness":[{decoration:[ze,"from-font","auto",Se,Ni]}],"text-decoration-color":[{decoration:O()}],"underline-offset":[{"underline-offset":[ze,"auto",Se,ve]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:G()}],"tab-size":[{tab:[Cr,Se,ve]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Se,ve]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Se,ve]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:z()}],"bg-repeat":[{bg:te()}],"bg-size":[{bg:D()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Cr,Se,ve],radial:["",Se,ve],conic:[Cr,Se,ve]},O5,k5]}],"bg-color":[{bg:O()}],"gradient-from-pos":[{from:ge()}],"gradient-via-pos":[{via:ge()}],"gradient-to-pos":[{to:ge()}],"gradient-from":[{from:O()}],"gradient-via":[{via:O()}],"gradient-to":[{to:O()}],rounded:[{rounded:Ee()}],"rounded-s":[{"rounded-s":Ee()}],"rounded-e":[{"rounded-e":Ee()}],"rounded-t":[{"rounded-t":Ee()}],"rounded-r":[{"rounded-r":Ee()}],"rounded-b":[{"rounded-b":Ee()}],"rounded-l":[{"rounded-l":Ee()}],"rounded-ss":[{"rounded-ss":Ee()}],"rounded-se":[{"rounded-se":Ee()}],"rounded-ee":[{"rounded-ee":Ee()}],"rounded-es":[{"rounded-es":Ee()}],"rounded-tl":[{"rounded-tl":Ee()}],"rounded-tr":[{"rounded-tr":Ee()}],"rounded-br":[{"rounded-br":Ee()}],"rounded-bl":[{"rounded-bl":Ee()}],"border-w":[{border:ye()}],"border-w-x":[{"border-x":ye()}],"border-w-y":[{"border-y":ye()}],"border-w-s":[{"border-s":ye()}],"border-w-e":[{"border-e":ye()}],"border-w-bs":[{"border-bs":ye()}],"border-w-be":[{"border-be":ye()}],"border-w-t":[{"border-t":ye()}],"border-w-r":[{"border-r":ye()}],"border-w-b":[{"border-b":ye()}],"border-w-l":[{"border-l":ye()}],"divide-x":[{"divide-x":ye()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ye()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...be(),"hidden","none"]}],"divide-style":[{divide:[...be(),"hidden","none"]}],"border-color":[{border:O()}],"border-color-x":[{"border-x":O()}],"border-color-y":[{"border-y":O()}],"border-color-s":[{"border-s":O()}],"border-color-e":[{"border-e":O()}],"border-color-bs":[{"border-bs":O()}],"border-color-be":[{"border-be":O()}],"border-color-t":[{"border-t":O()}],"border-color-r":[{"border-r":O()}],"border-color-b":[{"border-b":O()}],"border-color-l":[{"border-l":O()}],"divide-color":[{divide:O()}],"outline-style":[{outline:[...be(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ze,Se,ve]}],"outline-w":[{outline:["",ze,yl,Ni]}],"outline-color":[{outline:O()}],shadow:[{shadow:["","none",p,$c,Fc]}],"shadow-color":[{shadow:O()}],"inset-shadow":[{"inset-shadow":["none",m,$c,Fc]}],"inset-shadow-color":[{"inset-shadow":O()}],"ring-w":[{ring:ye()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:O()}],"ring-offset-w":[{"ring-offset":[ze,Ni]}],"ring-offset-color":[{"ring-offset":O()}],"inset-ring-w":[{"inset-ring":ye()}],"inset-ring-color":[{"inset-ring":O()}],"text-shadow":[{"text-shadow":["none",E,$c,Fc]}],"text-shadow-color":[{"text-shadow":O()}],opacity:[{opacity:[ze,Se,ve]}],"mix-blend":[{"mix-blend":[...ke(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ke()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ze]}],"mask-image-linear-from-pos":[{"mask-linear-from":Te()}],"mask-image-linear-to-pos":[{"mask-linear-to":Te()}],"mask-image-linear-from-color":[{"mask-linear-from":O()}],"mask-image-linear-to-color":[{"mask-linear-to":O()}],"mask-image-t-from-pos":[{"mask-t-from":Te()}],"mask-image-t-to-pos":[{"mask-t-to":Te()}],"mask-image-t-from-color":[{"mask-t-from":O()}],"mask-image-t-to-color":[{"mask-t-to":O()}],"mask-image-r-from-pos":[{"mask-r-from":Te()}],"mask-image-r-to-pos":[{"mask-r-to":Te()}],"mask-image-r-from-color":[{"mask-r-from":O()}],"mask-image-r-to-color":[{"mask-r-to":O()}],"mask-image-b-from-pos":[{"mask-b-from":Te()}],"mask-image-b-to-pos":[{"mask-b-to":Te()}],"mask-image-b-from-color":[{"mask-b-from":O()}],"mask-image-b-to-color":[{"mask-b-to":O()}],"mask-image-l-from-pos":[{"mask-l-from":Te()}],"mask-image-l-to-pos":[{"mask-l-to":Te()}],"mask-image-l-from-color":[{"mask-l-from":O()}],"mask-image-l-to-color":[{"mask-l-to":O()}],"mask-image-x-from-pos":[{"mask-x-from":Te()}],"mask-image-x-to-pos":[{"mask-x-to":Te()}],"mask-image-x-from-color":[{"mask-x-from":O()}],"mask-image-x-to-color":[{"mask-x-to":O()}],"mask-image-y-from-pos":[{"mask-y-from":Te()}],"mask-image-y-to-pos":[{"mask-y-to":Te()}],"mask-image-y-from-color":[{"mask-y-from":O()}],"mask-image-y-to-color":[{"mask-y-to":O()}],"mask-image-radial":[{"mask-radial":[Se,ve]}],"mask-image-radial-from-pos":[{"mask-radial-from":Te()}],"mask-image-radial-to-pos":[{"mask-radial-to":Te()}],"mask-image-radial-from-color":[{"mask-radial-from":O()}],"mask-image-radial-to-color":[{"mask-radial-to":O()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":M()}],"mask-image-conic-pos":[{"mask-conic":[ze]}],"mask-image-conic-from-pos":[{"mask-conic-from":Te()}],"mask-image-conic-to-pos":[{"mask-conic-to":Te()}],"mask-image-conic-from-color":[{"mask-conic-from":O()}],"mask-image-conic-to-color":[{"mask-conic-to":O()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:z()}],"mask-repeat":[{mask:te()}],"mask-size":[{mask:D()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Se,ve]}],filter:[{filter:["","none",Se,ve]}],blur:[{blur:De()}],brightness:[{brightness:[ze,Se,ve]}],contrast:[{contrast:[ze,Se,ve]}],"drop-shadow":[{"drop-shadow":["","none",y,$c,Fc]}],"drop-shadow-color":[{"drop-shadow":O()}],grayscale:[{grayscale:["",ze,Se,ve]}],"hue-rotate":[{"hue-rotate":[ze,Se,ve]}],invert:[{invert:["",ze,Se,ve]}],saturate:[{saturate:[ze,Se,ve]}],sepia:[{sepia:["",ze,Se,ve]}],"backdrop-filter":[{"backdrop-filter":["","none",Se,ve]}],"backdrop-blur":[{"backdrop-blur":De()}],"backdrop-brightness":[{"backdrop-brightness":[ze,Se,ve]}],"backdrop-contrast":[{"backdrop-contrast":[ze,Se,ve]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ze,Se,ve]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ze,Se,ve]}],"backdrop-invert":[{"backdrop-invert":["",ze,Se,ve]}],"backdrop-opacity":[{"backdrop-opacity":[ze,Se,ve]}],"backdrop-saturate":[{"backdrop-saturate":[ze,Se,ve]}],"backdrop-sepia":[{"backdrop-sepia":["",ze,Se,ve]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":G()}],"border-spacing-x":[{"border-spacing-x":G()}],"border-spacing-y":[{"border-spacing-y":G()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Se,ve]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ze,"initial",Se,ve]}],ease:[{ease:["linear","initial",w,Se,ve]}],delay:[{delay:[ze,Se,ve]}],animate:[{animate:["none",k,Se,ve]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,Se,ve]}],"perspective-origin":[{"perspective-origin":U()}],rotate:[{rotate:je()}],"rotate-x":[{"rotate-x":je()}],"rotate-y":[{"rotate-y":je()}],"rotate-z":[{"rotate-z":je()}],scale:[{scale:Je()}],"scale-x":[{"scale-x":Je()}],"scale-y":[{"scale-y":Je()}],"scale-z":[{"scale-z":Je()}],"scale-3d":["scale-3d"],skew:[{skew:kt()}],"skew-x":[{"skew-x":kt()}],"skew-y":[{"skew-y":kt()}],transform:[{transform:[Se,ve,"","none","gpu","cpu"]}],"transform-origin":[{origin:U()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:it()}],"translate-x":[{"translate-x":it()}],"translate-y":[{"translate-y":it()}],"translate-z":[{"translate-z":it()}],"translate-none":["translate-none"],zoom:[{zoom:[Cr,Se,ve]}],accent:[{accent:O()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:O()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Se,ve]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":O()}],"scrollbar-track-color":[{"scrollbar-track":O()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":G()}],"scroll-mx":[{"scroll-mx":G()}],"scroll-my":[{"scroll-my":G()}],"scroll-ms":[{"scroll-ms":G()}],"scroll-me":[{"scroll-me":G()}],"scroll-mbs":[{"scroll-mbs":G()}],"scroll-mbe":[{"scroll-mbe":G()}],"scroll-mt":[{"scroll-mt":G()}],"scroll-mr":[{"scroll-mr":G()}],"scroll-mb":[{"scroll-mb":G()}],"scroll-ml":[{"scroll-ml":G()}],"scroll-p":[{"scroll-p":G()}],"scroll-px":[{"scroll-px":G()}],"scroll-py":[{"scroll-py":G()}],"scroll-ps":[{"scroll-ps":G()}],"scroll-pe":[{"scroll-pe":G()}],"scroll-pbs":[{"scroll-pbs":G()}],"scroll-pbe":[{"scroll-pbe":G()}],"scroll-pt":[{"scroll-pt":G()}],"scroll-pr":[{"scroll-pr":G()}],"scroll-pb":[{"scroll-pb":G()}],"scroll-pl":[{"scroll-pl":G()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Se,ve]}],fill:[{fill:["none",...O()]}],"stroke-w":[{stroke:[ze,yl,Ni,Vx]}],stroke:[{stroke:["none",...O()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Pg=d5(D5);function we(...e){return Pg(Qf(e))}const M5=fg("inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function ln({className:e,variant:t="default",size:n="default",asChild:r=!1,...i}){const o=r?F2:"button";return _.jsx(o,{"data-slot":"button","data-variant":t,"data-size":n,className:we(M5({variant:t,size:n,className:e})),...i})}const P5={damping:.7,stiffness:.05,mass:1.25},B5=70,j5=1e3/60,U5=350;let ud=!1;globalThis.document?.addEventListener("mousedown",()=>{ud=!0});globalThis.document?.addEventListener("mouseup",()=>{ud=!1});globalThis.document?.addEventListener("click",()=>{ud=!1});const H5=(e={})=>{const[t,n]=v.useState(!1),[r,i]=v.useState(e.initial!==!1),[o,l]=v.useState(!1),c=v.useRef(null);c.current=e;const f=v.useCallback(()=>{if(!ud)return!1;const k=window.getSelection();if(!k||!k.rangeCount)return!1;const N=k.getRangeAt(0);return N.commonAncestorContainer.contains(C.current)||C.current?.contains(N.commonAncestorContainer)},[]),h=v.useCallback(k=>{m.isAtBottom=k,i(k)},[]),p=v.useCallback(k=>{m.escapedFromLock=k,n(k)},[]),m=v.useMemo(()=>{let k;return{escapedFromLock:t,isAtBottom:r,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return C.current?.scrollTop??0},set scrollTop(N){if(C.current){const{scrollBehavior:M}=getComputedStyle(C.current);M!=="auto"&&(C.current.style.scrollBehavior="auto"),C.current.scrollTop=N,m.ignoreScrollToTop=C.current.scrollTop,M!=="auto"&&(C.current.style.scrollBehavior=M)}},get targetScrollTop(){return!C.current||!w.current?0:C.current.scrollHeight-1-C.current.clientHeight},get calculatedTargetScrollTop(){if(!C.current||!w.current)return 0;const{targetScrollTop:N}=this;if(!e.targetScrollTop)return N;if(k?.targetScrollTop===N)return k.calculatedScrollTop;const M=Math.max(Math.min(e.targetScrollTop(N,{scrollElement:C.current,contentElement:w.current}),N),0);return k={targetScrollTop:N,calculatedScrollTop:M},requestAnimationFrame(()=>{k=void 0}),M},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=B5}}},[]),E=v.useCallback((k={})=>{typeof k=="string"&&(k={animation:k}),k.preserveScrollPosition||h(!0);const N=Date.now()+(Number(k.wait)||0),M=bp(c.current,k.animation),{ignoreEscapes:U=!1}=k;let P,V=m.calculatedTargetScrollTop;k.duration instanceof Promise?k.duration.finally(()=>{P=Date.now()}):P=N+(k.duration??0);const G=async()=>{const ie=new Promise(requestAnimationFrame).then(()=>{if(!m.isAtBottom)return m.animation=void 0,!1;const{scrollTop:$}=m,X=performance.now(),J=(X-(m.lastTick??X))/j5;if(m.animation||(m.animation={behavior:M,promise:ie,ignoreEscapes:U}),m.animation.behavior===M&&(m.lastTick=X),f()||N>Date.now())return G();if($<Math.min(V,m.calculatedTargetScrollTop)){if(m.animation?.behavior===M){if(M==="instant")return m.scrollTop=m.calculatedTargetScrollTop,G();m.velocity=(M.damping*m.velocity+M.stiffness*m.scrollDifference)/M.mass,m.accumulated+=m.velocity*J,m.scrollTop+=m.accumulated,m.scrollTop!==$&&(m.accumulated=0)}return G()}return P>Date.now()?(V=m.calculatedTargetScrollTop,G()):(m.animation=void 0,m.scrollTop<m.calculatedTargetScrollTop?E({animation:bp(c.current,c.current.resize),ignoreEscapes:U,duration:Math.max(0,P-Date.now())||void 0}):m.isAtBottom)});return ie.then($=>(requestAnimationFrame(()=>{m.animation||(m.lastTick=void 0,m.velocity=0)}),$))};return k.wait!==!0&&(m.animation=void 0),m.animation?.behavior===M?m.animation.promise:G()},[h,f,m]),y=v.useCallback(()=>{p(!0),h(!1)},[p,h]),T=v.useCallback(({target:k})=>{if(k!==C.current)return;const{scrollTop:N,ignoreScrollToTop:M}=m;let{lastScrollTop:U=N}=m;m.lastScrollTop=N,m.ignoreScrollToTop=void 0,M&&M>N&&(U=M),l(m.isNearBottom),setTimeout(()=>{if(m.resizeDifference||N===M)return;if(f()){p(!0),h(!1);return}const P=N>U,V=N<U;if(m.animation?.ignoreEscapes){m.scrollTop=U;return}V&&(p(!0),h(!1)),P&&p(!1),!m.escapedFromLock&&m.isNearBottom&&h(!0)},1)},[p,h,f,m]),S=v.useCallback(({target:k,deltaY:N})=>{let M=k;for(;!["scroll","auto"].includes(getComputedStyle(M).overflow);){if(!M.parentElement)return;M=M.parentElement}M===C.current&&N<0&&C.current.scrollHeight>C.current.clientHeight&&!m.animation?.ignoreEscapes&&(p(!0),h(!1))},[p,h,m]),C=Yx(k=>{C.current?.removeEventListener("scroll",T),C.current?.removeEventListener("wheel",S),k?.addEventListener("scroll",T,{passive:!0}),k?.addEventListener("wheel",S,{passive:!0})},[]),w=Yx(k=>{if(m.resizeObserver?.disconnect(),m.resizeObserver=void 0,!k)return;let N;m.resizeObserver=new ResizeObserver(([M])=>{const{height:U}=M.contentRect,P=U-(N??U);if(m.resizeDifference=P,m.scrollTop>m.targetScrollTop&&(m.scrollTop=m.targetScrollTop),l(m.isNearBottom),P>=0){const V=bp(c.current,N?c.current.resize:c.current.initial);E({animation:V,wait:!0,preserveScrollPosition:!0,duration:V==="instant"?void 0:U5})}else m.isNearBottom&&(p(!1),h(!0));N=U,requestAnimationFrame(()=>{setTimeout(()=>{m.resizeDifference===P&&(m.resizeDifference=0)},1)})}),m.resizeObserver?.observe(k)},[]);return{contentRef:w,scrollRef:C,scrollToBottom:E,stopScroll:y,isAtBottom:r||o,isNearBottom:o,escapedFromLock:t,state:m}};function Yx(e,t){const n=v.useCallback(r=>(n.current=r,e(r)),t);return n}const gp=new Map;function bp(...e){const t={...P5};let n=!1;for(const i of e){if(i==="instant"){n=!0;continue}typeof i=="object"&&(n=!1,t.damping=i.damping??t.damping,t.stiffness=i.stiffness??t.stiffness,t.mass=i.mass??t.mass)}const r=JSON.stringify(t);return gp.has(r)||gp.set(r,Object.freeze(t)),n?"instant":gp.get(r)}const KA=v.createContext(null),z5=typeof window<"u"?v.useLayoutEffect:v.useEffect;function Cf({instance:e,children:t,resize:n,initial:r,mass:i,damping:o,stiffness:l,targetScrollTop:c,contextRef:f,...h}){const p=v.useRef(null),m=v.useCallback((U,P)=>(M?.targetScrollTop??c)?.(U,P)??U,[c]),E=H5({mass:i,damping:o,stiffness:l,resize:n,initial:r,targetScrollTop:m}),{scrollRef:y,contentRef:T,scrollToBottom:S,stopScroll:C,isAtBottom:w,escapedFromLock:k,state:N}=e??E,M=v.useMemo(()=>({scrollToBottom:S,stopScroll:C,scrollRef:y,isAtBottom:w,escapedFromLock:k,contentRef:T,state:N,get targetScrollTop(){return p.current},set targetScrollTop(U){p.current=U}}),[S,w,T,y,C,k,N]);return v.useImperativeHandle(f,()=>M,[M]),z5(()=>{y.current&&getComputedStyle(y.current).overflow==="visible"&&(y.current.style.overflow="auto")},[]),v.createElement(KA.Provider,{value:M},v.createElement("div",{...h},typeof t=="function"?t(M):t))}(function(e){function t({children:n,scrollClassName:r,...i}){const o=ZA();return v.createElement("div",{ref:o.scrollRef,style:{height:"100%",width:"100%",scrollbarGutter:"stable both-edges"},className:r},v.createElement("div",{...i,ref:o.contentRef},typeof n=="function"?n(o):n))}e.Content=t})(Cf||(Cf={}));function ZA(){const e=v.useContext(KA);if(!e)throw new Error("use-stick-to-bottom component context must be used within a StickToBottom component");return e}const F5=({className:e,...t})=>_.jsx(Cf,{className:we("relative flex-1 overflow-y-hidden",e),initial:"smooth",resize:"smooth",role:"log",...t}),$5=({className:e,...t})=>_.jsx(Cf.Content,{className:we("flex flex-col gap-8 p-4",e),...t}),V5=({className:e,...t})=>{const{isAtBottom:n,scrollToBottom:r}=ZA(),i=v.useCallback(()=>{r()},[r]);return!n&&_.jsx(ln,{className:we("absolute bottom-4 left-[50%] translate-x-[-50%] rounded-full",e),onClick:i,size:"icon",type:"button",variant:"outline",...t,children:_.jsx(cL,{className:"size-4"})})},G5=({size:e=16})=>_.jsxs("svg",{height:e,strokeLinejoin:"round",style:{color:"currentcolor"},viewBox:"0 0 16 16",width:e,children:[_.jsx("title",{children:"Loader"}),_.jsxs("g",{clipPath:"url(#clip0_2393_1490)",children:[_.jsx("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),_.jsx("defs",{children:_.jsx("clipPath",{id:"clip0_2393_1490",children:_.jsx("rect",{fill:"white",height:"16",width:"16"})})})]}),Xx=({className:e,size:t=16,...n})=>_.jsx("div",{className:we("inline-flex animate-spin items-center justify-center",e),...n,children:_.jsx(G5,{size:t})}),q5=({children:e,as:t="p",className:n,duration:r=2,spread:i=2})=>{const o=v.useMemo(()=>(e?.length??0)*i,[e,i]);return v.createElement(t,{className:we("relative inline-block bg-[length:250%_100%,auto] bg-clip-text text-transparent","[--bg:linear-gradient(90deg,#0000_calc(50%-var(--spread)),var(--color-background),#0000_calc(50%+var(--spread)))] [background-repeat:no-repeat,padding-box]","animate-shimmer",n),style:{"--spread":`${o}px`,backgroundImage:"var(--bg), linear-gradient(var(--color-muted-foreground), var(--color-muted-foreground))",animationDuration:`${r}s`}},e)},JA=v.memo(q5),Y5=({base64:e,uint8Array:t,mediaType:n,...r})=>_.jsx("img",{...r,alt:r.alt,className:we("h-auto max-w-full overflow-hidden rounded-md",r.className),src:`data:${n};base64,${e}`}),Bg=({className:e,from:t,...n})=>_.jsx("div",{className:we("group flex w-full max-w-[95%] flex-col gap-2",t==="user"?"is-user ml-auto justify-end":"is-assistant",e),...n}),jg=({children:e,className:t,...n})=>_.jsx("div",{className:we("is-user:dark flex w-fit max-w-full min-w-0 flex-col gap-2 overflow-hidden text-sm","group-[.is-user]:ml-auto group-[.is-user]:rounded-lg group-[.is-user]:bg-secondary group-[.is-user]:px-4 group-[.is-user]:py-3 group-[.is-user]:text-foreground","group-[.is-assistant]:text-foreground",t),...n,children:e});function eC({...e}){return _.jsx(wI,{"data-slot":"collapsible",...e})}function tC({...e}){return _.jsx(Y2,{"data-slot":"collapsible-trigger",...e})}function nC({...e}){return _.jsx(X2,{"data-slot":"collapsible-content",...e})}const X5="modulepreload",Q5=function(e){return"/"+e},Qx={},L=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let f=function(h){return Promise.all(h.map(p=>Promise.resolve(p).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),c=l?.nonce||l?.getAttribute("nonce");i=f(n.map(h=>{if(h=Q5(h),h in Qx)return;Qx[h]=!0;const p=h.endsWith(".css"),m=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${m}`))return;const E=document.createElement("link");if(E.rel=p?"stylesheet":X5,p||(E.as="script"),E.crossOrigin="",E.href=h,c&&E.setAttribute("nonce",c),document.head.appendChild(E),p)return new Promise((y,T)=>{E.addEventListener("load",y),E.addEventListener("error",()=>T(new Error(`Unable to preload CSS for ${h}`)))})}))}function o(l){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=l,window.dispatchEvent(c),!c.defaultPrevented)throw l}return i.then(l=>{for(const c of l||[])c.status==="rejected"&&o(c.reason);return t().catch(o)})},cd=(function(e){if(e==null)return J5;if(typeof e=="function")return fd(e);if(typeof e=="object")return Array.isArray(e)?W5(e):K5(e);if(typeof e=="string")return Z5(e);throw new Error("Expected function, string, or object as test")});function W5(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=cd(e[n]);return fd(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function K5(e){const t=e;return fd(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function Z5(e){return fd(t);function t(n){return n&&n.type===e}}function fd(e){return t;function t(n,r,i){return!!(eM(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function J5(){return!0}function eM(e){return e!==null&&typeof e=="object"&&"type"in e}const rC=[],Rl=!0,g0=!1,eo="skip";function Ug(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=cd(i),l=r?-1:1;c(e,void 0,[])();function c(f,h,p){const m=f&&typeof f=="object"?f:{};if(typeof m.type=="string"){const y=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(E,"name",{value:"node ("+(f.type+(y?"<"+y+">":""))+")"})}return E;function E(){let y=rC,T,S,C;if((!t||o(f,h,p[p.length-1]||void 0))&&(y=tM(n(f,p)),y[0]===g0))return y;if("children"in f&&f.children){const w=f;if(w.children&&y[0]!==eo)for(S=(r?w.children.length:-1)+l,C=p.concat(w);S>-1&&S<w.children.length;){const k=w.children[S];if(T=c(k,S,C)(),T[0]===g0)return T;S=typeof T[1]=="number"?T[1]:S+l}}return y}}}function tM(e){return Array.isArray(e)?e:typeof e=="number"?[Rl,e]:e==null?rC:[e]}function Mr(e,t,n,r){let i,o,l;typeof t=="function"&&typeof n!="function"?(o=void 0,l=t,i=n):(o=t,l=n,i=r),Ug(e,o,c,i);function c(f,h){const p=h[h.length-1],m=p?p.children.indexOf(f):void 0;return l(f,m,p)}}const co={indicator:"indicator",textOnly:"text-only",remove:"remove"};function nM({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:r=!1,allowedProtocols:i=[],blockedImageClass:o="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:l="text-gray-500",linkBlockPolicy:c=co.indicator,imageBlockPolicy:f=co.indicator}){const h=t.length&&!t.every(m=>m==="*"),p=n.length&&!n.every(m=>m==="*");if(!e&&(h||p))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return m=>{const E=lM(e,t,n,r,i,o,l,c,f);aC(m),Mr(m,E)}}function Wx(e,t){if(typeof e!="string")return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"))try{return new URL(e,"http://example.com")}catch{return null}return null}}function rM(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const aM=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),iM=new Set(["javascript:","data:","file:","vbscript:"]);function Kx(e,t,n,r=!1,i=!1,o=[]){if(!e)return null;if(typeof e=="string"&&e.startsWith("#")&&!i)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if(typeof e=="string"&&e.startsWith("data:"))return i&&r&&e.startsWith("data:image/")?e:null;if(typeof e=="string"&&e.startsWith("blob:")){try{if(new URL(e).protocol==="blob:"&&e.length>5){const p=e.substring(5);if(p&&p.length>0&&p!=="invalid")return e}}catch{return null}return null}const l=Wx(e,n);if(!l||iM.has(l.protocol)||!(aM.has(l.protocol)||o.includes(l.protocol)||o.includes("*")))return null;if(l.protocol==="mailto:"||!l.protocol.match(/^https?:$/))return l.href;const f=rM(e);return l&&t.some(h=>{const p=Wx(h,n);return!p||p.origin!==l.origin?!1:l.href.startsWith(p.href)})?f?l.pathname+l.search+l.hash:l.href:t.includes("*")?l.protocol!=="https:"&&l.protocol!=="http:"?null:f?l.pathname+l.search+l.hash:l.href:null}function aC(e){if("children"in e&&Array.isArray(e.children)){e.children=e.children.filter(t=>t!=null);for(const t of e.children)aC(t)}}const Ep=Symbol("node-seen");function sM(e,t,n){return t===co.remove?{type:"remove"}:t===co.textOnly?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[...e.children]}}:{type:"replace",element:{type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(e.properties.href),class:n},children:[...e.children,{type:"text",value:" [blocked]"}]}}}function oM(e,t,n){if(t===co.remove)return{type:"remove"};if(t===co.textOnly){const r=String(e.properties.alt||"");return r?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[{type:"text",value:r}]}}:{type:"remove"}}return{type:"replace",element:{type:"element",tagName:"span",properties:{class:n},children:[{type:"text",value:"[Image blocked: "+String(e.properties.alt||"No description")+"]"}]}}}const lM=(e,t,n,r,i,o,l,c,f)=>{const h=(p,m,E)=>{if(p.type!=="element"||p[Ep])return Rl;if(p.tagName==="a"){const y=Kx(p.properties.href,t,e,!1,!1,i);if(y===null){if(p[Ep]=!0,Mr(p,h),E&&typeof m=="number"){const T=sM(p,c,l);if(T.type==="remove")return E.children.splice(m,1),[eo,m];E.children[m]=T.element}return eo}else return p.properties.href=y,p.properties.target="_blank",p.properties.rel="noopener noreferrer",Rl}if(p.tagName==="img"){const y=Kx(p.properties.src,n,e,r,!0,i);if(y===null){if(p[Ep]=!0,Mr(p,h),E&&typeof m=="number"){const T=oM(p,f,o);if(T.type==="remove")return E.children.splice(m,1),[eo,m];E.children[m]=T.element}return eo}else return p.properties.src=y,Rl}return Rl};return h},iC=-1,dd=0,Ml=1,wf=2,Hg=3,zg=4,Fg=5,$g=6,sC=7,oC=8,uM=typeof self=="object"?self:globalThis,Zx=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new uM[e](t)},cM=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,l]=t[i];switch(o){case dd:case iC:return n(l,i);case Ml:{const c=n([],i);for(const f of l)c.push(r(f));return c}case wf:{const c=n({},i);for(const[f,h]of l)c[r(f)]=r(h);return c}case Hg:return n(new Date(l),i);case zg:{const{source:c,flags:f}=l;return n(new RegExp(c,f),i)}case Fg:{const c=n(new Map,i);for(const[f,h]of l)c.set(r(f),r(h));return c}case $g:{const c=n(new Set,i);for(const f of l)c.add(r(f));return c}case sC:{const{name:c,message:f}=l;return n(Zx(c,f),i)}case oC:return n(BigInt(l),i);case"BigInt":return n(Object(BigInt(l)),i);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:c}=new Uint8Array(l);return n(new DataView(c),l)}}return n(Zx(o,l),i)};return r},Jx=e=>cM(new Map,e)(0),Di="",{toString:fM}={},{keys:dM}=Object,_l=e=>{const t=typeof e;if(t!=="object"||!e)return[dd,t];const n=fM.call(e).slice(8,-1);switch(n){case"Array":return[Ml,Di];case"Object":return[wf,Di];case"Date":return[Hg,Di];case"RegExp":return[zg,Di];case"Map":return[Fg,Di];case"Set":return[$g,Di];case"DataView":return[Ml,n]}return n.includes("Array")?[Ml,n]:n.includes("Error")?[sC,n]:[wf,n]},Vc=([e,t])=>e===dd&&(t==="function"||t==="symbol"),hM=(e,t,n,r)=>{const i=(l,c)=>{const f=r.push(l)-1;return n.set(c,f),f},o=l=>{if(n.has(l))return n.get(l);let[c,f]=_l(l);switch(c){case dd:{let p=l;switch(f){case"bigint":c=oC,p=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);p=null;break;case"undefined":return i([iC],l)}return i([c,p],l)}case Ml:{if(f){let E=l;return f==="DataView"?E=new Uint8Array(l.buffer):f==="ArrayBuffer"&&(E=new Uint8Array(l)),i([f,[...E]],l)}const p=[],m=i([c,p],l);for(const E of l)p.push(o(E));return m}case wf:{if(f)switch(f){case"BigInt":return i([f,l.toString()],l);case"Boolean":case"Number":case"String":return i([f,l.valueOf()],l)}if(t&&"toJSON"in l)return o(l.toJSON());const p=[],m=i([c,p],l);for(const E of dM(l))(e||!Vc(_l(l[E])))&&p.push([o(E),o(l[E])]);return m}case Hg:return i([c,isNaN(l.getTime())?Di:l.toISOString()],l);case zg:{const{source:p,flags:m}=l;return i([c,{source:p,flags:m}],l)}case Fg:{const p=[],m=i([c,p],l);for(const[E,y]of l)(e||!(Vc(_l(E))||Vc(_l(y))))&&p.push([o(E),o(y)]);return m}case $g:{const p=[],m=i([c,p],l);for(const E of l)(e||!Vc(_l(E)))&&p.push(o(E));return m}}const{message:h}=l;return i([c,{name:f,message:h}],l)};return o},eT=(e,{json:t,lossy:n}={})=>{const r=[];return hM(!(t||n),!!t,new Map,r)(e),r},Yi=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Jx(eT(e,t)):structuredClone(e):(e,t)=>Jx(eT(e,t));class ou{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}ou.prototype.normal={};ou.prototype.property={};ou.prototype.space=void 0;function lC(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new ou(n,r,t)}function Yl(e){return e.toLowerCase()}class Rn{constructor(t,n){this.attribute=n,this.property=t}}Rn.prototype.attribute="";Rn.prototype.booleanish=!1;Rn.prototype.boolean=!1;Rn.prototype.commaOrSpaceSeparated=!1;Rn.prototype.commaSeparated=!1;Rn.prototype.defined=!1;Rn.prototype.mustUseProperty=!1;Rn.prototype.number=!1;Rn.prototype.overloadedBoolean=!1;Rn.prototype.property="";Rn.prototype.spaceSeparated=!1;Rn.prototype.space=void 0;let mM=0;const Ie=ns(),Bt=ns(),b0=ns(),pe=ns(),bt=ns(),Fi=ns(),Hn=ns();function ns(){return 2**++mM}const E0=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ie,booleanish:Bt,commaOrSpaceSeparated:Hn,commaSeparated:Fi,number:pe,overloadedBoolean:b0,spaceSeparated:bt},Symbol.toStringTag,{value:"Module"})),yp=Object.keys(E0);class Vg extends Rn{constructor(t,n,r,i){let o=-1;if(super(t,n),tT(this,"space",i),typeof r=="number")for(;++o<yp.length;){const l=yp[o];tT(this,yp[o],(r&E0[l])===E0[l])}}}Vg.prototype.defined=!0;function tT(e,t,n){n&&(e[t]=n)}function go(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new Vg(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[Yl(r)]=r,n[Yl(o.attribute)]=r}return new ou(t,n,e.space)}const uC=go({properties:{ariaActiveDescendant:null,ariaAtomic:Bt,ariaAutoComplete:null,ariaBusy:Bt,ariaChecked:Bt,ariaColCount:pe,ariaColIndex:pe,ariaColSpan:pe,ariaControls:bt,ariaCurrent:null,ariaDescribedBy:bt,ariaDetails:null,ariaDisabled:Bt,ariaDropEffect:bt,ariaErrorMessage:null,ariaExpanded:Bt,ariaFlowTo:bt,ariaGrabbed:Bt,ariaHasPopup:null,ariaHidden:Bt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:bt,ariaLevel:pe,ariaLive:null,ariaModal:Bt,ariaMultiLine:Bt,ariaMultiSelectable:Bt,ariaOrientation:null,ariaOwns:bt,ariaPlaceholder:null,ariaPosInSet:pe,ariaPressed:Bt,ariaReadOnly:Bt,ariaRelevant:null,ariaRequired:Bt,ariaRoleDescription:bt,ariaRowCount:pe,ariaRowIndex:pe,ariaRowSpan:pe,ariaSelected:Bt,ariaSetSize:pe,ariaSort:null,ariaValueMax:pe,ariaValueMin:pe,ariaValueNow:pe,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function cC(e,t){return t in e?e[t]:t}function fC(e,t){return cC(e,t.toLowerCase())}const pM=go({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Fi,acceptCharset:bt,accessKey:bt,action:null,allow:null,allowFullScreen:Ie,allowPaymentRequest:Ie,allowUserMedia:Ie,alpha:Ie,alt:null,as:null,async:Ie,autoCapitalize:null,autoComplete:bt,autoFocus:Ie,autoPlay:Ie,blocking:bt,capture:null,charSet:null,checked:Ie,cite:null,className:bt,closedBy:null,colorSpace:null,cols:pe,colSpan:pe,command:null,commandFor:null,content:null,contentEditable:Bt,controls:Ie,controlsList:bt,coords:pe|Fi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ie,defer:Ie,dir:null,dirName:null,disabled:Ie,download:b0,draggable:Bt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ie,formTarget:null,headers:bt,height:pe,hidden:b0,high:pe,href:null,hrefLang:null,htmlFor:bt,httpEquiv:bt,id:null,imageSizes:null,imageSrcSet:null,inert:Ie,inputMode:null,integrity:null,is:null,isMap:Ie,itemId:null,itemProp:bt,itemRef:bt,itemScope:Ie,itemType:bt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ie,low:pe,manifest:null,max:null,maxLength:pe,media:null,method:null,min:null,minLength:pe,multiple:Ie,muted:Ie,name:null,nonce:null,noModule:Ie,noValidate:Ie,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ie,optimum:pe,pattern:null,ping:bt,placeholder:null,playsInline:Ie,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ie,referrerPolicy:null,rel:bt,required:Ie,reversed:Ie,rows:pe,rowSpan:pe,sandbox:bt,scope:null,scoped:Ie,seamless:Ie,selected:Ie,shadowRootClonable:Ie,shadowRootCustomElementRegistry:Ie,shadowRootDelegatesFocus:Ie,shadowRootMode:null,shadowRootSerializable:Ie,shape:null,size:pe,sizes:null,slot:null,span:pe,spellCheck:Bt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:pe,step:null,style:null,tabIndex:pe,target:null,title:null,translate:null,type:null,typeMustMatch:Ie,useMap:null,value:Bt,width:pe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:bt,axis:null,background:null,bgColor:null,border:pe,borderColor:null,bottomMargin:pe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ie,declare:Ie,event:null,face:null,frame:null,frameBorder:null,hSpace:pe,leftMargin:pe,link:null,longDesc:null,lowSrc:null,marginHeight:pe,marginWidth:pe,noResize:Ie,noHref:Ie,noShade:Ie,noWrap:Ie,object:null,profile:null,prompt:null,rev:null,rightMargin:pe,rules:null,scheme:null,scrolling:Bt,standby:null,summary:null,text:null,topMargin:pe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:pe,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Ie,disablePictureInPicture:Ie,disableRemotePlayback:Ie,exportParts:Fi,part:bt,prefix:null,property:null,results:pe,security:null,unselectable:null},space:"html",transform:fC}),gM=go({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Hn,accentHeight:pe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:pe,amplitude:pe,arabicForm:null,ascent:pe,attributeName:null,attributeType:null,azimuth:pe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:pe,by:null,calcMode:null,capHeight:pe,className:bt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:pe,diffuseConstant:pe,direction:null,display:null,dur:null,divisor:pe,dominantBaseline:null,download:Ie,dx:null,dy:null,edgeMode:null,editable:null,elevation:pe,enableBackground:null,end:null,event:null,exponent:pe,externalResourcesRequired:null,fill:null,fillOpacity:pe,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Fi,g2:Fi,glyphName:Fi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:pe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:pe,horizOriginX:pe,horizOriginY:pe,id:null,ideographic:pe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:pe,k:pe,k1:pe,k2:pe,k3:pe,k4:pe,kernelMatrix:Hn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:pe,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:pe,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:pe,overlineThickness:pe,paintOrder:null,panose1:null,path:null,pathLength:pe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:bt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:pe,pointsAtY:pe,pointsAtZ:pe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Hn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Hn,rev:Hn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Hn,requiredFeatures:Hn,requiredFonts:Hn,requiredFormats:Hn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:pe,specularExponent:pe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:pe,strikethroughThickness:pe,string:null,stroke:null,strokeDashArray:Hn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:pe,strokeOpacity:pe,strokeWidth:null,style:null,surfaceScale:pe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Hn,tabIndex:pe,tableValues:null,target:null,targetX:pe,targetY:pe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Hn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:pe,underlineThickness:pe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:pe,values:null,vAlphabetic:pe,vMathematical:pe,vectorEffect:null,vHanging:pe,vIdeographic:pe,version:null,vertAdvY:pe,vertOriginX:pe,vertOriginY:pe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:pe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:cC}),dC=go({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()}}),hC=go({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:fC}),mC=go({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),bM={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"},EM=/[A-Z]/g,nT=/-[a-z]/g,yM=/^data[-\w.:]+$/i;function lu(e,t){const n=Yl(t);let r=t,i=Rn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&yM.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(nT,xM);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!nT.test(o)){let l=o.replace(EM,_M);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}i=Vg}return new i(r,t)}function _M(e){return"-"+e.toLowerCase()}function xM(e){return e.charAt(1).toUpperCase()}const bo=lC([uC,pM,dC,hC,mC],"html"),Br=lC([uC,gM,dC,hC,mC],"svg");function rT(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,o=!1;for(;!o;){r===-1&&(r=n.length,o=!0);const l=n.slice(i,r).trim();(l||!o)&&t.push(l),i=r+1,r=n.indexOf(",",i)}return t}function Gg(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const aT=/[#.]/g;function TM(e,t){const n=e||"",r={};let i=0,o,l;for(;i<n.length;){aT.lastIndex=i;const c=aT.exec(n),f=n.slice(i,c?c.index:n.length);f&&(o?o==="#"?r.id=f:Array.isArray(r.className)?r.className.push(f):r.className=[f]:l=f,i+=f.length),c&&(o=c[0],i++)}return{type:"element",tagName:l||t||"div",properties:r,children:[]}}function iT(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function qg(e){return e.join(" ").trim()}function pC(e,t,n){const r=n?CM(n):void 0;function i(o,l,...c){let f;if(o==null){f={type:"root",children:[]};const h=l;c.unshift(h)}else{f=TM(o,t);const h=f.tagName.toLowerCase(),p=r?r.get(h):void 0;if(f.tagName=p||h,vM(l))c.unshift(l);else for(const[m,E]of Object.entries(l))SM(e,f.properties,m,E)}for(const h of c)y0(f.children,h);return f.type==="element"&&f.tagName==="template"&&(f.content={type:"root",children:f.children},f.children=[]),f}return i}function vM(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const i=t[r];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const o=i;for(const l of o)if(typeof l!="number"&&typeof l!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function SM(e,t,n,r){const i=lu(e,n);let o;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;o=r}else typeof r=="boolean"?o=r:typeof r=="string"?i.spaceSeparated?o=iT(r):i.commaSeparated?o=rT(r):i.commaOrSpaceSeparated?o=iT(rT(r).join(" ")):o=sT(i,i.property,r):Array.isArray(r)?o=[...r]:o=i.property==="style"?AM(r):String(r);if(Array.isArray(o)){const l=[];for(const c of o)l.push(sT(i,i.property,c));o=l}i.property==="className"&&Array.isArray(t.className)&&(o=t.className.concat(o)),t[i.property]=o}}function y0(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)y0(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?y0(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function sT(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Yl(n)===Yl(t)))return!0}return n}function AM(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function CM(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const wM=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],kM=pC(bo,"div"),NM=pC(Br,"g",wM);function RM(e){const t=String(e),n=[];return{toOffset:i,toPoint:r};function r(o){if(typeof o=="number"&&o>-1&&o<=t.length){let l=0;for(;;){let c=n[l];if(c===void 0){const f=oT(t,n[l-1]);c=f===-1?t.length+1:f+1,n[l]=c}if(c>o)return{line:l+1,column:o-(l>0?n[l-1]:0)+1,offset:o};l++}}}function i(o){if(o&&typeof o.line=="number"&&typeof o.column=="number"&&!Number.isNaN(o.line)&&!Number.isNaN(o.column)){for(;n.length<o.line;){const c=n[n.length-1],f=oT(t,c),h=f===-1?t.length+1:f+1;if(c===h)break;n.push(h)}const l=(o.line>1?n[o.line-2]:0)+o.column-1;if(l<n[o.line-1])return l}}}function oT(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
|
|
51
|
+
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const Ui={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},gC={}.hasOwnProperty,OM=Object.prototype;function LM(e,t){const n=t||{};return Yg({file:n.file||void 0,location:!1,schema:n.space==="svg"?Br:bo,verbose:n.verbose||!1},e)}function Yg(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},ff(e,r,n),n}case"#document":case"#document-fragment":{const r=t,i="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:bC(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const o=String(e.file),l=RM(o),c=l.toPoint(0),f=l.toPoint(o.length);n.position={start:c,end:f}}return n}case"#documentType":{const r=t;return n={type:"doctype"},ff(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},ff(e,r,n),n}default:return n=IM(e,t),n}}function bC(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=Yg(e,t[n]);r.push(i)}return r}function IM(e,t){const n=e.schema;e.schema=t.namespaceURI===Ui.svg?Br:bo;let r=-1;const i={};for(;++r<t.attrs.length;){const c=t.attrs[r],f=(c.prefix?c.prefix+":":"")+c.name;gC.call(OM,f)||(i[f]=c.value)}const l=(e.schema.space==="svg"?NM:kM)(t.tagName,i,bC(e,t.childNodes));if(ff(e,t,l),l.tagName==="template"){const c=t,f=c.sourceCodeLocation,h=f&&f.startTag&&to(f.startTag),p=f&&f.endTag&&to(f.endTag),m=Yg(e,c.content);h&&p&&e.file&&(m.position={start:h.end,end:p.start}),l.content=m}return e.schema=n,l}function ff(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=DM(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function DM(e,t,n){const r=to(n);if(t.type==="element"){const i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){const o={};let l;if(n.attrs)for(l in n.attrs)gC.call(n.attrs,l)&&(o[lu(e.schema,l).property]=to(n.attrs[l]));n.startTag;const c=to(n.startTag),f=n.endTag?to(n.endTag):void 0,h={opening:c};f&&(h.closing=f),h.properties=o,t.data={position:h}}}return r}function to(e){const t=lT({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=lT({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function lT(e){return e.line&&e.column?e:void 0}const uT={}.hasOwnProperty;function Xg(e,t){const n=t||{};function r(i,...o){let l=r.invalid;const c=r.handlers;if(i&&uT.call(i,e)){const f=String(i[e]);l=uT.call(c,f)?c[f]:r.unknown}if(l)return l.call(this,i,...o)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const MM={},PM={}.hasOwnProperty,EC=Xg("type",{handlers:{root:jM,element:$M,text:zM,comment:FM,doctype:HM}});function BM(e,t){const r=(t||MM).space;return EC(e,r==="svg"?Br:bo)}function jM(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Qg(e.children,n,t),Eo(e,n),n}function UM(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Qg(e.children,n,t),Eo(e,n),n}function HM(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Eo(e,t),t}function zM(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Eo(e,t),t}function FM(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Eo(e,t),t}function $M(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=Br);const i=[];let o;if(e.properties){for(o in e.properties)if(o!=="children"&&PM.call(e.properties,o)){const f=VM(r,o,e.properties[o]);f&&i.push(f)}}const l=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:Ui[l],childNodes:[],parentNode:null};return c.childNodes=Qg(e.children,c,r),Eo(e,c),e.tagName==="template"&&e.content&&(c.content=UM(e.content,r)),c}function VM(e,t,n){const r=lu(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?Gg(n):qg(n));const i={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const o=i.name.indexOf(":");o<0?i.prefix="":(i.name=i.name.slice(o+1),i.prefix=r.attribute.slice(0,o)),i.namespace=Ui[r.space]}return i}function Qg(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const o=EC(e[r],n);o.parentNode=t,i.push(o)}return i}function Eo(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const yC=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],GM=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),vt="�";var I;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(I||(I={}));const kn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function _C(e){return e>=55296&&e<=57343}function qM(e){return e>=56320&&e<=57343}function YM(e,t){return(e-55296)*1024+9216+t}function xC(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function TC(e){return e>=64976&&e<=65007||GM.has(e)}var ae;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(ae||(ae={}));const XM=65536;class QM{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=XM,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:i,offset:o}=this,l=i+n,c=o+n;return{code:t,startLine:r,endLine:r,startCol:l,endCol:l,startOffset:c,endOffset:c}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(qM(n))return this.pos++,this._addGap(),YM(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,I.EOF;return this._err(ae.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,I.EOF;const r=this.html.charCodeAt(n);return r===I.CARRIAGE_RETURN?I.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,I.EOF;let t=this.html.charCodeAt(this.pos);return t===I.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,I.LINE_FEED):t===I.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,_C(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===I.LINE_FEED||t===I.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){xC(t)?this._err(ae.controlCharacterInInputStream):TC(t)&&this._err(ae.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Fe;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(Fe||(Fe={}));function vC(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const WM=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),KM=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function ZM(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=KM.get(e))!==null&&t!==void 0?t:e}var Wt;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Wt||(Wt={}));const JM=32;var Za;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Za||(Za={}));function _0(e){return e>=Wt.ZERO&&e<=Wt.NINE}function e8(e){return e>=Wt.UPPER_A&&e<=Wt.UPPER_F||e>=Wt.LOWER_A&&e<=Wt.LOWER_F}function t8(e){return e>=Wt.UPPER_A&&e<=Wt.UPPER_Z||e>=Wt.LOWER_A&&e<=Wt.LOWER_Z||_0(e)}function n8(e){return e===Wt.EQUALS||t8(e)}var Xt;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Xt||(Xt={}));var ua;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(ua||(ua={}));class r8{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Xt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=ua.Strict}startEntity(t){this.decodeMode=t,this.state=Xt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Xt.EntityStart:return t.charCodeAt(n)===Wt.NUM?(this.state=Xt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Xt.NamedEntity,this.stateNamedEntity(t,n));case Xt.NumericStart:return this.stateNumericStart(t,n);case Xt.NumericDecimal:return this.stateNumericDecimal(t,n);case Xt.NumericHex:return this.stateNumericHex(t,n);case Xt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|JM)===Wt.LOWER_X?(this.state=Xt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Xt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const o=r-n;this.result=this.result*Math.pow(i,o)+Number.parseInt(t.substr(n,o),i),this.consumed+=o}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(_0(i)||e8(i))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(_0(i))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Wt.SEMI)this.consumed+=1;else if(this.decodeMode===ua.Strict)return 0;return this.emitCodePoint(ZM(this.result),this.consumed),this.errors&&(t!==Wt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let i=r[this.treeIndex],o=(i&Za.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const l=t.charCodeAt(n);if(this.treeIndex=a8(r,i,this.treeIndex+Math.max(1,o),l),this.treeIndex<0)return this.result===0||this.decodeMode===ua.Attribute&&(o===0||n8(l))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],o=(i&Za.VALUE_LENGTH)>>14,o!==0){if(l===Wt.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==ua.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&Za.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~Za.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case Xt.NamedEntity:return this.result!==0&&(this.decodeMode!==ua.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Xt.NumericDecimal:return this.emitNumericEntity(0,2);case Xt.NumericHex:return this.emitNumericEntity(0,3);case Xt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Xt.EntityStart:return 0}}}function a8(e,t,n,r){const i=(t&Za.BRANCH_LENGTH)>>7,o=t&Za.JUMP_TABLE;if(i===0)return o!==0&&r===o?n:-1;if(o){const f=r-o;return f<0||f>=i?-1:e[n+f]-1}let l=n,c=l+i-1;for(;l<=c;){const f=l+c>>>1,h=e[f];if(h<r)l=f+1;else if(h>r)c=f-1;else return e[f+i]}return-1}var de;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(de||(de={}));var $i;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})($i||($i={}));var nr;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(nr||(nr={}));var Q;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(Q||(Q={}));var x;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(x||(x={}));const i8=new Map([[Q.A,x.A],[Q.ADDRESS,x.ADDRESS],[Q.ANNOTATION_XML,x.ANNOTATION_XML],[Q.APPLET,x.APPLET],[Q.AREA,x.AREA],[Q.ARTICLE,x.ARTICLE],[Q.ASIDE,x.ASIDE],[Q.B,x.B],[Q.BASE,x.BASE],[Q.BASEFONT,x.BASEFONT],[Q.BGSOUND,x.BGSOUND],[Q.BIG,x.BIG],[Q.BLOCKQUOTE,x.BLOCKQUOTE],[Q.BODY,x.BODY],[Q.BR,x.BR],[Q.BUTTON,x.BUTTON],[Q.CAPTION,x.CAPTION],[Q.CENTER,x.CENTER],[Q.CODE,x.CODE],[Q.COL,x.COL],[Q.COLGROUP,x.COLGROUP],[Q.DD,x.DD],[Q.DESC,x.DESC],[Q.DETAILS,x.DETAILS],[Q.DIALOG,x.DIALOG],[Q.DIR,x.DIR],[Q.DIV,x.DIV],[Q.DL,x.DL],[Q.DT,x.DT],[Q.EM,x.EM],[Q.EMBED,x.EMBED],[Q.FIELDSET,x.FIELDSET],[Q.FIGCAPTION,x.FIGCAPTION],[Q.FIGURE,x.FIGURE],[Q.FONT,x.FONT],[Q.FOOTER,x.FOOTER],[Q.FOREIGN_OBJECT,x.FOREIGN_OBJECT],[Q.FORM,x.FORM],[Q.FRAME,x.FRAME],[Q.FRAMESET,x.FRAMESET],[Q.H1,x.H1],[Q.H2,x.H2],[Q.H3,x.H3],[Q.H4,x.H4],[Q.H5,x.H5],[Q.H6,x.H6],[Q.HEAD,x.HEAD],[Q.HEADER,x.HEADER],[Q.HGROUP,x.HGROUP],[Q.HR,x.HR],[Q.HTML,x.HTML],[Q.I,x.I],[Q.IMG,x.IMG],[Q.IMAGE,x.IMAGE],[Q.INPUT,x.INPUT],[Q.IFRAME,x.IFRAME],[Q.KEYGEN,x.KEYGEN],[Q.LABEL,x.LABEL],[Q.LI,x.LI],[Q.LINK,x.LINK],[Q.LISTING,x.LISTING],[Q.MAIN,x.MAIN],[Q.MALIGNMARK,x.MALIGNMARK],[Q.MARQUEE,x.MARQUEE],[Q.MATH,x.MATH],[Q.MENU,x.MENU],[Q.META,x.META],[Q.MGLYPH,x.MGLYPH],[Q.MI,x.MI],[Q.MO,x.MO],[Q.MN,x.MN],[Q.MS,x.MS],[Q.MTEXT,x.MTEXT],[Q.NAV,x.NAV],[Q.NOBR,x.NOBR],[Q.NOFRAMES,x.NOFRAMES],[Q.NOEMBED,x.NOEMBED],[Q.NOSCRIPT,x.NOSCRIPT],[Q.OBJECT,x.OBJECT],[Q.OL,x.OL],[Q.OPTGROUP,x.OPTGROUP],[Q.OPTION,x.OPTION],[Q.P,x.P],[Q.PARAM,x.PARAM],[Q.PLAINTEXT,x.PLAINTEXT],[Q.PRE,x.PRE],[Q.RB,x.RB],[Q.RP,x.RP],[Q.RT,x.RT],[Q.RTC,x.RTC],[Q.RUBY,x.RUBY],[Q.S,x.S],[Q.SCRIPT,x.SCRIPT],[Q.SEARCH,x.SEARCH],[Q.SECTION,x.SECTION],[Q.SELECT,x.SELECT],[Q.SOURCE,x.SOURCE],[Q.SMALL,x.SMALL],[Q.SPAN,x.SPAN],[Q.STRIKE,x.STRIKE],[Q.STRONG,x.STRONG],[Q.STYLE,x.STYLE],[Q.SUB,x.SUB],[Q.SUMMARY,x.SUMMARY],[Q.SUP,x.SUP],[Q.TABLE,x.TABLE],[Q.TBODY,x.TBODY],[Q.TEMPLATE,x.TEMPLATE],[Q.TEXTAREA,x.TEXTAREA],[Q.TFOOT,x.TFOOT],[Q.TD,x.TD],[Q.TH,x.TH],[Q.THEAD,x.THEAD],[Q.TITLE,x.TITLE],[Q.TR,x.TR],[Q.TRACK,x.TRACK],[Q.TT,x.TT],[Q.U,x.U],[Q.UL,x.UL],[Q.SVG,x.SVG],[Q.VAR,x.VAR],[Q.WBR,x.WBR],[Q.XMP,x.XMP]]);function yo(e){var t;return(t=i8.get(e))!==null&&t!==void 0?t:x.UNKNOWN}const me=x,s8={[de.HTML]:new Set([me.ADDRESS,me.APPLET,me.AREA,me.ARTICLE,me.ASIDE,me.BASE,me.BASEFONT,me.BGSOUND,me.BLOCKQUOTE,me.BODY,me.BR,me.BUTTON,me.CAPTION,me.CENTER,me.COL,me.COLGROUP,me.DD,me.DETAILS,me.DIR,me.DIV,me.DL,me.DT,me.EMBED,me.FIELDSET,me.FIGCAPTION,me.FIGURE,me.FOOTER,me.FORM,me.FRAME,me.FRAMESET,me.H1,me.H2,me.H3,me.H4,me.H5,me.H6,me.HEAD,me.HEADER,me.HGROUP,me.HR,me.HTML,me.IFRAME,me.IMG,me.INPUT,me.LI,me.LINK,me.LISTING,me.MAIN,me.MARQUEE,me.MENU,me.META,me.NAV,me.NOEMBED,me.NOFRAMES,me.NOSCRIPT,me.OBJECT,me.OL,me.P,me.PARAM,me.PLAINTEXT,me.PRE,me.SCRIPT,me.SECTION,me.SELECT,me.SOURCE,me.STYLE,me.SUMMARY,me.TABLE,me.TBODY,me.TD,me.TEMPLATE,me.TEXTAREA,me.TFOOT,me.TH,me.THEAD,me.TITLE,me.TR,me.TRACK,me.UL,me.WBR,me.XMP]),[de.MATHML]:new Set([me.MI,me.MO,me.MN,me.MS,me.MTEXT,me.ANNOTATION_XML]),[de.SVG]:new Set([me.TITLE,me.FOREIGN_OBJECT,me.DESC]),[de.XLINK]:new Set,[de.XML]:new Set,[de.XMLNS]:new Set},x0=new Set([me.H1,me.H2,me.H3,me.H4,me.H5,me.H6]);Q.STYLE,Q.SCRIPT,Q.XMP,Q.IFRAME,Q.NOEMBED,Q.NOFRAMES,Q.PLAINTEXT;var B;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(B||(B={}));const Lt={DATA:B.DATA,RCDATA:B.RCDATA,RAWTEXT:B.RAWTEXT,SCRIPT_DATA:B.SCRIPT_DATA,PLAINTEXT:B.PLAINTEXT,CDATA_SECTION:B.CDATA_SECTION};function o8(e){return e>=I.DIGIT_0&&e<=I.DIGIT_9}function Ol(e){return e>=I.LATIN_CAPITAL_A&&e<=I.LATIN_CAPITAL_Z}function l8(e){return e>=I.LATIN_SMALL_A&&e<=I.LATIN_SMALL_Z}function qa(e){return l8(e)||Ol(e)}function cT(e){return qa(e)||o8(e)}function Gc(e){return e+32}function SC(e){return e===I.SPACE||e===I.LINE_FEED||e===I.TABULATION||e===I.FORM_FEED}function fT(e){return SC(e)||e===I.SOLIDUS||e===I.GREATER_THAN_SIGN}function u8(e){return e===I.NULL?ae.nullCharacterReference:e>1114111?ae.characterReferenceOutsideUnicodeRange:_C(e)?ae.surrogateCharacterReference:TC(e)?ae.noncharacterCharacterReference:xC(e)||e===I.CARRIAGE_RETURN?ae.controlCharacterReference:null}class c8{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=B.DATA,this.returnState=B.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new QM(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new r8(WM,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(ae.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(ae.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=u8(r);i&&this._err(i,1)}}:void 0)}_err(t,n=0){var r,i;(i=(r=this.handler).onParseError)===null||i===void 0||i.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t?.())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r?.()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:Fe.START_TAG,tagName:"",tagID:x.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Fe.END_TAG,tagName:"",tagID:x.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Fe.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Fe.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(vC(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const i=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);i[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(ae.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=yo(t.tagName),t.type===Fe.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(ae.endTagWithAttributes),t.selfClosing&&this._err(ae.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case Fe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Fe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Fe.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:Fe.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=SC(t)?Fe.WHITESPACE_CHARACTER:t===I.NULL?Fe.NULL_CHARACTER:Fe.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Fe.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=B.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?ua.Attribute:ua.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===B.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===B.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===B.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case B.DATA:{this._stateData(t);break}case B.RCDATA:{this._stateRcdata(t);break}case B.RAWTEXT:{this._stateRawtext(t);break}case B.SCRIPT_DATA:{this._stateScriptData(t);break}case B.PLAINTEXT:{this._statePlaintext(t);break}case B.TAG_OPEN:{this._stateTagOpen(t);break}case B.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case B.TAG_NAME:{this._stateTagName(t);break}case B.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case B.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case B.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case B.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case B.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case B.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case B.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case B.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case B.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case B.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case B.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case B.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case B.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case B.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case B.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case B.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case B.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case B.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case B.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case B.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case B.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case B.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case B.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case B.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case B.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case B.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case B.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case B.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case B.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case B.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case B.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case B.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case B.BOGUS_COMMENT:{this._stateBogusComment(t);break}case B.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case B.COMMENT_START:{this._stateCommentStart(t);break}case B.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case B.COMMENT:{this._stateComment(t);break}case B.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case B.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case B.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case B.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case B.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case B.COMMENT_END:{this._stateCommentEnd(t);break}case B.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case B.DOCTYPE:{this._stateDoctype(t);break}case B.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case B.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case B.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case B.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case B.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case B.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case B.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case B.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case B.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case B.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case B.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case B.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case B.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case B.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case B.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case B.CDATA_SECTION:{this._stateCdataSection(t);break}case B.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case B.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case B.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case B.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case I.LESS_THAN_SIGN:{this.state=B.TAG_OPEN;break}case I.AMPERSAND:{this._startCharacterReference();break}case I.NULL:{this._err(ae.unexpectedNullCharacter),this._emitCodePoint(t);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case I.AMPERSAND:{this._startCharacterReference();break}case I.LESS_THAN_SIGN:{this.state=B.RCDATA_LESS_THAN_SIGN;break}case I.NULL:{this._err(ae.unexpectedNullCharacter),this._emitChars(vt);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case I.LESS_THAN_SIGN:{this.state=B.RAWTEXT_LESS_THAN_SIGN;break}case I.NULL:{this._err(ae.unexpectedNullCharacter),this._emitChars(vt);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case I.LESS_THAN_SIGN:{this.state=B.SCRIPT_DATA_LESS_THAN_SIGN;break}case I.NULL:{this._err(ae.unexpectedNullCharacter),this._emitChars(vt);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case I.NULL:{this._err(ae.unexpectedNullCharacter),this._emitChars(vt);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(qa(t))this._createStartTagToken(),this.state=B.TAG_NAME,this._stateTagName(t);else switch(t){case I.EXCLAMATION_MARK:{this.state=B.MARKUP_DECLARATION_OPEN;break}case I.SOLIDUS:{this.state=B.END_TAG_OPEN;break}case I.QUESTION_MARK:{this._err(ae.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=B.BOGUS_COMMENT,this._stateBogusComment(t);break}case I.EOF:{this._err(ae.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(ae.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=B.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(qa(t))this._createEndTagToken(),this.state=B.TAG_NAME,this._stateTagName(t);else switch(t){case I.GREATER_THAN_SIGN:{this._err(ae.missingEndTagName),this.state=B.DATA;break}case I.EOF:{this._err(ae.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(ae.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=B.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=B.BEFORE_ATTRIBUTE_NAME;break}case I.SOLIDUS:{this.state=B.SELF_CLOSING_START_TAG;break}case I.GREATER_THAN_SIGN:{this.state=B.DATA,this.emitCurrentTagToken();break}case I.NULL:{this._err(ae.unexpectedNullCharacter),n.tagName+=vt;break}case I.EOF:{this._err(ae.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Ol(t)?Gc(t):t)}}_stateRcdataLessThanSign(t){t===I.SOLIDUS?this.state=B.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=B.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){qa(t)?(this.state=B.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=B.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=B.BEFORE_ATTRIBUTE_NAME,!1;case I.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=B.SELF_CLOSING_START_TAG,!1;case I.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=B.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=B.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===I.SOLIDUS?this.state=B.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=B.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){qa(t)?(this.state=B.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=B.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=B.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case I.SOLIDUS:{this.state=B.SCRIPT_DATA_END_TAG_OPEN;break}case I.EXCLAMATION_MARK:{this.state=B.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=B.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){qa(t)?(this.state=B.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=B.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=B.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===I.HYPHEN_MINUS?(this.state=B.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=B.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===I.HYPHEN_MINUS?(this.state=B.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=B.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case I.HYPHEN_MINUS:{this.state=B.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=B.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case I.NULL:{this._err(ae.unexpectedNullCharacter),this._emitChars(vt);break}case I.EOF:{this._err(ae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case I.HYPHEN_MINUS:{this.state=B.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=B.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case I.NULL:{this._err(ae.unexpectedNullCharacter),this.state=B.SCRIPT_DATA_ESCAPED,this._emitChars(vt);break}case I.EOF:{this._err(ae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=B.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case I.HYPHEN_MINUS:{this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=B.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case I.GREATER_THAN_SIGN:{this.state=B.SCRIPT_DATA,this._emitChars(">");break}case I.NULL:{this._err(ae.unexpectedNullCharacter),this.state=B.SCRIPT_DATA_ESCAPED,this._emitChars(vt);break}case I.EOF:{this._err(ae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=B.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===I.SOLIDUS?this.state=B.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:qa(t)?(this._emitChars("<"),this.state=B.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=B.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){qa(t)?(this.state=B.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=B.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=B.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(kn.SCRIPT,!1)&&fT(this.preprocessor.peek(kn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<kn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=B.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case I.HYPHEN_MINUS:{this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case I.NULL:{this._err(ae.unexpectedNullCharacter),this._emitChars(vt);break}case I.EOF:{this._err(ae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case I.HYPHEN_MINUS:{this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case I.NULL:{this._err(ae.unexpectedNullCharacter),this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(vt);break}case I.EOF:{this._err(ae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case I.HYPHEN_MINUS:{this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case I.GREATER_THAN_SIGN:{this.state=B.SCRIPT_DATA,this._emitChars(">");break}case I.NULL:{this._err(ae.unexpectedNullCharacter),this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(vt);break}case I.EOF:{this._err(ae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===I.SOLIDUS?(this.state=B.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(kn.SCRIPT,!1)&&fT(this.preprocessor.peek(kn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<kn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=B.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.SOLIDUS:case I.GREATER_THAN_SIGN:case I.EOF:{this.state=B.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case I.EQUALS_SIGN:{this._err(ae.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=B.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=B.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:case I.SOLIDUS:case I.GREATER_THAN_SIGN:case I.EOF:{this._leaveAttrName(),this.state=B.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case I.EQUALS_SIGN:{this._leaveAttrName(),this.state=B.BEFORE_ATTRIBUTE_VALUE;break}case I.QUOTATION_MARK:case I.APOSTROPHE:case I.LESS_THAN_SIGN:{this._err(ae.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case I.NULL:{this._err(ae.unexpectedNullCharacter),this.currentAttr.name+=vt;break}default:this.currentAttr.name+=String.fromCodePoint(Ol(t)?Gc(t):t)}}_stateAfterAttributeName(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.SOLIDUS:{this.state=B.SELF_CLOSING_START_TAG;break}case I.EQUALS_SIGN:{this.state=B.BEFORE_ATTRIBUTE_VALUE;break}case I.GREATER_THAN_SIGN:{this.state=B.DATA,this.emitCurrentTagToken();break}case I.EOF:{this._err(ae.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=B.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.QUOTATION_MARK:{this.state=B.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this.state=B.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(ae.missingAttributeValue),this.state=B.DATA,this.emitCurrentTagToken();break}default:this.state=B.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case I.QUOTATION_MARK:{this.state=B.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case I.AMPERSAND:{this._startCharacterReference();break}case I.NULL:{this._err(ae.unexpectedNullCharacter),this.currentAttr.value+=vt;break}case I.EOF:{this._err(ae.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case I.APOSTROPHE:{this.state=B.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case I.AMPERSAND:{this._startCharacterReference();break}case I.NULL:{this._err(ae.unexpectedNullCharacter),this.currentAttr.value+=vt;break}case I.EOF:{this._err(ae.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this._leaveAttrValue(),this.state=B.BEFORE_ATTRIBUTE_NAME;break}case I.AMPERSAND:{this._startCharacterReference();break}case I.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=B.DATA,this.emitCurrentTagToken();break}case I.NULL:{this._err(ae.unexpectedNullCharacter),this.currentAttr.value+=vt;break}case I.QUOTATION_MARK:case I.APOSTROPHE:case I.LESS_THAN_SIGN:case I.EQUALS_SIGN:case I.GRAVE_ACCENT:{this._err(ae.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case I.EOF:{this._err(ae.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this._leaveAttrValue(),this.state=B.BEFORE_ATTRIBUTE_NAME;break}case I.SOLIDUS:{this._leaveAttrValue(),this.state=B.SELF_CLOSING_START_TAG;break}case I.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=B.DATA,this.emitCurrentTagToken();break}case I.EOF:{this._err(ae.eofInTag),this._emitEOFToken();break}default:this._err(ae.missingWhitespaceBetweenAttributes),this.state=B.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case I.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=B.DATA,this.emitCurrentTagToken();break}case I.EOF:{this._err(ae.eofInTag),this._emitEOFToken();break}default:this._err(ae.unexpectedSolidusInTag),this.state=B.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case I.GREATER_THAN_SIGN:{this.state=B.DATA,this.emitCurrentComment(n);break}case I.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case I.NULL:{this._err(ae.unexpectedNullCharacter),n.data+=vt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(kn.DASH_DASH,!0)?(this._createCommentToken(kn.DASH_DASH.length+1),this.state=B.COMMENT_START):this._consumeSequenceIfMatch(kn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(kn.DOCTYPE.length+1),this.state=B.DOCTYPE):this._consumeSequenceIfMatch(kn.CDATA_START,!0)?this.inForeignNode?this.state=B.CDATA_SECTION:(this._err(ae.cdataInHtmlContent),this._createCommentToken(kn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=B.BOGUS_COMMENT):this._ensureHibernation()||(this._err(ae.incorrectlyOpenedComment),this._createCommentToken(2),this.state=B.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case I.HYPHEN_MINUS:{this.state=B.COMMENT_START_DASH;break}case I.GREATER_THAN_SIGN:{this._err(ae.abruptClosingOfEmptyComment),this.state=B.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=B.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case I.HYPHEN_MINUS:{this.state=B.COMMENT_END;break}case I.GREATER_THAN_SIGN:{this._err(ae.abruptClosingOfEmptyComment),this.state=B.DATA,this.emitCurrentComment(n);break}case I.EOF:{this._err(ae.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=B.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case I.HYPHEN_MINUS:{this.state=B.COMMENT_END_DASH;break}case I.LESS_THAN_SIGN:{n.data+="<",this.state=B.COMMENT_LESS_THAN_SIGN;break}case I.NULL:{this._err(ae.unexpectedNullCharacter),n.data+=vt;break}case I.EOF:{this._err(ae.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case I.EXCLAMATION_MARK:{n.data+="!",this.state=B.COMMENT_LESS_THAN_SIGN_BANG;break}case I.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=B.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===I.HYPHEN_MINUS?this.state=B.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=B.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===I.HYPHEN_MINUS?this.state=B.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=B.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==I.GREATER_THAN_SIGN&&t!==I.EOF&&this._err(ae.nestedComment),this.state=B.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case I.HYPHEN_MINUS:{this.state=B.COMMENT_END;break}case I.EOF:{this._err(ae.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=B.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case I.GREATER_THAN_SIGN:{this.state=B.DATA,this.emitCurrentComment(n);break}case I.EXCLAMATION_MARK:{this.state=B.COMMENT_END_BANG;break}case I.HYPHEN_MINUS:{n.data+="-";break}case I.EOF:{this._err(ae.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=B.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case I.HYPHEN_MINUS:{n.data+="--!",this.state=B.COMMENT_END_DASH;break}case I.GREATER_THAN_SIGN:{this._err(ae.incorrectlyClosedComment),this.state=B.DATA,this.emitCurrentComment(n);break}case I.EOF:{this._err(ae.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=B.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=B.BEFORE_DOCTYPE_NAME;break}case I.GREATER_THAN_SIGN:{this.state=B.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case I.EOF:{this._err(ae.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ae.missingWhitespaceBeforeDoctypeName),this.state=B.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Ol(t))this._createDoctypeToken(String.fromCharCode(Gc(t))),this.state=B.DOCTYPE_NAME;else switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.NULL:{this._err(ae.unexpectedNullCharacter),this._createDoctypeToken(vt),this.state=B.DOCTYPE_NAME;break}case I.GREATER_THAN_SIGN:{this._err(ae.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=B.DATA;break}case I.EOF:{this._err(ae.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=B.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=B.AFTER_DOCTYPE_NAME;break}case I.GREATER_THAN_SIGN:{this.state=B.DATA,this.emitCurrentDoctype(n);break}case I.NULL:{this._err(ae.unexpectedNullCharacter),n.name+=vt;break}case I.EOF:{this._err(ae.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Ol(t)?Gc(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.GREATER_THAN_SIGN:{this.state=B.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(ae.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(kn.PUBLIC,!1)?this.state=B.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(kn.SYSTEM,!1)?this.state=B.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(ae.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=B.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=B.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case I.QUOTATION_MARK:{this._err(ae.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=B.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this._err(ae.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=B.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(ae.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=B.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(ae.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ae.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=B.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.QUOTATION_MARK:{n.publicId="",this.state=B.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{n.publicId="",this.state=B.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(ae.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=B.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(ae.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ae.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=B.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case I.QUOTATION_MARK:{this.state=B.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case I.NULL:{this._err(ae.unexpectedNullCharacter),n.publicId+=vt;break}case I.GREATER_THAN_SIGN:{this._err(ae.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=B.DATA;break}case I.EOF:{this._err(ae.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case I.APOSTROPHE:{this.state=B.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case I.NULL:{this._err(ae.unexpectedNullCharacter),n.publicId+=vt;break}case I.GREATER_THAN_SIGN:{this._err(ae.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=B.DATA;break}case I.EOF:{this._err(ae.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=B.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case I.GREATER_THAN_SIGN:{this.state=B.DATA,this.emitCurrentDoctype(n);break}case I.QUOTATION_MARK:{this._err(ae.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=B.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this._err(ae.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=B.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.EOF:{this._err(ae.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ae.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=B.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=B.DATA;break}case I.QUOTATION_MARK:{n.systemId="",this.state=B.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{n.systemId="",this.state=B.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.EOF:{this._err(ae.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ae.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=B.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=B.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case I.QUOTATION_MARK:{this._err(ae.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=B.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this._err(ae.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=B.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(ae.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=B.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(ae.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ae.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=B.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.QUOTATION_MARK:{n.systemId="",this.state=B.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{n.systemId="",this.state=B.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(ae.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=B.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(ae.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ae.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=B.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case I.QUOTATION_MARK:{this.state=B.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case I.NULL:{this._err(ae.unexpectedNullCharacter),n.systemId+=vt;break}case I.GREATER_THAN_SIGN:{this._err(ae.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=B.DATA;break}case I.EOF:{this._err(ae.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case I.APOSTROPHE:{this.state=B.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case I.NULL:{this._err(ae.unexpectedNullCharacter),n.systemId+=vt;break}case I.GREATER_THAN_SIGN:{this._err(ae.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=B.DATA;break}case I.EOF:{this._err(ae.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=B.DATA;break}case I.EOF:{this._err(ae.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ae.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=B.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case I.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=B.DATA;break}case I.NULL:{this._err(ae.unexpectedNullCharacter);break}case I.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case I.RIGHT_SQUARE_BRACKET:{this.state=B.CDATA_SECTION_BRACKET;break}case I.EOF:{this._err(ae.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===I.RIGHT_SQUARE_BRACKET?this.state=B.CDATA_SECTION_END:(this._emitChars("]"),this.state=B.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case I.GREATER_THAN_SIGN:{this.state=B.DATA;break}case I.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=B.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(I.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&cT(this.preprocessor.peek(1))?B.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){cT(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===I.SEMICOLON&&this._err(ae.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const AC=new Set([x.DD,x.DT,x.LI,x.OPTGROUP,x.OPTION,x.P,x.RB,x.RP,x.RT,x.RTC]),dT=new Set([...AC,x.CAPTION,x.COLGROUP,x.TBODY,x.TD,x.TFOOT,x.TH,x.THEAD,x.TR]),kf=new Set([x.APPLET,x.CAPTION,x.HTML,x.MARQUEE,x.OBJECT,x.TABLE,x.TD,x.TEMPLATE,x.TH]),f8=new Set([...kf,x.OL,x.UL]),d8=new Set([...kf,x.BUTTON]),hT=new Set([x.ANNOTATION_XML,x.MI,x.MN,x.MO,x.MS,x.MTEXT]),mT=new Set([x.DESC,x.FOREIGN_OBJECT,x.TITLE]),h8=new Set([x.TR,x.TEMPLATE,x.HTML]),m8=new Set([x.TBODY,x.TFOOT,x.THEAD,x.TEMPLATE,x.HTML]),p8=new Set([x.TABLE,x.TEMPLATE,x.HTML]),g8=new Set([x.TD,x.TH]);class b8{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=x.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===x.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===de.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const i=this._indexOf(t)+1;this.items.splice(i,0,n),this.tagIDs.splice(i,0,r),this.stackTop++,i===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,i===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==de.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(x0,de.HTML)}popUntilTableCellPopped(){this.popUntilPopped(g8,de.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(p8,de.HTML)}clearBackToTableBodyContext(){this.clearBackTo(m8,de.HTML)}clearBackToTableRowContext(){this.clearBackTo(h8,de.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===x.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===x.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const i=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case de.HTML:{if(i===t)return!0;if(n.has(i))return!1;break}case de.SVG:{if(mT.has(i))return!1;break}case de.MATHML:{if(hT.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,kf)}hasInListItemScope(t){return this.hasInDynamicScope(t,f8)}hasInButtonScope(t){return this.hasInDynamicScope(t,d8)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case de.HTML:{if(x0.has(n))return!0;if(kf.has(n))return!1;break}case de.SVG:{if(mT.has(n))return!1;break}case de.MATHML:{if(hT.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===de.HTML)switch(this.tagIDs[n]){case t:return!0;case x.TABLE:case x.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===de.HTML)switch(this.tagIDs[t]){case x.TBODY:case x.THEAD:case x.TFOOT:return!0;case x.TABLE:case x.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===de.HTML)switch(this.tagIDs[n]){case t:return!0;case x.OPTION:case x.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&AC.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&dT.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&dT.has(this.currentTagId);)this.pop()}}const _p=3;var Or;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Or||(Or={}));const pT={type:Or.Marker};class E8{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],i=n.length,o=this.treeAdapter.getTagName(t),l=this.treeAdapter.getNamespaceURI(t);for(let c=0;c<this.entries.length;c++){const f=this.entries[c];if(f.type===Or.Marker)break;const{element:h}=f;if(this.treeAdapter.getTagName(h)===o&&this.treeAdapter.getNamespaceURI(h)===l){const p=this.treeAdapter.getAttrList(h);p.length===i&&r.push({idx:c,attrs:p})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<_p)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<_p)return;const i=new Map(n.map(l=>[l.name,l.value]));let o=0;for(let l=0;l<r.length;l++){const c=r[l];c.attrs.every(f=>i.get(f.name)===f.value)&&(o+=1,o>=_p&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(pT)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Or.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Or.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(pT);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Or.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Or.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Or.Element&&n.element===t)}}const Ya={createDocument(){return{nodeName:"#document",mode:nr.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const i=e.childNodes.find(o=>o.nodeName==="#documentType");if(i)i.name=t,i.publicId=n,i.systemId=r;else{const o={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};Ya.appendChild(e,o)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(Ya.isTextNode(n)){n.value+=t;return}}Ya.appendChild(e,Ya.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Ya.isTextNode(r)?r.value+=t:Ya.insertBefore(e,Ya.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},CC="html",y8="about:legacy-compat",_8="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",wC=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],x8=[...wC,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],T8=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),kC=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],v8=[...kC,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function gT(e,t){return t.some(n=>e.startsWith(n))}function S8(e){return e.name===CC&&e.publicId===null&&(e.systemId===null||e.systemId===y8)}function A8(e){if(e.name!==CC)return nr.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===_8)return nr.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),T8.has(n))return nr.QUIRKS;let r=t===null?x8:wC;if(gT(n,r))return nr.QUIRKS;if(r=t===null?kC:v8,gT(n,r))return nr.LIMITED_QUIRKS}return nr.NO_QUIRKS}const bT={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},C8="definitionurl",w8="definitionURL",k8=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),N8=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:de.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:de.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:de.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:de.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:de.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:de.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:de.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:de.XML}],["xml:space",{prefix:"xml",name:"space",namespace:de.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:de.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:de.XMLNS}]]),R8=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),O8=new Set([x.B,x.BIG,x.BLOCKQUOTE,x.BODY,x.BR,x.CENTER,x.CODE,x.DD,x.DIV,x.DL,x.DT,x.EM,x.EMBED,x.H1,x.H2,x.H3,x.H4,x.H5,x.H6,x.HEAD,x.HR,x.I,x.IMG,x.LI,x.LISTING,x.MENU,x.META,x.NOBR,x.OL,x.P,x.PRE,x.RUBY,x.S,x.SMALL,x.SPAN,x.STRONG,x.STRIKE,x.SUB,x.SUP,x.TABLE,x.TT,x.U,x.UL,x.VAR]);function L8(e){const t=e.tagID;return t===x.FONT&&e.attrs.some(({name:r})=>r===$i.COLOR||r===$i.SIZE||r===$i.FACE)||O8.has(t)}function NC(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===C8){e.attrs[t].name=w8;break}}function RC(e){for(let t=0;t<e.attrs.length;t++){const n=k8.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Wg(e){for(let t=0;t<e.attrs.length;t++){const n=N8.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function I8(e){const t=R8.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=yo(e.tagName))}function D8(e,t){return t===de.MATHML&&(e===x.MI||e===x.MO||e===x.MN||e===x.MS||e===x.MTEXT)}function M8(e,t,n){if(t===de.MATHML&&e===x.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===$i.ENCODING){const i=n[r].value.toLowerCase();return i===bT.TEXT_HTML||i===bT.APPLICATION_XML}}return t===de.SVG&&(e===x.FOREIGN_OBJECT||e===x.DESC||e===x.TITLE)}function P8(e,t,n,r){return(!r||r===de.HTML)&&M8(e,t,n)||(!r||r===de.MATHML)&&D8(e,t)}const B8="hidden",j8=8,U8=3;var H;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(H||(H={}));const H8={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},OC=new Set([x.TABLE,x.TBODY,x.TFOOT,x.THEAD,x.TR]),ET={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Ya,onParseError:null};class yT{constructor(t,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=H.INITIAL,this.originalInsertionMode=H.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...ET,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new c8(this.options,this),this.activeFormattingElements=new E8(this.treeAdapter),this.fragmentContextID=r?yo(this.treeAdapter.getTagName(r)):x.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new b8(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r={...ET,...n};t??(t=r.treeAdapter.createElement(Q.TEMPLATE,de.HTML,[]));const i=r.treeAdapter.createElement("documentmock",de.HTML,[]),o=new this(r,i,t);return o.fragmentContextID===x.TEMPLATE&&o.tmplInsertionModeStack.unshift(H.IN_TEMPLATE),o._initTokenizerForFragmentParsing(),o._insertFakeRootElement(),o._resetInsertionMode(),o._findFormInFragmentContext(),o}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var i;if(!this.onParseError)return;const o=(i=t.location)!==null&&i!==void 0?i:H8,l={code:n,startLine:o.startLine,startCol:o.startCol,startOffset:o.startOffset,endLine:r?o.startLine:o.endLine,endCol:r?o.startCol:o.endCol,endOffset:r?o.startOffset:o.endOffset};this.onParseError(l)}onItemPush(t,n,r){var i,o;(o=(i=this.treeAdapter).onItemPush)===null||o===void 0||o.call(i,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,i;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(i=(r=this.treeAdapter).onItemPop)===null||i===void 0||i.call(r,t,this.openElements.current),n){let o,l;this.openElements.stackTop===0&&this.fragmentContext?(o=this.fragmentContext,l=this.fragmentContextID):{current:o,currentTagId:l}=this.openElements,this._setContextModes(o,l)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===de.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,de.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=H.TEXT}switchToPlaintextParsing(){this.insertionMode=H.TEXT,this.originalInsertionMode=H.IN_BODY,this.tokenizer.state=Lt.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===Q.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==de.HTML))switch(this.fragmentContextID){case x.TITLE:case x.TEXTAREA:{this.tokenizer.state=Lt.RCDATA;break}case x.STYLE:case x.XMP:case x.IFRAME:case x.NOEMBED:case x.NOFRAMES:case x.NOSCRIPT:{this.tokenizer.state=Lt.RAWTEXT;break}case x.SCRIPT:{this.tokenizer.state=Lt.SCRIPT_DATA;break}case x.PLAINTEXT:{this.tokenizer.state=Lt.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",i=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,i),t.location){const l=this.treeAdapter.getChildNodes(this.document).find(c=>this.treeAdapter.isDocumentTypeNode(c));l&&this.treeAdapter.setNodeSourceCodeLocation(l,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,de.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,de.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(Q.HTML,de.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,x.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const i=this.treeAdapter.getChildNodes(n),o=r?i.lastIndexOf(r):i.length,l=i[o-1];if(this.treeAdapter.getNodeSourceCodeLocation(l)){const{endLine:f,endCol:h,endOffset:p}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(l,{endLine:f,endCol:h,endOffset:p})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(l,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,i=this.treeAdapter.getTagName(t),o=n.type===Fe.END_TAG&&i===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,o)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===x.SVG&&this.treeAdapter.getTagName(n)===Q.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===de.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===x.MGLYPH||t.tagID===x.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,de.HTML)}_processToken(t){switch(t.type){case Fe.CHARACTER:{this.onCharacter(t);break}case Fe.NULL_CHARACTER:{this.onNullCharacter(t);break}case Fe.COMMENT:{this.onComment(t);break}case Fe.DOCTYPE:{this.onDoctype(t);break}case Fe.START_TAG:{this._processStartTag(t);break}case Fe.END_TAG:{this.onEndTag(t);break}case Fe.EOF:{this.onEof(t);break}case Fe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),o=this.treeAdapter.getAttrList(n);return P8(t,i,o,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===Or.Marker||this.openElements.contains(i.element)),r=n===-1?t-1:n-1;for(let i=r;i>=0;i--){const o=this.activeFormattingElements.entries[i];this._insertElement(o.token,this.treeAdapter.getNamespaceURI(o.element)),o.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=H.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(x.P),this.openElements.popUntilTagNamePopped(x.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case x.TR:{this.insertionMode=H.IN_ROW;return}case x.TBODY:case x.THEAD:case x.TFOOT:{this.insertionMode=H.IN_TABLE_BODY;return}case x.CAPTION:{this.insertionMode=H.IN_CAPTION;return}case x.COLGROUP:{this.insertionMode=H.IN_COLUMN_GROUP;return}case x.TABLE:{this.insertionMode=H.IN_TABLE;return}case x.BODY:{this.insertionMode=H.IN_BODY;return}case x.FRAMESET:{this.insertionMode=H.IN_FRAMESET;return}case x.SELECT:{this._resetInsertionModeForSelect(t);return}case x.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case x.HTML:{this.insertionMode=this.headElement?H.AFTER_HEAD:H.BEFORE_HEAD;return}case x.TD:case x.TH:{if(t>0){this.insertionMode=H.IN_CELL;return}break}case x.HEAD:{if(t>0){this.insertionMode=H.IN_HEAD;return}break}}this.insertionMode=H.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===x.TEMPLATE)break;if(r===x.TABLE){this.insertionMode=H.IN_SELECT_IN_TABLE;return}}this.insertionMode=H.IN_SELECT}_isElementCausesFosterParenting(t){return OC.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case x.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===de.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case x.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return s8[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){g9(this,t);return}switch(this.insertionMode){case H.INITIAL:{xl(this,t);break}case H.BEFORE_HTML:{Pl(this,t);break}case H.BEFORE_HEAD:{Bl(this,t);break}case H.IN_HEAD:{jl(this,t);break}case H.IN_HEAD_NO_SCRIPT:{Ul(this,t);break}case H.AFTER_HEAD:{Hl(this,t);break}case H.IN_BODY:case H.IN_CAPTION:case H.IN_CELL:case H.IN_TEMPLATE:{IC(this,t);break}case H.TEXT:case H.IN_SELECT:case H.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case H.IN_TABLE:case H.IN_TABLE_BODY:case H.IN_ROW:{xp(this,t);break}case H.IN_TABLE_TEXT:{UC(this,t);break}case H.IN_COLUMN_GROUP:{Nf(this,t);break}case H.AFTER_BODY:{Rf(this,t);break}case H.AFTER_AFTER_BODY:{df(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){p9(this,t);return}switch(this.insertionMode){case H.INITIAL:{xl(this,t);break}case H.BEFORE_HTML:{Pl(this,t);break}case H.BEFORE_HEAD:{Bl(this,t);break}case H.IN_HEAD:{jl(this,t);break}case H.IN_HEAD_NO_SCRIPT:{Ul(this,t);break}case H.AFTER_HEAD:{Hl(this,t);break}case H.TEXT:{this._insertCharacters(t);break}case H.IN_TABLE:case H.IN_TABLE_BODY:case H.IN_ROW:{xp(this,t);break}case H.IN_COLUMN_GROUP:{Nf(this,t);break}case H.AFTER_BODY:{Rf(this,t);break}case H.AFTER_AFTER_BODY:{df(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){T0(this,t);return}switch(this.insertionMode){case H.INITIAL:case H.BEFORE_HTML:case H.BEFORE_HEAD:case H.IN_HEAD:case H.IN_HEAD_NO_SCRIPT:case H.AFTER_HEAD:case H.IN_BODY:case H.IN_TABLE:case H.IN_CAPTION:case H.IN_COLUMN_GROUP:case H.IN_TABLE_BODY:case H.IN_ROW:case H.IN_CELL:case H.IN_SELECT:case H.IN_SELECT_IN_TABLE:case H.IN_TEMPLATE:case H.IN_FRAMESET:case H.AFTER_FRAMESET:{T0(this,t);break}case H.IN_TABLE_TEXT:{Tl(this,t);break}case H.AFTER_BODY:{Y8(this,t);break}case H.AFTER_AFTER_BODY:case H.AFTER_AFTER_FRAMESET:{X8(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case H.INITIAL:{Q8(this,t);break}case H.BEFORE_HEAD:case H.IN_HEAD:case H.IN_HEAD_NO_SCRIPT:case H.AFTER_HEAD:{this._err(t,ae.misplacedDoctype);break}case H.IN_TABLE_TEXT:{Tl(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,ae.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?b9(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case H.INITIAL:{xl(this,t);break}case H.BEFORE_HTML:{W8(this,t);break}case H.BEFORE_HEAD:{Z8(this,t);break}case H.IN_HEAD:{yr(this,t);break}case H.IN_HEAD_NO_SCRIPT:{tP(this,t);break}case H.AFTER_HEAD:{rP(this,t);break}case H.IN_BODY:{un(this,t);break}case H.IN_TABLE:{fo(this,t);break}case H.IN_TABLE_TEXT:{Tl(this,t);break}case H.IN_CAPTION:{JP(this,t);break}case H.IN_COLUMN_GROUP:{Jg(this,t);break}case H.IN_TABLE_BODY:{pd(this,t);break}case H.IN_ROW:{gd(this,t);break}case H.IN_CELL:{n9(this,t);break}case H.IN_SELECT:{FC(this,t);break}case H.IN_SELECT_IN_TABLE:{a9(this,t);break}case H.IN_TEMPLATE:{s9(this,t);break}case H.AFTER_BODY:{l9(this,t);break}case H.IN_FRAMESET:{u9(this,t);break}case H.AFTER_FRAMESET:{f9(this,t);break}case H.AFTER_AFTER_BODY:{h9(this,t);break}case H.AFTER_AFTER_FRAMESET:{m9(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?E9(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case H.INITIAL:{xl(this,t);break}case H.BEFORE_HTML:{K8(this,t);break}case H.BEFORE_HEAD:{J8(this,t);break}case H.IN_HEAD:{eP(this,t);break}case H.IN_HEAD_NO_SCRIPT:{nP(this,t);break}case H.AFTER_HEAD:{aP(this,t);break}case H.IN_BODY:{md(this,t);break}case H.TEXT:{$P(this,t);break}case H.IN_TABLE:{Xl(this,t);break}case H.IN_TABLE_TEXT:{Tl(this,t);break}case H.IN_CAPTION:{e9(this,t);break}case H.IN_COLUMN_GROUP:{t9(this,t);break}case H.IN_TABLE_BODY:{v0(this,t);break}case H.IN_ROW:{zC(this,t);break}case H.IN_CELL:{r9(this,t);break}case H.IN_SELECT:{$C(this,t);break}case H.IN_SELECT_IN_TABLE:{i9(this,t);break}case H.IN_TEMPLATE:{o9(this,t);break}case H.AFTER_BODY:{GC(this,t);break}case H.IN_FRAMESET:{c9(this,t);break}case H.AFTER_FRAMESET:{d9(this,t);break}case H.AFTER_AFTER_BODY:{df(this,t);break}}}onEof(t){switch(this.insertionMode){case H.INITIAL:{xl(this,t);break}case H.BEFORE_HTML:{Pl(this,t);break}case H.BEFORE_HEAD:{Bl(this,t);break}case H.IN_HEAD:{jl(this,t);break}case H.IN_HEAD_NO_SCRIPT:{Ul(this,t);break}case H.AFTER_HEAD:{Hl(this,t);break}case H.IN_BODY:case H.IN_TABLE:case H.IN_CAPTION:case H.IN_COLUMN_GROUP:case H.IN_TABLE_BODY:case H.IN_ROW:case H.IN_CELL:case H.IN_SELECT:case H.IN_SELECT_IN_TABLE:{BC(this,t);break}case H.TEXT:{VP(this,t);break}case H.IN_TABLE_TEXT:{Tl(this,t);break}case H.IN_TEMPLATE:{VC(this,t);break}case H.AFTER_BODY:case H.IN_FRAMESET:case H.AFTER_FRAMESET:case H.AFTER_AFTER_BODY:case H.AFTER_AFTER_FRAMESET:{Zg(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===I.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case H.IN_HEAD:case H.IN_HEAD_NO_SCRIPT:case H.AFTER_HEAD:case H.TEXT:case H.IN_COLUMN_GROUP:case H.IN_SELECT:case H.IN_SELECT_IN_TABLE:case H.IN_FRAMESET:case H.AFTER_FRAMESET:{this._insertCharacters(t);break}case H.IN_BODY:case H.IN_CAPTION:case H.IN_CELL:case H.IN_TEMPLATE:case H.AFTER_BODY:case H.AFTER_AFTER_BODY:case H.AFTER_AFTER_FRAMESET:{LC(this,t);break}case H.IN_TABLE:case H.IN_TABLE_BODY:case H.IN_ROW:{xp(this,t);break}case H.IN_TABLE_TEXT:{jC(this,t);break}}}}function z8(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):PC(e,t),n}function F8(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function $8(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let o=0,l=i;l!==n;o++,l=i){i=e.openElements.getCommonAncestor(l);const c=e.activeFormattingElements.getElementEntry(l),f=c&&o>=U8;!c||f?(f&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(l)):(l=V8(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(l,r),r=l)}return r}function V8(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function G8(e,t,n){const r=e.treeAdapter.getTagName(t),i=yo(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const o=e.treeAdapter.getNamespaceURI(t);i===x.TEMPLATE&&o===de.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function q8(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,o=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,o),e.treeAdapter.appendChild(t,o),e.activeFormattingElements.insertElementAfterBookmark(o,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,o,i.tagID)}function Kg(e,t){for(let n=0;n<j8;n++){const r=z8(e,t);if(!r)break;const i=F8(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const o=$8(e,i,r.element),l=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(o),l&&G8(e,l,o),q8(e,i,r)}}function T0(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Y8(e,t){e._appendCommentNode(t,e.openElements.items[0])}function X8(e,t){e._appendCommentNode(t,e.document)}function Zg(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],i=e.treeAdapter.getNodeSourceCodeLocation(r);if(i&&!i.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const o=e.openElements.items[1],l=e.treeAdapter.getNodeSourceCodeLocation(o);l&&!l.endTag&&e._setEndLocation(o,t)}}}}function Q8(e,t){e._setDocumentType(t);const n=t.forceQuirks?nr.QUIRKS:A8(t);S8(t)||e._err(t,ae.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=H.BEFORE_HTML}function xl(e,t){e._err(t,ae.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,nr.QUIRKS),e.insertionMode=H.BEFORE_HTML,e._processToken(t)}function W8(e,t){t.tagID===x.HTML?(e._insertElement(t,de.HTML),e.insertionMode=H.BEFORE_HEAD):Pl(e,t)}function K8(e,t){const n=t.tagID;(n===x.HTML||n===x.HEAD||n===x.BODY||n===x.BR)&&Pl(e,t)}function Pl(e,t){e._insertFakeRootElement(),e.insertionMode=H.BEFORE_HEAD,e._processToken(t)}function Z8(e,t){switch(t.tagID){case x.HTML:{un(e,t);break}case x.HEAD:{e._insertElement(t,de.HTML),e.headElement=e.openElements.current,e.insertionMode=H.IN_HEAD;break}default:Bl(e,t)}}function J8(e,t){const n=t.tagID;n===x.HEAD||n===x.BODY||n===x.HTML||n===x.BR?Bl(e,t):e._err(t,ae.endTagWithoutMatchingOpenElement)}function Bl(e,t){e._insertFakeElement(Q.HEAD,x.HEAD),e.headElement=e.openElements.current,e.insertionMode=H.IN_HEAD,e._processToken(t)}function yr(e,t){switch(t.tagID){case x.HTML:{un(e,t);break}case x.BASE:case x.BASEFONT:case x.BGSOUND:case x.LINK:case x.META:{e._appendElement(t,de.HTML),t.ackSelfClosing=!0;break}case x.TITLE:{e._switchToTextParsing(t,Lt.RCDATA);break}case x.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Lt.RAWTEXT):(e._insertElement(t,de.HTML),e.insertionMode=H.IN_HEAD_NO_SCRIPT);break}case x.NOFRAMES:case x.STYLE:{e._switchToTextParsing(t,Lt.RAWTEXT);break}case x.SCRIPT:{e._switchToTextParsing(t,Lt.SCRIPT_DATA);break}case x.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=H.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(H.IN_TEMPLATE);break}case x.HEAD:{e._err(t,ae.misplacedStartTagForHeadElement);break}default:jl(e,t)}}function eP(e,t){switch(t.tagID){case x.HEAD:{e.openElements.pop(),e.insertionMode=H.AFTER_HEAD;break}case x.BODY:case x.BR:case x.HTML:{jl(e,t);break}case x.TEMPLATE:{rs(e,t);break}default:e._err(t,ae.endTagWithoutMatchingOpenElement)}}function rs(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==x.TEMPLATE&&e._err(t,ae.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(x.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,ae.endTagWithoutMatchingOpenElement)}function jl(e,t){e.openElements.pop(),e.insertionMode=H.AFTER_HEAD,e._processToken(t)}function tP(e,t){switch(t.tagID){case x.HTML:{un(e,t);break}case x.BASEFONT:case x.BGSOUND:case x.HEAD:case x.LINK:case x.META:case x.NOFRAMES:case x.STYLE:{yr(e,t);break}case x.NOSCRIPT:{e._err(t,ae.nestedNoscriptInHead);break}default:Ul(e,t)}}function nP(e,t){switch(t.tagID){case x.NOSCRIPT:{e.openElements.pop(),e.insertionMode=H.IN_HEAD;break}case x.BR:{Ul(e,t);break}default:e._err(t,ae.endTagWithoutMatchingOpenElement)}}function Ul(e,t){const n=t.type===Fe.EOF?ae.openElementsLeftAfterEof:ae.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=H.IN_HEAD,e._processToken(t)}function rP(e,t){switch(t.tagID){case x.HTML:{un(e,t);break}case x.BODY:{e._insertElement(t,de.HTML),e.framesetOk=!1,e.insertionMode=H.IN_BODY;break}case x.FRAMESET:{e._insertElement(t,de.HTML),e.insertionMode=H.IN_FRAMESET;break}case x.BASE:case x.BASEFONT:case x.BGSOUND:case x.LINK:case x.META:case x.NOFRAMES:case x.SCRIPT:case x.STYLE:case x.TEMPLATE:case x.TITLE:{e._err(t,ae.abandonedHeadElementChild),e.openElements.push(e.headElement,x.HEAD),yr(e,t),e.openElements.remove(e.headElement);break}case x.HEAD:{e._err(t,ae.misplacedStartTagForHeadElement);break}default:Hl(e,t)}}function aP(e,t){switch(t.tagID){case x.BODY:case x.HTML:case x.BR:{Hl(e,t);break}case x.TEMPLATE:{rs(e,t);break}default:e._err(t,ae.endTagWithoutMatchingOpenElement)}}function Hl(e,t){e._insertFakeElement(Q.BODY,x.BODY),e.insertionMode=H.IN_BODY,hd(e,t)}function hd(e,t){switch(t.type){case Fe.CHARACTER:{IC(e,t);break}case Fe.WHITESPACE_CHARACTER:{LC(e,t);break}case Fe.COMMENT:{T0(e,t);break}case Fe.START_TAG:{un(e,t);break}case Fe.END_TAG:{md(e,t);break}case Fe.EOF:{BC(e,t);break}}}function LC(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function IC(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function iP(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function sP(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function oP(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,de.HTML),e.insertionMode=H.IN_FRAMESET)}function lP(e,t){e.openElements.hasInButtonScope(x.P)&&e._closePElement(),e._insertElement(t,de.HTML)}function uP(e,t){e.openElements.hasInButtonScope(x.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&x0.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,de.HTML)}function cP(e,t){e.openElements.hasInButtonScope(x.P)&&e._closePElement(),e._insertElement(t,de.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function fP(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(x.P)&&e._closePElement(),e._insertElement(t,de.HTML),n||(e.formElement=e.openElements.current))}function dP(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const i=e.openElements.tagIDs[r];if(n===x.LI&&i===x.LI||(n===x.DD||n===x.DT)&&(i===x.DD||i===x.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==x.ADDRESS&&i!==x.DIV&&i!==x.P&&e._isSpecialElement(e.openElements.items[r],i))break}e.openElements.hasInButtonScope(x.P)&&e._closePElement(),e._insertElement(t,de.HTML)}function hP(e,t){e.openElements.hasInButtonScope(x.P)&&e._closePElement(),e._insertElement(t,de.HTML),e.tokenizer.state=Lt.PLAINTEXT}function mP(e,t){e.openElements.hasInScope(x.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(x.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,de.HTML),e.framesetOk=!1}function pP(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(Q.A);n&&(Kg(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,de.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function gP(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,de.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function bP(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(x.NOBR)&&(Kg(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,de.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function EP(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,de.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function yP(e,t){e.treeAdapter.getDocumentMode(e.document)!==nr.QUIRKS&&e.openElements.hasInButtonScope(x.P)&&e._closePElement(),e._insertElement(t,de.HTML),e.framesetOk=!1,e.insertionMode=H.IN_TABLE}function DC(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,de.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function MC(e){const t=vC(e,$i.TYPE);return t!=null&&t.toLowerCase()===B8}function _P(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,de.HTML),MC(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function xP(e,t){e._appendElement(t,de.HTML),t.ackSelfClosing=!0}function TP(e,t){e.openElements.hasInButtonScope(x.P)&&e._closePElement(),e._appendElement(t,de.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function vP(e,t){t.tagName=Q.IMG,t.tagID=x.IMG,DC(e,t)}function SP(e,t){e._insertElement(t,de.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Lt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=H.TEXT}function AP(e,t){e.openElements.hasInButtonScope(x.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Lt.RAWTEXT)}function CP(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Lt.RAWTEXT)}function _T(e,t){e._switchToTextParsing(t,Lt.RAWTEXT)}function wP(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,de.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===H.IN_TABLE||e.insertionMode===H.IN_CAPTION||e.insertionMode===H.IN_TABLE_BODY||e.insertionMode===H.IN_ROW||e.insertionMode===H.IN_CELL?H.IN_SELECT_IN_TABLE:H.IN_SELECT}function kP(e,t){e.openElements.currentTagId===x.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,de.HTML)}function NP(e,t){e.openElements.hasInScope(x.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,de.HTML)}function RP(e,t){e.openElements.hasInScope(x.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(x.RTC),e._insertElement(t,de.HTML)}function OP(e,t){e._reconstructActiveFormattingElements(),NC(t),Wg(t),t.selfClosing?e._appendElement(t,de.MATHML):e._insertElement(t,de.MATHML),t.ackSelfClosing=!0}function LP(e,t){e._reconstructActiveFormattingElements(),RC(t),Wg(t),t.selfClosing?e._appendElement(t,de.SVG):e._insertElement(t,de.SVG),t.ackSelfClosing=!0}function xT(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,de.HTML)}function un(e,t){switch(t.tagID){case x.I:case x.S:case x.B:case x.U:case x.EM:case x.TT:case x.BIG:case x.CODE:case x.FONT:case x.SMALL:case x.STRIKE:case x.STRONG:{gP(e,t);break}case x.A:{pP(e,t);break}case x.H1:case x.H2:case x.H3:case x.H4:case x.H5:case x.H6:{uP(e,t);break}case x.P:case x.DL:case x.OL:case x.UL:case x.DIV:case x.DIR:case x.NAV:case x.MAIN:case x.MENU:case x.ASIDE:case x.CENTER:case x.FIGURE:case x.FOOTER:case x.HEADER:case x.HGROUP:case x.DIALOG:case x.DETAILS:case x.ADDRESS:case x.ARTICLE:case x.SEARCH:case x.SECTION:case x.SUMMARY:case x.FIELDSET:case x.BLOCKQUOTE:case x.FIGCAPTION:{lP(e,t);break}case x.LI:case x.DD:case x.DT:{dP(e,t);break}case x.BR:case x.IMG:case x.WBR:case x.AREA:case x.EMBED:case x.KEYGEN:{DC(e,t);break}case x.HR:{TP(e,t);break}case x.RB:case x.RTC:{NP(e,t);break}case x.RT:case x.RP:{RP(e,t);break}case x.PRE:case x.LISTING:{cP(e,t);break}case x.XMP:{AP(e,t);break}case x.SVG:{LP(e,t);break}case x.HTML:{iP(e,t);break}case x.BASE:case x.LINK:case x.META:case x.STYLE:case x.TITLE:case x.SCRIPT:case x.BGSOUND:case x.BASEFONT:case x.TEMPLATE:{yr(e,t);break}case x.BODY:{sP(e,t);break}case x.FORM:{fP(e,t);break}case x.NOBR:{bP(e,t);break}case x.MATH:{OP(e,t);break}case x.TABLE:{yP(e,t);break}case x.INPUT:{_P(e,t);break}case x.PARAM:case x.TRACK:case x.SOURCE:{xP(e,t);break}case x.IMAGE:{vP(e,t);break}case x.BUTTON:{mP(e,t);break}case x.APPLET:case x.OBJECT:case x.MARQUEE:{EP(e,t);break}case x.IFRAME:{CP(e,t);break}case x.SELECT:{wP(e,t);break}case x.OPTION:case x.OPTGROUP:{kP(e,t);break}case x.NOEMBED:case x.NOFRAMES:{_T(e,t);break}case x.FRAMESET:{oP(e,t);break}case x.TEXTAREA:{SP(e,t);break}case x.NOSCRIPT:{e.options.scriptingEnabled?_T(e,t):xT(e,t);break}case x.PLAINTEXT:{hP(e,t);break}case x.COL:case x.TH:case x.TD:case x.TR:case x.HEAD:case x.FRAME:case x.TBODY:case x.TFOOT:case x.THEAD:case x.CAPTION:case x.COLGROUP:break;default:xT(e,t)}}function IP(e,t){if(e.openElements.hasInScope(x.BODY)&&(e.insertionMode=H.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function DP(e,t){e.openElements.hasInScope(x.BODY)&&(e.insertionMode=H.AFTER_BODY,GC(e,t))}function MP(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function PP(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(x.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(x.FORM):n&&e.openElements.remove(n))}function BP(e){e.openElements.hasInButtonScope(x.P)||e._insertFakeElement(Q.P,x.P),e._closePElement()}function jP(e){e.openElements.hasInListItemScope(x.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(x.LI),e.openElements.popUntilTagNamePopped(x.LI))}function UP(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function HP(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function zP(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function FP(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(Q.BR,x.BR),e.openElements.pop(),e.framesetOk=!1}function PC(e,t){const n=t.tagName,r=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const o=e.openElements.items[i],l=e.openElements.tagIDs[i];if(r===l&&(r!==x.UNKNOWN||e.treeAdapter.getTagName(o)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(o,l))break}}function md(e,t){switch(t.tagID){case x.A:case x.B:case x.I:case x.S:case x.U:case x.EM:case x.TT:case x.BIG:case x.CODE:case x.FONT:case x.NOBR:case x.SMALL:case x.STRIKE:case x.STRONG:{Kg(e,t);break}case x.P:{BP(e);break}case x.DL:case x.UL:case x.OL:case x.DIR:case x.DIV:case x.NAV:case x.PRE:case x.MAIN:case x.MENU:case x.ASIDE:case x.BUTTON:case x.CENTER:case x.FIGURE:case x.FOOTER:case x.HEADER:case x.HGROUP:case x.DIALOG:case x.ADDRESS:case x.ARTICLE:case x.DETAILS:case x.SEARCH:case x.SECTION:case x.SUMMARY:case x.LISTING:case x.FIELDSET:case x.BLOCKQUOTE:case x.FIGCAPTION:{MP(e,t);break}case x.LI:{jP(e);break}case x.DD:case x.DT:{UP(e,t);break}case x.H1:case x.H2:case x.H3:case x.H4:case x.H5:case x.H6:{HP(e);break}case x.BR:{FP(e);break}case x.BODY:{IP(e,t);break}case x.HTML:{DP(e,t);break}case x.FORM:{PP(e);break}case x.APPLET:case x.OBJECT:case x.MARQUEE:{zP(e,t);break}case x.TEMPLATE:{rs(e,t);break}default:PC(e,t)}}function BC(e,t){e.tmplInsertionModeStack.length>0?VC(e,t):Zg(e,t)}function $P(e,t){var n;t.tagID===x.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function VP(e,t){e._err(t,ae.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function xp(e,t){if(e.openElements.currentTagId!==void 0&&OC.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=H.IN_TABLE_TEXT,t.type){case Fe.CHARACTER:{UC(e,t);break}case Fe.WHITESPACE_CHARACTER:{jC(e,t);break}}else uu(e,t)}function GP(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,de.HTML),e.insertionMode=H.IN_CAPTION}function qP(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,de.HTML),e.insertionMode=H.IN_COLUMN_GROUP}function YP(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Q.COLGROUP,x.COLGROUP),e.insertionMode=H.IN_COLUMN_GROUP,Jg(e,t)}function XP(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,de.HTML),e.insertionMode=H.IN_TABLE_BODY}function QP(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Q.TBODY,x.TBODY),e.insertionMode=H.IN_TABLE_BODY,pd(e,t)}function WP(e,t){e.openElements.hasInTableScope(x.TABLE)&&(e.openElements.popUntilTagNamePopped(x.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function KP(e,t){MC(t)?e._appendElement(t,de.HTML):uu(e,t),t.ackSelfClosing=!0}function ZP(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,de.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function fo(e,t){switch(t.tagID){case x.TD:case x.TH:case x.TR:{QP(e,t);break}case x.STYLE:case x.SCRIPT:case x.TEMPLATE:{yr(e,t);break}case x.COL:{YP(e,t);break}case x.FORM:{ZP(e,t);break}case x.TABLE:{WP(e,t);break}case x.TBODY:case x.TFOOT:case x.THEAD:{XP(e,t);break}case x.INPUT:{KP(e,t);break}case x.CAPTION:{GP(e,t);break}case x.COLGROUP:{qP(e,t);break}default:uu(e,t)}}function Xl(e,t){switch(t.tagID){case x.TABLE:{e.openElements.hasInTableScope(x.TABLE)&&(e.openElements.popUntilTagNamePopped(x.TABLE),e._resetInsertionMode());break}case x.TEMPLATE:{rs(e,t);break}case x.BODY:case x.CAPTION:case x.COL:case x.COLGROUP:case x.HTML:case x.TBODY:case x.TD:case x.TFOOT:case x.TH:case x.THEAD:case x.TR:break;default:uu(e,t)}}function uu(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,hd(e,t),e.fosterParentingEnabled=n}function jC(e,t){e.pendingCharacterTokens.push(t)}function UC(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Tl(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)uu(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const HC=new Set([x.CAPTION,x.COL,x.COLGROUP,x.TBODY,x.TD,x.TFOOT,x.TH,x.THEAD,x.TR]);function JP(e,t){const n=t.tagID;HC.has(n)?e.openElements.hasInTableScope(x.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(x.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=H.IN_TABLE,fo(e,t)):un(e,t)}function e9(e,t){const n=t.tagID;switch(n){case x.CAPTION:case x.TABLE:{e.openElements.hasInTableScope(x.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(x.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=H.IN_TABLE,n===x.TABLE&&Xl(e,t));break}case x.BODY:case x.COL:case x.COLGROUP:case x.HTML:case x.TBODY:case x.TD:case x.TFOOT:case x.TH:case x.THEAD:case x.TR:break;default:md(e,t)}}function Jg(e,t){switch(t.tagID){case x.HTML:{un(e,t);break}case x.COL:{e._appendElement(t,de.HTML),t.ackSelfClosing=!0;break}case x.TEMPLATE:{yr(e,t);break}default:Nf(e,t)}}function t9(e,t){switch(t.tagID){case x.COLGROUP:{e.openElements.currentTagId===x.COLGROUP&&(e.openElements.pop(),e.insertionMode=H.IN_TABLE);break}case x.TEMPLATE:{rs(e,t);break}case x.COL:break;default:Nf(e,t)}}function Nf(e,t){e.openElements.currentTagId===x.COLGROUP&&(e.openElements.pop(),e.insertionMode=H.IN_TABLE,e._processToken(t))}function pd(e,t){switch(t.tagID){case x.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,de.HTML),e.insertionMode=H.IN_ROW;break}case x.TH:case x.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(Q.TR,x.TR),e.insertionMode=H.IN_ROW,gd(e,t);break}case x.CAPTION:case x.COL:case x.COLGROUP:case x.TBODY:case x.TFOOT:case x.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=H.IN_TABLE,fo(e,t));break}default:fo(e,t)}}function v0(e,t){const n=t.tagID;switch(t.tagID){case x.TBODY:case x.TFOOT:case x.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=H.IN_TABLE);break}case x.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=H.IN_TABLE,Xl(e,t));break}case x.BODY:case x.CAPTION:case x.COL:case x.COLGROUP:case x.HTML:case x.TD:case x.TH:case x.TR:break;default:Xl(e,t)}}function gd(e,t){switch(t.tagID){case x.TH:case x.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,de.HTML),e.insertionMode=H.IN_CELL,e.activeFormattingElements.insertMarker();break}case x.CAPTION:case x.COL:case x.COLGROUP:case x.TBODY:case x.TFOOT:case x.THEAD:case x.TR:{e.openElements.hasInTableScope(x.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=H.IN_TABLE_BODY,pd(e,t));break}default:fo(e,t)}}function zC(e,t){switch(t.tagID){case x.TR:{e.openElements.hasInTableScope(x.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=H.IN_TABLE_BODY);break}case x.TABLE:{e.openElements.hasInTableScope(x.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=H.IN_TABLE_BODY,v0(e,t));break}case x.TBODY:case x.TFOOT:case x.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(x.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=H.IN_TABLE_BODY,v0(e,t));break}case x.BODY:case x.CAPTION:case x.COL:case x.COLGROUP:case x.HTML:case x.TD:case x.TH:break;default:Xl(e,t)}}function n9(e,t){const n=t.tagID;HC.has(n)?(e.openElements.hasInTableScope(x.TD)||e.openElements.hasInTableScope(x.TH))&&(e._closeTableCell(),gd(e,t)):un(e,t)}function r9(e,t){const n=t.tagID;switch(n){case x.TD:case x.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=H.IN_ROW);break}case x.TABLE:case x.TBODY:case x.TFOOT:case x.THEAD:case x.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),zC(e,t));break}case x.BODY:case x.CAPTION:case x.COL:case x.COLGROUP:case x.HTML:break;default:md(e,t)}}function FC(e,t){switch(t.tagID){case x.HTML:{un(e,t);break}case x.OPTION:{e.openElements.currentTagId===x.OPTION&&e.openElements.pop(),e._insertElement(t,de.HTML);break}case x.OPTGROUP:{e.openElements.currentTagId===x.OPTION&&e.openElements.pop(),e.openElements.currentTagId===x.OPTGROUP&&e.openElements.pop(),e._insertElement(t,de.HTML);break}case x.HR:{e.openElements.currentTagId===x.OPTION&&e.openElements.pop(),e.openElements.currentTagId===x.OPTGROUP&&e.openElements.pop(),e._appendElement(t,de.HTML),t.ackSelfClosing=!0;break}case x.INPUT:case x.KEYGEN:case x.TEXTAREA:case x.SELECT:{e.openElements.hasInSelectScope(x.SELECT)&&(e.openElements.popUntilTagNamePopped(x.SELECT),e._resetInsertionMode(),t.tagID!==x.SELECT&&e._processStartTag(t));break}case x.SCRIPT:case x.TEMPLATE:{yr(e,t);break}}}function $C(e,t){switch(t.tagID){case x.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===x.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===x.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===x.OPTGROUP&&e.openElements.pop();break}case x.OPTION:{e.openElements.currentTagId===x.OPTION&&e.openElements.pop();break}case x.SELECT:{e.openElements.hasInSelectScope(x.SELECT)&&(e.openElements.popUntilTagNamePopped(x.SELECT),e._resetInsertionMode());break}case x.TEMPLATE:{rs(e,t);break}}}function a9(e,t){const n=t.tagID;n===x.CAPTION||n===x.TABLE||n===x.TBODY||n===x.TFOOT||n===x.THEAD||n===x.TR||n===x.TD||n===x.TH?(e.openElements.popUntilTagNamePopped(x.SELECT),e._resetInsertionMode(),e._processStartTag(t)):FC(e,t)}function i9(e,t){const n=t.tagID;n===x.CAPTION||n===x.TABLE||n===x.TBODY||n===x.TFOOT||n===x.THEAD||n===x.TR||n===x.TD||n===x.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(x.SELECT),e._resetInsertionMode(),e.onEndTag(t)):$C(e,t)}function s9(e,t){switch(t.tagID){case x.BASE:case x.BASEFONT:case x.BGSOUND:case x.LINK:case x.META:case x.NOFRAMES:case x.SCRIPT:case x.STYLE:case x.TEMPLATE:case x.TITLE:{yr(e,t);break}case x.CAPTION:case x.COLGROUP:case x.TBODY:case x.TFOOT:case x.THEAD:{e.tmplInsertionModeStack[0]=H.IN_TABLE,e.insertionMode=H.IN_TABLE,fo(e,t);break}case x.COL:{e.tmplInsertionModeStack[0]=H.IN_COLUMN_GROUP,e.insertionMode=H.IN_COLUMN_GROUP,Jg(e,t);break}case x.TR:{e.tmplInsertionModeStack[0]=H.IN_TABLE_BODY,e.insertionMode=H.IN_TABLE_BODY,pd(e,t);break}case x.TD:case x.TH:{e.tmplInsertionModeStack[0]=H.IN_ROW,e.insertionMode=H.IN_ROW,gd(e,t);break}default:e.tmplInsertionModeStack[0]=H.IN_BODY,e.insertionMode=H.IN_BODY,un(e,t)}}function o9(e,t){t.tagID===x.TEMPLATE&&rs(e,t)}function VC(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(x.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Zg(e,t)}function l9(e,t){t.tagID===x.HTML?un(e,t):Rf(e,t)}function GC(e,t){var n;if(t.tagID===x.HTML){if(e.fragmentContext||(e.insertionMode=H.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===x.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else Rf(e,t)}function Rf(e,t){e.insertionMode=H.IN_BODY,hd(e,t)}function u9(e,t){switch(t.tagID){case x.HTML:{un(e,t);break}case x.FRAMESET:{e._insertElement(t,de.HTML);break}case x.FRAME:{e._appendElement(t,de.HTML),t.ackSelfClosing=!0;break}case x.NOFRAMES:{yr(e,t);break}}}function c9(e,t){t.tagID===x.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==x.FRAMESET&&(e.insertionMode=H.AFTER_FRAMESET))}function f9(e,t){switch(t.tagID){case x.HTML:{un(e,t);break}case x.NOFRAMES:{yr(e,t);break}}}function d9(e,t){t.tagID===x.HTML&&(e.insertionMode=H.AFTER_AFTER_FRAMESET)}function h9(e,t){t.tagID===x.HTML?un(e,t):df(e,t)}function df(e,t){e.insertionMode=H.IN_BODY,hd(e,t)}function m9(e,t){switch(t.tagID){case x.HTML:{un(e,t);break}case x.NOFRAMES:{yr(e,t);break}}}function p9(e,t){t.chars=vt,e._insertCharacters(t)}function g9(e,t){e._insertCharacters(t),e.framesetOk=!1}function qC(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==de.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function b9(e,t){if(L8(t))qC(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===de.MATHML?NC(t):r===de.SVG&&(I8(t),RC(t)),Wg(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function E9(e,t){if(t.tagID===x.P||t.tagID===x.BR){qC(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===de.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}Q.AREA,Q.BASE,Q.BASEFONT,Q.BGSOUND,Q.BR,Q.COL,Q.EMBED,Q.FRAME,Q.HR,Q.IMG,Q.INPUT,Q.KEYGEN,Q.LINK,Q.META,Q.PARAM,Q.SOURCE,Q.TRACK,Q.WBR;const bd=YC("end"),jr=YC("start");function YC(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 XC(e){const t=jr(e),n=bd(e);if(t&&n)return{start:t,end:n}}const y9=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,_9=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),TT={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function QC(e,t){const n=R9(e),r=Xg("type",{handlers:{root:x9,element:T9,text:v9,comment:KC,doctype:S9,raw:C9},unknown:w9}),i={parser:n?new yT(TT):yT.getFragmentParser(void 0,TT),handle(c){r(c,i)},stitches:!1,options:t||{}};r(e,i),_o(i,jr());const o=n?i.parser.document:i.parser.getFragment(),l=LM(o,{file:i.options.file});return i.stitches&&Mr(l,"comment",function(c,f,h){const p=c;if(p.value.stitch&&h&&f!==void 0){const m=h.children;return m[f]=p.value.stitch,f}}),l.type==="root"&&l.children.length===1&&l.children[0].type===e.type?l.children[0]:l}function WC(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function x9(e,t){WC(e.children,t)}function T9(e,t){k9(e,t),WC(e.children,t),N9(e,t)}function v9(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Fe.CHARACTER,chars:e.value,location:cu(e)};_o(t,jr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function S9(e,t){const n={type:Fe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:cu(e)};_o(t,jr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function A9(e,t){t.stitches=!0;const n=O9(e);if("children"in e&&"children"in n){const r=QC({type:"root",children:e.children},t.options);n.children=r.children}KC({type:"comment",value:{stitch:n}},t)}function KC(e,t){const n=e.value,r={type:Fe.COMMENT,data:n,location:cu(e)};_o(t,jr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function C9(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,ZC(t,jr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(y9,"<$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function w9(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))A9(n,t);else{let r="";throw _9.has(n.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+r)}}function _o(e,t){ZC(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=Lt.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function ZC(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function k9(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Lt.PLAINTEXT)return;_o(t,jr(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:Ui.html;i===Ui.html&&n==="svg"&&(i=Ui.svg);const o=BM({...e,children:[]},{space:i===Ui.svg?"svg":"html"}),l={type:Fe.START_TAG,tagName:n,tagID:yo(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in o?o.attrs:[],location:cu(e)};t.parser.currentToken=l,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function N9(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&yC.includes(n)||t.parser.tokenizer.state===Lt.PLAINTEXT)return;_o(t,bd(e));const r={type:Fe.END_TAG,tagName:n,tagID:yo(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:cu(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Lt.RCDATA||t.parser.tokenizer.state===Lt.RAWTEXT||t.parser.tokenizer.state===Lt.SCRIPT_DATA)&&(t.parser.tokenizer.state=Lt.DATA)}function R9(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function cu(e){const t=jr(e)||{line:void 0,column:void 0,offset:void 0},n=bd(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function O9(e){return"children"in e?Yi({...e,children:[]}):Yi(e)}function S0(e){return function(t,n){return QC(t,{...e,file:n})}}const Ri=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Pi={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Ri,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Ri],h2:[["className","sr-only"]],img:[...Ri,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Ri,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Ri],table:[...Ri],ul:[...Ri,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},Wa={}.hasOwnProperty;function L9(e,t){let n={type:"root",children:[]};const r={schema:t?{...Pi,...t}:Pi,stack:[]},i=JC(r,e);return i&&(Array.isArray(i)?i.length===1?n=i[0]:n.children=i:n=i),n}function JC(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return I9(e,n);case"doctype":return D9(e,n);case"element":return M9(e,n);case"root":return P9(e,n);case"text":return B9(e,n)}}}function I9(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),o={type:"comment",value:r<0?n:n.slice(0,r)};return fu(o,t),o}}function D9(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return fu(n,t),n}}function M9(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=ew(e,t.children),i=j9(e,t.properties);e.stack.pop();let o=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(o=!0,e.schema.ancestors&&Wa.call(e.schema.ancestors,n))){const c=e.schema.ancestors[n];let f=-1;for(o=!1;++f<c.length;)e.stack.includes(c[f])&&(o=!0)}if(!o)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const l={type:"element",tagName:n,properties:i,children:r};return fu(l,t),l}function P9(e,t){const r={type:"root",children:ew(e,t.children)};return fu(r,t),r}function B9(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return fu(r,t),r}function ew(e,t){const n=[];if(Array.isArray(t)){const r=t;let i=-1;for(;++i<r.length;){const o=JC(e,r[i]);o&&(Array.isArray(o)?n.push(...o):n.push(o))}}return n}function j9(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,o=r&&Wa.call(r,n)?r[n]:void 0,l=r&&Wa.call(r,"*")?r["*"]:void 0,c=t&&typeof t=="object"?t:{},f={};let h;for(h in c)if(Wa.call(c,h)){const p=c[h];let m=vT(e,ST(o,h),h,p);m==null&&(m=vT(e,ST(l,h),h,p)),m!=null&&(f[h]=m)}if(i&&Wa.call(i,n)){const p=i[n];for(h in p)Wa.call(p,h)&&!Wa.call(f,h)&&(f[h]=p[h])}return f}function vT(e,t,n,r){return t?Array.isArray(r)?U9(e,t,n,r):tw(e,t,n,r):void 0}function U9(e,t,n,r){let i=-1;const o=[];for(;++i<r.length;){const l=tw(e,t,n,r[i]);(typeof l=="number"||typeof l=="string")&&o.push(l)}return o}function tw(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&H9(e,n,r)){if(typeof t=="object"&&t.length>1){let i=!1,o=0;for(;++o<t.length;){const l=t[o];if(l&&typeof l=="object"&&"flags"in l){if(l.test(String(r))){i=!0;break}}else if(l===r){i=!0;break}}if(!i)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function H9(e,t,n){const r=e.schema.protocols&&Wa.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const i=String(n),o=i.indexOf(":"),l=i.indexOf("?"),c=i.indexOf("#"),f=i.indexOf("/");if(o<0||f>-1&&o>f||l>-1&&o>l||c>-1&&o>c)return!0;let h=-1;for(;++h<r.length;){const p=r[h];if(o===p.length&&i.slice(0,p.length)===p)return!0}return!1}function fu(e,t){const n=XC(t);t.data&&(e.data=Yi(t.data)),n&&(e.position=n)}function ST(e,t){let n,r=-1;if(e)for(;++r<e.length;){const i=e[r],o=typeof i=="string"?i:i[0];if(o===t)return i;o==="data*"&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function nw(e){return function(t){return L9(t,e)}}function Of(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}const pn=ui(/[A-Za-z]/),on=ui(/[\dA-Za-z]/),z9=ui(/[#-'*+\--9=?A-Z^-~]/);function Lf(e){return e!==null&&(e<32||e===127)}const A0=ui(/\d/),F9=ui(/[\dA-Fa-f]/),$9=ui(/[!-/:-@[-`{-~]/);function Re(e){return e!==null&&e<-2}function Et(e){return e!==null&&(e<0||e===32)}function Ye(e){return e===-2||e===-1||e===32}const Ed=ui(new RegExp("\\p{P}|\\p{S}","u")),Xi=ui(/\s/);function ui(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function V9(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function G9(e,t,n){const i=cd((n||{}).ignore||[]),o=q9(t);let l=-1;for(;++l<o.length;)Ug(e,"text",c);function c(h,p){let m=-1,E;for(;++m<p.length;){const y=p[m],T=E?E.children:void 0;if(i(y,T?T.indexOf(y):void 0,E))return;E=y}if(E)return f(h,p)}function f(h,p){const m=p[p.length-1],E=o[l][0],y=o[l][1];let T=0;const C=m.children.indexOf(h);let w=!1,k=[];E.lastIndex=0;let N=E.exec(h.value);for(;N;){const M=N.index,U={index:N.index,input:N.input,stack:[...p,h]};let P=y(...N,U);if(typeof P=="string"&&(P=P.length>0?{type:"text",value:P}:void 0),P===!1?E.lastIndex=M+1:(T!==M&&k.push({type:"text",value:h.value.slice(T,M)}),Array.isArray(P)?k.push(...P):P&&k.push(P),T=M+N[0].length,w=!0),!E.global)break;N=E.exec(h.value)}return w?(T<h.value.length&&k.push({type:"text",value:h.value.slice(T)}),m.children.splice(C,1,...k)):k=[h],C+k.length}}function q9(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([Y9(i[0]),X9(i[1])])}return t}function Y9(e){return typeof e=="string"?new RegExp(V9(e),"g"):e}function X9(e){return typeof e=="function"?e:function(){return e}}const Tp="phrasing",vp=["autolink","link","image","label"];function Q9(){return{transforms:[nB],enter:{literalAutolink:K9,literalAutolinkEmail:Sp,literalAutolinkHttp:Sp,literalAutolinkWww:Sp},exit:{literalAutolink:tB,literalAutolinkEmail:eB,literalAutolinkHttp:Z9,literalAutolinkWww:J9}}}function W9(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Tp,notInConstruct:vp},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Tp,notInConstruct:vp},{character:":",before:"[ps]",after:"\\/",inConstruct:Tp,notInConstruct:vp}]}}function K9(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Sp(e){this.config.enter.autolinkProtocol.call(this,e)}function Z9(e){this.config.exit.autolinkProtocol.call(this,e)}function J9(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 eB(e){this.config.exit.autolinkEmail.call(this,e)}function tB(e){this.exit(e)}function nB(e){G9(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,rB],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),aB]],{ignore:["link","linkReference"]})}function rB(e,t,n,r,i){let o="";if(!rw(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!iB(n)))return!1;const l=sB(n+r);if(!l[0])return!1;const c={type:"link",title:null,url:o+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[c,{type:"text",value:l[1]}]:c}function aB(e,t,n,r){return!rw(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function iB(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 sB(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=Of(e,"(");let o=Of(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 rw(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Xi(n)||Ed(n))&&(!t||n!==47)}function mr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}aw.peek=pB;function oB(){this.buffer()}function lB(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function uB(){this.buffer()}function cB(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function fB(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=mr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function dB(e){this.exit(e)}function hB(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=mr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function mB(e){this.exit(e)}function pB(){return"["}function aw(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const l=n.enter("footnoteReference"),c=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{after:"]",before:o})),c(),l(),o+=i.move("]"),o}function gB(){return{enter:{gfmFootnoteCallString:oB,gfmFootnoteCall:lB,gfmFootnoteDefinitionLabelString:uB,gfmFootnoteDefinition:cB},exit:{gfmFootnoteCallString:fB,gfmFootnoteCall:dB,gfmFootnoteDefinitionLabelString:hB,gfmFootnoteDefinition:mB}}}function bB(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:aw},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,o,l){const c=o.createTracker(l);let f=c.move("[^");const h=o.enter("footnoteDefinition"),p=o.enter("label");return f+=c.move(o.safe(o.associationId(r),{before:f,after:"]"})),p(),f+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),f+=c.move((t?`
|
|
52
|
+
`:" ")+o.indentLines(o.containerFlow(r,c.current()),t?iw:EB))),h(),f}}function EB(e,t,n){return t===0?e:iw(e,t,n)}function iw(e,t,n){return(n?"":" ")+e}const yB=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];sw.peek=SB;function _B(){return{canContainEols:["delete"],enter:{strikethrough:TB},exit:{strikethrough:vB}}}function xB(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:yB}],handlers:{delete:sw}}}function TB(e){this.enter({type:"delete",children:[]},e)}function vB(e){this.exit(e)}function sw(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let l=i.move("~~");return l+=n.containerPhrasing(e,{...i.current(),before:l,after:"~"}),l+=i.move("~~"),o(),l}function SB(){return"~"}function AB(e){return e.length}function CB(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||AB,o=[],l=[],c=[],f=[];let h=0,p=-1;for(;++p<e.length;){const S=[],C=[];let w=-1;for(e[p].length>h&&(h=e[p].length);++w<e[p].length;){const k=wB(e[p][w]);if(n.alignDelimiters!==!1){const N=i(k);C[w]=N,(f[w]===void 0||N>f[w])&&(f[w]=N)}S.push(k)}l[p]=S,c[p]=C}let m=-1;if(typeof r=="object"&&"length"in r)for(;++m<h;)o[m]=AT(r[m]);else{const S=AT(r);for(;++m<h;)o[m]=S}m=-1;const E=[],y=[];for(;++m<h;){const S=o[m];let C="",w="";S===99?(C=":",w=":"):S===108?C=":":S===114&&(w=":");let k=n.alignDelimiters===!1?1:Math.max(1,f[m]-C.length-w.length);const N=C+"-".repeat(k)+w;n.alignDelimiters!==!1&&(k=C.length+k+w.length,k>f[m]&&(f[m]=k),y[m]=k),E[m]=N}l.splice(1,0,E),c.splice(1,0,y),p=-1;const T=[];for(;++p<l.length;){const S=l[p],C=c[p];m=-1;const w=[];for(;++m<h;){const k=S[m]||"";let N="",M="";if(n.alignDelimiters!==!1){const U=f[m]-(C[m]||0),P=o[m];P===114?N=" ".repeat(U):P===99?U%2?(N=" ".repeat(U/2+.5),M=" ".repeat(U/2-.5)):(N=" ".repeat(U/2),M=N):M=" ".repeat(U)}n.delimiterStart!==!1&&!m&&w.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&k==="")&&(n.delimiterStart!==!1||m)&&w.push(" "),n.alignDelimiters!==!1&&w.push(N),w.push(k),n.alignDelimiters!==!1&&w.push(M),n.padding!==!1&&w.push(" "),(n.delimiterEnd!==!1||m!==h-1)&&w.push("|")}T.push(n.delimiterEnd===!1?w.join("").replace(/ +$/,""):w.join(""))}return T.join(`
|
|
53
|
+
`)}function wB(e){return e==null?"":String(e)}function AT(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 kB(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const l=n.indentLines(n.containerFlow(e,o.current()),NB);return i(),l}function NB(e,t,n){return">"+(n?"":" ")+e}function RB(e,t){return CT(e,t.inConstruct,!0)&&!CT(e,t.notInConstruct,!1)}function CT(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 wT(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
54
|
+
`&&RB(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
55
|
+
`}function OB(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,l=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>l&&(l=o):o=1,i=r+t.length,r=n.indexOf(t,i);return l}function LB(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 IB(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 DB(e,t,n,r){const i=IB(n),o=e.value||"",l=i==="`"?"GraveAccent":"Tilde";if(LB(e,n)){const m=n.enter("codeIndented"),E=n.indentLines(o,MB);return m(),E}const c=n.createTracker(r),f=i.repeat(Math.max(OB(o,i)+1,3)),h=n.enter("codeFenced");let p=c.move(f);if(e.lang){const m=n.enter(`codeFencedLang${l}`);p+=c.move(n.safe(e.lang,{before:p,after:" ",encode:["`"],...c.current()})),m()}if(e.lang&&e.meta){const m=n.enter(`codeFencedMeta${l}`);p+=c.move(" "),p+=c.move(n.safe(e.meta,{before:p,after:`
|
|
56
|
+
`,encode:["`"],...c.current()})),m()}return p+=c.move(`
|
|
57
|
+
`),o&&(p+=c.move(o+`
|
|
58
|
+
`)),p+=c.move(f),h(),p}function MB(e,t,n){return(n?"":" ")+e}function e1(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 PB(e,t,n,r){const i=e1(n),o=i==='"'?"Quote":"Apostrophe",l=n.enter("definition");let c=n.enter("label");const f=n.createTracker(r);let h=f.move("[");return h+=f.move(n.safe(n.associationId(e),{before:h,after:"]",...f.current()})),h+=f.move("]: "),c(),!e.url||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),h+=f.move("<"),h+=f.move(n.safe(e.url,{before:h,after:">",...f.current()})),h+=f.move(">")):(c=n.enter("destinationRaw"),h+=f.move(n.safe(e.url,{before:h,after:e.title?" ":`
|
|
59
|
+
`,...f.current()}))),c(),e.title&&(c=n.enter(`title${o}`),h+=f.move(" "+i),h+=f.move(n.safe(e.title,{before:h,after:i,...f.current()})),h+=f.move(i),c()),l(),h}function BB(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 Ql(e){return"&#x"+e.toString(16).toUpperCase()+";"}function ho(e){if(e===null||Et(e)||Xi(e))return 1;if(Ed(e))return 2}function If(e,t,n){const r=ho(e),i=ho(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}}ow.peek=jB;function ow(e,t,n,r){const i=BB(n),o=n.enter("emphasis"),l=n.createTracker(r),c=l.move(i);let f=l.move(n.containerPhrasing(e,{after:i,before:c,...l.current()}));const h=f.charCodeAt(0),p=If(r.before.charCodeAt(r.before.length-1),h,i);p.inside&&(f=Ql(h)+f.slice(1));const m=f.charCodeAt(f.length-1),E=If(r.after.charCodeAt(0),m,i);E.inside&&(f=f.slice(0,-1)+Ql(m));const y=l.move(i);return o(),n.attentionEncodeSurroundingInfo={after:E.outside,before:p.outside},c+f+y}function jB(e,t,n){return n.options.emphasis||"*"}const UB={};function t1(e,t){const n=UB,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return lw(e,r,i)}function lw(e,t,n){if(HB(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 kT(e.children,t,n)}return Array.isArray(e)?kT(e,t,n):""}function kT(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=lw(e[i],t,n);return r.join("")}function HB(e){return!!(e&&typeof e=="object")}function zB(e,t){let n=!1;return Mr(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,g0}),!!((!e.depth||e.depth<3)&&t1(e)&&(t.options.setext||n))}function FB(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(zB(e,n)){const p=n.enter("headingSetext"),m=n.enter("phrasing"),E=n.containerPhrasing(e,{...o.current(),before:`
|
|
60
|
+
`,after:`
|
|
61
|
+
`});return m(),p(),E+`
|
|
62
|
+
`+(i===1?"=":"-").repeat(E.length-(Math.max(E.lastIndexOf("\r"),E.lastIndexOf(`
|
|
63
|
+
`))+1))}const l="#".repeat(i),c=n.enter("headingAtx"),f=n.enter("phrasing");o.move(l+" ");let h=n.containerPhrasing(e,{before:"# ",after:`
|
|
64
|
+
`,...o.current()});return/^[\t ]/.test(h)&&(h=Ql(h.charCodeAt(0))+h.slice(1)),h=h?l+" "+h:l,n.options.closeAtx&&(h+=" "+l),f(),c(),h}uw.peek=$B;function uw(e){return e.value||""}function $B(){return"<"}cw.peek=VB;function cw(e,t,n,r){const i=e1(n),o=i==='"'?"Quote":"Apostrophe",l=n.enter("image");let c=n.enter("label");const f=n.createTracker(r);let h=f.move("![");return h+=f.move(n.safe(e.alt,{before:h,after:"]",...f.current()})),h+=f.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),h+=f.move("<"),h+=f.move(n.safe(e.url,{before:h,after:">",...f.current()})),h+=f.move(">")):(c=n.enter("destinationRaw"),h+=f.move(n.safe(e.url,{before:h,after:e.title?" ":")",...f.current()}))),c(),e.title&&(c=n.enter(`title${o}`),h+=f.move(" "+i),h+=f.move(n.safe(e.title,{before:h,after:i,...f.current()})),h+=f.move(i),c()),h+=f.move(")"),l(),h}function VB(){return"!"}fw.peek=GB;function fw(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let l=n.enter("label");const c=n.createTracker(r);let f=c.move("![");const h=n.safe(e.alt,{before:f,after:"]",...c.current()});f+=c.move(h+"]["),l();const p=n.stack;n.stack=[],l=n.enter("reference");const m=n.safe(n.associationId(e),{before:f,after:"]",...c.current()});return l(),n.stack=p,o(),i==="full"||!h||h!==m?f+=c.move(m+"]"):i==="shortcut"?f=f.slice(0,-1):f+=c.move("]"),f}function GB(){return"!"}dw.peek=qB;function dw(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const l=n.unsafe[o],c=n.compilePattern(l);let f;if(l.atBreak)for(;f=c.exec(r);){let h=f.index;r.charCodeAt(h)===10&&r.charCodeAt(h-1)===13&&h--,r=r.slice(0,h)+" "+r.slice(f.index+1)}}return i+r+i}function qB(){return"`"}function hw(e,t){const n=t1(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))}mw.peek=YB;function mw(e,t,n,r){const i=e1(n),o=i==='"'?"Quote":"Apostrophe",l=n.createTracker(r);let c,f;if(hw(e,n)){const p=n.stack;n.stack=[],c=n.enter("autolink");let m=l.move("<");return m+=l.move(n.containerPhrasing(e,{before:m,after:">",...l.current()})),m+=l.move(">"),c(),n.stack=p,m}c=n.enter("link"),f=n.enter("label");let h=l.move("[");return h+=l.move(n.containerPhrasing(e,{before:h,after:"](",...l.current()})),h+=l.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),h+=l.move("<"),h+=l.move(n.safe(e.url,{before:h,after:">",...l.current()})),h+=l.move(">")):(f=n.enter("destinationRaw"),h+=l.move(n.safe(e.url,{before:h,after:e.title?" ":")",...l.current()}))),f(),e.title&&(f=n.enter(`title${o}`),h+=l.move(" "+i),h+=l.move(n.safe(e.title,{before:h,after:i,...l.current()})),h+=l.move(i),f()),h+=l.move(")"),c(),h}function YB(e,t,n){return hw(e,n)?"<":"["}pw.peek=XB;function pw(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let l=n.enter("label");const c=n.createTracker(r);let f=c.move("[");const h=n.containerPhrasing(e,{before:f,after:"]",...c.current()});f+=c.move(h+"]["),l();const p=n.stack;n.stack=[],l=n.enter("reference");const m=n.safe(n.associationId(e),{before:f,after:"]",...c.current()});return l(),n.stack=p,o(),i==="full"||!h||h!==m?f+=c.move(m+"]"):i==="shortcut"?f=f.slice(0,-1):f+=c.move("]"),f}function XB(){return"["}function n1(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 QB(e){const t=n1(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 WB(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 gw(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 KB(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let l=e.ordered?WB(n):n1(n);const c=e.ordered?l==="."?")":".":QB(n);let f=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const p=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&p&&(!p.children||!p.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(f=!0),gw(n)===l&&p){let m=-1;for(;++m<e.children.length;){const E=e.children[m];if(E&&E.type==="listItem"&&E.children&&E.children[0]&&E.children[0].type==="thematicBreak"){f=!0;break}}}}f&&(l=c),n.bulletCurrent=l;const h=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=o,i(),h}function ZB(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 JB(e,t,n,r){const i=ZB(n);let o=n.bulletCurrent||n1(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let l=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const c=n.createTracker(r);c.move(o+" ".repeat(l-o.length)),c.shift(l);const f=n.enter("listItem"),h=n.indentLines(n.containerFlow(e,c.current()),p);return f(),h;function p(m,E,y){return E?(y?"":" ".repeat(l))+m:(y?o:o+" ".repeat(l-o.length))+m}}function e7(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),l=n.containerPhrasing(e,r);return o(),i(),l}const t7=cd(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function n7(e,t,n,r){return(e.children.some(function(l){return t7(l)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function r7(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}bw.peek=a7;function bw(e,t,n,r){const i=r7(n),o=n.enter("strong"),l=n.createTracker(r),c=l.move(i+i);let f=l.move(n.containerPhrasing(e,{after:i,before:c,...l.current()}));const h=f.charCodeAt(0),p=If(r.before.charCodeAt(r.before.length-1),h,i);p.inside&&(f=Ql(h)+f.slice(1));const m=f.charCodeAt(f.length-1),E=If(r.after.charCodeAt(0),m,i);E.inside&&(f=f.slice(0,-1)+Ql(m));const y=l.move(i+i);return o(),n.attentionEncodeSurroundingInfo={after:E.outside,before:p.outside},c+f+y}function a7(e,t,n){return n.options.strong||"*"}function i7(e,t,n,r){return n.safe(e.value,r)}function s7(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 o7(e,t,n){const r=(gw(n)+(n.options.ruleSpaces?" ":"")).repeat(s7(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Ew={blockquote:kB,break:wT,code:DB,definition:PB,emphasis:ow,hardBreak:wT,heading:FB,html:uw,image:cw,imageReference:fw,inlineCode:dw,link:mw,linkReference:pw,list:KB,listItem:JB,paragraph:e7,root:n7,strong:bw,text:i7,thematicBreak:o7},NT=document.createElement("i");function r1(e){const t="&"+e+";";NT.innerHTML=t;const n=NT.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function yw(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}const l7=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function u7(e){return e.replace(l7,c7)}function c7(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return yw(n.slice(o?2:1),o?16:10)}return r1(n)||e}function f7(){return{enter:{table:d7,tableData:RT,tableHeader:RT,tableRow:m7},exit:{codeText:p7,table:h7,tableData:Ap,tableHeader:Ap,tableRow:Ap}}}function d7(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 h7(e){this.exit(e),this.data.inTable=void 0}function m7(e){this.enter({type:"tableRow",children:[]},e)}function Ap(e){this.exit(e)}function RT(e){this.enter({type:"tableCell",children:[]},e)}function p7(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,g7));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function g7(e,t){return t==="|"?t:e}function b7(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
65
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:E,table:l,tableCell:f,tableRow:c}};function l(y,T,S,C){return h(p(y,S,C),y.align)}function c(y,T,S,C){const w=m(y,S,C),k=h([w]);return k.slice(0,k.indexOf(`
|
|
66
|
+
`))}function f(y,T,S,C){const w=S.enter("tableCell"),k=S.enter("phrasing"),N=S.containerPhrasing(y,{...C,before:o,after:o});return k(),w(),N}function h(y,T){return CB(y,{align:T,alignDelimiters:r,padding:n,stringLength:i})}function p(y,T,S){const C=y.children;let w=-1;const k=[],N=T.enter("table");for(;++w<C.length;)k[w]=m(C[w],T,S);return N(),k}function m(y,T,S){const C=y.children;let w=-1;const k=[],N=T.enter("tableRow");for(;++w<C.length;)k[w]=f(C[w],y,T,S);return N(),k}function E(y,T,S){let C=Ew.inlineCode(y,T,S);return S.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function E7(){return{exit:{taskListCheckValueChecked:OT,taskListCheckValueUnchecked:OT,paragraph:_7}}}function y7(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:x7}}}function OT(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function _7(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,l;for(;++o<i.length;){const c=i[o];if(c.type==="paragraph"){l=c;break}}l===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function x7(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);o&&c.move(l);let f=Ew.listItem(e,t,n,{...r,...c.current()});return o&&(f=f.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),f;function h(p){return p+l}}function T7(){return[Q9(),gB(),_B(),f7(),E7()]}function v7(e){return{extensions:[W9(),bB(e),xB(),b7(e),y7()]}}function $n(e,t,n,r){const i=e.length;let o=0,l;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);o<r.length;)l=r.slice(o,o+1e4),l.unshift(t,0),e.splice(...l),o+=1e4,t+=1e4}function rr(e,t){return e.length>0?($n(e,e.length,0,t),e):t}const LT={}.hasOwnProperty;function _w(e){const t={};let n=-1;for(;++n<e.length;)S7(t,e[n]);return t}function S7(e,t){let n;for(n in t){const i=(LT.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let l;if(o)for(l in o){LT.call(i,l)||(i[l]=[]);const c=o[l];A7(i[l],Array.isArray(c)?c:c?[c]:[])}}}function A7(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);$n(e,0,0,r)}const C7={tokenize:L7,partial:!0},xw={tokenize:I7,partial:!0},Tw={tokenize:D7,partial:!0},vw={tokenize:M7,partial:!0},w7={tokenize:P7,partial:!0},Sw={name:"wwwAutolink",tokenize:R7,previous:Cw},Aw={name:"protocolAutolink",tokenize:O7,previous:ww},ga={name:"emailAutolink",tokenize:N7,previous:kw},Ur={};function k7(){return{text:Ur}}let Oi=48;for(;Oi<123;)Ur[Oi]=ga,Oi++,Oi===58?Oi=65:Oi===91&&(Oi=97);Ur[43]=ga;Ur[45]=ga;Ur[46]=ga;Ur[95]=ga;Ur[72]=[ga,Aw];Ur[104]=[ga,Aw];Ur[87]=[ga,Sw];Ur[119]=[ga,Sw];function N7(e,t,n){const r=this;let i,o;return l;function l(m){return!C0(m)||!kw.call(r,r.previous)||a1(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(m))}function c(m){return C0(m)?(e.consume(m),c):m===64?(e.consume(m),f):n(m)}function f(m){return m===46?e.check(w7,p,h)(m):m===45||m===95||on(m)?(o=!0,e.consume(m),f):p(m)}function h(m){return e.consume(m),i=!0,f}function p(m){return o&&i&&pn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function R7(e,t,n){const r=this;return i;function i(l){return l!==87&&l!==119||!Cw.call(r,r.previous)||a1(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(C7,e.attempt(xw,e.attempt(Tw,o),n),n)(l))}function o(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function O7(e,t,n){const r=this;let i="",o=!1;return l;function l(m){return(m===72||m===104)&&ww.call(r,r.previous)&&!a1(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(m),e.consume(m),c):n(m)}function c(m){if(pn(m)&&i.length<5)return i+=String.fromCodePoint(m),e.consume(m),c;if(m===58){const E=i.toLowerCase();if(E==="http"||E==="https")return e.consume(m),f}return n(m)}function f(m){return m===47?(e.consume(m),o?h:(o=!0,f)):n(m)}function h(m){return m===null||Lf(m)||Et(m)||Xi(m)||Ed(m)?n(m):e.attempt(xw,e.attempt(Tw,p),n)(m)}function p(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function L7(e,t,n){let r=0;return i;function i(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),i):l===46&&r===3?(e.consume(l),o):n(l)}function o(l){return l===null?n(l):t(l)}}function I7(e,t,n){let r,i,o;return l;function l(h){return h===46||h===95?e.check(vw,f,c)(h):h===null||Et(h)||Xi(h)||h!==45&&Ed(h)?f(h):(o=!0,e.consume(h),l)}function c(h){return h===95?r=!0:(i=r,r=void 0),e.consume(h),l}function f(h){return i||r||!o?n(h):t(h)}}function D7(e,t){let n=0,r=0;return i;function i(l){return l===40?(n++,e.consume(l),i):l===41&&r<n?o(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(vw,t,o)(l):l===null||Et(l)||Xi(l)?t(l):(e.consume(l),i)}function o(l){return l===41&&r++,e.consume(l),i}}function M7(e,t,n){return r;function r(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),r):c===38?(e.consume(c),o):c===93?(e.consume(c),i):c===60||c===null||Et(c)||Xi(c)?t(c):n(c)}function i(c){return c===null||c===40||c===91||Et(c)||Xi(c)?t(c):r(c)}function o(c){return pn(c)?l(c):n(c)}function l(c){return c===59?(e.consume(c),r):pn(c)?(e.consume(c),l):n(c)}}function P7(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return on(o)?n(o):t(o)}}function Cw(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Et(e)}function ww(e){return!pn(e)}function kw(e){return!(e===47||C0(e))}function C0(e){return e===43||e===45||e===46||e===95||on(e)}function a1(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function xo(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let l="";if(o===37&&on(e.charCodeAt(n+1))&&on(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(l=String.fromCharCode(o));else if(o>55295&&o<57344){const c=e.charCodeAt(n+1);o<56320&&c>56319&&c<57344?(l=String.fromCharCode(o,c),i=1):l="�"}else l=String.fromCharCode(o);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+i+1,l=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function yd(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 w0={name:"attention",resolveAll:B7,tokenize:j7};function B7(e,t){let n=-1,r,i,o,l,c,f,h,p;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;f=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m={...e[r][1].end},E={...e[n][1].start};IT(m,-f),IT(E,f),l={type:f>1?"strongSequence":"emphasisSequence",start:m,end:{...e[r][1].end}},c={type:f>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:E},o={type:f>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:f>1?"strong":"emphasis",start:{...l.start},end:{...c.end}},e[r][1].end={...l.start},e[n][1].start={...c.end},h=[],e[r][1].end.offset-e[r][1].start.offset&&(h=rr(h,[["enter",e[r][1],t],["exit",e[r][1],t]])),h=rr(h,[["enter",i,t],["enter",l,t],["exit",l,t],["enter",o,t]]),h=rr(h,yd(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),h=rr(h,[["exit",o,t],["enter",c,t],["exit",c,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,h=rr(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,$n(e,r-1,n-r+3,h),n=r+h.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function j7(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=ho(r);let o;return l;function l(f){return o=f,e.enter("attentionSequence"),c(f)}function c(f){if(f===o)return e.consume(f),c;const h=e.exit("attentionSequence"),p=ho(f),m=!p||p===2&&i||n.includes(f),E=!i||i===2&&p||n.includes(r);return h._open=!!(o===42?m:m&&(i||!E)),h._close=!!(o===42?E:E&&(p||!m)),t(f)}}function IT(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const U7={name:"autolink",tokenize:H7};function H7(e,t,n){let r=0;return i;function i(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(y){return pn(y)?(e.consume(y),l):y===64?n(y):h(y)}function l(y){return y===43||y===45||y===46||on(y)?(r=1,c(y)):h(y)}function c(y){return y===58?(e.consume(y),r=0,f):(y===43||y===45||y===46||on(y))&&r++<32?(e.consume(y),c):(r=0,h(y))}function f(y){return y===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):y===null||y===32||y===60||Lf(y)?n(y):(e.consume(y),f)}function h(y){return y===64?(e.consume(y),p):z9(y)?(e.consume(y),h):n(y)}function p(y){return on(y)?m(y):n(y)}function m(y){return y===46?(e.consume(y),r=0,p):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):E(y)}function E(y){if((y===45||on(y))&&r++<63){const T=y===45?E:m;return e.consume(y),T}return n(y)}}function et(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(f){return Ye(f)?(e.enter(n),c(f)):t(f)}function c(f){return Ye(f)&&o++<i?(e.consume(f),c):(e.exit(n),t(f))}}const du={partial:!0,tokenize:z7};function z7(e,t,n){return r;function r(o){return Ye(o)?et(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||Re(o)?t(o):n(o)}}const Nw={continuation:{tokenize:$7},exit:V7,name:"blockQuote",tokenize:F7};function F7(e,t,n){const r=this;return i;function i(l){if(l===62){const c=r.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),o}return n(l)}function o(l){return Ye(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function $7(e,t,n){const r=this;return i;function i(l){return Ye(l)?et(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):o(l)}function o(l){return e.attempt(Nw,t,n)(l)}}function V7(e){e.exit("blockQuote")}const Rw={name:"characterEscape",tokenize:G7};function G7(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 $9(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const Ow={name:"characterReference",tokenize:q7};function q7(e,t,n){const r=this;let i=0,o,l;return c;function c(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),f}function f(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),o=31,l=on,p(m))}function h(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,l=F9,p):(e.enter("characterReferenceValue"),o=7,l=A0,p(m))}function p(m){if(m===59&&i){const E=e.exit("characterReferenceValue");return l===on&&!r1(r.sliceSerialize(E))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(m)&&i++<o?(e.consume(m),p):n(m)}}const DT={partial:!0,tokenize:X7},MT={concrete:!0,name:"codeFenced",tokenize:Y7};function Y7(e,t,n){const r=this,i={partial:!0,tokenize:U};let o=0,l=0,c;return f;function f(P){return h(P)}function h(P){const V=r.events[r.events.length-1];return o=V&&V[1].type==="linePrefix"?V[2].sliceSerialize(V[1],!0).length:0,c=P,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(P)}function p(P){return P===c?(l++,e.consume(P),p):l<3?n(P):(e.exit("codeFencedFenceSequence"),Ye(P)?et(e,m,"whitespace")(P):m(P))}function m(P){return P===null||Re(P)?(e.exit("codeFencedFence"),r.interrupt?t(P):e.check(DT,S,M)(P)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),E(P))}function E(P){return P===null||Re(P)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(P)):Ye(P)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),et(e,y,"whitespace")(P)):P===96&&P===c?n(P):(e.consume(P),E)}function y(P){return P===null||Re(P)?m(P):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),T(P))}function T(P){return P===null||Re(P)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(P)):P===96&&P===c?n(P):(e.consume(P),T)}function S(P){return e.attempt(i,M,C)(P)}function C(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),w}function w(P){return o>0&&Ye(P)?et(e,k,"linePrefix",o+1)(P):k(P)}function k(P){return P===null||Re(P)?e.check(DT,S,M)(P):(e.enter("codeFlowValue"),N(P))}function N(P){return P===null||Re(P)?(e.exit("codeFlowValue"),k(P)):(e.consume(P),N)}function M(P){return e.exit("codeFenced"),t(P)}function U(P,V,G){let ie=0;return $;function $(re){return P.enter("lineEnding"),P.consume(re),P.exit("lineEnding"),X}function X(re){return P.enter("codeFencedFence"),Ye(re)?et(P,J,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(re):J(re)}function J(re){return re===c?(P.enter("codeFencedFenceSequence"),he(re)):G(re)}function he(re){return re===c?(ie++,P.consume(re),he):ie>=l?(P.exit("codeFencedFenceSequence"),Ye(re)?et(P,ue,"whitespace")(re):ue(re)):G(re)}function ue(re){return re===null||Re(re)?(P.exit("codeFencedFence"),V(re)):G(re)}}}function X7(e,t,n){const r=this;return i;function i(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const Cp={name:"codeIndented",tokenize:W7},Q7={partial:!0,tokenize:K7};function W7(e,t,n){const r=this;return i;function i(h){return e.enter("codeIndented"),et(e,o,"linePrefix",5)(h)}function o(h){const p=r.events[r.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?l(h):n(h)}function l(h){return h===null?f(h):Re(h)?e.attempt(Q7,l,f)(h):(e.enter("codeFlowValue"),c(h))}function c(h){return h===null||Re(h)?(e.exit("codeFlowValue"),l(h)):(e.consume(h),c)}function f(h){return e.exit("codeIndented"),t(h)}}function K7(e,t,n){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?n(l):Re(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):et(e,o,"linePrefix",5)(l)}function o(l){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(l):Re(l)?i(l):n(l)}}const Z7={name:"codeText",previous:ej,resolve:J7,tokenize:tj};function J7(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 ej(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function tj(e,t,n){let r=0,i,o;return l;function l(m){return e.enter("codeText"),e.enter("codeTextSequence"),c(m)}function c(m){return m===96?(e.consume(m),r++,c):(e.exit("codeTextSequence"),f(m))}function f(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),f):m===96?(o=e.enter("codeTextSequence"),i=0,p(m)):Re(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),f):(e.enter("codeTextData"),h(m))}function h(m){return m===null||m===32||m===96||Re(m)?(e.exit("codeTextData"),f(m)):(e.consume(m),h)}function p(m){return m===96?(e.consume(m),i++,p):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(o.type="codeTextData",h(m))}}class nj{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&&vl(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),vl(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),vl(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);vl(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);vl(this.left,n.reverse())}}}function vl(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 Lw(e){const t={};let n=-1,r,i,o,l,c,f,h;const p=new nj(e);for(;++n<p.length;){for(;n in t;)n=t[n];if(r=p.get(n),n&&r[1].type==="chunkFlow"&&p.get(n-1)[1].type==="listItemPrefix"&&(f=r[1]._tokenizer.events,o=0,o<f.length&&f[o][1].type==="lineEndingBlank"&&(o+=2),o<f.length&&f[o][1].type==="content"))for(;++o<f.length&&f[o][1].type!=="content";)f[o][1].type==="chunkText"&&(f[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,rj(p,n)),n=t[n],h=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(l=p.get(o),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(i&&(p.get(i)[1].type="lineEndingBlank"),l[1].type="lineEnding",i=o);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;i&&(r[1].end={...p.get(i)[1].start},c=p.slice(i,n),c.unshift(r),p.splice(i,n-i+1,c))}}return $n(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!h}function rj(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const c=l.events,f=[],h={};let p,m,E=-1,y=n,T=0,S=0;const C=[S];for(;y;){for(;e.get(++i)[1]!==y;);o.push(i),y._tokenizer||(p=r.sliceStream(y),y.next||p.push(null),m&&l.defineSkip(y.start),y._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(p),y._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),m=y,y=y.next}for(y=n;++E<c.length;)c[E][0]==="exit"&&c[E-1][0]==="enter"&&c[E][1].type===c[E-1][1].type&&c[E][1].start.line!==c[E][1].end.line&&(S=E+1,C.push(S),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(l.events=[],y?(y._tokenizer=void 0,y.previous=void 0):C.pop(),E=C.length;E--;){const w=c.slice(C[E],C[E+1]),k=o.pop();f.push([k,k+w.length-1]),e.splice(k,2,w)}for(f.reverse(),E=-1;++E<f.length;)h[T+f[E][0]]=T+f[E][1],T+=f[E][1]-f[E][0]-1;return h}const aj={resolve:sj,tokenize:oj},ij={partial:!0,tokenize:lj};function sj(e){return Lw(e),e}function oj(e,t){let n;return r;function r(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(c)}function i(c){return c===null?o(c):Re(c)?e.check(ij,l,o)(c):(e.consume(c),i)}function o(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function l(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function lj(e,t,n){const r=this;return i;function i(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),et(e,o,"linePrefix")}function o(l){if(l===null||Re(l))return n(l);const c=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function Iw(e,t,n,r,i,o,l,c,f){const h=f||Number.POSITIVE_INFINITY;let p=0;return m;function m(w){return w===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(w),e.exit(o),E):w===null||w===32||w===41||Lf(w)?n(w):(e.enter(r),e.enter(l),e.enter(c),e.enter("chunkString",{contentType:"string"}),S(w))}function E(w){return w===62?(e.enter(o),e.consume(w),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),y(w))}function y(w){return w===62?(e.exit("chunkString"),e.exit(c),E(w)):w===null||w===60||Re(w)?n(w):(e.consume(w),w===92?T:y)}function T(w){return w===60||w===62||w===92?(e.consume(w),y):y(w)}function S(w){return!p&&(w===null||w===41||Et(w))?(e.exit("chunkString"),e.exit(c),e.exit(l),e.exit(r),t(w)):p<h&&w===40?(e.consume(w),p++,S):w===41?(e.consume(w),p--,S):w===null||w===32||w===40||Lf(w)?n(w):(e.consume(w),w===92?C:S)}function C(w){return w===40||w===41||w===92?(e.consume(w),S):S(w)}}function Dw(e,t,n,r,i,o){const l=this;let c=0,f;return h;function h(y){return e.enter(r),e.enter(i),e.consume(y),e.exit(i),e.enter(o),p}function p(y){return c>999||y===null||y===91||y===93&&!f||y===94&&!c&&"_hiddenFootnoteSupport"in l.parser.constructs?n(y):y===93?(e.exit(o),e.enter(i),e.consume(y),e.exit(i),e.exit(r),t):Re(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),m(y))}function m(y){return y===null||y===91||y===93||Re(y)||c++>999?(e.exit("chunkString"),p(y)):(e.consume(y),f||(f=!Ye(y)),y===92?E:m)}function E(y){return y===91||y===92||y===93?(e.consume(y),c++,m):m(y)}}function Mw(e,t,n,r,i,o){let l;return c;function c(E){return E===34||E===39||E===40?(e.enter(r),e.enter(i),e.consume(E),e.exit(i),l=E===40?41:E,f):n(E)}function f(E){return E===l?(e.enter(i),e.consume(E),e.exit(i),e.exit(r),t):(e.enter(o),h(E))}function h(E){return E===l?(e.exit(o),f(l)):E===null?n(E):Re(E)?(e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),et(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(E))}function p(E){return E===l||E===null||Re(E)?(e.exit("chunkString"),h(E)):(e.consume(E),E===92?m:p)}function m(E){return E===l||E===92?(e.consume(E),p):p(E)}}function zl(e,t){let n;return r;function r(i){return Re(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Ye(i)?et(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const uj={name:"definition",tokenize:fj},cj={partial:!0,tokenize:dj};function fj(e,t,n){const r=this;let i;return o;function o(y){return e.enter("definition"),l(y)}function l(y){return Dw.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function c(y){return i=mr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),f):n(y)}function f(y){return Et(y)?zl(e,h)(y):h(y)}function h(y){return Iw(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function p(y){return e.attempt(cj,m,m)(y)}function m(y){return Ye(y)?et(e,E,"whitespace")(y):E(y)}function E(y){return y===null||Re(y)?(e.exit("definition"),r.parser.defined.push(i),t(y)):n(y)}}function dj(e,t,n){return r;function r(c){return Et(c)?zl(e,i)(c):n(c)}function i(c){return Mw(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function o(c){return Ye(c)?et(e,l,"whitespace")(c):l(c)}function l(c){return c===null||Re(c)?t(c):n(c)}}const hj={name:"hardBreakEscape",tokenize:mj};function mj(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return Re(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const pj={name:"headingAtx",resolve:gj,tokenize:bj};function gj(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},$n(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function bj(e,t,n){let r=0;return i;function i(p){return e.enter("atxHeading"),o(p)}function o(p){return e.enter("atxHeadingSequence"),l(p)}function l(p){return p===35&&r++<6?(e.consume(p),l):p===null||Et(p)?(e.exit("atxHeadingSequence"),c(p)):n(p)}function c(p){return p===35?(e.enter("atxHeadingSequence"),f(p)):p===null||Re(p)?(e.exit("atxHeading"),t(p)):Ye(p)?et(e,c,"whitespace")(p):(e.enter("atxHeadingText"),h(p))}function f(p){return p===35?(e.consume(p),f):(e.exit("atxHeadingSequence"),c(p))}function h(p){return p===null||p===35||Et(p)?(e.exit("atxHeadingText"),c(p)):(e.consume(p),h)}}const Ej=["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"],PT=["pre","script","style","textarea"],yj={concrete:!0,name:"htmlFlow",resolveTo:Tj,tokenize:vj},_j={partial:!0,tokenize:Aj},xj={partial:!0,tokenize:Sj};function Tj(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 vj(e,t,n){const r=this;let i,o,l,c,f;return h;function h(D){return p(D)}function p(D){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(D),m}function m(D){return D===33?(e.consume(D),E):D===47?(e.consume(D),o=!0,S):D===63?(e.consume(D),i=3,r.interrupt?t:O):pn(D)?(e.consume(D),l=String.fromCharCode(D),C):n(D)}function E(D){return D===45?(e.consume(D),i=2,y):D===91?(e.consume(D),i=5,c=0,T):pn(D)?(e.consume(D),i=4,r.interrupt?t:O):n(D)}function y(D){return D===45?(e.consume(D),r.interrupt?t:O):n(D)}function T(D){const ge="CDATA[";return D===ge.charCodeAt(c++)?(e.consume(D),c===ge.length?r.interrupt?t:J:T):n(D)}function S(D){return pn(D)?(e.consume(D),l=String.fromCharCode(D),C):n(D)}function C(D){if(D===null||D===47||D===62||Et(D)){const ge=D===47,Ee=l.toLowerCase();return!ge&&!o&&PT.includes(Ee)?(i=1,r.interrupt?t(D):J(D)):Ej.includes(l.toLowerCase())?(i=6,ge?(e.consume(D),w):r.interrupt?t(D):J(D)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(D):o?k(D):N(D))}return D===45||on(D)?(e.consume(D),l+=String.fromCharCode(D),C):n(D)}function w(D){return D===62?(e.consume(D),r.interrupt?t:J):n(D)}function k(D){return Ye(D)?(e.consume(D),k):$(D)}function N(D){return D===47?(e.consume(D),$):D===58||D===95||pn(D)?(e.consume(D),M):Ye(D)?(e.consume(D),N):$(D)}function M(D){return D===45||D===46||D===58||D===95||on(D)?(e.consume(D),M):U(D)}function U(D){return D===61?(e.consume(D),P):Ye(D)?(e.consume(D),U):N(D)}function P(D){return D===null||D===60||D===61||D===62||D===96?n(D):D===34||D===39?(e.consume(D),f=D,V):Ye(D)?(e.consume(D),P):G(D)}function V(D){return D===f?(e.consume(D),f=null,ie):D===null||Re(D)?n(D):(e.consume(D),V)}function G(D){return D===null||D===34||D===39||D===47||D===60||D===61||D===62||D===96||Et(D)?U(D):(e.consume(D),G)}function ie(D){return D===47||D===62||Ye(D)?N(D):n(D)}function $(D){return D===62?(e.consume(D),X):n(D)}function X(D){return D===null||Re(D)?J(D):Ye(D)?(e.consume(D),X):n(D)}function J(D){return D===45&&i===2?(e.consume(D),j):D===60&&i===1?(e.consume(D),ee):D===62&&i===4?(e.consume(D),z):D===63&&i===3?(e.consume(D),O):D===93&&i===5?(e.consume(D),xe):Re(D)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(_j,te,he)(D)):D===null||Re(D)?(e.exit("htmlFlowData"),he(D)):(e.consume(D),J)}function he(D){return e.check(xj,ue,te)(D)}function ue(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),re}function re(D){return D===null||Re(D)?he(D):(e.enter("htmlFlowData"),J(D))}function j(D){return D===45?(e.consume(D),O):J(D)}function ee(D){return D===47?(e.consume(D),l="",ce):J(D)}function ce(D){if(D===62){const ge=l.toLowerCase();return PT.includes(ge)?(e.consume(D),z):J(D)}return pn(D)&&l.length<8?(e.consume(D),l+=String.fromCharCode(D),ce):J(D)}function xe(D){return D===93?(e.consume(D),O):J(D)}function O(D){return D===62?(e.consume(D),z):D===45&&i===2?(e.consume(D),O):J(D)}function z(D){return D===null||Re(D)?(e.exit("htmlFlowData"),te(D)):(e.consume(D),z)}function te(D){return e.exit("htmlFlow"),t(D)}}function Sj(e,t,n){const r=this;return i;function i(l){return Re(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):n(l)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function Aj(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(du,t,n)}}const Cj={name:"htmlText",tokenize:wj};function wj(e,t,n){const r=this;let i,o,l;return c;function c(O){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(O),f}function f(O){return O===33?(e.consume(O),h):O===47?(e.consume(O),U):O===63?(e.consume(O),N):pn(O)?(e.consume(O),G):n(O)}function h(O){return O===45?(e.consume(O),p):O===91?(e.consume(O),o=0,T):pn(O)?(e.consume(O),k):n(O)}function p(O){return O===45?(e.consume(O),y):n(O)}function m(O){return O===null?n(O):O===45?(e.consume(O),E):Re(O)?(l=m,ee(O)):(e.consume(O),m)}function E(O){return O===45?(e.consume(O),y):m(O)}function y(O){return O===62?j(O):O===45?E(O):m(O)}function T(O){const z="CDATA[";return O===z.charCodeAt(o++)?(e.consume(O),o===z.length?S:T):n(O)}function S(O){return O===null?n(O):O===93?(e.consume(O),C):Re(O)?(l=S,ee(O)):(e.consume(O),S)}function C(O){return O===93?(e.consume(O),w):S(O)}function w(O){return O===62?j(O):O===93?(e.consume(O),w):S(O)}function k(O){return O===null||O===62?j(O):Re(O)?(l=k,ee(O)):(e.consume(O),k)}function N(O){return O===null?n(O):O===63?(e.consume(O),M):Re(O)?(l=N,ee(O)):(e.consume(O),N)}function M(O){return O===62?j(O):N(O)}function U(O){return pn(O)?(e.consume(O),P):n(O)}function P(O){return O===45||on(O)?(e.consume(O),P):V(O)}function V(O){return Re(O)?(l=V,ee(O)):Ye(O)?(e.consume(O),V):j(O)}function G(O){return O===45||on(O)?(e.consume(O),G):O===47||O===62||Et(O)?ie(O):n(O)}function ie(O){return O===47?(e.consume(O),j):O===58||O===95||pn(O)?(e.consume(O),$):Re(O)?(l=ie,ee(O)):Ye(O)?(e.consume(O),ie):j(O)}function $(O){return O===45||O===46||O===58||O===95||on(O)?(e.consume(O),$):X(O)}function X(O){return O===61?(e.consume(O),J):Re(O)?(l=X,ee(O)):Ye(O)?(e.consume(O),X):ie(O)}function J(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),i=O,he):Re(O)?(l=J,ee(O)):Ye(O)?(e.consume(O),J):(e.consume(O),ue)}function he(O){return O===i?(e.consume(O),i=void 0,re):O===null?n(O):Re(O)?(l=he,ee(O)):(e.consume(O),he)}function ue(O){return O===null||O===34||O===39||O===60||O===61||O===96?n(O):O===47||O===62||Et(O)?ie(O):(e.consume(O),ue)}function re(O){return O===47||O===62||Et(O)?ie(O):n(O)}function j(O){return O===62?(e.consume(O),e.exit("htmlTextData"),e.exit("htmlText"),t):n(O)}function ee(O){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),ce}function ce(O){return Ye(O)?et(e,xe,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):xe(O)}function xe(O){return e.enter("htmlTextData"),l(O)}}const i1={name:"labelEnd",resolveAll:Oj,resolveTo:Lj,tokenize:Ij},kj={tokenize:Dj},Nj={tokenize:Mj},Rj={tokenize:Pj};function Oj(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&$n(e,0,e.length,n),e}function Lj(e,t){let n=e.length,r=0,i,o,l,c;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(l=n);const f={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[o][1].start},end:{...e[l][1].end}},p={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[l-2][1].start}};return c=[["enter",f,t],["enter",h,t]],c=rr(c,e.slice(o+1,o+r+3)),c=rr(c,[["enter",p,t]]),c=rr(c,yd(t.parser.constructs.insideSpan.null,e.slice(o+r+4,l-3),t)),c=rr(c,[["exit",p,t],e[l-2],e[l-1],["exit",h,t]]),c=rr(c,e.slice(l+1)),c=rr(c,[["exit",f,t]]),$n(e,o,e.length,c),e}function Ij(e,t,n){const r=this;let i=r.events.length,o,l;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return c;function c(E){return o?o._inactive?m(E):(l=r.parser.defined.includes(mr(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(E),e.exit("labelMarker"),e.exit("labelEnd"),f):n(E)}function f(E){return E===40?e.attempt(kj,p,l?p:m)(E):E===91?e.attempt(Nj,p,l?h:m)(E):l?p(E):m(E)}function h(E){return e.attempt(Rj,p,m)(E)}function p(E){return t(E)}function m(E){return o._balanced=!0,n(E)}}function Dj(e,t,n){return r;function r(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),i}function i(m){return Et(m)?zl(e,o)(m):o(m)}function o(m){return m===41?p(m):Iw(e,l,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function l(m){return Et(m)?zl(e,f)(m):p(m)}function c(m){return n(m)}function f(m){return m===34||m===39||m===40?Mw(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):p(m)}function h(m){return Et(m)?zl(e,p)(m):p(m)}function p(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function Mj(e,t,n){const r=this;return i;function i(c){return Dw.call(r,e,o,l,"reference","referenceMarker","referenceString")(c)}function o(c){return r.parser.defined.includes(mr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function l(c){return n(c)}}function Pj(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 Bj={name:"labelStartImage",resolveAll:i1.resolveAll,tokenize:jj};function jj(e,t,n){const r=this;return i;function i(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),o}function o(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),l):n(c)}function l(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(c):t(c)}}const Uj={name:"labelStartLink",resolveAll:i1.resolveAll,tokenize:Hj};function Hj(e,t,n){const r=this;return i;function i(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),o}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const wp={name:"lineEnding",tokenize:zj};function zj(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),et(e,t,"linePrefix")}}const hf={name:"thematicBreak",tokenize:Fj};function Fj(e,t,n){let r=0,i;return o;function o(h){return e.enter("thematicBreak"),l(h)}function l(h){return i=h,c(h)}function c(h){return h===i?(e.enter("thematicBreakSequence"),f(h)):r>=3&&(h===null||Re(h))?(e.exit("thematicBreak"),t(h)):n(h)}function f(h){return h===i?(e.consume(h),r++,f):(e.exit("thematicBreakSequence"),Ye(h)?et(e,c,"whitespace")(h):c(h))}}const Nn={continuation:{tokenize:qj},exit:Xj,name:"list",tokenize:Gj},$j={partial:!0,tokenize:Qj},Vj={partial:!0,tokenize:Yj};function Gj(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=0;return c;function c(y){const T=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(T==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:A0(y)){if(r.containerState.type||(r.containerState.type=T,e.enter(T,{_container:!0})),T==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(hf,n,h)(y):h(y);if(!r.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(y)}return n(y)}function f(y){return A0(y)&&++l<10?(e.consume(y),f):(!r.interrupt||l<2)&&(r.containerState.marker?y===r.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),h(y)):n(y)}function h(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||y,e.check(du,r.interrupt?n:p,e.attempt($j,E,m))}function p(y){return r.containerState.initialBlankLine=!0,o++,E(y)}function m(y){return Ye(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),E):n(y)}function E(y){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function qj(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(du,i,o);function i(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,et(e,t,"listItemIndent",r.containerState.size+1)(c)}function o(c){return r.containerState.furtherBlankLines||!Ye(c)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(c)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Vj,t,l)(c))}function l(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,et(e,e.attempt(Nn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function Yj(e,t,n){const r=this;return et(e,i,"listItemIndent",r.containerState.size+1);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(o):n(o)}}function Xj(e){e.exit(this.containerState.type)}function Qj(e,t,n){const r=this;return et(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const l=r.events[r.events.length-1];return!Ye(o)&&l&&l[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const BT={name:"setextUnderline",resolveTo:Wj,tokenize:Kj};function Wj(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",l,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function Kj(e,t,n){const r=this;let i;return o;function o(h){let p=r.events.length,m;for(;p--;)if(r.events[p][1].type!=="lineEnding"&&r.events[p][1].type!=="linePrefix"&&r.events[p][1].type!=="content"){m=r.events[p][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||m)?(e.enter("setextHeadingLine"),i=h,l(h)):n(h)}function l(h){return e.enter("setextHeadingLineSequence"),c(h)}function c(h){return h===i?(e.consume(h),c):(e.exit("setextHeadingLineSequence"),Ye(h)?et(e,f,"lineSuffix")(h):f(h))}function f(h){return h===null||Re(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const Zj={tokenize:sU,partial:!0};function Jj(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:rU,continuation:{tokenize:aU},exit:iU}},text:{91:{name:"gfmFootnoteCall",tokenize:nU},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:eU,resolveTo:tU}}}}function eU(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;i--;){const f=r.events[i][1];if(f.type==="labelImage"){l=f;break}if(f.type==="gfmFootnoteCall"||f.type==="labelLink"||f.type==="label"||f.type==="image"||f.type==="link")break}return c;function c(f){if(!l||!l._balanced)return n(f);const h=mr(r.sliceSerialize({start:l.end,end:r.now()}));return h.codePointAt(0)!==94||!o.includes(h.slice(1))?n(f):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),t(f))}}function tU(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",l,t],["exit",l,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...c),e}function nU(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,l;return c;function c(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),f}function f(m){return m!==94?n(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(m){if(o>999||m===93&&!l||m===null||m===91||Et(m))return n(m);if(m===93){e.exit("chunkString");const E=e.exit("gfmFootnoteCallString");return i.includes(mr(r.sliceSerialize(E)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return Et(m)||(l=!0),o++,e.consume(m),m===92?p:h}function p(m){return m===91||m===92||m===93?(e.consume(m),o++,h):h(m)}}function rU(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,l=0,c;return f;function f(T){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(T),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(T){return T===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(T),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",p):n(T)}function p(T){if(l>999||T===93&&!c||T===null||T===91||Et(T))return n(T);if(T===93){e.exit("chunkString");const S=e.exit("gfmFootnoteDefinitionLabelString");return o=mr(r.sliceSerialize(S)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(T),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),E}return Et(T)||(c=!0),l++,e.consume(T),T===92?m:p}function m(T){return T===91||T===92||T===93?(e.consume(T),l++,p):p(T)}function E(T){return T===58?(e.enter("definitionMarker"),e.consume(T),e.exit("definitionMarker"),i.includes(o)||i.push(o),et(e,y,"gfmFootnoteDefinitionWhitespace")):n(T)}function y(T){return t(T)}}function aU(e,t,n){return e.check(du,t,e.attempt(Zj,t,n))}function iU(e){e.exit("gfmFootnoteDefinition")}function sU(e,t,n){const r=this;return et(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(o):n(o)}}function oU(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(l,c){let f=-1;for(;++f<l.length;)if(l[f][0]==="enter"&&l[f][1].type==="strikethroughSequenceTemporary"&&l[f][1]._close){let h=f;for(;h--;)if(l[h][0]==="exit"&&l[h][1].type==="strikethroughSequenceTemporary"&&l[h][1]._open&&l[f][1].end.offset-l[f][1].start.offset===l[h][1].end.offset-l[h][1].start.offset){l[f][1].type="strikethroughSequence",l[h][1].type="strikethroughSequence";const p={type:"strikethrough",start:Object.assign({},l[h][1].start),end:Object.assign({},l[f][1].end)},m={type:"strikethroughText",start:Object.assign({},l[h][1].end),end:Object.assign({},l[f][1].start)},E=[["enter",p,c],["enter",l[h][1],c],["exit",l[h][1],c],["enter",m,c]],y=c.parser.constructs.insideSpan.null;y&&$n(E,E.length,0,yd(y,l.slice(h+1,f),c)),$n(E,E.length,0,[["exit",m,c],["enter",l[f][1],c],["exit",l[f][1],c],["exit",p,c]]),$n(l,h-1,f-h+3,E),f=h+E.length-2;break}}for(f=-1;++f<l.length;)l[f][1].type==="strikethroughSequenceTemporary"&&(l[f][1].type="data");return l}function o(l,c,f){const h=this.previous,p=this.events;let m=0;return E;function E(T){return h===126&&p[p.length-1][1].type!=="characterEscape"?f(T):(l.enter("strikethroughSequenceTemporary"),y(T))}function y(T){const S=ho(h);if(T===126)return m>1?f(T):(l.consume(T),m++,y);if(m<2&&!n)return f(T);const C=l.exit("strikethroughSequenceTemporary"),w=ho(T);return C._open=!w||w===2&&!!S,C._close=!S||S===2&&!!w,c(T)}}}class lU{constructor(){this.map=[]}add(t,n,r){uU(this,t,n,r)}consume(t){if(this.map.sort(function(o,l){return o[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const o of i)t.push(o);i=r.pop()}this.map.length=0}}function uU(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 cU(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 fU(){return{flow:{null:{name:"table",tokenize:dU,resolveAll:hU}}}}function dU(e,t,n){const r=this;let i=0,o=0,l;return c;function c($){let X=r.events.length-1;for(;X>-1;){const ue=r.events[X][1].type;if(ue==="lineEnding"||ue==="linePrefix")X--;else break}const J=X>-1?r.events[X][1].type:null,he=J==="tableHead"||J==="tableRow"?P:f;return he===P&&r.parser.lazy[r.now().line]?n($):he($)}function f($){return e.enter("tableHead"),e.enter("tableRow"),h($)}function h($){return $===124||(l=!0,o+=1),p($)}function p($){return $===null?n($):Re($)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume($),e.exit("lineEnding"),y):n($):Ye($)?et(e,p,"whitespace")($):(o+=1,l&&(l=!1,i+=1),$===124?(e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),l=!0,p):(e.enter("data"),m($)))}function m($){return $===null||$===124||Et($)?(e.exit("data"),p($)):(e.consume($),$===92?E:m)}function E($){return $===92||$===124?(e.consume($),m):m($)}function y($){return r.interrupt=!1,r.parser.lazy[r.now().line]?n($):(e.enter("tableDelimiterRow"),l=!1,Ye($)?et(e,T,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):T($))}function T($){return $===45||$===58?C($):$===124?(l=!0,e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),S):U($)}function S($){return Ye($)?et(e,C,"whitespace")($):C($)}function C($){return $===58?(o+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume($),e.exit("tableDelimiterMarker"),w):$===45?(o+=1,w($)):$===null||Re($)?M($):U($)}function w($){return $===45?(e.enter("tableDelimiterFiller"),k($)):U($)}function k($){return $===45?(e.consume($),k):$===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume($),e.exit("tableDelimiterMarker"),N):(e.exit("tableDelimiterFiller"),N($))}function N($){return Ye($)?et(e,M,"whitespace")($):M($)}function M($){return $===124?T($):$===null||Re($)?!l||i!==o?U($):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t($)):U($)}function U($){return n($)}function P($){return e.enter("tableRow"),V($)}function V($){return $===124?(e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),V):$===null||Re($)?(e.exit("tableRow"),t($)):Ye($)?et(e,V,"whitespace")($):(e.enter("data"),G($))}function G($){return $===null||$===124||Et($)?(e.exit("data"),V($)):(e.consume($),$===92?ie:G)}function ie($){return $===92||$===124?(e.consume($),G):G($)}}function hU(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],l=[0,0,0,0],c=!1,f=0,h,p,m;const E=new lU;for(;++n<e.length;){const y=e[n],T=y[1];y[0]==="enter"?T.type==="tableHead"?(c=!1,f!==0&&(jT(E,t,f,h,p),p=void 0,f=0),h={type:"table",start:Object.assign({},T.start),end:Object.assign({},T.end)},E.add(n,0,[["enter",h,t]])):T.type==="tableRow"||T.type==="tableDelimiterRow"?(r=!0,m=void 0,o=[0,0,0,0],l=[0,n+1,0,0],c&&(c=!1,p={type:"tableBody",start:Object.assign({},T.start),end:Object.assign({},T.end)},E.add(n,0,[["enter",p,t]])),i=T.type==="tableDelimiterRow"?2:p?3:1):i&&(T.type==="data"||T.type==="tableDelimiterMarker"||T.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(o[1]!==0&&(l[0]=l[1],m=qc(E,t,o,i,void 0,m),o=[0,0,0,0]),l[2]=n)):T.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(l[0]=l[1],m=qc(E,t,o,i,void 0,m)),o=l,l=[o[1],n,0,0])):T.type==="tableHead"?(c=!0,f=n):T.type==="tableRow"||T.type==="tableDelimiterRow"?(f=n,o[1]!==0?(l[0]=l[1],m=qc(E,t,o,i,n,m)):l[1]!==0&&(m=qc(E,t,l,i,n,m)),i=0):i&&(T.type==="data"||T.type==="tableDelimiterMarker"||T.type==="tableDelimiterFiller")&&(l[3]=n)}for(f!==0&&jT(E,t,f,h,p),E.consume(t.events),n=-1;++n<t.events.length;){const y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=cU(t.events,n))}return e}function qc(e,t,n,r,i,o){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(o.end=Object.assign({},Ks(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const f=Ks(t.events,n[1]);if(o={type:l,start:Object.assign({},f),end:Object.assign({},f)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const h=Ks(t.events,n[2]),p=Ks(t.events,n[3]),m={type:c,start:Object.assign({},h),end:Object.assign({},p)};if(e.add(n[2],0,[["enter",m,t]]),r!==2){const E=t.events[n[2]],y=t.events[n[3]];if(E[1].end=Object.assign({},y[1].end),E[1].type="chunkText",E[1].contentType="text",n[3]>n[2]+1){const T=n[2]+1,S=n[3]-n[2]-1;e.add(T,S,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return i!==void 0&&(o.end=Object.assign({},Ks(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function jT(e,t,n,r,i){const o=[],l=Ks(t.events,n);i&&(i.end=Object.assign({},l),o.push(["exit",i,t])),r.end=Object.assign({},l),o.push(["exit",r,t]),e.add(n+1,0,o)}function Ks(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const mU={name:"tasklistCheck",tokenize:gU};function pU(){return{text:{91:mU}}}function gU(e,t,n){const r=this;return i;function i(f){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(f):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),o)}function o(f){return Et(f)?(e.enter("taskListCheckValueUnchecked"),e.consume(f),e.exit("taskListCheckValueUnchecked"),l):f===88||f===120?(e.enter("taskListCheckValueChecked"),e.consume(f),e.exit("taskListCheckValueChecked"),l):n(f)}function l(f){return f===93?(e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(f)}function c(f){return Re(f)?t(f):Ye(f)?e.check({tokenize:bU},t,n)(f):n(f)}}function bU(e,t,n){return et(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function EU(e){return _w([k7(),Jj(),oU(e),fU(),pU()])}const yU={};function _U(e){const t=this,n=e||yU,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(EU(n)),o.push(T7()),l.push(v7(n))}var xU=Object.defineProperty,TU=Object.defineProperties,vU=Object.getOwnPropertyDescriptors,UT=Object.getOwnPropertySymbols,SU=Object.prototype.hasOwnProperty,AU=Object.prototype.propertyIsEnumerable,HT=(e,t,n)=>t in e?xU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Pw=(e,t)=>{for(var n in t||(t={}))SU.call(t,n)&&HT(e,n,t[n]);if(UT)for(var n of UT(t))AU.call(t,n)&&HT(e,n,t[n]);return e},Bw=(e,t)=>TU(e,vU(t)),bn=(e,t)=>{let n=!1,r=!1;for(let i=0;i<t;i+=1){if(e[i]==="\\"&&i+1<e.length&&e[i+1]==="`"){i+=1;continue}if(e.substring(i,i+3)==="```"){r=!r,i+=2;continue}!r&&e[i]==="`"&&(n=!n)}return n||r},CU=(e,t)=>{let n=e.substring(t,t+3)==="```",r=t>0&&e.substring(t-1,t+2)==="```",i=t>1&&e.substring(t-2,t+1)==="```";return n||r||i},wU=e=>{let t=0;for(let n=0;n<e.length;n+=1){if(e[n]==="\\"&&n+1<e.length&&e[n+1]==="`"){n+=1;continue}e[n]==="`"&&!CU(e,n)&&(t+=1)}return t},ai=(e,t)=>{let n=!1,r=!1,i=-1;for(let o=0;o<e.length;o+=1){if(e[o]==="\\"&&o+1<e.length&&e[o+1]==="`"){o+=1;continue}if(e.substring(o,o+3)==="```"){r=!r,o+=2;continue}if(!r&&e[o]==="`")if(n){if(i<t&&t<o)return!0;n=!1,i=-1}else n=!0,i=o}return!1},kU=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,NU=e=>!e||typeof e!="string"||!e.includes(">")?e:e.replace(kU,(t,n,r,i)=>bn(e,i)?t:`${n}\\>${r}`),RU=/(\*\*)([^*]*\*?)$/,OU=/(__)([^_]*?)$/,LU=/(\*\*\*)([^*]*?)$/,IU=/(\*)([^*]*?)$/,DU=/(_)([^_]*?)$/,MU=/(`)([^`]*?)$/,PU=/(~~)([^~]*?)$/,as=/^[\s_~*`]*$/,jw=/^[\s]*[-*+][\s]+$/,BU=/[\p{L}\p{N}_]/u,jU=/^```[^`\n]*```?$/,UU=/^\*{4,}$/,HU=/(__)([^_]+)_$/,zU=/(~~)([^~]+)~$/,zT=/~~/g,ii=e=>{if(!e)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===95?!0:BU.test(e)},FU=(e,t)=>{let n=1;for(let r=t-1;r>=0;r-=1)if(e[r]==="]")n+=1;else if(e[r]==="["&&(n-=1,n===0))return r;return-1},Uw=(e,t)=>{let n=1;for(let r=t+1;r<e.length;r+=1)if(e[r]==="[")n+=1;else if(e[r]==="]"&&(n-=1,n===0))return r;return-1},_d=(e,t)=>{let n=!1,r=!1;for(let i=0;i<e.length&&i<t;i+=1){if(e[i]==="\\"&&e[i+1]==="$"){i+=1;continue}e[i]==="$"&&(e[i+1]==="$"?(r=!r,i+=1,n=!1):r||(n=!n))}return n||r},$U=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===")")return!0;if(e[n]===`
|
|
67
|
+
`)return!1}return!1},Hw=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===")")return!1;if(e[n]==="(")return n>0&&e[n-1]==="]"?$U(e,t):!1;if(e[n]===`
|
|
68
|
+
`)return!1}return!1},VU=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===">")return!1;if(e[n]==="<"){let r=n+1<e.length?e[n+1]:"";return r>="a"&&r<="z"||r>="A"&&r<="Z"||r==="/"}if(e[n]===`
|
|
69
|
+
`)return!1}return!1},s1=(e,t,n)=>{let r=0;for(let f=t-1;f>=0;f-=1)if(e[f]===`
|
|
70
|
+
`){r=f+1;break}let i=e.length;for(let f=t;f<e.length;f+=1)if(e[f]===`
|
|
71
|
+
`){i=f;break}let o=e.substring(r,i),l=0,c=!1;for(let f of o)if(f===n)l+=1;else if(f!==" "&&f!==" "){c=!0;break}return l>=3&&!c},GU=(e,t,n,r)=>n==="\\"||e.includes("$")&&_d(e,t)?!0:n!=="*"&&r==="*"?(t<e.length-2?e[t+2]:"")!=="*":!!(n==="*"||n&&r&&ii(n)&&ii(r)||(!n||n===" "||n===" "||n===`
|
|
72
|
+
`)&&(!r||r===" "||r===" "||r===`
|
|
73
|
+
`)),zw=e=>{let t=0,n=!1,r=e.length;for(let i=0;i<r;i+=1){if(e[i]==="`"&&i+2<r&&e[i+1]==="`"&&e[i+2]==="`"){n=!n,i+=2;continue}if(n||e[i]!=="*")continue;let o=i>0?e[i-1]:"",l=i<r-1?e[i+1]:"";GU(e,i,o,l)||(t+=1)}return t},qU=(e,t,n,r)=>!!(n==="\\"||e.includes("$")&&_d(e,t)||Hw(e,t)||VU(e,t)||n==="_"||r==="_"||n&&r&&ii(n)&&ii(r)),YU=e=>{let t=0,n=!1,r=e.length;for(let i=0;i<r;i+=1){if(e[i]==="`"&&i+2<r&&e[i+1]==="`"&&e[i+2]==="`"){n=!n,i+=2;continue}if(n||e[i]!=="_")continue;let o=i>0?e[i-1]:"",l=i<r-1?e[i+1]:"";qU(e,i,o,l)||(t+=1)}return t},XU=e=>{let t=0,n=0,r=!1;for(let i=0;i<e.length;i+=1){if(e[i]==="`"&&i+2<e.length&&e[i+1]==="`"&&e[i+2]==="`"){n>=3&&(t+=Math.floor(n/3)),n=0,r=!r,i+=2;continue}r||(e[i]==="*"?n+=1:(n>=3&&(t+=Math.floor(n/3)),n=0))}return n>=3&&(t+=Math.floor(n/3)),t},o1=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){n=!n,r+=2;continue}n||e[r]==="*"&&r+1<e.length&&e[r+1]==="*"&&(t+=1,r+=1)}return t},FT=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){n=!n,r+=2;continue}n||e[r]==="_"&&r+1<e.length&&e[r+1]==="_"&&(t+=1,r+=1)}return t},QU=(e,t,n)=>{if(!t||as.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
|
|
74
|
+
`),i=r===-1?0:r+1,o=e.substring(i,n);return jw.test(o)&&t.includes(`
|
|
75
|
+
`)?!0:s1(e,n,"*")},WU=e=>{let t=e.match(RU);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return bn(e,r)||ai(e,r)||QU(e,n,r)?e:o1(e)%2===1?n.endsWith("*")?`${e}*`:`${e}**`:e},KU=(e,t,n)=>{if(!t||as.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
|
|
76
|
+
`),i=r===-1?0:r+1,o=e.substring(i,n);return jw.test(o)&&t.includes(`
|
|
77
|
+
`)?!0:s1(e,n,"_")},ZU=e=>{let t=e.match(OU);if(!t){let i=e.match(HU);if(i){let o=e.lastIndexOf(i[1]);if(!(bn(e,o)||ai(e,o))&&FT(e)%2===1)return`${e}_`}return e}let n=t[2],r=e.lastIndexOf(t[1]);return bn(e,r)||ai(e,r)||KU(e,n,r)?e:FT(e)%2===1?`${e}__`:e},JU=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]==="*"&&e[n-1]!=="*"&&e[n+1]!=="*"&&e[n-1]!=="\\"&&!_d(e,n)){let r=n>0?e[n-1]:"",i=n<e.length-1?e[n+1]:"";if((!r||r===" "||r===" "||r===`
|
|
78
|
+
`)&&(!i||i===" "||i===" "||i===`
|
|
79
|
+
`)||r&&i&&ii(r)&&ii(i))continue;return n}}return-1},eH=e=>{if(!e.match(IU))return e;let t=JU(e);if(t===-1||bn(e,t)||ai(e,t))return e;let n=e.substring(t+1);return!n||as.test(n)?e:zw(e)%2===1?`${e}*`:e},Fw=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]==="_"&&e[n-1]!=="_"&&e[n+1]!=="_"&&e[n-1]!=="\\"&&!_d(e,n)&&!Hw(e,n)){let r=n>0?e[n-1]:"",i=n<e.length-1?e[n+1]:"";if(r&&i&&ii(r)&&ii(i))continue;return n}}return-1},tH=e=>{let t=e.length;for(;t>0&&e[t-1]===`
|
|
80
|
+
`;)t-=1;if(t<e.length){let n=e.slice(0,t),r=e.slice(t);return`${n}_${r}`}return`${e}_`},nH=e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if(o1(t)%2!==1)return null;let n=t.indexOf("**"),r=Fw(t);return n!==-1&&r!==-1&&n<r?`${t}_**`:null},rH=e=>{if(!e.match(DU))return e;let t=Fw(e);if(t===-1)return e;let n=e.substring(t+1);if(!n||as.test(n)||bn(e,t)||ai(e,t))return e;if(YU(e)%2===1){let r=nH(e);return r!==null?r:tH(e)}return e},aH=e=>{let t=o1(e),n=zw(e);return t%2===0&&n%2===0},iH=(e,t,n)=>!t||as.test(t)||bn(e,n)||ai(e,n)?!0:s1(e,n,"*"),sH=e=>{if(UU.test(e))return e;let t=e.match(LU);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return iH(e,n,r)?e:XU(e)%2===1?aH(e)?e:`${e}***`:e},oH=/<[a-zA-Z/][^>]*$/,lH=e=>{let t=e.match(oH);return!t||t.index===void 0||bn(e,t.index)?e:e.substring(0,t.index).trimEnd()},uH=e=>!e.match(jU)||e.includes(`
|
|
81
|
+
`)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,cH=e=>(e.match(/```/g)||[]).length%2===1,fH=e=>{let t=uH(e);if(t!==null)return t;let n=e.match(MU);if(n&&!cH(e)){let r=n[2];if(!r||as.test(r))return e;if(wU(e)%2===1)return`${e}\``}return e},$w=(e,t)=>t>=2&&e.substring(t-2,t+1)==="```"||t>=1&&e.substring(t-1,t+2)==="```"||t<=e.length-3&&e.substring(t,t+3)==="```",dH=e=>{let t=0,n=!1;for(let r=0;r<e.length-1;r+=1)e[r]==="`"&&!$w(e,r)&&(n=!n),!n&&e[r]==="$"&&e[r+1]==="$"&&(t+=1,r+=1);return t},hH=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="\\"){r+=1;continue}if(e[r]==="`"&&!$w(e,r)){n=!n;continue}!n&&e[r]==="$"&&(r+1<e.length&&e[r+1]==="$"?r+=1:t+=1)}return t},mH=e=>{if(e.endsWith("$")&&!e.endsWith("$$"))return`${e}$`;let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
|
|
82
|
+
`,t)!==-1&&!e.endsWith(`
|
|
83
|
+
`)?`${e}
|
|
84
|
+
$$`:`${e}$$`},pH=e=>dH(e)%2===0?e:mH(e),gH=e=>hH(e)%2===1?`${e}$`:e,bH=(e,t,n)=>{if(e.substring(t+2).includes(")"))return null;let r=FU(e,t);if(r===-1||bn(e,r))return null;let i=r>0&&e[r-1]==="!",o=i?r-1:r,l=e.substring(0,o);if(i)return l;let c=e.substring(r+1,t);return n==="text-only"?`${l}${c}`:`${l}[${c}](streamdown:incomplete-link)`},$T=(e,t)=>{for(let n=0;n<t;n++)if(e[n]==="["&&!bn(e,n)){if(n>0&&e[n-1]==="!")continue;let r=Uw(e,n);if(r===-1)return n;if(r+1<e.length&&e[r+1]==="("){let i=e.indexOf(")",r+2);i!==-1&&(n=i)}}return t},EH=(e,t,n)=>{let r=t>0&&e[t-1]==="!",i=r?t-1:t;if(!e.substring(t+1).includes("]")){let o=e.substring(0,i);if(r)return o;if(n==="text-only"){let l=$T(e,t);return e.substring(0,l)+e.substring(l+1)}return`${e}](streamdown:incomplete-link)`}if(Uw(e,t)===-1){let o=e.substring(0,i);if(r)return o;if(n==="text-only"){let l=$T(e,t);return e.substring(0,l)+e.substring(l+1)}return`${e}](streamdown:incomplete-link)`}return null},Vw=(e,t="protocol")=>{let n=e.lastIndexOf("](");if(n!==-1&&!bn(e,n)){let r=bH(e,n,t);if(r!==null)return r}for(let r=e.length-1;r>=0;r-=1)if(e[r]==="["&&!bn(e,r)){let i=EH(e,r,t);if(i!==null)return i}return e},yH=/^-{1,2}$/,_H=/^[\s]*-{1,2}[\s]+$/,xH=/^={1,2}$/,TH=/^[\s]*={1,2}[\s]+$/,vH=e=>{if(!e||typeof e!="string")return e;let t=e.lastIndexOf(`
|
|
85
|
+
`);if(t===-1)return e;let n=e.substring(t+1),r=e.substring(0,t),i=n.trim();if(yH.test(i)&&!n.match(_H)){let o=r.split(`
|
|
86
|
+
`).at(-1);if(o&&o.trim().length>0)return`${e}`}if(xH.test(i)&&!n.match(TH)){let o=r.split(`
|
|
87
|
+
`).at(-1);if(o&&o.trim().length>0)return`${e}`}return e},SH=new RegExp("(?<=[\\p{L}\\p{N}_])~(?!~)(?=[\\p{L}\\p{N}_])","gu"),AH=e=>!e||typeof e!="string"||!e.includes("~")?e:e.replace(SH,(t,n)=>bn(e,n)?t:"\\~"),CH=e=>{var t,n;let r=e.match(PU);if(r){let i=r[2];if(!i||as.test(i))return e;let o=e.lastIndexOf(r[1]);if(bn(e,o)||ai(e,o))return e;if(((t=e.match(zT))==null?void 0:t.length)%2===1)return`${e}~~`}else{let i=e.match(zU);if(i){let o=e.lastIndexOf(i[0].slice(0,2));if(bn(e,o)||ai(e,o))return e;if(((n=e.match(zT))==null?void 0:n.length)%2===1)return`${e}~`}}return e},kp=e=>e!==!1,wH=e=>e===!0,mn={SINGLE_TILDE:0,COMPARISON_OPERATORS:5,HTML_TAGS:10,SETEXT_HEADINGS:15,LINKS:20,BOLD_ITALIC:30,BOLD:35,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,INLINE_KATEX:75,DEFAULT:100},kH=[{handler:{name:"singleTilde",handle:AH,priority:mn.SINGLE_TILDE},optionKey:"singleTilde"},{handler:{name:"comparisonOperators",handle:NU,priority:mn.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:lH,priority:mn.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:vH,priority:mn.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:Vw,priority:mn.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:sH,priority:mn.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:WU,priority:mn.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:ZU,priority:mn.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:eH,priority:mn.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:rH,priority:mn.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:fH,priority:mn.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:CH,priority:mn.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:pH,priority:mn.KATEX},optionKey:"katex"},{handler:{name:"inlineKatex",handle:gH,priority:mn.INLINE_KATEX},optionKey:"inlineKatex"}],NH=e=>{var t;let n=(t=e?.linkMode)!=null?t:"protocol";return kH.filter(({handler:r,optionKey:i})=>r.name==="links"?kp(e?.links)||kp(e?.images):r.name==="inlineKatex"?wH(e?.inlineKatex):kp(e?.[i])).map(({handler:r,earlyReturn:i})=>r.name==="links"?{handler:Bw(Pw({},r),{handle:o=>Vw(o,n)}),earlyReturn:n==="protocol"?i:void 0}:{handler:r,earlyReturn:i})},RH=(e,t)=>{var n;if(!e||typeof e!="string")return e;let r=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,i=NH(t),o=((n=t?.handlers)!=null?n:[]).map(c=>{var f;return{handler:Bw(Pw({},c),{priority:(f=c.priority)!=null?f:mn.DEFAULT}),earlyReturn:void 0}}),l=[...i,...o].sort((c,f)=>{var h,p;return((h=c.handler.priority)!=null?h:0)-((p=f.handler.priority)!=null?p:0)});for(let{handler:c,earlyReturn:f}of l)if(r=c.handle(r),f!=null&&f(r))return r;return r},OH=RH;const LH=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,IH=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,DH={};function VT(e,t){return(DH.jsx?IH:LH).test(e)}const MH=/[ \t\n\f\r]/g;function xd(e){return typeof e=="object"?e.type==="text"?GT(e.value):!1:GT(e)}function GT(e){return e.replace(MH,"")===""}var Xs={},Np,qT;function PH(){if(qT)return Np;qT=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,c=/^\s+|\s+$/g,f=`
|
|
88
|
+
`,h="/",p="*",m="",E="comment",y="declaration";function T(C,w){if(typeof C!="string")throw new TypeError("First argument must be a string");if(!C)return[];w=w||{};var k=1,N=1;function M(ue){var re=ue.match(t);re&&(k+=re.length);var j=ue.lastIndexOf(f);N=~j?ue.length-j:N+ue.length}function U(){var ue={line:k,column:N};return function(re){return re.position=new P(ue),ie(),re}}function P(ue){this.start=ue,this.end={line:k,column:N},this.source=w.source}P.prototype.content=C;function V(ue){var re=new Error(w.source+":"+k+":"+N+": "+ue);if(re.reason=ue,re.filename=w.source,re.line=k,re.column=N,re.source=C,!w.silent)throw re}function G(ue){var re=ue.exec(C);if(re){var j=re[0];return M(j),C=C.slice(j.length),re}}function ie(){G(n)}function $(ue){var re;for(ue=ue||[];re=X();)re!==!1&&ue.push(re);return ue}function X(){var ue=U();if(!(h!=C.charAt(0)||p!=C.charAt(1))){for(var re=2;m!=C.charAt(re)&&(p!=C.charAt(re)||h!=C.charAt(re+1));)++re;if(re+=2,m===C.charAt(re-1))return V("End of comment missing");var j=C.slice(2,re-2);return N+=2,M(j),C=C.slice(re),N+=2,ue({type:E,comment:j})}}function J(){var ue=U(),re=G(r);if(re){if(X(),!G(i))return V("property missing ':'");var j=G(o),ee=ue({type:y,property:S(re[0].replace(e,m)),value:j?S(j[0].replace(e,m)):m});return G(l),ee}}function he(){var ue=[];$(ue);for(var re;re=J();)re!==!1&&(ue.push(re),$(ue));return ue}return ie(),he()}function S(C){return C?C.replace(c,m):m}return Np=T,Np}var YT;function BH(){if(YT)return Xs;YT=1;var e=Xs&&Xs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Xs,"__esModule",{value:!0}),Xs.default=n;const t=e(PH());function n(r,i){let o=null;if(!r||typeof r!="string")return o;const l=(0,t.default)(r),c=typeof i=="function";return l.forEach(f=>{if(f.type!=="declaration")return;const{property:h,value:p}=f;c?i(h,p,f):p&&(o=o||{},o[h]=p)}),o}return Xs}var Sl={},XT;function jH(){if(XT)return Sl;XT=1,Object.defineProperty(Sl,"__esModule",{value:!0}),Sl.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,o=function(h){return!h||n.test(h)||e.test(h)},l=function(h,p){return p.toUpperCase()},c=function(h,p){return"".concat(p,"-")},f=function(h,p){return p===void 0&&(p={}),o(h)?h:(h=h.toLowerCase(),p.reactCompat?h=h.replace(i,c):h=h.replace(r,c),h.replace(t,l))};return Sl.camelCase=f,Sl}var Al,QT;function UH(){if(QT)return Al;QT=1;var e=Al&&Al.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(BH()),n=jH();function r(i,o){var l={};return!i||typeof i!="string"||(0,t.default)(i,function(c,f){c&&f&&(l[(0,n.camelCase)(c,o)]=f)}),l}return r.default=r,Al=r,Al}var HH=UH();const zH=og(HH);function Fl(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?WT(e.position):"start"in e||"end"in e?WT(e):"line"in e||"column"in e?k0(e):""}function k0(e){return KT(e&&e.line)+":"+KT(e&&e.column)}function WT(e){return k0(e&&e.start)+"-"+k0(e&&e.end)}function KT(e){return e&&typeof e=="number"?e:1}class cn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},l=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(l=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const f=r.indexOf(":");f===-1?o.ruleId=r:(o.source=r.slice(0,f),o.ruleId=r.slice(f+1))}if(!o.place&&o.ancestors&&o.ancestors){const f=o.ancestors[o.ancestors.length-1];f&&(o.place=f.position)}const c=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=c?c.line:void 0,this.name=Fl(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=l&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}cn.prototype.file="";cn.prototype.name="";cn.prototype.reason="";cn.prototype.message="";cn.prototype.stack="";cn.prototype.column=void 0;cn.prototype.line=void 0;cn.prototype.ancestors=void 0;cn.prototype.cause=void 0;cn.prototype.fatal=void 0;cn.prototype.place=void 0;cn.prototype.ruleId=void 0;cn.prototype.source=void 0;const l1={}.hasOwnProperty,FH=new Map,$H=/[A-Z]/g,VH=new Set(["table","tbody","thead","tfoot","tr"]),GH=new Set(["td","th"]),Gw="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function qH(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=ez(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=JH(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"?Br:bo,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=qw(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function qw(e,t,n){if(t.type==="element")return YH(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return XH(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return WH(e,t,n);if(t.type==="mdxjsEsm")return QH(e,t);if(t.type==="root")return KH(e,t,n);if(t.type==="text")return ZH(e,t)}function YH(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Br,e.schema=i),e.ancestors.push(t);const o=Xw(e,t.tagName,!1),l=tz(e,t);let c=c1(e,t);return VH.has(t.tagName)&&(c=c.filter(function(f){return typeof f=="string"?!xd(f):!0})),Yw(e,l,o,t),u1(l,c),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function XH(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)}Wl(e,t.position)}function QH(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Wl(e,t.position)}function WH(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Br,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:Xw(e,t.name,!0),l=nz(e,t),c=c1(e,t);return Yw(e,l,o,t),u1(l,c),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function KH(e,t,n){const r={};return u1(r,c1(e,t)),e.create(t,e.Fragment,r,n)}function ZH(e,t){return t.value}function Yw(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function u1(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function JH(e,t,n){return r;function r(i,o,l,c){const h=Array.isArray(l.children)?n:t;return c?h(o,l,c):h(o,l)}}function ez(e,t){return n;function n(r,i,o,l){const c=Array.isArray(o.children),f=jr(r);return t(i,o,l,c,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function tz(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&l1.call(t.properties,i)){const o=rz(e,i,t.properties[i]);if(o){const[l,c]=o;e.tableCellAlignToStyle&&l==="align"&&typeof c=="string"&&GH.has(t.tagName)?r=c:n[l]=c}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function nz(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const l=o.expression;l.type;const c=l.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else Wl(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const c=r.value.data.estree.body[0];c.type,o=e.evaluater.evaluateExpression(c.expression)}else Wl(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function c1(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:FH;for(;++r<t.children.length;){const o=t.children[r];let l;if(e.passKeys){const f=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(f){const h=i.get(f)||0;l=f+"-"+h,i.set(f,h+1)}}const c=qw(e,o,l);c!==void 0&&n.push(c)}return n}function rz(e,t,n){const r=lu(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Gg(n):qg(n)),r.property==="style"){let i=typeof n=="object"?n:az(e,String(n));return e.stylePropertyNameCase==="css"&&(i=iz(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?bM[r.property]||r.property:r.attribute,n]}}function az(e,t){try{return zH(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new cn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Gw+"#cannot-parse-style-attribute",i}}function Xw(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,l;for(;++o<i.length;){const c=VT(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};l=l?{type:"MemberExpression",object:l,property:c,computed:!!(o&&c.type==="Literal"),optional:!1}:c}r=l}else r=VT(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return l1.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Wl(e)}function Wl(e,t){const n=new cn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Gw+"#cannot-handle-mdx-estrees-without-createevaluater",n}function iz(e){const t={};let n;for(n in e)l1.call(e,n)&&(t[sz(n)]=e[n]);return t}function sz(e){let t=e.replace($H,oz);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function oz(e){return"-"+e.toLowerCase()}const Rp={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"]},lz={tokenize:uz};function uz(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),et(e,t,"linePrefix")}function i(c){return e.enter("paragraph"),o(c)}function o(c){const f=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=f),n=f,l(c)}function l(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return Re(c)?(e.consume(c),e.exit("chunkText"),o):(e.consume(c),l)}}const cz={tokenize:fz},ZT={tokenize:dz};function fz(e){const t=this,n=[];let r=0,i,o,l;return c;function c(N){if(r<n.length){const M=n[r];return t.containerState=M[1],e.attempt(M[0].continuation,f,h)(N)}return h(N)}function f(N){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&k();const M=t.events.length;let U=M,P;for(;U--;)if(t.events[U][0]==="exit"&&t.events[U][1].type==="chunkFlow"){P=t.events[U][1].end;break}w(r);let V=M;for(;V<t.events.length;)t.events[V][1].end={...P},V++;return $n(t.events,U+1,0,t.events.slice(M)),t.events.length=V,h(N)}return c(N)}function h(N){if(r===n.length){if(!i)return E(N);if(i.currentConstruct&&i.currentConstruct.concrete)return T(N);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(ZT,p,m)(N)}function p(N){return i&&k(),w(r),E(N)}function m(N){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,T(N)}function E(N){return t.containerState={},e.attempt(ZT,y,T)(N)}function y(N){return r++,n.push([t.currentConstruct,t.containerState]),E(N)}function T(N){if(N===null){i&&k(),w(0),e.consume(N);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),S(N)}function S(N){if(N===null){C(e.exit("chunkFlow"),!0),w(0),e.consume(N);return}return Re(N)?(e.consume(N),C(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(N),S)}function C(N,M){const U=t.sliceStream(N);if(M&&U.push(null),N.previous=o,o&&(o.next=N),o=N,i.defineSkip(N.start),i.write(U),t.parser.lazy[N.start.line]){let P=i.events.length;for(;P--;)if(i.events[P][1].start.offset<l&&(!i.events[P][1].end||i.events[P][1].end.offset>l))return;const V=t.events.length;let G=V,ie,$;for(;G--;)if(t.events[G][0]==="exit"&&t.events[G][1].type==="chunkFlow"){if(ie){$=t.events[G][1].end;break}ie=!0}for(w(r),P=V;P<t.events.length;)t.events[P][1].end={...$},P++;$n(t.events,G+1,0,t.events.slice(V)),t.events.length=P}}function w(N){let M=n.length;for(;M-- >N;){const U=n[M];t.containerState=U[1],U[0].exit.call(t,e)}n.length=N}function k(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function dz(e,t,n){return et(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const hz={tokenize:mz};function mz(e){const t=this,n=e.attempt(du,r,e.attempt(this.parser.constructs.flowInitial,i,et(e,e.attempt(this.parser.constructs.flow,i,e.attempt(aj,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 pz={resolveAll:Ww()},gz=Qw("string"),bz=Qw("text");function Qw(e){return{resolveAll:Ww(e==="text"?Ez:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,l,c);return l;function l(p){return h(p)?o(p):c(p)}function c(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),f}function f(p){return h(p)?(n.exit("data"),o(p)):(n.consume(p),f)}function h(p){if(p===null)return!0;const m=i[p];let E=-1;if(m)for(;++E<m.length;){const y=m[E];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function Ww(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 Ez(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,l=-1,c=0,f;for(;o--;){const h=i[o];if(typeof h=="string"){for(l=h.length;h.charCodeAt(l-1)===32;)c++,l--;if(l)break;l=-1}else if(h===-2)f=!0,c++;else if(h!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const h={type:n===e.length||f||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?l:r.start._bufferIndex+l,_index:r.start._index+o,line:r.end.line,column:r.end.column-c,offset:r.end.offset-c},end:{...r.end}};r.end={...h.start},r.start.offset===r.end.offset?Object.assign(r,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const yz={42:Nn,43:Nn,45:Nn,48:Nn,49:Nn,50:Nn,51:Nn,52:Nn,53:Nn,54:Nn,55:Nn,56:Nn,57:Nn,62:Nw},_z={91:uj},xz={[-2]:Cp,[-1]:Cp,32:Cp},Tz={35:pj,42:hf,45:[BT,hf],60:yj,61:BT,95:hf,96:MT,126:MT},vz={38:Ow,92:Rw},Sz={[-5]:wp,[-4]:wp,[-3]:wp,33:Bj,38:Ow,42:w0,60:[U7,Cj],91:Uj,92:[hj,Rw],93:i1,95:w0,96:Z7},Az={null:[w0,pz]},Cz={null:[42,95]},wz={null:[]},kz=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Cz,contentInitial:_z,disable:wz,document:yz,flow:Tz,flowInitial:xz,insideSpan:Az,string:vz,text:Sz},Symbol.toStringTag,{value:"Module"}));function Nz(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let l=[],c=[];const f={attempt:V(U),check:V(P),consume:k,enter:N,exit:M,interrupt:V(P,{interrupt:!0})},h={code:null,containerState:{},defineSkip:S,events:[],now:T,parser:e,previous:null,sliceSerialize:E,sliceStream:y,write:m};let p=t.tokenize.call(h,f);return t.resolveAll&&o.push(t),h;function m(X){return l=rr(l,X),C(),l[l.length-1]!==null?[]:(G(t,0),h.events=yd(o,h.events,h),h.events)}function E(X,J){return Oz(y(X),J)}function y(X){return Rz(l,X)}function T(){const{_bufferIndex:X,_index:J,line:he,column:ue,offset:re}=r;return{_bufferIndex:X,_index:J,line:he,column:ue,offset:re}}function S(X){i[X.line]=X.column,$()}function C(){let X;for(;r._index<l.length;){const J=l[r._index];if(typeof J=="string")for(X=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===X&&r._bufferIndex<J.length;)w(J.charCodeAt(r._bufferIndex));else w(J)}}function w(X){p=p(X)}function k(X){Re(X)?(r.line++,r.column=1,r.offset+=X===-3?2:1,$()):X!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),h.previous=X}function N(X,J){const he=J||{};return he.type=X,he.start=T(),h.events.push(["enter",he,h]),c.push(he),he}function M(X){const J=c.pop();return J.end=T(),h.events.push(["exit",J,h]),J}function U(X,J){G(X,J.from)}function P(X,J){J.restore()}function V(X,J){return he;function he(ue,re,j){let ee,ce,xe,O;return Array.isArray(ue)?te(ue):"tokenize"in ue?te([ue]):z(ue);function z(ye){return be;function be(ke){const Te=ke!==null&&ye[ke],De=ke!==null&&ye.null,je=[...Array.isArray(Te)?Te:Te?[Te]:[],...Array.isArray(De)?De:De?[De]:[]];return te(je)(ke)}}function te(ye){return ee=ye,ce=0,ye.length===0?j:D(ye[ce])}function D(ye){return be;function be(ke){return O=ie(),xe=ye,ye.partial||(h.currentConstruct=ye),ye.name&&h.parser.constructs.disable.null.includes(ye.name)?Ee():ye.tokenize.call(J?Object.assign(Object.create(h),J):h,f,ge,Ee)(ke)}}function ge(ye){return X(xe,O),re}function Ee(ye){return O.restore(),++ce<ee.length?D(ee[ce]):j}}}function G(X,J){X.resolveAll&&!o.includes(X)&&o.push(X),X.resolve&&$n(h.events,J,h.events.length-J,X.resolve(h.events.slice(J),h)),X.resolveTo&&(h.events=X.resolveTo(h.events,h))}function ie(){const X=T(),J=h.previous,he=h.currentConstruct,ue=h.events.length,re=Array.from(c);return{from:ue,restore:j};function j(){r=X,h.previous=J,h.currentConstruct=he,h.events.length=ue,c=re,$()}}function $(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Rz(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let l;if(n===i)l=[e[n].slice(r,o)];else{if(l=e.slice(n,i),r>-1){const c=l[0];typeof c=="string"?l[0]=c.slice(r):l.shift()}o>0&&l.push(e[i].slice(0,o))}return l}function Oz(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let l;if(typeof o=="string")l=o;else switch(o){case-5:{l="\r";break}case-4:{l=`
|
|
89
|
+
`;break}case-3:{l=`\r
|
|
90
|
+
`;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&i)continue;l=" ";break}default:l=String.fromCharCode(o)}i=o===-2,r.push(l)}return r.join("")}function Lz(e){const r={constructs:_w([kz,...(e||{}).extensions||[]]),content:i(lz),defined:[],document:i(cz),flow:i(hz),lazy:{},string:i(gz),text:i(bz)};return r;function i(o){return l;function l(c){return Nz(r,o,c)}}}function Iz(e){for(;!Lw(e););return e}const JT=/[\0\t\n\r]/g;function Dz(){let e=1,t="",n=!0,r;return i;function i(o,l,c){const f=[];let h,p,m,E,y;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(l||void 0).decode(o)),m=0,t="",n&&(o.charCodeAt(0)===65279&&m++,n=void 0);m<o.length;){if(JT.lastIndex=m,h=JT.exec(o),E=h&&h.index!==void 0?h.index:o.length,y=o.charCodeAt(E),!h){t=o.slice(m);break}if(y===10&&m===E&&r)f.push(-3),r=void 0;else switch(r&&(f.push(-5),r=void 0),m<E&&(f.push(o.slice(m,E)),e+=E-m),y){case 0:{f.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,f.push(-2);e++<p;)f.push(-1);break}case 10:{f.push(-4),e=1;break}default:r=!0,e=1}m=E+1}return c&&(r&&f.push(-5),t&&f.push(t),f.push(null)),f}}const Kw={}.hasOwnProperty;function Mz(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),Pz(n)(Iz(Lz(n).document().write(Dz()(e,t,!0))))}function Pz(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(st),autolinkProtocol:ie,autolinkEmail:ie,atxHeading:o(On),blockQuote:o(De),characterEscape:ie,characterReference:ie,codeFenced:o(je),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(je,l),codeText:o(Je,l),codeTextData:ie,data:ie,codeFlowValue:ie,definition:o(kt),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o(it),hardBreakEscape:o(En),hardBreakTrailing:o(En),htmlFlow:o(xr,l),htmlFlowData:ie,htmlText:o(xr,l),htmlTextData:ie,image:o(He),label:l,link:o(st),listItem:o(yn),listItemValue:E,listOrdered:o(Gt,m),listUnordered:o(Gt),paragraph:o(Hr),reference:D,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o(On),strong:o(jd),thematicBreak:o(Ud)},exit:{atxHeading:f(),atxHeadingSequence:U,autolink:f(),autolinkEmail:Te,autolinkProtocol:ke,blockQuote:f(),characterEscapeValue:$,characterReferenceMarkerHexadecimal:Ee,characterReferenceMarkerNumeric:Ee,characterReferenceValue:ye,characterReference:be,codeFenced:f(C),codeFencedFence:S,codeFencedFenceInfo:y,codeFencedFenceMeta:T,codeFlowValue:$,codeIndented:f(w),codeText:f(re),codeTextData:$,data:$,definition:f(),definitionDestinationString:M,definitionLabelString:k,definitionTitleString:N,emphasis:f(),hardBreakEscape:f(J),hardBreakTrailing:f(J),htmlFlow:f(he),htmlFlowData:$,htmlText:f(ue),htmlTextData:$,image:f(ee),label:xe,labelText:ce,lineEnding:X,link:f(j),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:ge,resourceDestinationString:O,resourceTitleString:z,resource:te,setextHeading:f(G),setextHeadingLineSequence:V,setextHeadingText:P,strong:f(),thematicBreak:f()}};Zw(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(oe){let _e={type:"root",children:[]};const Le={stack:[_e],tokenStack:[],config:t,enter:c,exit:h,buffer:l,resume:p,data:n},Ve=[];let ot=-1;for(;++ot<oe.length;)if(oe[ot][1].type==="listOrdered"||oe[ot][1].type==="listUnordered")if(oe[ot][0]==="enter")Ve.push(ot);else{const Ln=Ve.pop();ot=i(oe,Ln,ot)}for(ot=-1;++ot<oe.length;){const Ln=t[oe[ot][0]];Kw.call(Ln,oe[ot][1].type)&&Ln[oe[ot][1].type].call(Object.assign({sliceSerialize:oe[ot][2].sliceSerialize},Le),oe[ot][1])}if(Le.tokenStack.length>0){const Ln=Le.tokenStack[Le.tokenStack.length-1];(Ln[1]||ev).call(Le,void 0,Ln[0])}for(_e.position={start:Va(oe.length>0?oe[0][1].start:{line:1,column:1,offset:0}),end:Va(oe.length>0?oe[oe.length-2][1].end:{line:1,column:1,offset:0})},ot=-1;++ot<t.transforms.length;)_e=t.transforms[ot](_e)||_e;return _e}function i(oe,_e,Le){let Ve=_e-1,ot=-1,Ln=!1,zr,dn,jt,_n;for(;++Ve<=Le;){const pt=oe[Ve];switch(pt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{pt[0]==="enter"?ot++:ot--,_n=void 0;break}case"lineEndingBlank":{pt[0]==="enter"&&(zr&&!_n&&!ot&&!jt&&(jt=Ve),_n=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:_n=void 0}if(!ot&&pt[0]==="enter"&&pt[1].type==="listItemPrefix"||ot===-1&&pt[0]==="exit"&&(pt[1].type==="listUnordered"||pt[1].type==="listOrdered")){if(zr){let Ea=Ve;for(dn=void 0;Ea--;){const or=oe[Ea];if(or[1].type==="lineEnding"||or[1].type==="lineEndingBlank"){if(or[0]==="exit")continue;dn&&(oe[dn][1].type="lineEndingBlank",Ln=!0),or[1].type="lineEnding",dn=Ea}else if(!(or[1].type==="linePrefix"||or[1].type==="blockQuotePrefix"||or[1].type==="blockQuotePrefixWhitespace"||or[1].type==="blockQuoteMarker"||or[1].type==="listItemIndent"))break}jt&&(!dn||jt<dn)&&(zr._spread=!0),zr.end=Object.assign({},dn?oe[dn][1].start:pt[1].end),oe.splice(dn||Ve,0,["exit",zr,pt[2]]),Ve++,Le++}if(pt[1].type==="listItemPrefix"){const Ea={type:"listItem",_spread:!1,start:Object.assign({},pt[1].start),end:void 0};zr=Ea,oe.splice(Ve,0,["enter",Ea,pt[2]]),Ve++,Le++,jt=void 0,_n=!0}}}return oe[_e][1]._spread=Ln,Le}function o(oe,_e){return Le;function Le(Ve){c.call(this,oe(Ve),Ve),_e&&_e.call(this,Ve)}}function l(){this.stack.push({type:"fragment",children:[]})}function c(oe,_e,Le){this.stack[this.stack.length-1].children.push(oe),this.stack.push(oe),this.tokenStack.push([_e,Le||void 0]),oe.position={start:Va(_e.start),end:void 0}}function f(oe){return _e;function _e(Le){oe&&oe.call(this,Le),h.call(this,Le)}}function h(oe,_e){const Le=this.stack.pop(),Ve=this.tokenStack.pop();if(Ve)Ve[0].type!==oe.type&&(_e?_e.call(this,oe,Ve[0]):(Ve[1]||ev).call(this,oe,Ve[0]));else throw new Error("Cannot close `"+oe.type+"` ("+Fl({start:oe.start,end:oe.end})+"): it’s not open");Le.position.end=Va(oe.end)}function p(){return t1(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function E(oe){if(this.data.expectingFirstListItemValue){const _e=this.stack[this.stack.length-2];_e.start=Number.parseInt(this.sliceSerialize(oe),10),this.data.expectingFirstListItemValue=void 0}}function y(){const oe=this.resume(),_e=this.stack[this.stack.length-1];_e.lang=oe}function T(){const oe=this.resume(),_e=this.stack[this.stack.length-1];_e.meta=oe}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const oe=this.resume(),_e=this.stack[this.stack.length-1];_e.value=oe.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function w(){const oe=this.resume(),_e=this.stack[this.stack.length-1];_e.value=oe.replace(/(\r?\n|\r)$/g,"")}function k(oe){const _e=this.resume(),Le=this.stack[this.stack.length-1];Le.label=_e,Le.identifier=mr(this.sliceSerialize(oe)).toLowerCase()}function N(){const oe=this.resume(),_e=this.stack[this.stack.length-1];_e.title=oe}function M(){const oe=this.resume(),_e=this.stack[this.stack.length-1];_e.url=oe}function U(oe){const _e=this.stack[this.stack.length-1];if(!_e.depth){const Le=this.sliceSerialize(oe).length;_e.depth=Le}}function P(){this.data.setextHeadingSlurpLineEnding=!0}function V(oe){const _e=this.stack[this.stack.length-1];_e.depth=this.sliceSerialize(oe).codePointAt(0)===61?1:2}function G(){this.data.setextHeadingSlurpLineEnding=void 0}function ie(oe){const Le=this.stack[this.stack.length-1].children;let Ve=Le[Le.length-1];(!Ve||Ve.type!=="text")&&(Ve=fn(),Ve.position={start:Va(oe.start),end:void 0},Le.push(Ve)),this.stack.push(Ve)}function $(oe){const _e=this.stack.pop();_e.value+=this.sliceSerialize(oe),_e.position.end=Va(oe.end)}function X(oe){const _e=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Le=_e.children[_e.children.length-1];Le.position.end=Va(oe.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(_e.type)&&(ie.call(this,oe),$.call(this,oe))}function J(){this.data.atHardBreak=!0}function he(){const oe=this.resume(),_e=this.stack[this.stack.length-1];_e.value=oe}function ue(){const oe=this.resume(),_e=this.stack[this.stack.length-1];_e.value=oe}function re(){const oe=this.resume(),_e=this.stack[this.stack.length-1];_e.value=oe}function j(){const oe=this.stack[this.stack.length-1];if(this.data.inReference){const _e=this.data.referenceType||"shortcut";oe.type+="Reference",oe.referenceType=_e,delete oe.url,delete oe.title}else delete oe.identifier,delete oe.label;this.data.referenceType=void 0}function ee(){const oe=this.stack[this.stack.length-1];if(this.data.inReference){const _e=this.data.referenceType||"shortcut";oe.type+="Reference",oe.referenceType=_e,delete oe.url,delete oe.title}else delete oe.identifier,delete oe.label;this.data.referenceType=void 0}function ce(oe){const _e=this.sliceSerialize(oe),Le=this.stack[this.stack.length-2];Le.label=u7(_e),Le.identifier=mr(_e).toLowerCase()}function xe(){const oe=this.stack[this.stack.length-1],_e=this.resume(),Le=this.stack[this.stack.length-1];if(this.data.inReference=!0,Le.type==="link"){const Ve=oe.children;Le.children=Ve}else Le.alt=_e}function O(){const oe=this.resume(),_e=this.stack[this.stack.length-1];_e.url=oe}function z(){const oe=this.resume(),_e=this.stack[this.stack.length-1];_e.title=oe}function te(){this.data.inReference=void 0}function D(){this.data.referenceType="collapsed"}function ge(oe){const _e=this.resume(),Le=this.stack[this.stack.length-1];Le.label=_e,Le.identifier=mr(this.sliceSerialize(oe)).toLowerCase(),this.data.referenceType="full"}function Ee(oe){this.data.characterReferenceType=oe.type}function ye(oe){const _e=this.sliceSerialize(oe),Le=this.data.characterReferenceType;let Ve;Le?(Ve=yw(_e,Le==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ve=r1(_e);const ot=this.stack[this.stack.length-1];ot.value+=Ve}function be(oe){const _e=this.stack.pop();_e.position.end=Va(oe.end)}function ke(oe){$.call(this,oe);const _e=this.stack[this.stack.length-1];_e.url=this.sliceSerialize(oe)}function Te(oe){$.call(this,oe);const _e=this.stack[this.stack.length-1];_e.url="mailto:"+this.sliceSerialize(oe)}function De(){return{type:"blockquote",children:[]}}function je(){return{type:"code",lang:null,meta:null,value:""}}function Je(){return{type:"inlineCode",value:""}}function kt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function it(){return{type:"emphasis",children:[]}}function On(){return{type:"heading",depth:0,children:[]}}function En(){return{type:"break"}}function xr(){return{type:"html",value:""}}function He(){return{type:"image",title:null,url:"",alt:null}}function st(){return{type:"link",title:null,url:"",children:[]}}function Gt(oe){return{type:"list",ordered:oe.type==="listOrdered",start:null,spread:oe._spread,children:[]}}function yn(oe){return{type:"listItem",spread:oe._spread,checked:null,children:[]}}function Hr(){return{type:"paragraph",children:[]}}function jd(){return{type:"strong",children:[]}}function fn(){return{type:"text",value:""}}function Ud(){return{type:"thematicBreak"}}}function Va(e){return{line:e.line,column:e.column,offset:e.offset}}function Zw(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Zw(e,r):Bz(e,r)}}function Bz(e,t){let n;for(n in t)if(Kw.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 ev(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Fl({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Fl({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Fl({start:t.start,end:t.end})+") is still open")}function jz(e){const t=this;t.parser=n;function n(r){return Mz(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Uz(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 Hz(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
91
|
+
`}]}function zz(e,t){const n=t.value?t.value+`
|
|
92
|
+
`:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function Fz(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function $z(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Vz(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=xo(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let l,c=e.footnoteCounts.get(r);c===void 0?(c=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=o+1,c+=1,e.footnoteCounts.set(r,c);const f={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,f);const h={type:"element",tagName:"sup",properties:{},children:[f]};return e.patch(t,h),e.applyData(t,h)}function Gz(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 qz(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Jw(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const l=i[i.length-1];return l&&l.type==="text"?l.value+=r:i.push({type:"text",value:r}),i}function Yz(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Jw(e,t);const i={src:xo(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 Xz(e,t){const n={src:xo(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 Qz(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 Wz(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Jw(e,t);const i={href:xo(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 Kz(e,t){const n={href:xo(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 Zz(e,t,n){const r=e.all(t),i=n?Jz(n):ek(t),o={},l=[];if(typeof t.checked=="boolean"){const p=r[0];let m;p&&p.type==="element"&&p.tagName==="p"?m=p:(m={type:"element",tagName:"p",properties:{},children:[]},r.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let c=-1;for(;++c<r.length;){const p=r[c];(i||c!==0||p.type!=="element"||p.tagName!=="p")&&l.push({type:"text",value:`
|
|
93
|
+
`}),p.type==="element"&&p.tagName==="p"&&!i?l.push(...p.children):l.push(p)}const f=r[r.length-1];f&&(i||f.type!=="element"||f.tagName!=="p")&&l.push({type:"text",value:`
|
|
94
|
+
`});const h={type:"element",tagName:"li",properties:o,children:l};return e.patch(t,h),e.applyData(t,h)}function Jz(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=ek(n[r])}return t}function ek(e){const t=e.spread;return t??e.children.length>1}function eF(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const l=r[i];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function tF(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function nF(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function rF(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function aF(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),i.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=jr(t.children[1]),f=bd(t.children[t.children.length-1]);c&&f&&(l.position={start:c,end:f}),i.push(l)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function iF(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,c=l?l.length:t.children.length;let f=-1;const h=[];for(;++f<c;){const m=t.children[f],E={},y=l?l[f]:void 0;y&&(E.align=y);let T={type:"element",tagName:o,properties:E,children:[]};m&&(T.children=e.all(m),e.patch(m,T),T=e.applyData(m,T)),h.push(T)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,p),e.applyData(t,p)}function sF(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const tv=9,nv=32;function oF(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(rv(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(rv(t.slice(i),i>0,!1)),o.join("")}function rv(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===tv||o===nv;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===tv||o===nv;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function lF(e,t){const n={type:"text",value:oF(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function uF(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const cF={blockquote:Uz,break:Hz,code:zz,delete:Fz,emphasis:$z,footnoteReference:Vz,heading:Gz,html:qz,imageReference:Yz,image:Xz,inlineCode:Qz,linkReference:Wz,link:Kz,listItem:Zz,list:eF,paragraph:tF,root:nF,strong:rF,table:aF,tableCell:sF,tableRow:iF,text:lF,thematicBreak:uF,toml:Yc,yaml:Yc,definition:Yc,footnoteDefinition:Yc};function Yc(){}function fF(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 dF(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function hF(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||fF,r=e.options.footnoteBackLabel||dF,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let f=-1;for(;++f<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[f]);if(!h)continue;const p=e.all(h),m=String(h.identifier).toUpperCase(),E=xo(m.toLowerCase());let y=0;const T=[],S=e.footnoteCounts.get(m);for(;S!==void 0&&++y<=S;){T.length>0&&T.push({type:"text",value:" "});let k=typeof n=="string"?n:n(f,y);typeof k=="string"&&(k={type:"text",value:k}),T.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+E+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(f,y),className:["data-footnote-backref"]},children:Array.isArray(k)?k:[k]})}const C=p[p.length-1];if(C&&C.type==="element"&&C.tagName==="p"){const k=C.children[C.children.length-1];k&&k.type==="text"?k.value+=" ":C.children.push({type:"text",value:" "}),C.children.push(...T)}else p.push(...T);const w={type:"element",tagName:"li",properties:{id:t+"fn-"+E},children:e.wrap(p,!0)};e.patch(h,w),c.push(w)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Yi(l),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
95
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
|
|
96
|
+
`}]}}const N0={}.hasOwnProperty,mF={};function pF(e,t){const n=t||mF,r=new Map,i=new Map,o=new Map,l={...cF,...n.handlers},c={all:h,applyData:bF,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:l,one:f,options:n,patch:gF,wrap:yF};return Mr(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const m=p.type==="definition"?r:i,E=String(p.identifier).toUpperCase();m.has(E)||m.set(E,p)}}),c;function f(p,m){const E=p.type,y=c.handlers[E];if(N0.call(c.handlers,E)&&y)return y(c,p,m);if(c.options.passThrough&&c.options.passThrough.includes(E)){if("children"in p){const{children:S,...C}=p,w=Yi(C);return w.children=c.all(p),w}return Yi(p)}return(c.options.unknownHandler||EF)(c,p,m)}function h(p){const m=[];if("children"in p){const E=p.children;let y=-1;for(;++y<E.length;){const T=c.one(E[y],p);if(T){if(y&&E[y-1].type==="break"&&(!Array.isArray(T)&&T.type==="text"&&(T.value=av(T.value)),!Array.isArray(T)&&T.type==="element")){const S=T.children[0];S&&S.type==="text"&&(S.value=av(S.value))}Array.isArray(T)?m.push(...T):m.push(T)}}}return m}}function gF(e,t){e.position&&(t.position=XC(e))}function bF(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const l="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:l}}n.type==="element"&&o&&Object.assign(n.properties,Yi(o)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function EF(e,t){const n=t.data||{},r="value"in t&&!(N0.call(n,"hProperties")||N0.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 yF(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
97
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
98
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
99
|
+
`}),n}function av(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function iv(e,t){const n=pF(e,t),r=n.one(e,void 0),i=hF(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
|
|
100
|
+
`},i),o}function _F(e,t){return e&&"run"in e?async function(n,r){const i=iv(n,{file:r,...t});await e.run(i,r)}:function(n,r){return iv(n,{file:r,...e||t})}}function sv(e){if(e)throw e}var Op,ov;function xF(){if(ov)return Op;ov=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},o=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var p=e.call(h,"constructor"),m=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!p&&!m)return!1;var E;for(E in h);return typeof E>"u"||e.call(h,E)},l=function(h,p){n&&p.name==="__proto__"?n(h,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):h[p.name]=p.newValue},c=function(h,p){if(p==="__proto__")if(e.call(h,p)){if(r)return r(h,p).value}else return;return h[p]};return Op=function f(){var h,p,m,E,y,T,S=arguments[0],C=1,w=arguments.length,k=!1;for(typeof S=="boolean"&&(k=S,S=arguments[1]||{},C=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});C<w;++C)if(h=arguments[C],h!=null)for(p in h)m=c(S,p),E=c(h,p),S!==E&&(k&&E&&(o(E)||(y=i(E)))?(y?(y=!1,T=m&&i(m)?m:[]):T=m&&o(m)?m:{},l(S,{name:p,newValue:f(k,T,E)})):typeof E<"u"&&l(S,{name:p,newValue:E}));return S},Op}var TF=xF();const Lp=og(TF);function R0(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 vF(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const l=i.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);c(null,...i);function c(f,...h){const p=e[++o];let m=-1;if(f){l(f);return}for(;++m<i.length;)(h[m]===null||h[m]===void 0)&&(h[m]=i[m]);i=h,p?SF(p,c)(...h):l(null,...h)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function SF(e,t){let n;return r;function r(...l){const c=e.length>l.length;let f;c&&l.push(i);try{f=e.apply(this,l)}catch(h){const p=h;if(c&&n)throw p;return i(p)}c||(f&&f.then&&typeof f.then=="function"?f.then(o,i):f instanceof Error?i(f):o(f))}function i(l,...c){n||(n=!0,t(l,...c))}function o(l){i(null,l)}}const Rr={basename:AF,dirname:CF,extname:wF,join:kF,sep:"/"};function AF(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');hu(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,c=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else l<0&&(o=!0,l=i+1),c>-1&&(e.codePointAt(i)===t.codePointAt(c--)?c<0&&(r=i):(c=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function CF(e){if(hu(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 wF(e){hu(e);let t=e.length,n=-1,r=0,i=-1,o=0,l;for(;t--;){const c=e.codePointAt(t);if(c===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),c===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function kF(...e){let t=-1,n;for(;++t<e.length;)hu(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":NF(n)}function NF(e){hu(e);const t=e.codePointAt(0)===47;let n=RF(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function RF(e,t){let n="",r=0,i=-1,o=0,l=-1,c,f;for(;++l<=e.length;){if(l<e.length)c=e.codePointAt(l);else{if(c===47)break;c=47}if(c===47){if(!(i===l-1||o===1))if(i!==l-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(f=n.lastIndexOf("/"),f!==n.length-1){f<0?(n="",r=0):(n=n.slice(0,f),r=n.length-1-n.lastIndexOf("/")),i=l,o=0;continue}}else if(n.length>0){n="",r=0,i=l,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,l):n=e.slice(i+1,l),r=l-i-1;i=l,o=0}else c===46&&o>-1?o++:o=-1}return n}function hu(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const OF={cwd:LF};function LF(){return"/"}function O0(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function IF(e){if(typeof e=="string")e=new URL(e);else if(!O0(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 DF(e)}function DF(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 Ip=["history","path","basename","stem","extname","dirname"];class MF{constructor(t){let n;t?O0(t)?n={path:t}:typeof t=="string"||PF(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":OF.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Ip.length;){const o=Ip[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)Ip.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Rr.basename(this.path):void 0}set basename(t){Mp(t,"basename"),Dp(t,"basename"),this.path=Rr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Rr.dirname(this.path):void 0}set dirname(t){lv(this.basename,"dirname"),this.path=Rr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Rr.extname(this.path):void 0}set extname(t){if(Dp(t,"extname"),lv(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=Rr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){O0(t)&&(t=IF(t)),Mp(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Rr.basename(this.path,this.extname):void 0}set stem(t){Mp(t,"stem"),Dp(t,"stem"),this.path=Rr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new cn(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Dp(e,t){if(e&&e.includes(Rr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Rr.sep+"`")}function Mp(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function lv(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function PF(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const BF=(function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),jF={}.hasOwnProperty;class f1 extends BF{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=vF()}copy(){const t=new f1;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Lp(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(jp("data",this.frozen),this.namespace[t]=n,this):jF.call(this.namespace,t)&&this.namespace[t]||void 0:t?(jp("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=Xc(t),r=this.parser||this.Parser;return Pp("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Pp("process",this.parser||this.Parser),Bp("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,l){const c=Xc(t),f=r.parse(c);r.run(f,c,function(p,m,E){if(p||!m||!E)return h(p);const y=m,T=r.stringify(y,E);zF(T)?E.value=T:E.result=T,h(p,E)});function h(p,m){p||!m?l(p):o?o(m):n(void 0,m)}}}processSync(t){let n=!1,r;return this.freeze(),Pp("processSync",this.parser||this.Parser),Bp("processSync",this.compiler||this.Compiler),this.process(t,i),cv("processSync","process",n),r;function i(o,l){n=!0,sv(o),r=l}}run(t,n,r){uv(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(l,c){const f=Xc(n);i.run(t,f,h);function h(p,m,E){const y=m||t;p?c(p):l?l(y):r(void 0,y,E)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),cv("runSync","run",r),i;function o(l,c){sv(l),i=c,r=!0}}stringify(t,n){this.freeze();const r=Xc(n),i=this.compiler||this.Compiler;return Bp("stringify",i),uv(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(jp("use",this.frozen),t!=null)if(typeof t=="function")f(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(h){if(typeof h=="function")f(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[p,...m]=h;f(p,m)}else l(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function l(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");c(h.plugins),h.settings&&(i.settings=Lp(!0,i.settings,h.settings))}function c(h){let p=-1;if(h!=null)if(Array.isArray(h))for(;++p<h.length;){const m=h[p];o(m)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function f(h,p){let m=-1,E=-1;for(;++m<r.length;)if(r[m][0]===h){E=m;break}if(E===-1)r.push([h,...p]);else if(p.length>0){let[y,...T]=p;const S=r[E][1];R0(S)&&R0(y)&&(y=Lp(!0,S,y)),r[E]=[h,y,...T]}}}}const UF=new f1().freeze();function Pp(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Bp(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function jp(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 uv(e){if(!R0(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function cv(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Xc(e){return HF(e)?e:new MF(e)}function HF(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function zF(e){return typeof e=="string"||FF(e)}function FF(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function d1(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var is=d1();function tk(e){is=e}var Bi={exec:()=>null};function tt(e,t=""){let n=typeof e=="string"?e:e.source,r={replace:(i,o)=>{let l=typeof o=="string"?o:o.source;return l=l.replace(gn.caret,"$1"),n=n.replace(i,l),r},getRegex:()=>new RegExp(n,t)};return r}var $F=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),gn={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},VF=/^(?:[ \t]*(?:\n|$))+/,GF=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,qF=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,mu=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,YF=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,h1=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,nk=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,rk=tt(nk).replace(/bull/g,h1).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),XF=tt(nk).replace(/bull/g,h1).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),m1=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,QF=/^[^\n]+/,p1=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,WF=tt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",p1).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),KF=tt(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,h1).getRegex(),Td="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",g1=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,ZF=tt("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",g1).replace("tag",Td).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ak=tt(m1).replace("hr",mu).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Td).getRegex(),JF=tt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ak).getRegex(),b1={blockquote:JF,code:GF,def:WF,fences:qF,heading:YF,hr:mu,html:ZF,lheading:rk,list:KF,newline:VF,paragraph:ak,table:Bi,text:QF},fv=tt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",mu).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Td).getRegex(),e$={...b1,lheading:XF,table:fv,paragraph:tt(m1).replace("hr",mu).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",fv).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Td).getRegex()},t$={...b1,html:tt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",g1).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Bi,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:tt(m1).replace("hr",mu).replace("heading",` *#{1,6} *[^
|
|
101
|
+
]`).replace("lheading",rk).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},n$=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,r$=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,ik=/^( {2,}|\\)\n(?!\s*$)/,a$=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,To=/[\p{P}\p{S}]/u,vd=/[\s\p{P}\p{S}]/u,E1=/[^\s\p{P}\p{S}]/u,i$=tt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,vd).getRegex(),sk=/(?!~)[\p{P}\p{S}]/u,s$=/(?!~)[\s\p{P}\p{S}]/u,o$=/(?:[^\s\p{P}\p{S}]|~)/u,l$=tt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",$F?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),ok=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,u$=tt(ok,"u").replace(/punct/g,To).getRegex(),c$=tt(ok,"u").replace(/punct/g,sk).getRegex(),lk="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",f$=tt(lk,"gu").replace(/notPunctSpace/g,E1).replace(/punctSpace/g,vd).replace(/punct/g,To).getRegex(),d$=tt(lk,"gu").replace(/notPunctSpace/g,o$).replace(/punctSpace/g,s$).replace(/punct/g,sk).getRegex(),h$=tt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,E1).replace(/punctSpace/g,vd).replace(/punct/g,To).getRegex(),m$=tt(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,To).getRegex(),p$="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",g$=tt(p$,"gu").replace(/notPunctSpace/g,E1).replace(/punctSpace/g,vd).replace(/punct/g,To).getRegex(),b$=tt(/\\(punct)/,"gu").replace(/punct/g,To).getRegex(),E$=tt(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),y$=tt(g1).replace("(?:-->|$)","-->").getRegex(),_$=tt("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",y$).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Df=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,x$=tt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",Df).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),uk=tt(/^!?\[(label)\]\[(ref)\]/).replace("label",Df).replace("ref",p1).getRegex(),ck=tt(/^!?\[(ref)\](?:\[\])?/).replace("ref",p1).getRegex(),T$=tt("reflink|nolink(?!\\()","g").replace("reflink",uk).replace("nolink",ck).getRegex(),dv=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,y1={_backpedal:Bi,anyPunctuation:b$,autolink:E$,blockSkip:l$,br:ik,code:r$,del:Bi,delLDelim:Bi,delRDelim:Bi,emStrongLDelim:u$,emStrongRDelimAst:f$,emStrongRDelimUnd:h$,escape:n$,link:x$,nolink:ck,punctuation:i$,reflink:uk,reflinkSearch:T$,tag:_$,text:a$,url:Bi},v$={...y1,link:tt(/^!?\[(label)\]\((.*?)\)/).replace("label",Df).getRegex(),reflink:tt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Df).getRegex()},L0={...y1,emStrongRDelimAst:d$,emStrongLDelim:c$,delLDelim:m$,delRDelim:g$,url:tt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",dv).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:tt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",dv).getRegex()},S$={...L0,br:tt(ik).replace("{2,}","*").getRegex(),text:tt(L0.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Qc={normal:b1,gfm:e$,pedantic:t$},Cl={normal:y1,gfm:L0,breaks:S$,pedantic:v$},A$={"&":"&","<":"<",">":">",'"':""","'":"'"},hv=e=>A$[e];function wr(e,t){if(t){if(gn.escapeTest.test(e))return e.replace(gn.escapeReplace,hv)}else if(gn.escapeTestNoEncode.test(e))return e.replace(gn.escapeReplaceNoEncode,hv);return e}function mv(e){try{e=encodeURI(e).replace(gn.percentDecode,"%")}catch{return null}return e}function pv(e,t){let n=e.replace(gn.findPipe,(o,l,c)=>{let f=!1,h=l;for(;--h>=0&&c[h]==="\\";)f=!f;return f?"|":" |"}),r=n.split(gn.splitPipe),i=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(gn.slashPipe,"|");return r}function wl(e,t,n){let r=e.length;if(r===0)return"";let i=0;for(;i<r&&e.charAt(r-i-1)===t;)i++;return e.slice(0,r-i)}function C$(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function w$(e,t=0){let n=t,r="";for(let i of e)if(i===" "){let o=4-n%4;r+=" ".repeat(o),n+=o}else r+=i,n++;return r}function gv(e,t,n,r,i){let o=t.href,l=t.title||null,c=e[1].replace(i.other.outputLinkReplace,"$1");r.state.inLink=!0;let f={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:o,title:l,text:c,tokens:r.inlineTokens(c)};return r.state.inLink=!1,f}function k$(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
|
|
102
|
+
`).map(o=>{let l=o.match(n.other.beginningSpace);if(l===null)return o;let[c]=l;return c.length>=i.length?o.slice(i.length):o}).join(`
|
|
103
|
+
`)}var Mf=class{options;rules;lexer;constructor(t){this.options=t||is}space(t){let n=this.rules.block.newline.exec(t);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(t){let n=this.rules.block.code.exec(t);if(n){let r=n[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:wl(r,`
|
|
104
|
+
`)}}}fences(t){let n=this.rules.block.fences.exec(t);if(n){let r=n[0],i=k$(r,n[3]||"",this.rules);return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):n[2],text:i}}}heading(t){let n=this.rules.block.heading.exec(t);if(n){let r=n[2].trim();if(this.rules.other.endingHash.test(r)){let i=wl(r,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(r=i.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){let n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:wl(n[0],`
|
|
105
|
+
`)}}blockquote(t){let n=this.rules.block.blockquote.exec(t);if(n){let r=wl(n[0],`
|
|
106
|
+
`).split(`
|
|
107
|
+
`),i="",o="",l=[];for(;r.length>0;){let c=!1,f=[],h;for(h=0;h<r.length;h++)if(this.rules.other.blockquoteStart.test(r[h]))f.push(r[h]),c=!0;else if(!c)f.push(r[h]);else break;r=r.slice(h);let p=f.join(`
|
|
108
|
+
`),m=p.replace(this.rules.other.blockquoteSetextReplace,`
|
|
109
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i}
|
|
110
|
+
${p}`:p,o=o?`${o}
|
|
111
|
+
${m}`:m;let E=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(m,l,!0),this.lexer.state.top=E,r.length===0)break;let y=l.at(-1);if(y?.type==="code")break;if(y?.type==="blockquote"){let T=y,S=T.raw+`
|
|
112
|
+
`+r.join(`
|
|
113
|
+
`),C=this.blockquote(S);l[l.length-1]=C,i=i.substring(0,i.length-T.raw.length)+C.raw,o=o.substring(0,o.length-T.text.length)+C.text;break}else if(y?.type==="list"){let T=y,S=T.raw+`
|
|
114
|
+
`+r.join(`
|
|
115
|
+
`),C=this.list(S);l[l.length-1]=C,i=i.substring(0,i.length-y.raw.length)+C.raw,o=o.substring(0,o.length-T.raw.length)+C.raw,r=S.substring(l.at(-1).raw.length).split(`
|
|
116
|
+
`);continue}}return{type:"blockquote",raw:i,tokens:l,text:o}}}list(t){let n=this.rules.block.list.exec(t);if(n){let r=n[1].trim(),i=r.length>1,o={type:"list",raw:"",ordered:i,start:i?+r.slice(0,-1):"",loose:!1,items:[]};r=i?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=i?r:"[*+-]");let l=this.rules.other.listItemRegex(r),c=!1;for(;t;){let h=!1,p="",m="";if(!(n=l.exec(t))||this.rules.block.hr.test(t))break;p=n[0],t=t.substring(p.length);let E=w$(n[2].split(`
|
|
117
|
+
`,1)[0],n[1].length),y=t.split(`
|
|
118
|
+
`,1)[0],T=!E.trim(),S=0;if(this.options.pedantic?(S=2,m=E.trimStart()):T?S=n[1].length+1:(S=E.search(this.rules.other.nonSpaceChar),S=S>4?1:S,m=E.slice(S),S+=n[1].length),T&&this.rules.other.blankLine.test(y)&&(p+=y+`
|
|
119
|
+
`,t=t.substring(y.length+1),h=!0),!h){let C=this.rules.other.nextBulletRegex(S),w=this.rules.other.hrRegex(S),k=this.rules.other.fencesBeginRegex(S),N=this.rules.other.headingBeginRegex(S),M=this.rules.other.htmlBeginRegex(S),U=this.rules.other.blockquoteBeginRegex(S);for(;t;){let P=t.split(`
|
|
120
|
+
`,1)[0],V;if(y=P,this.options.pedantic?(y=y.replace(this.rules.other.listReplaceNesting," "),V=y):V=y.replace(this.rules.other.tabCharGlobal," "),k.test(y)||N.test(y)||M.test(y)||U.test(y)||C.test(y)||w.test(y))break;if(V.search(this.rules.other.nonSpaceChar)>=S||!y.trim())m+=`
|
|
121
|
+
`+V.slice(S);else{if(T||E.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||k.test(E)||N.test(E)||w.test(E))break;m+=`
|
|
122
|
+
`+y}T=!y.trim(),p+=P+`
|
|
123
|
+
`,t=t.substring(P.length+1),E=V.slice(S)}}o.loose||(c?o.loose=!0:this.rules.other.doubleBlankLine.test(p)&&(c=!0)),o.items.push({type:"list_item",raw:p,task:!!this.options.gfm&&this.rules.other.listIsTask.test(m),loose:!1,text:m,tokens:[]}),o.raw+=p}let f=o.items.at(-1);if(f)f.raw=f.raw.trimEnd(),f.text=f.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let h of o.items){if(this.lexer.state.top=!1,h.tokens=this.lexer.blockTokens(h.text,[]),h.task){if(h.text=h.text.replace(this.rules.other.listReplaceTask,""),h.tokens[0]?.type==="text"||h.tokens[0]?.type==="paragraph"){h.tokens[0].raw=h.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),h.tokens[0].text=h.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let m=this.lexer.inlineQueue.length-1;m>=0;m--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[m].src)){this.lexer.inlineQueue[m].src=this.lexer.inlineQueue[m].src.replace(this.rules.other.listReplaceTask,"");break}}let p=this.rules.other.listTaskCheckbox.exec(h.raw);if(p){let m={type:"checkbox",raw:p[0]+" ",checked:p[0]!=="[ ]"};h.checked=m.checked,o.loose?h.tokens[0]&&["paragraph","text"].includes(h.tokens[0].type)&&"tokens"in h.tokens[0]&&h.tokens[0].tokens?(h.tokens[0].raw=m.raw+h.tokens[0].raw,h.tokens[0].text=m.raw+h.tokens[0].text,h.tokens[0].tokens.unshift(m)):h.tokens.unshift({type:"paragraph",raw:m.raw,text:m.raw,tokens:[m]}):h.tokens.unshift(m)}}if(!o.loose){let p=h.tokens.filter(E=>E.type==="space"),m=p.length>0&&p.some(E=>this.rules.other.anyLine.test(E.raw));o.loose=m}}if(o.loose)for(let h of o.items){h.loose=!0;for(let p of h.tokens)p.type==="text"&&(p.type="paragraph")}return o}}html(t){let n=this.rules.block.html.exec(t);if(n)return{type:"html",block:!0,raw:n[0],pre:n[1]==="pre"||n[1]==="script"||n[1]==="style",text:n[0]}}def(t){let n=this.rules.block.def.exec(t);if(n){let r=n[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=n[2]?n[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):n[3];return{type:"def",tag:r,raw:n[0],href:i,title:o}}}table(t){let n=this.rules.block.table.exec(t);if(!n||!this.rules.other.tableDelimiter.test(n[2]))return;let r=pv(n[1]),i=n[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=n[3]?.trim()?n[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
124
|
+
`):[],l={type:"table",raw:n[0],header:[],align:[],rows:[]};if(r.length===i.length){for(let c of i)this.rules.other.tableAlignRight.test(c)?l.align.push("right"):this.rules.other.tableAlignCenter.test(c)?l.align.push("center"):this.rules.other.tableAlignLeft.test(c)?l.align.push("left"):l.align.push(null);for(let c=0;c<r.length;c++)l.header.push({text:r[c],tokens:this.lexer.inline(r[c]),header:!0,align:l.align[c]});for(let c of o)l.rows.push(pv(c,l.header.length).map((f,h)=>({text:f,tokens:this.lexer.inline(f),header:!1,align:l.align[h]})));return l}}lheading(t){let n=this.rules.block.lheading.exec(t);if(n){let r=n[1].trim();return{type:"heading",raw:n[0],depth:n[2].charAt(0)==="="?1:2,text:r,tokens:this.lexer.inline(r)}}}paragraph(t){let n=this.rules.block.paragraph.exec(t);if(n){let r=n[1].charAt(n[1].length-1)===`
|
|
125
|
+
`?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:r,tokens:this.lexer.inline(r)}}}text(t){let n=this.rules.block.text.exec(t);if(n)return{type:"text",raw:n[0],text:n[0],tokens:this.lexer.inline(n[0])}}escape(t){let n=this.rules.inline.escape.exec(t);if(n)return{type:"escape",raw:n[0],text:n[1]}}tag(t){let n=this.rules.inline.tag.exec(t);if(n)return!this.lexer.state.inLink&&this.rules.other.startATag.test(n[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(t){let n=this.rules.inline.link.exec(t);if(n){let r=n[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let l=wl(r.slice(0,-1),"\\");if((r.length-l.length)%2===0)return}else{let l=C$(n[2],"()");if(l===-2)return;if(l>-1){let c=(n[0].indexOf("!")===0?5:4)+n[1].length+l;n[2]=n[2].substring(0,l),n[0]=n[0].substring(0,c).trim(),n[3]=""}}let i=n[2],o="";if(this.options.pedantic){let l=this.rules.other.pedanticHrefTitle.exec(i);l&&(i=l[1],o=l[3])}else o=n[3]?n[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?i=i.slice(1):i=i.slice(1,-1)),gv(n,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},n[0],this.lexer,this.rules)}}reflink(t,n){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let i=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=n[i.toLowerCase()];if(!o){let l=r[0].charAt(0);return{type:"text",raw:l,text:l}}return gv(r,o,r[0],this.lexer,this.rules)}}emStrong(t,n,r=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!(!i||!i[1]&&!i[2]&&!i[3]&&!i[4]||i[4]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(i[1]||i[3])||!r||this.rules.inline.punctuation.exec(r))){let o=[...i[0]].length-1,l,c,f=o,h=0,p=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(p.lastIndex=0,n=n.slice(-1*t.length+o);(i=p.exec(n))!==null;){if(l=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!l)continue;if(c=[...l].length,i[3]||i[4]){f+=c;continue}else if((i[5]||i[6])&&o%3&&!((o+c)%3)){h+=c;continue}if(f-=c,f>0)continue;c=Math.min(c,c+f+h);let m=[...i[0]][0].length,E=t.slice(0,o+i.index+m+c);if(Math.min(o,c)%2){let T=E.slice(1,-1);return{type:"em",raw:E,text:T,tokens:this.lexer.inlineTokens(T)}}let y=E.slice(2,-2);return{type:"strong",raw:E,text:y,tokens:this.lexer.inlineTokens(y)}}}}codespan(t){let n=this.rules.inline.code.exec(t);if(n){let r=n[2].replace(this.rules.other.newLineCharGlobal," "),i=this.rules.other.nonSpaceChar.test(r),o=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return i&&o&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:n[0],text:r}}}br(t){let n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t,n,r=""){let i=this.rules.inline.delLDelim.exec(t);if(i&&(!i[1]||!r||this.rules.inline.punctuation.exec(r))){let o=[...i[0]].length-1,l,c,f=o,h=this.rules.inline.delRDelim;for(h.lastIndex=0,n=n.slice(-1*t.length+o);(i=h.exec(n))!==null;){if(l=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!l||(c=[...l].length,c!==o))continue;if(i[3]||i[4]){f+=c;continue}if(f-=c,f>0)continue;c=Math.min(c,c+f);let p=[...i[0]][0].length,m=t.slice(0,o+i.index+p+c),E=m.slice(o,-o);return{type:"del",raw:m,text:E,tokens:this.lexer.inlineTokens(E)}}}}autolink(t){let n=this.rules.inline.autolink.exec(t);if(n){let r,i;return n[2]==="@"?(r=n[1],i="mailto:"+r):(r=n[1],i=r),{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}url(t){let n;if(n=this.rules.inline.url.exec(t)){let r,i;if(n[2]==="@")r=n[0],i="mailto:"+r;else{let o;do o=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])?.[0]??"";while(o!==n[0]);r=n[0],n[1]==="www."?i="http://"+n[0]:i=n[0]}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(t){let n=this.rules.inline.text.exec(t);if(n){let r=this.lexer.state.inRawBlock;return{type:"text",raw:n[0],text:n[0],escaped:r}}}},ar=class I0{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||is,this.options.tokenizer=this.options.tokenizer||new Mf,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:gn,block:Qc.normal,inline:Cl.normal};this.options.pedantic?(n.block=Qc.pedantic,n.inline=Cl.pedantic):this.options.gfm&&(n.block=Qc.gfm,this.options.breaks?n.inline=Cl.breaks:n.inline=Cl.gfm),this.tokenizer.rules=n}static get rules(){return{block:Qc,inline:Cl}}static lex(t,n){return new I0(n).lex(t)}static lexInline(t,n){return new I0(n).inlineTokens(t)}lex(t){t=t.replace(gn.carriageReturn,`
|
|
126
|
+
`),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],r=!1){for(this.tokenizer.lexer=this,this.options.pedantic&&(t=t.replace(gn.tabCharGlobal," ").replace(gn.spaceLine,""));t;){let i;if(this.options.extensions?.block?.some(l=>(i=l.call({lexer:this},t,n))?(t=t.substring(i.raw.length),n.push(i),!0):!1))continue;if(i=this.tokenizer.space(t)){t=t.substring(i.raw.length);let l=n.at(-1);i.raw.length===1&&l!==void 0?l.raw+=`
|
|
127
|
+
`:n.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length);let l=n.at(-1);l?.type==="paragraph"||l?.type==="text"?(l.raw+=(l.raw.endsWith(`
|
|
128
|
+
`)?"":`
|
|
129
|
+
`)+i.raw,l.text+=`
|
|
130
|
+
`+i.text,this.inlineQueue.at(-1).src=l.text):n.push(i);continue}if(i=this.tokenizer.fences(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.heading(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.hr(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.blockquote(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.list(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.html(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.def(t)){t=t.substring(i.raw.length);let l=n.at(-1);l?.type==="paragraph"||l?.type==="text"?(l.raw+=(l.raw.endsWith(`
|
|
131
|
+
`)?"":`
|
|
132
|
+
`)+i.raw,l.text+=`
|
|
133
|
+
`+i.raw,this.inlineQueue.at(-1).src=l.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},n.push(i));continue}if(i=this.tokenizer.table(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.lheading(t)){t=t.substring(i.raw.length),n.push(i);continue}let o=t;if(this.options.extensions?.startBlock){let l=1/0,c=t.slice(1),f;this.options.extensions.startBlock.forEach(h=>{f=h.call({lexer:this},c),typeof f=="number"&&f>=0&&(l=Math.min(l,f))}),l<1/0&&l>=0&&(o=t.substring(0,l+1))}if(this.state.top&&(i=this.tokenizer.paragraph(o))){let l=n.at(-1);r&&l?.type==="paragraph"?(l.raw+=(l.raw.endsWith(`
|
|
134
|
+
`)?"":`
|
|
135
|
+
`)+i.raw,l.text+=`
|
|
136
|
+
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):n.push(i),r=o.length!==t.length,t=t.substring(i.raw.length);continue}if(i=this.tokenizer.text(t)){t=t.substring(i.raw.length);let l=n.at(-1);l?.type==="text"?(l.raw+=(l.raw.endsWith(`
|
|
137
|
+
`)?"":`
|
|
138
|
+
`)+i.raw,l.text+=`
|
|
139
|
+
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):n.push(i);continue}if(t){let l="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){this.tokenizer.lexer=this;let r=t,i=null;if(this.tokens.links){let f=Object.keys(this.tokens.links);if(f.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(r))!==null;)f.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(r))!==null;)r=r.slice(0,i.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let o;for(;(i=this.tokenizer.rules.inline.blockSkip.exec(r))!==null;)o=i[2]?i[2].length:0,r=r.slice(0,i.index+o)+"["+"a".repeat(i[0].length-o-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r;let l=!1,c="";for(;t;){l||(c=""),l=!1;let f;if(this.options.extensions?.inline?.some(p=>(f=p.call({lexer:this},t,n))?(t=t.substring(f.raw.length),n.push(f),!0):!1))continue;if(f=this.tokenizer.escape(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.tag(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.link(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(f.raw.length);let p=n.at(-1);f.type==="text"&&p?.type==="text"?(p.raw+=f.raw,p.text+=f.text):n.push(f);continue}if(f=this.tokenizer.emStrong(t,r,c)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.codespan(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.br(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.del(t,r,c)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.autolink(t)){t=t.substring(f.raw.length),n.push(f);continue}if(!this.state.inLink&&(f=this.tokenizer.url(t))){t=t.substring(f.raw.length),n.push(f);continue}let h=t;if(this.options.extensions?.startInline){let p=1/0,m=t.slice(1),E;this.options.extensions.startInline.forEach(y=>{E=y.call({lexer:this},m),typeof E=="number"&&E>=0&&(p=Math.min(p,E))}),p<1/0&&p>=0&&(h=t.substring(0,p+1))}if(f=this.tokenizer.inlineText(h)){t=t.substring(f.raw.length),f.raw.slice(-1)!=="_"&&(c=f.raw.slice(-1)),l=!0;let p=n.at(-1);p?.type==="text"?(p.raw+=f.raw,p.text+=f.text):n.push(f);continue}if(t){let p="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(p);break}else throw new Error(p)}}return n}},Pf=class{options;parser;constructor(t){this.options=t||is}space(t){return""}code({text:t,lang:n,escaped:r}){let i=(n||"").match(gn.notSpaceStart)?.[0],o=t.replace(gn.endingNewline,"")+`
|
|
140
|
+
`;return i?'<pre><code class="language-'+wr(i)+'">'+(r?o:wr(o,!0))+`</code></pre>
|
|
141
|
+
`:"<pre><code>"+(r?o:wr(o,!0))+`</code></pre>
|
|
142
|
+
`}blockquote({tokens:t}){return`<blockquote>
|
|
143
|
+
${this.parser.parse(t)}</blockquote>
|
|
144
|
+
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:n}){return`<h${n}>${this.parser.parseInline(t)}</h${n}>
|
|
145
|
+
`}hr(t){return`<hr>
|
|
146
|
+
`}list(t){let n=t.ordered,r=t.start,i="";for(let c=0;c<t.items.length;c++){let f=t.items[c];i+=this.listitem(f)}let o=n?"ol":"ul",l=n&&r!==1?' start="'+r+'"':"";return"<"+o+l+`>
|
|
147
|
+
`+i+"</"+o+`>
|
|
148
|
+
`}listitem(t){return`<li>${this.parser.parse(t.tokens)}</li>
|
|
149
|
+
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
150
|
+
`}table(t){let n="",r="";for(let o=0;o<t.header.length;o++)r+=this.tablecell(t.header[o]);n+=this.tablerow({text:r});let i="";for(let o=0;o<t.rows.length;o++){let l=t.rows[o];r="";for(let c=0;c<l.length;c++)r+=this.tablecell(l[c]);i+=this.tablerow({text:r})}return i&&(i=`<tbody>${i}</tbody>`),`<table>
|
|
151
|
+
<thead>
|
|
152
|
+
`+n+`</thead>
|
|
153
|
+
`+i+`</table>
|
|
154
|
+
`}tablerow({text:t}){return`<tr>
|
|
155
|
+
${t}</tr>
|
|
156
|
+
`}tablecell(t){let n=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+n+`</${r}>
|
|
157
|
+
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${wr(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:n,tokens:r}){let i=this.parser.parseInline(r),o=mv(t);if(o===null)return i;t=o;let l='<a href="'+t+'"';return n&&(l+=' title="'+wr(n)+'"'),l+=">"+i+"</a>",l}image({href:t,title:n,text:r,tokens:i}){i&&(r=this.parser.parseInline(i,this.parser.textRenderer));let o=mv(t);if(o===null)return wr(r);t=o;let l=`<img src="${t}" alt="${wr(r)}"`;return n&&(l+=` title="${wr(n)}"`),l+=">",l}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:wr(t.text)}},_1=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}checkbox({raw:t}){return t}},dr=class D0{options;renderer;textRenderer;constructor(t){this.options=t||is,this.options.renderer=this.options.renderer||new Pf,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new _1}static parse(t,n){return new D0(n).parse(t)}static parseInline(t,n){return new D0(n).parseInline(t)}parse(t){this.renderer.parser=this;let n="";for(let r=0;r<t.length;r++){let i=t[r];if(this.options.extensions?.renderers?.[i.type]){let l=i,c=this.options.extensions.renderers[l.type].call({parser:this},l);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(l.type)){n+=c||"";continue}}let o=i;switch(o.type){case"space":{n+=this.renderer.space(o);break}case"hr":{n+=this.renderer.hr(o);break}case"heading":{n+=this.renderer.heading(o);break}case"code":{n+=this.renderer.code(o);break}case"table":{n+=this.renderer.table(o);break}case"blockquote":{n+=this.renderer.blockquote(o);break}case"list":{n+=this.renderer.list(o);break}case"checkbox":{n+=this.renderer.checkbox(o);break}case"html":{n+=this.renderer.html(o);break}case"def":{n+=this.renderer.def(o);break}case"paragraph":{n+=this.renderer.paragraph(o);break}case"text":{n+=this.renderer.text(o);break}default:{let l='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return n}parseInline(t,n=this.renderer){this.renderer.parser=this;let r="";for(let i=0;i<t.length;i++){let o=t[i];if(this.options.extensions?.renderers?.[o.type]){let c=this.options.extensions.renderers[o.type].call({parser:this},o);if(c!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){r+=c||"";continue}}let l=o;switch(l.type){case"escape":{r+=n.text(l);break}case"html":{r+=n.html(l);break}case"link":{r+=n.link(l);break}case"image":{r+=n.image(l);break}case"checkbox":{r+=n.checkbox(l);break}case"strong":{r+=n.strong(l);break}case"em":{r+=n.em(l);break}case"codespan":{r+=n.codespan(l);break}case"br":{r+=n.br(l);break}case"del":{r+=n.del(l);break}case"text":{r+=n.text(l);break}default:{let c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return r}},Ll=class{options;block;constructor(t){this.options=t||is}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(t=this.block){return t?ar.lex:ar.lexInline}provideParser(t=this.block){return t?dr.parse:dr.parseInline}},N$=class{defaults=d1();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=dr;Renderer=Pf;TextRenderer=_1;Lexer=ar;Tokenizer=Mf;Hooks=Ll;constructor(...t){this.use(...t)}walkTokens(t,n){let r=[];for(let i of t)switch(r=r.concat(n.call(this,i)),i.type){case"table":{let o=i;for(let l of o.header)r=r.concat(this.walkTokens(l.tokens,n));for(let l of o.rows)for(let c of l)r=r.concat(this.walkTokens(c.tokens,n));break}case"list":{let o=i;r=r.concat(this.walkTokens(o.items,n));break}default:{let o=i;this.defaults.extensions?.childTokens?.[o.type]?this.defaults.extensions.childTokens[o.type].forEach(l=>{let c=o[l].flat(1/0);r=r.concat(this.walkTokens(c,n))}):o.tokens&&(r=r.concat(this.walkTokens(o.tokens,n)))}}return r}use(...t){let n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let i={...r};if(i.async=this.defaults.async||i.async||!1,r.extensions&&(r.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let l=n.renderers[o.name];l?n.renderers[o.name]=function(...c){let f=o.renderer.apply(this,c);return f===!1&&(f=l.apply(this,c)),f}:n.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let l=n[o.level];l?l.unshift(o.tokenizer):n[o.level]=[o.tokenizer],o.start&&(o.level==="block"?n.startBlock?n.startBlock.push(o.start):n.startBlock=[o.start]:o.level==="inline"&&(n.startInline?n.startInline.push(o.start):n.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(n.childTokens[o.name]=o.childTokens)}),i.extensions=n),r.renderer){let o=this.defaults.renderer||new Pf(this.defaults);for(let l in r.renderer){if(!(l in o))throw new Error(`renderer '${l}' does not exist`);if(["options","parser"].includes(l))continue;let c=l,f=r.renderer[c],h=o[c];o[c]=(...p)=>{let m=f.apply(o,p);return m===!1&&(m=h.apply(o,p)),m||""}}i.renderer=o}if(r.tokenizer){let o=this.defaults.tokenizer||new Mf(this.defaults);for(let l in r.tokenizer){if(!(l in o))throw new Error(`tokenizer '${l}' does not exist`);if(["options","rules","lexer"].includes(l))continue;let c=l,f=r.tokenizer[c],h=o[c];o[c]=(...p)=>{let m=f.apply(o,p);return m===!1&&(m=h.apply(o,p)),m}}i.tokenizer=o}if(r.hooks){let o=this.defaults.hooks||new Ll;for(let l in r.hooks){if(!(l in o))throw new Error(`hook '${l}' does not exist`);if(["options","block"].includes(l))continue;let c=l,f=r.hooks[c],h=o[c];Ll.passThroughHooks.has(l)?o[c]=p=>{if(this.defaults.async&&Ll.passThroughHooksRespectAsync.has(l))return(async()=>{let E=await f.call(o,p);return h.call(o,E)})();let m=f.call(o,p);return h.call(o,m)}:o[c]=(...p)=>{if(this.defaults.async)return(async()=>{let E=await f.apply(o,p);return E===!1&&(E=await h.apply(o,p)),E})();let m=f.apply(o,p);return m===!1&&(m=h.apply(o,p)),m}}i.hooks=o}if(r.walkTokens){let o=this.defaults.walkTokens,l=r.walkTokens;i.walkTokens=function(c){let f=[];return f.push(l.call(this,c)),o&&(f=f.concat(o.call(this,c))),f}}this.defaults={...this.defaults,...i}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,n){return ar.lex(t,n??this.defaults)}parser(t,n){return dr.parse(t,n??this.defaults)}parseMarkdown(t){return(n,r)=>{let i={...r},o={...this.defaults,...i},l=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&i.async===!1)return l(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return l(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=t),o.async)return(async()=>{let c=o.hooks?await o.hooks.preprocess(n):n,f=await(o.hooks?await o.hooks.provideLexer(t):t?ar.lex:ar.lexInline)(c,o),h=o.hooks?await o.hooks.processAllTokens(f):f;o.walkTokens&&await Promise.all(this.walkTokens(h,o.walkTokens));let p=await(o.hooks?await o.hooks.provideParser(t):t?dr.parse:dr.parseInline)(h,o);return o.hooks?await o.hooks.postprocess(p):p})().catch(l);try{o.hooks&&(n=o.hooks.preprocess(n));let c=(o.hooks?o.hooks.provideLexer(t):t?ar.lex:ar.lexInline)(n,o);o.hooks&&(c=o.hooks.processAllTokens(c)),o.walkTokens&&this.walkTokens(c,o.walkTokens);let f=(o.hooks?o.hooks.provideParser(t):t?dr.parse:dr.parseInline)(c,o);return o.hooks&&(f=o.hooks.postprocess(f)),f}catch(c){return l(c)}}}onError(t,n){return r=>{if(r.message+=`
|
|
158
|
+
Please report this to https://github.com/markedjs/marked.`,t){let i="<p>An error occurred:</p><pre>"+wr(r.message+"",!0)+"</pre>";return n?Promise.resolve(i):i}if(n)return Promise.reject(r);throw r}}},Qi=new N$;function mt(e,t){return Qi.parse(e,t)}mt.options=mt.setOptions=function(e){return Qi.setOptions(e),mt.defaults=Qi.defaults,tk(mt.defaults),mt};mt.getDefaults=d1;mt.defaults=is;mt.use=function(...e){return Qi.use(...e),mt.defaults=Qi.defaults,tk(mt.defaults),mt};mt.walkTokens=function(e,t){return Qi.walkTokens(e,t)};mt.parseInline=Qi.parseInline;mt.Parser=dr;mt.parser=dr.parse;mt.Renderer=Pf;mt.TextRenderer=_1;mt.Lexer=ar;mt.lexer=ar.lex;mt.Tokenizer=Mf;mt.Hooks=Ll;mt.parse=mt;mt.options;mt.setOptions;mt.use;mt.walkTokens;mt.parseInline;dr.parse;ar.lex;var R$=300,O$="300px",L$=500;function I$(e={}){let{immediate:t=!1,debounceDelay:n=R$,rootMargin:r=O$,idleTimeout:i=L$}=e,[o,l]=v.useState(!1),c=v.useRef(null),f=v.useRef(null),h=v.useRef(null),p=v.useMemo(()=>y=>{let T=Date.now();return window.setTimeout(()=>{y({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-T))})},1)},[]),m=v.useMemo(()=>typeof window<"u"&&window.requestIdleCallback?(y,T)=>window.requestIdleCallback(y,T):p,[p]),E=v.useMemo(()=>typeof window<"u"&&window.cancelIdleCallback?y=>window.cancelIdleCallback(y):y=>{clearTimeout(y)},[]);return v.useEffect(()=>{if(t){l(!0);return}let y=c.current;if(!y)return;f.current&&(clearTimeout(f.current),f.current=null),h.current&&(E(h.current),h.current=null);let T=()=>{f.current&&(clearTimeout(f.current),f.current=null),h.current&&(E(h.current),h.current=null)},S=N=>{h.current=m(M=>{M.timeRemaining()>0||M.didTimeout?(l(!0),N.disconnect()):h.current=m(()=>{l(!0),N.disconnect()},{timeout:i/2})},{timeout:i})},C=N=>{T(),f.current=window.setTimeout(()=>{var M,U;let P=N.takeRecords();(P.length===0||(U=(M=P.at(-1))==null?void 0:M.isIntersecting)!=null&&U)&&S(N)},n)},w=(N,M)=>{N.isIntersecting?C(M):T()},k=new IntersectionObserver(N=>{for(let M of N)w(M,k)},{rootMargin:r,threshold:0});return k.observe(y),()=>{f.current&&clearTimeout(f.current),h.current&&E(h.current),k.disconnect()}},[t,n,r,i,E,m]),{shouldRender:o,containerRef:c}}var fk=/\s/,D$=/^\s+$/,M$=new Set(["code","pre","svg","math","annotation"]),P$=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",B$=e=>e.some(t=>P$(t)&&M$.has(t.tagName)),j$=e=>{let t=[],n="",r=!1;for(let i of e){let o=fk.test(i);o!==r&&n&&(t.push(n),n=""),n+=i,r=o}return n&&t.push(n),t},U$=e=>{let t=[],n="";for(let r of e)fk.test(r)?n+=r:(n&&(t.push(n),n=""),t.push(r));return n&&t.push(n),t},H$=(e,t,n,r,i,o)=>{let l=`--sd-animation:sd-${t};--sd-duration:${i?0:n}ms;--sd-easing:${r}`;return o&&(l+=`;--sd-delay:${o}ms`),{type:"element",tagName:"span",properties:{"data-sd-animate":!0,style:l},children:[{type:"text",value:e}]}},z$=(e,t,n,r,i)=>{let o=t.at(-1);if(!(o&&"children"in o))return;if(B$(t))return eo;let l=o,c=l.children.indexOf(e);if(c===-1)return;let f=e.value;if(!f.trim()){i.count+=f.length;return}let h=n.sep==="char"?U$(f):j$(f),p=r.prevContentLength,m=h.map(E=>{let y=i.count;if(i.count+=E.length,D$.test(E))return{type:"text",value:E};let T=p>0&&y<p,S=T?0:i.newIndex++*n.stagger;return H$(E,n.animation,n.duration,n.easing,T,S)});return l.children.splice(c,1,...m),c+m.length},F$=0;function M0(e){var t,n,r,i,o;let l={animation:(t=e?.animation)!=null?t:"fadeIn",duration:(n=e?.duration)!=null?n:150,easing:(r=e?.easing)!=null?r:"ease",sep:(i=e?.sep)!=null?i:"word",stagger:(o=e?.stagger)!=null?o:40},c={prevContentLength:0,lastRenderCharCount:0},f=F$++,h=()=>p=>{let m={count:0,newIndex:0};Ug(p,"text",(E,y)=>z$(E,y,l,c,m)),c.lastRenderCharCount=m.count,c.prevContentLength=0};return Object.defineProperty(h,"name",{value:`rehypeAnimate$${f}`}),{name:"animate",type:"animate",rehypePlugin:h,setPrevContentLength(p){c.prevContentLength=p},getLastRenderCharCount(){let p=c.lastRenderCharCount;return c.lastRenderCharCount=0,p}}}M0();var dk=v.createContext(!1),$$=()=>v.useContext(dk),x1=(...e)=>Pg(Qf(e)),V$=(e,t)=>{if(!e||!t)return t;let n=`${e}:`;return t.split(/\s+/).filter(Boolean).map(r=>r.startsWith(n)?r:`${e}:${r}`).join(" ")},G$=e=>e?(...t)=>V$(e,Pg(Qf(t))):x1,ao=(e,t,n)=>{let r=typeof t=="string"&&n.startsWith("text/csv")?"\uFEFF":"",i=typeof t=="string"?new Blob([r+t],{type:n}):t,o=URL.createObjectURL(i),l=document.createElement("a");l.href=o,l.download=e,document.body.appendChild(l),l.click(),document.body.removeChild(l),URL.revokeObjectURL(o)},P0=v.createContext(x1),$e=()=>v.useContext(P0),q$=x1("block","before:content-[counter(line)]","before:inline-block","before:[counter-increment:line]","before:w-6","before:mr-4","before:text-[13px]","before:text-right","before:text-muted-foreground/50","before:font-mono","before:select-none"),Y$=e=>{let t={};for(let n of e.split(";")){let r=n.indexOf(":");if(r>0){let i=n.slice(0,r).trim(),o=n.slice(r+1).trim();i&&o&&(t[i]=o)}}return t},X$=v.memo(({children:e,result:t,language:n,className:r,startLine:i,lineNumbers:o=!0,...l})=>{let c=$e(),f=v.useMemo(()=>c(q$),[c]),h=v.useMemo(()=>{let p={};return t.bg&&(p["--sdm-bg"]=t.bg),t.fg&&(p["--sdm-fg"]=t.fg),t.rootStyle&&Object.assign(p,Y$(t.rootStyle)),p},[t.bg,t.fg,t.rootStyle]);return _.jsx("div",{className:c(r,"overflow-x-auto rounded-md border border-border bg-background p-4 text-sm"),"data-language":n,"data-streamdown":"code-block-body",...l,children:_.jsx("pre",{className:c(r,"bg-[var(--sdm-bg,inherit]","dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit)]"),style:h,children:_.jsx("code",{className:o?c("[counter-increment:line_0] [counter-reset:line]"):void 0,style:o&&i&&i>1?{counterReset:`line ${i-1}`}:void 0,children:t.tokens.map((p,m)=>_.jsx("span",{className:o?f:void 0,children:p.length===0||p.length===1&&p[0].content===""?`
|
|
159
|
+
`:p.map((E,y)=>{let T={},S=!!E.bgColor;if(E.color&&(T["--sdm-c"]=E.color),E.bgColor&&(T["--sdm-tbg"]=E.bgColor),E.htmlStyle)for(let[C,w]of Object.entries(E.htmlStyle))C==="color"?T["--sdm-c"]=w:C==="background-color"?(T["--sdm-tbg"]=w,S=!0):T[C]=w;return _.jsx("span",{className:c("text-[var(--sdm-c,inherit)]","dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]",S&&"bg-[var(--sdm-tbg)]",S&&"dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]"),style:T,...E.htmlAttrs,children:E.content},y)})},m))})})})},(e,t)=>e.result===t.result&&e.language===t.language&&e.className===t.className&&e.startLine===t.startLine&&e.lineNumbers===t.lineNumbers),Q$=({className:e,language:t,style:n,isIncomplete:r,...i})=>{let o=$e();return _.jsx("div",{className:o("my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",e),"data-incomplete":r||void 0,"data-language":t,"data-streamdown":"code-block",style:{contentVisibility:"auto",containIntrinsicSize:"auto 200px",...n},...i})},hk=v.createContext({code:""}),mk=()=>v.useContext(hk),W$=({language:e})=>{let t=$e();return _.jsx("div",{className:t("flex h-8 items-center text-muted-foreground text-xs"),"data-language":e,"data-streamdown":"code-block-header",children:_.jsx("span",{className:t("ml-1 font-mono lowercase"),children:e})})},K$=e=>{let t=e.length;for(;t>0&&e[t-1]===`
|
|
160
|
+
`;)t--;return e.slice(0,t)},Z$=v.lazy(()=>L(()=>import("./highlighted-body-OFNGDK62-CyimQElG.js"),[]).then(e=>({default:e.HighlightedCodeBlockBody}))),J$=({code:e,language:t,className:n,children:r,isIncomplete:i=!1,startLine:o,lineNumbers:l,...c})=>{let f=$e(),h=v.useMemo(()=>K$(e),[e]),p=v.useMemo(()=>({bg:"transparent",fg:"inherit",tokens:h.split(`
|
|
161
|
+
`).map(m=>[{content:m,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}),[h]);return _.jsx(hk.Provider,{value:{code:e},children:_.jsxs(Q$,{isIncomplete:i,language:t,children:[_.jsx(W$,{language:t}),r?_.jsx("div",{className:f("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:_.jsx("div",{className:f("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"code-block-actions",children:r})}):null,_.jsx(v.Suspense,{fallback:_.jsx(X$,{className:n,language:t,lineNumbers:l,result:p,startLine:o,...c}),children:_.jsx(Z$,{className:n,code:h,language:t,lineNumbers:l,raw:p,startLine:o,...c})})]})})},eV=e=>_.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:_.jsx("path",{clipRule:"evenodd",d:"M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z",fill:"currentColor",fillRule:"evenodd"})}),tV=e=>_.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:_.jsx("path",{clipRule:"evenodd",d:"M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z",fill:"currentColor",fillRule:"evenodd"})}),nV=e=>_.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:_.jsx("path",{clipRule:"evenodd",d:"M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.68342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z",fill:"currentColor",fillRule:"evenodd"})}),rV=e=>_.jsxs("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[_.jsx("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),aV=e=>_.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:_.jsx("path",{clipRule:"evenodd",d:"M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z",fill:"currentColor",fillRule:"evenodd"})}),iV=e=>_.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:_.jsx("path",{clipRule:"evenodd",d:"M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z",fill:"currentColor",fillRule:"evenodd"})}),sV=e=>_.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:_.jsx("path",{clipRule:"evenodd",d:"M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z",fill:"currentColor",fillRule:"evenodd"})}),oV=e=>_.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:_.jsx("path",{clipRule:"evenodd",d:"M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z",fill:"currentColor",fillRule:"evenodd"})}),lV=e=>_.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:_.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),uV=e=>_.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:_.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H8.25H8.875V7.125H8.25H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),Il={CheckIcon:eV,CopyIcon:tV,DownloadIcon:nV,ExternalLinkIcon:oV,Loader2Icon:rV,Maximize2Icon:aV,RotateCcwIcon:iV,XIcon:sV,ZoomInIcon:lV,ZoomOutIcon:uV},pk=v.createContext(Il),cV=(e,t)=>{if(e===t)return!0;if(!(e&&t))return e===t;let n=Object.keys(e),r=Object.keys(t);return n.length!==r.length?!1:n.every(i=>e[i]===t[i])},bv=({icons:e,children:t})=>{let n=v.useRef(e),r=v.useRef(e?{...Il,...e}:Il);cV(n.current,e)||(n.current=e,r.current=e?{...Il,...e}:Il);let i=r.current;return _.jsx(pk.Provider,{value:i,children:t})},_r=()=>v.useContext(pk),gk={copyCode:"Copy Code",downloadFile:"Download file",downloadDiagram:"Download diagram",downloadDiagramAsSvg:"Download diagram as SVG",downloadDiagramAsPng:"Download diagram as PNG",downloadDiagramAsMmd:"Download diagram as MMD",viewFullscreen:"View fullscreen",exitFullscreen:"Exit fullscreen",mermaidFormatSvg:"SVG",mermaidFormatPng:"PNG",mermaidFormatMmd:"MMD",copyTable:"Copy table",copyTableAsMarkdown:"Copy table as Markdown",copyTableAsCsv:"Copy table as CSV",copyTableAsTsv:"Copy table as TSV",downloadTable:"Download table",downloadTableAsCsv:"Download table as CSV",downloadTableAsMarkdown:"Download table as Markdown",tableFormatMarkdown:"Markdown",tableFormatCsv:"CSV",tableFormatTsv:"TSV",imageNotAvailable:"Image not available",downloadImage:"Download image",openExternalLink:"Open external link?",externalLinkWarning:"You're about to visit an external website.",close:"Close",copyLink:"Copy link",copied:"Copied",openLink:"Open link"},B0=v.createContext(gk),ba=()=>v.useContext(B0),Ev=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:i,code:o,...l})=>{let c=$e(),[f,h]=v.useState(!1),p=v.useRef(0),{code:m}=mk(),{isAnimating:E}=v.useContext(Vn),y=ba(),T=o??m,S=async()=>{var k;if(typeof window>"u"||!((k=navigator?.clipboard)!=null&&k.writeText)){t?.(new Error("Clipboard API not available"));return}try{f||(await navigator.clipboard.writeText(T),h(!0),e?.(),p.current=window.setTimeout(()=>h(!1),n))}catch(N){t?.(N)}};v.useEffect(()=>()=>{window.clearTimeout(p.current)},[]);let C=_r(),w=f?C.CheckIcon:C.CopyIcon;return _.jsx("button",{className:c("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-copy-button",disabled:E,onClick:S,title:y.copyCode,type:"button",...l,children:r??_.jsx(w,{size:14})})},yv={"1c":"1c","1c-query":"1cq",abap:"abap","actionscript-3":"as",ada:"ada",adoc:"adoc","angular-html":"html","angular-ts":"ts",apache:"conf",apex:"cls",apl:"apl",applescript:"applescript",ara:"ara",asciidoc:"adoc",asm:"asm",astro:"astro",awk:"awk",ballerina:"bal",bash:"sh",bat:"bat",batch:"bat",be:"be",beancount:"beancount",berry:"berry",bibtex:"bib",bicep:"bicep",blade:"blade.php",bsl:"bsl",c:"c","c#":"cs","c++":"cpp",cadence:"cdc",cairo:"cairo",cdc:"cdc",clarity:"clar",clj:"clj",clojure:"clj","closure-templates":"soy",cmake:"cmake",cmd:"cmd",cobol:"cob",codeowners:"CODEOWNERS",codeql:"ql",coffee:"coffee",coffeescript:"coffee","common-lisp":"lisp",console:"sh",coq:"v",cpp:"cpp",cql:"cql",crystal:"cr",cs:"cs",csharp:"cs",css:"css",csv:"csv",cue:"cue",cypher:"cql",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",docker:"dockerfile",dockerfile:"dockerfile",dotenv:"env","dream-maker":"dm",edge:"edge",elisp:"el",elixir:"ex",elm:"elm","emacs-lisp":"el",erb:"erb",erl:"erl",erlang:"erl",f:"f","f#":"fs",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"f90",f95:"f95",fennel:"fnl",fish:"fish",fluent:"ftl",for:"for","fortran-fixed-form":"f","fortran-free-form":"f90",fs:"fs",fsharp:"fs",fsl:"fsl",ftl:"ftl",gdresource:"tres",gdscript:"gd",gdshader:"gdshader",genie:"gs",gherkin:"feature","git-commit":"gitcommit","git-rebase":"gitrebase",gjs:"js",gleam:"gleam","glimmer-js":"js","glimmer-ts":"ts",glsl:"glsl",gnuplot:"plt",go:"go",gql:"gql",graphql:"graphql",groovy:"groovy",gts:"gts",hack:"hack",haml:"haml",handlebars:"hbs",haskell:"hs",haxe:"hx",hbs:"hbs",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",hs:"hs",html:"html","html-derivative":"html",http:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",jade:"jade",java:"java",javascript:"js",jinja:"jinja",jison:"jison",jl:"jl",js:"js",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",julia:"jl",kotlin:"kt",kql:"kql",kt:"kt",kts:"kts",kusto:"kql",latex:"tex",lean:"lean",lean4:"lean",less:"less",liquid:"liquid",lisp:"lisp",lit:"lit",llvm:"ll",log:"log",logo:"logo",lua:"lua",luau:"luau",make:"mak",makefile:"mak",markdown:"md",marko:"marko",matlab:"m",md:"md",mdc:"mdc",mdx:"mdx",mediawiki:"wiki",mermaid:"mmd",mips:"s",mipsasm:"s",mmd:"mmd",mojo:"mojo",move:"move",nar:"nar",narrat:"narrat",nextflow:"nf",nf:"nf",nginx:"conf",nim:"nim",nix:"nix",nu:"nu",nushell:"nu",objc:"m","objective-c":"m","objective-cpp":"mm",ocaml:"ml",pascal:"pas",perl:"pl",perl6:"p6",php:"php",plsql:"pls",po:"po",polar:"polar",postcss:"pcss",pot:"pot",potx:"potx",powerquery:"pq",powershell:"ps1",prisma:"prisma",prolog:"pl",properties:"properties",proto:"proto",protobuf:"proto",ps:"ps",ps1:"ps1",pug:"pug",puppet:"pp",purescript:"purs",py:"py",python:"py",ql:"ql",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",racket:"rkt",raku:"raku",razor:"cshtml",rb:"rb",reg:"reg",regex:"regex",regexp:"regexp",rel:"rel",riscv:"s",rs:"rs",rst:"rst",ruby:"rb",rust:"rs",sas:"sas",sass:"sass",scala:"scala",scheme:"scm",scss:"scss",sdbl:"sdbl",sh:"sh",shader:"shader",shaderlab:"shader",shell:"sh",shellscript:"sh",shellsession:"sh",smalltalk:"st",solidity:"sol",soy:"soy",sparql:"rq",spl:"spl",splunk:"spl",sql:"sql","ssh-config":"config",stata:"do",styl:"styl",stylus:"styl",svelte:"svelte",swift:"swift","system-verilog":"sv",systemd:"service",talon:"talon",talonscript:"talon",tasl:"tasl",tcl:"tcl",templ:"templ",terraform:"tf",tex:"tex",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"ts","ts-tags":"ts",tsp:"tsp",tsv:"tsv",tsx:"tsx",turtle:"ttl",twig:"twig",typ:"typ",typescript:"ts",typespec:"tsp",typst:"typ",v:"v",vala:"vala",vb:"vb",verilog:"v",vhdl:"vhdl",vim:"vim",viml:"vim",vimscript:"vim",vue:"vue","vue-html":"html","vue-vine":"vine",vy:"vy",vyper:"vy",wasm:"wasm",wenyan:"wy",wgsl:"wgsl",wiki:"wiki",wikitext:"wiki",wit:"wit",wl:"wl",wolfram:"wl",xml:"xml",xsl:"xsl",yaml:"yaml",yml:"yml",zenscript:"zs",zig:"zig",zsh:"zsh",文言:"wy"},fV=({onDownload:e,onError:t,language:n,children:r,className:i,code:o,...l})=>{let c=$e(),{code:f}=mk(),{isAnimating:h}=v.useContext(Vn),p=ba(),m=_r(),E=o??f,y=`file.${n&&n in yv?yv[n]:"txt"}`,T="text/plain",S=()=>{try{ao(y,E,T),e?.()}catch(C){t?.(C)}};return _.jsx("button",{className:c("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-download-button",disabled:h,onClick:S,title:p.downloadFile,type:"button",...l,children:r??_.jsx(m.DownloadIcon,{size:14})})},_v=()=>{let{Loader2Icon:e}=_r(),t=$e();return _.jsxs("div",{className:t("w-full divide-y divide-border overflow-hidden rounded-xl border border-border"),children:[_.jsx("div",{className:t("h-[46px] w-full bg-muted/80")}),_.jsx("div",{className:t("flex w-full items-center justify-center p-4"),children:_.jsx(e,{className:t("size-4 animate-spin")})})]})},dV=/\.[^/.]+$/,hV=({node:e,className:t,src:n,alt:r,onLoad:i,onError:o,...l})=>{let{DownloadIcon:c}=_r(),f=$e(),h=v.useRef(null),[p,m]=v.useState(!1),[E,y]=v.useState(!1),T=ba(),S=l.width!=null||l.height!=null,C=(p||S)&&!E,w=E&&!S;v.useEffect(()=>{let U=h.current;if(U!=null&&U.complete){let P=U.naturalWidth>0;m(P),y(!P)}},[]);let k=v.useCallback(U=>{m(!0),y(!1),i?.(U)},[i]),N=v.useCallback(U=>{m(!1),y(!0),o?.(U)},[o]),M=async()=>{if(n)try{let U=await(await fetch(n)).blob(),P=new URL(n,window.location.origin).pathname.split("/").pop()||"",V=P.split(".").pop(),G=P.includes(".")&&V!==void 0&&V.length<=4,ie="";if(G)ie=P;else{let $=U.type,X="png";$.includes("jpeg")||$.includes("jpg")?X="jpg":$.includes("png")?X="png":$.includes("svg")?X="svg":$.includes("gif")?X="gif":$.includes("webp")&&(X="webp"),ie=`${(r||P||"image").replace(dV,"")}.${X}`}ao(ie,U,U.type)}catch{window.open(n,"_blank")}};return n?_.jsxs("div",{className:f("group relative my-4 inline-block"),"data-streamdown":"image-wrapper",children:[_.jsx("img",{alt:r,className:f("max-w-full rounded-lg",w&&"hidden",t),"data-streamdown":"image",onError:N,onLoad:k,ref:h,src:n,...l}),w&&_.jsx("span",{className:f("text-muted-foreground text-xs italic"),"data-streamdown":"image-fallback",children:T.imageNotAvailable}),_.jsx("div",{className:f("pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block")}),C&&_.jsx("button",{className:f("absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background","opacity-0 group-hover:opacity-100"),onClick:M,title:T.downloadImage,type:"button",children:_.jsx(c,{size:14})})]}):null},$l=0,T1=()=>{$l+=1,$l===1&&(document.body.style.overflow="hidden")},v1=()=>{$l=Math.max(0,$l-1),$l===0&&(document.body.style.overflow="")},mV=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let{CheckIcon:i,CopyIcon:o,ExternalLinkIcon:l,XIcon:c}=_r(),f=$e(),[h,p]=v.useState(!1),m=ba(),E=v.useCallback(async()=>{try{await navigator.clipboard.writeText(e),p(!0),setTimeout(()=>p(!1),2e3)}catch{}},[e]),y=v.useCallback(()=>{r(),n()},[r,n]);return v.useEffect(()=>{if(t){T1();let T=S=>{S.key==="Escape"&&n()};return document.addEventListener("keydown",T),()=>{document.removeEventListener("keydown",T),v1()}}},[t,n]),t?_.jsx("div",{className:f("fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm"),"data-streamdown":"link-safety-modal",onClick:n,onKeyDown:T=>{T.key==="Escape"&&n()},role:"button",tabIndex:0,children:_.jsxs("div",{className:f("relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg"),onClick:T=>T.stopPropagation(),onKeyDown:T=>T.stopPropagation(),role:"presentation",children:[_.jsx("button",{className:f("absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:n,title:m.close,type:"button",children:_.jsx(c,{size:16})}),_.jsxs("div",{className:f("flex flex-col gap-2"),children:[_.jsxs("div",{className:f("flex items-center gap-2 font-semibold text-lg"),children:[_.jsx(l,{size:20}),_.jsx("span",{children:m.openExternalLink})]}),_.jsx("p",{className:f("text-muted-foreground text-sm"),children:m.externalLinkWarning})]}),_.jsx("div",{className:f("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),_.jsxs("div",{className:f("flex gap-2"),children:[_.jsx("button",{className:f("flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted"),onClick:E,type:"button",children:h?_.jsxs(_.Fragment,{children:[_.jsx(i,{size:14}),_.jsx("span",{children:m.copied})]}):_.jsxs(_.Fragment,{children:[_.jsx(o,{size:14}),_.jsx("span",{children:m.copyLink})]})}),_.jsxs("button",{className:f("flex flex-1 items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 font-medium text-primary-foreground text-sm transition-all hover:bg-primary/90"),onClick:y,type:"button",children:[_.jsx(l,{size:14}),_.jsx("span",{children:m.openLink})]})]})]})}):null},j0=v.createContext(null),S1=()=>v.useContext(j0),GK=()=>{var e;let t=S1();return(e=t?.code)!=null?e:null},A1=()=>{var e;let t=S1();return(e=t?.mermaid)!=null?e:null},pV=e=>{var t;let n=S1();return n!=null&&n.renderers&&e&&(t=n.renderers.find(r=>Array.isArray(r.language)?r.language.includes(e):r.language===e))!=null?t:null},gV=(e,t)=>{var n;let r=(n=void 0)!=null?n:5;return new Promise((i,o)=>{let l="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),c=new Image;c.crossOrigin="anonymous",c.onload=()=>{let f=document.createElement("canvas"),h=c.width*r,p=c.height*r;f.width=h,f.height=p;let m=f.getContext("2d");if(!m){o(new Error("Failed to create 2D canvas context for PNG export"));return}m.drawImage(c,0,0,h,p),f.toBlob(E=>{if(!E){o(new Error("Failed to create PNG blob"));return}i(E)},"image/png")},c.onerror=()=>o(new Error("Failed to load SVG image")),c.src=l})},bV=({chart:e,children:t,className:n,onDownload:r,config:i,onError:o})=>{let l=$e(),[c,f]=v.useState(!1),h=v.useRef(null),{isAnimating:p}=v.useContext(Vn),m=_r(),E=A1(),y=ba(),T=async S=>{try{if(S==="mmd"){ao("diagram.mmd",e,"text/plain"),f(!1),r?.(S);return}if(!E){o?.(new Error("Mermaid plugin not available"));return}let C=E.getMermaid(i),w=e.split("").reduce((M,U)=>(M<<5)-M+U.charCodeAt(0)|0,0),k=`mermaid-${Math.abs(w)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:N}=await C.render(k,e);if(!N){o?.(new Error("SVG not found. Please wait for the diagram to render."));return}if(S==="svg"){ao("diagram.svg",N,"image/svg+xml"),f(!1),r?.(S);return}if(S==="png"){let M=await gV(N);ao("diagram.png",M,"image/png"),r?.(S),f(!1);return}}catch(C){o?.(C)}};return v.useEffect(()=>{let S=C=>{let w=C.composedPath();h.current&&!w.includes(h.current)&&f(!1)};return document.addEventListener("mousedown",S),()=>{document.removeEventListener("mousedown",S)}},[]),_.jsxs("div",{className:l("relative"),ref:h,children:[_.jsx("button",{className:l("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),disabled:p,onClick:()=>f(!c),title:y.downloadDiagram,type:"button",children:t??_.jsx(m.DownloadIcon,{size:14})}),c?_.jsxs("div",{className:l("absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[_.jsx("button",{className:l("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>T("svg"),title:y.downloadDiagramAsSvg,type:"button",children:y.mermaidFormatSvg}),_.jsx("button",{className:l("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>T("png"),title:y.downloadDiagramAsPng,type:"button",children:y.mermaidFormatPng}),_.jsx("button",{className:l("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>T("mmd"),title:y.downloadDiagramAsMmd,type:"button",children:y.mermaidFormatMmd})]}):null]})},EV=({chart:e,config:t,onFullscreen:n,onExit:r,className:i,...o})=>{let{Maximize2Icon:l,XIcon:c}=_r(),f=$e(),[h,p]=v.useState(!1),{isAnimating:m,controls:E}=v.useContext(Vn),y=ba(),T=(()=>{if(typeof E=="boolean")return E;let C=E.mermaid;return C===!1?!1:C===!0||C===void 0?!0:C.panZoom!==!1})(),S=()=>{p(!h)};return v.useEffect(()=>{if(h){T1();let C=w=>{w.key==="Escape"&&p(!1)};return document.addEventListener("keydown",C),()=>{document.removeEventListener("keydown",C),v1()}}},[h]),v.useEffect(()=>{h?n?.():r&&r()},[h,n,r]),_.jsxs(_.Fragment,{children:[_.jsx("button",{className:f("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),disabled:m,onClick:S,title:y.viewFullscreen,type:"button",...o,children:_.jsx(l,{size:14})}),h?Ki.createPortal(_.jsxs("div",{className:f("fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm"),onClick:S,onKeyDown:C=>{C.key==="Escape"&&S()},role:"button",tabIndex:0,children:[_.jsx("button",{className:f("absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:S,title:y.exitFullscreen,type:"button",children:_.jsx(c,{size:20})}),_.jsx("div",{className:f("flex size-full items-center justify-center p-4"),onClick:C=>C.stopPropagation(),onKeyDown:C=>C.stopPropagation(),role:"presentation",children:_.jsx(Wk,{chart:e,className:f("size-full [&_svg]:h-auto [&_svg]:w-auto"),config:t,fullscreen:!0,showControls:T})})]}),document.body):null]})},bk=e=>{var t,n;let r=[],i=[],o=e.querySelectorAll("thead th");for(let c of o)r.push(((t=c.textContent)==null?void 0:t.trim())||"");let l=e.querySelectorAll("tbody tr");for(let c of l){let f=[],h=c.querySelectorAll("td");for(let p of h)f.push(((n=p.textContent)==null?void 0:n.trim())||"");i.push(f)}return{headers:r,rows:i}},Ek=e=>{let{headers:t,rows:n}=e,r=c=>{let f=!1,h=!1;for(let p of c){if(p==='"'){f=!0,h=!0;break}(p===","||p===`
|
|
162
|
+
`)&&(f=!0)}return f?h?`"${c.replace(/"/g,'""')}"`:`"${c}"`:c},i=t.length>0?n.length+1:n.length,o=new Array(i),l=0;t.length>0&&(o[l]=t.map(r).join(","),l+=1);for(let c of n)o[l]=c.map(r).join(","),l+=1;return o.join(`
|
|
163
|
+
`)},yV=e=>{let{headers:t,rows:n}=e,r=c=>{let f=!1;for(let p of c)if(p===" "||p===`
|
|
164
|
+
`||p==="\r"){f=!0;break}if(!f)return c;let h=[];for(let p of c)p===" "?h.push("\\t"):p===`
|
|
165
|
+
`?h.push("\\n"):p==="\r"?h.push("\\r"):h.push(p);return h.join("")},i=t.length>0?n.length+1:n.length,o=new Array(i),l=0;t.length>0&&(o[l]=t.map(r).join(" "),l+=1);for(let c of n)o[l]=c.map(r).join(" "),l+=1;return o.join(`
|
|
166
|
+
`)},Up=e=>{let t=!1;for(let r of e)if(r==="\\"||r==="|"){t=!0;break}if(!t)return e;let n=[];for(let r of e)r==="\\"?n.push("\\\\"):r==="|"?n.push("\\|"):n.push(r);return n.join("")},U0=e=>{let{headers:t,rows:n}=e;if(t.length===0)return"";let r=new Array(n.length+2),i=0,o=t.map(c=>Up(c));r[i]=`| ${o.join(" | ")} |`,i+=1;let l=new Array(t.length);for(let c=0;c<t.length;c+=1)l[c]="---";r[i]=`| ${l.join(" | ")} |`,i+=1;for(let c of n)if(c.length<t.length){let f=new Array(t.length);for(let h=0;h<t.length;h+=1)f[h]=h<c.length?Up(c[h]):"";r[i]=`| ${f.join(" | ")} |`,i+=1}else{let f=c.map(h=>Up(h));r[i]=`| ${f.join(" | ")} |`,i+=1}return r.join(`
|
|
167
|
+
`)},yk=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let o=$e(),[l,c]=v.useState(!1),[f,h]=v.useState(!1),p=v.useRef(null),m=v.useRef(0),{isAnimating:E}=v.useContext(Vn),y=ba(),T=async w=>{var k,N;if(typeof window>"u"||!((k=navigator?.clipboard)!=null&&k.write)){r?.(new Error("Clipboard API not available"));return}try{let M=(N=p.current)==null?void 0:N.closest('[data-streamdown="table-wrapper"]'),U=M?.querySelector("table");if(!U){r?.(new Error("Table not found"));return}let P=bk(U),V=({csv:Ek,tsv:yV,md:U0}[w]||U0)(P),G=new ClipboardItem({"text/plain":new Blob([V],{type:"text/plain"}),"text/html":new Blob([U.outerHTML],{type:"text/html"})});await navigator.clipboard.write([G]),h(!0),c(!1),n?.(w),m.current=window.setTimeout(()=>h(!1),i)}catch(M){r?.(M)}};v.useEffect(()=>{let w=k=>{let N=k.composedPath();p.current&&!N.includes(p.current)&&c(!1)};return document.addEventListener("mousedown",w),()=>{document.removeEventListener("mousedown",w),window.clearTimeout(m.current)}},[]);let S=_r(),C=f?S.CheckIcon:S.CopyIcon;return _.jsxs("div",{className:o("relative"),ref:p,children:[_.jsx("button",{className:o("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:E,onClick:()=>c(!l),title:y.copyTable,type:"button",children:e??_.jsx(C,{height:14,width:14})}),l?_.jsxs("div",{className:o("absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[_.jsx("button",{className:o("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>T("md"),title:y.copyTableAsMarkdown,type:"button",children:y.tableFormatMarkdown}),_.jsx("button",{className:o("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>T("csv"),title:y.copyTableAsCsv,type:"button",children:y.tableFormatCsv}),_.jsx("button",{className:o("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>T("tsv"),title:y.copyTableAsTsv,type:"button",children:y.tableFormatTsv})]}):null]})},_k=({children:e,className:t,onDownload:n,onError:r})=>{let i=$e(),[o,l]=v.useState(!1),c=v.useRef(null),{isAnimating:f}=v.useContext(Vn),h=ba(),p=_r(),m=E=>{var y;try{let T=(y=c.current)==null?void 0:y.closest('[data-streamdown="table-wrapper"]'),S=T?.querySelector("table");if(!S){r?.(new Error("Table not found"));return}let C=bk(S),w=E==="csv"?Ek(C):U0(C);ao(`table.${E==="csv"?"csv":"md"}`,w,E==="csv"?"text/csv":"text/markdown"),l(!1),n?.(E)}catch(T){r?.(T)}};return v.useEffect(()=>{let E=y=>{let T=y.composedPath();c.current&&!T.includes(c.current)&&l(!1)};return document.addEventListener("mousedown",E),()=>{document.removeEventListener("mousedown",E)}},[]),_.jsxs("div",{className:i("relative"),ref:c,children:[_.jsx("button",{className:i("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:f,onClick:()=>l(!o),title:h.downloadTable,type:"button",children:e??_.jsx(p.DownloadIcon,{size:14})}),o?_.jsxs("div",{className:i("absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[_.jsx("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>m("csv"),title:h.downloadTableAsCsv,type:"button",children:h.tableFormatCsv}),_.jsx("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>m("markdown"),title:h.downloadTableAsMarkdown,type:"button",children:h.tableFormatMarkdown})]}):null]})},_V=({children:e,className:t,showCopy:n=!0,showDownload:r=!0})=>{let{Maximize2Icon:i,XIcon:o}=_r(),l=$e(),[c,f]=v.useState(!1),{isAnimating:h}=v.useContext(Vn),p=ba(),m=()=>{f(!0)},E=()=>{f(!1)};return v.useEffect(()=>{if(c){T1();let y=T=>{T.key==="Escape"&&f(!1)};return document.addEventListener("keydown",y),()=>{document.removeEventListener("keydown",y),v1()}}},[c]),_.jsxs(_.Fragment,{children:[_.jsx("button",{className:l("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:h,onClick:m,title:p.viewFullscreen,type:"button",children:_.jsx(i,{size:14})}),c?Ki.createPortal(_.jsx("div",{"aria-label":p.viewFullscreen,"aria-modal":"true",className:l("fixed inset-0 z-50 flex flex-col bg-background"),"data-streamdown":"table-fullscreen",onClick:E,onKeyDown:y=>{y.key==="Escape"&&E()},role:"dialog",children:_.jsxs("div",{className:l("flex h-full flex-col"),onClick:y=>y.stopPropagation(),onKeyDown:y=>y.stopPropagation(),role:"presentation",children:[_.jsxs("div",{className:l("flex items-center justify-end gap-1 p-4"),children:[n?_.jsx(yk,{}):null,r?_.jsx(_k,{}):null,_.jsx("button",{className:l("rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:E,title:p.exitFullscreen,type:"button",children:_.jsx(o,{size:20})})]}),_.jsx("div",{className:l("flex-1 overflow-auto p-4 pt-0 [&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10"),children:_.jsx("table",{className:l("w-full border-collapse border border-border"),"data-streamdown":"table",children:e})})]})}),document.body):null]})},xV=({children:e,className:t,showControls:n,showCopy:r=!0,showDownload:i=!0,showFullscreen:o=!0,...l})=>{let c=$e(),f=n&&r,h=n&&i,p=n&&o,m=f||h||p;return _.jsxs("div",{className:c("my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2"),"data-streamdown":"table-wrapper",children:[m?_.jsxs("div",{className:c("flex items-center justify-end gap-1"),children:[f?_.jsx(yk,{}):null,h?_.jsx(_k,{}):null,p?_.jsx(_V,{showCopy:f,showDownload:h,children:e}):null]}):null,_.jsx("div",{className:c("border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background"),children:_.jsx("table",{className:c("w-full divide-y divide-border",t),"data-streamdown":"table",...l,children:e})})]})},TV=/startLine=(\d+)/,vV=/\bnoLineNumbers\b/,SV=v.lazy(()=>L(()=>Promise.resolve().then(()=>UK),void 0).then(e=>({default:e.Mermaid}))),AV=/language-([^\s]+)/;function Sd(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return!0;if(!(e!=null&&e.position&&t!=null&&t.position))return!1;let n=e.position.start,r=t.position.start,i=e.position.end,o=t.position.end;return n?.line===r?.line&&n?.column===r?.column&&i?.line===o?.line&&i?.column===o?.column}function wt(e,t){return e.className===t.className&&Sd(e.node,t.node)}var H0=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,Hp=(e,t)=>{if(typeof e=="boolean")return e;let n=e.table;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},xv=(e,t)=>{if(typeof e=="boolean")return e;let n=e.code;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},Wc=(e,t)=>{if(typeof e=="boolean")return e;let n=e.mermaid;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},C1=v.memo(({children:e,className:t,node:n,...r})=>{let i=$e();return _.jsx("ol",{className:i("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...r,children:e})},(e,t)=>wt(e,t));C1.displayName="MarkdownOl";var xk=v.memo(({children:e,className:t,node:n,...r})=>{let i=$e();return _.jsx("li",{className:i("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...r,children:e})},(e,t)=>e.className===t.className&&Sd(e.node,t.node));xk.displayName="MarkdownLi";var Tk=v.memo(({children:e,className:t,node:n,...r})=>{let i=$e();return _.jsx("ul",{className:i("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...r,children:e})},(e,t)=>wt(e,t));Tk.displayName="MarkdownUl";var vk=v.memo(({className:e,node:t,...n})=>{let r=$e();return _.jsx("hr",{className:r("my-6 border-border",e),"data-streamdown":"horizontal-rule",...n})},(e,t)=>wt(e,t));vk.displayName="MarkdownHr";var Sk=v.memo(({children:e,className:t,node:n,...r})=>{let i=$e();return _.jsx("span",{className:i("font-semibold",t),"data-streamdown":"strong",...r,children:e})},(e,t)=>wt(e,t));Sk.displayName="MarkdownStrong";var CV=({children:e,className:t,href:n,node:r,...i})=>{let o=$e(),{linkSafety:l}=v.useContext(Vn),[c,f]=v.useState(!1),h=n==="streamdown:incomplete-link",p=v.useCallback(async T=>{if(!(!(l!=null&&l.enabled&&n)||h)){if(T.preventDefault(),l.onLinkCheck&&await l.onLinkCheck(n)){window.open(n,"_blank","noreferrer");return}f(!0)}},[l,n,h]),m=v.useCallback(()=>{n&&window.open(n,"_blank","noreferrer")},[n]),E=v.useCallback(()=>{f(!1)},[]),y={url:n??"",isOpen:c,onClose:E,onConfirm:m};return l!=null&&l.enabled&&n?_.jsxs(_.Fragment,{children:[_.jsx("button",{className:o("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":h,"data-streamdown":"link",onClick:p,type:"button",children:e}),l.renderModal?l.renderModal(y):_.jsx(mV,{...y})]}):_.jsx("a",{className:o("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":h,"data-streamdown":"link",href:n,rel:"noreferrer",target:"_blank",...i,children:e})},Ak=v.memo(CV,(e,t)=>wt(e,t)&&e.href===t.href);Ak.displayName="MarkdownA";var Ck=v.memo(({children:e,className:t,node:n,...r})=>{let i=$e();return _.jsx("h1",{className:i("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...r,children:e})},(e,t)=>wt(e,t));Ck.displayName="MarkdownH1";var wk=v.memo(({children:e,className:t,node:n,...r})=>{let i=$e();return _.jsx("h2",{className:i("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...r,children:e})},(e,t)=>wt(e,t));wk.displayName="MarkdownH2";var kk=v.memo(({children:e,className:t,node:n,...r})=>{let i=$e();return _.jsx("h3",{className:i("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...r,children:e})},(e,t)=>wt(e,t));kk.displayName="MarkdownH3";var Nk=v.memo(({children:e,className:t,node:n,...r})=>{let i=$e();return _.jsx("h4",{className:i("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...r,children:e})},(e,t)=>wt(e,t));Nk.displayName="MarkdownH4";var Rk=v.memo(({children:e,className:t,node:n,...r})=>{let i=$e();return _.jsx("h5",{className:i("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...r,children:e})},(e,t)=>wt(e,t));Rk.displayName="MarkdownH5";var Ok=v.memo(({children:e,className:t,node:n,...r})=>{let i=$e();return _.jsx("h6",{className:i("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...r,children:e})},(e,t)=>wt(e,t));Ok.displayName="MarkdownH6";var Lk=v.memo(({children:e,className:t,node:n,...r})=>{let{controls:i}=v.useContext(Vn),o=H0(i,"table"),l=Hp(i,"copy"),c=Hp(i,"download"),f=Hp(i,"fullscreen");return _.jsx(xV,{className:t,showControls:o,showCopy:l,showDownload:c,showFullscreen:f,...r,children:e})},(e,t)=>wt(e,t));Lk.displayName="MarkdownTable";var Ik=v.memo(({children:e,className:t,node:n,...r})=>{let i=$e();return _.jsx("thead",{className:i("bg-muted/80",t),"data-streamdown":"table-header",...r,children:e})},(e,t)=>wt(e,t));Ik.displayName="MarkdownThead";var Dk=v.memo(({children:e,className:t,node:n,...r})=>{let i=$e();return _.jsx("tbody",{className:i("divide-y divide-border",t),"data-streamdown":"table-body",...r,children:e})},(e,t)=>wt(e,t));Dk.displayName="MarkdownTbody";var Mk=v.memo(({children:e,className:t,node:n,...r})=>{let i=$e();return _.jsx("tr",{className:i("border-border",t),"data-streamdown":"table-row",...r,children:e})},(e,t)=>wt(e,t));Mk.displayName="MarkdownTr";var Pk=v.memo(({children:e,className:t,node:n,...r})=>{let i=$e();return _.jsx("th",{className:i("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...r,children:e})},(e,t)=>wt(e,t));Pk.displayName="MarkdownTh";var Bk=v.memo(({children:e,className:t,node:n,...r})=>{let i=$e();return _.jsx("td",{className:i("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...r,children:e})},(e,t)=>wt(e,t));Bk.displayName="MarkdownTd";var jk=v.memo(({children:e,className:t,node:n,...r})=>{let i=$e();return _.jsx("blockquote",{className:i("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...r,children:e})},(e,t)=>wt(e,t));jk.displayName="MarkdownBlockquote";var Uk=v.memo(({children:e,className:t,node:n,...r})=>{let i=$e();return _.jsx("sup",{className:i("text-sm",t),"data-streamdown":"superscript",...r,children:e})},(e,t)=>wt(e,t));Uk.displayName="MarkdownSup";var Hk=v.memo(({children:e,className:t,node:n,...r})=>{let i=$e();return _.jsx("sub",{className:i("text-sm",t),"data-streamdown":"subscript",...r,children:e})},(e,t)=>wt(e,t));Hk.displayName="MarkdownSub";var zk=v.memo(({children:e,className:t,node:n,...r})=>{if("data-footnotes"in r){let i=l=>{var c,f;if(!v.isValidElement(l))return!1;let h=Array.isArray(l.props.children)?l.props.children:[l.props.children],p=!1,m=!1;for(let E of h)if(E){if(typeof E=="string")E.trim()!==""&&(p=!0);else if(v.isValidElement(E))if(((c=E.props)==null?void 0:c["data-footnote-backref"])!==void 0)m=!0;else{let y=Array.isArray(E.props.children)?E.props.children:[E.props.children];for(let T of y){if(typeof T=="string"&&T.trim()!==""){p=!0;break}if(v.isValidElement(T)&&((f=T.props)==null?void 0:f["data-footnote-backref"])===void 0){p=!0;break}}}}return m&&!p},o=Array.isArray(e)?e.map(l=>{if(!v.isValidElement(l))return l;if(l.type===C1){let c=(Array.isArray(l.props.children)?l.props.children:[l.props.children]).filter(f=>!i(f));return c.length===0?null:{...l,props:{...l.props,children:c}}}return l}):e;return(Array.isArray(o)?o.some(l=>l!==null):o!==null)?_.jsx("section",{className:t,...r,children:o}):null}return _.jsx("section",{className:t,...r,children:e})},(e,t)=>wt(e,t));zk.displayName="MarkdownSection";var wV=({node:e,className:t,children:n,...r})=>{var i,o;let l=$e(),c=!("data-block"in r),{mermaid:f,controls:h,lineNumbers:p}=v.useContext(Vn),m=A1(),E=$$(),y=t?.match(AV),T=(i=y?.at(1))!=null?i:"",S=pV(T);if(c)return _.jsx("code",{className:l("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...r,children:n});let C=(o=e?.properties)==null?void 0:o.metastring,w=C?.match(TV),k=w?Number.parseInt(w[1],10):void 0,N=k!==void 0&&k>=1?k:void 0,M=!(C&&vV.test(C))&&p!==!1,U="";if(v.isValidElement(n)&&n.props&&typeof n.props=="object"&&"children"in n.props&&typeof n.props.children=="string"?U=n.props.children:typeof n=="string"&&(U=n),S){let ie=S.component;return _.jsx(v.Suspense,{fallback:_.jsx(_v,{}),children:_.jsx(ie,{code:U,isIncomplete:E,language:T,meta:C})})}if(T==="mermaid"&&m){let ie=H0(h,"mermaid"),$=Wc(h,"download"),X=Wc(h,"copy"),J=Wc(h,"fullscreen"),he=Wc(h,"panZoom"),ue=ie&&($||X||J);return _.jsx(v.Suspense,{fallback:_.jsx(_v,{}),children:_.jsxs("div",{className:l("group relative my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",t),"data-streamdown":"mermaid-block",children:[_.jsx("div",{className:l("flex h-8 items-center text-muted-foreground text-xs"),children:_.jsx("span",{className:l("ml-1 font-mono lowercase"),children:"mermaid"})}),ue?_.jsx("div",{className:l("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:_.jsxs("div",{className:l("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"mermaid-block-actions",children:[$?_.jsx(bV,{chart:U,config:f?.config}):null,X?_.jsx(Ev,{code:U}):null,J?_.jsx(EV,{chart:U,config:f?.config}):null]})}):null,_.jsx("div",{className:l("rounded-md border border-border bg-background"),children:_.jsx(SV,{chart:U,config:f?.config,showControls:he})})]})})}let P=H0(h,"code"),V=xv(h,"download"),G=xv(h,"copy");return _.jsx(J$,{className:t,code:U,isIncomplete:E,language:T,lineNumbers:M,startLine:N,children:P?_.jsxs(_.Fragment,{children:[V?_.jsx(fV,{code:U,language:T}):null,G?_.jsx(Ev,{}):null]}):null})},Fk=v.memo(wV,(e,t)=>e.className===t.className&&Sd(e.node,t.node));Fk.displayName="MarkdownCode";var $k=v.memo(hV,(e,t)=>e.className===t.className&&Sd(e.node,t.node));$k.displayName="MarkdownImg";var Vk=v.memo(({children:e,node:t,...n})=>{let r=(Array.isArray(e)?e:[e]).filter(i=>i!=null&&i!=="");if(r.length===1&&v.isValidElement(r[0])){let i=r[0].props.node,o=i?.tagName;if(o==="img")return _.jsx(_.Fragment,{children:e});if(o==="code"&&"data-block"in r[0].props)return _.jsx(_.Fragment,{children:e})}return _.jsx("p",{...n,children:e})},(e,t)=>wt(e,t));Vk.displayName="MarkdownParagraph";var kV={ol:C1,li:xk,ul:Tk,hr:vk,strong:Sk,a:Ak,h1:Ck,h2:wk,h3:kk,h4:Nk,h5:Rk,h6:Ok,table:Lk,thead:Ik,tbody:Dk,tr:Mk,th:Pk,td:Bk,blockquote:jk,code:Fk,img:$k,pre:({children:e})=>v.isValidElement(e)?v.cloneElement(e,{"data-block":"true"}):e,sup:Uk,sub:Hk,p:Vk,section:zk},NV=/[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,RV=new RegExp("\\p{L}","u");function Tv(e){let t=e.replace(/^#{1,6}\s+/gm,"").replace(/(\*{1,3}|_{1,3})/g,"").replace(/`[^`]*`/g,"").replace(/\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/^[\s>*\-+\d.]+/gm,"");for(let n of t){if(NV.test(n))return"rtl";if(RV.test(n))return"ltr"}return"ltr"}var OV=/^[ \t]{0,3}(`{3,}|~{3,})/,LV=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,vv=e=>{let t=e.split(`
|
|
168
|
+
`),n=null,r=0;for(let i of t){let o=OV.exec(i);if(n===null){if(o){let l=o[1];n=l[0],r=l.length}}else if(o){let l=o[1],c=l[0],f=l.length;c===n&&f>=r&&(n=null,r=0)}}return n!==null},IV=e=>{let t=e.split(`
|
|
169
|
+
`);for(let n of t){let r=n.trim();if(r.length>0&&r.includes("|")&&LV.test(r))return!0}return!1},DV=()=>e=>{Mr(e,"html",(t,n,r)=>{!r||typeof n!="number"||(r.children[n]={type:"text",value:t.value})})},Sv=[],Av={allowDangerousHtml:!0},Kc=new WeakMap,MV=class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(e){let t=this.keyCache.get(e);if(t)return t;let n=e.rehypePlugins,r=e.remarkPlugins,i=e.remarkRehypeOptions;if(!(n||r||i)){let p="default";return this.keyCache.set(e,p),p}let o=p=>{if(!p||p.length===0)return"";let m="";for(let E=0;E<p.length;E+=1){let y=p[E];if(E>0&&(m+=","),Array.isArray(y)){let[T,S]=y;if(typeof T=="function"){let C=Kc.get(T);C||(C=T.name,Kc.set(T,C)),m+=C}else m+=String(T);m+=":",m+=JSON.stringify(S)}else if(typeof y=="function"){let T=Kc.get(y);T||(T=y.name,Kc.set(y,T)),m+=T}else m+=String(y)}return m},l=o(n),c=o(r),f=i?JSON.stringify(i):"",h=`${c}::${l}::${f}`;return this.keyCache.set(e,h),h}get(e){let t=this.generateCacheKey(e),n=this.cache.get(t);return n&&(this.cache.delete(t),this.cache.set(t,n)),n}set(e,t){let n=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let r=this.cache.keys().next().value;r&&this.cache.delete(r)}this.cache.set(n,t)}clear(){this.cache.clear()}},Cv=new MV,Gk=e=>{let t=PV(e),n=e.children||"",r=t.runSync(t.parse(n),n);return $V(r,e)},PV=e=>{let t=Cv.get(e);if(t)return t;let n=jV(e);return Cv.set(e,n),n},BV=e=>e.some(t=>Array.isArray(t)?t[0]===S0:t===S0),jV=e=>{let t=e.rehypePlugins||Sv,n=e.remarkPlugins||Sv,r=BV(t)?n:[...n,DV],i=e.remarkRehypeOptions?{...Av,...e.remarkRehypeOptions}:Av;return UF().use(jz).use(r).use(_F,i).use(t)},UV=e=>e,HV=(e,t,n,r)=>{n?e.children.splice(t,1):e.children[t]={type:"text",value:r}},zV=(e,t)=>{var n;for(let r in Rp)if(Object.hasOwn(Rp,r)&&Object.hasOwn(e.properties,r)){let i=e.properties[r],o=Rp[r];(o===null||o.includes(e.tagName))&&(e.properties[r]=(n=t(String(i||""),r,e))!=null?n:void 0)}},FV=(e,t,n,r,i,o)=>{let l=!1;return r?l=!r.includes(e.tagName):i&&(l=i.includes(e.tagName)),!l&&o&&typeof t=="number"&&(l=!o(e,t,n)),l},$V=(e,t)=>{let{allowElement:n,allowedElements:r,disallowedElements:i,skipHtml:o,unwrapDisallowed:l,urlTransform:c}=t;if(n||r||i||o||c){let f=c||UV;Mr(e,(h,p,m)=>{if(h.type==="raw"&&m&&typeof p=="number")return HV(m,p,o,h.value),p;if(h.type==="element"&&(zV(h,f),FV(h,p,m,r,i,n)&&m&&typeof p=="number"))return l&&h.children?m.children.splice(p,1,...h.children):m.children.splice(p,1),p})}return qH(e,{Fragment:_.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:_.jsx,jsxs:_.jsxs,passKeys:!0,passNode:!0})},VV=/\[\^[\w-]{1,200}\](?!:)/,GV=/\[\^[\w-]{1,200}\]:/,qV=/<(\w+)[\s>]/,YV=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),wv=new Map,kv=new Map,XV=e=>{let t=e.toLowerCase(),n=wv.get(t);if(n)return n;let r=new RegExp(`<${t}(?=[\\s>/])[^>]*>`,"gi");return wv.set(t,r),r},QV=e=>{let t=e.toLowerCase(),n=kv.get(t);if(n)return n;let r=new RegExp(`</${t}(?=[\\s>])[^>]*>`,"gi");return kv.set(t,r),r},Nv=(e,t)=>{if(YV.has(t.toLowerCase()))return 0;let n=e.match(XV(t));if(!n)return 0;let r=0;for(let i of n)i.trimEnd().endsWith("/>")||(r+=1);return r},Rv=(e,t)=>{let n=e.match(QV(t));return n?n.length:0},WV=e=>{let t=0;for(let n=0;n<e.length-1;n+=1)e[n]==="$"&&e[n+1]==="$"&&(t+=1,n+=1);return t},KV=e=>{let t=VV.test(e),n=GV.test(e);if(t||n)return[e];let r=ar.lex(e,{gfm:!0}),i=[],o=[],l=!1;for(let c of r){let f=c.raw,h=i.length;if(o.length>0){i[h-1]+=f;let p=o.at(-1),m=Nv(f,p),E=Rv(f,p);for(let y=0;y<m;y+=1)o.push(p);for(let y=0;y<E;y+=1)o.length>0&&o.at(-1)===p&&o.pop();continue}if(c.type==="html"&&c.block){let p=f.match(qV);if(p){let m=p[1],E=Nv(f,m),y=Rv(f,m);E>y&&o.push(m)}}if(h>0&&!l){let p=i[h-1];if(WV(p)%2===1){i[h-1]=p+f;continue}}i.push(f),c.type!=="space"&&(l=c.type==="code")}return i},ZV=(e,t)=>{if(!t.length)return e;let n=e;for(let r of t){let i=new RegExp(`(<${r}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${r}\\s*>)`,"gi");n=n.replace(i,(o,l,c,f)=>{if(!c.includes(`
|
|
170
|
+
|
|
171
|
+
`))return l+c+f;let h=c.replace(/\n\n/g,`
|
|
172
|
+
<!---->
|
|
173
|
+
`),p=(h.startsWith(`
|
|
174
|
+
`)?"":`
|
|
175
|
+
`)+h+(h.endsWith(`
|
|
176
|
+
`)?"":`
|
|
177
|
+
`);return`${l}${p}${f}
|
|
178
|
+
|
|
179
|
+
`})}return n},JV=/([\\`*_~[\]|])/g,eG=e=>e.replace(JV,"\\$1"),tG=(e,t)=>{if(!t.length)return e;let n=e;for(let r of t){let i=new RegExp(`(<${r}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${r}\\s*>)`,"gi");n=n.replace(i,(o,l,c,f)=>{let h=eG(c).replace(/\n\n/g," ");return l+h+f})}return n},qk=e=>e.type==="text"?e.value:"children"in e&&Array.isArray(e.children)?e.children.map(qk).join(""):"",nG=e=>t=>{if(!e||e.length===0)return;let n=new Set(e.map(r=>r.toLowerCase()));Mr(t,"element",r=>{if(n.has(r.tagName.toLowerCase())){let i=qk(r);r.children=i?[{type:"text",value:i}]:[]}})},rG=()=>e=>{Mr(e,"code",t=>{var n,r;t.meta&&(t.data=(n=t.data)!=null?n:{},t.data.hProperties={...(r=t.data.hProperties)!=null?r:{},metastring:t.meta})})},aG=/^[ \t]*<[\w!/?-]/,iG=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,sG=e=>typeof e!="string"||e.length===0||!aG.test(e)?e:e.replace(iG,"$1"),Ov,Lv,Iv,Dv,mf={...Pi,protocols:{...Pi.protocols,href:[...(Lv=(Ov=Pi.protocols)==null?void 0:Ov.href)!=null?Lv:[],"tel"]},attributes:{...Pi.attributes,code:[...(Dv=(Iv=Pi.attributes)==null?void 0:Iv.code)!=null?Dv:[],"metastring"]}},z0={raw:S0,sanitize:[nw,mf],harden:[nM,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},oG={gfm:[_U,{}],codeMeta:rG},Mv=Object.values(z0),lG=Object.values(oG),uG={block:" ▋",circle:" ●"},Yk=["github-light","github-dark"],Xk={enabled:!0},cG={shikiTheme:Yk,controls:!0,isAnimating:!1,lineNumbers:!0,mode:"streaming",mermaid:void 0,linkSafety:Xk},Vn=v.createContext(cG),Qk=v.memo(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:n,index:r,isIncomplete:i,dir:o,animatePlugin:l,...c})=>{if(l){let p=l.getLastRenderCharCount();l.setPrevContentLength(p)}let f=typeof e=="string"&&n?sG(e):e,h=_.jsx(Gk,{...c,children:f});return _.jsx(dk.Provider,{value:i,children:o?_.jsx("div",{dir:o,style:{display:"contents"},children:h}):h})},(e,t)=>{if(e.content!==t.content||e.shouldNormalizeHtmlIndentation!==t.shouldNormalizeHtmlIndentation||e.index!==t.index||e.isIncomplete!==t.isIncomplete||e.dir!==t.dir)return!1;if(e.components!==t.components){let n=Object.keys(e.components||{}),r=Object.keys(t.components||{});if(n.length!==r.length||n.some(i=>{var o,l;return((o=e.components)==null?void 0:o[i])!==((l=t.components)==null?void 0:l[i])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});Qk.displayName="Block";var w1=v.memo(({children:e,mode:t="streaming",dir:n,parseIncompleteMarkdown:r=!0,normalizeHtmlIndentation:i=!1,components:o,rehypePlugins:l=Mv,remarkPlugins:c=lG,className:f,shikiTheme:h=Yk,mermaid:p,controls:m=!0,isAnimating:E=!1,animated:y,BlockComponent:T=Qk,parseMarkdownIntoBlocksFn:S=KV,caret:C,plugins:w,remend:k,linkSafety:N=Xk,lineNumbers:M=!0,allowedTags:U,literalTagContent:P,translations:V,icons:G,prefix:ie,onAnimationStart:$,onAnimationEnd:X,...J})=>{let he=v.useId(),[ue,re]=v.useTransition(),j=v.useMemo(()=>G$(ie),[ie]),ee=v.useRef(null),ce=v.useRef($),xe=v.useRef(X);ce.current=$,xe.current=X,v.useEffect(()=>{var He,st,Gt;if(t==="static")return;let yn=ee.current;if(ee.current=E,yn===null){E&&((He=ce.current)==null||He.call(ce));return}E&&!yn?(st=ce.current)==null||st.call(ce):!E&&yn&&((Gt=xe.current)==null||Gt.call(xe))},[E,t]);let O=v.useMemo(()=>U?Object.keys(U):[],[U]),z=v.useMemo(()=>{if(typeof e!="string")return"";let He=t==="streaming"&&r?OH(e,k):e;return P&&P.length>0&&(He=tG(He,P)),O.length>0&&(He=ZV(He,O)),He},[e,t,r,k,O,P]),te=v.useMemo(()=>S(z),[z,S]),[D,ge]=v.useState(te);v.useEffect(()=>{t==="streaming"&&!Te?re(()=>{ge(te)}):ge(te)},[te,t]);let Ee=t==="streaming"?D:te,ye=v.useMemo(()=>n==="auto"?Ee.map(Tv):void 0,[Ee,n]),be=v.useMemo(()=>Ee.map((He,st)=>`${he}-${st}`),[Ee.length,he]),ke=v.useMemo(()=>y===!0?"true":y?JSON.stringify(y):"",[y]),Te=v.useMemo(()=>ke?ke==="true"?M0():M0(y):null,[ke]),De=v.useMemo(()=>{var He,st;return{shikiTheme:(st=(He=w?.code)==null?void 0:He.getThemes())!=null?st:h,controls:m,isAnimating:E,lineNumbers:M,mode:t,mermaid:p,linkSafety:N}},[h,m,E,M,t,p,N,w?.code]),je=v.useMemo(()=>V?JSON.stringify(V):"",[V]),Je=v.useMemo(()=>({...gk,...V}),[je]),kt=v.useMemo(()=>{let{inlineCode:He,...st}=o??{},Gt={...kV,...st};if(He){let yn=Gt.code;Gt.code=Hr=>"data-block"in Hr?yn?v.createElement(yn,Hr):null:v.createElement(He,Hr)}return Gt},[o]),it=v.useMemo(()=>{let He=[];return w!=null&&w.cjk&&(He=[...He,...w.cjk.remarkPluginsBefore]),He=[...He,...c],w!=null&&w.cjk&&(He=[...He,...w.cjk.remarkPluginsAfter]),w!=null&&w.math&&(He=[...He,w.math.remarkPlugin]),He},[c,w?.math,w?.cjk]),On=v.useMemo(()=>{var He;let st=l;if(U&&Object.keys(U).length>0&&l===Mv){let Gt={...mf,tagNames:[...(He=mf.tagNames)!=null?He:[],...Object.keys(U)],attributes:{...mf.attributes,...U}};st=[z0.raw,[nw,Gt],z0.harden]}return P&&P.length>0&&(st=[...st,[nG,P]]),w!=null&&w.math&&(st=[...st,w.math.rehypePlugin]),Te&&E&&(st=[...st,Te.rehypePlugin]),st},[l,w?.math,Te,E,U,P]),En=v.useMemo(()=>{if(!E||Ee.length===0)return!1;let He=Ee.at(-1);return vv(He)||IV(He)},[E,Ee]),xr=v.useMemo(()=>C&&E&&!En?{"--streamdown-caret":`"${uG[C]}"`}:void 0,[C,E,En]);return t==="static"?_.jsx(B0.Provider,{value:Je,children:_.jsx(j0.Provider,{value:w??null,children:_.jsx(Vn.Provider,{value:De,children:_.jsx(bv,{icons:G,children:_.jsx(P0.Provider,{value:j,children:_.jsx("div",{className:j("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",f),dir:n==="auto"?Tv(z):n,children:_.jsx(Gk,{components:kt,rehypePlugins:On,remarkPlugins:it,...J,children:z})})})})})})}):_.jsx(B0.Provider,{value:Je,children:_.jsx(j0.Provider,{value:w??null,children:_.jsx(Vn.Provider,{value:De,children:_.jsx(bv,{icons:G,children:_.jsx(P0.Provider,{value:j,children:_.jsxs("div",{className:j("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",C&&!En?"[&>*:last-child]:after:inline [&>*:last-child]:after:align-baseline [&>*:last-child]:after:content-[var(--streamdown-caret)]":null,f),style:xr,children:[Ee.length===0&&C&&E&&_.jsx("span",{}),Ee.map((He,st)=>{var Gt;let yn=st===Ee.length-1,Hr=E&&yn&&vv(He);return _.jsx(T,{animatePlugin:Te,components:kt,content:He,dir:(Gt=ye?.[st])!=null?Gt:n!=="auto"?n:void 0,index:st,isIncomplete:Hr,rehypePlugins:On,remarkPlugins:it,shouldNormalizeHtmlIndentation:i,shouldParseIncompleteMarkdown:r,...J},be[st])})]})})})})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.animated===t.animated&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety&&e.lineNumbers===t.lineNumbers&&e.normalizeHtmlIndentation===t.normalizeHtmlIndentation&&e.literalTagContent===t.literalTagContent&&JSON.stringify(e.translations)===JSON.stringify(t.translations)&&e.prefix===t.prefix&&e.dir===t.dir);w1.displayName="Streamdown";var fG=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:i=.1,showControls:o=!0,initialZoom:l=1,fullscreen:c=!1})=>{let{RotateCcwIcon:f,ZoomInIcon:h,ZoomOutIcon:p}=_r(),m=$e(),E=v.useRef(null),y=v.useRef(null),[T,S]=v.useState(l),[C,w]=v.useState({x:0,y:0}),[k,N]=v.useState(!1),[M,U]=v.useState({x:0,y:0}),[P,V]=v.useState({x:0,y:0}),G=v.useCallback(j=>{S(ee=>Math.max(n,Math.min(r,ee+j)))},[n,r]),ie=v.useCallback(()=>{G(i)},[G,i]),$=v.useCallback(()=>{G(-i)},[G,i]),X=v.useCallback(()=>{S(l),w({x:0,y:0})},[l]),J=v.useCallback(j=>{j.preventDefault();let ee=j.deltaY>0?-i:i;G(ee)},[G,i]),he=v.useCallback(j=>{if(j.button!==0||j.isPrimary===!1)return;N(!0),U({x:j.clientX,y:j.clientY}),V(C);let ee=j.currentTarget;ee instanceof HTMLElement&&ee.setPointerCapture(j.pointerId)},[C]),ue=v.useCallback(j=>{if(!k)return;j.preventDefault();let ee=j.clientX-M.x,ce=j.clientY-M.y;w({x:P.x+ee,y:P.y+ce})},[k,M,P]),re=v.useCallback(j=>{N(!1);let ee=j.currentTarget;ee instanceof HTMLElement&&ee.releasePointerCapture(j.pointerId)},[]);return v.useEffect(()=>{let j=E.current;if(j)return j.addEventListener("wheel",J,{passive:!1}),()=>{j.removeEventListener("wheel",J)}},[J]),v.useEffect(()=>{let j=y.current;if(j&&k)return document.body.style.userSelect="none",j.addEventListener("pointermove",ue,{passive:!1}),j.addEventListener("pointerup",re),j.addEventListener("pointercancel",re),()=>{document.body.style.userSelect="",j.removeEventListener("pointermove",ue),j.removeEventListener("pointerup",re),j.removeEventListener("pointercancel",re)}},[k,ue,re]),_.jsxs("div",{className:m("relative flex flex-col",c?"h-full w-full":"min-h-28 w-full",t),ref:E,style:{cursor:k?"grabbing":"grab"},children:[o?_.jsxs("div",{className:m("absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/80 p-1 supports-[backdrop-filter]:bg-background/70 supports-[backdrop-filter]:backdrop-blur-sm",c?"bottom-4 left-4":"bottom-2 left-2"),children:[_.jsx("button",{className:m("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50"),disabled:T>=r,onClick:ie,title:"Zoom in",type:"button",children:_.jsx(h,{size:16})}),_.jsx("button",{className:m("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50"),disabled:T<=n,onClick:$,title:"Zoom out",type:"button",children:_.jsx(p,{size:16})}),_.jsx("button",{className:m("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"),onClick:X,title:"Reset zoom and pan",type:"button",children:_.jsx(f,{size:16})})]}):null,_.jsx("div",{className:m("flex-1 origin-center transition-transform duration-150 ease-out",c?"flex h-full w-full items-center justify-center":"flex w-full items-center justify-center"),onPointerDown:he,ref:y,role:"application",style:{transform:`translate(${C.x}px, ${C.y}px) scale(${T})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},Wk=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:i=!0})=>{let o=$e(),[l,c]=v.useState(null),[f,h]=v.useState(!1),[p,m]=v.useState(""),[E,y]=v.useState(""),[T,S]=v.useState(0),{mermaid:C}=v.useContext(Vn),w=A1(),k=C?.errorComponent,{shouldRender:N,containerRef:M}=I$({immediate:r});if(v.useEffect(()=>{if(N){if(!w){c("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{c(null),h(!0);let P=w.getMermaid(n),V=e.split("").reduce(($,X)=>($<<5)-$+X.charCodeAt(0)|0,0),G=`mermaid-${Math.abs(V)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:ie}=await P.render(G,e);m(ie),y(ie)}catch(P){if(!(E||p)){let V=P instanceof Error?P.message:"Failed to render Mermaid chart";c(V)}}finally{h(!1)}})()}},[e,n,T,N,w]),!(N||p||E))return _.jsx("div",{className:o("my-4 min-h-[200px]",t),ref:M});if(f&&!p&&!E)return _.jsx("div",{className:o("my-4 flex justify-center p-4",t),ref:M,children:_.jsxs("div",{className:o("flex items-center space-x-2 text-muted-foreground"),children:[_.jsx("div",{className:o("h-4 w-4 animate-spin rounded-full border-current border-b-2")}),_.jsx("span",{className:o("text-sm"),children:"Loading diagram..."})]})});if(l&&!p&&!E){let P=()=>S(V=>V+1);return k?_.jsx("div",{ref:M,children:_.jsx(k,{chart:e,error:l,retry:P})}):_.jsxs("div",{className:o("rounded-md bg-red-50 p-4",t),ref:M,children:[_.jsxs("p",{className:o("font-mono text-red-700 text-sm"),children:["Mermaid Error: ",l]}),_.jsxs("details",{className:o("mt-2"),children:[_.jsx("summary",{className:o("cursor-pointer text-red-600 text-xs"),children:"Show Code"}),_.jsx("pre",{className:o("mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs"),children:e})]})]})}let U=p||E;return _.jsx("div",{className:o("size-full",t),"data-streamdown":"mermaid",ref:M,children:_.jsx(fG,{className:o(r?"size-full overflow-hidden":"overflow-hidden",t),fullscreen:r,maxZoom:3,minZoom:.5,showControls:i,zoomStep:.1,children:_.jsx("div",{"aria-label":"Mermaid chart",className:o("flex justify-center",r?"size-full items-center":null),dangerouslySetInnerHTML:{__html:U},role:"img"})})})};const Kk=v.createContext(null),dG=()=>{const e=v.useContext(Kk);if(!e)throw new Error("Reasoning components must be used within Reasoning");return e},hG=1e3,mG=1e3,k1=v.memo(({className:e,isStreaming:t=!1,open:n,defaultOpen:r=!0,onOpenChange:i,duration:o,children:l,...c})=>{const[f,h]=ei({prop:n,defaultProp:r,...i?{onChange:i}:{}}),[p,m]=ei({prop:o,defaultProp:void 0}),[E,y]=v.useState(!1),[T,S]=v.useState(null);v.useEffect(()=>{t?T===null&&S(Date.now()):T!==null&&(m(Math.ceil((Date.now()-T)/mG)),S(null))},[t,T,m]),v.useEffect(()=>{if(r&&!t&&f&&!E){const w=setTimeout(()=>{h(!1),y(!0)},hG);return()=>clearTimeout(w)}},[t,f,r,h,E]);const C=w=>{h(w)};return _.jsx(Kk.Provider,{value:{isStreaming:t,isOpen:f,setIsOpen:h,duration:p},children:_.jsx(eC,{className:we("not-prose mb-4",e),onOpenChange:C,open:f,...c,children:l})})}),pG=(e,t)=>e||t===0?_.jsx(JA,{duration:1,children:"Thinking…"}):t===void 0?_.jsx("p",{children:"Thought for a few seconds"}):_.jsxs("p",{children:["Thought for ",t," seconds"]}),N1=v.memo(({className:e,children:t,getThinkingMessage:n=pG,...r})=>{const{isStreaming:i,isOpen:o,duration:l}=dG();return _.jsx(tC,{className:we("flex w-full items-center gap-2 text-muted-foreground text-sm transition-colors hover:text-foreground",e),...r,children:t??_.jsxs(_.Fragment,{children:[_.jsx(pL,{className:"size-4"}),n(i,l),_.jsx(Xf,{className:we("size-4 transition-transform",o?"rotate-180":"rotate-0")})]})})}),R1=v.memo(({className:e,children:t,...n})=>_.jsx(nC,{className:we("mt-4 text-sm","data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-muted-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...n,children:_.jsx(w1,{children:t})}));k1.displayName="Reasoning";N1.displayName="ReasoningTrigger";R1.displayName="ReasoningContent";const O1=v.memo(({className:e,...t})=>_.jsx(w1,{className:we("size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",e),...t}),(e,t)=>e.children===t.children);O1.displayName="Response";const gG=fg("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function Zk({className:e,variant:t="default",asChild:n=!1,...r}){const i=n?F2:"span";return _.jsx(i,{"data-slot":"badge","data-variant":t,className:we(gG({variant:t}),e),...r})}var F0=Object.defineProperty,bG=Object.getOwnPropertyDescriptor,EG=Object.getOwnPropertyNames,yG=Object.prototype.hasOwnProperty,L1=(e,t)=>{let n={};for(var r in e)F0(n,r,{get:e[r],enumerable:!0});return F0(n,Symbol.toStringTag,{value:"Module"}),n},_G=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var i=EG(t),o=0,l=i.length,c;o<l;o++)c=i[o],!yG.call(e,c)&&c!==n&&F0(e,c,{get:(f=>t[f]).bind(null,c),enumerable:!(r=bG(t,c))||r.enumerable});return e},Jk=(e,t,n)=>(_G(e,t,"default"),n);const Ad=[{id:"abap",name:"ABAP",import:(()=>L(()=>import("./abap-BdImnpbu.js"),[]))},{id:"actionscript-3",name:"ActionScript",import:(()=>L(()=>import("./actionscript-3-CoDkCxhg.js"),[]))},{id:"ada",name:"Ada",import:(()=>L(()=>import("./ada-bCR0ucgS.js"),[]))},{id:"angular-html",name:"Angular HTML",import:(()=>L(()=>import("./angular-html-DA-rfuFy.js").then(e=>e.f),__vite__mapDeps([0,1,2,3])))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>L(()=>import("./angular-ts-BrjP3tb8.js"),__vite__mapDeps([4,0,1,2,3,5])))},{id:"apache",name:"Apache Conf",import:(()=>L(()=>import("./apache-Pmp26Uib.js"),[]))},{id:"apex",name:"Apex",import:(()=>L(()=>import("./apex-Dqspr-GT.js"),[]))},{id:"apl",name:"APL",import:(()=>L(()=>import("./apl-CORt7UWP.js"),__vite__mapDeps([6,1,2,3,7,8,9])))},{id:"applescript",name:"AppleScript",import:(()=>L(()=>import("./applescript-Co6uUVPk.js"),[]))},{id:"ara",name:"Ara",import:(()=>L(()=>import("./ara-BRHolxvo.js"),[]))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>L(()=>import("./asciidoc-Ve4PFQV2.js"),[]))},{id:"asm",name:"Assembly",import:(()=>L(()=>import("./asm-D_Q5rh1f.js"),[]))},{id:"astro",name:"Astro",import:(()=>L(()=>import("./astro-HNnZUWAn.js"),__vite__mapDeps([10,9,2,11,3,12,13])))},{id:"awk",name:"AWK",import:(()=>L(()=>import("./awk-DMzUqQB5.js"),[]))},{id:"ballerina",name:"Ballerina",import:(()=>L(()=>import("./ballerina-BFfxhgS-.js"),[]))},{id:"bat",name:"Batch File",aliases:["batch"],import:(()=>L(()=>import("./bat-BkioyH1T.js"),[]))},{id:"beancount",name:"Beancount",import:(()=>L(()=>import("./beancount-k_qm7-4y.js"),[]))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>L(()=>import("./berry-uYugtg8r.js"),[]))},{id:"bibtex",name:"BibTeX",import:(()=>L(()=>import("./bibtex-CHM0blh-.js"),[]))},{id:"bicep",name:"Bicep",import:(()=>L(()=>import("./bicep-Bmn6On1c.js"),[]))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>L(()=>import("./bird2-BIv1doCn.js"),[]))},{id:"blade",name:"Blade",import:(()=>L(()=>import("./blade-2xfisSek.js"),__vite__mapDeps([14,15,1,2,3,7,8,16,9])))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>L(()=>import("./bsl-BO_Y6i37.js"),__vite__mapDeps([17,18])))},{id:"c",name:"C",import:(()=>L(()=>import("./c-BIGW1oBm.js"),[]))},{id:"c3",name:"C3",import:(()=>L(()=>import("./c3-MRO5bC_T.js"),[]))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>L(()=>import("./cadence-Bv_4Rxtq.js"),[]))},{id:"cairo",name:"Cairo",import:(()=>L(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([19,20])))},{id:"clarity",name:"Clarity",import:(()=>L(()=>import("./clarity-D53aC0YG.js"),[]))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>L(()=>import("./clojure-P80f7IUj.js"),[]))},{id:"cmake",name:"CMake",import:(()=>L(()=>import("./cmake-D1j8_8rp.js"),[]))},{id:"cobol",name:"COBOL",import:(()=>L(()=>import("./cobol-nBiQ_Alo.js"),__vite__mapDeps([21,1,2,3,8])))},{id:"codeowners",name:"CODEOWNERS",import:(()=>L(()=>import("./codeowners-Bp6g37R7.js"),[]))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>L(()=>import("./codeql-DsOJ9woJ.js"),[]))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>L(()=>import("./coffee-Ch7k5sss.js"),__vite__mapDeps([22,2])))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>L(()=>import("./common-lisp-Cg-RD9OK.js"),[]))},{id:"coq",name:"Coq",import:(()=>L(()=>import("./coq-DkFqJrB1.js"),[]))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>L(()=>import("./cpp-UfJy6YNI.js"),__vite__mapDeps([23,24,25,26,16])))},{id:"crystal",name:"Crystal",import:(()=>L(()=>import("./crystal-DGywbUpC.js"),__vite__mapDeps([27,1,2,3,16,26,28])))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>L(()=>import("./csharp-DSvCPggb.js"),[]))},{id:"css",name:"CSS",import:(()=>L(()=>import("./css-CLj8gQPS.js"),[]))},{id:"csv",name:"CSV",import:(()=>L(()=>import("./csv-fuZLfV_i.js"),[]))},{id:"cue",name:"CUE",import:(()=>L(()=>import("./cue-D82EKSYY.js"),[]))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>L(()=>import("./cypher-COkxafJQ.js"),[]))},{id:"d",name:"D",import:(()=>L(()=>import("./d-85-TOEBH.js"),[]))},{id:"dart",name:"Dart",import:(()=>L(()=>import("./dart-bE4Kk8sk.js"),[]))},{id:"dax",name:"DAX",import:(()=>L(()=>import("./dax-CEL-wOlO.js"),[]))},{id:"desktop",name:"Desktop",import:(()=>L(()=>import("./desktop-BmXAJ9_W.js"),[]))},{id:"diff",name:"Diff",import:(()=>L(()=>import("./diff-D97Zzqfu.js"),[]))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>L(()=>import("./docker-BcOcwvcX.js"),[]))},{id:"dotenv",name:"dotEnv",import:(()=>L(()=>import("./dotenv-Da5cRb03.js"),[]))},{id:"dream-maker",name:"Dream Maker",import:(()=>L(()=>import("./dream-maker-BtqSS_iP.js"),[]))},{id:"edge",name:"Edge",import:(()=>L(()=>import("./edge-FbVlp4U3.js"),__vite__mapDeps([29,11,1,2,3,15])))},{id:"elixir",name:"Elixir",import:(()=>L(()=>import("./elixir-CkH2-t6x.js"),__vite__mapDeps([30,1,2,3])))},{id:"elm",name:"Elm",import:(()=>L(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([31,25,26])))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>L(()=>import("./emacs-lisp-CXvaQtF9.js"),[]))},{id:"erb",name:"ERB",import:(()=>L(()=>import("./erb-Dm6A9KJ5.js"),__vite__mapDeps([32,1,2,3,33,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>L(()=>import("./erlang-DsQrWhSR.js"),__vite__mapDeps([39,40])))},{id:"fennel",name:"Fennel",import:(()=>L(()=>import("./fennel-BYunw83y.js"),[]))},{id:"fish",name:"Fish",import:(()=>L(()=>import("./fish-BvzEVeQv.js"),[]))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>L(()=>import("./fluent-C4IJs8-o.js"),[]))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>L(()=>import("./fortran-fixed-form-CkoXwp7k.js"),__vite__mapDeps([41,42])))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>L(()=>import("./fortran-free-form-BxgE0vQu.js"),[]))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>L(()=>import("./fsharp-CXgrBDvD.js"),__vite__mapDeps([43,40])))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>L(()=>import("./gdresource-BOOCDP_w.js"),__vite__mapDeps([44,45,46])))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>L(()=>import("./gdscript-C5YyOfLZ.js"),[]))},{id:"gdshader",name:"GDShader",import:(()=>L(()=>import("./gdshader-DkwncUOv.js"),[]))},{id:"genie",name:"Genie",import:(()=>L(()=>import("./genie-D0YGMca9.js"),[]))},{id:"gherkin",name:"Gherkin",import:(()=>L(()=>import("./gherkin-DyxjwDmM.js"),[]))},{id:"git-commit",name:"Git Commit Message",import:(()=>L(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([47,48])))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>L(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([49,28])))},{id:"gleam",name:"Gleam",import:(()=>L(()=>import("./gleam-BspZqrRM.js"),[]))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>L(()=>import("./glimmer-js-ByusRIyA.js"),__vite__mapDeps([50,2,11,3,1])))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>L(()=>import("./glimmer-ts-BfAWNZQY.js"),__vite__mapDeps([51,11,3,2,1])))},{id:"glsl",name:"GLSL",import:(()=>L(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([25,26])))},{id:"gn",name:"GN",import:(()=>L(()=>import("./gn-n2N0HUVH.js"),[]))},{id:"gnuplot",name:"Gnuplot",import:(()=>L(()=>import("./gnuplot-DdkO51Og.js"),[]))},{id:"go",name:"Go",import:(()=>L(()=>import("./go-C27-OAKa.js"),[]))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>L(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([35,2,11,36,13])))},{id:"groovy",name:"Groovy",import:(()=>L(()=>import("./groovy-gcz8RCvz.js"),[]))},{id:"hack",name:"Hack",import:(()=>L(()=>import("./hack-DbPARsA_.js"),__vite__mapDeps([52,1,2,3,16])))},{id:"haml",name:"Ruby Haml",import:(()=>L(()=>import("./haml-D5jkg6IW.js"),__vite__mapDeps([34,2,3])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>L(()=>import("./handlebars-BpdQsYii.js"),__vite__mapDeps([53,1,2,3,38])))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>L(()=>import("./haskell-Df6bDoY_.js"),[]))},{id:"haxe",name:"Haxe",import:(()=>L(()=>import("./haxe-CzTSHFRz.js"),[]))},{id:"hcl",name:"HashiCorp HCL",import:(()=>L(()=>import("./hcl-BWvSN4gD.js"),[]))},{id:"hjson",name:"Hjson",import:(()=>L(()=>import("./hjson-D5-asLiD.js"),[]))},{id:"hlsl",name:"HLSL",import:(()=>L(()=>import("./hlsl-D3lLCCz7.js"),[]))},{id:"html",name:"HTML",import:(()=>L(()=>import("./html-pp8916En.js"),__vite__mapDeps([1,2,3])))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>L(()=>import("./html-derivative-DlHx6ybY.js"),__vite__mapDeps([15,1,2,3])))},{id:"http",name:"HTTP",import:(()=>L(()=>import("./http-jrhK8wxY.js"),__vite__mapDeps([54,28,9,7,8,35,2,11,36,13])))},{id:"hurl",name:"Hurl",import:(()=>L(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([55,35,2,11,36,13,7,8,56])))},{id:"hxml",name:"HXML",import:(()=>L(()=>import("./hxml-Bvhsp5Yf.js"),__vite__mapDeps([57,58])))},{id:"hy",name:"Hy",import:(()=>L(()=>import("./hy-DFXneXwc.js"),[]))},{id:"imba",name:"Imba",import:(()=>L(()=>import("./imba-DGztddWO.js"),[]))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>L(()=>import("./ini-BEwlwnbL.js"),[]))},{id:"java",name:"Java",import:(()=>L(()=>import("./java-CylS5w8V.js"),[]))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>L(()=>import("./javascript-wDzz0qaB.js"),[]))},{id:"jinja",name:"Jinja",import:(()=>L(()=>import("./jinja-f2NsQr07.js"),__vite__mapDeps([59,1,2,3])))},{id:"jison",name:"Jison",import:(()=>L(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([60,2])))},{id:"json",name:"JSON",import:(()=>L(()=>import("./json-Cp-IABpG.js"),[]))},{id:"json5",name:"JSON5",import:(()=>L(()=>import("./json5-C9tS-k6U.js"),[]))},{id:"jsonc",name:"JSON with Comments",import:(()=>L(()=>import("./jsonc-Des-eS-w.js"),[]))},{id:"jsonl",name:"JSON Lines",import:(()=>L(()=>import("./jsonl-DcaNXYhu.js"),[]))},{id:"jsonnet",name:"Jsonnet",import:(()=>L(()=>import("./jsonnet-DFQXde-d.js"),[]))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>L(()=>import("./jssm-C2t-YnRu.js"),[]))},{id:"jsx",name:"JSX",import:(()=>L(()=>import("./jsx-g9-lgVsj.js"),[]))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>L(()=>import("./julia-D7OTSIA_.js"),__vite__mapDeps([61,23,24,25,26,16,20,2,62])))},{id:"just",name:"Just",import:(()=>L(()=>import("./just-CUsbIsdP.js"),__vite__mapDeps([63,28,2,11,64,1,3,7,8,16,20,33,34,35,36,13,23,24,25,26,37,38])))},{id:"kdl",name:"KDL",import:(()=>L(()=>import("./kdl-DV7GczEv.js"),[]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>L(()=>import("./kotlin-BdnUsdx6.js"),[]))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>L(()=>import("./kusto-wEQ09or8.js"),[]))},{id:"latex",name:"LaTeX",import:(()=>L(()=>import("./latex-CaSxy8MP.js"),__vite__mapDeps([65,66,62])))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>L(()=>import("./lean-BZvkOJ9d.js"),[]))},{id:"less",name:"Less",import:(()=>L(()=>import("./less-B1dDrJ26.js"),[]))},{id:"liquid",name:"Liquid",import:(()=>L(()=>import("./liquid-C0sCDyMI.js"),__vite__mapDeps([67,1,2,3,9])))},{id:"llvm",name:"LLVM IR",import:(()=>L(()=>import("./llvm-DjAJT7YJ.js"),[]))},{id:"log",name:"Log file",import:(()=>L(()=>import("./log-2UxHyX5q.js"),[]))},{id:"logo",name:"Logo",import:(()=>L(()=>import("./logo-BtOb2qkB.js"),[]))},{id:"lua",name:"Lua",import:(()=>L(()=>import("./lua-BaeVxFsk.js"),__vite__mapDeps([37,26])))},{id:"luau",name:"Luau",import:(()=>L(()=>import("./luau-KW6xsasC.js"),[]))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>L(()=>import("./make-CHLpvVh8.js"),[]))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>L(()=>import("./markdown-Cvjx9yec.js"),[]))},{id:"marko",name:"Marko",import:(()=>L(()=>import("./marko-DjSrsDqO.js"),__vite__mapDeps([68,3,69,5,11])))},{id:"matlab",name:"MATLAB",import:(()=>L(()=>import("./matlab-D7o27uSR.js"),[]))},{id:"mdc",name:"MDC",import:(()=>L(()=>import("./mdc-DTYItulj.js"),__vite__mapDeps([70,40,38,15,1,2,3])))},{id:"mdx",name:"MDX",import:(()=>L(()=>import("./mdx-Cmh6b_Ma.js"),[]))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>L(()=>import("./mermaid-mWjccvbQ.js"),[]))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>L(()=>import("./mipsasm-CKIfxQSi.js"),[]))},{id:"mojo",name:"Mojo",import:(()=>L(()=>import("./mojo-rZm6bMo-.js"),[]))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>L(()=>import("./moonbit-_H4v1dQx.js"),[]))},{id:"move",name:"Move",import:(()=>L(()=>import("./move-IF9eRakj.js"),[]))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>L(()=>import("./narrat-DRg8JJMk.js"),[]))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>L(()=>import("./nextflow-C-mBbutL.js"),__vite__mapDeps([71,72])))},{id:"nextflow-groovy",name:"Nextflow Groovy",import:(()=>L(()=>import("./nextflow-groovy-vE_lwT2v.js"),[]))},{id:"nginx",name:"Nginx",import:(()=>L(()=>import("./nginx-BpAMiNFr.js"),__vite__mapDeps([73,37,26])))},{id:"nim",name:"Nim",import:(()=>L(()=>import("./nim-BIad80T-.js"),__vite__mapDeps([74,26,1,2,3,7,8,25,40])))},{id:"nix",name:"Nix",import:(()=>L(()=>import("./nix-CwoSXNpI.js"),[]))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>L(()=>import("./nushell-Cz2AlsmD.js"),[]))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>L(()=>import("./objective-c-DXmwc3jG.js"),[]))},{id:"objective-cpp",name:"Objective-C++",import:(()=>L(()=>import("./objective-cpp-CLxacb5B.js"),[]))},{id:"ocaml",name:"OCaml",import:(()=>L(()=>import("./ocaml-C0hk2d4L.js"),[]))},{id:"odin",name:"Odin",import:(()=>L(()=>import("./odin-BBf5iR-q.js"),[]))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>L(()=>import("./openscad-C4EeE6gA.js"),[]))},{id:"pascal",name:"Pascal",import:(()=>L(()=>import("./pascal-D93ZcfNL.js"),[]))},{id:"perl",name:"Perl",import:(()=>L(()=>import("./perl-B9cMNwum.js"),__vite__mapDeps([64,1,2,3,7,8,16])))},{id:"php",name:"PHP",import:(()=>L(()=>import("./php-Csjmro_R.js"),__vite__mapDeps([75,1,2,3,7,8,16,9])))},{id:"pkl",name:"Pkl",import:(()=>L(()=>import("./pkl-u5AG7uiY.js"),[]))},{id:"plsql",name:"PL/SQL",import:(()=>L(()=>import("./plsql-ChMvpjG-.js"),[]))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>L(()=>import("./po-BTJTHyun.js"),[]))},{id:"polar",name:"Polar",import:(()=>L(()=>import("./polar-C0HS_06l.js"),[]))},{id:"postcss",name:"PostCSS",import:(()=>L(()=>import("./postcss-CXtECtnM.js"),[]))},{id:"powerquery",name:"PowerQuery",import:(()=>L(()=>import("./powerquery-CEu0bR-o.js"),[]))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:(()=>L(()=>import("./powershell-Dpen1YoG.js"),[]))},{id:"prisma",name:"Prisma",import:(()=>L(()=>import("./prisma-Dd19v3D-.js"),[]))},{id:"prolog",name:"Prolog",import:(()=>L(()=>import("./prolog-CbFg5uaA.js"),[]))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>L(()=>import("./proto-C7zT0LnQ.js"),[]))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>L(()=>import("./pug-DKIMFp6K.js"),__vite__mapDeps([76,2,3,1])))},{id:"puppet",name:"Puppet",import:(()=>L(()=>import("./puppet-BMWR74SV.js"),[]))},{id:"purescript",name:"PureScript",import:(()=>L(()=>import("./purescript-CklMAg4u.js"),[]))},{id:"python",name:"Python",aliases:["py"],import:(()=>L(()=>import("./python-B6aJPvgy.js"),[]))},{id:"qml",name:"QML",import:(()=>L(()=>import("./qml-3beO22l8.js"),__vite__mapDeps([77,2])))},{id:"qmldir",name:"QML Directory",import:(()=>L(()=>import("./qmldir-C8lEn-DE.js"),[]))},{id:"qss",name:"Qt Style Sheets",import:(()=>L(()=>import("./qss-IeuSbFQv.js"),[]))},{id:"r",name:"R",import:(()=>L(()=>import("./r-Dspwwk_N.js"),[]))},{id:"racket",name:"Racket",import:(()=>L(()=>import("./racket-BqYA7rlc.js"),[]))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>L(()=>import("./raku-DXvB9xmW.js"),[]))},{id:"razor",name:"ASP.NET Razor",import:(()=>L(()=>import("./razor-BjBPvh-w.js"),__vite__mapDeps([78,1,2,3,79])))},{id:"reg",name:"Windows Registry Script",import:(()=>L(()=>import("./reg-C-SQnVFl.js"),[]))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>L(()=>import("./regexp-CDVJQ6XC.js"),[]))},{id:"rel",name:"Rel",import:(()=>L(()=>import("./rel-C3B-1QV4.js"),[]))},{id:"riscv",name:"RISC-V",import:(()=>L(()=>import("./riscv-BM1_JUlF.js"),[]))},{id:"ron",name:"RON",import:(()=>L(()=>import("./ron-D8l8udqQ.js"),[]))},{id:"rosmsg",name:"ROS Interface",import:(()=>L(()=>import("./rosmsg-BJDFO7_C.js"),[]))},{id:"rst",name:"reStructuredText",import:(()=>L(()=>import("./rst-CpCqk9r5.js"),__vite__mapDeps([80,15,1,2,3,23,24,25,26,16,20,28,38,81,33,34,7,8,35,11,36,13,37])))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>L(()=>import("./ruby-DyJCeAvU.js"),__vite__mapDeps([33,1,2,3,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>L(()=>import("./rust-B1yitclQ.js"),[]))},{id:"sas",name:"SAS",import:(()=>L(()=>import("./sas-DEy46yEz.js"),__vite__mapDeps([82,16])))},{id:"sass",name:"Sass",import:(()=>L(()=>import("./sass-Cj5Yp3dK.js"),[]))},{id:"scala",name:"Scala",import:(()=>L(()=>import("./scala-C151Ov-r.js"),[]))},{id:"scheme",name:"Scheme",import:(()=>L(()=>import("./scheme-C98Dy4si.js"),[]))},{id:"scss",name:"SCSS",import:(()=>L(()=>import("./scss-D5BDwBP9.js"),__vite__mapDeps([5,3])))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>L(()=>import("./sdbl-DVxCFoDh.js"),[]))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>L(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([83,84])))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>L(()=>import("./shellscript-Yzrsuije.js"),[]))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>L(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([85,28])))},{id:"smalltalk",name:"Smalltalk",import:(()=>L(()=>import("./smalltalk-BERRCDM3.js"),[]))},{id:"solidity",name:"Solidity",import:(()=>L(()=>import("./solidity-rGO070M0.js"),[]))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>L(()=>import("./soy-8wufbnw4.js"),__vite__mapDeps([86,1,2,3])))},{id:"sparql",name:"SPARQL",import:(()=>L(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([87,88])))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>L(()=>import("./splunk-BtCnVYZw.js"),[]))},{id:"sql",name:"SQL",import:(()=>L(()=>import("./sql-CRqJ_cUM.js"),[]))},{id:"ssh-config",name:"SSH Config",import:(()=>L(()=>import("./ssh-config-_ykCGR6B.js"),[]))},{id:"stata",name:"Stata",import:(()=>L(()=>import("./stata-DI20mbqo.js"),__vite__mapDeps([89,16])))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>L(()=>import("./stylus-BEDo0Tqx.js"),[]))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>L(()=>import("./surrealql-Bq5Q-fJD.js"),__vite__mapDeps([90,2])))},{id:"svelte",name:"Svelte",import:(()=>L(()=>import("./svelte-Cy7k_4gC.js"),__vite__mapDeps([91,2,11,3,12])))},{id:"swift",name:"Swift",import:(()=>L(()=>import("./swift-D82vCrfD.js"),[]))},{id:"system-verilog",name:"SystemVerilog",import:(()=>L(()=>import("./system-verilog-CnnmHF94.js"),[]))},{id:"systemd",name:"Systemd Units",import:(()=>L(()=>import("./systemd-4A_iFExJ.js"),[]))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>L(()=>import("./talonscript-CkByrt1z.js"),[]))},{id:"tasl",name:"Tasl",import:(()=>L(()=>import("./tasl-QIJgUcNo.js"),[]))},{id:"tcl",name:"Tcl",import:(()=>L(()=>import("./tcl-dwOrl1Do.js"),[]))},{id:"templ",name:"Templ",import:(()=>L(()=>import("./templ-DhtptRzy.js"),__vite__mapDeps([92,93,2,3])))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>L(()=>import("./terraform-BETggiCN.js"),[]))},{id:"tex",name:"TeX",import:(()=>L(()=>import("./tex-idrVyKtj.js"),__vite__mapDeps([66,62])))},{id:"toml",name:"TOML",import:(()=>L(()=>import("./toml-vGWfd6FD.js"),[]))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>L(()=>import("./ts-tags-D351s5mN.js"),__vite__mapDeps([94,11,3,2,25,26,1,16,7,8])))},{id:"tsv",name:"TSV",import:(()=>L(()=>import("./tsv-B_m7g4N7.js"),[]))},{id:"tsx",name:"TSX",import:(()=>L(()=>import("./tsx-COt5Ahok.js"),[]))},{id:"turtle",name:"Turtle",import:(()=>L(()=>import("./turtle-BsS91CYL.js"),[]))},{id:"twig",name:"Twig",import:(()=>L(()=>import("./twig-CW1WmMYd.js"),__vite__mapDeps([95,3,2,5,75,1,7,8,16,9,20,33,34,35,11,36,13,23,24,25,26,28,37,38])))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>L(()=>import("./typescript-BPQ3VLAy.js"),[]))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>L(()=>import("./typespec-CAFt9gP4.js"),[]))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>L(()=>import("./typst-DHCkPAjA.js"),[]))},{id:"v",name:"V",import:(()=>L(()=>import("./v-BcVCzyr7.js"),[]))},{id:"vala",name:"Vala",import:(()=>L(()=>import("./vala-CsfeWuGM.js"),[]))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:(()=>L(()=>import("./vb-D17OF-Vu.js"),[]))},{id:"verilog",name:"Verilog",import:(()=>L(()=>import("./verilog-BQ8w6xss.js"),[]))},{id:"vhdl",name:"VHDL",import:(()=>L(()=>import("./vhdl-CeAyd5Ju.js"),[]))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>L(()=>import("./viml-CJc9bBzg.js"),[]))},{id:"vue",name:"Vue",import:(()=>L(()=>import("./vue-D2xRrEX4.js"),__vite__mapDeps([96,3,2,11,9,1,15])))},{id:"vue-html",name:"Vue HTML",import:(()=>L(()=>import("./vue-html-AaS7Mt5G.js"),__vite__mapDeps([97,2])))},{id:"vue-vine",name:"Vue Vine",import:(()=>L(()=>import("./vue-vine-BoDAl6tE.js"),__vite__mapDeps([98,3,5,69,99,12,2])))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>L(()=>import("./vyper-CDx5xZoG.js"),[]))},{id:"wasm",name:"WebAssembly",import:(()=>L(()=>import("./wasm-MzD3tlZU.js"),[]))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>L(()=>import("./wenyan-BV7otONQ.js"),[]))},{id:"wgsl",name:"WGSL",import:(()=>L(()=>import("./wgsl-Dx-B1_4e.js"),[]))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>L(()=>import("./wikitext-BhOHFoWU.js"),[]))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>L(()=>import("./wit-5i3qLPDT.js"),[]))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>L(()=>import("./wolfram-lXgVvXCa.js"),[]))},{id:"xml",name:"XML",import:(()=>L(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8])))},{id:"xsl",name:"XSL",import:(()=>L(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([100,7,8])))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>L(()=>import("./yaml-Buea-lGh.js"),[]))},{id:"zenscript",name:"ZenScript",import:(()=>L(()=>import("./zenscript-DVFEvuxE.js"),[]))},{id:"zig",name:"Zig",import:(()=>L(()=>import("./zig-VOosw3JB.js"),[]))}],I1=Object.fromEntries(Ad.map(e=>[e.id,e.import])),D1=Object.fromEntries(Ad.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),M1={...I1,...D1},P1=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>L(()=>import("./andromeeda-C4gqWexZ.js"),[]))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>L(()=>import("./aurora-x-D-2ljcwZ.js"),[]))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>L(()=>import("./ayu-dark-DYE7WIF3.js"),[]))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>L(()=>import("./ayu-light-BA47KaF1.js"),[]))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>L(()=>import("./ayu-mirage-32ctXXKs.js"),[]))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>L(()=>import("./catppuccin-frappe-DFWUc33u.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>L(()=>import("./catppuccin-latte-C9dUb6Cb.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>L(()=>import("./catppuccin-macchiato-DQyhUUbL.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>L(()=>import("./catppuccin-mocha-D87Tk5Gz.js"),[]))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>L(()=>import("./dark-plus-C3mMm8J8.js"),[]))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>L(()=>import("./dracula-BzJJZx-M.js"),[]))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>L(()=>import("./dracula-soft-BXkSAIEj.js"),[]))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>L(()=>import("./everforest-dark-BgDCqdQA.js"),[]))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>L(()=>import("./everforest-light-C8M2exoo.js"),[]))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>L(()=>import("./github-dark-DHJKELXO.js"),[]))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>L(()=>import("./github-dark-default-Cuk6v7N8.js"),[]))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>L(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>L(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>L(()=>import("./github-light-DAi9KRSo.js"),[]))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>L(()=>import("./github-light-default-D7oLnXFd.js"),[]))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>L(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>L(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>L(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>L(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>L(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>L(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>L(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>L(()=>import("./horizon-BUw7H-hv.js"),[]))},{id:"horizon-bright",displayName:"Horizon Bright",type:"light",import:(()=>L(()=>import("./horizon-bright-CUuTKBJd.js"),[]))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>L(()=>import("./houston-DnULxvSX.js"),[]))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>L(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>L(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>L(()=>import("./kanagawa-wave-DWedfzmr.js"),[]))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>L(()=>import("./laserwave-DUszq2jm.js"),[]))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>L(()=>import("./light-plus-B7mTdjB0.js"),[]))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>L(()=>import("./material-theme-D5KoaKCx.js"),[]))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>L(()=>import("./material-theme-darker-BfHTSMKl.js"),[]))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>L(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>L(()=>import("./material-theme-ocean-CyktbL80.js"),[]))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>L(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>L(()=>import("./min-dark-CafNBF8u.js"),[]))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>L(()=>import("./min-light-CTRr51gU.js"),[]))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>L(()=>import("./monokai-D4h5O-jR.js"),[]))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>L(()=>import("./night-owl-C39BiMTA.js"),[]))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>L(()=>import("./night-owl-light-CMTm3GFP.js"),[]))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>L(()=>import("./nord-Ddv68eIx.js"),[]))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>L(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>L(()=>import("./one-light-C3Wv6jpd.js"),[]))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>L(()=>import("./plastic-3e1v2bzS.js"),[]))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>L(()=>import("./poimandres-CS3Unz2-.js"),[]))},{id:"red",displayName:"Red",type:"dark",import:(()=>L(()=>import("./red-bN70gL4F.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>L(()=>import("./rose-pine-qdsjHGoJ.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>L(()=>import("./rose-pine-dawn-DHQR4-dF.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>L(()=>import("./rose-pine-moon-D4_iv3hh.js"),[]))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>L(()=>import("./slack-dark-BthQWCQV.js"),[]))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>L(()=>import("./slack-ochin-DqwNpetd.js"),[]))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>L(()=>import("./snazzy-light-Bw305WKR.js"),[]))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>L(()=>import("./solarized-dark-DXbdFlpD.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>L(()=>import("./solarized-light-L9t79GZl.js"),[]))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>L(()=>import("./synthwave-84-CbfX1IO0.js"),[]))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>L(()=>import("./tokyo-night-hegEt444.js"),[]))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>L(()=>import("./vesper-DRje8inN.js"),[]))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>L(()=>import("./vitesse-black-Bkuqu6BP.js"),[]))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>L(()=>import("./vitesse-dark-D0r3Knsf.js"),[]))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>L(()=>import("./vitesse-light-CVO1_9PV.js"),[]))}],B1=Object.fromEntries(P1.map(e=>[e.id,e.import]));var j1=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function xG(){return 2147483648}function TG(){return typeof performance<"u"?performance.now():Date.now()}const vG=(e,t)=>e+(t-e%t)%t;async function SG(e){let t,n;const r={};function i(y){n=y,r.HEAPU8=new Uint8Array(y),r.HEAPU32=new Uint32Array(y)}function o(y,T,S){r.HEAPU8.copyWithin(y,T,T+S)}function l(y){try{return t.grow(y-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function c(y){const T=r.HEAPU8.length;y=y>>>0;const S=xG();if(y>S)return!1;for(let C=1;C<=4;C*=2){let w=T*(1+.2/C);w=Math.min(w,y+100663296);const k=Math.min(S,vG(Math.max(y,w),65536));if(l(k))return!0}return!1}const f=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function h(y,T,S=1024){const C=T+S;let w=T;for(;y[w]&&!(w>=C);)++w;if(w-T>16&&y.buffer&&f)return f.decode(y.subarray(T,w));let k="";for(;T<w;){let N=y[T++];if(!(N&128)){k+=String.fromCharCode(N);continue}const M=y[T++]&63;if((N&224)===192){k+=String.fromCharCode((N&31)<<6|M);continue}const U=y[T++]&63;if((N&240)===224?N=(N&15)<<12|M<<6|U:N=(N&7)<<18|M<<12|U<<6|y[T++]&63,N<65536)k+=String.fromCharCode(N);else{const P=N-65536;k+=String.fromCharCode(55296|P>>10,56320|P&1023)}}return k}function p(y,T){return y?h(r.HEAPU8,y,T):""}const m={emscripten_get_now:TG,emscripten_memcpy_big:o,emscripten_resize_heap:c,fd_write:()=>0};async function E(){const T=await e({env:m,wasi_snapshot_preview1:m});t=T.memory,i(t.buffer),Object.assign(r,T),r.UTF8ToString=p}return await E(),r}var AG=Object.defineProperty,CG=(e,t,n)=>t in e?AG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,zt=(e,t,n)=>CG(e,typeof t!="symbol"?t+"":t,n);let Qt=null;function wG(e){throw new j1(e.UTF8ToString(e.getLastOnigError()))}class Cd{constructor(t){zt(this,"utf16Length"),zt(this,"utf8Length"),zt(this,"utf16Value"),zt(this,"utf8Value"),zt(this,"utf16OffsetToUtf8"),zt(this,"utf8OffsetToUtf16");const n=t.length,r=Cd._utf8ByteLength(t),i=r!==n,o=i?new Uint32Array(n+1):null;i&&(o[n]=r);const l=i?new Uint32Array(r+1):null;i&&(l[r]=n);const c=new Uint8Array(r);let f=0;for(let h=0;h<n;h++){const p=t.charCodeAt(h);let m=p,E=!1;if(p>=55296&&p<=56319&&h+1<n){const y=t.charCodeAt(h+1);y>=56320&&y<=57343&&(m=(p-55296<<10)+65536|y-56320,E=!0)}i&&(o[h]=f,E&&(o[h+1]=f),m<=127?l[f+0]=h:m<=2047?(l[f+0]=h,l[f+1]=h):m<=65535?(l[f+0]=h,l[f+1]=h,l[f+2]=h):(l[f+0]=h,l[f+1]=h,l[f+2]=h,l[f+3]=h)),m<=127?c[f++]=m:m<=2047?(c[f++]=192|(m&1984)>>>6,c[f++]=128|(m&63)>>>0):m<=65535?(c[f++]=224|(m&61440)>>>12,c[f++]=128|(m&4032)>>>6,c[f++]=128|(m&63)>>>0):(c[f++]=240|(m&1835008)>>>18,c[f++]=128|(m&258048)>>>12,c[f++]=128|(m&4032)>>>6,c[f++]=128|(m&63)>>>0),E&&h++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=c,this.utf16OffsetToUtf8=o,this.utf8OffsetToUtf16=l}static _utf8ByteLength(t){let n=0;for(let r=0,i=t.length;r<i;r++){const o=t.charCodeAt(r);let l=o,c=!1;if(o>=55296&&o<=56319&&r+1<i){const f=t.charCodeAt(r+1);f>=56320&&f<=57343&&(l=(o-55296<<10)+65536|f-56320,c=!0)}l<=127?n+=1:l<=2047?n+=2:l<=65535?n+=3:n+=4,c&&r++}return n}createString(t){const n=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,n),n}}const wd=class kr{constructor(t){if(zt(this,"id",++kr.LAST_ID),zt(this,"_onigBinding"),zt(this,"content"),zt(this,"utf16Length"),zt(this,"utf8Length"),zt(this,"utf16OffsetToUtf8"),zt(this,"utf8OffsetToUtf16"),zt(this,"ptr"),!Qt)throw new j1("Must invoke loadWasm first.");this._onigBinding=Qt,this.content=t;const n=new Cd(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!kr._sharedPtrInUse?(kr._sharedPtr||(kr._sharedPtr=Qt.omalloc(1e4)),kr._sharedPtrInUse=!0,Qt.HEAPU8.set(n.utf8Value,kr._sharedPtr),this.ptr=kr._sharedPtr):this.ptr=n.createString(Qt)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===kr._sharedPtr?kr._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};zt(wd,"LAST_ID",0);zt(wd,"_sharedPtr",0);zt(wd,"_sharedPtrInUse",!1);let eN=wd;class kG{constructor(t){if(zt(this,"_onigBinding"),zt(this,"_ptr"),!Qt)throw new j1("Must invoke loadWasm first.");const n=[],r=[];for(let c=0,f=t.length;c<f;c++){const h=new Cd(t[c]);n[c]=h.createString(Qt),r[c]=h.utf8Length}const i=Qt.omalloc(4*t.length);Qt.HEAPU32.set(n,i/4);const o=Qt.omalloc(4*t.length);Qt.HEAPU32.set(r,o/4);const l=Qt.createOnigScanner(i,o,t.length);for(let c=0,f=t.length;c<f;c++)Qt.ofree(n[c]);Qt.ofree(o),Qt.ofree(i),l===0&&wG(Qt),this._onigBinding=Qt,this._ptr=l}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,n,r){let i=0;if(typeof r=="number"&&(i=r),typeof t=="string"){t=new eN(t);const o=this._findNextMatchSync(t,n,!1,i);return t.dispose(),o}return this._findNextMatchSync(t,n,!1,i)}_findNextMatchSync(t,n,r,i){const o=this._onigBinding,l=o.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(n),i);if(l===0)return null;const c=o.HEAPU32;let f=l/4;const h=c[f++],p=c[f++],m=[];for(let E=0;E<p;E++){const y=t.convertUtf8OffsetToUtf16(c[f++]),T=t.convertUtf8OffsetToUtf16(c[f++]);m[E]={start:y,end:T,length:T-y}}return{index:h,captureIndices:m}}}function NG(e){return typeof e.instantiator=="function"}function RG(e){return typeof e.default=="function"}function OG(e){return typeof e.data<"u"}function LG(e){return typeof Response<"u"&&e instanceof Response}function IG(e){return typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<"u"&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&e instanceof Uint32Array}let Zc;function U1(e){if(Zc)return Zc;async function t(){Qt=await SG(async n=>{let r=e;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),NG(r)?r=await r.instantiator(n):RG(r)?r=await r.default(n):(OG(r)&&(r=r.data),LG(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await DG(r)(n):r=await MG(r)(n):IG(r)?r=await zp(r)(n):r instanceof WebAssembly.Module?r=await zp(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await zp(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return Zc=t(),Zc}function zp(e){return t=>WebAssembly.instantiate(e,t)}function DG(e){return t=>WebAssembly.instantiateStreaming(e,t)}function MG(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}let tN;function PG(e){tN=e}function BG(){return tN}async function nN(e){return e&&await U1(e),{createScanner(t){return new kG(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new eN(t)}}}const jG=Object.freeze(Object.defineProperty({__proto__:null,createOnigurumaEngine:nN,getDefaultWasmLoader:BG,loadWasm:U1,setDefaultWasmLoader:PG},Symbol.toStringTag,{value:"Module"}));var rN=L1({});Jk(rN,jG);var yt=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function UG(e){return H1(e)}function H1(e){return Array.isArray(e)?HG(e):e instanceof RegExp?e:typeof e=="object"?zG(e):e}function HG(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=H1(e[n]);return t}function zG(e){let t={};for(let n in e)t[n]=H1(e[n]);return t}function aN(e,...t){return t.forEach(n=>{for(let r in n)e[r]=n[r]}),e}function iN(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?iN(e.substring(0,e.length-1)):e.substr(~t+1)}var Fp=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Jc=class{static hasCaptures(e){return e===null?!1:(Fp.lastIndex=0,Fp.test(e))}static replaceCaptures(e,t,n){return e.replace(Fp,(r,i,o,l)=>{let c=n[parseInt(i||o,10)];if(c){let f=t.substring(c.start,c.end);for(;f[0]===".";)f=f.substring(1);switch(l){case"downcase":return f.toLowerCase();case"upcase":return f.toUpperCase();default:return f}}else return r})}};function sN(e,t){return e<t?-1:e>t?1:0}function oN(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let i=0;i<n;i++){let o=sN(e[i],t[i]);if(o!==0)return o}return 0}return n-r}function Pv(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function lN(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var uN=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},Bf=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(VG(e),t)}static createFromParsedTheme(e,t){return qG(e,t)}_cachedMatchRoot=new uN(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,r=this._cachedMatchRoot.get(t).find(i=>FG(e.parent,i.parentScopes));return r?new cN(r.fontStyle,r.foreground,r.background):null}},$p=class pf{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const r of n)t=new pf(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new pf(n,t[r]);return n}push(t){return new pf(this,t)}getSegments(){let t=this;const n=[];for(;t;)n.push(t.scopeName),t=t.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){const n=[];let r=this;for(;r&&r!==t;)n.push(r.scopeName),r=r.parent;return r===t?n.reverse():void 0}};function FG(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===">"){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!$G(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function $G(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var cN=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function VG(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let i=0,o=t.length;i<o;i++){let l=t[i];if(!l.settings)continue;let c;if(typeof l.scope=="string"){let m=l.scope;m=m.replace(/^[,]+/,""),m=m.replace(/[,]+$/,""),c=m.split(",")}else Array.isArray(l.scope)?c=l.scope:c=[""];let f=-1;if(typeof l.settings.fontStyle=="string"){f=0;let m=l.settings.fontStyle.split(" ");for(let E=0,y=m.length;E<y;E++)switch(m[E]){case"italic":f=f|1;break;case"bold":f=f|2;break;case"underline":f=f|4;break;case"strikethrough":f=f|8;break}}let h=null;typeof l.settings.foreground=="string"&&Pv(l.settings.foreground)&&(h=l.settings.foreground);let p=null;typeof l.settings.background=="string"&&Pv(l.settings.background)&&(p=l.settings.background);for(let m=0,E=c.length;m<E;m++){let T=c[m].trim().split(" "),S=T[T.length-1],C=null;T.length>1&&(C=T.slice(0,T.length-1),C.reverse()),n[r++]=new GG(S,C,i,f,h,p)}}return n}var GG=class{constructor(e,t,n,r,i,o){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=o}},sn=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))(sn||{});function qG(e,t){e.sort((f,h)=>{let p=sN(f.scope,h.scope);return p!==0||(p=oN(f.parentScopes,h.parentScopes),p!==0)?p:f.index-h.index});let n=0,r="#000000",i="#ffffff";for(;e.length>=1&&e[0].scope==="";){let f=e.shift();f.fontStyle!==-1&&(n=f.fontStyle),f.foreground!==null&&(r=f.foreground),f.background!==null&&(i=f.background)}let o=new YG(t),l=new cN(n,o.getId(r),o.getId(i)),c=new QG(new $0(0,null,-1,0,0),[]);for(let f=0,h=e.length;f<h;f++){let p=e[f];c.insert(0,p.scope,p.parentScopes,p.fontStyle,o.getId(p.foreground),o.getId(p.background))}return new Bf(o,l,c)}var YG=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},XG=Object.freeze([]),$0=class fN{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(t,n,r,i,o){this.scopeDepth=t,this.parentScopes=n||XG,this.fontStyle=r,this.foreground=i,this.background=o}clone(){return new fN(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let n=[];for(let r=0,i=t.length;r<i;r++)n[r]=t[r].clone();return n}acceptOverwrite(t,n,r,i){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),i!==0&&(this.background=i)}},QG=class V0{constructor(t,n=[],r={}){this._mainRule=t,this._children=r,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let r=0,i=0;for(;t.parentScopes[r]===">"&&r++,n.parentScopes[i]===">"&&i++,!(r>=t.parentScopes.length||i>=n.parentScopes.length);){const o=n.parentScopes[i].length-t.parentScopes[r].length;if(o!==0)return o;r++,i++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let r=t.indexOf("."),i,o;if(r===-1?(i=t,o=""):(i=t.substring(0,r),o=t.substring(r+1)),this._children.hasOwnProperty(i))return this._children[i].match(o)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(V0._cmpBySpecificity),n}insert(t,n,r,i,o,l){if(n===""){this._doInsertHere(t,r,i,o,l);return}let c=n.indexOf("."),f,h;c===-1?(f=n,h=""):(f=n.substring(0,c),h=n.substring(c+1));let p;this._children.hasOwnProperty(f)?p=this._children[f]:(p=new V0(this._mainRule.clone(),$0.cloneArr(this._rulesWithParentScopes)),this._children[f]=p),p.insert(t+1,h,r,i,o,l)}_doInsertHere(t,n,r,i,o){if(n===null){this._mainRule.acceptOverwrite(t,r,i,o);return}for(let l=0,c=this._rulesWithParentScopes.length;l<c;l++){let f=this._rulesWithParentScopes[l];if(oN(f.parentScopes,n)===0){f.acceptOverwrite(t,r,i,o);return}}r===-1&&(r=this._mainRule.fontStyle),i===0&&(i=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new $0(t,n,r,i,o))}},Vi=class tr{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=tr.getLanguageId(t),r=tr.getTokenType(t),i=tr.getFontStyle(t),o=tr.getForeground(t),l=tr.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:o,background:l})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,n,r,i,o,l,c){let f=tr.getLanguageId(t),h=tr.getTokenType(t),p=tr.containsBalancedBrackets(t)?1:0,m=tr.getFontStyle(t),E=tr.getForeground(t),y=tr.getBackground(t);return n!==0&&(f=n),r!==8&&(h=r),i!==null&&(p=i?1:0),o!==-1&&(m=o),l!==0&&(E=l),c!==0&&(y=c),(f<<0|h<<8|p<<10|m<<11|E<<15|y<<24)>>>0}};function jf(e,t){const n=[],r=WG(e);let i=r.next();for(;i!==null;){let f=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":f=1;break;case"L":f=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let h=l();if(n.push({matcher:h,priority:f}),i!==",")break;i=r.next()}return n;function o(){if(i==="-"){i=r.next();const f=o();return h=>!!f&&!f(h)}if(i==="("){i=r.next();const f=c();return i===")"&&(i=r.next()),f}if(Bv(i)){const f=[];do f.push(i),i=r.next();while(Bv(i));return h=>t(f,h)}return null}function l(){const f=[];let h=o();for(;h;)f.push(h),h=o();return p=>f.every(m=>m(p))}function c(){const f=[];let h=l();for(;h&&(f.push(h),i==="|"||i===",");){do i=r.next();while(i==="|"||i===",");h=l()}return p=>f.some(m=>m(p))}}function Bv(e){return!!e&&!!e.match(/[\w\.:]+/)}function WG(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const r=n[0];return n=t.exec(e),r}}}function dN(e){typeof e.dispose=="function"&&e.dispose()}var Kl=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},KG=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},ZG=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},JG=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Kl(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new ZG;for(const n of e)eq(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof Kl){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function eq(e,t,n,r){const i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const o=n.lookup(t);e instanceof Kl?gf({baseGrammar:o,selfGrammar:i},r):G0(e.ruleName,{baseGrammar:o,selfGrammar:i,repository:i.repository},r);const l=n.injections(e.scopeName);if(l)for(const c of l)r.add(new Kl(c))}function G0(e,t,n){if(t.repository&&t.repository[e]){const r=t.repository[e];Uf([r],t,n)}}function gf(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Uf(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Uf(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Uf(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const i=r.repository?aN({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&Uf(r.patterns,{...t,repository:i},n);const o=r.include;if(!o)continue;const l=hN(o);switch(l.kind){case 0:gf({...t,selfGrammar:t.baseGrammar},n);break;case 1:gf(t,n);break;case 2:G0(l.ruleName,{...t,repository:i},n);break;case 3:case 4:const c=l.scopeName===t.selfGrammar.scopeName?t.selfGrammar:l.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(c){const f={baseGrammar:t.baseGrammar,selfGrammar:c,repository:i};l.kind===4?G0(l.ruleName,f,n):gf(f,n)}else l.kind===4?n.add(new KG(l.scopeName,l.ruleName)):n.add(new Kl(l.scopeName));break}}}var tq=class{kind=0},nq=class{kind=1},rq=class{constructor(e){this.ruleName=e}kind=2},aq=class{constructor(e){this.scopeName=e}kind=3},iq=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function hN(e){if(e==="$base")return new tq;if(e==="$self")return new nq;const t=e.indexOf("#");if(t===-1)return new aq(e);if(t===0)return new rq(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new iq(n,r)}}var sq=/\\(\d+)/,jv=/\\(\d+)/g,oq=-1,mN=-2;var pu=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Jc.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Jc.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${iN(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:Jc.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Jc.replaceCaptures(this._contentName,e,t)}},lq=class extends pu{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,r){throw new Error("Not supported!")}},uq=class extends pu{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new Zl(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Jl,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Uv=class extends pu{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Jl,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},q0=class extends pu{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,o,l,c,f,h){super(e,t,n,r),this._begin=new Zl(i,this.id),this.beginCaptures=o,this._end=new Zl(l||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=c,this.applyEndPatternLast=f||!1,this.patterns=h.patterns,this.hasMissingPatterns=h.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Jl;for(const n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},Hf=class extends pu{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,o,l,c,f){super(e,t,n,r),this._begin=new Zl(i,this.id),this.beginCaptures=o,this.whileCaptures=c,this._while=new Zl(l,mN),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=f.patterns,this.hasMissingPatterns=f.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Jl;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Jl,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||""),this._cachedCompiledWhilePatterns}},pN=class an{static createCaptureRule(t,n,r,i,o){return t.registerRule(l=>new lq(n,l,r,i,o))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new uq(t.$vscodeTextmateLocation,t.id,t.name,t.match,an._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=aN({},r,t.repository));let o=t.patterns;return typeof o>"u"&&t.include&&(o=[{include:t.include}]),new Uv(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,an._compilePatterns(o,n,r))}return t.while?new Hf(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,an._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,an._compileCaptures(t.whileCaptures||t.captures,n,r),an._compilePatterns(t.patterns,n,r)):new q0(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,an._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,an._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,an._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let o=0;for(const l in t){if(l==="$vscodeTextmateLocation")continue;const c=parseInt(l,10);c>o&&(o=c)}for(let l=0;l<=o;l++)i[l]=null;for(const l in t){if(l==="$vscodeTextmateLocation")continue;const c=parseInt(l,10);let f=0;t[l].patterns&&(f=an.getCompiledRuleId(t[l],n,r)),i[c]=an.createCaptureRule(n,t[l].$vscodeTextmateLocation,t[l].name,t[l].contentName,f)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let o=0,l=t.length;o<l;o++){const c=t[o];let f=-1;if(c.include){const h=hN(c.include);switch(h.kind){case 0:case 1:f=an.getCompiledRuleId(r[c.include],n,r);break;case 2:let p=r[h.ruleName];p&&(f=an.getCompiledRuleId(p,n,r));break;case 3:case 4:const m=h.scopeName,E=h.kind===4?h.ruleName:null,y=n.getExternalGrammar(m,r);if(y)if(E){let T=y.repository[E];T&&(f=an.getCompiledRuleId(T,n,y.repository))}else f=an.getCompiledRuleId(y.repository.$self,n,y.repository);break}}else f=an.getCompiledRuleId(c,n,r);if(f!==-1){const h=n.getRule(f);let p=!1;if((h instanceof Uv||h instanceof q0||h instanceof Hf)&&h.hasMissingPatterns&&h.patterns.length===0&&(p=!0),p)continue;i.push(f)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},Zl=class gN{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(t,n){if(t&&typeof t=="string"){const r=t.length;let i=0,o=[],l=!1;for(let c=0;c<r;c++)if(t.charAt(c)==="\\"&&c+1<r){const h=t.charAt(c+1);h==="z"?(o.push(t.substring(i,c)),o.push("$(?!\\n)(?<!\\n)"),i=c+2):(h==="A"||h==="G")&&(l=!0),c++}this.hasAnchor=l,i===0?this.source=t:(o.push(t.substring(i,r)),this.source=o.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=sq.test(this.source):this.hasBackReferences=!1}clone(){return new gN(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=n.map(i=>t.substring(i.start,i.end));return jv.lastIndex=0,this.source.replace(jv,(i,o)=>lN(r[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],n=[],r=[],i=[],o,l,c,f;for(o=0,l=this.source.length;o<l;o++)c=this.source.charAt(o),t[o]=c,n[o]=c,r[o]=c,i[o]=c,c==="\\"&&o+1<l&&(f=this.source.charAt(o+1),f==="A"?(t[o+1]="",n[o+1]="",r[o+1]="A",i[o+1]="A"):f==="G"?(t[o+1]="",n[o+1]="G",r[o+1]="",i[o+1]="G"):(t[o+1]=f,n[o+1]=f,r[o+1]=f,i[o+1]=f),o++);return{A0_G0:t.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:i.join("")}}resolveAnchors(t,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Jl=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(n=>n.source);this._cached=new Hv(e,t,this._items.map(n=>n.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let r=this._items.map(i=>i.resolveAnchors(t,n));return new Hv(e,r,this._items.map(i=>i.ruleId))}},Hv=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
|
|
180
|
+
`)}findNextMatchSync(e,t,n){const r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},Vp=class{constructor(e,t){this.languageId=e,this.tokenType=t}},cq=class Y0{_defaultAttributes;_embeddedLanguagesMatcher;constructor(t,n){this._defaultAttributes=new Vp(t,8),this._embeddedLanguagesMatcher=new fq(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?Y0._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new Vp(0,0);_getBasicScopeAttributes=new uN(t=>{const n=this._scopeToLanguage(t),r=this._toStandardTokenType(t);return new Vp(n,r)});_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(Y0.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},fq=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([n,r])=>lN(n));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}},zv=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function bN(e,t,n,r,i,o,l,c){const f=t.content.length;let h=!1,p=-1;if(l){const y=dq(e,t,n,r,i,o);i=y.stack,r=y.linePos,n=y.isFirstLine,p=y.anchorPosition}const m=Date.now();for(;!h;){if(c!==0&&Date.now()-m>c)return new zv(i,!0);E()}return new zv(i,!1);function E(){const y=hq(e,t,n,r,i,p);if(!y){o.produce(i,f),h=!0;return}const T=y.captureIndices,S=y.matchedRuleId,C=T&&T.length>0?T[0].end>r:!1;if(S===oq){const w=i.getRule(e);o.produce(i,T[0].start),i=i.withContentNameScopesList(i.nameScopesList),Dl(e,t,n,i,o,w.endCaptures,T),o.produce(i,T[0].end);const k=i;if(i=i.parent,p=k.getAnchorPos(),!C&&k.getEnterPos()===r){i=k,o.produce(i,f),h=!0;return}}else{const w=e.getRule(S);o.produce(i,T[0].start);const k=i,N=w.getName(t.content,T),M=i.contentNameScopesList.pushAttributed(N,e);if(i=i.push(S,r,p,T[0].end===f,null,M,M),w instanceof q0){const U=w;Dl(e,t,n,i,o,U.beginCaptures,T),o.produce(i,T[0].end),p=T[0].end;const P=U.getContentName(t.content,T),V=M.pushAttributed(P,e);if(i=i.withContentNameScopesList(V),U.endHasBackReferences&&(i=i.withEndRule(U.getEndWithResolvedBackReferences(t.content,T))),!C&&k.hasSameRuleAs(i)){i=i.pop(),o.produce(i,f),h=!0;return}}else if(w instanceof Hf){const U=w;Dl(e,t,n,i,o,U.beginCaptures,T),o.produce(i,T[0].end),p=T[0].end;const P=U.getContentName(t.content,T),V=M.pushAttributed(P,e);if(i=i.withContentNameScopesList(V),U.whileHasBackReferences&&(i=i.withEndRule(U.getWhileWithResolvedBackReferences(t.content,T))),!C&&k.hasSameRuleAs(i)){i=i.pop(),o.produce(i,f),h=!0;return}}else if(Dl(e,t,n,i,o,w.captures,T),o.produce(i,T[0].end),i=i.pop(),!C){i=i.safePop(),o.produce(i,f),h=!0;return}}T[0].end>r&&(r=T[0].end,n=!1)}}function dq(e,t,n,r,i,o){let l=i.beginRuleCapturedEOL?0:-1;const c=[];for(let f=i;f;f=f.pop()){const h=f.getRule(e);h instanceof Hf&&c.push({rule:h,stack:f})}for(let f=c.pop();f;f=c.pop()){const{ruleScanner:h,findOptions:p}=gq(f.rule,e,f.stack.endRule,n,r===l),m=h.findNextMatchSync(t,r,p);if(m){if(m.ruleId!==mN){i=f.stack.pop();break}m.captureIndices&&m.captureIndices.length&&(o.produce(f.stack,m.captureIndices[0].start),Dl(e,t,n,f.stack,o,f.rule.whileCaptures,m.captureIndices),o.produce(f.stack,m.captureIndices[0].end),l=m.captureIndices[0].end,m.captureIndices[0].end>r&&(r=m.captureIndices[0].end,n=!1))}else{i=f.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:l,isFirstLine:n}}function hq(e,t,n,r,i,o){const l=mq(e,t,n,r,i,o),c=e.getInjections();if(c.length===0)return l;const f=pq(c,e,t,n,r,i,o);if(!f)return l;if(!l)return f;const h=l.captureIndices[0].start,p=f.captureIndices[0].start;return p<h||f.priorityMatch&&p===h?f:l}function mq(e,t,n,r,i,o){const l=i.getRule(e),{ruleScanner:c,findOptions:f}=EN(l,e,i.endRule,n,r===o),h=c.findNextMatchSync(t,r,f);return h?{captureIndices:h.captureIndices,matchedRuleId:h.ruleId}:null}function pq(e,t,n,r,i,o,l){let c=Number.MAX_VALUE,f=null,h,p=0;const m=o.contentNameScopesList.getScopeNames();for(let E=0,y=e.length;E<y;E++){const T=e[E];if(!T.matcher(m))continue;const S=t.getRule(T.ruleId),{ruleScanner:C,findOptions:w}=EN(S,t,null,r,i===l),k=C.findNextMatchSync(n,i,w);if(!k)continue;const N=k.captureIndices[0].start;if(!(N>=c)&&(c=N,f=k.captureIndices,h=k.ruleId,p=T.priority,c===i))break}return f?{priorityMatch:p===-1,captureIndices:f,matchedRuleId:h}:null}function EN(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function gq(e,t,n,r,i){return{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function Dl(e,t,n,r,i,o,l){if(o.length===0)return;const c=t.content,f=Math.min(o.length,l.length),h=[],p=l[0].end;for(let m=0;m<f;m++){const E=o[m];if(E===null)continue;const y=l[m];if(y.length===0)continue;if(y.start>p)break;for(;h.length>0&&h[h.length-1].endPos<=y.start;)i.produceFromScopes(h[h.length-1].scopes,h[h.length-1].endPos),h.pop();if(h.length>0?i.produceFromScopes(h[h.length-1].scopes,y.start):i.produce(r,y.start),E.retokenizeCapturedWithRuleId){const S=E.getName(c,l),C=r.contentNameScopesList.pushAttributed(S,e),w=E.getContentName(c,l),k=C.pushAttributed(w,e),N=r.push(E.retokenizeCapturedWithRuleId,y.start,-1,!1,null,C,k),M=e.createOnigString(c.substring(0,y.end));bN(e,M,n&&y.start===0,y.start,N,i,!1,0),dN(M);continue}const T=E.getName(c,l);if(T!==null){const C=(h.length>0?h[h.length-1].scopes:r.contentNameScopesList).pushAttributed(T,e);h.push(new bq(C,y.end))}}for(;h.length>0;)i.produceFromScopes(h[h.length-1].scopes,h[h.length-1].endPos),h.pop()}var bq=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function Eq(e,t,n,r,i,o,l,c){return new _q(e,t,n,r,i,o,l,c)}function Fv(e,t,n,r,i){const o=jf(t,zf),l=pN.getCompiledRuleId(n,r,i.repository);for(const c of o)e.push({debugSelector:t,matcher:c.matcher,ruleId:l,grammar:i,priority:c.priority})}function zf(e,t){if(t.length<e.length)return!1;let n=0;return e.every(r=>{for(let i=n;i<t.length;i++)if(yq(t[i],r))return n=i+1,!0;return!1})}function yq(e,t){if(!e)return!1;if(e===t)return!0;const n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]==="."}var _q=class{constructor(e,t,n,r,i,o,l,c){if(this._rootScopeName=e,this.balancedBracketSelectors=o,this._onigLib=c,this._basicScopeAttributesProvider=new cq(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=l,this._grammar=$v(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const f of Object.keys(i)){const h=jf(f,zf);for(const p of h)this._tokenTypeMatchers.push({matcher:p.matcher,type:i[f]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e={lookup:i=>i===this._rootScopeName?this._grammar:this.getExternalGrammar(i),injections:i=>this._grammarRepository.injections(i)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){const i=r.injections;if(i)for(let l in i)Fv(t,l,i[l],this,r);const o=this._grammarRepository.injections(n);o&&o.forEach(l=>{const c=this.getExternalGrammar(l);if(c){const f=c.injectionSelector;f&&Fv(t,f,c,this,c)}})}return t.sort((i,o)=>i.priority-o.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=$v(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){const r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){const r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=pN.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===X0.NULL){i=!0;const h=this._basicScopeAttributesProvider.getDefaultAttributes(),p=this.themeProvider.getDefaults(),m=Vi.set(0,h.languageId,h.tokenType,null,p.fontStyle,p.foregroundId,p.backgroundId),E=this.getRule(this._rootId).getName(null,null);let y;E?y=Vl.createRootAndLookUpScopeName(E,m,this):y=Vl.createRoot("unknown",m),t=new X0(null,this._rootId,-1,-1,!1,null,y,y)}else i=!1,t.reset();e=e+`
|
|
181
|
+
`;const o=this.createOnigString(e),l=o.content.length,c=new Tq(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),f=bN(this,o,i,0,t,c,!0,r);return dN(o),{lineLength:l,lineTokens:c,ruleStack:f.stack,stoppedEarly:f.stoppedEarly}}};function $v(e,t){return e=UG(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var Vl=class Nr{constructor(t,n,r){this.parent=t,this.scopePath=n,this.tokenAttributes=r}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(const o of n)i=$p.push(i,o.scopeNames),r=new Nr(r,i,o.encodedTokenAttributes);return r}static createRoot(t,n){return new Nr(null,new $p(null,t),n)}static createRootAndLookUpScopeName(t,n,r){const i=r.getMetadataForScope(t),o=new $p(null,t),l=r.themeProvider.themeMatch(o),c=Nr.mergeAttributes(n,i,l);return new Nr(null,o,c)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return Nr.equals(this,t)}static equals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.scopeName!==n.scopeName||t.tokenAttributes!==n.tokenAttributes)return!1;t=t.parent,n=n.parent}while(!0)}static mergeAttributes(t,n,r){let i=-1,o=0,l=0;return r!==null&&(i=r.fontStyle,o=r.foregroundId,l=r.backgroundId),Vi.set(t,n.languageId,n.tokenType,null,i,o,l)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return Nr._pushAttributed(this,t,n);const r=t.split(/ /g);let i=this;for(const o of r)i=Nr._pushAttributed(i,o,n);return i}static _pushAttributed(t,n,r){const i=r.getMetadataForScope(n),o=t.scopePath.push(n),l=r.themeProvider.themeMatch(o),c=Nr.mergeAttributes(t.tokenAttributes,i,l);return new Nr(t,o,c)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){const n=[];let r=this;for(;r&&r!==t;)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(r.parent?.scopePath??null)}),r=r.parent;return r===t?n.reverse():void 0}},X0=class Mi{constructor(t,n,r,i,o,l,c,f){this.parent=t,this.ruleId=n,this.beginRuleCapturedEOL=o,this.endRule=l,this.nameScopesList=c,this.contentNameScopesList=f,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=i}_stackElementBrand=void 0;static NULL=new Mi(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:Mi._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?Vl.equals(t.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.depth!==n.depth||t.ruleId!==n.ruleId||t.endRule!==n.endRule)return!1;t=t.parent,n=n.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){Mi._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,o,l,c){return new Mi(this,t,n,r,i,o,l,c)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,n){return this.parent&&(n=this.parent._writeString(t,n)),t[n++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,n}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new Mi(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let n=this;for(;n&&n._enterPos===t._enterPos;){if(n.ruleId===t.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){const r=Vl.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new Mi(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Vl.fromExtension(r,n.contentNameScopesList))}},xq=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):jf(n,zf).map(r=>r.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>jf(n,zf).map(r=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},Tq=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let r=e?.tokenAttributes??0,i=!1;if(this.balancedBracketSelectors?.matchesAlways&&(i=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const o=e?.getScopeNames()??[];for(const l of this._tokenTypeOverrides)l.matcher(o)&&(r=Vi.set(r,0,l.type,null,-1,0,0));this.balancedBracketSelectors&&(i=this.balancedBracketSelectors.match(o))}if(i&&(r=Vi.set(r,0,8,i,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===r){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(r),this._lastTokenEndIndex=t;return}const n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let r=0,i=this._binaryTokens.length;r<i;r++)n[r]=this._binaryTokens[r];return n}},vq=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let o=this._rawGrammars.get(e);if(!o)return null;this._grammars.set(e,Eq(e,o,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},Sq=class{_options;_syncRegistry;_ensureGrammarCache;constructor(t){this._options=t,this._syncRegistry=new vq(Bf.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,n){this._syncRegistry.setTheme(Bf.createFromRawTheme(t,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,n,r){return this.loadGrammarWithConfiguration(t,n,{embeddedLanguages:r})}loadGrammarWithConfiguration(t,n,r){return this._loadGrammar(t,n,r.embeddedLanguages,r.tokenTypes,new xq(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,n,r,i,o){const l=new JG(this._syncRegistry,t);for(;l.Q.length>0;)l.Q.map(c=>this._loadSingleGrammar(c.scopeName)),l.processQueue();return this._grammarForScopeName(t,n,r,i,o)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const n=this._options.loadGrammar(t);if(n){const r=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(n,r)}}addGrammar(t,n=[],r=0,i=null){return this._syncRegistry.addGrammar(t,n),this._grammarForScopeName(t.scopeName,r,i)}_grammarForScopeName(t,n=0,r=null,i=null,o=null){return this._syncRegistry.grammarForScopeName(t,n,r,i,o)}},Q0=X0.NULL;function Ff(e,t){const n=typeof e=="string"?{}:{...e.colorReplacements},r=typeof e=="string"?e:e.name;for(const[i,o]of Object.entries(t?.colorReplacements||{}))typeof o=="string"?n[i]=o:i===r&&Object.assign(n,o);return n}function Ja(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function Aq(e){return Array.isArray(e)?e:[e]}async function yN(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function kd(e){return!e||["plaintext","txt","text","plain"].includes(e)}function _N(e){return e==="ansi"||kd(e)}function Nd(e){return e==="none"}function xN(e){return Nd(e)}const Cq=/(\r?\n)/g;function Rd(e,t=!1){if(e.length===0)return[["",0]];const n=e.split(Cq);let r=0;const i=[];for(let o=0;o<n.length;o+=2){const l=t?n[o]+(n[o+1]||""):n[o];i.push([l,r]),r+=n[o].length,r+=n[o+1]?.length||0}return i}const Vv={light:"#333333",dark:"#bbbbbb"},Gv={light:"#fffffe",dark:"#1e1e1e"},qv="__shiki_resolved";function z1(e){if(e?.[qv])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||="dark",t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){const c=t.settings?t.settings.find(f=>!f.name&&!f.scope):void 0;c?.settings?.foreground&&(r=c.settings.foreground),c?.settings?.background&&(n=c.settings.background),!r&&t?.colors?.["editor.foreground"]&&(r=t.colors["editor.foreground"]),!n&&t?.colors?.["editor.background"]&&(n=t.colors["editor.background"]),r||(r=t.type==="light"?Vv.light:Vv.dark),n||(n=t.type==="light"?Gv.light:Gv.dark),t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0;const o=new Map;function l(c){if(o.has(c))return o.get(c);i+=1;const f=`#${i.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${f}`]?l(c):(o.set(c,f),f)}t.settings=t.settings.map(c=>{const f=c.settings?.foreground&&!c.settings.foreground.startsWith("#"),h=c.settings?.background&&!c.settings.background.startsWith("#");if(!f&&!h)return c;const p={...c,settings:{...c.settings}};if(f){const m=l(c.settings.foreground);t.colorReplacements[m]=c.settings.foreground,p.settings.foreground=m}if(h){const m=l(c.settings.background);t.colorReplacements[m]=c.settings.background,p.settings.background=m}return p});for(const c of Object.keys(t.colors||{}))if((c==="editor.foreground"||c==="editor.background"||c.startsWith("terminal.ansi"))&&!t.colors[c]?.startsWith("#")){const f=l(t.colors[c]);t.colorReplacements[f]=t.colors[c],t.colors[c]=f}return Object.defineProperty(t,qv,{enumerable:!1,writable:!1,value:!0}),t}async function TN(e){return[...new Set((await Promise.all(e.filter(t=>!_N(t)).map(async t=>await yN(t).then(n=>Array.isArray(n)?n:[n])))).flat())]}async function vN(e){return(await Promise.all(e.map(async t=>xN(t)?null:z1(await yN(t))))).filter(t=>!!t)}function SN(e,t){if(!t)return e;if(t[e]){const n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new yt(`Circular alias \`${[...n].join(" -> ")} -> ${e}\``);n.add(e)}}return e}var wq=class extends Sq{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(i=>this.loadTheme(i)),this.loadLanguages(this._langs)}getTheme(e){return typeof e=="string"?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){const t=z1(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=Bf.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=SN(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;const t=new Set([...this._langMap.values()].filter(i=>i.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);const n={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);const r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(i=>{this._alias[i]=e.name}),this._loadedLanguagesCache=null,t.size)for(const i of t)this._resolvedGrammars.delete(i.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(i.scopeName),this._syncRegistry?._grammars?.delete(i.scopeName),this.loadLanguage(this._langMap.get(i.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(const r of e)this.resolveEmbeddedLanguages(r);const t=[...this._langGraph.entries()],n=t.filter(([r,i])=>!i);if(n.length){const r=t.filter(([i,o])=>o?(o.embeddedLanguages||o.embeddedLangs)?.some(l=>n.map(([c])=>c).includes(l)):!1).filter(i=>!n.includes(i));throw new yt(`Missing languages ${n.map(([i])=>`\`${i}\``).join(", ")}, required by ${r.map(([i])=>`\`${i}\``).join(", ")}`)}for(const[r,i]of t)this._resolver.addLanguage(i);for(const[r,i]of t)this.loadLanguage(i)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);const t=e.embeddedLanguages??e.embeddedLangs;if(t)for(const n of t)this._langGraph.set(n,this._langMap.get(n))}},kq=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:n=>e.createScanner(n),createOnigString:n=>e.createString(n)},t.forEach(n=>this.addLanguage(n))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){const t=e.split(".");let n=[];for(let r=1;r<=t.length;r++){const i=t.slice(0,r).join(".");n=[...n,...this._injections.get(i)||[]]}return n}};let kl=0;function Nq(e){kl+=1,e.warnings!==!1&&kl>=10&&kl%10===0&&console.warn(`[Shiki] ${kl} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new yt("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(z1),i=new wq(new kq(e.engine,n),r,n,e.langAlias);let o;function l(k){return SN(k,e.langAlias)}function c(k){C();const N=i.getGrammar(typeof k=="string"?k:k.name);if(!N)throw new yt(`Language \`${k}\` not found, you may need to load it first`);return N}function f(k){if(k==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};C();const N=i.getTheme(k);if(!N)throw new yt(`Theme \`${k}\` not found, you may need to load it first`);return N}function h(k){C();const N=f(k);return o!==k&&(i.setTheme(N),o=k),{theme:N,colorMap:i.getColorMap()}}function p(){return C(),i.getLoadedThemes()}function m(){return C(),i.getLoadedLanguages()}function E(...k){C(),i.loadLanguages(k.flat(1))}async function y(...k){return E(await TN(k))}function T(...k){C();for(const N of k.flat(1))i.loadTheme(N)}async function S(...k){return C(),T(await vN(k))}function C(){if(t)throw new yt("Shiki instance has been disposed")}function w(){t||(t=!0,i.dispose(),kl-=1)}return{setTheme:h,getTheme:f,getLanguage:c,getLoadedThemes:p,getLoadedLanguages:m,resolveLangAlias:l,loadLanguage:y,loadLanguageSync:E,loadTheme:S,loadThemeSync:T,dispose:w,[Symbol.dispose]:w}}async function Rq(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,r]=await Promise.all([vN(e.themes||[]),TN(e.langs||[]),e.engine]);return Nq({...e,themes:t,langs:n,engine:r})}const AN=new WeakMap;function Od(e,t){AN.set(e,t)}function eu(e){return AN.get(e)}var Ld=class CN{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new CN(Object.fromEntries(Aq(n).map(r=>[r,Q0])),t)}constructor(...t){if(t.length===2){const[n,r]=t;this.lang=r,this._stacks=n}else{const[n,r,i]=t;this.lang=r,this._stacks={[i]:n}}}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return Oq(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function Oq(e){const t=[],n=new Set;function r(i){if(n.has(i))return;n.add(i);const o=i?.nameScopesList?.scopeName;o&&t.push(o),i.parent&&r(i.parent)}return r(e),t}function Lq(e,t){if(!(e instanceof Ld))throw new yt("Invalid grammar state");return e.getInternalStack(t)}const Iq=/,/,Dq=/ /;function wN(e,t,n={}){const{theme:r=e.getLoadedThemes()[0]}=n;if(kd(e.resolveLangAlias(n.lang||"text"))||Nd(r))return Rd(t).map(c=>[{content:c[0],offset:c[1]}]);const{theme:i,colorMap:o}=e.setTheme(r),l=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==l.name)throw new yt(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${l.name}"`);if(!n.grammarState.themes.includes(i.name))throw new yt(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return Pq(t,l,i,o,n)}function Mq(...e){if(e.length===2)return eu(e[1]);const[t,n,r={}]=e,{lang:i="text",theme:o=t.getLoadedThemes()[0]}=r;if(kd(i)||Nd(o))throw new yt("Plain language does not have grammar state");if(i==="ansi")throw new yt("ANSI language does not have grammar state");const{theme:l,colorMap:c}=t.setTheme(o),f=t.getLanguage(i);return new Ld(F1(n,f,l,c,r).stateStack,f.name,l.name)}function Pq(e,t,n,r,i){const o=F1(e,t,n,r,i),l=new Ld(o.stateStack,t.name,n.name);return Od(o.tokens,l),o.tokens}function F1(e,t,n,r,i){const o=Ff(n,i),{tokenizeMaxLineLength:l=0,tokenizeTimeLimit:c=500,includeExplanation:f=!1}=i,h=Rd(e);let p=i.grammarState?Lq(i.grammarState,n.name)??Q0:i.grammarContextCode!=null?F1(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack:Q0,m=[];const E=[];for(let y=0,T=h.length;y<T;y++){const[S,C]=h[y];if(S===""){m=[],E.push([]);continue}if(l>0&&S.length>=l){m=[],E.push([{content:S,offset:C,color:"",fontStyle:0}]);continue}let w,k,N;f&&f!=="tokenType"&&(w=t.tokenizeLine(S,p,c),k=w.tokens,N=0);const M=t.tokenizeLine2(S,p,c),U=M.tokens.length/2;for(let P=0;P<U;P++){const V=M.tokens[2*P],G=P+1<U?M.tokens[2*P+2]:S.length;if(V===G)continue;const ie=M.tokens[2*P+1],$=Ja(r[Vi.getForeground(ie)],o),X=Vi.getFontStyle(ie),J={content:S.substring(V,G),offset:C+V,color:$,fontStyle:X};if(f==="tokenType")J.type=Vi.getTokenType(ie);else if(f){const he=[];if(f!=="scopeName")for(const re of n.settings){let j;switch(typeof re.scope){case"string":j=re.scope.split(Iq).map(ee=>ee.trim());break;case"object":j=re.scope;break;default:continue}he.push({settings:re,selectors:j.map(ee=>ee.split(Dq))})}J.explanation=[];let ue=0;for(;V+ue<G;){const re=k[N],j=S.substring(re.startIndex,re.endIndex);ue+=j.length,J.explanation.push({content:j,scopes:f==="scopeName"?Bq(re.scopes):jq(he,re.scopes)}),N+=1}}m.push(J)}E.push(m),m=[],p=M.ruleStack}return{tokens:E,stateStack:p}}function Bq(e){return e.map(t=>({scopeName:t}))}function jq(e,t){const n=[];for(let r=0,i=t.length;r<i;r++){const o=t[r];n[r]={scopeName:o,themeMatches:Hq(e,o,t.slice(0,r))}}return n}function Yv(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function Uq(e,t,n){if(!Yv(e.at(-1),t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)Yv(e[r],n[i])&&(r-=1),i-=1;return r===-1}function Hq(e,t,n){const r=[];for(const{selectors:i,settings:o}of e)for(const l of i)if(Uq(l,t,n)){r.push(o);break}return r}function kN(e,t,n,r=wN){const i=Object.entries(n.themes).filter(h=>h[1]).map(h=>({color:h[0],theme:h[1]})),o=i.map(h=>{const p=r(e,t,{...n,theme:h.theme});return{tokens:p,state:eu(p),theme:typeof h.theme=="string"?h.theme:h.theme.name}}),l=zq(...o.map(h=>h.tokens)),c=l[0].map((h,p)=>h.map((m,E)=>{const y={content:m.content,variants:{},offset:m.offset};return"includeExplanation"in n&&n.includeExplanation&&(y.explanation=m.explanation),l.forEach((T,S)=>{const{content:C,explanation:w,offset:k,...N}=T[p][E];y.variants[i[S].color]=N}),y})),f=o[0].state?new Ld(Object.fromEntries(o.map(h=>[h.theme,h.state?.getInternalStack(h.theme)])),o[0].state.lang):void 0;return f&&Od(c,f),c}function zq(...e){const t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){const i=e.map(f=>f[r]),o=t.map(()=>[]);t.forEach((f,h)=>f.push(o[h]));const l=i.map(()=>0),c=i.map(f=>f[0]);for(;c.every(f=>f);){const f=Math.min(...c.map(h=>h.content.length));for(let h=0;h<n;h++){const p=c[h];p.content.length===f?(o[h].push(p),l[h]+=1,c[h]=i[h][l[h]]):(o[h].push({...p,content:p.content.slice(0,f)}),c[h]={...p,content:p.content.slice(f),offset:p.offset+f})}}}return t}const Fq=/["&'<>`]/g,$q=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Vq=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Gq=/[|\\{}()[\]^$+*?.]/g,Xv=new WeakMap;function qq(e,t){if(e=e.replace(t.subset?Yq(t.subset):Fq,r),t.subset||t.escapeOnly)return e;return e.replace($q,n).replace(Vq,r);function n(i,o,l){return t.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,l.charCodeAt(o+2),t)}function r(i,o,l){return t.format(i.charCodeAt(0),l.charCodeAt(o+1),t)}}function Yq(e){let t=Xv.get(e);return t||(t=Xq(e),Xv.set(e,t)),t}function Xq(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(Gq,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const Qq=/[\dA-Fa-f]/;function Wq(e,t,n){const r="&#x"+e.toString(16).toUpperCase();return n&&t&&!Qq.test(String.fromCharCode(t))?r:r+";"}const Kq=/\d/;function Zq(e,t,n){const r="&#"+String(e);return n&&t&&!Kq.test(String.fromCharCode(t))?r:r+";"}const Jq=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],Gp={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},eY=["cent","copy","divide","gt","lt","not","para","times"],NN={}.hasOwnProperty,W0={};let ef;for(ef in Gp)NN.call(Gp,ef)&&(W0[Gp[ef]]=ef);const tY=/[^\dA-Za-z]/;function nY(e,t,n,r){const i=String.fromCharCode(e);if(NN.call(W0,i)){const o=W0[i],l="&"+o;return n&&Jq.includes(o)&&!eY.includes(o)&&(!r||t&&t!==61&&tY.test(String.fromCharCode(t)))?l:l+";"}return""}function rY(e,t,n){let r=Wq(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=nY(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){const o=Zq(e,t,n.omitOptionalSemicolons);o.length<r.length&&(r=o)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function io(e,t){return qq(e,Object.assign({format:rY},t))}const aY=/^>|^->|<!--|-->|--!>|<!-$/g,iY=[">"],sY=["<",">"];function oY(e,t,n,r){return r.settings.bogusComments?"<?"+io(e.value,Object.assign({},r.settings.characterReferences,{subset:iY}))+">":"<!--"+e.value.replace(aY,i)+"-->";function i(o){return io(o,Object.assign({},r.settings.characterReferences,{subset:sY}))}}function lY(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}const Vt=ON(1),RN=ON(-1),uY=[];function ON(e){return t;function t(n,r,i){const o=n?n.children:uY;let l=(r||0)+e,c=o[l];if(!i)for(;c&&xd(c);)l+=e,c=o[l];return c}}const cY={}.hasOwnProperty;function LN(e){return t;function t(n,r,i){return cY.call(e,n.tagName)&&e[n.tagName](n,r,i)}}const $1=LN({body:dY,caption:qp,colgroup:qp,dd:gY,dt:pY,head:qp,html:fY,li:mY,optgroup:bY,option:EY,p:hY,rp:Qv,rt:Qv,tbody:_Y,td:Wv,tfoot:xY,th:Wv,thead:yY,tr:TY});function qp(e,t,n){const r=Vt(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&xd(r.value.charAt(0)))}function fY(e,t,n){const r=Vt(n,t);return!r||r.type!=="comment"}function dY(e,t,n){const r=Vt(n,t);return!r||r.type!=="comment"}function hY(e,t,n){const r=Vt(n,t);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function mY(e,t,n){const r=Vt(n,t);return!r||r.type==="element"&&r.tagName==="li"}function pY(e,t,n){const r=Vt(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function gY(e,t,n){const r=Vt(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function Qv(e,t,n){const r=Vt(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function bY(e,t,n){const r=Vt(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function EY(e,t,n){const r=Vt(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function yY(e,t,n){const r=Vt(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function _Y(e,t,n){const r=Vt(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function xY(e,t,n){return!Vt(n,t)}function TY(e,t,n){const r=Vt(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function Wv(e,t,n){const r=Vt(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const vY=LN({body:CY,colgroup:wY,head:AY,html:SY,tbody:kY});function SY(e){const t=Vt(e,-1);return!t||t.type!=="comment"}function AY(e){const t=new Set;for(const r of e.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(t.has(r.tagName))return!1;t.add(r.tagName)}const n=e.children[0];return!n||n.type==="element"}function CY(e){const t=Vt(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&xd(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function wY(e,t,n){const r=RN(n,t),i=Vt(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&$1(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function kY(e,t,n){const r=RN(n,t),i=Vt(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&$1(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const tf={name:[[`
|
|
182
|
+
\f\r &/=>`.split(""),`
|
|
183
|
+
\f\r "&'/=>\``.split("")],[`\0
|
|
184
|
+
\f\r "&'/<=>`.split(""),`\0
|
|
185
|
+
\f\r "&'/<=>\``.split("")]],unquoted:[[`
|
|
186
|
+
\f\r &>`.split(""),`\0
|
|
187
|
+
\f\r "&'<=>\``.split("")],[`\0
|
|
188
|
+
\f\r "&'<=>\``.split(""),`\0
|
|
189
|
+
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function NY(e,t,n,r){const i=r.schema,o=i.space==="svg"?!1:r.settings.omitOptionalTags;let l=i.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase());const c=[];let f;i.space==="html"&&e.tagName==="svg"&&(r.schema=Br);const h=RY(r,e.properties),p=r.all(i.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=i,p&&(l=!1),(h||!o||!vY(e,t,n))&&(c.push("<",e.tagName,h?" "+h:""),l&&(i.space==="svg"||r.settings.closeSelfClosing)&&(f=h.charAt(h.length-1),(!r.settings.tightSelfClosing||f==="/"||f&&f!=='"'&&f!=="'")&&c.push(" "),c.push("/")),c.push(">")),c.push(p),!l&&(!o||!$1(e,t,n))&&c.push("</"+e.tagName+">"),c.join("")}function RY(e,t){const n=[];let r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){const o=OY(e,i,t[i]);o&&n.push(o)}}for(;++r<n.length;){const o=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&o!=='"'&&o!=="'"&&(n[r]+=" ")}return n.join("")}function OY(e,t,n){const r=lu(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,o=e.settings.allowDangerousCharacters?0:1;let l=e.quote,c;if(r.overloadedBoolean&&(n===r.attribute||n==="")?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!="string"||n===r.attribute||n==="")&&(n=!!n),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";const f=io(r.attribute,Object.assign({},e.settings.characterReferences,{subset:tf.name[i][o]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?Gg:qg)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?f:(e.settings.preferUnquoted&&(c=io(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:tf.unquoted[i][o]}))),c!==n&&(e.settings.quoteSmart&&Of(n,l)>Of(n,e.alternative)&&(l=e.alternative),c=l+io(n,Object.assign({},e.settings.characterReferences,{subset:(l==="'"?tf.single:tf.double)[i][o],attribute:!0}))+l),f+(c&&"="+c))}const LY=["<","&"];function IN(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:io(e.value,Object.assign({},r.settings.characterReferences,{subset:LY}))}function IY(e,t,n,r){return r.settings.allowDangerousHtml?e.value:IN(e,t,n,r)}function DY(e,t,n,r){return r.all(e)}const MY=Xg("type",{invalid:PY,unknown:BY,handlers:{comment:oY,doctype:lY,element:NY,raw:IY,root:DY,text:IN}});function PY(e){throw new Error("Expected node, not `"+e+"`")}function BY(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const jY={},UY={},HY=[];function zY(e,t){const n=t||jY,r=n.quote||'"',i=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:FY,all:$Y,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||yC,characterReferences:n.characterReferences||UY,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?Br:bo,quote:r,alternative:i}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function FY(e,t,n){return MY(e,t,n,this)}function $Y(e){const t=[],n=e&&e.children||HY;let r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}const Kv=/\s+/g;function DN(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class=="string"&&(e.properties.class=e.properties.class.split(Kv)),Array.isArray(e.properties.class)||(e.properties.class=[]);const n=Array.isArray(t)?t:t.split(Kv);for(const r of n)r&&!e.properties.class.includes(r)&&e.properties.class.push(r);return e}const VY=/:?lang=["']([^"']+)["']/g,GY=/(?:```|~~~)([\w-]+)/g,qY=/\\begin\{([\w-]+)\}/g,YY=/<script\s+(?:type|lang)=["']([^"']+)["']/gi;function XY(e){const t=Rd(e,!0).map(([i])=>i);function n(i){if(i===e.length)return{line:t.length-1,character:t.at(-1).length};let o=i,l=0;for(const c of t){if(o<c.length)break;o-=c.length,l++}return{line:l,character:o}}function r(i,o){let l=0;for(let c=0;c<i;c++)l+=t[c].length;return l+=o,l}return{lines:t,indexToPos:n,posToIndex:r}}function QY(e,t,n){const r=new Set;for(const o of e.matchAll(VY)){const l=o[1].toLowerCase().trim();l&&r.add(l)}for(const o of e.matchAll(GY)){const l=o[1].toLowerCase().trim();l&&r.add(l)}for(const o of e.matchAll(qY)){const l=o[1].toLowerCase().trim();l&&r.add(l)}for(const o of e.matchAll(YY)){const l=o[1].toLowerCase().trim(),c=l.includes("/")?l.split("/").pop():l;c&&r.add(c)}if(!n)return[...r];const i=n.getBundledLanguages();return[...r].filter(o=>o&&i[o])}const WY=["color","background-color"];function KY(e,t){let n=0;const r=[];for(const i of t)i>n&&r.push({...e,content:e.content.slice(n,i),offset:e.offset+n}),n=i;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function ZY(e,t){const n=[...t instanceof Set?t:new Set(t)].sort((r,i)=>r-i);return n.length?e.map(r=>r.flatMap(i=>{const o=n.filter(l=>i.offset<l&&l<i.offset+i.content.length).map(l=>l-i.offset).sort((l,c)=>l-c);return o.length?KY(i,o):i})):e}function JY(e,t,n,r,i="css-vars"){const o={content:e.content,explanation:e.explanation,offset:e.offset},l=t.map(p=>$f(e.variants[p])),c=new Set(l.flatMap(p=>Object.keys(p))),f={},h=(p,m)=>{const E=m==="color"?"":m==="background-color"?"-bg":`-${m}`;return n+t[p]+(m==="color"?"":E)};return l.forEach((p,m)=>{for(const E of c){const y=p[E]||"inherit";if(m===0&&r&&WY.includes(E))if(r==="light-dark()"&&l.length>1){const T=t.findIndex(C=>C==="light"),S=t.findIndex(C=>C==="dark");if(T===-1||S===-1)throw new yt('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');f[E]=`light-dark(${l[T][E]||"inherit"}, ${l[S][E]||"inherit"})`,i==="css-vars"&&(f[h(m,E)]=y)}else f[E]=y;else i==="css-vars"&&(f[h(m,E)]=y)}}),o.htmlStyle=f,o}function $f(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&sn.Italic&&(t["font-style"]="italic"),e.fontStyle&sn.Bold&&(t["font-weight"]="bold");const n=[];e.fontStyle&sn.Underline&&n.push("underline"),e.fontStyle&sn.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function K0(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}function eX(){const e=new WeakMap;function t(n){if(!e.has(n.meta)){let i=function(l){if(typeof l=="number"){if(l<0||l>n.source.length)throw new yt(`Invalid decoration offset: ${l}. Code length: ${n.source.length}`);return{...r.indexToPos(l),offset:l}}else{const c=r.lines[l.line];if(c===void 0)throw new yt(`Invalid decoration position ${JSON.stringify(l)}. Lines length: ${r.lines.length}`);let f=l.character;if(f<0&&(f=c.length+f),f<0||f>c.length)throw new yt(`Invalid decoration position ${JSON.stringify(l)}. Line ${l.line} length: ${c.length}`);return{...l,character:f,offset:r.posToIndex(l.line,f)}}};const r=XY(n.source),o=(n.options.decorations||[]).map(l=>({...l,start:i(l.start),end:i(l.end)}));tX(o),e.set(n.meta,{decorations:o,converter:r,source:n.source})}return e.get(n.meta)}return{name:"shiki:decorations",tokens(n){if(this.options.decorations?.length)return ZY(n,t(this).decorations.flatMap(r=>[r.start.offset,r.end.offset]))},code(n){if(!this.options.decorations?.length)return;const r=t(this),i=[...n.children].filter(p=>p.type==="element"&&p.tagName==="span");if(i.length!==r.converter.lines.length)throw new yt(`Number of lines in code element (${i.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);function o(p,m,E,y){const T=i[p];let S="",C=-1,w=-1;if(m===0&&(C=0),E===0&&(w=0),E===Number.POSITIVE_INFINITY&&(w=T.children.length),C===-1||w===-1)for(let N=0;N<T.children.length;N++)S+=MN(T.children[N]),C===-1&&S.length===m&&(C=N+1),w===-1&&S.length===E&&(w=N+1);if(C===-1)throw new yt(`Failed to find start index for decoration ${JSON.stringify(y.start)}`);if(w===-1)throw new yt(`Failed to find end index for decoration ${JSON.stringify(y.end)}`);const k=T.children.slice(C,w);if(!y.alwaysWrap&&k.length===T.children.length)c(T,y,"line");else if(!y.alwaysWrap&&k.length===1&&k[0].type==="element")c(k[0],y,"token");else{const N={type:"element",tagName:"span",properties:{},children:k};c(N,y,"wrapper"),T.children.splice(C,k.length,N)}}function l(p,m){i[p]=c(i[p],m,"line")}function c(p,m,E){const y=m.properties||{},T=m.transform||(S=>S);return p.tagName=m.tagName||"span",p.properties={...p.properties,...y,class:p.properties.class},m.properties?.class&&DN(p,m.properties.class),p=T(p,E)||p,p}const f=[],h=r.decorations.sort((p,m)=>m.start.offset-p.start.offset||p.end.offset-m.end.offset);for(const p of h){const{start:m,end:E}=p;if(m.line===E.line)o(m.line,m.character,E.character,p);else if(m.line<E.line){o(m.line,m.character,Number.POSITIVE_INFINITY,p);for(let y=m.line+1;y<E.line;y++)f.unshift(()=>l(y,p));o(E.line,0,E.character,p)}}f.forEach(p=>p())}}}function tX(e){for(let t=0;t<e.length;t++){const n=e[t];if(n.start.offset>n.end.offset)throw new yt(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){const i=e[r],o=n.start.offset<=i.start.offset&&i.start.offset<n.end.offset,l=n.start.offset<i.end.offset&&i.end.offset<=n.end.offset,c=i.start.offset<=n.start.offset&&n.start.offset<i.end.offset,f=i.start.offset<n.end.offset&&n.end.offset<=i.end.offset;if(o||l||c||f){if(o&&l||c&&f||c&&n.start.offset===n.end.offset||l&&i.start.offset===i.end.offset)continue;throw new yt(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(i.start)} intersect.`)}}}}function MN(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(MN).join(""):""}const nX=[eX()];function Vf(e){const t=rX(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...nX]}function rX(e){const t=[],n=[],r=[];for(const i of e)switch(i.enforce){case"pre":t.push(i);break;case"post":n.push(i);break;default:r.push(i)}return{pre:t,post:n,normal:r}}var Hi=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Yp={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function aX(e,t){const n=e.indexOf("\x1B",t);if(n!==-1&&e[n+1]==="["){const r=e.indexOf("m",n);if(r!==-1)return{sequence:e.substring(n+2,r).split(";"),startPosition:n,position:r+1}}return{position:e.length}}function Zv(e){const t=e.shift();if(t==="2"){const n=e.splice(0,3).map(r=>Number.parseInt(r));return n.length!==3||n.some(r=>Number.isNaN(r))?void 0:{type:"rgb",rgb:n}}else if(t==="5"){const n=e.shift();if(n)return{type:"table",index:Number(n)}}}function iX(e){const t=[];for(;e.length>0;){const n=e.shift();if(!n)continue;const r=Number.parseInt(n);if(!Number.isNaN(r))if(r===0)t.push({type:"resetAll"});else if(r<=9)Yp[r]&&t.push({type:"setDecoration",value:Yp[r]});else if(r<=29){const i=Yp[r-20];i&&(t.push({type:"resetDecoration",value:i}),i==="dim"&&t.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)t.push({type:"setForegroundColor",value:{type:"named",name:Hi[r-30]}});else if(r===38){const i=Zv(e);i&&t.push({type:"setForegroundColor",value:i})}else if(r===39)t.push({type:"resetForegroundColor"});else if(r<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:Hi[r-40]}});else if(r===48){const i=Zv(e);i&&t.push({type:"setBackgroundColor",value:i})}else r===49?t.push({type:"resetBackgroundColor"}):r===53?t.push({type:"setDecoration",value:"overline"}):r===55?t.push({type:"resetDecoration",value:"overline"}):r>=90&&r<=97?t.push({type:"setForegroundColor",value:{type:"named",name:Hi[r-90+8]}}):r>=100&&r<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:Hi[r-100+8]}})}return t}function sX(){let e=null,t=null,n=new Set;return{parse(r){const i=[];let o=0;do{const l=aX(r,o),c=l.sequence?r.substring(o,l.startPosition):r.substring(o);if(c.length>0&&i.push({value:c,foreground:e,background:t,decorations:new Set(n)}),l.sequence){const f=iX(l.sequence);for(const h of f)h.type==="resetAll"?(e=null,t=null,n.clear()):h.type==="resetForegroundColor"?e=null:h.type==="resetBackgroundColor"?t=null:h.type==="resetDecoration"&&n.delete(h.value);for(const h of f)h.type==="setForegroundColor"?e=h.value:h.type==="setBackgroundColor"?t=h.value:h.type==="setDecoration"&&n.add(h.value)}o=l.position}while(o<r.length);return i}}}var oX={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function lX(e=oX){function t(c){return e[c]}function n(c){return`#${c.map(f=>Math.max(0,Math.min(f,255)).toString(16).padStart(2,"0")).join("")}`}let r;function i(){if(r)return r;r=[];for(let h=0;h<Hi.length;h++)r.push(t(Hi[h]));let c=[0,95,135,175,215,255];for(let h=0;h<6;h++)for(let p=0;p<6;p++)for(let m=0;m<6;m++)r.push(n([c[h],c[p],c[m]]));let f=8;for(let h=0;h<24;h++,f+=10)r.push(n([f,f,f]));return r}function o(c){return i()[c]}function l(c){switch(c.type){case"named":return t(c.name);case"rgb":return n(c.rgb);case"table":return o(c.index)}}return{value:l}}const uX=/#([0-9a-f]{3,8})/i,cX=/var\((--[\w-]+-ansi-[\w-]+)\)/,fX={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function dX(e,t,n){const r=Ff(e,n),i=Rd(t),o=lX(Object.fromEntries(Hi.map(c=>{const f=`terminal.ansi${c[0].toUpperCase()}${c.substring(1)}`;return[c,e.colors?.[f]||fX[c]]}))),l=sX();return i.map(c=>l.parse(c[0]).map(f=>{let h,p;f.decorations.has("reverse")?(h=f.background?o.value(f.background):e.bg,p=f.foreground?o.value(f.foreground):e.fg):(h=f.foreground?o.value(f.foreground):e.fg,p=f.background?o.value(f.background):void 0),h=Ja(h,r),p=Ja(p,r),f.decorations.has("dim")&&(h=hX(h));let m=sn.None;return f.decorations.has("bold")&&(m|=sn.Bold),f.decorations.has("italic")&&(m|=sn.Italic),f.decorations.has("underline")&&(m|=sn.Underline),f.decorations.has("strikethrough")&&(m|=sn.Strikethrough),{content:f.value,offset:c[1],color:h,bgColor:p,fontStyle:m}}))}function hX(e){const t=e.match(uX);if(t){const r=t[1];if(r.length===8){const i=Math.round(Number.parseInt(r.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${r.slice(0,6)}${i}`}else{if(r.length===6)return`#${r}80`;if(r.length===4){const i=r[0],o=r[1],l=r[2],c=r[3];return`#${i}${i}${o}${o}${l}${l}${Math.round(Number.parseInt(`${c}${c}`,16)/2).toString(16).padStart(2,"0")}`}else if(r.length===3){const i=r[0],o=r[1],l=r[2];return`#${i}${i}${o}${o}${l}${l}80`}}}const n=e.match(cX);return n?`var(${n[1]}-dim)`:e}function Z0(e,t,n={}){const r=e.resolveLangAlias(n.lang||"text"),{theme:i=e.getLoadedThemes()[0]}=n;if(!kd(r)&&!Nd(i)&&r==="ansi"){const{theme:o}=e.setTheme(i);return dX(o,t,n)}return wN(e,t,n)}function Gf(e,t,n){let r,i,o,l,c,f;if("themes"in n){const{defaultColor:h="light",cssVariablePrefix:p="--shiki-",colorsRendering:m="css-vars"}=n,E=Object.entries(n.themes).filter(w=>w[1]).map(w=>({color:w[0],theme:w[1]})).sort((w,k)=>w.color===h?-1:k.color===h?1:0);if(E.length===0)throw new yt("`themes` option must not be empty");const y=kN(e,t,n,Z0);if(f=eu(y),h&&h!=="light-dark()"&&!E.some(w=>w.color===h))throw new yt(`\`themes\` option must contain the defaultColor key \`${h}\``);const T=E.map(w=>e.getTheme(w.theme)),S=E.map(w=>w.color);o=y.map(w=>w.map(k=>JY(k,S,p,h,m))),f&&Od(o,f);const C=E.map(w=>Ff(w.theme,n));i=Jv(E,T,C,p,h,"fg",m),r=Jv(E,T,C,p,h,"bg",m),l=`shiki-themes ${T.map(w=>w.name).join(" ")}`,c=h?void 0:[i,r].join(";")}else if("theme"in n){const h=Ff(n.theme,n);o=Z0(e,t,n);const p=e.getTheme(n.theme);r=Ja(p.bg,h),i=Ja(p.fg,h),l=p.name,f=eu(o)}else throw new yt("Invalid options, either `theme` or `themes` must be provided");return{tokens:o,fg:i,bg:r,themeName:l,rootStyle:c,grammarState:f}}function Jv(e,t,n,r,i,o,l){return e.map((c,f)=>{const h=Ja(t[f][o],n[f])||"inherit",p=`${r+c.color}${o==="bg"?"-bg":""}:${h}`;if(f===0&&i){if(i==="light-dark()"&&e.length>1){const m=e.findIndex(y=>y.color==="light"),E=e.findIndex(y=>y.color==="dark");if(m===-1||E===-1)throw new yt('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${Ja(t[m][o],n[m])||"inherit"}, ${Ja(t[E][o],n[E])||"inherit"});${p}`}return h}return l==="css-vars"?p:null}).filter(c=>!!c).join(";")}const PN=/^\s+$/,mX=/^(\s*)(.*?)(\s*)$/;function qf(e,t,n,r={meta:{},options:n,codeToHast:(i,o)=>qf(e,i,o),codeToTokens:(i,o)=>Gf(e,i,o)}){let i=t;for(const T of Vf(n))i=T.preprocess?.call(r,i,n)||i;let{tokens:o,fg:l,bg:c,themeName:f,rootStyle:h,grammarState:p}=Gf(e,i,n);const{mergeWhitespaces:m=!0,mergeSameStyleTokens:E=!1}=n;m===!0?o=gX(o):m==="never"&&(o=bX(o)),E&&(o=EX(o));const y={...r,get source(){return i}};for(const T of Vf(n))o=T.tokens?.call(y,o)||o;return pX(o,{...n,fg:l,bg:c,themeName:f,rootStyle:n.rootStyle===!1?!1:n.rootStyle??h},y,p)}function pX(e,t,n,r=eu(e)){const i=Vf(t),o=[],l={type:"root",children:[]},{structure:c="classic",tabindex:f="0"}=t,h={class:`shiki ${t.themeName||""}`};t.rootStyle!==!1&&(t.rootStyle!=null?h.style=t.rootStyle:h.style=`background-color:${t.bg};color:${t.fg}`),f!==!1&&f!=null&&(h.tabindex=f.toString());for(const[S,C]of Object.entries(t.meta||{}))S.startsWith("_")||(h[S]=C);let p={type:"element",tagName:"pre",properties:h,children:[],data:t.data},m={type:"element",tagName:"code",properties:{},children:o};const E=[],y={...n,structure:c,addClassToHast:DN,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return l},get pre(){return p},get code(){return m},get lines(){return E}};if(e.forEach((S,C)=>{C&&(c==="inline"?l.children.push({type:"element",tagName:"br",properties:{},children:[]}):c==="classic"&&o.push({type:"text",value:`
|
|
190
|
+
`}));let w={type:"element",tagName:"span",properties:{class:"line"},children:[]},k=0;for(const N of S){let M={type:"element",tagName:"span",properties:{...N.htmlAttrs},children:[{type:"text",value:N.content}]};const U=K0(N.htmlStyle||$f(N));U&&(M.properties.style=U);for(const P of i)M=P?.span?.call(y,M,C+1,k,w,N)||M;c==="inline"?l.children.push(M):c==="classic"&&w.children.push(M),k+=N.content.length}if(c==="classic"){for(const N of i)w=N?.line?.call(y,w,C+1)||w;E.push(w),o.push(w)}else c==="inline"&&E.push(w)}),c==="classic"){for(const S of i)m=S?.code?.call(y,m)||m;p.children.push(m);for(const S of i)p=S?.pre?.call(y,p)||p;l.children.push(p)}else if(c==="inline"){const S=[];let C={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const k of l.children)k.type==="element"&&k.tagName==="br"?(S.push(C),C={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(k.type==="element"||k.type==="text")&&C.children.push(k);S.push(C);let w={type:"element",tagName:"code",properties:{},children:S};for(const k of i)w=k?.code?.call(y,w)||w;l.children=[];for(let k=0;k<w.children.length;k++){k>0&&l.children.push({type:"element",tagName:"br",properties:{},children:[]});const N=w.children[k];N.type==="element"&&l.children.push(...N.children)}}let T=l;for(const S of i)T=S?.root?.call(y,T)||T;return r&&Od(T,r),T}function gX(e){return e.map(t=>{const n=[];let r="",i;return t.forEach((o,l)=>{const c=!(o.fontStyle&&(o.fontStyle&sn.Underline||o.fontStyle&sn.Strikethrough));c&&PN.test(o.content)&&t[l+1]?(i===void 0&&(i=o.offset),r+=o.content):r?(c?n.push({...o,offset:i,content:r+o.content}):n.push({content:r,offset:i},o),i=void 0,r=""):n.push(o)}),n})}function bX(e){return e.map(t=>t.flatMap(n=>{if(PN.test(n.content))return n;const r=n.content.match(mX);if(!r)return n;const[,i,o,l]=r;if(!i&&!l)return n;const c=[{...n,offset:n.offset+i.length,content:o}];return i&&c.unshift({content:i,offset:n.offset}),l&&c.push({content:l,offset:n.offset+i.length+o.length}),c}))}function EX(e){return e.map(t=>{const n=[];for(const r of t){if(n.length===0){n.push({...r});continue}const i=n.at(-1),o=K0(i.htmlStyle||$f(i)),l=K0(r.htmlStyle||$f(r)),c=i.fontStyle&&(i.fontStyle&sn.Underline||i.fontStyle&sn.Strikethrough),f=r.fontStyle&&(r.fontStyle&sn.Underline||r.fontStyle&sn.Strikethrough);!c&&!f&&o===l?i.content+=r.content:n.push({...r})}return n})}const yX=zY;function _X(e,t,n){const r={meta:{},options:n,codeToHast:(o,l)=>qf(e,o,l),codeToTokens:(o,l)=>Gf(e,o,l)};let i=yX(qf(e,t,n,r));for(const o of Vf(n))i=o.postprocess?.call(r,i,n)||i;return i}async function xX(e){const t=await Rq(e);return{getLastGrammarState:(...n)=>Mq(t,...n),codeToTokensBase:(n,r)=>Z0(t,n,r),codeToTokensWithThemes:(n,r)=>kN(t,n,r),codeToTokens:(n,r)=>Gf(t,n,r),codeToHast:(n,r)=>qf(t,n,r),codeToHtml:(n,r)=>_X(t,n,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function TX(e){const t=e.langs,n=e.themes,r=e.engine;async function i(o){function l(m){if(typeof m=="string"){if(m=o.langAlias?.[m]||m,_N(m))return[];const E=t[m];if(!E)throw new yt(`Language \`${m}\` is not included in this bundle. You may want to load it from external source.`);return E}return m}function c(m){if(xN(m))return"none";if(typeof m=="string"){const E=n[m];if(!E)throw new yt(`Theme \`${m}\` is not included in this bundle. You may want to load it from external source.`);return E}return m}const f=(o.themes??[]).map(m=>c(m)),h=(o.langs??[]).map(m=>l(m)),p=await xX({engine:o.engine??r(),...o,themes:f,langs:h});return{...p,loadLanguage(...m){return p.loadLanguage(...m.map(l))},loadTheme(...m){return p.loadTheme(...m.map(c))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return i}function vX(e){let t;async function n(r={}){if(t){const i=await t;return await Promise.all([i.loadTheme(...r.themes||[]),i.loadLanguage(...r.langs||[])]),i}else{t=e({...r,themes:[],langs:[]});const i=await t;return await Promise.all([i.loadTheme(...r.themes||[]),i.loadLanguage(...r.langs||[])]),i}}return n}function SX(e,t){const n=vX(e);async function r(i,o){const l=await n({langs:[o.lang],themes:"theme"in o?[o.theme]:Object.values(o.themes)}),c=await t?.guessEmbeddedLanguages?.(i,o.lang,l);return c&&await l.loadLanguage(...c),l}return{getSingletonHighlighter(i){return n(i)},async codeToHtml(i,o){return(await r(i,o)).codeToHtml(i,o)},async codeToHast(i,o){return(await r(i,o)).codeToHast(i,o)},async codeToTokens(i,o){return(await r(i,o)).codeToTokens(i,o)},async codeToTokensBase(i,o){return(await r(i,o)).codeToTokensBase(i,o)},async codeToTokensWithThemes(i,o){return(await r(i,o)).codeToTokensWithThemes(i,o)},async getLastGrammarState(i,o){return(await n({langs:[o.lang],themes:[o.theme]})).getLastGrammarState(i,o)}}}var AX=L1({bundledLanguages:()=>M1,bundledLanguagesAlias:()=>D1,bundledLanguagesBase:()=>I1,bundledLanguagesInfo:()=>Ad,bundledThemes:()=>B1,bundledThemesInfo:()=>P1,codeToHast:()=>BN,codeToHtml:()=>G1,codeToTokens:()=>jN,codeToTokensBase:()=>UN,codeToTokensWithThemes:()=>HN,createHighlighter:()=>V1,getLastGrammarState:()=>FN,getSingletonHighlighter:()=>zN});const V1=TX({langs:M1,themes:B1,engine:()=>(0,rN.createOnigurumaEngine)(L(()=>import("./wasm-CG6Dc4jp.js"),[]))}),{codeToHtml:G1,codeToHast:BN,codeToTokens:jN,codeToTokensBase:UN,codeToTokensWithThemes:HN,getSingletonHighlighter:zN,getLastGrammarState:FN}=SX(V1,{guessEmbeddedLanguages:QY}),e2=4294967295;var CX=class{patterns;options;regexps;constructor(e,t={}){this.patterns=e,this.options=t;const{forgiving:n=!1,cache:r,regexConstructor:i}=t;if(!i)throw new Error("Option `regexConstructor` is not provided");this.regexps=e.map(o=>{if(typeof o!="string")return o;const l=r?.get(o);if(l){if(l instanceof RegExp)return l;if(n)return null;throw l}try{const c=i(o);return r?.set(o,c),c}catch(c){if(r?.set(o,c),n)return null;throw c}})}findNextMatchSync(e,t,n){const r=typeof e=="string"?e:e.content,i=[];function o(l,c,f=0){return{index:l,captureIndices:c.indices.map(h=>h==null?{start:e2,end:e2,length:0}:{start:h[0]+f,end:h[1]+f,length:h[1]-h[0]})}}for(let l=0;l<this.regexps.length;l++){const c=this.regexps[l];if(c)try{c.lastIndex=t;const f=c.exec(r);if(!f)continue;if(f.index===t)return o(l,f,0);i.push([l,f,0])}catch(f){if(this.options.forgiving)continue;throw f}}if(i.length){const l=Math.min(...i.map(c=>c[1].index));for(const[c,f,h]of i)if(f.index===l)return o(c,f,h)}return null}};function vo(e){if([...e].length!==1)throw new Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function wX(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}const q1=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),Kt=String.raw;function So(e,t){if(e==null)throw new Error(t??"Value expected");return e}const $N=Kt`\[\^?`,VN=`c.? | C(?:-.?)?|${Kt`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${Kt`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${Kt`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${Kt`o\{[^\}]*\}?`}|${Kt`\d{1,3}`}`,Y1=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,nf=new RegExp(Kt`
|
|
191
|
+
\\ (?:
|
|
192
|
+
${VN}
|
|
193
|
+
| [gk]<[^>]*>?
|
|
194
|
+
| [gk]'[^']*'?
|
|
195
|
+
| .
|
|
196
|
+
)
|
|
197
|
+
| \( (?:
|
|
198
|
+
\? (?:
|
|
199
|
+
[:=!>({]
|
|
200
|
+
| <[=!]
|
|
201
|
+
| <[^>]*>
|
|
202
|
+
| '[^']*'
|
|
203
|
+
| ~\|?
|
|
204
|
+
| #(?:[^)\\]|\\.?)*
|
|
205
|
+
| [^:)]*[:)]
|
|
206
|
+
)?
|
|
207
|
+
| \*[^\)]*\)?
|
|
208
|
+
)?
|
|
209
|
+
| (?:${Y1.source})+
|
|
210
|
+
| ${$N}
|
|
211
|
+
| .
|
|
212
|
+
`.replace(/\s+/g,""),"gsu"),Xp=new RegExp(Kt`
|
|
213
|
+
\\ (?:
|
|
214
|
+
${VN}
|
|
215
|
+
| .
|
|
216
|
+
)
|
|
217
|
+
| \[:(?:\^?\p{Alpha}+|\^):\]
|
|
218
|
+
| ${$N}
|
|
219
|
+
| &&
|
|
220
|
+
| .
|
|
221
|
+
`.replace(/\s+/g,""),"gsu");function kX(e,t={}){const n={flags:"",...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if(typeof e!="string")throw new Error("String expected as pattern");const r=YX(n.flags),i=[r.extended],o={captureGroup:n.rules.captureGroup,getCurrentModX(){return i.at(-1)},numOpenGroups:0,popModX(){i.pop()},pushModX(m){i.push(m)},replaceCurrentModX(m){i[i.length-1]=m},singleline:n.rules.singleline};let l=[],c;for(nf.lastIndex=0;c=nf.exec(e);){const m=NX(o,e,c[0],nf.lastIndex);m.tokens?l.push(...m.tokens):m.token&&l.push(m.token),m.lastIndex!==void 0&&(nf.lastIndex=m.lastIndex)}const f=[];let h=0;l.filter(m=>m.type==="GroupOpen").forEach(m=>{m.kind==="capturing"?m.number=++h:m.raw==="("&&f.push(m)}),h||f.forEach((m,E)=>{m.kind="capturing",m.number=E+1});const p=h||f.length;return{tokens:l.map(m=>m.type==="EscapedNumber"?QX(m,p):m).flat(),flags:r}}function NX(e,t,n,r){const[i,o]=n;if(n==="["||n==="[^"){const l=RX(t,n,r);return{tokens:l.tokens,lastIndex:l.lastIndex}}if(i==="\\"){if("AbBGyYzZ".includes(o))return{token:t2(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:HX(n)}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:qN(n)}}if(o==="K")return{token:YN("keep",n)};if(o==="N"||o==="R")return{token:zi("newline",n,{negate:o==="N"})};if(o==="O")return{token:zi("any",n)};if(o==="X")return{token:zi("text_segment",n)};const l=GN(n,{inCharClass:!1});return Array.isArray(l)?{tokens:l}:{token:l}}if(i==="("){if(o==="*")return{token:VX(n)};if(n==="(?{")throw new Error(`Unsupported callout "${n}"`);if(n.startsWith("(?#")){if(t[r]!==")")throw new Error('Unclosed comment group "(?#"');return{lastIndex:r+1}}if(/^\(\?[-imx]+[:)]$/.test(n))return{token:$X(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,n==="("&&!e.captureGroup||n==="(?:")return{token:Zs("group",n)};if(n==="(?>")return{token:Zs("atomic",n)};if(n==="(?="||n==="(?!"||n==="(?<="||n==="(?<!")return{token:Zs(n[2]==="<"?"lookbehind":"lookahead",n,{negate:n.endsWith("!")})};if(n==="("&&e.captureGroup||n.startsWith("(?<")&&n.endsWith(">")||n.startsWith("(?'")&&n.endsWith("'"))return{token:Zs("capturing",n,{...n!=="("&&{name:n.slice(3,-1)}})};if(n.startsWith("(?~")){if(n==="(?~|")throw new Error(`Unsupported absence function kind "${n}"`);return{token:Zs("absence_repeater",n)}}throw n==="(?("?new Error(`Unsupported conditional "${n}"`):new Error(`Invalid or unsupported group option "${n}"`)}if(n===")"){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw new Error('Unmatched ")"');return{token:BX(n)}}if(e.getCurrentModX()){if(n==="#"){const l=t.indexOf(`
|
|
222
|
+
`,r);return{lastIndex:l===-1?t.length:l}}if(/^\s$/.test(n)){const l=/\s+/y;return l.lastIndex=r,{lastIndex:l.exec(t)?l.lastIndex:r}}}if(n===".")return{token:zi("dot",n)};if(n==="^"||n==="$"){const l=e.singleline?{"^":Kt`\A`,$:Kt`\Z`}[n]:n;return{token:t2(l,n)}}return n==="|"?{token:LX(n)}:Y1.test(n)?{tokens:WX(n)}:{token:ca(vo(n),n)}}function RX(e,t,n){const r=[n2(t[1]==="^",t)];let i=1,o;for(Xp.lastIndex=n;o=Xp.exec(e);){const l=o[0];if(l[0]==="["&&l[1]!==":")i++,r.push(n2(l[1]==="^",l));else if(l==="]"){if(r.at(-1).type==="CharacterClassOpen")r.push(ca(93,l));else if(i--,r.push(IX(l)),!i)break}else{const c=OX(l);Array.isArray(c)?r.push(...c):r.push(c)}}return{tokens:r,lastIndex:Xp.lastIndex||e.length}}function OX(e){if(e[0]==="\\")return GN(e,{inCharClass:!0});if(e[0]==="["){const t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!q1.has(t.groups.name))throw new Error(`Invalid POSIX class "${e}"`);return zi("posix",e,{value:t.groups.name,negate:!!t.groups.negate})}return e==="-"?DX(e):e==="&&"?MX(e):ca(vo(e),e)}function GN(e,{inCharClass:t}){const n=e[1];if(n==="c"||n==="C")return FX(e);if("dDhHsSwW".includes(n))return GX(e);if(e.startsWith(Kt`\o{`))throw new Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw new Error(`Incomplete or invalid Unicode property "${e}"`);return qX(e)}if(new RegExp("^\\\\x[89A-Fa-f]\\p{AHex}","u").test(e))try{const r=e.split(/\\x/).slice(1).map(l=>parseInt(l,16)),i=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(r)),o=new TextEncoder;return[...i].map(l=>{const c=[...o.encode(l)].map(f=>`\\x${f.toString(16)}`).join("");return ca(vo(l),c)})}catch{throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(n==="u"||n==="x")return ca(XX(e),e);if(r2.has(n))return ca(r2.get(n),e);if(/\d/.test(n))return PX(t,e);if(e==="\\")throw new Error(Kt`Incomplete escape "\"`);if(n==="M")throw new Error(`Unsupported meta "${e}"`);if([...e].length===2)return ca(e.codePointAt(1),e);throw new Error(`Unexpected escape "${e}"`)}function LX(e){return{type:"Alternator",raw:e}}function t2(e,t){return{type:"Assertion",kind:e,raw:t}}function qN(e){return{type:"Backreference",raw:e}}function ca(e,t){return{type:"Character",value:e,raw:t}}function IX(e){return{type:"CharacterClassClose",raw:e}}function DX(e){return{type:"CharacterClassHyphen",raw:e}}function MX(e){return{type:"CharacterClassIntersector",raw:e}}function n2(e,t){return{type:"CharacterClassOpen",negate:e,raw:t}}function zi(e,t,n={}){return{type:"CharacterSet",kind:e,...n,raw:t}}function YN(e,t,n={}){return e==="keep"?{type:"Directive",kind:e,raw:t}:{type:"Directive",kind:e,flags:So(n.flags),raw:t}}function PX(e,t){return{type:"EscapedNumber",inCharClass:e,raw:t}}function BX(e){return{type:"GroupClose",raw:e}}function Zs(e,t,n={}){return{type:"GroupOpen",kind:e,...n,raw:t}}function jX(e,t,n,r){return{type:"NamedCallout",kind:e,tag:t,arguments:n,raw:r}}function UX(e,t,n,r){return{type:"Quantifier",kind:e,min:t,max:n,raw:r}}function HX(e){return{type:"Subroutine",raw:e}}const zX=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),r2=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function FX(e){const t=e[1]==="c"?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw new Error(`Unsupported control character "${e}"`);return ca(vo(t.toUpperCase())-64,e)}function $X(e,t){let{on:n,off:r}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;r??="";const i=(t.getCurrentModX()||n.includes("x"))&&!r.includes("x"),o=i2(n),l=i2(r),c={};if(o&&(c.enable=o),l&&(c.disable=l),e.endsWith(")"))return t.replaceCurrentModX(i),YN("flags",e,{flags:c});if(e.endsWith(":"))return t.pushModX(i),t.numOpenGroups++,Zs("group",e,{...(o||l)&&{flags:c}});throw new Error(`Unexpected flag modifier "${e}"`)}function VX(e){const t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw new Error(`Incomplete or invalid named callout "${e}"`);const{name:n,tag:r,args:i}=t.groups;if(!n)throw new Error(`Invalid named callout "${e}"`);if(r==="")throw new Error(`Named callout tag with empty value not allowed "${e}"`);const o=i?i.split(",").filter(p=>p!=="").map(p=>/^[+-]?\d+$/.test(p)?+p:p):[],[l,c,f]=o,h=zX.has(n)?n.toLowerCase():"custom";switch(h){case"fail":case"mismatch":case"skip":if(o.length>0)throw new Error(`Named callout arguments not allowed "${o}"`);break;case"error":if(o.length>1)throw new Error(`Named callout allows only one argument "${o}"`);if(typeof l=="string")throw new Error(`Named callout argument must be a number "${l}"`);break;case"max":if(!o.length||o.length>2)throw new Error(`Named callout must have one or two arguments "${o}"`);if(typeof l=="string"&&!/^[A-Za-z_]\w*$/.test(l))throw new Error(`Named callout argument one must be a tag or number "${l}"`);if(o.length===2&&(typeof c=="number"||!/^[<>X]$/.test(c)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${c}"`);break;case"count":case"total_count":if(o.length>1)throw new Error(`Named callout allows only one argument "${o}"`);if(o.length===1&&(typeof l=="number"||!/^[<>X]$/.test(l)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${l}"`);break;case"cmp":if(o.length!==3)throw new Error(`Named callout must have three arguments "${o}"`);if(typeof l=="string"&&!/^[A-Za-z_]\w*$/.test(l))throw new Error(`Named callout argument one must be a tag or number "${l}"`);if(typeof c=="number"||!/^(?:[<>!=]=|[<>])$/.test(c))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${c}"`);if(typeof f=="string"&&!/^[A-Za-z_]\w*$/.test(f))throw new Error(`Named callout argument three must be a tag or number "${f}"`);break;case"custom":throw new Error(`Undefined callout name "${n}"`);default:throw new Error(`Unexpected named callout kind "${h}"`)}return jX(h,r??null,i?.split(",")??null,e)}function a2(e){let t=null,n,r;if(e[0]==="{"){const{minStr:i,maxStr:o}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,l=1e5;if(+i>l||o&&+o>l)throw new Error("Quantifier value unsupported in Oniguruma");if(n=+i,r=o===void 0?+i:o===""?1/0:+o,n>r&&(t="possessive",[n,r]=[r,n]),e.endsWith("?")){if(t==="possessive")throw new Error('Unsupported possessive interval quantifier chain with "?"');t="lazy"}else t||(t="greedy")}else n=e[0]==="+"?1:0,r=e[0]==="?"?1:1/0,t=e[1]==="+"?"possessive":e[1]==="?"?"lazy":"greedy";return UX(t,n,r,e)}function GX(e){const t=e[1].toLowerCase();return zi({d:"digit",h:"hex",s:"space",w:"word"}[t],e,{negate:e[1]!==t})}function qX(e){const{p:t,neg:n,value:r}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return zi("property",e,{value:r,negate:t==="P"&&!n||t==="p"&&!!n})}function i2(e){const t={};return e.includes("i")&&(t.ignoreCase=!0),e.includes("m")&&(t.dotAll=!0),e.includes("x")&&(t.extended=!0),Object.keys(t).length?t:null}function YX(e){const t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let n=0;n<e.length;n++){const r=e[n];if(!"imxDPSWy".includes(r))throw new Error(`Invalid flag "${r}"`);if(r==="y"){if(!/^y{[gw]}/.test(e.slice(n)))throw new Error('Invalid or unspecified flag "y" mode');t.textSegmentMode=e[n+2]==="g"?"grapheme":"word",n+=3;continue}t[{i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"}[r]]=!0}return t}function XX(e){if(new RegExp("^(?:\\\\u(?!\\p{AHex}{4})|\\\\x(?!\\p{AHex}{1,2}|\\{\\p{AHex}{1,8}\\}))","u").test(e))throw new Error(`Incomplete or invalid escape "${e}"`);const t=e[2]==="{"?new RegExp("^\\\\x\\{\\s*(?<hex>\\p{AHex}+)","u").exec(e).groups.hex:e.slice(2);return parseInt(t,16)}function QX(e,t){const{raw:n,inCharClass:r}=e,i=n.slice(1);if(!r&&(i!=="0"&&i.length===1||i[0]!=="0"&&+i<=t))return[qN(n)];const o=[],l=i.match(/^[0-7]+|\d/g);for(let c=0;c<l.length;c++){const f=l[c];let h;if(c===0&&f!=="8"&&f!=="9"){if(h=parseInt(f,8),h>127)throw new Error(Kt`Octal encoded byte above 177 unsupported "${n}"`)}else h=vo(f);o.push(ca(h,(c===0?"\\":"")+f))}return o}function WX(e){const t=[],n=new RegExp(Y1,"gy");let r;for(;r=n.exec(e);){const i=r[0];if(i[0]==="{"){const o=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(i);if(o){const{min:l,max:c}=o.groups;if(+l>+c&&i.endsWith("?")){n.lastIndex--,t.push(a2(i.slice(0,-1)));continue}}}t.push(a2(i))}return t}function XN(e,t){if(!Array.isArray(e.body))throw new Error("Expected node with body array");if(e.body.length!==1)return!1;const n=e.body[0];return!t||Object.keys(t).every(r=>t[r]===n[r])}function KX(e){return ZX.has(e.type)}const ZX=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function QN(e,t={}){const n={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},r=kX(e,{flags:n.flags,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}}),i=(E,y)=>{const T=r.tokens[o.nextIndex];switch(o.parent=E,o.nextIndex++,T.type){case"Alternator":return Wi();case"Assertion":return JX(T);case"Backreference":return eQ(T,o);case"Character":return Id(T.value,{useLastValid:!!y.isCheckingRangeEnd});case"CharacterClassHyphen":return tQ(T,o,y);case"CharacterClassOpen":return nQ(T,o,y);case"CharacterSet":return rQ(T,o);case"Directive":return uQ(T.kind,{flags:T.flags});case"GroupOpen":return aQ(T,o,y);case"NamedCallout":return fQ(T.kind,T.tag,T.arguments);case"Quantifier":return iQ(T,o);case"Subroutine":return sQ(T,o);default:throw new Error(`Unexpected token type "${T.type}"`)}},o={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:n.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:n.skipBackrefValidation,skipLookbehindValidation:n.skipLookbehindValidation,skipPropertyNameValidation:n.skipPropertyNameValidation,subroutines:[],tokens:r.tokens,unicodePropertyMap:n.unicodePropertyMap,walk:i},l=hQ(cQ(r.flags));let c=l.body[0];for(;o.nextIndex<r.tokens.length;){const E=i(c,{});E.type==="Alternative"?(l.body.push(E),c=E):c.body.push(E)}const{capturingGroups:f,hasNumberedRef:h,namedGroupsByName:p,subroutines:m}=o;if(h&&p.size&&!n.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(const{ref:E}of m)if(typeof E=="number"){if(E>f.length)throw new Error("Subroutine uses a group number that's not defined");E&&(f[E-1].isSubroutined=!0)}else if(p.has(E)){if(p.get(E).length>1)throw new Error(Kt`Subroutine uses a duplicate group name "\g<${E}>"`);p.get(E)[0].isSubroutined=!0}else throw new Error(Kt`Subroutine uses a group name that's not defined "\g<${E}>"`);return l}function JX({kind:e}){return J0(So({"^":"line_start",$:"line_end","\\A":"string_start","\\b":"word_boundary","\\B":"word_boundary","\\G":"search_start","\\y":"text_segment_boundary","\\Y":"text_segment_boundary","\\z":"string_end","\\Z":"string_end_newline"}[e],`Unexpected assertion kind "${e}"`),{negate:e===Kt`\B`||e===Kt`\Y`})}function eQ({raw:e},t){const n=/^\\k[<']/.test(e),r=n?e.slice(3,-1):e.slice(1),i=(o,l=!1)=>{const c=t.capturingGroups.length;let f=!1;if(o>c)if(t.skipBackrefValidation)f=!0;else throw new Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,eg(l?c+1-o:o,{orphan:f})};if(n){const o=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(r);if(o)return i(+o.groups.num,!!o.groups.sign);if(/[-+]/.test(r))throw new Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(r))throw new Error(`Group name not defined to the left "${e}"`);return eg(r)}return i(+r)}function tQ(e,t,n){const{tokens:r,walk:i}=t,o=t.parent,l=o.body.at(-1),c=r[t.nextIndex];if(!n.isCheckingRangeEnd&&l&&l.type!=="CharacterClass"&&l.type!=="CharacterClassRange"&&c&&c.type!=="CharacterClassOpen"&&c.type!=="CharacterClassClose"&&c.type!=="CharacterClassIntersector"){const f=i(o,{...n,isCheckingRangeEnd:!0});if(l.type==="Character"&&f.type==="Character")return o.body.pop(),lQ(l,f);throw new Error("Invalid character class range")}return Id(vo("-"))}function nQ({negate:e},t,n){const{tokens:r,walk:i}=t,o=[bf()],l=r[t.nextIndex];let c=l2(l);for(;c.type!=="CharacterClassClose";){if(c.type==="CharacterClassIntersector")o.push(bf()),t.nextIndex++;else{const h=o.at(-1);h.body.push(i(h,n))}c=l2(r[t.nextIndex],l)}const f=bf({negate:e});return o.length===1?f.body=o[0].body:(f.kind="intersection",f.body=o.map(h=>h.body.length===1?h.body[0]:h)),t.nextIndex++,f}function rQ({kind:e,negate:t,value:n},r){const{normalizeUnknownPropertyNames:i,skipPropertyNameValidation:o,unicodePropertyMap:l}=r;if(e==="property"){const c=Dd(n);if(q1.has(c)&&!l?.has(c))e="posix",n=c;else return Js(n,{negate:t,normalizeUnknownPropertyNames:i,skipPropertyNameValidation:o,unicodePropertyMap:l})}return e==="posix"?dQ(n,{negate:t}):tg(e,{negate:t})}function aQ(e,t,n){const{tokens:r,capturingGroups:i,namedGroupsByName:o,skipLookbehindValidation:l,walk:c}=t,f=mQ(e),h=f.type==="AbsenceFunction",p=o2(f),m=p&&f.negate;if(f.type==="CapturingGroup"&&(i.push(f),f.name&&wX(o,f.name,[]).push(f)),h&&n.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let E=u2(r[t.nextIndex]);for(;E.type!=="GroupClose";){if(E.type==="Alternator")f.body.push(Wi()),t.nextIndex++;else{const y=f.body.at(-1),T=c(y,{...n,isInAbsenceFunction:n.isInAbsenceFunction||h,isInLookbehind:n.isInLookbehind||p,isInNegLookbehind:n.isInNegLookbehind||m});if(y.body.push(T),(p||n.isInLookbehind)&&!l){const S="Lookbehind includes a pattern not allowed by Oniguruma";if(m||n.isInNegLookbehind){if(s2(T)||T.type==="CapturingGroup")throw new Error(S)}else if(s2(T)||o2(T)&&T.negate)throw new Error(S)}}E=u2(r[t.nextIndex])}return t.nextIndex++,f}function iQ({kind:e,min:t,max:n},r){const i=r.parent,o=i.body.at(-1);if(!o||!KX(o))throw new Error("Quantifier requires a repeatable token");const l=KN(e,t,n,o);return i.body.pop(),l}function sQ({raw:e},t){const{capturingGroups:n,subroutines:r}=t;let i=e.slice(3,-1);const o=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(i);if(o){const c=+o.groups.num,f=n.length;if(t.hasNumberedRef=!0,i={"":c,"+":f+c,"-":f+1-c}[o.groups.sign],i<1)throw new Error("Invalid subroutine number")}else i==="0"&&(i=0);const l=ZN(i);return r.push(l),l}function oQ(e,t){return{type:"AbsenceFunction",kind:e,body:gu(t?.body)}}function Wi(e){return{type:"Alternative",body:JN(e?.body)}}function J0(e,t){const n={type:"Assertion",kind:e};return(e==="word_boundary"||e==="text_segment_boundary")&&(n.negate=!!t?.negate),n}function eg(e,t){const n=!!t?.orphan;return{type:"Backreference",ref:e,...n&&{orphan:n}}}function WN(e,t){const n={name:void 0,isSubroutined:!1,...t};if(n.name!==void 0&&!pQ(n.name))throw new Error(`Group name "${n.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:e,...n.name&&{name:n.name},...n.isSubroutined&&{isSubroutined:n.isSubroutined},body:gu(t?.body)}}function Id(e,t){const n={useLastValid:!1,...t};if(e>1114111){const r=e.toString(16);if(n.useLastValid)e=1114111;else throw e>1310719?new Error(`Invalid code point out of range "\\x{${r}}"`):new Error(`Invalid code point out of range in JS "\\x{${r}}"`)}return{type:"Character",value:e}}function bf(e){const t={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:t.kind,negate:t.negate,body:JN(e?.body)}}function lQ(e,t){if(t.value<e.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:t}}function tg(e,t){const n=!!t?.negate,r={type:"CharacterSet",kind:e};return(e==="digit"||e==="hex"||e==="newline"||e==="space"||e==="word")&&(r.negate=n),(e==="text_segment"||e==="newline"&&!n)&&(r.variableLength=!0),r}function uQ(e,t={}){if(e==="keep")return{type:"Directive",kind:e};if(e==="flags")return{type:"Directive",kind:e,flags:So(t.flags)};throw new Error(`Unexpected directive kind "${e}"`)}function cQ(e){return{type:"Flags",...e}}function hr(e){const t=e?.atomic,n=e?.flags;if(t&&n)throw new Error("Atomic group cannot have flags");return{type:"Group",...t&&{atomic:t},...n&&{flags:n},body:gu(e?.body)}}function ji(e){const t={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:t.behind?"lookbehind":"lookahead",negate:t.negate,body:gu(e?.body)}}function fQ(e,t,n){return{type:"NamedCallout",kind:e,tag:t,arguments:n}}function dQ(e,t){const n=!!t?.negate;if(!q1.has(e))throw new Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:n}}function KN(e,t,n,r){if(t>n)throw new Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:e,min:t,max:n,body:r}}function hQ(e,t){return{type:"Regex",body:gu(t?.body),flags:e}}function ZN(e){return{type:"Subroutine",ref:e}}function Js(e,t){const n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t};let r=n.unicodePropertyMap?.get(Dd(e));if(!r){if(n.normalizeUnknownPropertyNames)r=gQ(e);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw new Error(Kt`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:r??e,negate:n.negate}}function mQ({flags:e,kind:t,name:n,negate:r,number:i}){switch(t){case"absence_repeater":return oQ("repeater");case"atomic":return hr({atomic:!0});case"capturing":return WN(i,{name:n});case"group":return hr({flags:e});case"lookahead":case"lookbehind":return ji({behind:t==="lookbehind",negate:r});default:throw new Error(`Unexpected group kind "${t}"`)}}function gu(e){if(e===void 0)e=[Wi()];else if(!Array.isArray(e)||!e.length||!e.every(t=>t.type==="Alternative"))throw new Error("Invalid body; expected array of one or more Alternative nodes");return e}function JN(e){if(e===void 0)e=[];else if(!Array.isArray(e)||!e.every(t=>!!t.type))throw new Error("Invalid body; expected array of nodes");return e}function s2(e){return e.type==="LookaroundAssertion"&&e.kind==="lookahead"}function o2(e){return e.type==="LookaroundAssertion"&&e.kind==="lookbehind"}function pQ(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function gQ(e){return e.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,t=>t[0].toUpperCase()+t.slice(1).toLowerCase())}function Dd(e){return e.replace(/[- _]+/g,"").toLowerCase()}function l2(e,t){const n=t;return So(e,`Unclosed character class${n?.type==="Character"&&n.value===93&&n.raw==="]"?' (started with "]")':""}`)}function u2(e){return So(e,"Unclosed group")}function Gl(e,t,n=null){function r(o,l){for(let c=0;c<o.length;c++){const f=i(o[c],l,c,o);c=Math.max(-1,c+f)}}function i(o,l=null,c=null,f=null){let h=0,p=!1;const m={node:o,parent:l,key:c,container:f,root:e,remove(){rf(f).splice(Math.max(0,Qs(c)+h),1),h--,p=!0},removeAllNextSiblings(){return rf(f).splice(Qs(c)+1)},removeAllPrevSiblings(){const w=Qs(c)+h;return h-=w,rf(f).splice(0,Math.max(0,w))},replaceWith(w,k={}){const N=!!k.traverse;f?f[Math.max(0,Qs(c)+h)]=w:So(l,"Can't replace root node")[c]=w,N&&i(w,l,c,f),p=!0},replaceWithMultiple(w,k={}){const N=!!k.traverse;if(rf(f).splice(Math.max(0,Qs(c)+h),1,...w),h+=w.length-1,N){let M=0;for(let U=0;U<w.length;U++)M+=i(w[U],l,Qs(c)+U+M,f)}p=!0},skip(){p=!0}},{type:E}=o,y=t["*"],T=t[E],S=typeof y=="function"?y:y?.enter,C=typeof T=="function"?T:T?.enter;if(S?.(m,n),C?.(m,n),!p)switch(E){case"AbsenceFunction":case"Alternative":case"CapturingGroup":case"CharacterClass":case"Group":case"LookaroundAssertion":r(o.body,o);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":i(o.min,o,"min"),i(o.max,o,"max");break;case"Quantifier":i(o.body,o,"body");break;case"Regex":r(o.body,o),i(o.flags,o,"flags");break;default:throw new Error(`Unexpected node type "${E}"`)}return T?.exit?.(m,n),y?.exit?.(m,n),h}return i(e),e}function rf(e){if(!Array.isArray(e))throw new Error("Container expected");return e}function Qs(e){if(typeof e!="number")throw new Error("Numeric key expected");return e}const bQ=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function EQ(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function yQ(e,t,n,r){return e.slice(0,t)+r+e.slice(t+n.length)}const sr=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function X1(e,t,n,r){const i=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,"gsu"),o=[!1];let l=0,c="";for(const f of e.matchAll(i)){const{0:h,groups:{$skip:p}}=f;if(!p&&(!r||r===sr.DEFAULT==!l)){n instanceof Function?c+=n(f,{context:l?sr.CHAR_CLASS:sr.DEFAULT,negated:o[o.length-1]}):c+=n;continue}h[0]==="["?(l++,o.push(h[1]==="^")):h==="]"&&l&&(l--,o.pop()),c+=h}return c}function e3(e,t,n,r){X1(e,t,n,r)}function _Q(e,t,n=0,r){if(!new RegExp(t,"su").test(e))return null;const i=new RegExp(`${t}|(?<$skip>\\\\?.)`,"gsu");i.lastIndex=n;let o=0,l;for(;l=i.exec(e);){const{0:c,groups:{$skip:f}}=l;if(!f&&(!r||r===sr.DEFAULT==!o))return l;c==="["?o++:c==="]"&&o&&o--,i.lastIndex==l.index&&i.lastIndex++}return null}function af(e,t,n){return!!_Q(e,t,0,n)}function xQ(e,t){const n=/\\?./gsu;n.lastIndex=t;let r=e.length,i=0,o=1,l;for(;l=n.exec(e);){const[c]=l;if(c==="[")i++;else if(i)c==="]"&&i--;else if(c==="(")o++;else if(c===")"&&(o--,!o)){r=l.index;break}}return e.slice(t,r)}const c2=new RegExp(String.raw`(?<noncapturingStart>${bQ})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function TQ(e,t){const n=t?.hiddenCaptures??[];let r=t?.captureTransfers??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:r,hiddenCaptures:n};const i="(?>",o="(?:(?=(",l=[0],c=[];let f=0,h=0,p=NaN,m;do{m=!1;let E=0,y=0,T=!1,S;for(c2.lastIndex=Number.isNaN(p)?0:p+o.length;S=c2.exec(e);){const{0:C,index:w,groups:{capturingStart:k,noncapturingStart:N}}=S;if(C==="[")E++;else if(E)C==="]"&&E--;else if(C===i&&!T)p=w,T=!0;else if(T&&N)y++;else if(k)T?y++:(f++,l.push(f+h));else if(C===")"&&T){if(!y){h++;const M=f+h;if(e=`${e.slice(0,p)}${o}${e.slice(p+i.length,w)}))<$$${M}>)${e.slice(w+1)}`,m=!0,c.push(M),EQ(n,M),r.size){const U=new Map;r.forEach((P,V)=>{U.set(V>=M?V+1:V,P.map(G=>G>=M?G+1:G))}),r=U}break}y--}}}while(m);return n.push(...c),e=X1(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:E,groups:{backrefNum:y,wrappedBackrefNum:T}})=>{if(y){const S=+y;if(S>l.length-1)throw new Error(`Backref "${E}" greater than number of captures`);return`\\${l[S]}`}return`\\${T}`},sr.DEFAULT),{pattern:e,captureTransfers:r,hiddenCaptures:n}}const t3=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,Qp=new RegExp(String.raw`
|
|
223
|
+
\\(?: \d+
|
|
224
|
+
| c[A-Za-z]
|
|
225
|
+
| [gk]<[^>]+>
|
|
226
|
+
| [pPu]\{[^\}]+\}
|
|
227
|
+
| u[A-Fa-f\d]{4}
|
|
228
|
+
| x[A-Fa-f\d]{2}
|
|
229
|
+
)
|
|
230
|
+
| \((?: \? (?: [:=!>]
|
|
231
|
+
| <(?:[=!]|[^>]+>)
|
|
232
|
+
| [A-Za-z\-]+:
|
|
233
|
+
| \(DEFINE\)
|
|
234
|
+
))?
|
|
235
|
+
| (?<qBase>${t3})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
|
|
236
|
+
| \\?.
|
|
237
|
+
`.replace(/\s+/g,""),"gsu");function vQ(e){if(!new RegExp(`${t3}\\+`).test(e))return{pattern:e};const t=[];let n=null,r=null,i="",o=0,l;for(Qp.lastIndex=0;l=Qp.exec(e);){const{0:c,index:f,groups:{qBase:h,qMod:p,invalidQ:m}}=l;if(c==="[")o||(r=f),o++;else if(c==="]")o?o--:r=null;else if(!o)if(p==="+"&&i&&!i.startsWith("(")){if(m)throw new Error(`Invalid quantifier "${c}"`);let E=-1;if(/^\{\d+\}$/.test(h))e=yQ(e,f+h.length,p,"");else{if(i===")"||i==="]"){const y=i===")"?n:r;if(y===null)throw new Error(`Invalid unmatched "${i}"`);e=`${e.slice(0,y)}(?>${e.slice(y,f)}${h})${e.slice(f+c.length)}`}else e=`${e.slice(0,f-i.length)}(?>${i}${h})${e.slice(f+c.length)}`;E+=4}Qp.lastIndex+=E}else c[0]==="("?t.push(f):c===")"&&(n=t.length?t.pop():null);i=c}return{pattern:e}}const ir=String.raw,SQ=ir`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,ng=ir`\(\?R=(?<rDepth>[^\)]+)\)|${SQ}`,Md=ir`\(\?<(?![=!])(?<captureName>[^>]+)>`,n3=ir`${Md}|(?<unnamed>\()(?!\?)`,Li=new RegExp(ir`${Md}|${ng}|\(\?|\\?.`,"gsu"),Wp="Cannot use multiple overlapping recursions";function AQ(e,t){const{hiddenCaptures:n,mode:r}={hiddenCaptures:[],mode:"plugin",...t};let i=t?.captureTransfers??new Map;if(!new RegExp(ng,"su").test(e))return{pattern:e,captureTransfers:i,hiddenCaptures:n};if(r==="plugin"&&af(e,ir`\(\?\(DEFINE\)`,sr.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");const o=[],l=af(e,ir`\\[1-9]`,sr.DEFAULT),c=new Map,f=[];let h=!1,p=0,m=0,E;for(Li.lastIndex=0;E=Li.exec(e);){const{0:y,groups:{captureName:T,rDepth:S,gRNameOrNum:C,gRDepth:w}}=E;if(y==="[")p++;else if(p)y==="]"&&p--;else if(S){if(f2(S),h)throw new Error(Wp);if(l)throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);const k=e.slice(0,E.index),N=e.slice(Li.lastIndex);if(af(N,ng,sr.DEFAULT))throw new Error(Wp);const M=+S-1;e=d2(k,N,M,!1,n,o,m),i=m2(i,k,M,o.length,0,m);break}else if(C){f2(w);let k=!1;for(const J of f)if(J.name===C||J.num===+C){if(k=!0,J.hasRecursedWithin)throw new Error(Wp);break}if(!k)throw new Error(ir`Recursive \g cannot be used outside the referenced group "${r==="external"?C:ir`\g<${C}&R=${w}>`}"`);const N=c.get(C),M=xQ(e,N);if(l&&af(M,ir`${Md}|\((?!\?)`,sr.DEFAULT))throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);const U=e.slice(N,E.index),P=M.slice(U.length+y.length),V=o.length,G=+w-1,ie=d2(U,P,G,!0,n,o,m);i=m2(i,U,G,o.length-V,V,m);const $=e.slice(0,N),X=e.slice(N+M.length);e=`${$}${ie}${X}`,Li.lastIndex+=ie.length-y.length-U.length-P.length,f.forEach(J=>J.hasRecursedWithin=!0),h=!0}else if(T)m++,c.set(String(m),Li.lastIndex),c.set(T,Li.lastIndex),f.push({num:m,name:T});else if(y[0]==="("){const k=y==="(";k&&(m++,c.set(String(m),Li.lastIndex)),f.push(k?{num:m}:{})}else y===")"&&f.pop()}return n.push(...o),{pattern:e,captureTransfers:i,hiddenCaptures:n}}function f2(e){const t=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e))throw new Error(t);if(e=+e,e<2||e>100)throw new Error(t)}function d2(e,t,n,r,i,o,l){const c=new Set;r&&e3(e+t,Md,({groups:{captureName:h}})=>{c.add(h)},sr.DEFAULT);const f=[n,r?c:null,i,o,l];return`${e}${h2(`(?:${e}`,"forward",...f)}(?:)${h2(`${t})`,"backward",...f)}${t}`}function h2(e,t,n,r,i,o,l){const f=p=>t==="forward"?p+2:n-p+2-1;let h="";for(let p=0;p<n;p++){const m=f(p);h+=X1(e,ir`${n3}|\\k<(?<backref>[^>]+)>`,({0:E,groups:{captureName:y,unnamed:T,backref:S}})=>{if(S&&r&&!r.has(S))return E;const C=`_$${m}`;if(T||y){const w=l+o.length+1;return o.push(w),CQ(i,w),T?E:`(?<${y}${C}>`}return ir`\k<${S}${C}>`},sr.DEFAULT)}return h}function CQ(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function m2(e,t,n,r,i,o){if(e.size&&r){let l=0;e3(t,n3,()=>l++,sr.DEFAULT);const c=o-l+i,f=new Map;return e.forEach((h,p)=>{const m=(r-l*n)/n,E=l*n,y=p>c+l?p+r:p,T=[];for(const S of h)if(S<=c)T.push(S);else if(S>c+l+m)T.push(S+r);else if(S<=c+l)for(let C=0;C<=n;C++)T.push(S+l*C);else for(let C=0;C<=n;C++)T.push(S+E+m*C);f.set(y,T)}),f}return e}var Ft=String.fromCodePoint,Pe=String.raw,pr={},Pd=globalThis.RegExp;pr.flagGroups=(()=>{try{new Pd("(?i:)")}catch{return!1}return!0})();pr.unicodeSets=(()=>{try{new Pd("[[]]","v")}catch{return!1}return!0})();pr.bugFlagVLiteralHyphenIsRange=pr.unicodeSets?(()=>{try{new Pd(Pe`[\d\-a]`,"v")}catch{return!0}return!1})():!1;pr.bugNestedClassIgnoresNegation=pr.unicodeSets&&new Pd("[[^a]]","v").test("a");function Yf(e,{enable:t,disable:n}){return{dotAll:!n?.dotAll&&!!(t?.dotAll||e.dotAll),ignoreCase:!n?.ignoreCase&&!!(t?.ignoreCase||e.ignoreCase)}}function tu(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}function rg(e,t){return p2[e]>=p2[t]}function wQ(e,t){if(e==null)throw new Error(t??"Value expected");return e}var p2={ES2025:2025,ES2024:2024,ES2018:2018},kQ={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function r3(e={}){if({}.toString.call(e)!=="[object Object]")throw new Error("Unexpected options");if(e.target!==void 0&&!kQ[e.target])throw new Error(`Unexpected target "${e.target}"`);const t={accuracy:"default",avoidSubclass:!1,flags:"",global:!1,hasIndices:!1,lazyCompileLength:1/0,target:"auto",verbose:!1,...e,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...e.rules}};return t.target==="auto"&&(t.target=pr.flagGroups?"ES2025":pr.unicodeSets?"ES2024":"ES2018"),t}var NQ="[ -\r ]",RQ=new Set([Ft(304),Ft(305)]),oa=Pe`[\p{L}\p{M}\p{N}\p{Pc}]`;function a3(e){if(RQ.has(e))return[e];const t=new Set,n=e.toLowerCase(),r=n.toUpperCase(),i=IQ.get(n),o=OQ.get(n),l=LQ.get(n);return[...r].length===1&&t.add(r),l&&t.add(l),i&&t.add(i),t.add(n),o&&t.add(o),[...t]}var Q1=new Map(`C Other
|
|
238
|
+
Cc Control cntrl
|
|
239
|
+
Cf Format
|
|
240
|
+
Cn Unassigned
|
|
241
|
+
Co Private_Use
|
|
242
|
+
Cs Surrogate
|
|
243
|
+
L Letter
|
|
244
|
+
LC Cased_Letter
|
|
245
|
+
Ll Lowercase_Letter
|
|
246
|
+
Lm Modifier_Letter
|
|
247
|
+
Lo Other_Letter
|
|
248
|
+
Lt Titlecase_Letter
|
|
249
|
+
Lu Uppercase_Letter
|
|
250
|
+
M Mark Combining_Mark
|
|
251
|
+
Mc Spacing_Mark
|
|
252
|
+
Me Enclosing_Mark
|
|
253
|
+
Mn Nonspacing_Mark
|
|
254
|
+
N Number
|
|
255
|
+
Nd Decimal_Number digit
|
|
256
|
+
Nl Letter_Number
|
|
257
|
+
No Other_Number
|
|
258
|
+
P Punctuation punct
|
|
259
|
+
Pc Connector_Punctuation
|
|
260
|
+
Pd Dash_Punctuation
|
|
261
|
+
Pe Close_Punctuation
|
|
262
|
+
Pf Final_Punctuation
|
|
263
|
+
Pi Initial_Punctuation
|
|
264
|
+
Po Other_Punctuation
|
|
265
|
+
Ps Open_Punctuation
|
|
266
|
+
S Symbol
|
|
267
|
+
Sc Currency_Symbol
|
|
268
|
+
Sk Modifier_Symbol
|
|
269
|
+
Sm Math_Symbol
|
|
270
|
+
So Other_Symbol
|
|
271
|
+
Z Separator
|
|
272
|
+
Zl Line_Separator
|
|
273
|
+
Zp Paragraph_Separator
|
|
274
|
+
Zs Space_Separator
|
|
275
|
+
ASCII
|
|
276
|
+
ASCII_Hex_Digit AHex
|
|
277
|
+
Alphabetic Alpha
|
|
278
|
+
Any
|
|
279
|
+
Assigned
|
|
280
|
+
Bidi_Control Bidi_C
|
|
281
|
+
Bidi_Mirrored Bidi_M
|
|
282
|
+
Case_Ignorable CI
|
|
283
|
+
Cased
|
|
284
|
+
Changes_When_Casefolded CWCF
|
|
285
|
+
Changes_When_Casemapped CWCM
|
|
286
|
+
Changes_When_Lowercased CWL
|
|
287
|
+
Changes_When_NFKC_Casefolded CWKCF
|
|
288
|
+
Changes_When_Titlecased CWT
|
|
289
|
+
Changes_When_Uppercased CWU
|
|
290
|
+
Dash
|
|
291
|
+
Default_Ignorable_Code_Point DI
|
|
292
|
+
Deprecated Dep
|
|
293
|
+
Diacritic Dia
|
|
294
|
+
Emoji
|
|
295
|
+
Emoji_Component EComp
|
|
296
|
+
Emoji_Modifier EMod
|
|
297
|
+
Emoji_Modifier_Base EBase
|
|
298
|
+
Emoji_Presentation EPres
|
|
299
|
+
Extended_Pictographic ExtPict
|
|
300
|
+
Extender Ext
|
|
301
|
+
Grapheme_Base Gr_Base
|
|
302
|
+
Grapheme_Extend Gr_Ext
|
|
303
|
+
Hex_Digit Hex
|
|
304
|
+
IDS_Binary_Operator IDSB
|
|
305
|
+
IDS_Trinary_Operator IDST
|
|
306
|
+
ID_Continue IDC
|
|
307
|
+
ID_Start IDS
|
|
308
|
+
Ideographic Ideo
|
|
309
|
+
Join_Control Join_C
|
|
310
|
+
Logical_Order_Exception LOE
|
|
311
|
+
Lowercase Lower
|
|
312
|
+
Math
|
|
313
|
+
Noncharacter_Code_Point NChar
|
|
314
|
+
Pattern_Syntax Pat_Syn
|
|
315
|
+
Pattern_White_Space Pat_WS
|
|
316
|
+
Quotation_Mark QMark
|
|
317
|
+
Radical
|
|
318
|
+
Regional_Indicator RI
|
|
319
|
+
Sentence_Terminal STerm
|
|
320
|
+
Soft_Dotted SD
|
|
321
|
+
Terminal_Punctuation Term
|
|
322
|
+
Unified_Ideograph UIdeo
|
|
323
|
+
Uppercase Upper
|
|
324
|
+
Variation_Selector VS
|
|
325
|
+
White_Space space
|
|
326
|
+
XID_Continue XIDC
|
|
327
|
+
XID_Start XIDS`.split(/\s/).map(e=>[Dd(e),e])),OQ=new Map([["s",Ft(383)],[Ft(383),"s"]]),LQ=new Map([[Ft(223),Ft(7838)],[Ft(107),Ft(8490)],[Ft(229),Ft(8491)],[Ft(969),Ft(8486)]]),IQ=new Map([Xa(453),Xa(456),Xa(459),Xa(498),...Kp(8072,8079),...Kp(8088,8095),...Kp(8104,8111),Xa(8124),Xa(8140),Xa(8188)]),DQ=new Map([["alnum",Pe`[\p{Alpha}\p{Nd}]`],["alpha",Pe`\p{Alpha}`],["ascii",Pe`\p{ASCII}`],["blank",Pe`[\p{Zs}\t]`],["cntrl",Pe`\p{Cc}`],["digit",Pe`\p{Nd}`],["graph",Pe`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",Pe`\p{Lower}`],["print",Pe`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",Pe`[\p{P}\p{S}]`],["space",Pe`\p{space}`],["upper",Pe`\p{Upper}`],["word",Pe`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",Pe`\p{AHex}`]]);function MQ(e,t){const n=[];for(let r=e;r<=t;r++)n.push(r);return n}function Xa(e){const t=Ft(e);return[t.toLowerCase(),t]}function Kp(e,t){return MQ(e,t).map(n=>Xa(n))}var i3=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function PQ(e,t){const n={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...t};s3(e);const r={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:rg(n.bestEffortTarget,"ES2024"),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};Gl(e,BQ,r);const i={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},o={currentFlags:i,prevFlags:null,globalFlags:i,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:r.subroutineRefMap};Gl(e,jQ,o);const l={groupsByName:o.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:o.reffedNodesByReferencer};return Gl(e,UQ,l),e._originMap=o.groupOriginByCopy,e._strategy=r.strategy,e}var BQ={AbsenceFunction({node:e,parent:t,replaceWith:n}){const{body:r,kind:i}=e;if(i==="repeater"){const o=hr();o.body[0].body.push(ji({negate:!0,body:r}),Js("Any"));const l=hr();l.body[0].body.push(KN("greedy",0,1/0,o)),n(Ot(l,t),{traverse:!0})}else throw new Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:e,parent:t,key:n},{flagDirectivesByAlt:r}){const i=e.body.filter(o=>o.kind==="flags");for(let o=n+1;o<t.body.length;o++){const l=t.body[o];tu(r,l,[]).push(...i)}},exit({node:e},{flagDirectivesByAlt:t}){if(t.get(e)?.length){const n=l3(t.get(e));if(n){const r=hr({flags:n});r.body[0].body=e.body,e.body=[Ot(r,e)]}}}},Assertion({node:e,parent:t,key:n,container:r,root:i,remove:o,replaceWith:l},c){const{kind:f,negate:h}=e,{asciiWordBoundaries:p,avoidSubclass:m,supportedGNodes:E,wordIsAscii:y}=c;if(f==="text_segment_boundary")throw new Error(`Unsupported text segment boundary "\\${h?"Y":"y"}"`);if(f==="line_end")l(Ot(ji({body:[Wi({body:[J0("string_end")]}),Wi({body:[Id(10)]})]}),t));else if(f==="line_start")l(Ot(la(Pe`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(f==="search_start")if(E.has(e))i.flags.sticky=!0,o();else{const T=r[n-1];if(T&&GQ(T))l(Ot(ji({negate:!0}),t));else{if(m)throw new Error(Pe`Uses "\G" in a way that requires a subclass`);l(Qa(J0("string_start"),t)),c.strategy="clip_search"}}else if(!(f==="string_end"||f==="string_start"))if(f==="string_end_newline")l(Ot(la(Pe`(?=\n?\z)`),t));else if(f==="word_boundary"){if(!y&&!p){const T=`(?:(?<=${oa})(?!${oa})|(?<!${oa})(?=${oa}))`,S=`(?:(?<=${oa})(?=${oa})|(?<!${oa})(?!${oa}))`;l(Ot(la(h?S:T),t))}}else throw new Error(`Unexpected assertion kind "${f}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!Jp(n)&&(n=Zp(n,t),e.ref=n)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:r}=e;r&&!Jp(r)&&(r=Zp(r,t),e.name=r),n.set(e.number,e),r&&n.set(r,e)},CharacterClassRange({node:e,parent:t,replaceWith:n}){if(t.kind==="intersection"){const r=bf({body:[e]});n(Ot(r,t),{traverse:!0})}},CharacterSet({node:e,parent:t,replaceWith:n},{accuracy:r,minTargetEs2024:i,digitIsAscii:o,spaceIsAscii:l,wordIsAscii:c}){const{kind:f,negate:h,value:p}=e;if(o&&(f==="digit"||p==="digit")){n(Qa(tg("digit",{negate:h}),t));return}if(l&&(f==="space"||p==="space")){n(Ot(e0(la(NQ),h),t));return}if(c&&(f==="word"||p==="word")){n(Qa(tg("word",{negate:h}),t));return}if(f==="any")n(Qa(Js("Any"),t));else if(f==="digit")n(Qa(Js("Nd",{negate:h}),t));else if(f!=="dot")if(f==="text_segment"){if(r==="strict")throw new Error(Pe`Use of "\X" requires non-strict accuracy`);const m="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",E=Pe`\p{RI}{2}|${m}(?:\u200D${m})*`;n(Ot(la(Pe`(?>\r\n|${i?Pe`\p{RGI_Emoji}`:E}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(f==="hex")n(Qa(Js("AHex",{negate:h}),t));else if(f==="newline")n(Ot(la(h?`[^
|
|
328
|
+
]`:`(?>\r
|
|
329
|
+
?|[
|
|
330
|
+
\v\f
\u2028\u2029])`),t));else if(f==="posix")if(!i&&(p==="graph"||p==="print")){if(r==="strict")throw new Error(`POSIX class "${p}" requires min target ES2024 or non-strict accuracy`);let m={graph:"!-~",print:" -~"}[p];h&&(m=`\0-${Ft(m.codePointAt(0)-1)}${Ft(m.codePointAt(2)+1)}-`),n(Ot(la(`[${m}]`),t))}else n(Ot(e0(la(DQ.get(p)),h),t));else if(f==="property")Q1.has(Dd(p))||(e.key="sc");else if(f==="space")n(Qa(Js("space",{negate:h}),t));else if(f==="word")n(Ot(e0(la(oa),h),t));else throw new Error(`Unexpected character set kind "${f}"`)},Directive({node:e,parent:t,root:n,remove:r,replaceWith:i,removeAllPrevSiblings:o,removeAllNextSiblings:l}){const{kind:c,flags:f}=e;if(c==="flags")if(!f.enable&&!f.disable)r();else{const h=hr({flags:f});h.body[0].body=l(),i(Ot(h,t),{traverse:!0})}else if(c==="keep"){const h=n.body[0],m=n.body.length===1&&XN(h,{type:"Group"})&&h.body[0].body.length===1?h.body[0]:n;if(t.parent!==m||m.body.length>1)throw new Error(Pe`Uses "\K" in a way that's unsupported`);const E=ji({behind:!0});E.body[0].body=o(),i(Ot(E,t))}else throw new Error(`Unexpected directive kind "${c}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw new Error('Unsupported flag "P"');if(e.textSegmentMode==="word")throw new Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(n=>delete e[n]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;const{enable:t,disable:n}=e.flags;t?.extended&&delete t.extended,n?.extended&&delete n.extended,t?.dotAll&&n?.dotAll&&delete t.dotAll,t?.ignoreCase&&n?.ignoreCase&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,n&&!Object.keys(n).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){const{kind:n}=e;n==="lookbehind"&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:n}){const{kind:r}=e;if(r==="fail")n(Ot(ji({negate:!0}),t));else throw new Error(`Unsupported named callout "(*${r.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type==="Quantifier"){const t=hr();t.body[0].body.push(e.body),e.body=Ot(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){const n=[];let r=!1,i=!1;for(const o of e.body)if(o.body.length===1&&o.body[0].kind==="search_start")o.body.pop();else{const l=c3(o.body);l?(r=!0,Array.isArray(l)?n.push(...l):n.push(l)):i=!0}r&&!i&&n.forEach(o=>t.add(o))},exit(e,{accuracy:t,passedLookbehind:n,strategy:r}){if(t==="strict"&&n&&r)throw new Error(Pe`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!Jp(n)&&(n=Zp(n,t),e.ref=n)}},jQ={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){const{orphan:r,ref:i}=e;r||n.set(e,[...t.get(i).map(({node:o})=>o)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:r},{groupOriginByCopy:i,groupsByName:o,multiplexCapturesToLeftByRef:l,openRefs:c,reffedNodesByReferencer:f}){const h=i.get(e);if(h&&c.has(e.number)){const m=Qa(g2(e.number),t);f.set(m,c.get(e.number)),n(m);return}c.set(e.number,e),l.set(e.number,[]),e.name&&tu(l,e.name,[]);const p=l.get(e.name??e.number);for(let m=0;m<p.length;m++){const E=p[m];if(h===E.node||h&&h===E.origin||e===E.origin){p.splice(m,1);break}}if(l.get(e.number).push({node:e,origin:h}),e.name&&l.get(e.name).push({node:e,origin:h}),e.name){const m=tu(o,e.name,new Map);let E=!1;if(h)E=!0;else for(const y of m.values())if(!y.hasDuplicateNameToRemove){E=!0;break}o.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:E})}},exit({node:e},{openRefs:t}){t.get(e.number)===e&&t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=Yf(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:n},r){const{isRecursive:i,ref:o}=e;if(i){let p=t;for(;(p=p.parent)&&!(p.type==="CapturingGroup"&&(p.name===o||p.number===o)););r.reffedNodesByReferencer.set(e,p);return}const l=r.subroutineRefMap.get(o),c=o===0,f=c?g2(0):o3(l,r.groupOriginByCopy,null);let h=f;if(!c){const p=l3(FQ(l,E=>E.type==="Group"&&!!E.flags)),m=p?Yf(r.globalFlags,p):r.globalFlags;HQ(m,r.currentFlags)||(h=hr({flags:$Q(m)}),h.body[0].body.push(f))}n(Ot(h,t),{traverse:!c})}},UQ={Backreference({node:e,parent:t,replaceWith:n},r){if(e.orphan){r.highestOrphanBackref=Math.max(r.highestOrphanBackref,e.ref);return}const o=r.reffedNodesByReferencer.get(e).filter(l=>zQ(l,e));if(!o.length)n(Ot(ji({negate:!0}),t));else if(o.length>1){const l=hr({atomic:!0,body:o.reverse().map(c=>Wi({body:[eg(c.number)]}))});n(Ot(l,t))}else e.ref=o[0].number},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){const n=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let r=0;r<n;r++){const i=WN();e.body.at(-1).body.push(i)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function s3(e){Gl(e,{"*"({node:t,parent:n}){t.parent=n}})}function HQ(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function zQ(e,t){let n=t;do{if(n.type==="Regex")return!1;if(n.type==="Alternative")continue;if(n===e)return!1;const r=u3(n.parent);for(const i of r){if(i===n)break;if(i===e||f3(i,e))return!0}}while(n=n.parent);throw new Error("Unexpected path")}function o3(e,t,n,r){const i=Array.isArray(e)?[]:{};for(const[o,l]of Object.entries(e))o==="parent"?i.parent=Array.isArray(n)?r:n:l&&typeof l=="object"?i[o]=o3(l,t,i,n):(o==="type"&&l==="CapturingGroup"&&t.set(i,t.get(e)??e),i[o]=l);return i}function g2(e){const t=ZN(e);return t.isRecursive=!0,t}function FQ(e,t){const n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}function Zp(e,t){if(t.has(e))return t.get(e);const n=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return t.set(e,n),n}function l3(e){const t=["dotAll","ignoreCase"],n={enable:{},disable:{}};return e.forEach(({flags:r})=>{t.forEach(i=>{r.enable?.[i]&&(delete n.disable[i],n.enable[i]=!0),r.disable?.[i]&&(n.disable[i]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable?n:null}function $Q({dotAll:e,ignoreCase:t}){const n={};return(e||t)&&(n.enable={},e&&(n.enable.dotAll=!0),t&&(n.enable.ignoreCase=!0)),(!e||!t)&&(n.disable={},!e&&(n.disable.dotAll=!0),!t&&(n.disable.ignoreCase=!0)),n}function u3(e){if(!e)throw new Error("Node expected");const{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function c3(e){const t=e.find(n=>n.kind==="search_start"||qQ(n,{negate:!1})||!VQ(n));if(!t)return null;if(t.kind==="search_start")return t;if(t.type==="LookaroundAssertion")return t.body[0].body[0];if(t.type==="CapturingGroup"||t.type==="Group"){const n=[];for(const r of t.body){const i=c3(r.body);if(!i)return null;Array.isArray(i)?n.push(...i):n.push(i)}return n}return null}function f3(e,t){const n=u3(e)??[];for(const r of n)if(r===t||f3(r,t))return!0;return!1}function VQ({type:e}){return e==="Assertion"||e==="Directive"||e==="LookaroundAssertion"}function GQ(e){const t=["Character","CharacterClass","CharacterSet"];return t.includes(e.type)||e.type==="Quantifier"&&e.min&&t.includes(e.body.type)}function qQ(e,t){const n={negate:null,...t};return e.type==="LookaroundAssertion"&&(n.negate===null||e.negate===n.negate)&&e.body.length===1&&XN(e.body[0],{type:"Assertion",kind:"search_start"})}function Jp(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function la(e,t){const r=QN(e,{...t,unicodePropertyMap:Q1}).body;return r.length>1||r[0].body.length>1?hr({body:r}):r[0].body[0]}function e0(e,t){return e.negate=t,e}function Qa(e,t){return e.parent=t,e}function Ot(e,t){return s3(e),e.parent=t,e}function YQ(e,t){const n=r3(t),r=rg(n.target,"ES2024"),i=rg(n.target,"ES2025"),o=n.rules.recursionLimit;if(!Number.isInteger(o)||o<2||o>20)throw new Error("Invalid recursionLimit; use 2-20");let l=null,c=null;if(!i){const y=[e.flags.ignoreCase];Gl(e,XQ,{getCurrentModI:()=>y.at(-1),popModI(){y.pop()},pushModI(T){y.push(T)},setHasCasedChar(){y.at(-1)?l=!0:c=!0}})}const f={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||l)&&!c)};let h=e;const p={accuracy:n.accuracy,appliedGlobalFlags:f,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:h,originMap:e._originMap,recursionLimit:o,useAppliedIgnoreCase:!!(!i&&l&&c),useFlagMods:i,useFlagV:r,verbose:n.verbose};function m(y){return p.lastNode=h,h=y,wQ(QQ[y.type],`Unexpected node type "${y.type}"`)(y,p,m)}const E={pattern:e.body.map(m).join("|"),flags:m(e.flags),options:{...e.options}};return r||(delete E.options.force.v,E.options.disable.v=!0,E.options.unicodeSetsPlugin=null),E._captureTransfers=new Map,E._hiddenCaptures=[],p.captureMap.forEach((y,T)=>{y.hidden&&E._hiddenCaptures.push(T),y.transferTo&&tu(E._captureTransfers,y.transferTo,[]).push(T)}),E}var XQ={"*":{enter({node:e},t){if(E2(e)){const n=t.getCurrentModI();t.pushModI(e.flags?Yf({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){E2(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){W1(Ft(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),d3(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind==="property"&&i3.has(e.value)&&t.setHasCasedChar()}},QQ={Alternative({body:e},t,n){return e.map(n).join("")},Assertion({kind:e,negate:t}){if(e==="string_end")return"$";if(e==="string_start")return"^";if(e==="word_boundary")return t?Pe`\B`:Pe`\b`;throw new Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if(typeof e!="number")throw new Error("Unexpected named backref in transformed AST");if(!t.useFlagMods&&t.accuracy==="strict"&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+e},CapturingGroup(e,t,n){const{body:r,name:i,number:o}=e,l={ignoreCase:t.currentFlags.ignoreCase},c=t.originMap.get(e);return c&&(l.hidden=!0,o>c.number&&(l.transferTo=c.number)),t.captureMap.set(o,l),`(${i?`?<${i}>`:""}${r.map(n).join("|")})`},Character({value:e},t){const n=Ft(e),r=Ws(e,{escDigit:t.lastNode.type==="Backreference",inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(r!==n)return r;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&W1(n)){const i=a3(n);return t.inCharClass?i.join(""):i.length>1?`[${i.join("")}]`:i[0]}return n},CharacterClass(e,t,n){const{kind:r,negate:i,parent:o}=e;let{body:l}=e;if(r==="intersection"&&!t.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");pr.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&l.some(y2)&&(l=[Id(45),...l.filter(h=>!y2(h))]);const c=()=>`[${i?"^":""}${l.map(n).join(r==="intersection"?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||pr.bugNestedClassIgnoresNegation)&&!i){const p=l.filter(m=>m.type==="CharacterClass"&&m.kind==="union"&&m.negate);if(p.length){const m=hr(),E=m.body[0];return m.parent=o,E.parent=m,l=l.filter(y=>!p.includes(y)),e.body=l,l.length?(e.parent=E,E.body.push(e)):m.body.pop(),p.forEach(y=>{const T=Wi({body:[y]});y.parent=T,T.parent=m,m.body.push(T)}),n(m)}}t.inCharClass=!0;const h=c();return t.inCharClass=!1,h}const f=l[0];if(r==="union"&&!i&&f&&((!t.useFlagV||!t.verbose)&&o.kind==="union"&&!(pr.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&o.kind==="intersection"&&l.length===1&&f.type!=="CharacterClassRange"))return l.map(n).join("");if(!t.useFlagV&&o.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return c()},CharacterClassRange(e,t){const n=e.min.value,r=e.max.value,i={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},o=Ws(n,i),l=Ws(r,i),c=new Set;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase){const f=d3(e);eW(f).forEach(p=>{c.add(Array.isArray(p)?`${Ws(p[0],i)}-${Ws(p[1],i)}`:Ws(p,i))})}return`${o}-${l}${[...c].join("")}`},CharacterSet({kind:e,negate:t,value:n,key:r},i){if(e==="dot")return i.currentFlags.dotAll?i.appliedGlobalFlags.dotAll||i.useFlagMods?".":"[^]":Pe`[^\n]`;if(e==="digit")return t?Pe`\D`:Pe`\d`;if(e==="property"){if(i.useAppliedIgnoreCase&&i.currentFlags.ignoreCase&&i3.has(n))throw new Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?Pe`\P`:Pe`\p`}{${r?`${r}=`:""}${n}}`}if(e==="word")return t?Pe`\W`:Pe`\w`;throw new Error(`Unexpected character set kind "${e}"`)},Flags(e,t){return(t.appliedGlobalFlags.ignoreCase?"i":"")+(e.dotAll?"s":"")+(e.sticky?"y":"")},Group({atomic:e,body:t,flags:n,parent:r},i,o){const l=i.currentFlags;n&&(i.currentFlags=Yf(l,n));const c=t.map(o).join("|"),f=!i.verbose&&t.length===1&&r.type!=="Quantifier"&&!e&&(!i.useFlagMods||!n)?c:`(?${tW(e,n,i.useFlagMods)}${c})`;return i.currentFlags=l,f},LookaroundAssertion({body:e,kind:t,negate:n},r,i){return`(?${`${t==="lookahead"?"":"<"}${n?"!":"="}`}${e.map(i).join("|")})`},Quantifier(e,t,n){return n(e.body)+nW(e)},Subroutine({isRecursive:e,ref:t},n){if(!e)throw new Error("Unexpected non-recursive subroutine in transformed AST");const r=n.recursionLimit;return t===0?`(?R=${r})`:Pe`\g<${t}&R=${r}>`}},WQ=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),KQ=new Set(["-","\\","]","^","["]),ZQ=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),b2=new Map([[9,Pe`\t`],[10,Pe`\n`],[11,Pe`\v`],[12,Pe`\f`],[13,Pe`\r`],[8232,Pe`\u2028`],[8233,Pe`\u2029`],[65279,Pe`\uFEFF`]]),JQ=new RegExp("^\\p{Cased}$","u");function W1(e){return JQ.test(e)}function d3(e,t){const n=!!t?.firstOnly,r=e.min.value,i=e.max.value,o=[];if(r<65&&(i===65535||i>=131071)||r===65536&&i>=131071)return o;for(let l=r;l<=i;l++){const c=Ft(l);if(!W1(c))continue;const f=a3(c).filter(h=>{const p=h.codePointAt(0);return p<r||p>i});if(f.length&&(o.push(...f),n))break}return o}function Ws(e,{escDigit:t,inCharClass:n,useFlagV:r}){if(b2.has(e))return b2.get(e);if(e<32||e>126&&e<160||e>262143||t&&rW(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;const i=n?r?ZQ:KQ:WQ,o=Ft(e);return(i.has(o)?"\\":"")+o}function eW(e){const t=e.map(i=>i.codePointAt(0)).sort((i,o)=>i-o),n=[];let r=null;for(let i=0;i<t.length;i++)t[i+1]===t[i]+1?r??=t[i]:r===null?n.push(t[i]):(n.push([r,t[i]]),r=null);return n}function tW(e,t,n){if(e)return">";let r="";if(t&&n){const{enable:i,disable:o}=t;r=(i?.ignoreCase?"i":"")+(i?.dotAll?"s":"")+(o?"-":"")+(o?.ignoreCase?"i":"")+(o?.dotAll?"s":"")}return`${r}:`}function nW({kind:e,max:t,min:n}){let r;return!n&&t===1?r="?":!n&&t===1/0?r="*":n===1&&t===1/0?r="+":n===t?r=`{${n}}`:r=`{${n},${t===1/0?"":t}}`,r+{greedy:"",lazy:"?",possessive:"+"}[e]}function E2({type:e}){return e==="CapturingGroup"||e==="Group"||e==="LookaroundAssertion"}function rW(e){return e>47&&e<58}function y2({type:e,value:t}){return e==="Character"&&t===45}var aW=class ag extends RegExp{#t=new Map;#e=null;#r;#n=null;#a=null;rawOptions={};get source(){return this.#r||"(?:)"}constructor(t,n,r){const i=!!r?.lazyCompile;if(t instanceof RegExp){if(r)throw new Error("Cannot provide options when copying a regexp");const o=t;super(o,n),this.#r=o.source,o instanceof ag&&(this.#t=o.#t,this.#n=o.#n,this.#a=o.#a,this.rawOptions=o.rawOptions)}else{const o={hiddenCaptures:[],strategy:null,transfers:[],...r};super(i?"":t,n),this.#r=t,this.#t=sW(o.hiddenCaptures,o.transfers),this.#a=o.strategy,this.rawOptions=r??{}}i||(this.#e=this)}exec(t){if(!this.#e){const{lazyCompile:i,...o}=this.rawOptions;this.#e=new ag(this.#r,this.flags,o)}const n=this.global||this.sticky,r=this.lastIndex;if(this.#a==="clip_search"&&n&&r){this.lastIndex=0;const i=this.#i(t.slice(r));return i&&(iW(i,r,t,this.hasIndices),this.lastIndex+=r),i}return this.#i(t)}#i(t){this.#e.lastIndex=this.lastIndex;const n=super.exec.call(this.#e,t);if(this.lastIndex=this.#e.lastIndex,!n||!this.#t.size)return n;const r=[...n];n.length=1;let i;this.hasIndices&&(i=[...n.indices],n.indices.length=1);const o=[0];for(let l=1;l<r.length;l++){const{hidden:c,transferTo:f}=this.#t.get(l)??{};if(c?o.push(null):(o.push(n.length),n.push(r[l]),this.hasIndices&&n.indices.push(i[l])),f&&r[l]!==void 0){const h=o[f];if(!h)throw new Error(`Invalid capture transfer to "${h}"`);if(n[h]=r[l],this.hasIndices&&(n.indices[h]=i[l]),n.groups){this.#n||(this.#n=oW(this.source));const p=this.#n.get(f);p&&(n.groups[p]=r[l],this.hasIndices&&(n.indices.groups[p]=i[l]))}}}return n}};function iW(e,t,n,r){if(e.index+=t,e.input=n,r){const i=e.indices;for(let l=0;l<i.length;l++){const c=i[l];c&&(i[l]=[c[0]+t,c[1]+t])}const o=i.groups;o&&Object.keys(o).forEach(l=>{const c=o[l];c&&(o[l]=[c[0]+t,c[1]+t])})}}function sW(e,t){const n=new Map;for(const r of e)n.set(r,{hidden:!0});for(const[r,i]of t)for(const o of i)tu(n,o,{}).transferTo=r;return n}function oW(e){const t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,n=new Map;let r=0,i=0,o;for(;o=t.exec(e);){const{0:l,groups:{capture:c,name:f}}=o;l==="["?r++:r?l==="]"&&r--:c&&(i++,f&&n.set(i,f))}return n}function lW(e,t){const n=uW(e,t);return n.options?new aW(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function uW(e,t){const n=r3(t),r=QN(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:Q1}),i=PQ(r,{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),o=YQ(i,n),l=AQ(o.pattern,{captureTransfers:o._captureTransfers,hiddenCaptures:o._hiddenCaptures,mode:"external"}),c=vQ(l.pattern),f=TQ(c.pattern,{captureTransfers:l.captureTransfers,hiddenCaptures:l.hiddenCaptures}),h={pattern:f.pattern,flags:`${n.hasIndices?"d":""}${n.global?"g":""}${o.flags}${o.options.disable.v?"u":"v"}`};if(n.avoidSubclass){if(n.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{const p=f.hiddenCaptures.sort((T,S)=>T-S),m=Array.from(f.captureTransfers),E=i._strategy,y=h.pattern.length>=n.lazyCompileLength;(p.length||m.length||E||y)&&(h.options={...p.length&&{hiddenCaptures:p},...m.length&&{transfers:m},...E&&{strategy:E},...y&&{lazyCompile:y}})}return h}function h3(e,t){return lW(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function cW(e={}){const t={target:"auto",cache:new Map,...e};return t.regexConstructor||=n=>h3(n,{target:t.target}),{createScanner(n){return new CX(n,t)},createString(n){return{content:n}}}}Jk(L1({bundledLanguages:()=>M1,bundledLanguagesAlias:()=>D1,bundledLanguagesBase:()=>I1,bundledLanguagesInfo:()=>Ad,bundledThemes:()=>B1,bundledThemesInfo:()=>P1,codeToHast:()=>BN,codeToHtml:()=>G1,codeToTokens:()=>jN,codeToTokensBase:()=>UN,codeToTokensWithThemes:()=>HN,createHighlighter:()=>V1,createJavaScriptRegexEngine:()=>cW,createOnigurumaEngine:()=>nN,defaultJavaScriptRegexConstructor:()=>h3,getLastGrammarState:()=>FN,getSingletonHighlighter:()=>zN,loadWasm:()=>U1}),AX);const fW=v.createContext({code:""}),dW={name:"line-numbers",line(e,t){e.children.unshift({type:"element",tagName:"span",properties:{className:["inline-block","min-w-10","mr-4","text-right","select-none","text-muted-foreground"]},children:[{type:"text",value:String(t)}]})}};async function hW(e,t,n=!1){return await G1(e,{lang:t,theme:"one-dark-pro",transformers:n?[dW]:[]})}const ig=({code:e,language:t,showLineNumbers:n=!1,className:r,children:i,...o})=>{const[l,c]=v.useState("");return v.useEffect(()=>{let f=!1;return hW(e,t,n).then(h=>{f||c(h)}),()=>{f=!0}},[e,t,n]),_.jsx(fW.Provider,{value:{code:e},children:_.jsx("div",{className:we("group relative w-full overflow-hidden rounded-md border bg-background text-foreground",r),...o,children:_.jsxs("div",{className:"relative",children:[_.jsx("div",{className:"overflow-auto [&>pre]:m-0 [&>pre]:bg-background! [&>pre]:p-4 [&>pre]:text-foreground! [&>pre]:text-sm [&_code]:font-mono [&_code]:text-sm",dangerouslySetInnerHTML:{__html:l}}),i&&_.jsx("div",{className:"absolute top-2 right-2 flex items-center gap-2",children:i})]})})})},mW=({className:e,...t})=>_.jsx(eC,{className:we("not-prose mb-4 w-full rounded-md border",e),...t}),pW=e=>{const t={"input-streaming":"Pending","input-available":"Running","output-available":"Completed","output-error":"Error",interrupted:"Interrupted"},n={"input-streaming":_.jsx(RL,{className:"size-4"}),"input-available":_.jsx(LL,{className:"size-4 animate-pulse"}),"output-available":_.jsx(SL,{className:"size-4 text-emerald-400"}),"output-error":_.jsx(M2,{className:"size-4 text-red-400"}),interrupted:_.jsx(D2,{className:"size-4 text-muted-foreground"})};return _.jsxs(Zk,{className:"gap-1.5 rounded-full text-xs",variant:"secondary",children:[n[e],t[e]]})},gW=({className:e,title:t,state:n,...r})=>_.jsxs(tC,{className:we("group flex w-full items-center justify-between gap-4 p-3",e),...r,children:[_.jsxs("div",{className:"flex items-center gap-2",children:[_.jsx(H2,{className:"size-4 text-muted-foreground"}),_.jsx("span",{className:"font-medium font-mono text-sm",children:t}),pW(n)]}),_.jsx(Xf,{className:"size-4 text-muted-foreground transition-transform group-data-[state=open]:rotate-180"})]}),bW=({className:e,...t})=>_.jsx(nC,{className:we("data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-popover-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...t}),EW=({className:e,input:t,...n})=>_.jsxs("div",{className:we("space-y-2 overflow-hidden p-4",e),...n,children:[_.jsx("h4",{className:"font-medium text-muted-foreground text-xs uppercase tracking-wide",children:"Parameters"}),_.jsx("div",{className:"rounded-md bg-muted/50",children:_.jsx(ig,{code:JSON.stringify(t,null,2),language:"json"})})]}),_2=({className:e,output:t,errorText:n,language:r="txt",...i})=>{if(!(t||n))return null;let o=_.jsx("div",{children:t});return typeof t=="object"&&!v.isValidElement(t)?o=_.jsx(ig,{code:JSON.stringify(t,null,2),language:"json"}):typeof t=="string"&&(o=_.jsx(ig,{code:t,language:r})),_.jsxs("div",{className:we("space-y-2 p-4",e),...i,children:[_.jsx("h4",{className:"font-medium text-muted-foreground text-xs uppercase tracking-wide",children:n?"Error":"Result"}),_.jsxs("div",{className:we("overflow-x-auto rounded-md text-xs [&_table]:w-full",n?"bg-destructive/10 text-destructive":"bg-muted/50 text-foreground"),children:[n&&_.jsx("div",{children:n}),o]})]})};function yW(e,t,n){return e!==void 0?e.isError===!0?"output-error":"output-available":t?"input-streaming":n?"input-available":"interrupted"}function m3({args:e,isSessionRunning:t=!0,isStreamingArgs:n=!1,name:r,onOpenSubagent:i,result:o,subagent:l}){const c=yW(o,n,t),f=o?.rendered.filter(E=>E.type==="text").map(E=>E.text).join(`
|
|
331
|
+
|
|
332
|
+
`)??"",h=o?.rendered.filter(E=>E.type==="image")??[],p=o?.isError===!0?o.display||"The tool reported an error.":void 0,m=f!==""?f:void 0;return _.jsxs(mW,{className:"mb-0 w-full",children:[_.jsx(gW,{state:c,title:r==="Agent"?"Subagent":r}),o!==void 0&&o.display!==""&&_.jsx("div",{className:"border-t px-3 py-2 font-mono text-muted-foreground text-xs",children:o.display}),l!==void 0&&i!==void 0&&_.jsxs("div",{className:"flex items-center justify-between gap-3 border-t px-3 py-2",children:[_.jsx("span",{className:"min-w-0 truncate text-xs text-muted-foreground",children:l.description}),_.jsxs(ln,{className:"shrink-0 gap-1.5",onClick:()=>i(l.id),size:"sm",type:"button",variant:"ghost",children:["View history",_.jsx(hL,{className:"size-3.5"})]})]}),_.jsxs(bW,{children:[_.jsx(EW,{className:"border-t",input:e}),p!==void 0?_.jsx(_2,{errorText:p,output:m}):m!==void 0&&_.jsx(_2,{output:m}),h.length>0&&_.jsx("div",{className:"flex flex-wrap gap-2 p-4 pt-0",children:h.map((E,y)=>_.jsx("img",{alt:`Tool result ${y+1}`,className:"max-h-64 rounded-md border object-contain",src:`data:${E.mediaType};base64,${E.data}`},y))})]})]})}function _W({isSessionRunning:e,message:t,onOpenSubagent:n,subagentsByToolCallId:r,toolResults:i}){const o=t.blocks.filter(l=>l.type!=="tool_result");return o.length===0?null:_.jsx(Bg,{from:"assistant",children:_.jsx(jg,{className:"w-full gap-3",children:o.map((l,c)=>{switch(l.type){case"text":return _.jsx(O1,{children:l.text},c);case"image":return _.jsx(Y5,{alt:"Image from the agent",base64:l.data,className:"max-w-sm",mediaType:l.mediaType},c);case"thinking":return _.jsxs(k1,{className:"mb-0",defaultOpen:!1,children:[_.jsx(N1,{}),_.jsx(R1,{children:l.thinking!==""?l.thinking:"The model's reasoning was redacted."})]},c);case"tool_call":return _.jsx(m3,{args:l.arguments,isSessionRunning:e,name:l.name,onOpenSubagent:n,result:i.get(l.id),subagent:r?.get(l.id)},l.id)}})})})}function p3(e){const t=new Map;for(const n of e)if(n.role==="agent")for(const r of n.blocks)r.type==="tool_result"&&t.set(r.toolCallId,r);return t}function xW({className:e,...t}){return _.jsx("textarea",{"data-slot":"textarea",className:we("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40",e),...t})}const g3=v.createContext(null),bu=()=>{const e=v.useContext(g3);if(!e)throw new Error("usePromptInputAttachments must be used within a PromptInput");return e};function TW({data:e,className:t,...n}){const r=bu(),i=e.filename||"",o=!!(e.mediaType?.startsWith("image/")&&e.url);return _.jsxs("div",{className:we("group relative size-14 overflow-hidden rounded-md border",t),...n,children:[o?_.jsx("img",{alt:i||"attachment",className:"size-full object-cover",height:56,src:e.url,width:56}):_.jsx("div",{className:"flex size-full items-center justify-center bg-muted text-muted-foreground",children:_.jsx(j2,{className:"size-4"})}),_.jsxs(ln,{"aria-label":"Remove attachment",className:"absolute top-0.5 right-0.5 size-5 rounded-full bg-background/80 p-0 opacity-0 backdrop-blur-sm transition-opacity hover:bg-background group-hover:opacity-100 [&>svg]:size-3",onClick:l=>{l.stopPropagation(),r.remove(e.id)},type:"button",variant:"ghost",children:[_.jsx(cg,{}),_.jsx("span",{className:"sr-only",children:"Remove"})]})]})}function vW({children:e,className:t,...n}){const r=bu();return r.files.length?_.jsx("div",{className:we("flex w-full flex-wrap items-center gap-2 p-3 pb-0",t),...n,children:r.files.map(i=>_.jsx(v.Fragment,{children:e(i)},i.id))}):null}const SW=({label:e="Attach image",className:t,...n})=>{const r=bu();return _.jsxs(RW,{"aria-label":e,className:t,onClick:i=>{i.preventDefault(),r.openFileDialog()},...n,children:[_.jsx(j2,{className:"size-4"}),_.jsx("span",{className:"sr-only",children:e})]})},AW=({className:e,accept:t,multiple:n,maxFiles:r,maxFileSize:i,onError:o,onSubmit:l,children:c,...f})=>{const h=v.useRef(null),p=v.useRef(null),[m,E]=v.useState([]),y=v.useRef(m);y.current=m;const T=v.useCallback(()=>{h.current?.click()},[]),S=v.useCallback(V=>!t||t.trim()===""?!0:t.split(",").map(ie=>ie.trim()).filter(Boolean).some(ie=>{if(ie.endsWith("/*")){const $=ie.slice(0,-1);return V.type.startsWith($)}return V.type===ie}),[t]),C=v.useCallback(V=>{const G=Array.from(V),ie=G.filter(J=>S(J));if(G.length&&ie.length===0){o?.({code:"accept",message:"No files match the accepted types."});return}const $=J=>i?J.size<=i:!0,X=ie.filter($);if(ie.length>0&&X.length===0){o?.({code:"max_file_size",message:"All files exceed the maximum size."});return}E(J=>{const he=typeof r=="number"?Math.max(0,r-J.length):void 0,ue=typeof he=="number"?X.slice(0,he):X;typeof he=="number"&&X.length>he&&o?.({code:"max_files",message:"Too many files. Some were not added."});const re=[];for(const j of ue)re.push({id:crypto.randomUUID(),type:"file",url:URL.createObjectURL(j),mediaType:j.type,filename:j.name});return J.concat(re)})},[S,r,i,o]),w=v.useCallback(V=>E(G=>{const ie=G.find($=>$.id===V);return ie?.url&&URL.revokeObjectURL(ie.url),G.filter($=>$.id!==V)}),[]),k=v.useCallback(()=>E(V=>{for(const G of V)G.url&&URL.revokeObjectURL(G.url);return[]}),[]);v.useEffect(()=>{const V=p.current;if(!V)return;const G=$=>{$.dataTransfer?.types?.includes("Files")&&$.preventDefault()},ie=$=>{$.dataTransfer?.types?.includes("Files")&&$.preventDefault(),$.dataTransfer?.files&&$.dataTransfer.files.length>0&&C($.dataTransfer.files)};return V.addEventListener("dragover",G),V.addEventListener("drop",ie),()=>{V.removeEventListener("dragover",G),V.removeEventListener("drop",ie)}},[C]),v.useEffect(()=>()=>{for(const V of y.current)V.url&&URL.revokeObjectURL(V.url)},[]);const N=V=>{V.currentTarget.files&&C(V.currentTarget.files),V.currentTarget.value=""},M=async V=>{try{const ie=await(await fetch(V)).blob();return new Promise($=>{const X=new FileReader;X.onloadend=()=>$(X.result),X.onerror=()=>$(null),X.readAsDataURL(ie)})}catch{return null}},U=v.useMemo(()=>({files:m,add:C,remove:w,clear:k,openFileDialog:T,fileInputRef:h}),[m,C,w,k,T]),P=V=>{V.preventDefault();const G=V.currentTarget,$=new FormData(G).get("message")||"";G.reset();const X=()=>{const J=G.elements.namedItem("message");if(!(J instanceof HTMLTextAreaElement)||J.value!=="")return;Object.getOwnPropertyDescriptor(HTMLTextAreaElement.prototype,"value")?.set?.call(J,$),J.dispatchEvent(new Event("input",{bubbles:!0}))};Promise.all(m.map(async({id:J,...he})=>{if(he.url?.startsWith("blob:")){const ue=await M(he.url);return{...he,url:ue??he.url}}return he})).then(J=>{try{const he=l({text:$,files:J},V);he instanceof Promise?he.then(()=>k()).catch(()=>{X()}):k()}catch{X()}}).catch(()=>{X()})};return _.jsxs(g3.Provider,{value:U,children:[_.jsx("input",{accept:t,"aria-label":"Upload files",className:"hidden",multiple:n,onChange:N,ref:h,title:"Upload files",type:"file"}),_.jsx("form",{className:we("relative flex w-full flex-col overflow-hidden rounded-xl border bg-background shadow-xs transition-[color,box-shadow] focus-within:border-ring focus-within:ring-[3px] focus-within:ring-ring/50",e),onSubmit:P,ref:p,...f,children:c})]})},CW=({className:e,...t})=>_.jsx("div",{className:we("contents",e),...t}),wW=({onChange:e,className:t,placeholder:n="What would you like to know?",...r})=>{const i=bu(),[o,l]=v.useState(!1),c=h=>{if(h.key==="Enter"){if(o||h.nativeEvent.isComposing||h.shiftKey)return;h.preventDefault();const p=h.currentTarget.form;if(p?.querySelector('button[type="submit"]')?.disabled)return;p?.requestSubmit()}if(h.key==="Backspace"&&h.currentTarget.value===""&&i.files.length>0){h.preventDefault();const p=i.files.at(-1);p&&i.remove(p.id)}},f=h=>{const p=h.clipboardData?.items;if(!p)return;const m=[];for(const E of p)if(E.kind==="file"){const y=E.getAsFile();y&&m.push(y)}m.length>0&&(h.preventDefault(),i.add(m))};return _.jsx(xW,{className:we("field-sizing-content max-h-48 min-h-16 w-full resize-none rounded-none border-none bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent",t),name:"message",onChange:e,onCompositionEnd:()=>l(!1),onCompositionStart:()=>l(!0),onKeyDown:c,onPaste:f,placeholder:n,...r})},kW=({className:e,...t})=>_.jsx("div",{className:we("flex items-center justify-between gap-1 p-1",e),...t}),NW=({className:e,...t})=>_.jsx("div",{className:we("flex items-center gap-1",e),...t}),RW=({variant:e="ghost",className:t,size:n,...r})=>{const i=n??(v.Children.count(r.children)>1?"sm":"icon-sm");return _.jsx(ln,{className:we("shrink-0 gap-1.5 rounded-lg",t),size:i,type:"button",variant:e,...r})},OW=({className:e,variant:t="default",size:n="icon-sm",status:r,children:i,...o})=>{let l=_.jsx(DL,{className:"size-4"});return r==="submitted"?l=_.jsx(ug,{className:"size-4 animate-spin"}):r==="streaming"?l=_.jsx(U2,{className:"size-4"}):r==="error"&&(l=_.jsx(cg,{className:"size-4"})),_.jsx(ln,{"aria-label":"Submit",className:we("shrink-0 rounded-lg",e),size:n,type:"submit",variant:t,...o,children:i??l})};function LW(e){const t=e.url;if(t===void 0||!t.startsWith("data:"))return;const n=t.indexOf(",");if(n<0)return;const i=t.slice(5,n).split(";")[0]||e.mediaType||"";if(i.startsWith("image/"))return{type:"image",mediaType:i,data:t.slice(n+1)}}function IW({daemonReady:e,hasText:t,isAborting:n,isRunning:r,onAbort:i,readOnly:o}){const l=bu();if(o)return _.jsx(ln,{"aria-label":"Subagent history is read-only",className:"rounded-lg",disabled:!0,size:"icon-sm",type:"button",variant:"outline",children:_.jsx(jL,{className:"size-4"})});if(r)return _.jsxs("div",{className:"flex items-center gap-1",children:[_.jsx("button",{"aria-hidden":!0,className:"hidden",disabled:!0,type:"submit"}),_.jsx(ln,{"aria-label":"Stop the run",className:"rounded-lg",disabled:n,onClick:i,size:"icon-sm",type:"button",variant:"outline",children:n?_.jsx(ug,{className:"size-4 animate-spin"}):_.jsx(U2,{className:"size-4"})})]});const c=e&&(t||l.files.length>0);return _.jsx(OW,{disabled:!c})}function DW({daemonReady:e,isAborting:t,isRunning:n,onAbort:r,onSubmit:i,readOnly:o}){const[l,c]=v.useState(!1),[f,h]=v.useState(void 0),p=v.useCallback(async E=>{if(n||o)return;const y=E.text.trim(),T=[];for(const C of E.files){const w=LW(C);w!==void 0&&T.push(w)}if(y===""&&T.length===0)return;if(c(!1),h(void 0),!await i(y,T))throw new Error("The message could not be sent.")},[n,i,o]),m=v.useCallback(E=>{h(E.code==="accept"?"Only image files can be attached.":E.message)},[]);return _.jsxs("div",{className:"flex flex-col gap-1.5",children:[_.jsxs(AW,{accept:"image/*",multiple:!0,onError:m,onSubmit:p,children:[_.jsxs(CW,{children:[_.jsx(vW,{children:E=>_.jsx(TW,{data:E})}),_.jsx(wW,{disabled:!e||o,onChange:E=>c(E.currentTarget.value.trim()!==""),placeholder:o?"Subagent history is read-only.":e?"Message the agent…":"Waiting for the daemon to become ready…"})]}),_.jsxs(kW,{children:[_.jsx(NW,{children:_.jsx(SW,{disabled:!e||o})}),_.jsx(IW,{daemonReady:e,hasText:l,isAborting:t,isRunning:n,onAbort:r,readOnly:o})]})]}),_.jsxs("div",{className:"flex items-center justify-between px-1",children:[_.jsx("p",{className:"text-muted-foreground/70 text-xs",children:o?"Subagent histories cannot receive follow-up messages.":"Enter to send · Shift+Enter for a new line · paste or attach images"}),f!==void 0&&_.jsx("p",{className:"text-destructive text-xs",children:f})]})]})}function MW({partial:e}){const t=e.content.length-1;return _.jsx(Bg,{from:"assistant",children:_.jsx(jg,{className:"w-full gap-3",children:e.content.map((n,r)=>{const i=r===t;switch(n.type){case"text":return _.jsx(O1,{children:n.text},r);case"thinking":return _.jsxs(k1,{className:"mb-0",defaultOpen:i,isStreaming:i,children:[_.jsx(N1,{}),_.jsx(R1,{children:n.thinking})]},r);case"toolCall":return _.jsx(m3,{args:n.arguments,isStreamingArgs:i,name:n.name,result:void 0},n.id!==""?n.id:r)}})})})}function t0(e){return _.jsxs("header",{className:"flex h-12 shrink-0 items-center gap-3 border-b border-border/60 px-4",children:[_.jsx(ln,{"aria-label":"Back to the parent conversation",className:"shrink-0",onClick:e.onBack,size:"icon-sm",type:"button",variant:"ghost",children:_.jsx(L2,{className:"size-4"})}),_.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[_.jsx(P2,{className:"size-4 shrink-0 text-muted-foreground"}),_.jsxs("div",{className:"min-w-0",children:[_.jsx("p",{className:"truncate text-[13px] font-medium",children:e.description}),_.jsxs("p",{className:"text-[11px] text-muted-foreground",children:["Subagent history · Level ",e.depth]})]})]})]})}function PW({message:e}){const t=e.id.startsWith("optimistic-"),n=e.blocks.filter(i=>i.type==="image"),r=e.blocks.filter(i=>i.type==="text").map(i=>i.text).join(`
|
|
333
|
+
`);return _.jsxs(Bg,{className:t?"opacity-70":void 0,from:"user",children:[n.length>0&&_.jsx("div",{className:"ml-auto flex flex-wrap justify-end gap-2",children:n.map((i,o)=>_.jsx("img",{alt:`Attached image ${o+1}`,className:"size-24 rounded-lg border object-cover",src:`data:${i.mediaType};base64,${i.data}`},o))}),r!==""&&_.jsx(jg,{children:_.jsx("span",{className:"whitespace-pre-wrap break-words",children:r})})]})}function BW(e){return e.reason==="crash"?"The daemon crashed during a run":"The daemon was shut down during a run"}function jW({activeSession:e,daemonReady:t,historyDepth:n,onBackToParent:r,onOpenSubagent:i,sessionId:o}){const l=v.useMemo(()=>p3(e.messages),[e.messages]),c=v.useMemo(()=>e.messages.filter(C=>C.role!=="system"),[e.messages]),f=v.useMemo(()=>new Map(e.subagents.flatMap(C=>C.parentToolCallId===void 0?[]:[[C.parentToolCallId,C]])),[e.subagents]);if(o===void 0)return _.jsxs("section",{className:"flex min-w-0 flex-1 flex-col items-center justify-center gap-3 p-8 text-center",children:[_.jsx(B2,{className:"size-6 text-muted-foreground"}),_.jsxs("div",{className:"space-y-1",children:[_.jsx("h2",{className:"font-medium text-sm",children:"No session selected"}),_.jsx("p",{className:"text-muted-foreground text-sm",children:"Pick a session from the list or create a new one to start chatting."})]})]});if(e.isLoading)return _.jsxs("section",{className:"flex min-w-0 flex-1 flex-col",children:[n>0&&_.jsx(t0,{depth:n,description:"Subagent history",onBack:r}),_.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-3",children:[_.jsx(Xx,{className:"text-muted-foreground",size:20}),_.jsx("p",{className:"text-muted-foreground text-sm",children:"Loading conversation…"})]})]});if(e.loadError!==void 0)return _.jsxs("section",{className:"flex min-w-0 flex-1 flex-col",children:[n>0&&_.jsx(t0,{depth:n,description:"Subagent history",onBack:r}),_.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-3 p-8 text-center",children:[_.jsx(a0,{className:"size-6 text-destructive"}),_.jsxs("div",{className:"space-y-1",children:[_.jsx("h2",{className:"font-medium text-sm",children:"The session could not be loaded"}),_.jsx("p",{className:"text-muted-foreground text-sm",children:e.loadError})]})]})]});const h=e.streamingPartial,p=h!==void 0&&h.content.length>0,m=e.isRunning&&!p,E=e.session?.interruption,y=e.session,T=n>0||y?.agent.type==="subagent",S=c.length===0&&!p&&!m&&e.runError===void 0&&e.streamError===void 0&&E===void 0;return _.jsxs("section",{className:"flex min-w-0 flex-1 flex-col",children:[T&&y!==void 0&&_.jsx(t0,{depth:y.agent.depth,description:y.agent.description??y.title??"Delegated task",onBack:r}),S?_.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-3 p-8 text-center",children:[_.jsx(HL,{className:"size-6 text-muted-foreground"}),_.jsxs("div",{className:"space-y-1",children:[_.jsx("h2",{className:"font-medium text-sm",children:"No messages yet"}),_.jsx("p",{className:"text-muted-foreground text-sm",children:"Send a message below to start the conversation."})]})]}):_.jsxs(F5,{className:"flex-1",initial:"instant",children:[_.jsxs($5,{className:"mx-auto w-full max-w-3xl gap-6 px-6 py-8",children:[c.map(C=>C.role==="user"?_.jsx(PW,{message:C},C.id):_.jsx(_W,{isSessionRunning:e.isRunning,message:C,onOpenSubagent:i,subagentsByToolCallId:f,toolResults:l},C.id)),p&&_.jsx(MW,{partial:h}),m&&_.jsxs("div",{className:"flex items-center gap-2.5",children:[_.jsx(Xx,{className:"text-muted-foreground",size:14}),_.jsx(JA,{className:"text-sm",duration:1.5,children:"Working…"})]}),e.runError!==void 0&&_.jsxs("div",{className:"flex items-start gap-2.5 rounded-lg border border-destructive/40 bg-destructive/10 px-4 py-3 text-destructive text-sm",children:[_.jsx(a0,{className:"mt-0.5 size-4 shrink-0"}),_.jsxs("div",{className:"min-w-0",children:[_.jsx("p",{className:"font-medium",children:"The run failed"}),_.jsx("p",{className:"mt-0.5 break-words",children:e.runError})]})]}),e.streamError!==void 0&&_.jsxs("div",{className:"flex items-start gap-2.5 rounded-lg border border-amber-500/30 bg-amber-500/10 px-4 py-3 text-amber-400 text-sm",children:[_.jsx(lx,{className:"mt-0.5 size-4 shrink-0"}),_.jsxs("div",{className:"min-w-0",children:[_.jsx("p",{className:"font-medium",children:"Live updates stopped"}),_.jsxs("p",{className:"mt-0.5 break-words",children:[e.streamError," Refresh the page to reconnect."]})]})]}),E!==void 0&&_.jsxs("div",{className:"flex items-start gap-2.5 rounded-lg border border-amber-500/30 bg-amber-500/10 px-4 py-3 text-amber-400 text-sm",children:[_.jsx(lx,{className:"mt-0.5 size-4 shrink-0"}),_.jsxs("div",{className:"min-w-0",children:[_.jsx("p",{className:"font-medium",children:BW(E)}),_.jsx("p",{className:"mt-0.5 break-words",children:E.message})]})]})]}),_.jsx(V5,{})]}),_.jsx("div",{className:"border-border/60 border-t",children:_.jsx("div",{className:"mx-auto w-full max-w-3xl px-6 pt-4 pb-5",children:_.jsx(DW,{daemonReady:t,isAborting:e.isAborting,isRunning:e.isRunning,onAbort:()=>{e.abort()},onSubmit:e.submit,readOnly:T})})})]})}function Ka({className:e,...t}){return _.jsx("div",{"data-slot":"skeleton",className:we("animate-pulse rounded-md bg-accent",e),...t})}function UW({className:e,orientation:t="horizontal",...n}){return _.jsx(z4,{"data-slot":"tabs","data-orientation":t,orientation:t,className:we("group/tabs flex gap-2 data-[orientation=horizontal]:flex-col",e),...n})}const HW=fg("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-[orientation=horizontal]/tabs:h-9 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col data-[variant=line]:rounded-none",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});function zW({className:e,variant:t="default",...n}){return _.jsx(F4,{"data-slot":"tabs-list","data-variant":t,className:we(HW({variant:t}),e),...n})}function x2({className:e,...t}){return _.jsx($4,{"data-slot":"tabs-trigger",className:we("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent","data-[state=active]:bg-background data-[state=active]:text-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 dark:data-[state=active]:text-foreground","after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100",e),...t})}function T2({className:e,...t}){return _.jsx(V4,{"data-slot":"tabs-content",className:we("flex-1 outline-none",e),...t})}function b3(e){switch(e.status){case"completed":return _.jsx(CL,{"aria-label":"Completed",className:"size-3.5 text-zinc-500"});case"error":return _.jsx(M2,{"aria-label":"Failed",className:"size-3.5 text-red-400"});case"interrupted":return _.jsx(D2,{"aria-label":"Interrupted",className:"size-3.5 text-zinc-500"});case"running":return _.jsx(ug,{"aria-label":"Running",className:"size-3.5 animate-spin text-emerald-400"})}}function FW(e){switch(e.status){case"completed":return"Completed";case"error":return"Failed";case"interrupted":return"Interrupted";case"running":return"Running…"}}function $W(e){if(e===void 0)return"No arguments";if(typeof e=="string")return e;try{return JSON.stringify(e,null,2)}catch{return String(e)}}function VW(e){const{entry:t}=e,n=t.result?.rendered.filter(i=>i.type==="text").map(i=>i.text).join(`
|
|
334
|
+
`)??"",r=t.result?.rendered.filter(i=>i.type==="image").length??0;return _.jsxs("div",{className:"flex flex-col gap-3 p-3",children:[_.jsx("div",{children:_.jsxs(ln,{className:"-ml-1 h-7 gap-1.5 px-2 text-xs text-muted-foreground",onClick:e.onBack,size:"sm",variant:"ghost",children:[_.jsx(L2,{className:"size-3.5"}),"All activity"]})}),_.jsxs("div",{className:"flex items-center gap-2 px-1",children:[_.jsx(b3,{status:t.status}),_.jsx("span",{className:"min-w-0 flex-1 truncate font-mono text-xs font-medium text-foreground",children:t.name}),_.jsx("span",{className:we("text-xs",t.status==="error"?"text-red-400":t.status==="running"?"text-emerald-400":"text-muted-foreground"),children:FW(t)})]}),_.jsxs("div",{className:"flex flex-col gap-1 px-1",children:[_.jsx("span",{className:"text-xs font-medium tracking-wide text-muted-foreground",children:"Arguments"}),_.jsx("pre",{className:"max-h-64 overflow-auto rounded-lg border border-border/60 bg-zinc-900/60 p-2.5 font-mono text-[11px] leading-relaxed whitespace-pre-wrap text-foreground/90",children:$W(t.arguments)})]}),_.jsxs("div",{className:"flex flex-col gap-1 px-1",children:[_.jsx("span",{className:"text-xs font-medium tracking-wide text-muted-foreground",children:"Result"}),t.result===void 0?_.jsx("p",{className:"text-xs text-muted-foreground",children:t.status==="running"?"Waiting for the tool to finish…":"No result was recorded."}):_.jsxs(_.Fragment,{children:[t.result.display!==""&&_.jsx("p",{className:we("text-xs leading-snug",t.result.isError===!0?"text-red-400":"text-foreground/90"),children:t.result.display}),n!==""&&_.jsx("pre",{className:"max-h-72 overflow-auto rounded-lg border border-border/60 bg-zinc-900/60 p-2.5 font-mono text-[11px] leading-relaxed whitespace-pre-wrap text-foreground/90",children:n}),r>0&&_.jsx("p",{className:"text-xs text-muted-foreground",children:r===1?"The result includes 1 image.":`The result includes ${r} images.`})]})]})]})}function GW(e){const{entry:t}=e,n=t.result!==void 0&&t.result.display!==""?t.result.display:t.status==="running"?"Running…":void 0;return _.jsxs("button",{className:"group flex w-full items-start gap-2.5 rounded-lg px-2.5 py-2 text-left transition-colors hover:bg-accent/60 focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none",onClick:()=>e.onSelect(t.id),type:"button",children:[_.jsx("span",{className:"mt-0.5 shrink-0",children:_.jsx(b3,{status:t.status})}),_.jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[_.jsx("span",{className:"truncate font-mono text-xs text-foreground/90",children:t.name}),n!==void 0&&_.jsx("span",{className:"line-clamp-2 text-xs leading-snug text-muted-foreground",children:n})]}),_.jsx(I2,{className:"mt-0.5 size-3.5 shrink-0 text-muted-foreground/40 transition-colors group-hover:text-muted-foreground"})]})}function qW(e){const[t,n]=v.useState(void 0),r=e.entries.find(i=>i.id===t);return r!==void 0?_.jsx(VW,{entry:r,onBack:()=>{n(void 0)}}):e.entries.length===0?_.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-2 p-6 text-center",children:[_.jsx(H2,{className:"size-5 text-muted-foreground/50"}),_.jsx("p",{className:"text-xs text-muted-foreground",children:"Tool calls made by the agent will appear here."})]}):_.jsx("div",{className:"flex flex-col gap-0.5 p-2",children:e.entries.map(i=>_.jsx(GW,{entry:i,onSelect:n},i.id))})}function YW(e,t,n){const r=p3(e),i=[],o=new Set;for(const l of e)if(l.role==="agent")for(const c of l.blocks){if(c.type!=="tool_call"||o.has(c.id))continue;o.add(c.id);const f=r.get(c.id);i.push({arguments:c.arguments,id:c.id,name:c.name,result:f,status:f===void 0?n?"running":"interrupted":f.isError===!0?"error":"completed"})}if(t!==void 0)for(const l of t.content)l.type!=="toolCall"||o.has(l.id)||(o.add(l.id),i.push({arguments:l.arguments,id:l.id,name:l.name,result:void 0,status:"running"}));return i}function sf({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return _.jsx(j4,{"data-slot":"separator",decorative:n,orientation:t,className:we("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...r})}function sg(e){if(e===void 0)return"No activity yet";const t=Math.max(0,Math.floor((Date.now()-e)/1e3));if(t<60)return"Just now";const n=Math.floor(t/60);if(n<60)return`${n} ${n===1?"minute":"minutes"} ago`;const r=Math.floor(n/60);if(r<24)return`${r} ${r===1?"hour":"hours"} ago`;const i=Math.floor(r/24);return`${i} ${i===1?"day":"days"} ago`}function Ii(e){return _.jsxs("div",{className:"flex flex-col gap-1",children:[_.jsx("span",{className:"text-xs font-medium tracking-wide text-muted-foreground",children:e.label}),e.children]})}function K1({...e}){return _.jsx(QS,{"data-slot":"select",...e})}function XW({...e}){return _.jsx(cA,{"data-slot":"select-group",...e})}function Z1({...e}){return _.jsx(JS,{"data-slot":"select-value",...e})}function J1({className:e,size:t="default",children:n,...r}){return _.jsxs(KS,{"data-slot":"select-trigger","data-size":t,className:we("flex w-fit items-center justify-between gap-2 rounded-md border border-input bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",e),...r,children:[n,_.jsx(eA,{asChild:!0,children:_.jsx(Xf,{className:"size-4 opacity-50"})})]})}function eb({className:e,children:t,position:n="item-aligned",align:r="center",...i}){return _.jsx(nA,{children:_.jsxs(rA,{"data-slot":"select-content",className:we("relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,align:r,...i,children:[_.jsx(WW,{}),_.jsx(lA,{className:we("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),_.jsx(KW,{})]})})}function QW({className:e,...t}){return _.jsx(dA,{"data-slot":"select-label",className:we("px-2 py-1.5 text-xs text-muted-foreground",e),...t})}function so({className:e,children:t,...n}){return _.jsxs(mA,{"data-slot":"select-item",className:we("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...n,children:[_.jsx("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:_.jsx(bA,{children:_.jsx(bL,{className:"size-4"})})}),_.jsx(pA,{children:t})]})}function WW({className:e,...t}){return _.jsx(EA,{"data-slot":"select-scroll-up-button",className:we("flex cursor-default items-center justify-center py-1",e),...t,children:_.jsx(xL,{className:"size-4"})})}function KW({className:e,...t}){return _.jsx(yA,{"data-slot":"select-scroll-down-button",className:we("flex cursor-default items-center justify-center py-1",e),...t,children:_.jsx(Xf,{className:"size-4"})})}function n0(e){return e.replace(/[-_]+/g," ").replace(/\b([a-z])/g,t=>t.toUpperCase())}const r0="__model-default__";function ZW(e){const[t,n]=v.useState(!1),[r,i]=v.useState(void 0),o=e.effort??r0,l=f=>{f!==o&&(n(!0),i(void 0),e.onChangeEffort(f===r0?void 0:f).catch(h=>{i(h instanceof Error?h.message:"The effort could not be changed.")}).finally(()=>{n(!1)}))},c=e.levels.length>0;return _.jsxs("div",{className:"flex flex-col gap-1",children:[_.jsxs(K1,{disabled:e.disabled||t||!c,onValueChange:l,value:o,children:[_.jsx(J1,{className:"h-8 w-full text-xs",size:"sm",children:_.jsx(Z1,{placeholder:e.effort!==void 0?n0(e.effort):"Model default"})}),_.jsxs(eb,{position:"popper",children:[_.jsx(so,{value:r0,children:"Model default"}),e.levels.map(f=>_.jsx(so,{value:f,children:n0(f)},f)),e.effort!==void 0&&!e.levels.includes(e.effort)&&_.jsx(so,{value:e.effort,children:n0(e.effort)})]})]}),r!==void 0&&_.jsx("p",{className:"text-xs text-red-400",children:r})]})}function nu(e){return(e.includes("/")?e.split("/").at(-1)??e:e).replace(/[-_]+/g," ").replace(/\bgpt\b/gi,"GPT").replace(/\bapi\b/gi,"API").replace(/\b([a-z])/g,n=>n.toUpperCase())}function ru(e,t){return JSON.stringify([e,t])}function E3(e){if(e.catalog.providers.length>1)return _.jsx(_.Fragment,{children:e.catalog.providers.map(i=>_.jsxs(XW,{children:[_.jsx(QW,{children:nu(i.providerId)}),i.models.map(o=>_.jsx(so,{value:ru(i.providerId,o.id),children:o.name},`${i.providerId}:${o.id}`))]},i.providerId))});const t=e.catalog.providers[0],n=t?.providerId??e.catalog.defaultProviderId,r=t?.models??e.catalog.models;return _.jsx(_.Fragment,{children:r.map(i=>_.jsx(so,{value:ru(n,i.id),children:i.name},`${n}:${i.id}`))})}function y3(e){try{const t=JSON.parse(e);if(Array.isArray(t)&&t.length===2&&typeof t[0]=="string"&&typeof t[1]=="string")return{providerId:t[0],modelId:t[1]}}catch{return}}function JW(e){const[t,n]=v.useState(!1),[r,i]=v.useState(void 0),o=e.catalog?.providers??[],l=new Set(o.flatMap(h=>h.models.map(p=>ru(h.providerId,p.id)))),c=ru(e.providerId,e.modelId),f=h=>{const p=y3(h);p===void 0||p.modelId===e.modelId&&p.providerId===e.providerId||(n(!0),i(void 0),e.onChangeModel(p.providerId,p.modelId).catch(m=>{i(m instanceof Error?m.message:"The model could not be changed.")}).finally(()=>{n(!1)}))};return _.jsxs("div",{className:"flex flex-col gap-1",children:[_.jsxs(K1,{disabled:e.disabled||t||e.catalog===void 0,onValueChange:f,value:c,children:[_.jsx(J1,{className:"h-8 w-full font-mono text-xs",size:"sm",children:_.jsx(Z1,{placeholder:nu(e.modelId)})}),_.jsxs(eb,{position:"popper",children:[e.catalog!==void 0&&_.jsx(E3,{catalog:e.catalog}),!l.has(c)&&_.jsx(so,{value:c,children:nu(e.modelId)})]})]}),r!==void 0&&_.jsx("p",{className:"text-xs text-red-400",children:r})]})}function _3({...e}){return _.jsx(lS,{"data-slot":"dialog",...e})}function x3({...e}){return _.jsx(cS,{"data-slot":"dialog-trigger",...e})}function eK({...e}){return _.jsx(dS,{"data-slot":"dialog-portal",...e})}function tK({...e}){return _.jsx(Jf,{"data-slot":"dialog-close",...e})}function nK({className:e,...t}){return _.jsx(hS,{"data-slot":"dialog-overlay",className:we("fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",e),...t})}function T3({className:e,children:t,showCloseButton:n=!0,...r}){return _.jsxs(eK,{"data-slot":"dialog-portal",children:[_.jsx(nK,{}),_.jsxs(mS,{"data-slot":"dialog-content",className:we("fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg",e),...r,children:[t,n&&_.jsxs(Jf,{"data-slot":"dialog-close",className:"absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[_.jsx(cg,{}),_.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function v3({className:e,...t}){return _.jsx("div",{"data-slot":"dialog-header",className:we("flex flex-col gap-2 text-center sm:text-left",e),...t})}function S3({className:e,showCloseButton:t=!1,children:n,...r}){return _.jsxs("div",{"data-slot":"dialog-footer",className:we("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...r,children:[n,t&&_.jsx(Jf,{asChild:!0,children:_.jsx(ln,{variant:"outline",children:"Close"})})]})}function A3({className:e,...t}){return _.jsx(bS,{"data-slot":"dialog-title",className:we("text-lg leading-none font-semibold",e),...t})}function C3({className:e,...t}){return _.jsx(yS,{"data-slot":"dialog-description",className:we("text-sm text-muted-foreground",e),...t})}function rK(e){const[t,n]=v.useState(!1),[r,i]=v.useState(!1),[o,l]=v.useState(void 0),c=h=>{n(h),h||l(void 0)},f=()=>{i(!0),l(void 0),e.onReset().then(()=>{n(!1)}).catch(h=>{l(h instanceof Error?h.message:"The conversation could not be reset.")}).finally(()=>{i(!1)})};return _.jsxs(_3,{onOpenChange:c,open:t,children:[_.jsx(x3,{asChild:!0,children:_.jsxs(ln,{className:"w-full justify-center gap-2",disabled:e.disabled,size:"sm",variant:"outline",children:[_.jsx(XL,{className:"size-3.5"}),"Reset conversation"]})}),_.jsxs(T3,{className:"sm:max-w-sm",children:[_.jsxs(v3,{children:[_.jsx(A3,{children:"Reset this conversation?"}),_.jsx(C3,{children:"All messages in this session will be cleared. The session itself, its working directory, and its model settings are kept."})]}),o!==void 0&&_.jsx("p",{className:"text-sm text-red-400",children:o}),_.jsxs(S3,{children:[_.jsx(tK,{asChild:!0,children:_.jsx(ln,{disabled:r,size:"sm",variant:"ghost",children:"Cancel"})}),_.jsx(ln,{disabled:r,onClick:f,size:"sm",variant:"destructive",children:r?"Resetting…":"Reset conversation"})]})]})]})}const aK={aborted:"bg-amber-400",completed:"bg-zinc-400",error:"bg-red-400",idle:"bg-zinc-500",queued:"bg-emerald-400/70 animate-pulse",running:"bg-emerald-400 animate-pulse"};function w3(e){return aK[e]}function k3(e){switch(e){case"aborted":return"Stopped";case"completed":return"Complete";case"error":return"Needs attention";case"idle":return"Idle";case"queued":return"Queued";case"running":return"Running"}}function iK(e){return _.jsxs(Zk,{variant:"outline",className:"gap-1.5 border-border/80 text-muted-foreground",children:[_.jsx("span",{"aria-hidden":!0,className:we("size-1.5 rounded-full",w3(e.status))}),k3(e.status)]})}function N3(e){return _.jsx("span",{"aria-hidden":"true",className:we("inline-block size-1.5 shrink-0 rounded-full",w3(e.status),e.className)})}function sK(e){return e.subagents.length===0?null:_.jsxs("div",{className:"flex flex-col gap-2",children:[_.jsxs("div",{className:"flex items-center gap-1.5 text-muted-foreground",children:[_.jsx(P2,{className:"size-3.5"}),_.jsx("h3",{className:"text-xs font-medium uppercase tracking-wide",children:"Delegated work"})]}),_.jsx("div",{className:"overflow-hidden rounded-md border border-border/60",children:e.subagents.map(t=>_.jsxs("button",{className:"group flex w-full items-center gap-2.5 border-border/60 border-b px-3 py-2.5 text-left outline-none transition-colors last:border-b-0 hover:bg-accent/50 focus-visible:bg-accent/50",onClick:()=>e.onOpenSubagent(t.id),type:"button",children:[_.jsx(N3,{status:t.status}),_.jsxs("span",{className:"min-w-0 flex-1",children:[_.jsx("span",{className:"block truncate text-xs font-medium text-foreground/90",children:t.description}),_.jsxs("span",{className:"block truncate text-[11px] text-muted-foreground",children:["Level ",t.depth," · ",nu(t.modelId)]})]}),_.jsx(I2,{className:"size-3.5 shrink-0 text-muted-foreground transition-transform group-hover:translate-x-0.5"})]},t.id))})]})}function v2(e){return new Date(e).toLocaleString()}function oK(e){const{catalog:t,session:n,summary:r}=e,i=n.agent.type==="subagent",o=t?.models.find(l=>l.id===n.modelId)??n.models.find(l=>l.id===n.modelId);return _.jsxs("div",{className:"flex flex-col gap-4 p-4",children:[_.jsxs("div",{className:"flex flex-col gap-2",children:[_.jsx("h2",{className:"text-sm leading-snug font-medium break-words text-foreground",children:n.title!==void 0&&n.title!==""?n.title:"Untitled session"}),_.jsx(iK,{status:n.status}),i&&_.jsxs("p",{className:"text-xs text-muted-foreground",children:["Subagent history · Level ",n.agent.depth]})]}),_.jsx(sf,{className:"bg-border/60"}),_.jsx(Ii,{label:"Working directory",children:_.jsx("p",{className:"font-mono text-xs leading-relaxed break-all text-foreground/90",children:n.cwd})}),_.jsxs(Ii,{label:"Model",children:[_.jsx(JW,{catalog:t,disabled:n.modelLocked||i,modelId:n.modelId,onChangeModel:e.changeModel,providerId:n.providerId}),(n.modelLocked||i)&&_.jsx("p",{className:"text-xs text-muted-foreground",children:i?"The model cannot be changed for a completed subagent step.":"The model is locked for this session."})]}),_.jsx(Ii,{label:"Reasoning effort",children:_.jsx(ZW,{disabled:i,effort:n.effort,levels:o?.thinkingLevels??[],onChangeEffort:e.changeEffort})}),_.jsx(sf,{className:"bg-border/60"}),_.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[_.jsx(Ii,{label:"Created",children:_.jsx("p",{className:"text-xs text-foreground/90",title:r!==void 0?v2(r.createdAt):void 0,children:r!==void 0?sg(r.createdAt):"Not available yet"})}),_.jsx(Ii,{label:"Last updated",children:_.jsx("p",{className:"text-xs text-foreground/90",title:r!==void 0?v2(r.updatedAt):void 0,children:r!==void 0?sg(r.updatedAt):"Not available yet"})}),_.jsx(Ii,{label:"Messages",children:_.jsx("p",{className:"text-xs text-foreground/90",children:e.messageCount})}),_.jsx(Ii,{label:"Tool calls",children:_.jsx("p",{className:"text-xs text-foreground/90",children:e.toolCallCount})})]}),_.jsx(sf,{className:"bg-border/60"}),e.subagents.length>0&&_.jsxs(_.Fragment,{children:[_.jsx(sK,{onOpenSubagent:e.onOpenSubagent,subagents:e.subagents}),_.jsx(sf,{className:"bg-border/60"})]}),i?_.jsx("p",{className:"text-xs leading-relaxed text-muted-foreground",children:"This subagent history is read-only and cannot be resumed or reset."}):_.jsx(rK,{disabled:e.isRunning,onReset:e.reset})]})}function of(e){return _.jsx("aside",{className:"flex h-full w-[340px] shrink-0 flex-col border-l border-border/60 bg-background",children:e.children})}function S2(e){return _.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 p-6 text-center",children:[e.icon,_.jsx("p",{className:"text-xs text-muted-foreground",children:e.text})]})}function lK(e){const{activeSession:t}=e,{isRunning:n,messages:r,session:i,streamingPartial:o}=t,l=v.useMemo(()=>YW(r,o,n),[n,r,o]),c=v.useMemo(()=>r.filter(f=>f.role!=="system").length,[r]);return e.sessionId===void 0?_.jsx(of,{children:_.jsx(S2,{icon:_.jsx($L,{className:"size-5 text-muted-foreground/50"}),text:"Select a session to inspect its details and activity."})}):t.loadError!==void 0?_.jsx(of,{children:_.jsx(S2,{icon:_.jsx(a0,{className:"size-5 text-red-400"}),text:t.loadError})}):t.isLoading||i===void 0?_.jsx(of,{children:_.jsxs("div",{className:"flex flex-col gap-4 p-4",children:[_.jsx(Ka,{className:"h-8 w-full"}),_.jsx(Ka,{className:"h-4 w-2/3"}),_.jsx(Ka,{className:"h-4 w-1/2"}),_.jsx(Ka,{className:"h-8 w-full"}),_.jsx(Ka,{className:"h-8 w-full"})]})}):_.jsx(of,{children:_.jsxs(UW,{className:"flex h-full min-h-0 flex-col gap-0",defaultValue:"details",children:[_.jsx("div",{className:"shrink-0 border-b border-border/60 p-2",children:_.jsxs(zW,{className:"grid w-full grid-cols-2",children:[_.jsx(x2,{value:"details",children:"Details"}),_.jsx(x2,{value:"activity",children:l.length>0?`Activity (${l.length})`:"Activity"})]})}),_.jsx(T2,{className:"min-h-0 flex-1 overflow-y-auto",value:"details",children:_.jsx(oK,{catalog:e.catalog,changeEffort:t.changeEffort,changeModel:t.changeModel,isRunning:t.isRunning,messageCount:c,onOpenSubagent:e.onOpenSubagent,reset:t.reset,session:i,subagents:t.subagents,summary:e.summary,toolCallCount:l.length})}),_.jsx(T2,{className:"min-h-0 flex-1 overflow-y-auto",value:"activity",children:_.jsx(qW,{entries:l})})]},e.sessionId)})}function uK(e){return e.healthError!==void 0?{dotClass:"bg-red-400",label:"Daemon unreachable"}:e.health?.ready===!0?{dotClass:"bg-emerald-400",label:"Daemon ready"}:e.health?.status==="error"?{dotClass:"bg-red-400",label:e.health.errorMessage??"Daemon failed to start"}:{dotClass:"bg-amber-400 animate-pulse",label:"Daemon starting…"}}function cK(e){const t=uK(e);return _.jsxs("div",{className:"flex items-center gap-2 border-t border-border/60 px-4 py-3",children:[_.jsx("span",{"aria-hidden":"true",className:we("size-1.5 shrink-0 rounded-full",t.dotClass)}),_.jsx("span",{className:"min-w-0 truncate text-xs text-muted-foreground",title:e.healthError??e.health?.errorMessage,children:t.label})]})}const R3="/api",fK=300;async function dK(e){try{const t=await e.text();if(t.length===0)return e.statusText;try{const n=JSON.parse(t);if(typeof n.error=="string")return n.error;if(typeof n.message=="string")return n.message}catch{}return t}catch{return e.statusText}}async function Ao(e,t){const n=await fetch(`${R3}${e}`,t);if(!n.ok){const r=await dK(n);throw new Error(`Request to ${e} failed (${n.status}): ${r}`)}return await n.json()}function Bd(e,t){return Ao(e,{method:"POST",...t!==void 0?{body:JSON.stringify(t),headers:{"Content-Type":"application/json"}}:{}})}function O3(e,t){return Ao(e,{method:"PATCH",body:JSON.stringify(t),headers:{"Content-Type":"application/json"}})}function hK(){return Ao("/health")}function mK(e){return Ao("/sessions")}function A2(e){return Ao(`/sessions/${encodeURIComponent(e)}/subagents`)}function pK(e){return Bd("/sessions",e)}function C2(e){return Ao(`/sessions/${encodeURIComponent(e)}`)}function gK(e,t){return Bd(`/sessions/${encodeURIComponent(e)}/messages`,t)}function bK(e){return Bd(`/sessions/${encodeURIComponent(e)}/abort`)}function EK(e){return Bd(`/sessions/${encodeURIComponent(e)}/reset`)}function yK(e,t){return O3(`/sessions/${encodeURIComponent(e)}/model`,t)}function _K(e,t){return O3(`/sessions/${encodeURIComponent(e)}/effort`,t)}function xK(e){const t=[];for(const n of e.split(`
|
|
335
|
+
`)){const r=n.endsWith("\r")?n.slice(0,-1):n;r.startsWith("data:")&&t.push(r.slice(5).trimStart())}if(t.length!==0)try{return JSON.parse(t.join(`
|
|
336
|
+
`))}catch{return}}function TK(e,t){return new Promise(n=>{if(t.aborted){n();return}const r=window.setTimeout(()=>{t.removeEventListener("abort",i),n()},e),i=()=>{window.clearTimeout(r),n()};t.addEventListener("abort",i,{once:!0})})}async function vK(e,t,n,r,i){let o=t;for(;!r.aborted;){let l=!1;try{const c=o!==void 0?`?after=${encodeURIComponent(o)}`:"",f=await fetch(`${R3}/sessions/${encodeURIComponent(e)}/stream${c}`,{headers:{Accept:"text/event-stream"},signal:r});if(f.status===409)o=i?.onCursorInvalid!==void 0?await i.onCursorInvalid():void 0;else{if(!f.ok||f.body===null)throw f.status>=400&&f.status<500&&(l=!0,i?.onStreamRejected?.(f.status)),new Error(`Stream request failed (${f.status})`);{const h=f.body.getReader(),p=new TextDecoder;let m="";for(;;){const{done:E,value:y}=await h.read();if(E)break;m+=p.decode(y,{stream:!0});let T=m.indexOf(`
|
|
337
|
+
|
|
338
|
+
`);for(;T!==-1;){const S=m.slice(0,T);m=m.slice(T+2);const C=xK(S);C!==void 0&&(o=C.id,n(C)),T=m.indexOf(`
|
|
339
|
+
|
|
340
|
+
`)}}}}}catch{}if(l||r.aborted)return;await TK(fK,r)}}function SK({className:e,type:t,...n}){return _.jsx("input",{type:t,"data-slot":"input",className:we("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30","focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",e),...n})}function AK(e){const{catalog:t,defaultCwd:n,onSessionCreated:r,refreshSessions:i}=e,[o,l]=v.useState(!1),[c,f]=v.useState(""),[h,p]=v.useState(""),[m,E]=v.useState(!1),[y,T]=v.useState(void 0),S=v.useCallback(k=>{l(k),k&&(f(n??""),p(t===void 0?"":ru(t.defaultProviderId,t.defaultModelId)),T(void 0),E(!1))},[t,n]),C=v.useCallback(async()=>{const k=c.trim();if(!(k.length===0||m)){E(!0),T(void 0);try{const N=y3(h),M=await pK({cwd:k,...N!==void 0?{modelId:N.modelId,providerId:N.providerId}:{}});l(!1),i(),r(M.session)}catch(N){T(N instanceof Error?N.message:"Could not create the session."),E(!1)}}},[c,m,h,r,i]),w=c.trim().length>0&&!m;return _.jsxs(_3,{open:o,onOpenChange:S,children:[_.jsx(x3,{asChild:!0,children:_.jsxs(ln,{variant:"ghost",size:"icon",className:"size-7 text-muted-foreground hover:text-foreground",disabled:!e.daemonReady,title:"New session",children:[_.jsx(qL,{className:"size-4"}),_.jsx("span",{className:"sr-only",children:"New session"})]})}),_.jsx(T3,{className:"sm:max-w-md",children:_.jsxs("form",{className:"contents",onSubmit:k=>{k.preventDefault(),C()},children:[_.jsxs(v3,{children:[_.jsx(A3,{children:"New session"}),_.jsx(C3,{children:"Start a fresh agent conversation in a working directory."})]}),_.jsxs("div",{className:"flex flex-col gap-4",children:[_.jsxs("div",{className:"flex flex-col gap-1.5",children:[_.jsx("label",{htmlFor:"new-session-cwd",className:"text-xs font-medium text-muted-foreground",children:"Working directory"}),_.jsx(SK,{id:"new-session-cwd",value:c,onChange:k=>f(k.target.value),placeholder:"/path/to/project",autoFocus:!0,spellCheck:!1,autoComplete:"off",className:"font-mono text-[13px]"})]}),_.jsxs("div",{className:"flex flex-col gap-1.5",children:[_.jsx("label",{htmlFor:"new-session-model",className:"text-xs font-medium text-muted-foreground",children:"Model"}),_.jsxs(K1,{...h!==""?{value:h}:{},onValueChange:p,children:[_.jsx(J1,{id:"new-session-model",className:"w-full",children:_.jsx(Z1,{placeholder:"Choose a model"})}),_.jsx(eb,{children:t!==void 0&&_.jsx(E3,{catalog:t})})]})]}),y!==void 0&&_.jsx("p",{className:"text-[13px] leading-5 text-destructive",children:y})]}),_.jsxs(S3,{children:[_.jsx(ln,{type:"button",variant:"ghost",onClick:()=>l(!1),disabled:m,children:"Cancel"}),_.jsx(ln,{type:"submit",disabled:!w,children:m?"Creating…":"Create session"})]})]})})]})}function CK(e){const{session:t}=e,n=t.title??"Untitled session";return _.jsxs("button",{type:"button",onClick:e.onSelect,title:`${n} — ${k3(t.status)}`,className:we("w-full rounded-lg px-2.5 py-2 text-left transition-colors outline-none","focus-visible:ring-2 focus-visible:ring-ring/60",e.isActive?"bg-accent text-accent-foreground":"text-foreground/90 hover:bg-accent/50"),children:[_.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[_.jsx("span",{className:"min-w-0 truncate text-[13px] leading-5 font-medium",children:n}),_.jsx("span",{className:"shrink-0 text-[11px] leading-5 text-muted-foreground",children:sg(t.lastMessageAt??t.updatedAt)})]}),_.jsxs("div",{className:"mt-0.5 flex items-center gap-1.5",children:[_.jsx(N3,{status:t.status}),_.jsx("span",{className:"min-w-0 truncate text-[11px] leading-4 text-muted-foreground",children:nu(t.modelId)})]})]})}function wK(e){return e.isLoading?_.jsxs("div",{className:"flex flex-col gap-2 p-2",children:[_.jsx(Ka,{className:"h-10 w-full"}),_.jsx(Ka,{className:"h-10 w-full"}),_.jsx(Ka,{className:"h-10 w-full"})]}):e.listError!==void 0?_.jsx("div",{className:"px-4 py-10 text-center",children:_.jsx("p",{className:"text-xs text-red-400",children:"The session list could not be loaded."})}):_.jsxs("div",{className:"flex flex-col items-center gap-2 px-4 py-10 text-center",children:[_.jsx(B2,{className:"size-5 text-muted-foreground/60"}),_.jsx("p",{className:"text-xs text-muted-foreground",children:"No sessions yet. Create one to start chatting."})]})}function kK(e){return _.jsxs("aside",{className:"flex w-72 shrink-0 flex-col border-r border-border/60 bg-background",children:[_.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b border-border/60 pr-2 pl-4",children:[_.jsx("span",{className:"text-[13px] font-semibold tracking-tight",children:"Rig"}),_.jsx(AK,{catalog:e.health?.catalog,daemonReady:e.health?.ready===!0&&e.healthError===void 0,defaultCwd:e.sessions[0]?.cwd,onSessionCreated:e.onSessionCreated,refreshSessions:e.refreshSessions})]}),_.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto p-2",children:e.sessions.length===0?_.jsx(wK,{isLoading:e.isLoadingSessions,listError:e.sessionListError}):_.jsx("ul",{className:"flex flex-col gap-0.5",children:e.sessions.map(t=>_.jsx("li",{children:_.jsx(CK,{session:t,isActive:t.id===e.activeSessionId,onSelect:()=>e.onSelectSession(t.id)})},t.id))})}),_.jsx(cK,{health:e.health,healthError:e.healthError})]})}function NK(e,t){const n=e.findIndex(r=>r.id===t.id);return n<0?[...e,t].sort((r,i)=>r.createdAt-i.createdAt):e.map((r,i)=>i===n?t:r)}const Ef={isAborting:!1,isLoading:!1,loadError:void 0,messages:[],optimistic:[],runError:void 0,session:void 0,streamError:void 0,streamingPartial:void 0,subagents:[],submittedRunIds:[]};function w2(e,t){return e.some(n=>n.id===t.id)?e:[...e,t]}function k2(e){return e.blocks.filter(t=>t.type==="text").map(t=>t.text).join(`
|
|
341
|
+
`)}function RK(e,t,n){const r=e.filter(l=>l.runId!==t);if(r.length!==e.length)return r;const i=k2(n),o=r.findIndex(l=>l.runId===void 0&&k2(l.message)===i);return o===-1?r:r.filter((l,c)=>c!==o)}function OK(e,t){switch(t.type){case"session_created":return{...e,session:t.data.session};case"message_submitted":return{...e,messages:w2(e.messages,t.data.message),optimistic:RK(e.optimistic,t.data.runId,t.data.message),submittedRunIds:[...e.submittedRunIds,t.data.runId]};case"run_started":return{...e,isAborting:!1,runError:void 0,session:e.session!==void 0?{...e.session,status:"running"}:void 0};case"agent_event":{const n=t.data.event;return n.type==="inference_iteration_start"?e:"partial"in n?{...e,streamingPartial:n.partial}:e}case"agent_message":return{...e,messages:w2(e.messages,t.data.message),streamingPartial:void 0};case"run_finished":return{...e,isAborting:!1,streamingPartial:void 0,session:e.session!==void 0?{...e.session,status:t.data.stopReason==="aborted"?"aborted":"completed"}:void 0};case"run_error":return e.isAborting?{...e,streamingPartial:void 0,session:e.session!==void 0?{...e.session,status:"aborted"}:void 0}:{...e,isAborting:!1,runError:t.data.errorMessage,streamingPartial:void 0,session:e.session!==void 0?{...e.session,status:"error"}:void 0};case"abort_requested":return{...e,isAborting:!0};case"session_reset":return{...e,messages:t.data.snapshot.messages,optimistic:[],runError:void 0,streamingPartial:void 0,session:e.session!==void 0?{...e.session,snapshot:t.data.snapshot}:void 0};case"session_title_changed":{if(e.session===void 0)return e;const n={...e.session,titleStatus:t.data.status};return t.data.title!==void 0&&(n.title=t.data.title),t.data.errorMessage!==void 0&&(n.titleError=t.data.errorMessage),{...e,session:n}}case"model_changed":case"effort_changed":{if(e.session===void 0)return e;const n={...e.session,modelId:t.data.modelId,snapshot:t.data.snapshot};return t.data.effort!==void 0?n.effort=t.data.effort:delete n.effort,{...e,session:n}}case"subagent_changed":return{...e,subagents:NK(e.subagents,t.data.subagent)}}}function LK(e,t){switch(t.type){case"reset_for_session":return{...Ef,isLoading:!0};case"session_loaded":return{...Ef,isLoading:!1,messages:t.session.snapshot.messages,session:t.session,subagents:t.subagents};case"load_failed":return{...Ef,isLoading:!1,loadError:t.errorMessage};case"server_event":return OK(e,t.event);case"stream_rejected":return{...e,streamError:t.errorMessage};case"optimistic_added":return e.session?.id!==t.sessionId?e:{...e,optimistic:[...e.optimistic,{localId:t.localId,message:t.message,runId:void 0}],runError:void 0};case"optimistic_run_assigned":return e.session?.id!==t.sessionId?e:e.submittedRunIds.includes(t.runId)?{...e,optimistic:e.optimistic.filter(n=>n.localId!==t.localId)}:{...e,optimistic:e.optimistic.map(n=>n.localId===t.localId?{...n,runId:t.runId}:n)};case"optimistic_failed":return e.session?.id!==t.sessionId?e:{...e,optimistic:e.optimistic.filter(n=>n.localId!==t.localId),runError:t.errorMessage};case"session_replaced":return{...e,messages:t.session.snapshot.messages,optimistic:[],runError:void 0,session:t.session,streamingPartial:void 0};case"session_updated":return{...e,session:t.session}}}function N2(e,t){return e instanceof Error?e.message:t}function IK(e){const[t,n]=v.useReducer(LK,Ef);v.useEffect(()=>{if(e===void 0){n({type:"reset_for_session"});return}const p=new AbortController;return n({type:"reset_for_session"}),(async()=>{let E;try{const[y,T]=await Promise.all([C2(e),A2(e)]);E=y.session,p.signal.aborted||n({type:"session_loaded",session:E,subagents:T.subagents})}catch(y){p.signal.aborted||n({type:"load_failed",errorMessage:N2(y,"The session could not be loaded.")});return}p.signal.aborted||await vK(e,E.lastEventId,y=>{n({type:"server_event",event:y})},p.signal,{onCursorInvalid:async()=>{const[y,T]=await Promise.all([C2(e),A2(e)]);if(!p.signal.aborted)return n({type:"session_loaded",session:y.session,subagents:T.subagents}),y.session.lastEventId},onStreamRejected:y=>{n({type:"stream_rejected",errorMessage:`The daemon rejected the event stream (HTTP ${y}).`})}})})(),()=>{p.abort()}},[e]);const r=v.useCallback(async(p,m)=>{if(e===void 0||t.session?.agent.type==="subagent")return!1;const E=`optimistic-${crypto.randomUUID()}`,y=[...m??[],...p!==""?[{type:"text",text:p}]:[]];n({type:"optimistic_added",localId:E,message:{role:"user",id:E,blocks:y},sessionId:e});try{const S=await gK(e,m!==void 0&&m.length>0?{text:p,content:y}:{text:p});return n({type:"optimistic_run_assigned",localId:E,runId:S.runId,sessionId:e}),!0}catch(S){return n({type:"optimistic_failed",localId:E,errorMessage:N2(S,"The message could not be sent."),sessionId:e}),!1}},[e,t.session?.agent.type]),i=v.useCallback(async()=>{e!==void 0&&await bK(e)},[e]),o=v.useCallback(async()=>{if(e===void 0)return;const p=await EK(e);n({type:"session_replaced",session:p.session})},[e]),l=v.useCallback(async(p,m,E)=>{if(e===void 0)return;const y=await yK(e,E!==void 0?{modelId:m,providerId:p,effort:E}:{modelId:m,providerId:p});n({type:"session_updated",session:y.session})},[e]),c=v.useCallback(async p=>{if(e===void 0)return;const m=await _K(e,p!==void 0?{effort:p}:{});n({type:"session_updated",session:m.session})},[e]),f=v.useMemo(()=>t.optimistic.length===0?t.messages:[...t.messages,...t.optimistic.map(p=>p.message)],[t.messages,t.optimistic]),h=t.session!==void 0&&(t.session.status==="running"||t.session.status==="queued");return{abort:i,changeEffort:c,changeModel:l,isAborting:t.isAborting,isLoading:t.isLoading,isRunning:h,loadError:t.loadError,messages:f,reset:o,runError:t.runError,session:t.session,streamError:t.streamError,streamingPartial:t.streamingPartial,subagents:t.subagents,submit:r}}const DK=5e3;function MK(){const[e,t]=v.useState(void 0),[n,r]=v.useState(void 0);return v.useEffect(()=>{let i=!1;const o=async()=>{try{const c=await hK();i||(t(c),r(void 0))}catch(c){i||r(c instanceof Error?c.message:"The daemon could not be reached.")}};o();const l=window.setInterval(()=>{o()},DK);return()=>{i=!0,window.clearInterval(l)}},[]),{error:n,health:e}}const PK=5e3;function BK(){const[e,t]=v.useState([]),[n,r]=v.useState(void 0),[i,o]=v.useState(!0),[l,c]=v.useState(0),f=v.useCallback(()=>{c(h=>h+1)},[]);return v.useEffect(()=>{let h=!1;const p=async()=>{try{const E=await mK();h||(t(E.sessions),r(void 0))}catch(E){h||r(E instanceof Error?E.message:"The session list could not be loaded.")}finally{h||o(!1)}};p();const m=window.setInterval(()=>{p()},PK);return()=>{h=!0,window.clearInterval(m)}},[l]),{error:n,isLoading:i,refresh:f,sessions:e}}function jK(){const[e,t]=v.useState([]),n=e.at(-1),r=e.at(0),{health:i,error:o}=MK(),l=BK(),c=IK(n),{refresh:f}=l,h=v.useCallback(C=>{t([C.id]),f()},[f]),p=v.useCallback(C=>{t([C])},[]),m=v.useCallback(C=>{t(w=>w.at(-1)===C?w:[...w,C])},[]),E=v.useCallback(()=>{t(C=>C.length>1?C.slice(0,-1):C)},[]),y=c.session?.title,T=c.session?.status;v.useEffect(()=>{f()},[y,T,f]);const S=l.sessions.find(C=>C.id===n);return _.jsxs("div",{className:"flex h-screen min-w-[1100px] bg-background text-foreground",children:[_.jsx(kK,{activeSessionId:r,health:i,healthError:o,isLoadingSessions:l.isLoading,onSelectSession:p,onSessionCreated:h,refreshSessions:f,sessionListError:l.error,sessions:l.sessions}),_.jsx(jW,{activeSession:c,daemonReady:i?.ready===!0&&o===void 0,historyDepth:Math.max(0,e.length-1),onBackToParent:E,onOpenSubagent:m,sessionId:n}),_.jsx(lK,{activeSession:c,catalog:i?.catalog,onOpenSubagent:m,sessionId:n,summary:S})]})}nL.createRoot(document.getElementById("root")).render(_.jsx(v.StrictMode,{children:_.jsx(jK,{})}));const UK=Object.freeze(Object.defineProperty({__proto__:null,Mermaid:Wk},Symbol.toStringTag,{value:"Module"}));export{X$ as A,GK as L,Vn as R,_ as j,v as r};
|