zero-workspace 0.0.2
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/CHANGELOG.md +18 -0
- package/README.md +187 -0
- package/config/component-versions.json +16 -0
- package/config/scenarioCapabilities.json +29 -0
- package/config/version-notes.yaml +244 -0
- package/dist/adapters/OutputAdapter.d.ts +79 -0
- package/dist/adapters/OutputAdapter.d.ts.map +1 -0
- package/dist/adapters/OutputAdapter.js +124 -0
- package/dist/adapters/OutputAdapter.js.map +1 -0
- package/dist/cli/check-node-version.d.ts +3 -0
- package/dist/cli/check-node-version.d.ts.map +1 -0
- package/dist/cli/check-node-version.js +153 -0
- package/dist/cli/check-node-version.js.map +1 -0
- package/dist/cli/plugins.d.ts +41 -0
- package/dist/cli/plugins.d.ts.map +1 -0
- package/dist/cli/plugins.js +742 -0
- package/dist/cli/plugins.js.map +1 -0
- package/dist/cli/rebuild.d.ts +63 -0
- package/dist/cli/rebuild.d.ts.map +1 -0
- package/dist/cli/rebuild.js +989 -0
- package/dist/cli/rebuild.js.map +1 -0
- package/dist/cli/repair.d.ts +7 -0
- package/dist/cli/repair.d.ts.map +1 -0
- package/dist/cli/repair.js +925 -0
- package/dist/cli/repair.js.map +1 -0
- package/dist/cli/setup.d.ts +7 -0
- package/dist/cli/setup.d.ts.map +1 -0
- package/dist/cli/setup.js +452 -0
- package/dist/cli/setup.js.map +1 -0
- package/dist/cli/update.d.ts +10 -0
- package/dist/cli/update.d.ts.map +1 -0
- package/dist/cli/update.js +426 -0
- package/dist/cli/update.js.map +1 -0
- package/dist/cli/webui.d.ts +6 -0
- package/dist/cli/webui.d.ts.map +1 -0
- package/dist/cli/webui.js +210 -0
- package/dist/cli/webui.js.map +1 -0
- package/dist/http/index.d.ts +3 -0
- package/dist/http/index.d.ts.map +1 -0
- package/dist/http/index.js +15 -0
- package/dist/http/index.js.map +1 -0
- package/dist/http/middleware/errorHandler.d.ts +16 -0
- package/dist/http/middleware/errorHandler.d.ts.map +1 -0
- package/dist/http/middleware/errorHandler.js +79 -0
- package/dist/http/middleware/errorHandler.js.map +1 -0
- package/dist/http/routes/admin.d.ts +3 -0
- package/dist/http/routes/admin.d.ts.map +1 -0
- package/dist/http/routes/admin.js +730 -0
- package/dist/http/routes/admin.js.map +1 -0
- package/dist/http/routes/backup.d.ts +3 -0
- package/dist/http/routes/backup.d.ts.map +1 -0
- package/dist/http/routes/backup.js +172 -0
- package/dist/http/routes/backup.js.map +1 -0
- package/dist/http/routes/config.d.ts +3 -0
- package/dist/http/routes/config.d.ts.map +1 -0
- package/dist/http/routes/config.js +157 -0
- package/dist/http/routes/config.js.map +1 -0
- package/dist/http/routes/context.d.ts +3 -0
- package/dist/http/routes/context.d.ts.map +1 -0
- package/dist/http/routes/context.js +82 -0
- package/dist/http/routes/context.js.map +1 -0
- package/dist/http/routes/log.d.ts +3 -0
- package/dist/http/routes/log.d.ts.map +1 -0
- package/dist/http/routes/log.js +105 -0
- package/dist/http/routes/log.js.map +1 -0
- package/dist/http/routes/memo.d.ts +6 -0
- package/dist/http/routes/memo.d.ts.map +1 -0
- package/dist/http/routes/memo.js +29 -0
- package/dist/http/routes/memo.js.map +1 -0
- package/dist/http/routes/node.d.ts +3 -0
- package/dist/http/routes/node.d.ts.map +1 -0
- package/dist/http/routes/node.js +251 -0
- package/dist/http/routes/node.js.map +1 -0
- package/dist/http/routes/state.d.ts +3 -0
- package/dist/http/routes/state.d.ts.map +1 -0
- package/dist/http/routes/state.js +48 -0
- package/dist/http/routes/state.js.map +1 -0
- package/dist/http/routes/workspace.d.ts +3 -0
- package/dist/http/routes/workspace.d.ts.map +1 -0
- package/dist/http/routes/workspace.js +249 -0
- package/dist/http/routes/workspace.js.map +1 -0
- package/dist/http/server.d.ts +10 -0
- package/dist/http/server.d.ts.map +1 -0
- package/dist/http/server.js +284 -0
- package/dist/http/server.js.map +1 -0
- package/dist/http/services.d.ts +93 -0
- package/dist/http/services.d.ts.map +1 -0
- package/dist/http/services.js +297 -0
- package/dist/http/services.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1073 -0
- package/dist/index.js.map +1 -0
- package/dist/prompts/guidanceContent.d.ts +18 -0
- package/dist/prompts/guidanceContent.d.ts.map +1 -0
- package/dist/prompts/guidanceContent.js +814 -0
- package/dist/prompts/guidanceContent.js.map +1 -0
- package/dist/prompts/index.d.ts +2 -0
- package/dist/prompts/index.d.ts.map +1 -0
- package/dist/prompts/index.js +4 -0
- package/dist/prompts/index.js.map +1 -0
- package/dist/prompts/instructions.d.ts +56 -0
- package/dist/prompts/instructions.d.ts.map +1 -0
- package/dist/prompts/instructions.js +1343 -0
- package/dist/prompts/instructions.js.map +1 -0
- package/dist/services/BackupService.d.ts +104 -0
- package/dist/services/BackupService.d.ts.map +1 -0
- package/dist/services/BackupService.js +549 -0
- package/dist/services/BackupService.js.map +1 -0
- package/dist/services/CapabilityService.d.ts +38 -0
- package/dist/services/CapabilityService.d.ts.map +1 -0
- package/dist/services/CapabilityService.js +256 -0
- package/dist/services/CapabilityService.js.map +1 -0
- package/dist/services/ConfigService.d.ts +35 -0
- package/dist/services/ConfigService.d.ts.map +1 -0
- package/dist/services/ConfigService.js +105 -0
- package/dist/services/ConfigService.js.map +1 -0
- package/dist/services/ContextService.d.ts +65 -0
- package/dist/services/ContextService.d.ts.map +1 -0
- package/dist/services/ContextService.js +503 -0
- package/dist/services/ContextService.js.map +1 -0
- package/dist/services/DetectionService.d.ts +76 -0
- package/dist/services/DetectionService.d.ts.map +1 -0
- package/dist/services/DetectionService.js +262 -0
- package/dist/services/DetectionService.js.map +1 -0
- package/dist/services/DispatchService.d.ts +267 -0
- package/dist/services/DispatchService.d.ts.map +1 -0
- package/dist/services/DispatchService.js +1357 -0
- package/dist/services/DispatchService.js.map +1 -0
- package/dist/services/EventService.d.ts +81 -0
- package/dist/services/EventService.d.ts.map +1 -0
- package/dist/services/EventService.js +187 -0
- package/dist/services/EventService.js.map +1 -0
- package/dist/services/GuidanceService.d.ts +64 -0
- package/dist/services/GuidanceService.d.ts.map +1 -0
- package/dist/services/GuidanceService.js +259 -0
- package/dist/services/GuidanceService.js.map +1 -0
- package/dist/services/HealthService.d.ts +43 -0
- package/dist/services/HealthService.d.ts.map +1 -0
- package/dist/services/HealthService.js +276 -0
- package/dist/services/HealthService.js.map +1 -0
- package/dist/services/InstallationService.d.ts +62 -0
- package/dist/services/InstallationService.d.ts.map +1 -0
- package/dist/services/InstallationService.js +204 -0
- package/dist/services/InstallationService.js.map +1 -0
- package/dist/services/LogService.d.ts +35 -0
- package/dist/services/LogService.d.ts.map +1 -0
- package/dist/services/LogService.js +189 -0
- package/dist/services/LogService.js.map +1 -0
- package/dist/services/MemoService.d.ts +39 -0
- package/dist/services/MemoService.d.ts.map +1 -0
- package/dist/services/MemoService.js +288 -0
- package/dist/services/MemoService.js.map +1 -0
- package/dist/services/NodeService.d.ts +90 -0
- package/dist/services/NodeService.d.ts.map +1 -0
- package/dist/services/NodeService.js +958 -0
- package/dist/services/NodeService.js.map +1 -0
- package/dist/services/OpenSpecParser.d.ts +43 -0
- package/dist/services/OpenSpecParser.d.ts.map +1 -0
- package/dist/services/OpenSpecParser.js +191 -0
- package/dist/services/OpenSpecParser.js.map +1 -0
- package/dist/services/ReferenceService.d.ts +35 -0
- package/dist/services/ReferenceService.d.ts.map +1 -0
- package/dist/services/ReferenceService.js +195 -0
- package/dist/services/ReferenceService.js.map +1 -0
- package/dist/services/RepairService.d.ts +36 -0
- package/dist/services/RepairService.d.ts.map +1 -0
- package/dist/services/RepairService.js +429 -0
- package/dist/services/RepairService.js.map +1 -0
- package/dist/services/SearchService.d.ts +34 -0
- package/dist/services/SearchService.d.ts.map +1 -0
- package/dist/services/SearchService.js +293 -0
- package/dist/services/SearchService.js.map +1 -0
- package/dist/services/SessionService.d.ts +136 -0
- package/dist/services/SessionService.d.ts.map +1 -0
- package/dist/services/SessionService.js +297 -0
- package/dist/services/SessionService.js.map +1 -0
- package/dist/services/StateService.d.ts +97 -0
- package/dist/services/StateService.d.ts.map +1 -0
- package/dist/services/StateService.js +846 -0
- package/dist/services/StateService.js.map +1 -0
- package/dist/services/TutorialService.d.ts +114 -0
- package/dist/services/TutorialService.d.ts.map +1 -0
- package/dist/services/TutorialService.js +1262 -0
- package/dist/services/TutorialService.js.map +1 -0
- package/dist/services/WorkspaceService.d.ts +273 -0
- package/dist/services/WorkspaceService.d.ts.map +1 -0
- package/dist/services/WorkspaceService.js +1764 -0
- package/dist/services/WorkspaceService.js.map +1 -0
- package/dist/services/index.d.ts +15 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/index.js +14 -0
- package/dist/services/index.js.map +1 -0
- package/dist/storage/FileSystemAdapter.d.ts +223 -0
- package/dist/storage/FileSystemAdapter.d.ts.map +1 -0
- package/dist/storage/FileSystemAdapter.js +384 -0
- package/dist/storage/FileSystemAdapter.js.map +1 -0
- package/dist/storage/JsonStorage.d.ts +158 -0
- package/dist/storage/JsonStorage.d.ts.map +1 -0
- package/dist/storage/JsonStorage.js +613 -0
- package/dist/storage/JsonStorage.js.map +1 -0
- package/dist/storage/MarkdownStorage.d.ts +178 -0
- package/dist/storage/MarkdownStorage.d.ts.map +1 -0
- package/dist/storage/MarkdownStorage.js +918 -0
- package/dist/storage/MarkdownStorage.js.map +1 -0
- package/dist/storage/SessionBindingStorage.d.ts +69 -0
- package/dist/storage/SessionBindingStorage.d.ts.map +1 -0
- package/dist/storage/SessionBindingStorage.js +131 -0
- package/dist/storage/SessionBindingStorage.js.map +1 -0
- package/dist/storage/index.d.ts +6 -0
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/index.js +6 -0
- package/dist/storage/index.js.map +1 -0
- package/dist/tools/capability.d.ts +18 -0
- package/dist/tools/capability.d.ts.map +1 -0
- package/dist/tools/capability.js +73 -0
- package/dist/tools/capability.js.map +1 -0
- package/dist/tools/config.d.ts +14 -0
- package/dist/tools/config.d.ts.map +1 -0
- package/dist/tools/config.js +61 -0
- package/dist/tools/config.js.map +1 -0
- package/dist/tools/context.d.ts +22 -0
- package/dist/tools/context.d.ts.map +1 -0
- package/dist/tools/context.js +139 -0
- package/dist/tools/context.js.map +1 -0
- package/dist/tools/dispatch.d.ts +41 -0
- package/dist/tools/dispatch.d.ts.map +1 -0
- package/dist/tools/dispatch.js +380 -0
- package/dist/tools/dispatch.js.map +1 -0
- package/dist/tools/help.d.ts +44 -0
- package/dist/tools/help.d.ts.map +1 -0
- package/dist/tools/help.js +227 -0
- package/dist/tools/help.js.map +1 -0
- package/dist/tools/import.d.ts +17 -0
- package/dist/tools/import.d.ts.map +1 -0
- package/dist/tools/import.js +96 -0
- package/dist/tools/import.js.map +1 -0
- package/dist/tools/index.d.ts +12 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +13 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/log.d.ts +21 -0
- package/dist/tools/log.d.ts.map +1 -0
- package/dist/tools/log.js +93 -0
- package/dist/tools/log.js.map +1 -0
- package/dist/tools/memo.d.ts +26 -0
- package/dist/tools/memo.d.ts.map +1 -0
- package/dist/tools/memo.js +188 -0
- package/dist/tools/memo.js.map +1 -0
- package/dist/tools/node.d.ts +34 -0
- package/dist/tools/node.d.ts.map +1 -0
- package/dist/tools/node.js +328 -0
- package/dist/tools/node.js.map +1 -0
- package/dist/tools/search.d.ts +14 -0
- package/dist/tools/search.d.ts.map +1 -0
- package/dist/tools/search.js +95 -0
- package/dist/tools/search.js.map +1 -0
- package/dist/tools/session.d.ts +22 -0
- package/dist/tools/session.d.ts.map +1 -0
- package/dist/tools/session.js +127 -0
- package/dist/tools/session.js.map +1 -0
- package/dist/tools/state.d.ts +10 -0
- package/dist/tools/state.d.ts.map +1 -0
- package/dist/tools/state.js +79 -0
- package/dist/tools/state.js.map +1 -0
- package/dist/tools/workspace.d.ts +38 -0
- package/dist/tools/workspace.d.ts.map +1 -0
- package/dist/tools/workspace.js +240 -0
- package/dist/tools/workspace.js.map +1 -0
- package/dist/types/capability.d.ts +36 -0
- package/dist/types/capability.d.ts.map +1 -0
- package/dist/types/capability.js +3 -0
- package/dist/types/capability.js.map +1 -0
- package/dist/types/confirmation.d.ts +35 -0
- package/dist/types/confirmation.d.ts.map +1 -0
- package/dist/types/confirmation.js +3 -0
- package/dist/types/confirmation.js.map +1 -0
- package/dist/types/context.d.ts +174 -0
- package/dist/types/context.d.ts.map +1 -0
- package/dist/types/context.js +3 -0
- package/dist/types/context.js.map +1 -0
- package/dist/types/errors.d.ts +81 -0
- package/dist/types/errors.d.ts.map +1 -0
- package/dist/types/errors.js +154 -0
- package/dist/types/errors.js.map +1 -0
- package/dist/types/guidance.d.ts +162 -0
- package/dist/types/guidance.d.ts.map +1 -0
- package/dist/types/guidance.js +4 -0
- package/dist/types/guidance.js.map +1 -0
- package/dist/types/health.d.ts +61 -0
- package/dist/types/health.d.ts.map +1 -0
- package/dist/types/health.js +3 -0
- package/dist/types/health.js.map +1 -0
- package/dist/types/index.d.ts +10 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +11 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/memo.d.ts +132 -0
- package/dist/types/memo.d.ts.map +1 -0
- package/dist/types/memo.js +3 -0
- package/dist/types/memo.js.map +1 -0
- package/dist/types/node.d.ts +316 -0
- package/dist/types/node.d.ts.map +1 -0
- package/dist/types/node.js +3 -0
- package/dist/types/node.js.map +1 -0
- package/dist/types/repair.d.ts +62 -0
- package/dist/types/repair.d.ts.map +1 -0
- package/dist/types/repair.js +4 -0
- package/dist/types/repair.js.map +1 -0
- package/dist/types/search.d.ts +58 -0
- package/dist/types/search.d.ts.map +1 -0
- package/dist/types/search.js +3 -0
- package/dist/types/search.js.map +1 -0
- package/dist/types/settings.d.ts +109 -0
- package/dist/types/settings.d.ts.map +1 -0
- package/dist/types/settings.js +30 -0
- package/dist/types/settings.js.map +1 -0
- package/dist/types/workspace.d.ts +357 -0
- package/dist/types/workspace.d.ts.map +1 -0
- package/dist/types/workspace.js +3 -0
- package/dist/types/workspace.js.map +1 -0
- package/dist/utils/contentValidation.d.ts +47 -0
- package/dist/utils/contentValidation.d.ts.map +1 -0
- package/dist/utils/contentValidation.js +93 -0
- package/dist/utils/contentValidation.js.map +1 -0
- package/dist/utils/devLog.d.ts +43 -0
- package/dist/utils/devLog.d.ts.map +1 -0
- package/dist/utils/devLog.js +94 -0
- package/dist/utils/devLog.js.map +1 -0
- package/dist/utils/errorLogger.d.ts +27 -0
- package/dist/utils/errorLogger.d.ts.map +1 -0
- package/dist/utils/errorLogger.js +105 -0
- package/dist/utils/errorLogger.js.map +1 -0
- package/dist/utils/git.d.ts +123 -0
- package/dist/utils/git.d.ts.map +1 -0
- package/dist/utils/git.js +400 -0
- package/dist/utils/git.js.map +1 -0
- package/dist/utils/hash.d.ts +32 -0
- package/dist/utils/hash.d.ts.map +1 -0
- package/dist/utils/hash.js +37 -0
- package/dist/utils/hash.js.map +1 -0
- package/dist/utils/id.d.ts +54 -0
- package/dist/utils/id.d.ts.map +1 -0
- package/dist/utils/id.js +96 -0
- package/dist/utils/id.js.map +1 -0
- package/dist/utils/index.d.ts +8 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +9 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/logger.d.ts +42 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +228 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/manualChangeFormatter.d.ts +8 -0
- package/dist/utils/manualChangeFormatter.d.ts.map +1 -0
- package/dist/utils/manualChangeFormatter.js +21 -0
- package/dist/utils/manualChangeFormatter.js.map +1 -0
- package/dist/utils/paramValidator.d.ts +35 -0
- package/dist/utils/paramValidator.d.ts.map +1 -0
- package/dist/utils/paramValidator.js +214 -0
- package/dist/utils/paramValidator.js.map +1 -0
- package/dist/utils/port.d.ts +7 -0
- package/dist/utils/port.d.ts.map +1 -0
- package/dist/utils/port.js +28 -0
- package/dist/utils/port.js.map +1 -0
- package/dist/utils/processManager.d.ts +53 -0
- package/dist/utils/processManager.d.ts.map +1 -0
- package/dist/utils/processManager.js +267 -0
- package/dist/utils/processManager.js.map +1 -0
- package/dist/utils/sessionLogger.d.ts +28 -0
- package/dist/utils/sessionLogger.d.ts.map +1 -0
- package/dist/utils/sessionLogger.js +142 -0
- package/dist/utils/sessionLogger.js.map +1 -0
- package/dist/utils/time.d.ts +15 -0
- package/dist/utils/time.d.ts.map +1 -0
- package/dist/utils/time.js +32 -0
- package/dist/utils/time.js.map +1 -0
- package/dist/utils/validation.d.ts +23 -0
- package/dist/utils/validation.d.ts.map +1 -0
- package/dist/utils/validation.js +88 -0
- package/dist/utils/validation.js.map +1 -0
- package/docs//346/227/245/345/277/227/347/263/273/347/273/237.md +389 -0
- package/docs//347/224/250/346/210/267/346/211/213/345/206/214.md +1446 -0
- package/docs//347/224/250/346/210/267/346/211/213/345/206/214/344/270/216/346/212/200/346/234/257/346/214/207/345/215/227.md +873 -0
- package/package.json +94 -0
- package/plugin/README.md +141 -0
- package/plugin/agents/zero-executor.md +114 -0
- package/plugin/agents/zero-reviewer.md +133 -0
- package/plugin/docs/diagnostic-guide.md +128 -0
- package/plugin/hooks/hooks.json.deprecated +70 -0
- package/plugin/scripts/cursor-hook-entry.cjs +217 -0
- package/plugin/scripts/hook-entry.cjs +663 -0
- package/plugin/scripts/openspec-import.cjs +714 -0
- package/plugin/scripts/shared/binding.cjs +98 -0
- package/plugin/scripts/shared/config.cjs +65 -0
- package/plugin/scripts/shared/context.cjs +120 -0
- package/plugin/scripts/shared/index.cjs +34 -0
- package/plugin/scripts/shared/logger.cjs +196 -0
- package/plugin/scripts/shared/reminder.cjs +261 -0
- package/plugin/scripts/shared/utils.cjs +62 -0
- package/plugin/scripts/shared/workspace.cjs +322 -0
- package/plugin/skills/aligning-intent/SKILL.md +275 -0
- package/plugin/skills/analyzing-measurements/SKILL.md +223 -0
- package/plugin/skills/bootstrapping-workspace/SKILL.md +260 -0
- package/plugin/skills/designing-solutions/SKILL.md +363 -0
- package/plugin/skills/diagnosing-issues/SKILL.md +219 -0
- package/plugin/skills/discovering-context/SKILL.md +283 -0
- package/plugin/skills/dispatching-parent/SKILL.md +399 -0
- package/plugin/skills/executing-task/SKILL.md +340 -0
- package/plugin/skills/memo-create/SKILL.md +222 -0
- package/plugin/skills/planning-verification/SKILL.md +245 -0
- package/plugin/skills/preparing-dispatch/SKILL.md +299 -0
- package/plugin/skills/researching-tech/SKILL.md +223 -0
- package/plugin/skills/reviewing-quality/SKILL.md +354 -0
- package/plugin/skills/reviewing-spec/SKILL.md +333 -0
- package/plugin/skills/starting-info-flow/SKILL.md +196 -0
- package/web/README.md +5 -0
- package/web/dist/assets/DocsView-Bls_Vjsr.css +1 -0
- package/web/dist/assets/DocsView-Cxc0B63r.js +1447 -0
- package/web/dist/assets/HomeView-C7df9thb.js +9 -0
- package/web/dist/assets/HomeView-ufUdnfHk.css +1 -0
- package/web/dist/assets/MarkdownContent-DXp6CtSP.js +308 -0
- package/web/dist/assets/MarkdownContent-NFqiOBLH.css +1 -0
- package/web/dist/assets/NotFoundView-BYX1oZAn.css +1 -0
- package/web/dist/assets/NotFoundView-zrc0lT9q.js +1 -0
- package/web/dist/assets/WorkspaceView-BckqgNcX.js +27 -0
- package/web/dist/assets/WorkspaceView-J1dgpYMx.css +1 -0
- package/web/dist/assets/WsConfirmDialog-C1CvL4my.css +1 -0
- package/web/dist/assets/WsConfirmDialog-gLEP7uBD.js +4 -0
- package/web/dist/assets/arc-DPkKTkUT.js +1 -0
- package/web/dist/assets/architectureDiagram-VXUJARFQ-CEGpqUlZ.js +36 -0
- package/web/dist/assets/blockDiagram-VD42YOAC-Bv-mqdQH.js +122 -0
- package/web/dist/assets/c4Diagram-YG6GDRKO-DRyPatZ_.js +10 -0
- package/web/dist/assets/channel-B84mKLDZ.js +1 -0
- package/web/dist/assets/chunk-4BX2VUAB-c7DivX0u.js +1 -0
- package/web/dist/assets/chunk-55IACEB6-CGKTaLlo.js +1 -0
- package/web/dist/assets/chunk-B4BG7PRW-Czhx5Q_P.js +165 -0
- package/web/dist/assets/chunk-DI55MBZ5-CQVA7hcZ.js +220 -0
- package/web/dist/assets/chunk-FMBD7UC4-hEiPmi7V.js +15 -0
- package/web/dist/assets/chunk-QN33PNHL-rL6yYI-E.js +1 -0
- package/web/dist/assets/chunk-QZHKN3VN-BRyHBBzq.js +1 -0
- package/web/dist/assets/chunk-TZMSLE5B-D4PXmTz9.js +1 -0
- package/web/dist/assets/classDiagram-2ON5EDUG-CNn53ohi.js +1 -0
- package/web/dist/assets/classDiagram-v2-WZHVMYZB-CNn53ohi.js +1 -0
- package/web/dist/assets/cose-bilkent-S5V4N54A-BAREnRga.js +1 -0
- package/web/dist/assets/cytoscape.esm-BnkdMOzK.js +321 -0
- package/web/dist/assets/dagre-6UL2VRFP-DaYzb3MT.js +4 -0
- package/web/dist/assets/defaultLocale-C4B-KCzX.js +1 -0
- package/web/dist/assets/diagram-PSM6KHXK-BFltDqvd.js +24 -0
- package/web/dist/assets/diagram-QEK2KX5R-CR4VU2La.js +43 -0
- package/web/dist/assets/diagram-S2PKOQOG-0UfIeT-1.js +24 -0
- package/web/dist/assets/erDiagram-Q2GNP2WA-Bo17Xmng.js +60 -0
- package/web/dist/assets/flowDiagram-NV44I4VS-CzqhQp8s.js +162 -0
- package/web/dist/assets/ganttDiagram-JELNMOA3-TXwXtUcq.js +267 -0
- package/web/dist/assets/gitGraphDiagram-NY62KEGX-CoFQTy9O.js +65 -0
- package/web/dist/assets/graph-CIQcRIVd.js +1 -0
- package/web/dist/assets/index-BgLd_o_M.css +1 -0
- package/web/dist/assets/index-Cd_J3fZn.js +30 -0
- package/web/dist/assets/infoDiagram-WHAUD3N6-Dq0xXfVu.js +2 -0
- package/web/dist/assets/init-Gi6I4Gst.js +1 -0
- package/web/dist/assets/journeyDiagram-XKPGCS4Q-jIg5BOfC.js +139 -0
- package/web/dist/assets/kanban-definition-3W4ZIXB7-D2giu6aZ.js +89 -0
- package/web/dist/assets/katex-XbL3y5x-.js +261 -0
- package/web/dist/assets/layout-Bm-XCM-8.js +1 -0
- package/web/dist/assets/linear-FbekP9OZ.js +1 -0
- package/web/dist/assets/min-BrRCpYmF.js +1 -0
- package/web/dist/assets/mindmap-definition-VGOIOE7T-o-4ubbY9.js +68 -0
- package/web/dist/assets/noto-emoji-0-400-normal-BTQbhB77.woff +0 -0
- package/web/dist/assets/noto-emoji-0-400-normal-DHdy6Uhy.woff2 +0 -0
- package/web/dist/assets/noto-emoji-1-400-normal-0IvkdXBB.woff +0 -0
- package/web/dist/assets/noto-emoji-1-400-normal-BY9OovbM.woff2 +0 -0
- package/web/dist/assets/noto-emoji-10-400-normal-D9w4QCof.woff2 +0 -0
- package/web/dist/assets/noto-emoji-10-400-normal-DtCumcZR.woff +0 -0
- package/web/dist/assets/noto-emoji-11-400-normal-BboTlyvx.woff +0 -0
- package/web/dist/assets/noto-emoji-12-400-normal-BB5pgBKj.woff2 +0 -0
- package/web/dist/assets/noto-emoji-12-400-normal-g186qhiA.woff +0 -0
- package/web/dist/assets/noto-emoji-2-400-normal-BKCR1azW.woff2 +0 -0
- package/web/dist/assets/noto-emoji-2-400-normal-BYH0KhDr.woff +0 -0
- package/web/dist/assets/noto-emoji-3-400-normal-CnPTUeEK.woff +0 -0
- package/web/dist/assets/noto-emoji-3-400-normal-TrTb2VQM.woff2 +0 -0
- package/web/dist/assets/noto-emoji-4-400-normal-BxD0KVdj.woff +0 -0
- package/web/dist/assets/noto-emoji-4-400-normal-s_n9EyG1.woff2 +0 -0
- package/web/dist/assets/noto-emoji-5-400-normal-C190AIxR.woff +0 -0
- package/web/dist/assets/noto-emoji-5-400-normal-Ctfx4xc6.woff2 +0 -0
- package/web/dist/assets/noto-emoji-6-400-normal-DlXlXWt7.woff +0 -0
- package/web/dist/assets/noto-emoji-6-400-normal-NzsjD754.woff2 +0 -0
- package/web/dist/assets/noto-emoji-7-400-normal-BHP8KeA6.woff2 +0 -0
- package/web/dist/assets/noto-emoji-7-400-normal-CtuKhtAZ.woff +0 -0
- package/web/dist/assets/noto-emoji-8-400-normal-DR49ZFe7.woff +0 -0
- package/web/dist/assets/noto-emoji-8-400-normal-Dvmkf6b2.woff2 +0 -0
- package/web/dist/assets/noto-emoji-9-400-normal-BeHJQ2iK.woff2 +0 -0
- package/web/dist/assets/noto-emoji-9-400-normal-BlXmCgeQ.woff +0 -0
- package/web/dist/assets/ordinal-Cboi1Yqb.js +1 -0
- package/web/dist/assets/pieDiagram-ADFJNKIX-C45wSpld.js +30 -0
- package/web/dist/assets/quadrantDiagram-AYHSOK5B-tv-_fe-W.js +7 -0
- package/web/dist/assets/reduce-CoLNNlNb.js +1 -0
- package/web/dist/assets/requirementDiagram-UZGBJVZJ-Dn6PDfkL.js +64 -0
- package/web/dist/assets/sankeyDiagram-TZEHDZUN-CbXTZAsG.js +10 -0
- package/web/dist/assets/sequenceDiagram-WL72ISMW-B-o1CUJ5.js +145 -0
- package/web/dist/assets/stateDiagram-FKZM4ZOC-hzrupXQi.js +1 -0
- package/web/dist/assets/stateDiagram-v2-4FDKWEC3-DN-c2M96.js +1 -0
- package/web/dist/assets/timeline-definition-IT6M3QCI-R5SP9GDo.js +61 -0
- package/web/dist/assets/treemap-KMMF4GRG-Pg9KlUOt.js +128 -0
- package/web/dist/assets/xychartDiagram-PRI3JC2R-C3vbJhd1.js +7 -0
- package/web/dist/favicon.svg +13 -0
- package/web/dist/index.html +17 -0
- package//351/205/215/347/275/256/346/226/271/345/274/217.md +330 -0
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dagre-6UL2VRFP-DaYzb3MT.js","assets/graph-CIQcRIVd.js","assets/index-Cd_J3fZn.js","assets/index-BgLd_o_M.css","assets/reduce-CoLNNlNb.js","assets/layout-Bm-XCM-8.js","assets/min-BrRCpYmF.js","assets/cose-bilkent-S5V4N54A-BAREnRga.js","assets/cytoscape.esm-BnkdMOzK.js","assets/c4Diagram-YG6GDRKO-DRyPatZ_.js","assets/chunk-TZMSLE5B-D4PXmTz9.js","assets/flowDiagram-NV44I4VS-CzqhQp8s.js","assets/chunk-FMBD7UC4-hEiPmi7V.js","assets/chunk-55IACEB6-CGKTaLlo.js","assets/chunk-QN33PNHL-rL6yYI-E.js","assets/channel-B84mKLDZ.js","assets/erDiagram-Q2GNP2WA-Bo17Xmng.js","assets/gitGraphDiagram-NY62KEGX-CoFQTy9O.js","assets/chunk-4BX2VUAB-c7DivX0u.js","assets/chunk-QZHKN3VN-BRyHBBzq.js","assets/treemap-KMMF4GRG-Pg9KlUOt.js","assets/ganttDiagram-JELNMOA3-TXwXtUcq.js","assets/linear-FbekP9OZ.js","assets/init-Gi6I4Gst.js","assets/defaultLocale-C4B-KCzX.js","assets/infoDiagram-WHAUD3N6-Dq0xXfVu.js","assets/pieDiagram-ADFJNKIX-C45wSpld.js","assets/arc-DPkKTkUT.js","assets/ordinal-Cboi1Yqb.js","assets/quadrantDiagram-AYHSOK5B-tv-_fe-W.js","assets/xychartDiagram-PRI3JC2R-C3vbJhd1.js","assets/requirementDiagram-UZGBJVZJ-Dn6PDfkL.js","assets/sequenceDiagram-WL72ISMW-B-o1CUJ5.js","assets/classDiagram-2ON5EDUG-CNn53ohi.js","assets/chunk-B4BG7PRW-Czhx5Q_P.js","assets/classDiagram-v2-WZHVMYZB-CNn53ohi.js","assets/stateDiagram-FKZM4ZOC-hzrupXQi.js","assets/chunk-DI55MBZ5-CQVA7hcZ.js","assets/stateDiagram-v2-4FDKWEC3-DN-c2M96.js","assets/journeyDiagram-XKPGCS4Q-jIg5BOfC.js","assets/timeline-definition-IT6M3QCI-R5SP9GDo.js","assets/mindmap-definition-VGOIOE7T-o-4ubbY9.js","assets/kanban-definition-3W4ZIXB7-D2giu6aZ.js","assets/sankeyDiagram-TZEHDZUN-CbXTZAsG.js","assets/diagram-S2PKOQOG-0UfIeT-1.js","assets/diagram-QEK2KX5R-CR4VU2La.js","assets/blockDiagram-VD42YOAC-Bv-mqdQH.js","assets/architectureDiagram-VXUJARFQ-CEGpqUlZ.js","assets/diagram-PSM6KHXK-BFltDqvd.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{W as Dm,B as Im,aS as Om,aT as Pm,aU as Nm,aV as zm,aW as qm,aX as Wm,a7 as Hm,aY as pt,aZ as uo,an as Ym,a_ as ds,d as jm,r as zl,l as Va,j as Um,K as Gm,e as Vm,n as Xm,o as Zm,_ as Qm}from"./index-Cd_J3fZn.js";var Km="[object Map]",Jm="[object Set]",t0=Object.prototype,e0=t0.hasOwnProperty;function ql(e){if(e==null)return!0;if(Dm(e)&&(Im(e)||typeof e=="string"||typeof e.splice=="function"||Om(e)||Pm(e)||Nm(e)))return!e.length;var t=zm(e);if(t==Km||t==Jm)return!e.size;if(qm(e))return!Wm(e).length;for(var r in e)if(e0.call(e,r))return!1;return!0}function fo(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var yr=fo();function hh(e){yr=e}var vi={exec:()=>null};function ct(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(n,a)=>{let s=typeof a=="string"?a:a.source;return s=s.replace(Nt.caret,"$1"),r=r.replace(n,s),i},getRegex:()=>new RegExp(r,t)};return i}var r0=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Nt={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,listReplaceTabs:/^\t+/,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,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,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")},i0=/^(?:[ \t]*(?:\n|$))+/,n0=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,a0=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Wi=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,s0=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,po=/(?:[*+-]|\d{1,9}[.)])/,uh=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,fh=ct(uh).replace(/bull/g,po).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(),o0=ct(uh).replace(/bull/g,po).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(),go=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,l0=/^[^\n]+/,mo=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,c0=ct(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",mo).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),h0=ct(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,po).getRegex(),pa="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",yo=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,u0=ct("^ {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",yo).replace("tag",pa).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ph=ct(go).replace("hr",Wi).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[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",pa).getRegex(),f0=ct(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ph).getRegex(),xo={blockquote:f0,code:n0,def:c0,fences:a0,heading:s0,hr:Wi,html:u0,lheading:fh,list:h0,newline:i0,paragraph:ph,table:vi,text:l0},Wl=ct("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Wi).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[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",pa).getRegex(),p0={...xo,lheading:o0,table:Wl,paragraph:ct(go).replace("hr",Wi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Wl).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",pa).getRegex()},d0={...xo,html:ct(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",yo).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:vi,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ct(go).replace("hr",Wi).replace("heading",` *#{1,6} *[^
|
|
3
|
+
]`).replace("lheading",fh).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},g0=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,m0=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,dh=/^( {2,}|\\)\n(?!\s*$)/,y0=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,da=/[\p{P}\p{S}]/u,bo=/[\s\p{P}\p{S}]/u,gh=/[^\s\p{P}\p{S}]/u,x0=ct(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,bo).getRegex(),mh=/(?!~)[\p{P}\p{S}]/u,b0=/(?!~)[\s\p{P}\p{S}]/u,k0=/(?:[^\s\p{P}\p{S}]|~)/u,w0=ct(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",r0?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),yh=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,_0=ct(yh,"u").replace(/punct/g,da).getRegex(),C0=ct(yh,"u").replace(/punct/g,mh).getRegex(),xh="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",S0=ct(xh,"gu").replace(/notPunctSpace/g,gh).replace(/punctSpace/g,bo).replace(/punct/g,da).getRegex(),v0=ct(xh,"gu").replace(/notPunctSpace/g,k0).replace(/punctSpace/g,b0).replace(/punct/g,mh).getRegex(),T0=ct("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,gh).replace(/punctSpace/g,bo).replace(/punct/g,da).getRegex(),A0=ct(/\\(punct)/,"gu").replace(/punct/g,da).getRegex(),B0=ct(/^<(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(),L0=ct(yo).replace("(?:-->|$)","-->").getRegex(),E0=ct("^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",L0).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),$n=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,M0=ct(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",$n).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),bh=ct(/^!?\[(label)\]\[(ref)\]/).replace("label",$n).replace("ref",mo).getRegex(),kh=ct(/^!?\[(ref)\](?:\[\])?/).replace("ref",mo).getRegex(),$0=ct("reflink|nolink(?!\\()","g").replace("reflink",bh).replace("nolink",kh).getRegex(),Hl=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,ko={_backpedal:vi,anyPunctuation:A0,autolink:B0,blockSkip:w0,br:dh,code:m0,del:vi,emStrongLDelim:_0,emStrongRDelimAst:S0,emStrongRDelimUnd:T0,escape:g0,link:M0,nolink:kh,punctuation:x0,reflink:bh,reflinkSearch:$0,tag:E0,text:y0,url:vi},F0={...ko,link:ct(/^!?\[(label)\]\((.*?)\)/).replace("label",$n).getRegex(),reflink:ct(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",$n).getRegex()},gs={...ko,emStrongRDelimAst:v0,emStrongLDelim:C0,url:ct(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Hl).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:ct(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Hl).getRegex()},R0={...gs,br:ct(dh).replace("{2,}","*").getRegex(),text:ct(gs.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},an={normal:xo,gfm:p0,pedantic:d0},ri={normal:ko,gfm:gs,breaks:R0,pedantic:F0},D0={"&":"&","<":"<",">":">",'"':""","'":"'"},Yl=e=>D0[e];function Me(e,t){if(t){if(Nt.escapeTest.test(e))return e.replace(Nt.escapeReplace,Yl)}else if(Nt.escapeTestNoEncode.test(e))return e.replace(Nt.escapeReplaceNoEncode,Yl);return e}function jl(e){try{e=encodeURI(e).replace(Nt.percentDecode,"%")}catch{return null}return e}function Ul(e,t){let r=e.replace(Nt.findPipe,(a,s,o)=>{let l=!1,c=s;for(;--c>=0&&o[c]==="\\";)l=!l;return l?"|":" |"}),i=r.split(Nt.splitPipe),n=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;n<i.length;n++)i[n]=i[n].trim().replace(Nt.slashPipe,"|");return i}function ii(e,t,r){let i=e.length;if(i===0)return"";let n=0;for(;n<i&&e.charAt(i-n-1)===t;)n++;return e.slice(0,i-n)}function I0(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return r>0?-2:-1}function Gl(e,t,r,i,n){let a=t.href,s=t.title||null,o=e[1].replace(n.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:s,text:o,tokens:i.inlineTokens(o)};return i.state.inLink=!1,l}function O0(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let n=i[1];return t.split(`
|
|
4
|
+
`).map(a=>{let s=a.match(r.other.beginningSpace);if(s===null)return a;let[o]=s;return o.length>=n.length?a.slice(n.length):a}).join(`
|
|
5
|
+
`)}var Fn=class{options;rules;lexer;constructor(t){this.options=t||yr}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let i=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?i:ii(i,`
|
|
6
|
+
`)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],n=O0(i,r[3]||"",this.rules);return{type:"code",raw:i,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:n}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let i=r[2].trim();if(this.rules.other.endingHash.test(i)){let n=ii(i,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(i=n.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:ii(r[0],`
|
|
7
|
+
`)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=ii(r[0],`
|
|
8
|
+
`).split(`
|
|
9
|
+
`),n="",a="",s=[];for(;i.length>0;){let o=!1,l=[],c;for(c=0;c<i.length;c++)if(this.rules.other.blockquoteStart.test(i[c]))l.push(i[c]),o=!0;else if(!o)l.push(i[c]);else break;i=i.slice(c);let h=l.join(`
|
|
10
|
+
`),u=h.replace(this.rules.other.blockquoteSetextReplace,`
|
|
11
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
|
|
12
|
+
${h}`:h,a=a?`${a}
|
|
13
|
+
${u}`:u;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,s,!0),this.lexer.state.top=f,i.length===0)break;let p=s.at(-1);if(p?.type==="code")break;if(p?.type==="blockquote"){let g=p,m=g.raw+`
|
|
14
|
+
`+i.join(`
|
|
15
|
+
`),y=this.blockquote(m);s[s.length-1]=y,n=n.substring(0,n.length-g.raw.length)+y.raw,a=a.substring(0,a.length-g.text.length)+y.text;break}else if(p?.type==="list"){let g=p,m=g.raw+`
|
|
16
|
+
`+i.join(`
|
|
17
|
+
`),y=this.list(m);s[s.length-1]=y,n=n.substring(0,n.length-p.raw.length)+y.raw,a=a.substring(0,a.length-g.raw.length)+y.raw,i=m.substring(s.at(-1).raw.length).split(`
|
|
18
|
+
`);continue}}return{type:"blockquote",raw:n,tokens:s,text:a}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),n=i.length>1,a={type:"list",raw:"",ordered:n,start:n?+i.slice(0,-1):"",loose:!1,items:[]};i=n?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=n?i:"[*+-]");let s=this.rules.other.listItemRegex(i),o=!1;for(;t;){let c=!1,h="",u="";if(!(r=s.exec(t))||this.rules.block.hr.test(t))break;h=r[0],t=t.substring(h.length);let f=r[2].split(`
|
|
19
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,y=>" ".repeat(3*y.length)),p=t.split(`
|
|
20
|
+
`,1)[0],g=!f.trim(),m=0;if(this.options.pedantic?(m=2,u=f.trimStart()):g?m=r[1].length+1:(m=r[2].search(this.rules.other.nonSpaceChar),m=m>4?1:m,u=f.slice(m),m+=r[1].length),g&&this.rules.other.blankLine.test(p)&&(h+=p+`
|
|
21
|
+
`,t=t.substring(p.length+1),c=!0),!c){let y=this.rules.other.nextBulletRegex(m),x=this.rules.other.hrRegex(m),b=this.rules.other.fencesBeginRegex(m),k=this.rules.other.headingBeginRegex(m),C=this.rules.other.htmlBeginRegex(m);for(;t;){let _=t.split(`
|
|
22
|
+
`,1)[0],T;if(p=_,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting," "),T=p):T=p.replace(this.rules.other.tabCharGlobal," "),b.test(p)||k.test(p)||C.test(p)||y.test(p)||x.test(p))break;if(T.search(this.rules.other.nonSpaceChar)>=m||!p.trim())u+=`
|
|
23
|
+
`+T.slice(m);else{if(g||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||b.test(f)||k.test(f)||x.test(f))break;u+=`
|
|
24
|
+
`+p}!g&&!p.trim()&&(g=!0),h+=_+`
|
|
25
|
+
`,t=t.substring(_.length+1),f=T.slice(m)}}a.loose||(o?a.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(o=!0)),a.items.push({type:"list_item",raw:h,task:!!this.options.gfm&&this.rules.other.listIsTask.test(u),loose:!1,text:u,tokens:[]}),a.raw+=h}let l=a.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let c of a.items){if(this.lexer.state.top=!1,c.tokens=this.lexer.blockTokens(c.text,[]),c.task){if(c.text=c.text.replace(this.rules.other.listReplaceTask,""),c.tokens[0]?.type==="text"||c.tokens[0]?.type==="paragraph"){c.tokens[0].raw=c.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),c.tokens[0].text=c.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let u=this.lexer.inlineQueue.length-1;u>=0;u--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[u].src)){this.lexer.inlineQueue[u].src=this.lexer.inlineQueue[u].src.replace(this.rules.other.listReplaceTask,"");break}}let h=this.rules.other.listTaskCheckbox.exec(c.raw);if(h){let u={type:"checkbox",raw:h[0]+" ",checked:h[0]!=="[ ]"};c.checked=u.checked,a.loose?c.tokens[0]&&["paragraph","text"].includes(c.tokens[0].type)&&"tokens"in c.tokens[0]&&c.tokens[0].tokens?(c.tokens[0].raw=u.raw+c.tokens[0].raw,c.tokens[0].text=u.raw+c.tokens[0].text,c.tokens[0].tokens.unshift(u)):c.tokens.unshift({type:"paragraph",raw:u.raw,text:u.raw,tokens:[u]}):c.tokens.unshift(u)}}if(!a.loose){let h=c.tokens.filter(f=>f.type==="space"),u=h.length>0&&h.some(f=>this.rules.other.anyLine.test(f.raw));a.loose=u}}if(a.loose)for(let c of a.items){c.loose=!0;for(let h of c.tokens)h.type==="text"&&(h.type="paragraph")}return a}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:n,title:a}}}table(t){let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=Ul(r[1]),n=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=r[3]?.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
26
|
+
`):[],s={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===n.length){for(let o of n)this.rules.other.tableAlignRight.test(o)?s.align.push("right"):this.rules.other.tableAlignCenter.test(o)?s.align.push("center"):this.rules.other.tableAlignLeft.test(o)?s.align.push("left"):s.align.push(null);for(let o=0;o<i.length;o++)s.header.push({text:i[o],tokens:this.lexer.inline(i[o]),header:!0,align:s.align[o]});for(let o of a)s.rows.push(Ul(o,s.header.length).map((l,c)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:s.align[c]})));return s}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let i=r[1].charAt(r[1].length-1)===`
|
|
27
|
+
`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let s=ii(i.slice(0,-1),"\\");if((i.length-s.length)%2===0)return}else{let s=I0(r[2],"()");if(s===-2)return;if(s>-1){let o=(r[0].indexOf("!")===0?5:4)+r[1].length+s;r[2]=r[2].substring(0,s),r[0]=r[0].substring(0,o).trim(),r[3]=""}}let n=r[2],a="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(n);s&&(n=s[1],a=s[3])}else a=r[3]?r[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?n=n.slice(1):n=n.slice(1,-1)),Gl(r,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let n=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=r[n.toLowerCase()];if(!a){let s=i[0].charAt(0);return{type:"text",raw:s,text:s}}return Gl(i,a,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let n=this.rules.inline.emStrongLDelim.exec(t);if(!(!n||n[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[2])||!i||this.rules.inline.punctuation.exec(i))){let a=[...n[0]].length-1,s,o,l=a,c=0,h=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,r=r.slice(-1*t.length+a);(n=h.exec(r))!=null;){if(s=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!s)continue;if(o=[...s].length,n[3]||n[4]){l+=o;continue}else if((n[5]||n[6])&&a%3&&!((a+o)%3)){c+=o;continue}if(l-=o,l>0)continue;o=Math.min(o,o+l+c);let u=[...n[0]][0].length,f=t.slice(0,a+n.index+u+o);if(Math.min(a,o)%2){let g=f.slice(1,-1);return{type:"em",raw:f,text:g,tokens:this.lexer.inlineTokens(g)}}let p=f.slice(2,-2);return{type:"strong",raw:f,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(i),a=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return n&&a&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let i,n;return r[2]==="@"?(i=r[1],n="mailto:"+i):(i=r[1],n=i),{type:"link",raw:r[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}}}url(t){let r;if(r=this.rules.inline.url.exec(t)){let i,n;if(r[2]==="@")i=r[0],n="mailto:"+i;else{let a;do a=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(a!==r[0]);i=r[0],r[1]==="www."?n="http://"+r[0]:n=r[0]}return{type:"link",raw:r[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},ae=class ms{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||yr,this.options.tokenizer=this.options.tokenizer||new Fn,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 r={other:Nt,block:an.normal,inline:ri.normal};this.options.pedantic?(r.block=an.pedantic,r.inline=ri.pedantic):this.options.gfm&&(r.block=an.gfm,this.options.breaks?r.inline=ri.breaks:r.inline=ri.gfm),this.tokenizer.rules=r}static get rules(){return{block:an,inline:ri}}static lex(t,r){return new ms(r).lex(t)}static lexInline(t,r){return new ms(r).inlineTokens(t)}lex(t){t=t.replace(Nt.carriageReturn,`
|
|
28
|
+
`),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){for(this.options.pedantic&&(t=t.replace(Nt.tabCharGlobal," ").replace(Nt.spaceLine,""));t;){let n;if(this.options.extensions?.block?.some(s=>(n=s.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))continue;if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length);let s=r.at(-1);n.raw.length===1&&s!==void 0?s.raw+=`
|
|
29
|
+
`:r.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length);let s=r.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=(s.raw.endsWith(`
|
|
30
|
+
`)?"":`
|
|
31
|
+
`)+n.raw,s.text+=`
|
|
32
|
+
`+n.text,this.inlineQueue.at(-1).src=s.text):r.push(n);continue}if(n=this.tokenizer.fences(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.heading(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.hr(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.blockquote(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.list(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.html(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.def(t)){t=t.substring(n.raw.length);let s=r.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=(s.raw.endsWith(`
|
|
33
|
+
`)?"":`
|
|
34
|
+
`)+n.raw,s.text+=`
|
|
35
|
+
`+n.raw,this.inlineQueue.at(-1).src=s.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title},r.push(n));continue}if(n=this.tokenizer.table(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.lheading(t)){t=t.substring(n.raw.length),r.push(n);continue}let a=t;if(this.options.extensions?.startBlock){let s=1/0,o=t.slice(1),l;this.options.extensions.startBlock.forEach(c=>{l=c.call({lexer:this},o),typeof l=="number"&&l>=0&&(s=Math.min(s,l))}),s<1/0&&s>=0&&(a=t.substring(0,s+1))}if(this.state.top&&(n=this.tokenizer.paragraph(a))){let s=r.at(-1);i&&s?.type==="paragraph"?(s.raw+=(s.raw.endsWith(`
|
|
36
|
+
`)?"":`
|
|
37
|
+
`)+n.raw,s.text+=`
|
|
38
|
+
`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(n),i=a.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length);let s=r.at(-1);s?.type==="text"?(s.raw+=(s.raw.endsWith(`
|
|
39
|
+
`)?"":`
|
|
40
|
+
`)+n.raw,s.text+=`
|
|
41
|
+
`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(n);continue}if(t){let s="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let i=t,n=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(n=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)l.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(n=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,n.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(n=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)a=n[2]?n[2].length:0,i=i.slice(0,n.index+a)+"["+"a".repeat(n[0].length-a-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let s=!1,o="";for(;t;){s||(o=""),s=!1;let l;if(this.options.extensions?.inline?.some(h=>(l=h.call({lexer:this},t,r))?(t=t.substring(l.raw.length),r.push(l),!0):!1))continue;if(l=this.tokenizer.escape(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.tag(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.link(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(l.raw.length);let h=r.at(-1);l.type==="text"&&h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue}if(l=this.tokenizer.emStrong(t,i,o)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.codespan(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.br(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.del(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.autolink(t)){t=t.substring(l.raw.length),r.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(t))){t=t.substring(l.raw.length),r.push(l);continue}let c=t;if(this.options.extensions?.startInline){let h=1/0,u=t.slice(1),f;this.options.extensions.startInline.forEach(p=>{f=p.call({lexer:this},u),typeof f=="number"&&f>=0&&(h=Math.min(h,f))}),h<1/0&&h>=0&&(c=t.substring(0,h+1))}if(l=this.tokenizer.inlineText(c)){t=t.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(o=l.raw.slice(-1)),s=!0;let h=r.at(-1);h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return r}},Rn=class{options;parser;constructor(t){this.options=t||yr}space(t){return""}code({text:t,lang:r,escaped:i}){let n=(r||"").match(Nt.notSpaceStart)?.[0],a=t.replace(Nt.endingNewline,"")+`
|
|
42
|
+
`;return n?'<pre><code class="language-'+Me(n)+'">'+(i?a:Me(a,!0))+`</code></pre>
|
|
43
|
+
`:"<pre><code>"+(i?a:Me(a,!0))+`</code></pre>
|
|
44
|
+
`}blockquote({tokens:t}){return`<blockquote>
|
|
45
|
+
${this.parser.parse(t)}</blockquote>
|
|
46
|
+
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
|
|
47
|
+
`}hr(t){return`<hr>
|
|
48
|
+
`}list(t){let r=t.ordered,i=t.start,n="";for(let o=0;o<t.items.length;o++){let l=t.items[o];n+=this.listitem(l)}let a=r?"ol":"ul",s=r&&i!==1?' start="'+i+'"':"";return"<"+a+s+`>
|
|
49
|
+
`+n+"</"+a+`>
|
|
50
|
+
`}listitem(t){return`<li>${this.parser.parse(t.tokens)}</li>
|
|
51
|
+
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
52
|
+
`}table(t){let r="",i="";for(let a=0;a<t.header.length;a++)i+=this.tablecell(t.header[a]);r+=this.tablerow({text:i});let n="";for(let a=0;a<t.rows.length;a++){let s=t.rows[a];i="";for(let o=0;o<s.length;o++)i+=this.tablecell(s[o]);n+=this.tablerow({text:i})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
|
|
53
|
+
<thead>
|
|
54
|
+
`+r+`</thead>
|
|
55
|
+
`+n+`</table>
|
|
56
|
+
`}tablerow({text:t}){return`<tr>
|
|
57
|
+
${t}</tr>
|
|
58
|
+
`}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
|
|
59
|
+
`}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>${Me(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:i}){let n=this.parser.parseInline(i),a=jl(t);if(a===null)return n;t=a;let s='<a href="'+t+'"';return r&&(s+=' title="'+Me(r)+'"'),s+=">"+n+"</a>",s}image({href:t,title:r,text:i,tokens:n}){n&&(i=this.parser.parseInline(n,this.parser.textRenderer));let a=jl(t);if(a===null)return Me(i);t=a;let s=`<img src="${t}" alt="${i}"`;return r&&(s+=` title="${Me(r)}"`),s+=">",s}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Me(t.text)}},wo=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}},se=class ys{options;renderer;textRenderer;constructor(t){this.options=t||yr,this.options.renderer=this.options.renderer||new Rn,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new wo}static parse(t,r){return new ys(r).parse(t)}static parseInline(t,r){return new ys(r).parseInline(t)}parse(t){let r="";for(let i=0;i<t.length;i++){let n=t[i];if(this.options.extensions?.renderers?.[n.type]){let s=n,o=this.options.extensions.renderers[s.type].call({parser:this},s);if(o!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(s.type)){r+=o||"";continue}}let a=n;switch(a.type){case"space":{r+=this.renderer.space(a);break}case"hr":{r+=this.renderer.hr(a);break}case"heading":{r+=this.renderer.heading(a);break}case"code":{r+=this.renderer.code(a);break}case"table":{r+=this.renderer.table(a);break}case"blockquote":{r+=this.renderer.blockquote(a);break}case"list":{r+=this.renderer.list(a);break}case"checkbox":{r+=this.renderer.checkbox(a);break}case"html":{r+=this.renderer.html(a);break}case"def":{r+=this.renderer.def(a);break}case"paragraph":{r+=this.renderer.paragraph(a);break}case"text":{r+=this.renderer.text(a);break}default:{let s='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return r}parseInline(t,r=this.renderer){let i="";for(let n=0;n<t.length;n++){let a=t[n];if(this.options.extensions?.renderers?.[a.type]){let o=this.options.extensions.renderers[a.type].call({parser:this},a);if(o!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){i+=o||"";continue}}let s=a;switch(s.type){case"escape":{i+=r.text(s);break}case"html":{i+=r.html(s);break}case"link":{i+=r.link(s);break}case"image":{i+=r.image(s);break}case"checkbox":{i+=r.checkbox(s);break}case"strong":{i+=r.strong(s);break}case"em":{i+=r.em(s);break}case"codespan":{i+=r.codespan(s);break}case"br":{i+=r.br(s);break}case"del":{i+=r.del(s);break}case"text":{i+=r.text(s);break}default:{let o='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return i}},gi=class{options;block;constructor(t){this.options=t||yr}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(){return this.block?ae.lex:ae.lexInline}provideParser(){return this.block?se.parse:se.parseInline}},P0=class{defaults=fo();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=se;Renderer=Rn;TextRenderer=wo;Lexer=ae;Tokenizer=Fn;Hooks=gi;constructor(...t){this.use(...t)}walkTokens(t,r){let i=[];for(let n of t)switch(i=i.concat(r.call(this,n)),n.type){case"table":{let a=n;for(let s of a.header)i=i.concat(this.walkTokens(s.tokens,r));for(let s of a.rows)for(let o of s)i=i.concat(this.walkTokens(o.tokens,r));break}case"list":{let a=n;i=i.concat(this.walkTokens(a.items,r));break}default:{let a=n;this.defaults.extensions?.childTokens?.[a.type]?this.defaults.extensions.childTokens[a.type].forEach(s=>{let o=a[s].flat(1/0);i=i.concat(this.walkTokens(o,r))}):a.tokens&&(i=i.concat(this.walkTokens(a.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let n={...i};if(n.async=this.defaults.async||n.async||!1,i.extensions&&(i.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let s=r.renderers[a.name];s?r.renderers[a.name]=function(...o){let l=a.renderer.apply(this,o);return l===!1&&(l=s.apply(this,o)),l}:r.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=r[a.level];s?s.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),n.extensions=r),i.renderer){let a=this.defaults.renderer||new Rn(this.defaults);for(let s in i.renderer){if(!(s in a))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let o=s,l=i.renderer[o],c=a[o];a[o]=(...h)=>{let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u||""}}n.renderer=a}if(i.tokenizer){let a=this.defaults.tokenizer||new Fn(this.defaults);for(let s in i.tokenizer){if(!(s in a))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let o=s,l=i.tokenizer[o],c=a[o];a[o]=(...h)=>{let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u}}n.tokenizer=a}if(i.hooks){let a=this.defaults.hooks||new gi;for(let s in i.hooks){if(!(s in a))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let o=s,l=i.hooks[o],c=a[o];gi.passThroughHooks.has(s)?a[o]=h=>{if(this.defaults.async&&gi.passThroughHooksRespectAsync.has(s))return(async()=>{let f=await l.call(a,h);return c.call(a,f)})();let u=l.call(a,h);return c.call(a,u)}:a[o]=(...h)=>{if(this.defaults.async)return(async()=>{let f=await l.apply(a,h);return f===!1&&(f=await c.apply(a,h)),f})();let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u}}n.hooks=a}if(i.walkTokens){let a=this.defaults.walkTokens,s=i.walkTokens;n.walkTokens=function(o){let l=[];return l.push(s.call(this,o)),a&&(l=l.concat(a.call(this,o))),l}}this.defaults={...this.defaults,...n}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return ae.lex(t,r??this.defaults)}parser(t,r){return se.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let n={...i},a={...this.defaults,...n},s=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&n.async===!1)return s(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 r>"u"||r===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(a.hooks&&(a.hooks.options=a,a.hooks.block=t),a.async)return(async()=>{let o=a.hooks?await a.hooks.preprocess(r):r,l=await(a.hooks?await a.hooks.provideLexer():t?ae.lex:ae.lexInline)(o,a),c=a.hooks?await a.hooks.processAllTokens(l):l;a.walkTokens&&await Promise.all(this.walkTokens(c,a.walkTokens));let h=await(a.hooks?await a.hooks.provideParser():t?se.parse:se.parseInline)(c,a);return a.hooks?await a.hooks.postprocess(h):h})().catch(s);try{a.hooks&&(r=a.hooks.preprocess(r));let o=(a.hooks?a.hooks.provideLexer():t?ae.lex:ae.lexInline)(r,a);a.hooks&&(o=a.hooks.processAllTokens(o)),a.walkTokens&&this.walkTokens(o,a.walkTokens);let l=(a.hooks?a.hooks.provideParser():t?se.parse:se.parseInline)(o,a);return a.hooks&&(l=a.hooks.postprocess(l)),l}catch(o){return s(o)}}}onError(t,r){return i=>{if(i.message+=`
|
|
60
|
+
Please report this to https://github.com/markedjs/marked.`,t){let n="<p>An error occurred:</p><pre>"+Me(i.message+"",!0)+"</pre>";return r?Promise.resolve(n):n}if(r)return Promise.reject(i);throw i}}},hr=new P0;function lt(e,t){return hr.parse(e,t)}lt.options=lt.setOptions=function(e){return hr.setOptions(e),lt.defaults=hr.defaults,hh(lt.defaults),lt};lt.getDefaults=fo;lt.defaults=yr;lt.use=function(...e){return hr.use(...e),lt.defaults=hr.defaults,hh(lt.defaults),lt};lt.walkTokens=function(e,t){return hr.walkTokens(e,t)};lt.parseInline=hr.parseInline;lt.Parser=se;lt.parser=se.parse;lt.Renderer=Rn;lt.TextRenderer=wo;lt.Lexer=ae;lt.lexer=ae.lex;lt.Tokenizer=Fn;lt.Hooks=gi;lt.parse=lt;lt.options;lt.setOptions;lt.use;lt.walkTokens;lt.parseInline;se.parse;ae.lex;const{entries:wh,setPrototypeOf:Vl,isFrozen:N0,getPrototypeOf:z0,getOwnPropertyDescriptor:q0}=Object;let{freeze:Ht,seal:ee,create:xs}=Object,{apply:bs,construct:ks}=typeof Reflect<"u"&&Reflect;Ht||(Ht=function(t){return t});ee||(ee=function(t){return t});bs||(bs=function(t,r){for(var i=arguments.length,n=new Array(i>2?i-2:0),a=2;a<i;a++)n[a-2]=arguments[a];return t.apply(r,n)});ks||(ks=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];return new t(...i)});const sn=Yt(Array.prototype.forEach),W0=Yt(Array.prototype.lastIndexOf),Xl=Yt(Array.prototype.pop),ni=Yt(Array.prototype.push),H0=Yt(Array.prototype.splice),xn=Yt(String.prototype.toLowerCase),Xa=Yt(String.prototype.toString),Za=Yt(String.prototype.match),ai=Yt(String.prototype.replace),Y0=Yt(String.prototype.indexOf),j0=Yt(String.prototype.trim),ne=Yt(Object.prototype.hasOwnProperty),Pt=Yt(RegExp.prototype.test),si=U0(TypeError);function Yt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];return bs(e,t,i)}}function U0(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return ks(e,r)}}function rt(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:xn;Vl&&Vl(e,null);let i=t.length;for(;i--;){let n=t[i];if(typeof n=="string"){const a=r(n);a!==n&&(N0(t)||(t[i]=a),n=a)}e[n]=!0}return e}function G0(e){for(let t=0;t<e.length;t++)ne(e,t)||(e[t]=null);return e}function ye(e){const t=xs(null);for(const[r,i]of wh(e))ne(e,r)&&(Array.isArray(i)?t[r]=G0(i):i&&typeof i=="object"&&i.constructor===Object?t[r]=ye(i):t[r]=i);return t}function oi(e,t){for(;e!==null;){const i=q0(e,t);if(i){if(i.get)return Yt(i.get);if(typeof i.value=="function")return Yt(i.value)}e=z0(e)}function r(){return null}return r}const Zl=Ht(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Qa=Ht(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ka=Ht(["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"]),V0=Ht(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Ja=Ht(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),X0=Ht(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Ql=Ht(["#text"]),Kl=Ht(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),ts=Ht(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Jl=Ht(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),on=Ht(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Z0=ee(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Q0=ee(/<%[\w\W]*|[\w\W]*%>/gm),K0=ee(/\$\{[\w\W]*/gm),J0=ee(/^data-[\-\w.\u00B7-\uFFFF]+$/),ty=ee(/^aria-[\-\w]+$/),_h=ee(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ey=ee(/^(?:\w+script|data):/i),ry=ee(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ch=ee(/^html$/i),iy=ee(/^[a-z][.\w]*(-[.\w]+)+$/i);var tc=Object.freeze({__proto__:null,ARIA_ATTR:ty,ATTR_WHITESPACE:ry,CUSTOM_ELEMENT:iy,DATA_ATTR:J0,DOCTYPE_NAME:Ch,ERB_EXPR:Q0,IS_ALLOWED_URI:_h,IS_SCRIPT_OR_DATA:ey,MUSTACHE_EXPR:Z0,TMPLIT_EXPR:K0});const li={element:1,text:3,progressingInstruction:7,comment:8,document:9},ny=function(){return typeof window>"u"?null:window},ay=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const n="data-tt-policy-suffix";r&&r.hasAttribute(n)&&(i=r.getAttribute(n));const a="dompurify"+(i?"#"+i:"");try{return t.createPolicy(a,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},ec=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Sh(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ny();const t=X=>Sh(X);if(t.version="3.3.1",t.removed=[],!e||!e.document||e.document.nodeType!==li.document||!e.Element)return t.isSupported=!1,t;let{document:r}=e;const i=r,n=i.currentScript,{DocumentFragment:a,HTMLTemplateElement:s,Node:o,Element:l,NodeFilter:c,NamedNodeMap:h=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:u,DOMParser:f,trustedTypes:p}=e,g=l.prototype,m=oi(g,"cloneNode"),y=oi(g,"remove"),x=oi(g,"nextSibling"),b=oi(g,"childNodes"),k=oi(g,"parentNode");if(typeof s=="function"){const X=r.createElement("template");X.content&&X.content.ownerDocument&&(r=X.content.ownerDocument)}let C,_="";const{implementation:T,createNodeIterator:v,createDocumentFragment:B,getElementsByTagName:F}=r,{importNode:D}=i;let E=ec();t.isSupported=typeof wh=="function"&&typeof k=="function"&&T&&T.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:R,ERB_EXPR:M,TMPLIT_EXPR:L,DATA_ATTR:N,ARIA_ATTR:I,IS_SCRIPT_OR_DATA:j,ATTR_WHITESPACE:G,CUSTOM_ELEMENT:mt}=tc;let{IS_ALLOWED_URI:kt}=tc,ot=null;const st=rt({},[...Zl,...Qa,...Ka,...Ja,...Ql]);let et=null;const At=rt({},[...Kl,...ts,...Jl,...on]);let nt=Object.seal(xs(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Zt=null,Jt=null;const ve=Object.seal(xs(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Oa=!0,Qe=!0,wl=!1,_l=!0,kr=!1,Qi=!0,Ke=!1,Pa=!1,Na=!1,wr=!1,Ki=!1,Ji=!1,Cl=!0,Sl=!1;const Am="user-content-";let za=!0,ti=!1,_r={},de=null;const qa=rt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let vl=null;const Tl=rt({},["audio","video","img","source","image","track"]);let Wa=null;const Al=rt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),tn="http://www.w3.org/1998/Math/MathML",en="http://www.w3.org/2000/svg",Te="http://www.w3.org/1999/xhtml";let Cr=Te,Ha=!1,Ya=null;const Bm=rt({},[tn,en,Te],Xa);let rn=rt({},["mi","mo","mn","ms","mtext"]),nn=rt({},["annotation-xml"]);const Lm=rt({},["title","style","font","a","script"]);let ei=null;const Em=["application/xhtml+xml","text/html"],Mm="text/html";let wt=null,Sr=null;const $m=r.createElement("form"),Bl=function(w){return w instanceof RegExp||w instanceof Function},ja=function(){let w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Sr&&Sr===w)){if((!w||typeof w!="object")&&(w={}),w=ye(w),ei=Em.indexOf(w.PARSER_MEDIA_TYPE)===-1?Mm:w.PARSER_MEDIA_TYPE,wt=ei==="application/xhtml+xml"?Xa:xn,ot=ne(w,"ALLOWED_TAGS")?rt({},w.ALLOWED_TAGS,wt):st,et=ne(w,"ALLOWED_ATTR")?rt({},w.ALLOWED_ATTR,wt):At,Ya=ne(w,"ALLOWED_NAMESPACES")?rt({},w.ALLOWED_NAMESPACES,Xa):Bm,Wa=ne(w,"ADD_URI_SAFE_ATTR")?rt(ye(Al),w.ADD_URI_SAFE_ATTR,wt):Al,vl=ne(w,"ADD_DATA_URI_TAGS")?rt(ye(Tl),w.ADD_DATA_URI_TAGS,wt):Tl,de=ne(w,"FORBID_CONTENTS")?rt({},w.FORBID_CONTENTS,wt):qa,Zt=ne(w,"FORBID_TAGS")?rt({},w.FORBID_TAGS,wt):ye({}),Jt=ne(w,"FORBID_ATTR")?rt({},w.FORBID_ATTR,wt):ye({}),_r=ne(w,"USE_PROFILES")?w.USE_PROFILES:!1,Oa=w.ALLOW_ARIA_ATTR!==!1,Qe=w.ALLOW_DATA_ATTR!==!1,wl=w.ALLOW_UNKNOWN_PROTOCOLS||!1,_l=w.ALLOW_SELF_CLOSE_IN_ATTR!==!1,kr=w.SAFE_FOR_TEMPLATES||!1,Qi=w.SAFE_FOR_XML!==!1,Ke=w.WHOLE_DOCUMENT||!1,wr=w.RETURN_DOM||!1,Ki=w.RETURN_DOM_FRAGMENT||!1,Ji=w.RETURN_TRUSTED_TYPE||!1,Na=w.FORCE_BODY||!1,Cl=w.SANITIZE_DOM!==!1,Sl=w.SANITIZE_NAMED_PROPS||!1,za=w.KEEP_CONTENT!==!1,ti=w.IN_PLACE||!1,kt=w.ALLOWED_URI_REGEXP||_h,Cr=w.NAMESPACE||Te,rn=w.MATHML_TEXT_INTEGRATION_POINTS||rn,nn=w.HTML_INTEGRATION_POINTS||nn,nt=w.CUSTOM_ELEMENT_HANDLING||{},w.CUSTOM_ELEMENT_HANDLING&&Bl(w.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(nt.tagNameCheck=w.CUSTOM_ELEMENT_HANDLING.tagNameCheck),w.CUSTOM_ELEMENT_HANDLING&&Bl(w.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(nt.attributeNameCheck=w.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),w.CUSTOM_ELEMENT_HANDLING&&typeof w.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(nt.allowCustomizedBuiltInElements=w.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),kr&&(Qe=!1),Ki&&(wr=!0),_r&&(ot=rt({},Ql),et=[],_r.html===!0&&(rt(ot,Zl),rt(et,Kl)),_r.svg===!0&&(rt(ot,Qa),rt(et,ts),rt(et,on)),_r.svgFilters===!0&&(rt(ot,Ka),rt(et,ts),rt(et,on)),_r.mathMl===!0&&(rt(ot,Ja),rt(et,Jl),rt(et,on))),w.ADD_TAGS&&(typeof w.ADD_TAGS=="function"?ve.tagCheck=w.ADD_TAGS:(ot===st&&(ot=ye(ot)),rt(ot,w.ADD_TAGS,wt))),w.ADD_ATTR&&(typeof w.ADD_ATTR=="function"?ve.attributeCheck=w.ADD_ATTR:(et===At&&(et=ye(et)),rt(et,w.ADD_ATTR,wt))),w.ADD_URI_SAFE_ATTR&&rt(Wa,w.ADD_URI_SAFE_ATTR,wt),w.FORBID_CONTENTS&&(de===qa&&(de=ye(de)),rt(de,w.FORBID_CONTENTS,wt)),w.ADD_FORBID_CONTENTS&&(de===qa&&(de=ye(de)),rt(de,w.ADD_FORBID_CONTENTS,wt)),za&&(ot["#text"]=!0),Ke&&rt(ot,["html","head","body"]),ot.table&&(rt(ot,["tbody"]),delete Zt.tbody),w.TRUSTED_TYPES_POLICY){if(typeof w.TRUSTED_TYPES_POLICY.createHTML!="function")throw si('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof w.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw si('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');C=w.TRUSTED_TYPES_POLICY,_=C.createHTML("")}else C===void 0&&(C=ay(p,n)),C!==null&&typeof _=="string"&&(_=C.createHTML(""));Ht&&Ht(w),Sr=w}},Ll=rt({},[...Qa,...Ka,...V0]),El=rt({},[...Ja,...X0]),Fm=function(w){let $=k(w);(!$||!$.tagName)&&($={namespaceURI:Cr,tagName:"template"});const U=xn(w.tagName),dt=xn($.tagName);return Ya[w.namespaceURI]?w.namespaceURI===en?$.namespaceURI===Te?U==="svg":$.namespaceURI===tn?U==="svg"&&(dt==="annotation-xml"||rn[dt]):!!Ll[U]:w.namespaceURI===tn?$.namespaceURI===Te?U==="math":$.namespaceURI===en?U==="math"&&nn[dt]:!!El[U]:w.namespaceURI===Te?$.namespaceURI===en&&!nn[dt]||$.namespaceURI===tn&&!rn[dt]?!1:!El[U]&&(Lm[U]||!Ll[U]):!!(ei==="application/xhtml+xml"&&Ya[w.namespaceURI]):!1},ge=function(w){ni(t.removed,{element:w});try{k(w).removeChild(w)}catch{y(w)}},Je=function(w,$){try{ni(t.removed,{attribute:$.getAttributeNode(w),from:$})}catch{ni(t.removed,{attribute:null,from:$})}if($.removeAttribute(w),w==="is")if(wr||Ki)try{ge($)}catch{}else try{$.setAttribute(w,"")}catch{}},Ml=function(w){let $=null,U=null;if(Na)w="<remove></remove>"+w;else{const xt=Za(w,/^[\r\n\t ]+/);U=xt&&xt[0]}ei==="application/xhtml+xml"&&Cr===Te&&(w='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+w+"</body></html>");const dt=C?C.createHTML(w):w;if(Cr===Te)try{$=new f().parseFromString(dt,ei)}catch{}if(!$||!$.documentElement){$=T.createDocument(Cr,"template",null);try{$.documentElement.innerHTML=Ha?_:dt}catch{}}const Mt=$.body||$.documentElement;return w&&U&&Mt.insertBefore(r.createTextNode(U),Mt.childNodes[0]||null),Cr===Te?F.call($,Ke?"html":"body")[0]:Ke?$.documentElement:Mt},$l=function(w){return v.call(w.ownerDocument||w,w,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Ua=function(w){return w instanceof u&&(typeof w.nodeName!="string"||typeof w.textContent!="string"||typeof w.removeChild!="function"||!(w.attributes instanceof h)||typeof w.removeAttribute!="function"||typeof w.setAttribute!="function"||typeof w.namespaceURI!="string"||typeof w.insertBefore!="function"||typeof w.hasChildNodes!="function")},Fl=function(w){return typeof o=="function"&&w instanceof o};function Ae(X,w,$){sn(X,U=>{U.call(t,w,$,Sr)})}const Rl=function(w){let $=null;if(Ae(E.beforeSanitizeElements,w,null),Ua(w))return ge(w),!0;const U=wt(w.nodeName);if(Ae(E.uponSanitizeElement,w,{tagName:U,allowedTags:ot}),Qi&&w.hasChildNodes()&&!Fl(w.firstElementChild)&&Pt(/<[/\w!]/g,w.innerHTML)&&Pt(/<[/\w!]/g,w.textContent)||w.nodeType===li.progressingInstruction||Qi&&w.nodeType===li.comment&&Pt(/<[/\w]/g,w.data))return ge(w),!0;if(!(ve.tagCheck instanceof Function&&ve.tagCheck(U))&&(!ot[U]||Zt[U])){if(!Zt[U]&&Il(U)&&(nt.tagNameCheck instanceof RegExp&&Pt(nt.tagNameCheck,U)||nt.tagNameCheck instanceof Function&&nt.tagNameCheck(U)))return!1;if(za&&!de[U]){const dt=k(w)||w.parentNode,Mt=b(w)||w.childNodes;if(Mt&&dt){const xt=Mt.length;for(let jt=xt-1;jt>=0;--jt){const Be=m(Mt[jt],!0);Be.__removalCount=(w.__removalCount||0)+1,dt.insertBefore(Be,x(w))}}}return ge(w),!0}return w instanceof l&&!Fm(w)||(U==="noscript"||U==="noembed"||U==="noframes")&&Pt(/<\/no(script|embed|frames)/i,w.innerHTML)?(ge(w),!0):(kr&&w.nodeType===li.text&&($=w.textContent,sn([R,M,L],dt=>{$=ai($,dt," ")}),w.textContent!==$&&(ni(t.removed,{element:w.cloneNode()}),w.textContent=$)),Ae(E.afterSanitizeElements,w,null),!1)},Dl=function(w,$,U){if(Cl&&($==="id"||$==="name")&&(U in r||U in $m))return!1;if(!(Qe&&!Jt[$]&&Pt(N,$))){if(!(Oa&&Pt(I,$))){if(!(ve.attributeCheck instanceof Function&&ve.attributeCheck($,w))){if(!et[$]||Jt[$]){if(!(Il(w)&&(nt.tagNameCheck instanceof RegExp&&Pt(nt.tagNameCheck,w)||nt.tagNameCheck instanceof Function&&nt.tagNameCheck(w))&&(nt.attributeNameCheck instanceof RegExp&&Pt(nt.attributeNameCheck,$)||nt.attributeNameCheck instanceof Function&&nt.attributeNameCheck($,w))||$==="is"&&nt.allowCustomizedBuiltInElements&&(nt.tagNameCheck instanceof RegExp&&Pt(nt.tagNameCheck,U)||nt.tagNameCheck instanceof Function&&nt.tagNameCheck(U))))return!1}else if(!Wa[$]){if(!Pt(kt,ai(U,G,""))){if(!(($==="src"||$==="xlink:href"||$==="href")&&w!=="script"&&Y0(U,"data:")===0&&vl[w])){if(!(wl&&!Pt(j,ai(U,G,"")))){if(U)return!1}}}}}}}return!0},Il=function(w){return w!=="annotation-xml"&&Za(w,mt)},Ol=function(w){Ae(E.beforeSanitizeAttributes,w,null);const{attributes:$}=w;if(!$||Ua(w))return;const U={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:et,forceKeepAttr:void 0};let dt=$.length;for(;dt--;){const Mt=$[dt],{name:xt,namespaceURI:jt,value:Be}=Mt,vr=wt(xt),Ga=Be;let Bt=xt==="value"?Ga:j0(Ga);if(U.attrName=vr,U.attrValue=Bt,U.keepAttr=!0,U.forceKeepAttr=void 0,Ae(E.uponSanitizeAttribute,w,U),Bt=U.attrValue,Sl&&(vr==="id"||vr==="name")&&(Je(xt,w),Bt=Am+Bt),Qi&&Pt(/((--!?|])>)|<\/(style|title|textarea)/i,Bt)){Je(xt,w);continue}if(vr==="attributename"&&Za(Bt,"href")){Je(xt,w);continue}if(U.forceKeepAttr)continue;if(!U.keepAttr){Je(xt,w);continue}if(!_l&&Pt(/\/>/i,Bt)){Je(xt,w);continue}kr&&sn([R,M,L],Nl=>{Bt=ai(Bt,Nl," ")});const Pl=wt(w.nodeName);if(!Dl(Pl,vr,Bt)){Je(xt,w);continue}if(C&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!jt)switch(p.getAttributeType(Pl,vr)){case"TrustedHTML":{Bt=C.createHTML(Bt);break}case"TrustedScriptURL":{Bt=C.createScriptURL(Bt);break}}if(Bt!==Ga)try{jt?w.setAttributeNS(jt,xt,Bt):w.setAttribute(xt,Bt),Ua(w)?ge(w):Xl(t.removed)}catch{Je(xt,w)}}Ae(E.afterSanitizeAttributes,w,null)},Rm=function X(w){let $=null;const U=$l(w);for(Ae(E.beforeSanitizeShadowDOM,w,null);$=U.nextNode();)Ae(E.uponSanitizeShadowNode,$,null),Rl($),Ol($),$.content instanceof a&&X($.content);Ae(E.afterSanitizeShadowDOM,w,null)};return t.sanitize=function(X){let w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},$=null,U=null,dt=null,Mt=null;if(Ha=!X,Ha&&(X="<!-->"),typeof X!="string"&&!Fl(X))if(typeof X.toString=="function"){if(X=X.toString(),typeof X!="string")throw si("dirty is not a string, aborting")}else throw si("toString is not a function");if(!t.isSupported)return X;if(Pa||ja(w),t.removed=[],typeof X=="string"&&(ti=!1),ti){if(X.nodeName){const Be=wt(X.nodeName);if(!ot[Be]||Zt[Be])throw si("root node is forbidden and cannot be sanitized in-place")}}else if(X instanceof o)$=Ml("<!---->"),U=$.ownerDocument.importNode(X,!0),U.nodeType===li.element&&U.nodeName==="BODY"||U.nodeName==="HTML"?$=U:$.appendChild(U);else{if(!wr&&!kr&&!Ke&&X.indexOf("<")===-1)return C&&Ji?C.createHTML(X):X;if($=Ml(X),!$)return wr?null:Ji?_:""}$&&Na&&ge($.firstChild);const xt=$l(ti?X:$);for(;dt=xt.nextNode();)Rl(dt),Ol(dt),dt.content instanceof a&&Rm(dt.content);if(ti)return X;if(wr){if(Ki)for(Mt=B.call($.ownerDocument);$.firstChild;)Mt.appendChild($.firstChild);else Mt=$;return(et.shadowroot||et.shadowrootmode)&&(Mt=D.call(i,Mt,!0)),Mt}let jt=Ke?$.outerHTML:$.innerHTML;return Ke&&ot["!doctype"]&&$.ownerDocument&&$.ownerDocument.doctype&&$.ownerDocument.doctype.name&&Pt(Ch,$.ownerDocument.doctype.name)&&(jt="<!DOCTYPE "+$.ownerDocument.doctype.name+`>
|
|
61
|
+
`+jt),kr&&sn([R,M,L],Be=>{jt=ai(jt,Be," ")}),C&&Ji?C.createHTML(jt):jt},t.setConfig=function(){let X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ja(X),Pa=!0},t.clearConfig=function(){Sr=null,Pa=!1},t.isValidAttribute=function(X,w,$){Sr||ja({});const U=wt(X),dt=wt(w);return Dl(U,dt,$)},t.addHook=function(X,w){typeof w=="function"&&ni(E[X],w)},t.removeHook=function(X,w){if(w!==void 0){const $=W0(E[X],w);return $===-1?void 0:H0(E[X],$,1)[0]}return Xl(E[X])},t.removeHooks=function(X){E[X]=[]},t.removeAllHooks=function(){E=ec()},t}var He=Sh(),rc={name:"mermaid",version:"11.12.2",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pnpm -w dev","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts","docs:verify":"pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify","docs:pre:vitepress":"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts","docs:build:vitepress":"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing","docs:dev":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:dev:docker":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev:docker" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell "src/docs/**/*.md"',"docs:release-version":"tsx scripts/update-release-version.mts","docs:verify-version":"tsx scripts/update-release-version.mts --verify","types:build-config":"tsx scripts/create-types-from-json-schema.mts","types:verify-config":"tsx scripts/create-types-from-json-schema.mts --verify",checkCircle:"npx madge --circular ./src",prepublishOnly:"pnpm docs:verify-version"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^7.1.1","@iconify/utils":"^3.0.1","@mermaid-js/parser":"workspace:^","@types/d3":"^7.4.3",cytoscape:"^3.29.3","cytoscape-cose-bilkent":"^4.1.0","cytoscape-fcose":"^2.2.0",d3:"^7.9.0","d3-sankey":"^0.12.3","dagre-d3-es":"7.0.13",dayjs:"^1.11.18",dompurify:"^3.2.5",katex:"^0.16.22",khroma:"^2.1.0","lodash-es":"^4.17.21",marked:"^16.2.1",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.5","@iconify/types":"^2.0.0","@types/cytoscape":"^3.21.9","@types/cytoscape-fcose":"^2.2.4","@types/d3-sankey":"^0.12.4","@types/d3-scale":"^4.0.9","@types/d3-scale-chromatic":"^3.1.0","@types/d3-selection":"^3.0.11","@types/d3-shape":"^3.1.7","@types/jsdom":"^21.1.7","@types/katex":"^0.16.7","@types/lodash-es":"^4.17.12","@types/micromatch":"^4.0.9","@types/stylis":"^4.2.7","@types/uuid":"^10.0.0",ajv:"^8.17.1",canvas:"^3.1.2",chokidar:"3.6.0",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.1.0",jison:"^0.4.18","js-base64":"^3.7.8",jsdom:"^26.1.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.3",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.13","type-fest":"^4.35.0",typedoc:"^0.28.12","typedoc-plugin-markdown":"^4.8.1",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.6.4","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}},vh=Object.defineProperty,d=(e,t)=>vh(e,"name",{value:t,configurable:!0}),sy=(e,t)=>{for(var r in t)vh(e,r,{get:t[r],enumerable:!0})},Le={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},A={trace:d((...e)=>{},"trace"),debug:d((...e)=>{},"debug"),info:d((...e)=>{},"info"),warn:d((...e)=>{},"warn"),error:d((...e)=>{},"error"),fatal:d((...e)=>{},"fatal")},_o=d(function(e="fatal"){let t=Le.fatal;typeof e=="string"?e.toLowerCase()in Le&&(t=Le[e]):typeof e=="number"&&(t=e),A.trace=()=>{},A.debug=()=>{},A.info=()=>{},A.warn=()=>{},A.error=()=>{},A.fatal=()=>{},t<=Le.fatal&&(A.fatal=console.error?console.error.bind(console,te("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",te("FATAL"))),t<=Le.error&&(A.error=console.error?console.error.bind(console,te("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",te("ERROR"))),t<=Le.warn&&(A.warn=console.warn?console.warn.bind(console,te("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",te("WARN"))),t<=Le.info&&(A.info=console.info?console.info.bind(console,te("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",te("INFO"))),t<=Le.debug&&(A.debug=console.debug?console.debug.bind(console,te("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",te("DEBUG"))),t<=Le.trace&&(A.trace=console.debug?console.debug.bind(console,te("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",te("TRACE")))},"setLogLevel"),te=d(e=>`%c${Hm().format("ss.SSS")} : ${e} : `,"format");const bn={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const n=r<.5?r*(1+t):r+t-r*t,a=2*r-n;switch(i){case"r":return bn.hue2rgb(a,n,e+1/3)*255;case"g":return bn.hue2rgb(a,n,e)*255;case"b":return bn.hue2rgb(a,n,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const n=Math.max(e,t,r),a=Math.min(e,t,r),s=(n+a)/2;if(i==="l")return s*100;if(n===a)return 0;const o=n-a,l=s>.5?o/(2-n-a):o/(n+a);if(i==="s")return l*100;switch(n){case e:return((t-r)/o+(t<r?6:0))*60;case t:return((r-e)/o+2)*60;case r:return((e-t)/o+4)*60;default:return-1}}},oy={clamp:(e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},ly={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},tt={channel:bn,lang:oy,unit:ly},Ne={};for(let e=0;e<=255;e++)Ne[e]=tt.unit.dec2hex(e);const $t={ALL:0,RGB:1,HSL:2};class cy{constructor(){this.type=$t.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=$t.ALL}is(t){return this.type===t}}class hy{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new cy}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=$t.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:n}=t;r===void 0&&(t.h=tt.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=tt.channel.rgb2hsl(t,"s")),n===void 0&&(t.l=tt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:n}=t;r===void 0&&(t.r=tt.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=tt.channel.hsl2rgb(t,"g")),n===void 0&&(t.b=tt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is($t.HSL)&&r!==void 0?r:(this._ensureHSL(),tt.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is($t.HSL)&&r!==void 0?r:(this._ensureHSL(),tt.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is($t.HSL)&&r!==void 0?r:(this._ensureHSL(),tt.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is($t.RGB)&&r!==void 0?r:(this._ensureRGB(),tt.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is($t.RGB)&&r!==void 0?r:(this._ensureRGB(),tt.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is($t.RGB)&&r!==void 0?r:(this._ensureRGB(),tt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set($t.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set($t.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set($t.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set($t.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set($t.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set($t.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const ga=new hy({r:0,g:0,b:0,a:0},"transparent"),Mr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Mr.re);if(!t)return;const r=t[1],i=parseInt(r,16),n=r.length,a=n%4===0,s=n>4,o=s?1:17,l=s?8:4,c=a?0:-1,h=s?255:15;return ga.set({r:(i>>l*(c+3)&h)*o,g:(i>>l*(c+2)&h)*o,b:(i>>l*(c+1)&h)*o,a:a?(i&h)*o/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:n}=e;return n<1?`#${Ne[Math.round(t)]}${Ne[Math.round(r)]}${Ne[Math.round(i)]}${Ne[Math.round(n*255)]}`:`#${Ne[Math.round(t)]}${Ne[Math.round(r)]}${Ne[Math.round(i)]}`}},ir={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(ir.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return tt.channel.clamp.h(parseFloat(r)*.9);case"rad":return tt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return tt.channel.clamp.h(parseFloat(r)*360)}}return tt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(ir.re);if(!r)return;const[,i,n,a,s,o]=r;return ga.set({h:ir._hue2deg(i),s:tt.channel.clamp.s(parseFloat(n)),l:tt.channel.clamp.l(parseFloat(a)),a:s?tt.channel.clamp.a(o?parseFloat(s)/100:parseFloat(s)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:n}=e;return n<1?`hsla(${tt.lang.round(t)}, ${tt.lang.round(r)}%, ${tt.lang.round(i)}%, ${n})`:`hsl(${tt.lang.round(t)}, ${tt.lang.round(r)}%, ${tt.lang.round(i)}%)`}},Ti={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=Ti.colors[e];if(t)return Mr.parse(t)},stringify:e=>{const t=Mr.stringify(e);for(const r in Ti.colors)if(Ti.colors[r]===t)return r}},mi={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(mi.re);if(!r)return;const[,i,n,a,s,o,l,c,h]=r;return ga.set({r:tt.channel.clamp.r(n?parseFloat(i)*2.55:parseFloat(i)),g:tt.channel.clamp.g(s?parseFloat(a)*2.55:parseFloat(a)),b:tt.channel.clamp.b(l?parseFloat(o)*2.55:parseFloat(o)),a:c?tt.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:n}=e;return n<1?`rgba(${tt.lang.round(t)}, ${tt.lang.round(r)}, ${tt.lang.round(i)}, ${tt.lang.round(n)})`:`rgb(${tt.lang.round(t)}, ${tt.lang.round(r)}, ${tt.lang.round(i)})`}},_e={format:{keyword:Ti,hex:Mr,rgb:mi,rgba:mi,hsl:ir,hsla:ir},parse:e=>{if(typeof e!="string")return e;const t=Mr.parse(e)||mi.parse(e)||ir.parse(e)||Ti.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is($t.HSL)||e.data.r===void 0?ir.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?mi.stringify(e):Mr.stringify(e)},Th=(e,t)=>{const r=_e.parse(e);for(const i in t)r[i]=tt.channel.clamp[i](t[i]);return _e.stringify(r)},Ai=(e,t,r=0,i=1)=>{if(typeof e!="number")return Th(e,{a:t});const n=ga.set({r:tt.channel.clamp.r(e),g:tt.channel.clamp.g(t),b:tt.channel.clamp.b(r),a:tt.channel.clamp.a(i)});return _e.stringify(n)},uy=e=>{const{r:t,g:r,b:i}=_e.parse(e),n=.2126*tt.channel.toLinear(t)+.7152*tt.channel.toLinear(r)+.0722*tt.channel.toLinear(i);return tt.lang.round(n)},fy=e=>uy(e)>=.5,Hi=e=>!fy(e),Ah=(e,t,r)=>{const i=_e.parse(e),n=i[t],a=tt.channel.clamp[t](n+r);return n!==a&&(i[t]=a),_e.stringify(i)},z=(e,t)=>Ah(e,"l",t),Z=(e,t)=>Ah(e,"l",-t),S=(e,t)=>{const r=_e.parse(e),i={};for(const n in t)t[n]&&(i[n]=r[n]+t[n]);return Th(e,i)},py=(e,t,r=50)=>{const{r:i,g:n,b:a,a:s}=_e.parse(e),{r:o,g:l,b:c,a:h}=_e.parse(t),u=r/100,f=u*2-1,p=s-h,m=((f*p===-1?f:(f+p)/(1+f*p))+1)/2,y=1-m,x=i*m+o*y,b=n*m+l*y,k=a*m+c*y,C=s*u+h*(1-u);return Ai(x,b,k,C)},O=(e,t=100)=>{const r=_e.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,py(r,e,t)};var Bh=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Bi=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,dy=/\s*%%.*\n/gm,Rr,Lh=(Rr=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},d(Rr,"UnknownDiagramError"),Rr),ur={},Co=d(function(e,t){e=e.replace(Bh,"").replace(Bi,"").replace(dy,`
|
|
62
|
+
`);for(const[r,{detector:i}]of Object.entries(ur))if(i(e,t))return r;throw new Lh(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),ws=d((...e)=>{for(const{id:t,detector:r,loader:i}of e)Eh(t,r,i)},"registerLazyLoadedDiagrams"),Eh=d((e,t,r)=>{ur[e]&&A.warn(`Detector with key ${e} already exists. Overwriting.`),ur[e]={detector:t,loader:r},A.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),gy=d(e=>ur[e].loader,"getDiagramLoader"),_s=d((e,t,{depth:r=2,clobber:i=!1}={})=>{const n={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(a=>_s(e,a,n)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(a=>{e.includes(a)||e.push(a)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(a=>{typeof t[a]=="object"&&(e[a]===void 0||typeof e[a]=="object")?(e[a]===void 0&&(e[a]=Array.isArray(t[a])?[]:{}),e[a]=_s(e[a],t[a],{depth:r-1,clobber:i})):(i||typeof e[a]!="object"&&typeof t[a]!="object")&&(e[a]=t[a])}),e)},"assignWithDepth"),Ct=_s,ma="#ffffff",ya="#f2f2f2",zt=d((e,t)=>t?S(e,{s:-40,l:10}):S(e,{s:-40,l:-10}),"mkBorder"),Dr,my=(Dr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||S(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||S(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||zt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||zt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||zt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||O(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||O(this.tertiaryColor),this.lineColor=this.lineColor||O(this.background),this.arrowheadColor=this.arrowheadColor||O(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?Z(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||Z(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||O(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||z(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||Z(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||Z(this.mainBkg,10)):(this.rowOdd=this.rowOdd||z(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||z(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||S(this.primaryColor,{h:30}),this.cScale4=this.cScale4||S(this.primaryColor,{h:60}),this.cScale5=this.cScale5||S(this.primaryColor,{h:90}),this.cScale6=this.cScale6||S(this.primaryColor,{h:120}),this.cScale7=this.cScale7||S(this.primaryColor,{h:150}),this.cScale8=this.cScale8||S(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||S(this.primaryColor,{h:270}),this.cScale10=this.cScale10||S(this.primaryColor,{h:300}),this.cScale11=this.cScale11||S(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=Z(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=Z(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||O(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||z(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||Z(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||S(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||S(this.mainBkg,{h:180,s:-15,l:t*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||S(this.primaryColor,{h:64}),this.fillType3=this.fillType3||S(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||S(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||S(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||S(this.primaryColor,{h:128}),this.fillType7=this.fillType7||S(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||S(this.primaryColor,{l:-10}),this.pie5=this.pie5||S(this.secondaryColor,{l:-10}),this.pie6=this.pie6||S(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||S(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||S(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||S(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||S(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||S(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||S(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||S(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||S(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||S(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||S(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||S(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||S(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Hi(this.quadrant1Fill)?z(this.quadrant1Fill):Z(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?Z(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||S(this.primaryColor,{h:-30}),this.git4=this.git4||S(this.primaryColor,{h:-60}),this.git5=this.git5||S(this.primaryColor,{h:-90}),this.git6=this.git6||S(this.primaryColor,{h:60}),this.git7=this.git7||S(this.primaryColor,{h:120}),this.darkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=Z(this.git0,25),this.git1=Z(this.git1,25),this.git2=Z(this.git2,25),this.git3=Z(this.git3,25),this.git4=Z(this.git4,25),this.git5=Z(this.git5,25),this.git6=Z(this.git6,25),this.git7=Z(this.git7,25)),this.gitInv0=this.gitInv0||O(this.git0),this.gitInv1=this.gitInv1||O(this.git1),this.gitInv2=this.gitInv2||O(this.git2),this.gitInv3=this.gitInv3||O(this.git3),this.gitInv4=this.gitInv4||O(this.git4),this.gitInv5=this.gitInv5||O(this.git5),this.gitInv6=this.gitInv6||O(this.git6),this.gitInv7=this.gitInv7||O(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||ma,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ya}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},d(Dr,"Theme"),Dr),yy=d(e=>{const t=new my;return t.calculate(e),t},"getThemeVariables"),Ir,xy=(Ir=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=z(this.primaryColor,16),this.tertiaryColor=S(this.primaryColor,{h:-160}),this.primaryBorderColor=O(this.background),this.secondaryBorderColor=zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=zt(this.tertiaryColor,this.darkMode),this.primaryTextColor=O(this.primaryColor),this.secondaryTextColor=O(this.secondaryColor),this.tertiaryTextColor=O(this.tertiaryColor),this.lineColor=O(this.background),this.textColor=O(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=z(O("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Ai(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=Z("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=Z(this.sectionBkgColor,10),this.taskBorderColor=Ai(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Ai(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||z(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||Z(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=z(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=z(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=z(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=S(this.primaryColor,{h:64}),this.fillType3=S(this.secondaryColor,{h:64}),this.fillType4=S(this.primaryColor,{h:-64}),this.fillType5=S(this.secondaryColor,{h:-64}),this.fillType6=S(this.primaryColor,{h:128}),this.fillType7=S(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||S(this.primaryColor,{h:30}),this.cScale4=this.cScale4||S(this.primaryColor,{h:60}),this.cScale5=this.cScale5||S(this.primaryColor,{h:90}),this.cScale6=this.cScale6||S(this.primaryColor,{h:120}),this.cScale7=this.cScale7||S(this.primaryColor,{h:150}),this.cScale8=this.cScale8||S(this.primaryColor,{h:210}),this.cScale9=this.cScale9||S(this.primaryColor,{h:270}),this.cScale10=this.cScale10||S(this.primaryColor,{h:300}),this.cScale11=this.cScale11||S(this.primaryColor,{h:330});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||O(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScalePeer"+t]=this["cScalePeer"+t]||z(this["cScale"+t],10);for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||S(this.mainBkg,{h:30,s:-30,l:-(-10+t*4)}),this["surfacePeer"+t]=this["surfacePeer"+t]||S(this.mainBkg,{h:30,s:-30,l:-(-7+t*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||S(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||S(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||S(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||S(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||S(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||S(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Hi(this.quadrant1Fill)?z(this.quadrant1Fill):Z(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?Z(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=z(this.secondaryColor,20),this.git1=z(this.pie2||this.secondaryColor,20),this.git2=z(this.pie3||this.tertiaryColor,20),this.git3=z(this.pie4||S(this.primaryColor,{h:-30}),20),this.git4=z(this.pie5||S(this.primaryColor,{h:-60}),20),this.git5=z(this.pie6||S(this.primaryColor,{h:-90}),10),this.git6=z(this.pie7||S(this.primaryColor,{h:60}),10),this.git7=z(this.pie8||S(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||O(this.git0),this.gitInv1=this.gitInv1||O(this.git1),this.gitInv2=this.gitInv2||O(this.git2),this.gitInv3=this.gitInv3||O(this.git3),this.gitInv4=this.gitInv4||O(this.git4),this.gitInv5=this.gitInv5||O(this.git5),this.gitInv6=this.gitInv6||O(this.git6),this.gitInv7=this.gitInv7||O(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||O(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||O(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||z(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||z(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},d(Ir,"Theme"),Ir),by=d(e=>{const t=new xy;return t.calculate(e),t},"getThemeVariables"),Or,ky=(Or=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=S(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=S(this.primaryColor,{h:-160}),this.primaryBorderColor=zt(this.primaryColor,this.darkMode),this.secondaryBorderColor=zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=zt(this.tertiaryColor,this.darkMode),this.primaryTextColor=O(this.primaryColor),this.secondaryTextColor=O(this.secondaryColor),this.tertiaryTextColor=O(this.tertiaryColor),this.lineColor=O(this.background),this.textColor=O(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=Ai(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||S(this.primaryColor,{h:30}),this.cScale4=this.cScale4||S(this.primaryColor,{h:60}),this.cScale5=this.cScale5||S(this.primaryColor,{h:90}),this.cScale6=this.cScale6||S(this.primaryColor,{h:120}),this.cScale7=this.cScale7||S(this.primaryColor,{h:150}),this.cScale8=this.cScale8||S(this.primaryColor,{h:210}),this.cScale9=this.cScale9||S(this.primaryColor,{h:270}),this.cScale10=this.cScale10||S(this.primaryColor,{h:300}),this.cScale11=this.cScale11||S(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||Z(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Z(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=Z(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||Z(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||S(this["cScale"+t],{h:180});for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||S(this.mainBkg,{h:30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||S(this.mainBkg,{h:30,l:-(7+t*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||O(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||O(this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=z(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||z(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||z(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=S(this.primaryColor,{h:64}),this.fillType3=S(this.secondaryColor,{h:64}),this.fillType4=S(this.primaryColor,{h:-64}),this.fillType5=S(this.secondaryColor,{h:-64}),this.fillType6=S(this.primaryColor,{h:128}),this.fillType7=S(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||S(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||S(this.primaryColor,{l:-10}),this.pie5=this.pie5||S(this.secondaryColor,{l:-30}),this.pie6=this.pie6||S(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||S(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||S(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||S(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||S(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||S(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||S(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||S(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||S(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||S(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||S(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||S(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||S(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Hi(this.quadrant1Fill)?z(this.quadrant1Fill):Z(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||S(this.primaryColor,{h:-30}),this.git4=this.git4||S(this.primaryColor,{h:-60}),this.git5=this.git5||S(this.primaryColor,{h:-90}),this.git6=this.git6||S(this.primaryColor,{h:60}),this.git7=this.git7||S(this.primaryColor,{h:120}),this.darkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=Z(this.git0,25),this.git1=Z(this.git1,25),this.git2=Z(this.git2,25),this.git3=Z(this.git3,25),this.git4=Z(this.git4,25),this.git5=Z(this.git5,25),this.git6=Z(this.git6,25),this.git7=Z(this.git7,25)),this.gitInv0=this.gitInv0||Z(O(this.git0),25),this.gitInv1=this.gitInv1||O(this.git1),this.gitInv2=this.gitInv2||O(this.git2),this.gitInv3=this.gitInv3||O(this.git3),this.gitInv4=this.gitInv4||O(this.git4),this.gitInv5=this.gitInv5||O(this.git5),this.gitInv6=this.gitInv6||O(this.git6),this.gitInv7=this.gitInv7||O(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||O(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||O(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||ma,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ya}calculate(t){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},d(Or,"Theme"),Or),wy=d(e=>{const t=new ky;return t.calculate(e),t},"getThemeVariables"),Pr,_y=(Pr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=z("#cde498",10),this.primaryBorderColor=zt(this.primaryColor,this.darkMode),this.secondaryBorderColor=zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=zt(this.tertiaryColor,this.darkMode),this.primaryTextColor=O(this.primaryColor),this.secondaryTextColor=O(this.secondaryColor),this.tertiaryTextColor=O(this.primaryColor),this.lineColor=O(this.background),this.textColor=O(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.actorBorder=Z(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||S(this.primaryColor,{h:30}),this.cScale4=this.cScale4||S(this.primaryColor,{h:60}),this.cScale5=this.cScale5||S(this.primaryColor,{h:90}),this.cScale6=this.cScale6||S(this.primaryColor,{h:120}),this.cScale7=this.cScale7||S(this.primaryColor,{h:150}),this.cScale8=this.cScale8||S(this.primaryColor,{h:210}),this.cScale9=this.cScale9||S(this.primaryColor,{h:270}),this.cScale10=this.cScale10||S(this.primaryColor,{h:300}),this.cScale11=this.cScale11||S(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||Z(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Z(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=Z(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||Z(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||S(this["cScale"+t],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||S(this.mainBkg,{h:30,s:-30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||S(this.mainBkg,{h:30,s:-30,l:-(8+t*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||z(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||z(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=S(this.primaryColor,{h:64}),this.fillType3=S(this.secondaryColor,{h:64}),this.fillType4=S(this.primaryColor,{h:-64}),this.fillType5=S(this.secondaryColor,{h:-64}),this.fillType6=S(this.primaryColor,{h:128}),this.fillType7=S(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||S(this.primaryColor,{l:-30}),this.pie5=this.pie5||S(this.secondaryColor,{l:-30}),this.pie6=this.pie6||S(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||S(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||S(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||S(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||S(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||S(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||S(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||S(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||S(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||S(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||S(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||S(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||S(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Hi(this.quadrant1Fill)?z(this.quadrant1Fill):Z(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||S(this.primaryColor,{h:-30}),this.git4=this.git4||S(this.primaryColor,{h:-60}),this.git5=this.git5||S(this.primaryColor,{h:-90}),this.git6=this.git6||S(this.primaryColor,{h:60}),this.git7=this.git7||S(this.primaryColor,{h:120}),this.darkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=Z(this.git0,25),this.git1=Z(this.git1,25),this.git2=Z(this.git2,25),this.git3=Z(this.git3,25),this.git4=Z(this.git4,25),this.git5=Z(this.git5,25),this.git6=Z(this.git6,25),this.git7=Z(this.git7,25)),this.gitInv0=this.gitInv0||O(this.git0),this.gitInv1=this.gitInv1||O(this.git1),this.gitInv2=this.gitInv2||O(this.git2),this.gitInv3=this.gitInv3||O(this.git3),this.gitInv4=this.gitInv4||O(this.git4),this.gitInv5=this.gitInv5||O(this.git5),this.gitInv6=this.gitInv6||O(this.git6),this.gitInv7=this.gitInv7||O(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||O(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||O(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||ma,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ya}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},d(Pr,"Theme"),Pr),Cy=d(e=>{const t=new _y;return t.calculate(e),t},"getThemeVariables"),Nr,Sy=(Nr=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=z(this.contrast,55),this.background="#ffffff",this.tertiaryColor=S(this.primaryColor,{h:-160}),this.primaryBorderColor=zt(this.primaryColor,this.darkMode),this.secondaryBorderColor=zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=zt(this.tertiaryColor,this.darkMode),this.primaryTextColor=O(this.primaryColor),this.secondaryTextColor=O(this.secondaryColor),this.tertiaryTextColor=O(this.tertiaryColor),this.lineColor=O(this.background),this.textColor=O(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||z(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=z(this.contrast,55),this.border2=this.contrast,this.actorBorder=z(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||O(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||z(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||Z(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||S(this.mainBkg,{l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||S(this.mainBkg,{l:-(8+t*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=z(this.contrast,30),this.sectionBkgColor2=z(this.contrast,30),this.taskBorderColor=Z(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=z(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=Z(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=S(this.primaryColor,{h:64}),this.fillType3=S(this.secondaryColor,{h:64}),this.fillType4=S(this.primaryColor,{h:-64}),this.fillType5=S(this.secondaryColor,{h:-64}),this.fillType6=S(this.primaryColor,{h:128}),this.fillType7=S(this.secondaryColor,{h:128});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||S(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||S(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||S(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||S(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||S(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||S(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Hi(this.quadrant1Fill)?z(this.quadrant1Fill):Z(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=Z(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||S(this.primaryColor,{h:-30}),this.git4=this.pie5||S(this.primaryColor,{h:-60}),this.git5=this.pie6||S(this.primaryColor,{h:-90}),this.git6=this.pie7||S(this.primaryColor,{h:60}),this.git7=this.pie8||S(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||O(this.git0),this.gitInv1=this.gitInv1||O(this.git1),this.gitInv2=this.gitInv2||O(this.git2),this.gitInv3=this.gitInv3||O(this.git3),this.gitInv4=this.gitInv4||O(this.git4),this.gitInv5=this.gitInv5||O(this.git5),this.gitInv6=this.gitInv6||O(this.git6),this.gitInv7=this.gitInv7||O(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||ma,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ya}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},d(Nr,"Theme"),Nr),vy=d(e=>{const t=new Sy;return t.calculate(e),t},"getThemeVariables"),Re={base:{getThemeVariables:yy},dark:{getThemeVariables:by},default:{getThemeVariables:wy},forest:{getThemeVariables:Cy},neutral:{getThemeVariables:vy}},me={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},Mh={...me,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:Re.default.getThemeVariables(),sequence:{...me.sequence,messageFont:d(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:d(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:d(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...me.gantt,tickInterval:void 0,useWidth:void 0},c4:{...me.c4,useWidth:void 0,personFont:d(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...me.flowchart,inheritDir:!1},external_personFont:d(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:d(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:d(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:d(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:d(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:d(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:d(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:d(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:d(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:d(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:d(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:d(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:d(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:d(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:d(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:d(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:d(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:d(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:d(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:d(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:d(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...me.pie,useWidth:984},xyChart:{...me.xyChart,useWidth:void 0},requirement:{...me.requirement,useWidth:void 0},packet:{...me.packet},radar:{...me.radar},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","}},$h=d((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...$h(e[i],"")]:[...r,t+i],[]),"keyify"),Ty=new Set($h(Mh,"")),Fh=Mh,Dn=d(e=>{if(A.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Dn(t));return}for(const t of Object.keys(e)){if(A.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!Ty.has(t)||e[t]==null){A.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){A.debug("sanitizing object",t),Dn(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(A.debug("sanitizing css option",t),e[t]=Ay(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}A.debug("After sanitization",e)}},"sanitizeDirective"),Ay=d(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),Wr=Object.freeze(Fh),Gt=Ct({},Wr),In,fr=[],Li=Ct({},Wr),xa=d((e,t)=>{let r=Ct({},e),i={};for(const n of t)Ih(n),i=Ct(i,n);if(r=Ct(r,i),i.theme&&i.theme in Re){const n=Ct({},In),a=Ct(n.themeVariables||{},i.themeVariables);r.theme&&r.theme in Re&&(r.themeVariables=Re[r.theme].getThemeVariables(a))}return Li=r,Oh(Li),Li},"updateCurrentConfig"),By=d(e=>(Gt=Ct({},Wr),Gt=Ct(Gt,e),e.theme&&Re[e.theme]&&(Gt.themeVariables=Re[e.theme].getThemeVariables(e.themeVariables)),xa(Gt,fr),Gt),"setSiteConfig"),Ly=d(e=>{In=Ct({},e)},"saveConfigFromInitialize"),Ey=d(e=>(Gt=Ct(Gt,e),xa(Gt,fr),Gt),"updateSiteConfig"),Rh=d(()=>Ct({},Gt),"getSiteConfig"),Dh=d(e=>(Oh(e),Ct(Li,e),Rt()),"setConfig"),Rt=d(()=>Ct({},Li),"getConfig"),Ih=d(e=>{e&&(["secure",...Gt.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(A.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&Ih(e[t])}))},"sanitize"),My=d(e=>{Dn(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),fr.push(e),xa(Gt,fr)},"addDirective"),On=d((e=Gt)=>{fr=[],xa(e,fr)},"reset"),$y={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},ic={},Fy=d(e=>{ic[e]||(A.warn($y[e]),ic[e]=!0)},"issueWarning"),Oh=d(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Fy("LAZY_LOAD_DEPRECATED")},"checkConfig"),JT=d(()=>{let e={};In&&(e=Ct(e,In));for(const t of fr)e=Ct(e,t);return e},"getUserDefinedConfig"),Yi=/<br\s*\/?>/gi,Ry=d(e=>e?zh(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),Dy=(()=>{let e=!1;return()=>{e||(Ph(),e=!0)}})();function Ph(){const e="data-temp-href-target";He.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),He.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}d(Ph,"setupDompurifyHooks");var Nh=d(e=>(Dy(),He.sanitize(e)),"removeScript"),nc=d((e,t)=>{if(t.flowchart?.htmlLabels!==!1){const r=t.securityLevel;r==="antiscript"||r==="strict"?e=Nh(e):r!=="loose"&&(e=zh(e),e=e.replace(/</g,"<").replace(/>/g,">"),e=e.replace(/=/g,"="),e=Ny(e))}return e},"sanitizeMore"),re=d((e,t)=>e&&(t.dompurifyConfig?e=He.sanitize(nc(e,t),t.dompurifyConfig).toString():e=He.sanitize(nc(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),Iy=d((e,t)=>typeof e=="string"?re(e,t):e.flat().map(r=>re(r,t)),"sanitizeTextOrArray"),Oy=d(e=>Yi.test(e),"hasBreaks"),Py=d(e=>e.split(Yi),"splitBreaks"),Ny=d(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),zh=d(e=>e.replace(Yi,"#br#"),"breakToPlaceholder"),zy=d(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),vt=d(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),qy=d(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),Wy=d(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),ac=d(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let n=t[i];if(n===","&&i>0&&i+1<t.length){const a=t[i-1],s=t[i+1];Hy(a,s)&&(n=a+","+s,i++,r.pop())}r.push(Yy(n))}return r.join("")},"parseGenericTypes"),Cs=d((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),Hy=d((e,t)=>{const r=Cs(e,"~"),i=Cs(t,"~");return r===1&&i===1},"shouldCombineSets"),Yy=d(e=>{const t=Cs(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let n=i.indexOf("~"),a=i.lastIndexOf("~");for(;n!==-1&&a!==-1&&n!==a;)i[n]="<",i[a]=">",n=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),sc=d(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Ss=/\$\$(.*)\$\$/g,Hr=d(e=>(e.match(Ss)?.length??0)>0,"hasKatex"),tA=d(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await So(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r);const n={width:r.clientWidth,height:r.clientHeight};return r.remove(),n},"calculateMathMLDimensions"),jy=d(async(e,t)=>{if(!Hr(e))return e;if(!(sc()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Ss,"MathML is unsupported in this environment.");{const{default:r}=await pt(async()=>{const{default:n}=await import("./katex-XbL3y5x-.js");return{default:n}},[]),i=t.forceLegacyMathML||!sc()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Yi).map(n=>Hr(n)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${n}</div>`:`<div>${n}</div>`).join("").replace(Ss,(n,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),So=d(async(e,t)=>re(await jy(e,t),t),"renderKatexSanitized"),Zr={getRows:Ry,sanitizeText:re,sanitizeTextOrArray:Iy,hasBreaks:Oy,splitBreaks:Py,lineBreakRegex:Yi,removeScript:Nh,getUrl:zy,evaluate:vt,getMax:qy,getMin:Wy},Uy=d(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),Gy=d(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),qh=d(function(e,t,r,i){const n=Gy(t,r,i);Uy(e,n)},"configureSvgSize"),Vy=d(function(e,t,r,i){const n=t.node().getBBox(),a=n.width,s=n.height;A.info(`SVG bounds: ${a}x${s}`,n);let o=0,l=0;A.info(`Graph bounds: ${o}x${l}`,e),o=a+r*2,l=s+r*2,A.info(`Calculated bounds: ${o}x${l}`),qh(t,l,o,i);const c=`${n.x-r} ${n.y-r} ${n.width+2*r} ${n.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),kn={},Xy=d((e,t,r)=>{let i="";return e in kn&&kn[e]?i=kn[e](r):A.warn(`No theme found for ${e}`),` & {
|
|
63
|
+
font-family: ${r.fontFamily};
|
|
64
|
+
font-size: ${r.fontSize};
|
|
65
|
+
fill: ${r.textColor}
|
|
66
|
+
}
|
|
67
|
+
@keyframes edge-animation-frame {
|
|
68
|
+
from {
|
|
69
|
+
stroke-dashoffset: 0;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
@keyframes dash {
|
|
73
|
+
to {
|
|
74
|
+
stroke-dashoffset: 0;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
& .edge-animation-slow {
|
|
78
|
+
stroke-dasharray: 9,5 !important;
|
|
79
|
+
stroke-dashoffset: 900;
|
|
80
|
+
animation: dash 50s linear infinite;
|
|
81
|
+
stroke-linecap: round;
|
|
82
|
+
}
|
|
83
|
+
& .edge-animation-fast {
|
|
84
|
+
stroke-dasharray: 9,5 !important;
|
|
85
|
+
stroke-dashoffset: 900;
|
|
86
|
+
animation: dash 20s linear infinite;
|
|
87
|
+
stroke-linecap: round;
|
|
88
|
+
}
|
|
89
|
+
/* Classes common for multiple diagrams */
|
|
90
|
+
|
|
91
|
+
& .error-icon {
|
|
92
|
+
fill: ${r.errorBkgColor};
|
|
93
|
+
}
|
|
94
|
+
& .error-text {
|
|
95
|
+
fill: ${r.errorTextColor};
|
|
96
|
+
stroke: ${r.errorTextColor};
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
& .edge-thickness-normal {
|
|
100
|
+
stroke-width: 1px;
|
|
101
|
+
}
|
|
102
|
+
& .edge-thickness-thick {
|
|
103
|
+
stroke-width: 3.5px
|
|
104
|
+
}
|
|
105
|
+
& .edge-pattern-solid {
|
|
106
|
+
stroke-dasharray: 0;
|
|
107
|
+
}
|
|
108
|
+
& .edge-thickness-invisible {
|
|
109
|
+
stroke-width: 0;
|
|
110
|
+
fill: none;
|
|
111
|
+
}
|
|
112
|
+
& .edge-pattern-dashed{
|
|
113
|
+
stroke-dasharray: 3;
|
|
114
|
+
}
|
|
115
|
+
.edge-pattern-dotted {
|
|
116
|
+
stroke-dasharray: 2;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
& .marker {
|
|
120
|
+
fill: ${r.lineColor};
|
|
121
|
+
stroke: ${r.lineColor};
|
|
122
|
+
}
|
|
123
|
+
& .marker.cross {
|
|
124
|
+
stroke: ${r.lineColor};
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
& svg {
|
|
128
|
+
font-family: ${r.fontFamily};
|
|
129
|
+
font-size: ${r.fontSize};
|
|
130
|
+
}
|
|
131
|
+
& p {
|
|
132
|
+
margin: 0
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
${i}
|
|
136
|
+
|
|
137
|
+
${t}
|
|
138
|
+
`},"getStyles"),Zy=d((e,t)=>{t!==void 0&&(kn[e]=t)},"addStylesForDiagram"),Qy=Xy,Wh={};sy(Wh,{clear:()=>Ky,getAccDescription:()=>rx,getAccTitle:()=>tx,getDiagramTitle:()=>nx,setAccDescription:()=>ex,setAccTitle:()=>Jy,setDiagramTitle:()=>ix});var vo="",To="",Ao="",Bo=d(e=>re(e,Rt()),"sanitizeText"),Ky=d(()=>{vo="",Ao="",To=""},"clear"),Jy=d(e=>{vo=Bo(e).replace(/^\s+/g,"")},"setAccTitle"),tx=d(()=>vo,"getAccTitle"),ex=d(e=>{Ao=Bo(e).replace(/\n\s+/g,`
|
|
139
|
+
`)},"setAccDescription"),rx=d(()=>Ao,"getAccDescription"),ix=d(e=>{To=Bo(e)},"setDiagramTitle"),nx=d(()=>To,"getDiagramTitle"),oc=A,ax=_o,ut=Rt,eA=Dh,rA=Wr,Lo=d(e=>re(e,ut()),"sanitizeText"),sx=Vy,ox=d(()=>Wh,"getCommonDb"),Pn={},Nn=d((e,t,r)=>{Pn[e]&&oc.warn(`Diagram with id ${e} already registered. Overwriting.`),Pn[e]=t,r&&Eh(e,r),Zy(e,t.styles),t.injectUtils?.(oc,ax,ut,Lo,sx,ox(),()=>{})},"registerDiagram"),vs=d(e=>{if(e in Pn)return Pn[e];throw new lx(e)},"getDiagram"),zr,lx=(zr=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},d(zr,"DiagramNotFoundError"),zr),cx={value:()=>{}};function Hh(){for(var e=0,t=arguments.length,r={},i;e<t;++e){if(!(i=arguments[e]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new wn(r)}function wn(e){this._=e}function hx(e,t){return e.trim().split(/^|\s+/).map(function(r){var i="",n=r.indexOf(".");if(n>=0&&(i=r.slice(n+1),r=r.slice(0,n)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}wn.prototype=Hh.prototype={constructor:wn,on:function(e,t){var r=this._,i=hx(e+"",r),n,a=-1,s=i.length;if(arguments.length<2){for(;++a<s;)if((n=(e=i[a]).type)&&(n=ux(r[n],e.name)))return n;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<s;)if(n=(e=i[a]).type)r[n]=lc(r[n],e.name,t);else if(t==null)for(n in r)r[n]=lc(r[n],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new wn(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var r=new Array(n),i=0,n,a;i<n;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],i=0,n=a.length;i<n;++i)a[i].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],n=0,a=i.length;n<a;++n)i[n].value.apply(t,r)}};function ux(e,t){for(var r=0,i=e.length,n;r<i;++r)if((n=e[r]).name===t)return n.value}function lc(e,t,r){for(var i=0,n=e.length;i<n;++i)if(e[i].name===t){e[i]=cx,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var Ts="http://www.w3.org/1999/xhtml";const cc={svg:"http://www.w3.org/2000/svg",xhtml:Ts,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ba(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),cc.hasOwnProperty(t)?{space:cc[t],local:e}:e}function fx(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Ts&&t.documentElement.namespaceURI===Ts?t.createElement(e):t.createElementNS(r,e)}}function px(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Yh(e){var t=ba(e);return(t.local?px:fx)(t)}function dx(){}function Eo(e){return e==null?dx:function(){return this.querySelector(e)}}function gx(e){typeof e!="function"&&(e=Eo(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var a=t[n],s=a.length,o=i[n]=new Array(s),l,c,h=0;h<s;++h)(l=a[h])&&(c=e.call(l,l.__data__,h,a))&&("__data__"in l&&(c.__data__=l.__data__),o[h]=c);return new Kt(i,this._parents)}function mx(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function yx(){return[]}function jh(e){return e==null?yx:function(){return this.querySelectorAll(e)}}function xx(e){return function(){return mx(e.apply(this,arguments))}}function bx(e){typeof e=="function"?e=xx(e):e=jh(e);for(var t=this._groups,r=t.length,i=[],n=[],a=0;a<r;++a)for(var s=t[a],o=s.length,l,c=0;c<o;++c)(l=s[c])&&(i.push(e.call(l,l.__data__,c,s)),n.push(l));return new Kt(i,n)}function Uh(e){return function(){return this.matches(e)}}function Gh(e){return function(t){return t.matches(e)}}var kx=Array.prototype.find;function wx(e){return function(){return kx.call(this.children,e)}}function _x(){return this.firstElementChild}function Cx(e){return this.select(e==null?_x:wx(typeof e=="function"?e:Gh(e)))}var Sx=Array.prototype.filter;function vx(){return Array.from(this.children)}function Tx(e){return function(){return Sx.call(this.children,e)}}function Ax(e){return this.selectAll(e==null?vx:Tx(typeof e=="function"?e:Gh(e)))}function Bx(e){typeof e!="function"&&(e=Uh(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var a=t[n],s=a.length,o=i[n]=[],l,c=0;c<s;++c)(l=a[c])&&e.call(l,l.__data__,c,a)&&o.push(l);return new Kt(i,this._parents)}function Vh(e){return new Array(e.length)}function Lx(){return new Kt(this._enter||this._groups.map(Vh),this._parents)}function zn(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}zn.prototype={constructor:zn,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Ex(e){return function(){return e}}function Mx(e,t,r,i,n,a){for(var s=0,o,l=t.length,c=a.length;s<c;++s)(o=t[s])?(o.__data__=a[s],i[s]=o):r[s]=new zn(e,a[s]);for(;s<l;++s)(o=t[s])&&(n[s]=o)}function $x(e,t,r,i,n,a,s){var o,l,c=new Map,h=t.length,u=a.length,f=new Array(h),p;for(o=0;o<h;++o)(l=t[o])&&(f[o]=p=s.call(l,l.__data__,o,t)+"",c.has(p)?n[o]=l:c.set(p,l));for(o=0;o<u;++o)p=s.call(e,a[o],o,a)+"",(l=c.get(p))?(i[o]=l,l.__data__=a[o],c.delete(p)):r[o]=new zn(e,a[o]);for(o=0;o<h;++o)(l=t[o])&&c.get(f[o])===l&&(n[o]=l)}function Fx(e){return e.__data__}function Rx(e,t){if(!arguments.length)return Array.from(this,Fx);var r=t?$x:Mx,i=this._parents,n=this._groups;typeof e!="function"&&(e=Ex(e));for(var a=n.length,s=new Array(a),o=new Array(a),l=new Array(a),c=0;c<a;++c){var h=i[c],u=n[c],f=u.length,p=Dx(e.call(h,h&&h.__data__,c,i)),g=p.length,m=o[c]=new Array(g),y=s[c]=new Array(g),x=l[c]=new Array(f);r(h,u,m,y,x,p,t);for(var b=0,k=0,C,_;b<g;++b)if(C=m[b]){for(b>=k&&(k=b+1);!(_=y[k])&&++k<g;);C._next=_||null}}return s=new Kt(s,i),s._enter=o,s._exit=l,s}function Dx(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Ix(){return new Kt(this._exit||this._groups.map(Vh),this._parents)}function Ox(e,t,r){var i=this.enter(),n=this,a=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(n=t(n),n&&(n=n.selection())),r==null?a.remove():r(a),i&&n?i.merge(n).order():n}function Px(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,n=r.length,a=i.length,s=Math.min(n,a),o=new Array(n),l=0;l<s;++l)for(var c=r[l],h=i[l],u=c.length,f=o[l]=new Array(u),p,g=0;g<u;++g)(p=c[g]||h[g])&&(f[g]=p);for(;l<n;++l)o[l]=r[l];return new Kt(o,this._parents)}function Nx(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],n=i.length-1,a=i[n],s;--n>=0;)(s=i[n])&&(a&&s.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(s,a),a=s);return this}function zx(e){e||(e=qx);function t(u,f){return u&&f?e(u.__data__,f.__data__):!u-!f}for(var r=this._groups,i=r.length,n=new Array(i),a=0;a<i;++a){for(var s=r[a],o=s.length,l=n[a]=new Array(o),c,h=0;h<o;++h)(c=s[h])&&(l[h]=c);l.sort(t)}return new Kt(n,this._parents).order()}function qx(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Wx(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Hx(){return Array.from(this)}function Yx(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],n=0,a=i.length;n<a;++n){var s=i[n];if(s)return s}return null}function jx(){let e=0;for(const t of this)++e;return e}function Ux(){return!this.node()}function Gx(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var n=t[r],a=0,s=n.length,o;a<s;++a)(o=n[a])&&e.call(o,o.__data__,a,n);return this}function Vx(e){return function(){this.removeAttribute(e)}}function Xx(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Zx(e,t){return function(){this.setAttribute(e,t)}}function Qx(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Kx(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function Jx(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function tb(e,t){var r=ba(e);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((t==null?r.local?Xx:Vx:typeof t=="function"?r.local?Jx:Kx:r.local?Qx:Zx)(r,t))}function Xh(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function eb(e){return function(){this.style.removeProperty(e)}}function rb(e,t,r){return function(){this.style.setProperty(e,t,r)}}function ib(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function nb(e,t,r){return arguments.length>1?this.each((t==null?eb:typeof t=="function"?ib:rb)(e,t,r??"")):Yr(this.node(),e)}function Yr(e,t){return e.style.getPropertyValue(t)||Xh(e).getComputedStyle(e,null).getPropertyValue(t)}function ab(e){return function(){delete this[e]}}function sb(e,t){return function(){this[e]=t}}function ob(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function lb(e,t){return arguments.length>1?this.each((t==null?ab:typeof t=="function"?ob:sb)(e,t)):this.node()[e]}function Zh(e){return e.trim().split(/^|\s+/)}function Mo(e){return e.classList||new Qh(e)}function Qh(e){this._node=e,this._names=Zh(e.getAttribute("class")||"")}Qh.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Kh(e,t){for(var r=Mo(e),i=-1,n=t.length;++i<n;)r.add(t[i])}function Jh(e,t){for(var r=Mo(e),i=-1,n=t.length;++i<n;)r.remove(t[i])}function cb(e){return function(){Kh(this,e)}}function hb(e){return function(){Jh(this,e)}}function ub(e,t){return function(){(t.apply(this,arguments)?Kh:Jh)(this,e)}}function fb(e,t){var r=Zh(e+"");if(arguments.length<2){for(var i=Mo(this.node()),n=-1,a=r.length;++n<a;)if(!i.contains(r[n]))return!1;return!0}return this.each((typeof t=="function"?ub:t?cb:hb)(r,t))}function pb(){this.textContent=""}function db(e){return function(){this.textContent=e}}function gb(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function mb(e){return arguments.length?this.each(e==null?pb:(typeof e=="function"?gb:db)(e)):this.node().textContent}function yb(){this.innerHTML=""}function xb(e){return function(){this.innerHTML=e}}function bb(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function kb(e){return arguments.length?this.each(e==null?yb:(typeof e=="function"?bb:xb)(e)):this.node().innerHTML}function wb(){this.nextSibling&&this.parentNode.appendChild(this)}function _b(){return this.each(wb)}function Cb(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Sb(){return this.each(Cb)}function vb(e){var t=typeof e=="function"?e:Yh(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Tb(){return null}function Ab(e,t){var r=typeof e=="function"?e:Yh(e),i=t==null?Tb:typeof t=="function"?t:Eo(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function Bb(){var e=this.parentNode;e&&e.removeChild(this)}function Lb(){return this.each(Bb)}function Eb(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Mb(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function $b(e){return this.select(e?Mb:Eb)}function Fb(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Rb(e){return function(t){e.call(this,t,this.__data__)}}function Db(e){return e.trim().split(/^|\s+/).map(function(t){var r="",i=t.indexOf(".");return i>=0&&(r=t.slice(i+1),t=t.slice(0,i)),{type:t,name:r}})}function Ib(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,n=t.length,a;r<n;++r)a=t[r],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++i]=a;++i?t.length=i:delete this.__on}}}function Ob(e,t,r){return function(){var i=this.__on,n,a=Rb(t);if(i){for(var s=0,o=i.length;s<o;++s)if((n=i[s]).type===e.type&&n.name===e.name){this.removeEventListener(n.type,n.listener,n.options),this.addEventListener(n.type,n.listener=a,n.options=r),n.value=t;return}}this.addEventListener(e.type,a,r),n={type:e.type,name:e.name,value:t,listener:a,options:r},i?i.push(n):this.__on=[n]}}function Pb(e,t,r){var i=Db(e+""),n,a=i.length,s;if(arguments.length<2){var o=this.node().__on;if(o){for(var l=0,c=o.length,h;l<c;++l)for(n=0,h=o[l];n<a;++n)if((s=i[n]).type===h.type&&s.name===h.name)return h.value}return}for(o=t?Ob:Ib,n=0;n<a;++n)this.each(o(i[n],t,r));return this}function tu(e,t,r){var i=Xh(e),n=i.CustomEvent;typeof n=="function"?n=new n(t,r):(n=i.document.createEvent("Event"),r?(n.initEvent(t,r.bubbles,r.cancelable),n.detail=r.detail):n.initEvent(t,!1,!1)),e.dispatchEvent(n)}function Nb(e,t){return function(){return tu(this,e,t)}}function zb(e,t){return function(){return tu(this,e,t.apply(this,arguments))}}function qb(e,t){return this.each((typeof t=="function"?zb:Nb)(e,t))}function*Wb(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],n=0,a=i.length,s;n<a;++n)(s=i[n])&&(yield s)}var eu=[null];function Kt(e,t){this._groups=e,this._parents=t}function ji(){return new Kt([[document.documentElement]],eu)}function Hb(){return this}Kt.prototype=ji.prototype={constructor:Kt,select:gx,selectAll:bx,selectChild:Cx,selectChildren:Ax,filter:Bx,data:Rx,enter:Lx,exit:Ix,join:Ox,merge:Px,selection:Hb,order:Nx,sort:zx,call:Wx,nodes:Hx,node:Yx,size:jx,empty:Ux,each:Gx,attr:tb,style:nb,property:lb,classed:fb,text:mb,html:kb,raise:_b,lower:Sb,append:vb,insert:Ab,remove:Lb,clone:$b,datum:Fb,on:Pb,dispatch:qb,[Symbol.iterator]:Wb};function at(e){return typeof e=="string"?new Kt([[document.querySelector(e)]],[document.documentElement]):new Kt([[e]],eu)}function $o(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function ru(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function Ui(){}var Mi=.7,qn=1/Mi,$r="\\s*([+-]?\\d+)\\s*",$i="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",we="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Yb=/^#([0-9a-f]{3,8})$/,jb=new RegExp(`^rgb\\(${$r},${$r},${$r}\\)$`),Ub=new RegExp(`^rgb\\(${we},${we},${we}\\)$`),Gb=new RegExp(`^rgba\\(${$r},${$r},${$r},${$i}\\)$`),Vb=new RegExp(`^rgba\\(${we},${we},${we},${$i}\\)$`),Xb=new RegExp(`^hsl\\(${$i},${we},${we}\\)$`),Zb=new RegExp(`^hsla\\(${$i},${we},${we},${$i}\\)$`),hc={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};$o(Ui,Fi,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:uc,formatHex:uc,formatHex8:Qb,formatHsl:Kb,formatRgb:fc,toString:fc});function uc(){return this.rgb().formatHex()}function Qb(){return this.rgb().formatHex8()}function Kb(){return iu(this).formatHsl()}function fc(){return this.rgb().formatRgb()}function Fi(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Yb.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?pc(t):r===3?new Xt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?ln(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?ln(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=jb.exec(e))?new Xt(t[1],t[2],t[3],1):(t=Ub.exec(e))?new Xt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Gb.exec(e))?ln(t[1],t[2],t[3],t[4]):(t=Vb.exec(e))?ln(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Xb.exec(e))?mc(t[1],t[2]/100,t[3]/100,1):(t=Zb.exec(e))?mc(t[1],t[2]/100,t[3]/100,t[4]):hc.hasOwnProperty(e)?pc(hc[e]):e==="transparent"?new Xt(NaN,NaN,NaN,0):null}function pc(e){return new Xt(e>>16&255,e>>8&255,e&255,1)}function ln(e,t,r,i){return i<=0&&(e=t=r=NaN),new Xt(e,t,r,i)}function Jb(e){return e instanceof Ui||(e=Fi(e)),e?(e=e.rgb(),new Xt(e.r,e.g,e.b,e.opacity)):new Xt}function As(e,t,r,i){return arguments.length===1?Jb(e):new Xt(e,t,r,i??1)}function Xt(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}$o(Xt,As,ru(Ui,{brighter(e){return e=e==null?qn:Math.pow(qn,e),new Xt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Mi:Math.pow(Mi,e),new Xt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Xt(lr(this.r),lr(this.g),lr(this.b),Wn(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:dc,formatHex:dc,formatHex8:t1,formatRgb:gc,toString:gc}));function dc(){return`#${nr(this.r)}${nr(this.g)}${nr(this.b)}`}function t1(){return`#${nr(this.r)}${nr(this.g)}${nr(this.b)}${nr((isNaN(this.opacity)?1:this.opacity)*255)}`}function gc(){const e=Wn(this.opacity);return`${e===1?"rgb(":"rgba("}${lr(this.r)}, ${lr(this.g)}, ${lr(this.b)}${e===1?")":`, ${e})`}`}function Wn(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function lr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function nr(e){return e=lr(e),(e<16?"0":"")+e.toString(16)}function mc(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new ce(e,t,r,i)}function iu(e){if(e instanceof ce)return new ce(e.h,e.s,e.l,e.opacity);if(e instanceof Ui||(e=Fi(e)),!e)return new ce;if(e instanceof ce)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,n=Math.min(t,r,i),a=Math.max(t,r,i),s=NaN,o=a-n,l=(a+n)/2;return o?(t===a?s=(r-i)/o+(r<i)*6:r===a?s=(i-t)/o+2:s=(t-r)/o+4,o/=l<.5?a+n:2-a-n,s*=60):o=l>0&&l<1?0:s,new ce(s,o,l,e.opacity)}function e1(e,t,r,i){return arguments.length===1?iu(e):new ce(e,t,r,i??1)}function ce(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}$o(ce,e1,ru(Ui,{brighter(e){return e=e==null?qn:Math.pow(qn,e),new ce(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Mi:Math.pow(Mi,e),new ce(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*t,n=2*r-i;return new Xt(es(e>=240?e-240:e+120,n,i),es(e,n,i),es(e<120?e+240:e-120,n,i),this.opacity)},clamp(){return new ce(yc(this.h),cn(this.s),cn(this.l),Wn(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Wn(this.opacity);return`${e===1?"hsl(":"hsla("}${yc(this.h)}, ${cn(this.s)*100}%, ${cn(this.l)*100}%${e===1?")":`, ${e})`}`}}));function yc(e){return e=(e||0)%360,e<0?e+360:e}function cn(e){return Math.max(0,Math.min(1,e||0))}function es(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const Fo=e=>()=>e;function nu(e,t){return function(r){return e+r*t}}function r1(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(i){return Math.pow(e+i*t,r)}}function iA(e,t){var r=t-e;return r?nu(e,r>180||r<-180?r-360*Math.round(r/360):r):Fo(isNaN(e)?t:e)}function i1(e){return(e=+e)==1?au:function(t,r){return r-t?r1(t,r,e):Fo(isNaN(t)?r:t)}}function au(e,t){var r=t-e;return r?nu(e,r):Fo(isNaN(e)?t:e)}const xc=(function e(t){var r=i1(t);function i(n,a){var s=r((n=As(n)).r,(a=As(a)).r),o=r(n.g,a.g),l=r(n.b,a.b),c=au(n.opacity,a.opacity);return function(h){return n.r=s(h),n.g=o(h),n.b=l(h),n.opacity=c(h),n+""}}return i.gamma=e,i})(1);function ze(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var Bs=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,rs=new RegExp(Bs.source,"g");function n1(e){return function(){return e}}function a1(e){return function(t){return e(t)+""}}function s1(e,t){var r=Bs.lastIndex=rs.lastIndex=0,i,n,a,s=-1,o=[],l=[];for(e=e+"",t=t+"";(i=Bs.exec(e))&&(n=rs.exec(t));)(a=n.index)>r&&(a=t.slice(r,a),o[s]?o[s]+=a:o[++s]=a),(i=i[0])===(n=n[0])?o[s]?o[s]+=n:o[++s]=n:(o[++s]=null,l.push({i:s,x:ze(i,n)})),r=rs.lastIndex;return r<t.length&&(a=t.slice(r),o[s]?o[s]+=a:o[++s]=a),o.length<2?l[0]?a1(l[0].x):n1(t):(t=l.length,function(c){for(var h=0,u;h<t;++h)o[(u=l[h]).i]=u.x(c);return o.join("")})}var bc=180/Math.PI,Ls={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function su(e,t,r,i,n,a){var s,o,l;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(l=e*r+t*i)&&(r-=e*l,i-=t*l),(o=Math.sqrt(r*r+i*i))&&(r/=o,i/=o,l/=o),e*i<t*r&&(e=-e,t=-t,l=-l,s=-s),{translateX:n,translateY:a,rotate:Math.atan2(t,e)*bc,skewX:Math.atan(l)*bc,scaleX:s,scaleY:o}}var hn;function o1(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Ls:su(t.a,t.b,t.c,t.d,t.e,t.f)}function l1(e){return e==null||(hn||(hn=document.createElementNS("http://www.w3.org/2000/svg","g")),hn.setAttribute("transform",e),!(e=hn.transform.baseVal.consolidate()))?Ls:(e=e.matrix,su(e.a,e.b,e.c,e.d,e.e,e.f))}function ou(e,t,r,i){function n(c){return c.length?c.pop()+" ":""}function a(c,h,u,f,p,g){if(c!==u||h!==f){var m=p.push("translate(",null,t,null,r);g.push({i:m-4,x:ze(c,u)},{i:m-2,x:ze(h,f)})}else(u||f)&&p.push("translate("+u+t+f+r)}function s(c,h,u,f){c!==h?(c-h>180?h+=360:h-c>180&&(c+=360),f.push({i:u.push(n(u)+"rotate(",null,i)-2,x:ze(c,h)})):h&&u.push(n(u)+"rotate("+h+i)}function o(c,h,u,f){c!==h?f.push({i:u.push(n(u)+"skewX(",null,i)-2,x:ze(c,h)}):h&&u.push(n(u)+"skewX("+h+i)}function l(c,h,u,f,p,g){if(c!==u||h!==f){var m=p.push(n(p)+"scale(",null,",",null,")");g.push({i:m-4,x:ze(c,u)},{i:m-2,x:ze(h,f)})}else(u!==1||f!==1)&&p.push(n(p)+"scale("+u+","+f+")")}return function(c,h){var u=[],f=[];return c=e(c),h=e(h),a(c.translateX,c.translateY,h.translateX,h.translateY,u,f),s(c.rotate,h.rotate,u,f),o(c.skewX,h.skewX,u,f),l(c.scaleX,c.scaleY,h.scaleX,h.scaleY,u,f),c=h=null,function(p){for(var g=-1,m=f.length,y;++g<m;)u[(y=f[g]).i]=y.x(p);return u.join("")}}}var c1=ou(o1,"px, ","px)","deg)"),h1=ou(l1,", ",")",")"),jr=0,yi=0,ci=0,lu=1e3,Hn,xi,Yn=0,pr=0,ka=0,Ri=typeof performance=="object"&&performance.now?performance:Date,cu=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Ro(){return pr||(cu(u1),pr=Ri.now()+ka)}function u1(){pr=0}function jn(){this._call=this._time=this._next=null}jn.prototype=hu.prototype={constructor:jn,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Ro():+r)+(t==null?0:+t),!this._next&&xi!==this&&(xi?xi._next=this:Hn=this,xi=this),this._call=e,this._time=r,Es()},stop:function(){this._call&&(this._call=null,this._time=1/0,Es())}};function hu(e,t,r){var i=new jn;return i.restart(e,t,r),i}function f1(){Ro(),++jr;for(var e=Hn,t;e;)(t=pr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--jr}function kc(){pr=(Yn=Ri.now())+ka,jr=yi=0;try{f1()}finally{jr=0,d1(),pr=0}}function p1(){var e=Ri.now(),t=e-Yn;t>lu&&(ka-=t,Yn=e)}function d1(){for(var e,t=Hn,r,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:Hn=r);xi=e,Es(i)}function Es(e){if(!jr){yi&&(yi=clearTimeout(yi));var t=e-pr;t>24?(e<1/0&&(yi=setTimeout(kc,e-Ri.now()-ka)),ci&&(ci=clearInterval(ci))):(ci||(Yn=Ri.now(),ci=setInterval(p1,lu)),jr=1,cu(kc))}}function wc(e,t,r){var i=new jn;return t=t==null?0:+t,i.restart(n=>{i.stop(),e(n+t)},t,r),i}var g1=Hh("start","end","cancel","interrupt"),m1=[],uu=0,_c=1,Ms=2,_n=3,Cc=4,$s=5,Cn=6;function wa(e,t,r,i,n,a){var s=e.__transition;if(!s)e.__transition={};else if(r in s)return;y1(e,r,{name:t,index:i,group:n,on:g1,tween:m1,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:uu})}function Do(e,t){var r=pe(e,t);if(r.state>uu)throw new Error("too late; already scheduled");return r}function Se(e,t){var r=pe(e,t);if(r.state>_n)throw new Error("too late; already running");return r}function pe(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function y1(e,t,r){var i=e.__transition,n;i[t]=r,r.timer=hu(a,0,r.time);function a(c){r.state=_c,r.timer.restart(s,r.delay,r.time),r.delay<=c&&s(c-r.delay)}function s(c){var h,u,f,p;if(r.state!==_c)return l();for(h in i)if(p=i[h],p.name===r.name){if(p.state===_n)return wc(s);p.state===Cc?(p.state=Cn,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete i[h]):+h<t&&(p.state=Cn,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete i[h])}if(wc(function(){r.state===_n&&(r.state=Cc,r.timer.restart(o,r.delay,r.time),o(c))}),r.state=Ms,r.on.call("start",e,e.__data__,r.index,r.group),r.state===Ms){for(r.state=_n,n=new Array(f=r.tween.length),h=0,u=-1;h<f;++h)(p=r.tween[h].value.call(e,e.__data__,r.index,r.group))&&(n[++u]=p);n.length=u+1}}function o(c){for(var h=c<r.duration?r.ease.call(null,c/r.duration):(r.timer.restart(l),r.state=$s,1),u=-1,f=n.length;++u<f;)n[u].call(e,h);r.state===$s&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=Cn,r.timer.stop(),delete i[t];for(var c in i)return;delete e.__transition}}function x1(e,t){var r=e.__transition,i,n,a=!0,s;if(r){t=t==null?null:t+"";for(s in r){if((i=r[s]).name!==t){a=!1;continue}n=i.state>Ms&&i.state<$s,i.state=Cn,i.timer.stop(),i.on.call(n?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[s]}a&&delete e.__transition}}function b1(e){return this.each(function(){x1(this,e)})}function k1(e,t){var r,i;return function(){var n=Se(this,e),a=n.tween;if(a!==r){i=r=a;for(var s=0,o=i.length;s<o;++s)if(i[s].name===t){i=i.slice(),i.splice(s,1);break}}n.tween=i}}function w1(e,t,r){var i,n;if(typeof r!="function")throw new Error;return function(){var a=Se(this,e),s=a.tween;if(s!==i){n=(i=s).slice();for(var o={name:t,value:r},l=0,c=n.length;l<c;++l)if(n[l].name===t){n[l]=o;break}l===c&&n.push(o)}a.tween=n}}function _1(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=pe(this.node(),r).tween,n=0,a=i.length,s;n<a;++n)if((s=i[n]).name===e)return s.value;return null}return this.each((t==null?k1:w1)(r,e,t))}function Io(e,t,r){var i=e._id;return e.each(function(){var n=Se(this,i);(n.value||(n.value={}))[t]=r.apply(this,arguments)}),function(n){return pe(n,i).value[t]}}function fu(e,t){var r;return(typeof t=="number"?ze:t instanceof Fi?xc:(r=Fi(t))?(t=r,xc):s1)(e,t)}function C1(e){return function(){this.removeAttribute(e)}}function S1(e){return function(){this.removeAttributeNS(e.space,e.local)}}function v1(e,t,r){var i,n=r+"",a;return function(){var s=this.getAttribute(e);return s===n?null:s===i?a:a=t(i=s,r)}}function T1(e,t,r){var i,n=r+"",a;return function(){var s=this.getAttributeNS(e.space,e.local);return s===n?null:s===i?a:a=t(i=s,r)}}function A1(e,t,r){var i,n,a;return function(){var s,o=r(this),l;return o==null?void this.removeAttribute(e):(s=this.getAttribute(e),l=o+"",s===l?null:s===i&&l===n?a:(n=l,a=t(i=s,o)))}}function B1(e,t,r){var i,n,a;return function(){var s,o=r(this),l;return o==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),l=o+"",s===l?null:s===i&&l===n?a:(n=l,a=t(i=s,o)))}}function L1(e,t){var r=ba(e),i=r==="transform"?h1:fu;return this.attrTween(e,typeof t=="function"?(r.local?B1:A1)(r,i,Io(this,"attr."+e,t)):t==null?(r.local?S1:C1)(r):(r.local?T1:v1)(r,i,t))}function E1(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function M1(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function $1(e,t){var r,i;function n(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&M1(e,a)),r}return n._value=t,n}function F1(e,t){var r,i;function n(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&E1(e,a)),r}return n._value=t,n}function R1(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var i=ba(e);return this.tween(r,(i.local?$1:F1)(i,t))}function D1(e,t){return function(){Do(this,e).delay=+t.apply(this,arguments)}}function I1(e,t){return t=+t,function(){Do(this,e).delay=t}}function O1(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?D1:I1)(t,e)):pe(this.node(),t).delay}function P1(e,t){return function(){Se(this,e).duration=+t.apply(this,arguments)}}function N1(e,t){return t=+t,function(){Se(this,e).duration=t}}function z1(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?P1:N1)(t,e)):pe(this.node(),t).duration}function q1(e,t){if(typeof t!="function")throw new Error;return function(){Se(this,e).ease=t}}function W1(e){var t=this._id;return arguments.length?this.each(q1(t,e)):pe(this.node(),t).ease}function H1(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;Se(this,e).ease=r}}function Y1(e){if(typeof e!="function")throw new Error;return this.each(H1(this._id,e))}function j1(e){typeof e!="function"&&(e=Uh(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var a=t[n],s=a.length,o=i[n]=[],l,c=0;c<s;++c)(l=a[c])&&e.call(l,l.__data__,c,a)&&o.push(l);return new Ie(i,this._parents,this._name,this._id)}function U1(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,n=r.length,a=Math.min(i,n),s=new Array(i),o=0;o<a;++o)for(var l=t[o],c=r[o],h=l.length,u=s[o]=new Array(h),f,p=0;p<h;++p)(f=l[p]||c[p])&&(u[p]=f);for(;o<i;++o)s[o]=t[o];return new Ie(s,this._parents,this._name,this._id)}function G1(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function V1(e,t,r){var i,n,a=G1(t)?Do:Se;return function(){var s=a(this,e),o=s.on;o!==i&&(n=(i=o).copy()).on(t,r),s.on=n}}function X1(e,t){var r=this._id;return arguments.length<2?pe(this.node(),r).on.on(e):this.each(V1(r,e,t))}function Z1(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function Q1(){return this.on("end.remove",Z1(this._id))}function K1(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Eo(e));for(var i=this._groups,n=i.length,a=new Array(n),s=0;s<n;++s)for(var o=i[s],l=o.length,c=a[s]=new Array(l),h,u,f=0;f<l;++f)(h=o[f])&&(u=e.call(h,h.__data__,f,o))&&("__data__"in h&&(u.__data__=h.__data__),c[f]=u,wa(c[f],t,r,f,c,pe(h,r)));return new Ie(a,this._parents,t,r)}function J1(e){var t=this._name,r=this._id;typeof e!="function"&&(e=jh(e));for(var i=this._groups,n=i.length,a=[],s=[],o=0;o<n;++o)for(var l=i[o],c=l.length,h,u=0;u<c;++u)if(h=l[u]){for(var f=e.call(h,h.__data__,u,l),p,g=pe(h,r),m=0,y=f.length;m<y;++m)(p=f[m])&&wa(p,t,r,m,f,g);a.push(f),s.push(h)}return new Ie(a,s,t,r)}var tk=ji.prototype.constructor;function ek(){return new tk(this._groups,this._parents)}function rk(e,t){var r,i,n;return function(){var a=Yr(this,e),s=(this.style.removeProperty(e),Yr(this,e));return a===s?null:a===r&&s===i?n:n=t(r=a,i=s)}}function pu(e){return function(){this.style.removeProperty(e)}}function ik(e,t,r){var i,n=r+"",a;return function(){var s=Yr(this,e);return s===n?null:s===i?a:a=t(i=s,r)}}function nk(e,t,r){var i,n,a;return function(){var s=Yr(this,e),o=r(this),l=o+"";return o==null&&(l=o=(this.style.removeProperty(e),Yr(this,e))),s===l?null:s===i&&l===n?a:(n=l,a=t(i=s,o))}}function ak(e,t){var r,i,n,a="style."+t,s="end."+a,o;return function(){var l=Se(this,e),c=l.on,h=l.value[a]==null?o||(o=pu(t)):void 0;(c!==r||n!==h)&&(i=(r=c).copy()).on(s,n=h),l.on=i}}function sk(e,t,r){var i=(e+="")=="transform"?c1:fu;return t==null?this.styleTween(e,rk(e,i)).on("end.style."+e,pu(e)):typeof t=="function"?this.styleTween(e,nk(e,i,Io(this,"style."+e,t))).each(ak(this._id,e)):this.styleTween(e,ik(e,i,t),r).on("end.style."+e,null)}function ok(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function lk(e,t,r){var i,n;function a(){var s=t.apply(this,arguments);return s!==n&&(i=(n=s)&&ok(e,s,r)),i}return a._value=t,a}function ck(e,t,r){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,lk(e,t,r??""))}function hk(e){return function(){this.textContent=e}}function uk(e){return function(){var t=e(this);this.textContent=t??""}}function fk(e){return this.tween("text",typeof e=="function"?uk(Io(this,"text",e)):hk(e==null?"":e+""))}function pk(e){return function(t){this.textContent=e.call(this,t)}}function dk(e){var t,r;function i(){var n=e.apply(this,arguments);return n!==r&&(t=(r=n)&&pk(n)),t}return i._value=e,i}function gk(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,dk(e))}function mk(){for(var e=this._name,t=this._id,r=du(),i=this._groups,n=i.length,a=0;a<n;++a)for(var s=i[a],o=s.length,l,c=0;c<o;++c)if(l=s[c]){var h=pe(l,t);wa(l,e,r,c,s,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new Ie(i,this._parents,e,r)}function yk(){var e,t,r=this,i=r._id,n=r.size();return new Promise(function(a,s){var o={value:s},l={value:function(){--n===0&&a()}};r.each(function(){var c=Se(this,i),h=c.on;h!==e&&(t=(e=h).copy(),t._.cancel.push(o),t._.interrupt.push(o),t._.end.push(l)),c.on=t}),n===0&&a()})}var xk=0;function Ie(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function du(){return++xk}var Ee=ji.prototype;Ie.prototype={constructor:Ie,select:K1,selectAll:J1,selectChild:Ee.selectChild,selectChildren:Ee.selectChildren,filter:j1,merge:U1,selection:ek,transition:mk,call:Ee.call,nodes:Ee.nodes,node:Ee.node,size:Ee.size,empty:Ee.empty,each:Ee.each,on:X1,attr:L1,attrTween:R1,style:sk,styleTween:ck,text:fk,textTween:gk,remove:Q1,tween:_1,delay:O1,duration:z1,ease:W1,easeVarying:Y1,end:yk,[Symbol.iterator]:Ee[Symbol.iterator]};function bk(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var kk={time:null,delay:0,duration:250,ease:bk};function wk(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function _k(e){var t,r;e instanceof Ie?(t=e._id,e=e._name):(t=du(),(r=kk).time=Ro(),e=e==null?null:e+"");for(var i=this._groups,n=i.length,a=0;a<n;++a)for(var s=i[a],o=s.length,l,c=0;c<o;++c)(l=s[c])&&wa(l,e,t,c,s,r||wk(l,t));return new Ie(i,this._parents,e,t)}ji.prototype.interrupt=b1;ji.prototype.transition=_k;const Fs=Math.PI,Rs=2*Fs,er=1e-6,Ck=Rs-er;function gu(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function Sk(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return gu;const r=10**t;return function(i){this._+=i[0];for(let n=1,a=i.length;n<a;++n)this._+=Math.round(arguments[n]*r)/r+i[n]}}class vk{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?gu:Sk(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,i,n){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+n}`}bezierCurveTo(t,r,i,n,a,s){this._append`C${+t},${+r},${+i},${+n},${this._x1=+a},${this._y1=+s}`}arcTo(t,r,i,n,a){if(t=+t,r=+r,i=+i,n=+n,a=+a,a<0)throw new Error(`negative radius: ${a}`);let s=this._x1,o=this._y1,l=i-t,c=n-r,h=s-t,u=o-r,f=h*h+u*u;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(f>er)if(!(Math.abs(u*l-c*h)>er)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let p=i-s,g=n-o,m=l*l+c*c,y=p*p+g*g,x=Math.sqrt(m),b=Math.sqrt(f),k=a*Math.tan((Fs-Math.acos((m+f-y)/(2*x*b)))/2),C=k/b,_=k/x;Math.abs(C-1)>er&&this._append`L${t+C*h},${r+C*u}`,this._append`A${a},${a},0,0,${+(u*p>h*g)},${this._x1=t+_*l},${this._y1=r+_*c}`}}arc(t,r,i,n,a,s){if(t=+t,r=+r,i=+i,s=!!s,i<0)throw new Error(`negative radius: ${i}`);let o=i*Math.cos(n),l=i*Math.sin(n),c=t+o,h=r+l,u=1^s,f=s?n-a:a-n;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>er||Math.abs(this._y1-h)>er)&&this._append`L${c},${h}`,i&&(f<0&&(f=f%Rs+Rs),f>Ck?this._append`A${i},${i},0,1,${u},${t-o},${r-l}A${i},${i},0,1,${u},${this._x1=c},${this._y1=h}`:f>er&&this._append`A${i},${i},0,${+(f>=Fs)},${u},${this._x1=t+i*Math.cos(a)},${this._y1=r+i*Math.sin(a)}`)}rect(t,r,i,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+n}h${-i}Z`}toString(){return this._}}function Tr(e){return function(){return e}}const nA=Math.abs,aA=Math.atan2,sA=Math.cos,oA=Math.max,lA=Math.min,cA=Math.sin,hA=Math.sqrt,Sc=1e-12,Oo=Math.PI,vc=Oo/2,uA=2*Oo;function fA(e){return e>1?0:e<-1?Oo:Math.acos(e)}function pA(e){return e>=1?vc:e<=-1?-vc:Math.asin(e)}function Tk(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);t=i}return e},()=>new vk(t)}function Ak(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function mu(e){this._context=e}mu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Un(e){return new mu(e)}function Bk(e){return e[0]}function Lk(e){return e[1]}function Ek(e,t){var r=Tr(!0),i=null,n=Un,a=null,s=Tk(o);e=typeof e=="function"?e:e===void 0?Bk:Tr(e),t=typeof t=="function"?t:t===void 0?Lk:Tr(t);function o(l){var c,h=(l=Ak(l)).length,u,f=!1,p;for(i==null&&(a=n(p=s())),c=0;c<=h;++c)!(c<h&&r(u=l[c],c,l))===f&&((f=!f)?a.lineStart():a.lineEnd()),f&&a.point(+e(u,c,l),+t(u,c,l));if(p)return a=null,p+""||null}return o.x=function(l){return arguments.length?(e=typeof l=="function"?l:Tr(+l),o):e},o.y=function(l){return arguments.length?(t=typeof l=="function"?l:Tr(+l),o):t},o.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Tr(!!l),o):r},o.curve=function(l){return arguments.length?(n=l,i!=null&&(a=n(i)),o):n},o.context=function(l){return arguments.length?(l==null?i=a=null:a=n(i=l),o):i},o}class yu{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function xu(e){return new yu(e,!0)}function bu(e){return new yu(e,!1)}function Ye(){}function Gn(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function _a(e){this._context=e}_a.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Gn(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Gn(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Sn(e){return new _a(e)}function ku(e){this._context=e}ku.prototype={areaStart:Ye,areaEnd:Ye,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Gn(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Mk(e){return new ku(e)}function wu(e){this._context=e}wu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:Gn(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function $k(e){return new wu(e)}function _u(e,t){this._basis=new _a(e),this._beta=t}_u.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],n=t[0],a=e[r]-i,s=t[r]-n,o=-1,l;++o<=r;)l=o/r,this._basis.point(this._beta*e[o]+(1-this._beta)*(i+l*a),this._beta*t[o]+(1-this._beta)*(n+l*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const Fk=(function e(t){function r(i){return t===1?new _a(i):new _u(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function Vn(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function Po(e,t){this._context=e,this._k=(1-t)/6}Po.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Vn(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Vn(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Cu=(function e(t){function r(i){return new Po(i,t)}return r.tension=function(i){return e(+i)},r})(0);function No(e,t){this._context=e,this._k=(1-t)/6}No.prototype={areaStart:Ye,areaEnd:Ye,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Vn(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Rk=(function e(t){function r(i){return new No(i,t)}return r.tension=function(i){return e(+i)},r})(0);function zo(e,t){this._context=e,this._k=(1-t)/6}zo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Vn(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Dk=(function e(t){function r(i){return new zo(i,t)}return r.tension=function(i){return e(+i)},r})(0);function qo(e,t,r){var i=e._x1,n=e._y1,a=e._x2,s=e._y2;if(e._l01_a>Sc){var o=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*o-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,n=(n*o-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>Sc){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,h=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*c+e._x1*e._l23_2a-t*e._l12_2a)/h,s=(s*c+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(i,n,a,s,e._x2,e._y2)}function Su(e,t){this._context=e,this._alpha=t}Su.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:qo(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const vu=(function e(t){function r(i){return t?new Su(i,t):new Po(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Tu(e,t){this._context=e,this._alpha=t}Tu.prototype={areaStart:Ye,areaEnd:Ye,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:qo(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Ik=(function e(t){function r(i){return t?new Tu(i,t):new No(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Au(e,t){this._context=e,this._alpha=t}Au.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:qo(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Ok=(function e(t){function r(i){return t?new Au(i,t):new zo(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Bu(e){this._context=e}Bu.prototype={areaStart:Ye,areaEnd:Ye,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Pk(e){return new Bu(e)}function Tc(e){return e<0?-1:1}function Ac(e,t,r){var i=e._x1-e._x0,n=t-e._x1,a=(e._y1-e._y0)/(i||n<0&&-0),s=(r-e._y1)/(n||i<0&&-0),o=(a*n+s*i)/(i+n);return(Tc(a)+Tc(s))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs(o))||0}function Bc(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function is(e,t,r){var i=e._x0,n=e._y0,a=e._x1,s=e._y1,o=(a-i)/3;e._context.bezierCurveTo(i+o,n+o*t,a-o,s-o*r,a,s)}function Xn(e){this._context=e}Xn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:is(this,this._t0,Bc(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,is(this,Bc(this,r=Ac(this,e,t)),r);break;default:is(this,this._t0,r=Ac(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Lu(e){this._context=new Eu(e)}(Lu.prototype=Object.create(Xn.prototype)).point=function(e,t){Xn.prototype.point.call(this,t,e)};function Eu(e){this._context=e}Eu.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,i,n,a){this._context.bezierCurveTo(t,e,i,r,a,n)}};function Mu(e){return new Xn(e)}function $u(e){return new Lu(e)}function Fu(e){this._context=e}Fu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var i=Lc(e),n=Lc(t),a=0,s=1;s<r;++a,++s)this._context.bezierCurveTo(i[0][a],n[0][a],i[1][a],n[1][a],e[s],t[s]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Lc(e){var t,r=e.length-1,i,n=new Array(r),a=new Array(r),s=new Array(r);for(n[0]=0,a[0]=2,s[0]=e[0]+2*e[1],t=1;t<r-1;++t)n[t]=1,a[t]=4,s[t]=4*e[t]+2*e[t+1];for(n[r-1]=2,a[r-1]=7,s[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=n[t]/a[t-1],a[t]-=i,s[t]-=i*s[t-1];for(n[r-1]=s[r-1]/a[r-1],t=r-2;t>=0;--t)n[t]=(s[t]-n[t+1])/a[t];for(a[r-1]=(e[r]+n[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-n[t+1];return[n,a]}function Ru(e){return new Fu(e)}function Ca(e,t){this._context=e,this._t=t}Ca.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function Du(e){return new Ca(e,.5)}function Iu(e){return new Ca(e,0)}function Ou(e){return new Ca(e,1)}function bi(e,t,r){this.k=e,this.x=t,this.y=r}bi.prototype={constructor:bi,scale:function(e){return e===1?this:new bi(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new bi(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};bi.prototype;var Nk=d(e=>{const{securityLevel:t}=ut();let r=at("body");if(t==="sandbox"){const a=at(`#i${e}`).node()?.contentDocument??document;r=at(a.body)}return r.select(`#${e}`)},"selectSvgElement");function Wo(e){return typeof e>"u"||e===null}d(Wo,"isNothing");function Pu(e){return typeof e=="object"&&e!==null}d(Pu,"isObject");function Nu(e){return Array.isArray(e)?e:Wo(e)?[]:[e]}d(Nu,"toArray");function zu(e,t){var r,i,n,a;if(t)for(a=Object.keys(t),r=0,i=a.length;r<i;r+=1)n=a[r],e[n]=t[n];return e}d(zu,"extend");function qu(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}d(qu,"repeat");function Wu(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}d(Wu,"isNegativeZero");var zk=Wo,qk=Pu,Wk=Nu,Hk=qu,Yk=Wu,jk=zu,St={isNothing:zk,isObject:qk,toArray:Wk,repeat:Hk,isNegativeZero:Yk,extend:jk};function Ho(e,t){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
|
|
140
|
+
|
|
141
|
+
`+e.mark.snippet),i+" "+r):i}d(Ho,"formatError");function Ur(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=Ho(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}d(Ur,"YAMLException$1");Ur.prototype=Object.create(Error.prototype);Ur.prototype.constructor=Ur;Ur.prototype.toString=d(function(t){return this.name+": "+Ho(this,t)},"toString");var Vt=Ur;function vn(e,t,r,i,n){var a="",s="",o=Math.floor(n/2)-1;return i-t>o&&(a=" ... ",t=i-o+a.length),r-i>o&&(s=" ...",r=i+o-s.length),{str:a+e.slice(t,r).replace(/\t/g,"→")+s,pos:i-t+a.length}}d(vn,"getLine");function Tn(e,t){return St.repeat(" ",t-e.length)+e}d(Tn,"padStart");function Hu(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],n=[],a,s=-1;a=r.exec(e.buffer);)n.push(a.index),i.push(a.index+a[0].length),e.position<=a.index&&s<0&&(s=i.length-2);s<0&&(s=i.length-1);var o="",l,c,h=Math.min(e.line+t.linesAfter,n.length).toString().length,u=t.maxLength-(t.indent+h+3);for(l=1;l<=t.linesBefore&&!(s-l<0);l++)c=vn(e.buffer,i[s-l],n[s-l],e.position-(i[s]-i[s-l]),u),o=St.repeat(" ",t.indent)+Tn((e.line-l+1).toString(),h)+" | "+c.str+`
|
|
142
|
+
`+o;for(c=vn(e.buffer,i[s],n[s],e.position,u),o+=St.repeat(" ",t.indent)+Tn((e.line+1).toString(),h)+" | "+c.str+`
|
|
143
|
+
`,o+=St.repeat("-",t.indent+h+3+c.pos)+`^
|
|
144
|
+
`,l=1;l<=t.linesAfter&&!(s+l>=n.length);l++)c=vn(e.buffer,i[s+l],n[s+l],e.position-(i[s]-i[s+l]),u),o+=St.repeat(" ",t.indent)+Tn((e.line+l+1).toString(),h)+" | "+c.str+`
|
|
145
|
+
`;return o.replace(/\n$/,"")}d(Hu,"makeSnippet");var Uk=Hu,Gk=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Vk=["scalar","sequence","mapping"];function Yu(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}d(Yu,"compileStyleAliases");function ju(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(Gk.indexOf(r)===-1)throw new Vt('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=Yu(t.styleAliases||null),Vk.indexOf(this.kind)===-1)throw new Vt('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}d(ju,"Type$1");var Dt=ju;function Ds(e,t){var r=[];return e[t].forEach(function(i){var n=r.length;r.forEach(function(a,s){a.tag===i.tag&&a.kind===i.kind&&a.multi===i.multi&&(n=s)}),r[n]=i}),r}d(Ds,"compileList");function Uu(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(n){n.multi?(e.multi[n.kind].push(n),e.multi.fallback.push(n)):e[n.kind][n.tag]=e.fallback[n.tag]=n}for(d(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}d(Uu,"compileMap");function Zn(e){return this.extend(e)}d(Zn,"Schema$1");Zn.prototype.extend=d(function(t){var r=[],i=[];if(t instanceof Dt)i.push(t);else if(Array.isArray(t))i=i.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(i=i.concat(t.explicit));else throw new Vt("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(a){if(!(a instanceof Dt))throw new Vt("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new Vt("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new Vt("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(a){if(!(a instanceof Dt))throw new Vt("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var n=Object.create(Zn.prototype);return n.implicit=(this.implicit||[]).concat(r),n.explicit=(this.explicit||[]).concat(i),n.compiledImplicit=Ds(n,"implicit"),n.compiledExplicit=Ds(n,"explicit"),n.compiledTypeMap=Uu(n.compiledImplicit,n.compiledExplicit),n},"extend");var Xk=Zn,Zk=new Dt("tag:yaml.org,2002:str",{kind:"scalar",construct:d(function(e){return e!==null?e:""},"construct")}),Qk=new Dt("tag:yaml.org,2002:seq",{kind:"sequence",construct:d(function(e){return e!==null?e:[]},"construct")}),Kk=new Dt("tag:yaml.org,2002:map",{kind:"mapping",construct:d(function(e){return e!==null?e:{}},"construct")}),Jk=new Xk({explicit:[Zk,Qk,Kk]});function Gu(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}d(Gu,"resolveYamlNull");function Vu(){return null}d(Vu,"constructYamlNull");function Xu(e){return e===null}d(Xu,"isNull");var t2=new Dt("tag:yaml.org,2002:null",{kind:"scalar",resolve:Gu,construct:Vu,predicate:Xu,represent:{canonical:d(function(){return"~"},"canonical"),lowercase:d(function(){return"null"},"lowercase"),uppercase:d(function(){return"NULL"},"uppercase"),camelcase:d(function(){return"Null"},"camelcase"),empty:d(function(){return""},"empty")},defaultStyle:"lowercase"});function Zu(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}d(Zu,"resolveYamlBoolean");function Qu(e){return e==="true"||e==="True"||e==="TRUE"}d(Qu,"constructYamlBoolean");function Ku(e){return Object.prototype.toString.call(e)==="[object Boolean]"}d(Ku,"isBoolean");var e2=new Dt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Zu,construct:Qu,predicate:Ku,represent:{lowercase:d(function(e){return e?"true":"false"},"lowercase"),uppercase:d(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:d(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function Ju(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}d(Ju,"isHexCode");function tf(e){return 48<=e&&e<=55}d(tf,"isOctCode");function ef(e){return 48<=e&&e<=57}d(ef,"isDecCode");function rf(e){if(e===null)return!1;var t=e.length,r=0,i=!1,n;if(!t)return!1;if(n=e[r],(n==="-"||n==="+")&&(n=e[++r]),n==="0"){if(r+1===t)return!0;if(n=e[++r],n==="b"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(n!=="0"&&n!=="1")return!1;i=!0}return i&&n!=="_"}if(n==="x"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(!Ju(e.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}if(n==="o"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(!tf(e.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}}if(n==="_")return!1;for(;r<t;r++)if(n=e[r],n!=="_"){if(!ef(e.charCodeAt(r)))return!1;i=!0}return!(!i||n==="_")}d(rf,"resolveYamlInteger");function nf(e){var t=e,r=1,i;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),i=t[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),t=t.slice(1),i=t[0]),t==="0")return 0;if(i==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}d(nf,"constructYamlInteger");function af(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!St.isNegativeZero(e)}d(af,"isInteger");var r2=new Dt("tag:yaml.org,2002:int",{kind:"scalar",resolve:rf,construct:nf,predicate:af,represent:{binary:d(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:d(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:d(function(e){return e.toString(10)},"decimal"),hexadecimal:d(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),i2=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function sf(e){return!(e===null||!i2.test(e)||e[e.length-1]==="_")}d(sf,"resolveYamlFloat");function of(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}d(of,"constructYamlFloat");var n2=/^[-+]?[0-9]+e/;function lf(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(St.isNegativeZero(e))return"-0.0";return r=e.toString(10),n2.test(r)?r.replace("e",".e"):r}d(lf,"representYamlFloat");function cf(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||St.isNegativeZero(e))}d(cf,"isFloat");var a2=new Dt("tag:yaml.org,2002:float",{kind:"scalar",resolve:sf,construct:of,predicate:cf,represent:lf,defaultStyle:"lowercase"}),hf=Jk.extend({implicit:[t2,e2,r2,a2]}),s2=hf,uf=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),ff=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function pf(e){return e===null?!1:uf.exec(e)!==null||ff.exec(e)!==null}d(pf,"resolveYamlTimestamp");function df(e){var t,r,i,n,a,s,o,l=0,c=null,h,u,f;if(t=uf.exec(e),t===null&&(t=ff.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,n=+t[3],!t[4])return new Date(Date.UTC(r,i,n));if(a=+t[4],s=+t[5],o=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(h=+t[10],u=+(t[11]||0),c=(h*60+u)*6e4,t[9]==="-"&&(c=-c)),f=new Date(Date.UTC(r,i,n,a,s,o,l)),c&&f.setTime(f.getTime()-c),f}d(df,"constructYamlTimestamp");function gf(e){return e.toISOString()}d(gf,"representYamlTimestamp");var o2=new Dt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:pf,construct:df,instanceOf:Date,represent:gf});function mf(e){return e==="<<"||e===null}d(mf,"resolveYamlMerge");var l2=new Dt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:mf}),Yo=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
146
|
+
\r`;function yf(e){if(e===null)return!1;var t,r,i=0,n=e.length,a=Yo;for(r=0;r<n;r++)if(t=a.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}d(yf,"resolveYamlBinary");function xf(e){var t,r,i=e.replace(/[\r\n=]/g,""),n=i.length,a=Yo,s=0,o=[];for(t=0;t<n;t++)t%4===0&&t&&(o.push(s>>16&255),o.push(s>>8&255),o.push(s&255)),s=s<<6|a.indexOf(i.charAt(t));return r=n%4*6,r===0?(o.push(s>>16&255),o.push(s>>8&255),o.push(s&255)):r===18?(o.push(s>>10&255),o.push(s>>2&255)):r===12&&o.push(s>>4&255),new Uint8Array(o)}d(xf,"constructYamlBinary");function bf(e){var t="",r=0,i,n,a=e.length,s=Yo;for(i=0;i<a;i++)i%3===0&&i&&(t+=s[r>>18&63],t+=s[r>>12&63],t+=s[r>>6&63],t+=s[r&63]),r=(r<<8)+e[i];return n=a%3,n===0?(t+=s[r>>18&63],t+=s[r>>12&63],t+=s[r>>6&63],t+=s[r&63]):n===2?(t+=s[r>>10&63],t+=s[r>>4&63],t+=s[r<<2&63],t+=s[64]):n===1&&(t+=s[r>>2&63],t+=s[r<<4&63],t+=s[64],t+=s[64]),t}d(bf,"representYamlBinary");function kf(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}d(kf,"isBinary");var c2=new Dt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:yf,construct:xf,predicate:kf,represent:bf}),h2=Object.prototype.hasOwnProperty,u2=Object.prototype.toString;function wf(e){if(e===null)return!0;var t=[],r,i,n,a,s,o=e;for(r=0,i=o.length;r<i;r+=1){if(n=o[r],s=!1,u2.call(n)!=="[object Object]")return!1;for(a in n)if(h2.call(n,a))if(!s)s=!0;else return!1;if(!s)return!1;if(t.indexOf(a)===-1)t.push(a);else return!1}return!0}d(wf,"resolveYamlOmap");function _f(e){return e!==null?e:[]}d(_f,"constructYamlOmap");var f2=new Dt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:wf,construct:_f}),p2=Object.prototype.toString;function Cf(e){if(e===null)return!0;var t,r,i,n,a,s=e;for(a=new Array(s.length),t=0,r=s.length;t<r;t+=1){if(i=s[t],p2.call(i)!=="[object Object]"||(n=Object.keys(i),n.length!==1))return!1;a[t]=[n[0],i[n[0]]]}return!0}d(Cf,"resolveYamlPairs");function Sf(e){if(e===null)return[];var t,r,i,n,a,s=e;for(a=new Array(s.length),t=0,r=s.length;t<r;t+=1)i=s[t],n=Object.keys(i),a[t]=[n[0],i[n[0]]];return a}d(Sf,"constructYamlPairs");var d2=new Dt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Cf,construct:Sf}),g2=Object.prototype.hasOwnProperty;function vf(e){if(e===null)return!0;var t,r=e;for(t in r)if(g2.call(r,t)&&r[t]!==null)return!1;return!0}d(vf,"resolveYamlSet");function Tf(e){return e!==null?e:{}}d(Tf,"constructYamlSet");var m2=new Dt("tag:yaml.org,2002:set",{kind:"mapping",resolve:vf,construct:Tf}),Af=s2.extend({implicit:[o2,l2],explicit:[c2,f2,d2,m2]}),je=Object.prototype.hasOwnProperty,Qn=1,Bf=2,Lf=3,Kn=4,ns=1,y2=2,Ec=3,x2=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,b2=/[\x85\u2028\u2029]/,k2=/[,\[\]\{\}]/,Ef=/^(?:!|!!|![a-z\-]+!)$/i,Mf=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Is(e){return Object.prototype.toString.call(e)}d(Is,"_class");function ue(e){return e===10||e===13}d(ue,"is_EOL");function We(e){return e===9||e===32}d(We,"is_WHITE_SPACE");function qt(e){return e===9||e===32||e===10||e===13}d(qt,"is_WS_OR_EOL");function ar(e){return e===44||e===91||e===93||e===123||e===125}d(ar,"is_FLOW_INDICATOR");function $f(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}d($f,"fromHexCode");function Ff(e){return e===120?2:e===117?4:e===85?8:0}d(Ff,"escapedHexLen");function Rf(e){return 48<=e&&e<=57?e-48:-1}d(Rf,"fromDecimalCode");function Os(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
|
|
147
|
+
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"
":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}d(Os,"simpleEscapeSequence");function Df(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}d(Df,"charFromCodepoint");var If=new Array(256),Of=new Array(256);for(tr=0;tr<256;tr++)If[tr]=Os(tr)?1:0,Of[tr]=Os(tr);var tr;function Pf(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Af,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}d(Pf,"State$1");function jo(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=Uk(r),new Vt(t,r)}d(jo,"generateError");function V(e,t){throw jo(e,t)}d(V,"throwError");function Di(e,t){e.onWarning&&e.onWarning.call(null,jo(e,t))}d(Di,"throwWarning");var Mc={YAML:d(function(t,r,i){var n,a,s;t.version!==null&&V(t,"duplication of %YAML directive"),i.length!==1&&V(t,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&&V(t,"ill-formed argument of the YAML directive"),a=parseInt(n[1],10),s=parseInt(n[2],10),a!==1&&V(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=s<2,s!==1&&s!==2&&Di(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:d(function(t,r,i){var n,a;i.length!==2&&V(t,"TAG directive accepts exactly two arguments"),n=i[0],a=i[1],Ef.test(n)||V(t,"ill-formed tag handle (first argument) of the TAG directive"),je.call(t.tagMap,n)&&V(t,'there is a previously declared suffix for "'+n+'" tag handle'),Mf.test(a)||V(t,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{V(t,"tag prefix is malformed: "+a)}t.tagMap[n]=a},"handleTagDirective")};function De(e,t,r,i){var n,a,s,o;if(t<r){if(o=e.input.slice(t,r),i)for(n=0,a=o.length;n<a;n+=1)s=o.charCodeAt(n),s===9||32<=s&&s<=1114111||V(e,"expected valid JSON character");else x2.test(o)&&V(e,"the stream contains non-printable characters");e.result+=o}}d(De,"captureSegment");function Ps(e,t,r,i){var n,a,s,o;for(St.isObject(r)||V(e,"cannot merge mappings; the provided source object is unacceptable"),n=Object.keys(r),s=0,o=n.length;s<o;s+=1)a=n[s],je.call(t,a)||(t[a]=r[a],i[a]=!0)}d(Ps,"mergeMappings");function sr(e,t,r,i,n,a,s,o,l){var c,h;if(Array.isArray(n))for(n=Array.prototype.slice.call(n),c=0,h=n.length;c<h;c+=1)Array.isArray(n[c])&&V(e,"nested arrays are not supported inside keys"),typeof n=="object"&&Is(n[c])==="[object Object]"&&(n[c]="[object Object]");if(typeof n=="object"&&Is(n)==="[object Object]"&&(n="[object Object]"),n=String(n),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(a))for(c=0,h=a.length;c<h;c+=1)Ps(e,t,a[c],r);else Ps(e,t,a,r);else!e.json&&!je.call(r,n)&&je.call(t,n)&&(e.line=s||e.line,e.lineStart=o||e.lineStart,e.position=l||e.position,V(e,"duplicated mapping key")),n==="__proto__"?Object.defineProperty(t,n,{configurable:!0,enumerable:!0,writable:!0,value:a}):t[n]=a,delete r[n];return t}d(sr,"storeMappingPair");function Sa(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):V(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}d(Sa,"readLineBreak");function yt(e,t,r){for(var i=0,n=e.input.charCodeAt(e.position);n!==0;){for(;We(n);)n===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),n=e.input.charCodeAt(++e.position);if(t&&n===35)do n=e.input.charCodeAt(++e.position);while(n!==10&&n!==13&&n!==0);if(ue(n))for(Sa(e),n=e.input.charCodeAt(e.position),i++,e.lineIndent=0;n===32;)e.lineIndent++,n=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&Di(e,"deficient indentation"),i}d(yt,"skipSeparationSpace");function Gi(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||qt(r)))}d(Gi,"testDocumentSeparator");function va(e,t){t===1?e.result+=" ":t>1&&(e.result+=St.repeat(`
|
|
148
|
+
`,t-1))}d(va,"writeFoldedLines");function Nf(e,t,r){var i,n,a,s,o,l,c,h,u=e.kind,f=e.result,p;if(p=e.input.charCodeAt(e.position),qt(p)||ar(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(n=e.input.charCodeAt(e.position+1),qt(n)||r&&ar(n)))return!1;for(e.kind="scalar",e.result="",a=s=e.position,o=!1;p!==0;){if(p===58){if(n=e.input.charCodeAt(e.position+1),qt(n)||r&&ar(n))break}else if(p===35){if(i=e.input.charCodeAt(e.position-1),qt(i))break}else{if(e.position===e.lineStart&&Gi(e)||r&&ar(p))break;if(ue(p))if(l=e.line,c=e.lineStart,h=e.lineIndent,yt(e,!1,-1),e.lineIndent>=t){o=!0,p=e.input.charCodeAt(e.position);continue}else{e.position=s,e.line=l,e.lineStart=c,e.lineIndent=h;break}}o&&(De(e,a,s,!1),va(e,e.line-l),a=s=e.position,o=!1),We(p)||(s=e.position+1),p=e.input.charCodeAt(++e.position)}return De(e,a,s,!1),e.result?!0:(e.kind=u,e.result=f,!1)}d(Nf,"readPlainScalar");function zf(e,t){var r,i,n;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=n=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(De(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,n=e.position;else return!0;else ue(r)?(De(e,i,n,!0),va(e,yt(e,!1,t)),i=n=e.position):e.position===e.lineStart&&Gi(e)?V(e,"unexpected end of the document within a single quoted scalar"):(e.position++,n=e.position);V(e,"unexpected end of the stream within a single quoted scalar")}d(zf,"readSingleQuotedScalar");function qf(e,t){var r,i,n,a,s,o;if(o=e.input.charCodeAt(e.position),o!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(o=e.input.charCodeAt(e.position))!==0;){if(o===34)return De(e,r,e.position,!0),e.position++,!0;if(o===92){if(De(e,r,e.position,!0),o=e.input.charCodeAt(++e.position),ue(o))yt(e,!1,t);else if(o<256&&If[o])e.result+=Of[o],e.position++;else if((s=Ff(o))>0){for(n=s,a=0;n>0;n--)o=e.input.charCodeAt(++e.position),(s=$f(o))>=0?a=(a<<4)+s:V(e,"expected hexadecimal character");e.result+=Df(a),e.position++}else V(e,"unknown escape sequence");r=i=e.position}else ue(o)?(De(e,r,i,!0),va(e,yt(e,!1,t)),r=i=e.position):e.position===e.lineStart&&Gi(e)?V(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}V(e,"unexpected end of the stream within a double quoted scalar")}d(qf,"readDoubleQuotedScalar");function Wf(e,t){var r=!0,i,n,a,s=e.tag,o,l=e.anchor,c,h,u,f,p,g=Object.create(null),m,y,x,b;if(b=e.input.charCodeAt(e.position),b===91)h=93,p=!1,o=[];else if(b===123)h=125,p=!0,o={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),b=e.input.charCodeAt(++e.position);b!==0;){if(yt(e,!0,t),b=e.input.charCodeAt(e.position),b===h)return e.position++,e.tag=s,e.anchor=l,e.kind=p?"mapping":"sequence",e.result=o,!0;r?b===44&&V(e,"expected the node content, but found ','"):V(e,"missed comma between flow collection entries"),y=m=x=null,u=f=!1,b===63&&(c=e.input.charCodeAt(e.position+1),qt(c)&&(u=f=!0,e.position++,yt(e,!0,t))),i=e.line,n=e.lineStart,a=e.position,dr(e,t,Qn,!1,!0),y=e.tag,m=e.result,yt(e,!0,t),b=e.input.charCodeAt(e.position),(f||e.line===i)&&b===58&&(u=!0,b=e.input.charCodeAt(++e.position),yt(e,!0,t),dr(e,t,Qn,!1,!0),x=e.result),p?sr(e,o,g,y,m,x,i,n,a):u?o.push(sr(e,null,g,y,m,x,i,n,a)):o.push(m),yt(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}V(e,"unexpected end of the stream within a flow collection")}d(Wf,"readFlowCollection");function Hf(e,t){var r,i,n=ns,a=!1,s=!1,o=t,l=0,c=!1,h,u;if(u=e.input.charCodeAt(e.position),u===124)i=!1;else if(u===62)i=!0;else return!1;for(e.kind="scalar",e.result="";u!==0;)if(u=e.input.charCodeAt(++e.position),u===43||u===45)ns===n?n=u===43?Ec:y2:V(e,"repeat of a chomping mode identifier");else if((h=Rf(u))>=0)h===0?V(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?V(e,"repeat of an indentation width identifier"):(o=t+h-1,s=!0);else break;if(We(u)){do u=e.input.charCodeAt(++e.position);while(We(u));if(u===35)do u=e.input.charCodeAt(++e.position);while(!ue(u)&&u!==0)}for(;u!==0;){for(Sa(e),e.lineIndent=0,u=e.input.charCodeAt(e.position);(!s||e.lineIndent<o)&&u===32;)e.lineIndent++,u=e.input.charCodeAt(++e.position);if(!s&&e.lineIndent>o&&(o=e.lineIndent),ue(u)){l++;continue}if(e.lineIndent<o){n===Ec?e.result+=St.repeat(`
|
|
149
|
+
`,a?1+l:l):n===ns&&a&&(e.result+=`
|
|
150
|
+
`);break}for(i?We(u)?(c=!0,e.result+=St.repeat(`
|
|
151
|
+
`,a?1+l:l)):c?(c=!1,e.result+=St.repeat(`
|
|
152
|
+
`,l+1)):l===0?a&&(e.result+=" "):e.result+=St.repeat(`
|
|
153
|
+
`,l):e.result+=St.repeat(`
|
|
154
|
+
`,a?1+l:l),a=!0,s=!0,l=0,r=e.position;!ue(u)&&u!==0;)u=e.input.charCodeAt(++e.position);De(e,r,e.position,!1)}return!0}d(Hf,"readBlockScalar");function Ns(e,t){var r,i=e.tag,n=e.anchor,a=[],s,o=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,V(e,"tab characters must not be used in indentation")),!(l!==45||(s=e.input.charCodeAt(e.position+1),!qt(s))));){if(o=!0,e.position++,yt(e,!0,-1)&&e.lineIndent<=t){a.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,dr(e,t,Lf,!1,!0),a.push(e.result),yt(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)V(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return o?(e.tag=i,e.anchor=n,e.kind="sequence",e.result=a,!0):!1}d(Ns,"readBlockSequence");function Yf(e,t,r){var i,n,a,s,o,l,c=e.tag,h=e.anchor,u={},f=Object.create(null),p=null,g=null,m=null,y=!1,x=!1,b;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),b=e.input.charCodeAt(e.position);b!==0;){if(!y&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,V(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),a=e.line,(b===63||b===58)&&qt(i))b===63?(y&&(sr(e,u,f,p,g,null,s,o,l),p=g=m=null),x=!0,y=!0,n=!0):y?(y=!1,n=!0):V(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,b=i;else{if(s=e.line,o=e.lineStart,l=e.position,!dr(e,r,Bf,!1,!0))break;if(e.line===a){for(b=e.input.charCodeAt(e.position);We(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),qt(b)||V(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(sr(e,u,f,p,g,null,s,o,l),p=g=m=null),x=!0,y=!1,n=!1,p=e.tag,g=e.result;else if(x)V(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=c,e.anchor=h,!0}else if(x)V(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=c,e.anchor=h,!0}if((e.line===a||e.lineIndent>t)&&(y&&(s=e.line,o=e.lineStart,l=e.position),dr(e,t,Kn,!0,n)&&(y?g=e.result:m=e.result),y||(sr(e,u,f,p,g,m,s,o,l),p=g=m=null),yt(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&b!==0)V(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&sr(e,u,f,p,g,null,s,o,l),x&&(e.tag=c,e.anchor=h,e.kind="mapping",e.result=u),x}d(Yf,"readBlockMapping");function jf(e){var t,r=!1,i=!1,n,a,s;if(s=e.input.charCodeAt(e.position),s!==33)return!1;if(e.tag!==null&&V(e,"duplication of a tag property"),s=e.input.charCodeAt(++e.position),s===60?(r=!0,s=e.input.charCodeAt(++e.position)):s===33?(i=!0,n="!!",s=e.input.charCodeAt(++e.position)):n="!",t=e.position,r){do s=e.input.charCodeAt(++e.position);while(s!==0&&s!==62);e.position<e.length?(a=e.input.slice(t,e.position),s=e.input.charCodeAt(++e.position)):V(e,"unexpected end of the stream within a verbatim tag")}else{for(;s!==0&&!qt(s);)s===33&&(i?V(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),Ef.test(n)||V(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),s=e.input.charCodeAt(++e.position);a=e.input.slice(t,e.position),k2.test(a)&&V(e,"tag suffix cannot contain flow indicator characters")}a&&!Mf.test(a)&&V(e,"tag name cannot contain such characters: "+a);try{a=decodeURIComponent(a)}catch{V(e,"tag name is malformed: "+a)}return r?e.tag=a:je.call(e.tagMap,n)?e.tag=e.tagMap[n]+a:n==="!"?e.tag="!"+a:n==="!!"?e.tag="tag:yaml.org,2002:"+a:V(e,'undeclared tag handle "'+n+'"'),!0}d(jf,"readTagProperty");function Uf(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&V(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!qt(r)&&!ar(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&V(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}d(Uf,"readAnchorProperty");function Gf(e){var t,r,i;if(i=e.input.charCodeAt(e.position),i!==42)return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!qt(i)&&!ar(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&V(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),je.call(e.anchorMap,r)||V(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],yt(e,!0,-1),!0}d(Gf,"readAlias");function dr(e,t,r,i,n){var a,s,o,l=1,c=!1,h=!1,u,f,p,g,m,y;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=s=o=Kn===r||Lf===r,i&&yt(e,!0,-1)&&(c=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;jf(e)||Uf(e);)yt(e,!0,-1)?(c=!0,o=a,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):o=!1;if(o&&(o=c||n),(l===1||Kn===r)&&(Qn===r||Bf===r?m=t:m=t+1,y=e.position-e.lineStart,l===1?o&&(Ns(e,y)||Yf(e,y,m))||Wf(e,m)?h=!0:(s&&Hf(e,m)||zf(e,m)||qf(e,m)?h=!0:Gf(e)?(h=!0,(e.tag!==null||e.anchor!==null)&&V(e,"alias node should not have any properties")):Nf(e,m,Qn===r)&&(h=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(h=o&&Ns(e,y))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&V(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),u=0,f=e.implicitTypes.length;u<f;u+=1)if(g=e.implicitTypes[u],g.resolve(e.result)){e.result=g.construct(e.result),e.tag=g.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(je.call(e.typeMap[e.kind||"fallback"],e.tag))g=e.typeMap[e.kind||"fallback"][e.tag];else for(g=null,p=e.typeMap.multi[e.kind||"fallback"],u=0,f=p.length;u<f;u+=1)if(e.tag.slice(0,p[u].tag.length)===p[u].tag){g=p[u];break}g||V(e,"unknown tag !<"+e.tag+">"),e.result!==null&&g.kind!==e.kind&&V(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+g.kind+'", not "'+e.kind+'"'),g.resolve(e.result,e.tag)?(e.result=g.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):V(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||h}d(dr,"composeNode");function Vf(e){var t=e.position,r,i,n,a=!1,s;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(s=e.input.charCodeAt(e.position))!==0&&(yt(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||s!==37));){for(a=!0,s=e.input.charCodeAt(++e.position),r=e.position;s!==0&&!qt(s);)s=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),n=[],i.length<1&&V(e,"directive name must not be less than one character in length");s!==0;){for(;We(s);)s=e.input.charCodeAt(++e.position);if(s===35){do s=e.input.charCodeAt(++e.position);while(s!==0&&!ue(s));break}if(ue(s))break;for(r=e.position;s!==0&&!qt(s);)s=e.input.charCodeAt(++e.position);n.push(e.input.slice(r,e.position))}s!==0&&Sa(e),je.call(Mc,i)?Mc[i](e,i,n):Di(e,'unknown document directive "'+i+'"')}if(yt(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,yt(e,!0,-1)):a&&V(e,"directives end mark is expected"),dr(e,e.lineIndent-1,Kn,!1,!0),yt(e,!0,-1),e.checkLineBreaks&&b2.test(e.input.slice(t,e.position))&&Di(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Gi(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,yt(e,!0,-1));return}if(e.position<e.length-1)V(e,"end of the stream or a document separator is expected");else return}d(Vf,"readDocument");function Uo(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
|
|
155
|
+
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new Pf(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,V(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)Vf(r);return r.documents}d(Uo,"loadDocuments");function w2(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=Uo(e,r);if(typeof t!="function")return i;for(var n=0,a=i.length;n<a;n+=1)t(i[n])}d(w2,"loadAll$1");function Xf(e,t){var r=Uo(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new Vt("expected a single document in the stream, but found more")}}d(Xf,"load$1");var _2=Xf,C2={load:_2},Zf=Object.prototype.toString,Qf=Object.prototype.hasOwnProperty,Go=65279,S2=9,Ii=10,v2=13,T2=32,A2=33,B2=34,zs=35,L2=37,E2=38,M2=39,$2=42,Kf=44,F2=45,Jn=58,R2=61,D2=62,I2=63,O2=64,Jf=91,tp=93,P2=96,ep=123,N2=124,rp=125,Ot={};Ot[0]="\\0";Ot[7]="\\a";Ot[8]="\\b";Ot[9]="\\t";Ot[10]="\\n";Ot[11]="\\v";Ot[12]="\\f";Ot[13]="\\r";Ot[27]="\\e";Ot[34]='\\"';Ot[92]="\\\\";Ot[133]="\\N";Ot[160]="\\_";Ot[8232]="\\L";Ot[8233]="\\P";var z2=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],q2=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function ip(e,t){var r,i,n,a,s,o,l;if(t===null)return{};for(r={},i=Object.keys(t),n=0,a=i.length;n<a;n+=1)s=i[n],o=String(t[s]),s.slice(0,2)==="!!"&&(s="tag:yaml.org,2002:"+s.slice(2)),l=e.compiledTypeMap.fallback[s],l&&Qf.call(l.styleAliases,o)&&(o=l.styleAliases[o]),r[s]=o;return r}d(ip,"compileStyleMap");function np(e){var t,r,i;if(t=e.toString(16).toUpperCase(),e<=255)r="x",i=2;else if(e<=65535)r="u",i=4;else if(e<=4294967295)r="U",i=8;else throw new Vt("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+St.repeat("0",i-t.length)+t}d(np,"encodeHex");var W2=1,Oi=2;function ap(e){this.schema=e.schema||Af,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=St.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=ip(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?Oi:W2,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}d(ap,"State");function qs(e,t){for(var r=St.repeat(" ",t),i=0,n=-1,a="",s,o=e.length;i<o;)n=e.indexOf(`
|
|
156
|
+
`,i),n===-1?(s=e.slice(i),i=o):(s=e.slice(i,n+1),i=n+1),s.length&&s!==`
|
|
157
|
+
`&&(a+=r),a+=s;return a}d(qs,"indentString");function ta(e,t){return`
|
|
158
|
+
`+St.repeat(" ",e.indent*t)}d(ta,"generateNextLine");function sp(e,t){var r,i,n;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(n=e.implicitTypes[r],n.resolve(t))return!0;return!1}d(sp,"testImplicitResolving");function Pi(e){return e===T2||e===S2}d(Pi,"isWhitespace");function Gr(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Go||65536<=e&&e<=1114111}d(Gr,"isPrintable");function Ws(e){return Gr(e)&&e!==Go&&e!==v2&&e!==Ii}d(Ws,"isNsCharOrWhitespace");function Hs(e,t,r){var i=Ws(e),n=i&&!Pi(e);return(r?i:i&&e!==Kf&&e!==Jf&&e!==tp&&e!==ep&&e!==rp)&&e!==zs&&!(t===Jn&&!n)||Ws(t)&&!Pi(t)&&e===zs||t===Jn&&n}d(Hs,"isPlainSafe");function op(e){return Gr(e)&&e!==Go&&!Pi(e)&&e!==F2&&e!==I2&&e!==Jn&&e!==Kf&&e!==Jf&&e!==tp&&e!==ep&&e!==rp&&e!==zs&&e!==E2&&e!==$2&&e!==A2&&e!==N2&&e!==R2&&e!==D2&&e!==M2&&e!==B2&&e!==L2&&e!==O2&&e!==P2}d(op,"isPlainSafeFirst");function lp(e){return!Pi(e)&&e!==Jn}d(lp,"isPlainSafeLast");function Er(e,t){var r=e.charCodeAt(t),i;return r>=55296&&r<=56319&&t+1<e.length&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}d(Er,"codePointAt");function Vo(e){var t=/^\n* /;return t.test(e)}d(Vo,"needIndentIndicator");var cp=1,Ys=2,hp=3,up=4,Br=5;function fp(e,t,r,i,n,a,s,o){var l,c=0,h=null,u=!1,f=!1,p=i!==-1,g=-1,m=op(Er(e,0))&&lp(Er(e,e.length-1));if(t||s)for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=Er(e,l),!Gr(c))return Br;m=m&&Hs(c,h,o),h=c}else{for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=Er(e,l),c===Ii)u=!0,p&&(f=f||l-g-1>i&&e[g+1]!==" ",g=l);else if(!Gr(c))return Br;m=m&&Hs(c,h,o),h=c}f=f||p&&l-g-1>i&&e[g+1]!==" "}return!u&&!f?m&&!s&&!n(e)?cp:a===Oi?Br:Ys:r>9&&Vo(e)?Br:s?a===Oi?Br:Ys:f?up:hp}d(fp,"chooseScalarStyle");function pp(e,t,r,i,n){e.dump=(function(){if(t.length===0)return e.quotingType===Oi?'""':"''";if(!e.noCompatMode&&(z2.indexOf(t)!==-1||q2.test(t)))return e.quotingType===Oi?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,r),s=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),o=i||e.flowLevel>-1&&r>=e.flowLevel;function l(c){return sp(e,c)}switch(d(l,"testAmbiguity"),fp(t,o,e.indent,s,l,e.quotingType,e.forceQuotes&&!i,n)){case cp:return t;case Ys:return"'"+t.replace(/'/g,"''")+"'";case hp:return"|"+js(t,e.indent)+Us(qs(t,a));case up:return">"+js(t,e.indent)+Us(qs(dp(t,s),a));case Br:return'"'+gp(t)+'"';default:throw new Vt("impossible error: invalid scalar style")}})()}d(pp,"writeScalar");function js(e,t){var r=Vo(e)?String(t):"",i=e[e.length-1]===`
|
|
159
|
+
`,n=i&&(e[e.length-2]===`
|
|
160
|
+
`||e===`
|
|
161
|
+
`),a=n?"+":i?"":"-";return r+a+`
|
|
162
|
+
`}d(js,"blockHeader");function Us(e){return e[e.length-1]===`
|
|
163
|
+
`?e.slice(0,-1):e}d(Us,"dropEndingNewline");function dp(e,t){for(var r=/(\n+)([^\n]*)/g,i=(function(){var c=e.indexOf(`
|
|
164
|
+
`);return c=c!==-1?c:e.length,r.lastIndex=c,Gs(e.slice(0,c),t)})(),n=e[0]===`
|
|
165
|
+
`||e[0]===" ",a,s;s=r.exec(e);){var o=s[1],l=s[2];a=l[0]===" ",i+=o+(!n&&!a&&l!==""?`
|
|
166
|
+
`:"")+Gs(l,t),n=a}return i}d(dp,"foldString");function Gs(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,n=0,a,s=0,o=0,l="";i=r.exec(e);)o=i.index,o-n>t&&(a=s>n?s:o,l+=`
|
|
167
|
+
`+e.slice(n,a),n=a+1),s=o;return l+=`
|
|
168
|
+
`,e.length-n>t&&s>n?l+=e.slice(n,s)+`
|
|
169
|
+
`+e.slice(s+1):l+=e.slice(n),l.slice(1)}d(Gs,"foldLine");function gp(e){for(var t="",r=0,i,n=0;n<e.length;r>=65536?n+=2:n++)r=Er(e,n),i=Ot[r],!i&&Gr(r)?(t+=e[n],r>=65536&&(t+=e[n+1])):t+=i||np(r);return t}d(gp,"escapeString");function mp(e,t,r){var i="",n=e.tag,a,s,o;for(a=0,s=r.length;a<s;a+=1)o=r[a],e.replacer&&(o=e.replacer.call(r,String(a),o)),(Ce(e,t,o,!1,!1)||typeof o>"u"&&Ce(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=n,e.dump="["+i+"]"}d(mp,"writeFlowSequence");function Vs(e,t,r,i){var n="",a=e.tag,s,o,l;for(s=0,o=r.length;s<o;s+=1)l=r[s],e.replacer&&(l=e.replacer.call(r,String(s),l)),(Ce(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&Ce(e,t+1,null,!0,!0,!1,!0))&&((!i||n!=="")&&(n+=ta(e,t)),e.dump&&Ii===e.dump.charCodeAt(0)?n+="-":n+="- ",n+=e.dump);e.tag=a,e.dump=n||"[]"}d(Vs,"writeBlockSequence");function yp(e,t,r){var i="",n=e.tag,a=Object.keys(r),s,o,l,c,h;for(s=0,o=a.length;s<o;s+=1)h="",i!==""&&(h+=", "),e.condenseFlow&&(h+='"'),l=a[s],c=r[l],e.replacer&&(c=e.replacer.call(r,l,c)),Ce(e,t,l,!1,!1)&&(e.dump.length>1024&&(h+="? "),h+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Ce(e,t,c,!1,!1)&&(h+=e.dump,i+=h));e.tag=n,e.dump="{"+i+"}"}d(yp,"writeFlowMapping");function xp(e,t,r,i){var n="",a=e.tag,s=Object.keys(r),o,l,c,h,u,f;if(e.sortKeys===!0)s.sort();else if(typeof e.sortKeys=="function")s.sort(e.sortKeys);else if(e.sortKeys)throw new Vt("sortKeys must be a boolean or a function");for(o=0,l=s.length;o<l;o+=1)f="",(!i||n!=="")&&(f+=ta(e,t)),c=s[o],h=r[c],e.replacer&&(h=e.replacer.call(r,c,h)),Ce(e,t+1,c,!0,!0,!0)&&(u=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,u&&(e.dump&&Ii===e.dump.charCodeAt(0)?f+="?":f+="? "),f+=e.dump,u&&(f+=ta(e,t)),Ce(e,t+1,h,!0,u)&&(e.dump&&Ii===e.dump.charCodeAt(0)?f+=":":f+=": ",f+=e.dump,n+=f));e.tag=a,e.dump=n||"{}"}d(xp,"writeBlockMapping");function Xs(e,t,r){var i,n,a,s,o,l;for(n=r?e.explicitTypes:e.implicitTypes,a=0,s=n.length;a<s;a+=1)if(o=n[a],(o.instanceOf||o.predicate)&&(!o.instanceOf||typeof t=="object"&&t instanceof o.instanceOf)&&(!o.predicate||o.predicate(t))){if(r?o.multi&&o.representName?e.tag=o.representName(t):e.tag=o.tag:e.tag="?",o.represent){if(l=e.styleMap[o.tag]||o.defaultStyle,Zf.call(o.represent)==="[object Function]")i=o.represent(t,l);else if(Qf.call(o.represent,l))i=o.represent[l](t,l);else throw new Vt("!<"+o.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}d(Xs,"detectType");function Ce(e,t,r,i,n,a,s){e.tag=null,e.dump=r,Xs(e,r,!1)||Xs(e,r,!0);var o=Zf.call(e.dump),l=i,c;i&&(i=e.flowLevel<0||e.flowLevel>t);var h=o==="[object Object]"||o==="[object Array]",u,f;if(h&&(u=e.duplicates.indexOf(r),f=u!==-1),(e.tag!==null&&e.tag!=="?"||f||e.indent!==2&&t>0)&&(n=!1),f&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(h&&f&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),o==="[object Object]")i&&Object.keys(e.dump).length!==0?(xp(e,t,e.dump,n),f&&(e.dump="&ref_"+u+e.dump)):(yp(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else if(o==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!s&&t>0?Vs(e,t-1,e.dump,n):Vs(e,t,e.dump,n),f&&(e.dump="&ref_"+u+e.dump)):(mp(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else if(o==="[object String]")e.tag!=="?"&&pp(e,e.dump,t,a,l);else{if(o==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new Vt("unacceptable kind of an object to dump "+o)}e.tag!==null&&e.tag!=="?"&&(c=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?c="!"+c:c.slice(0,18)==="tag:yaml.org,2002:"?c="!!"+c.slice(18):c="!<"+c+">",e.dump=c+" "+e.dump)}return!0}d(Ce,"writeNode");function bp(e,t){var r=[],i=[],n,a;for(ea(e,r,i),n=0,a=i.length;n<a;n+=1)t.duplicates.push(r[i[n]]);t.usedDuplicates=new Array(a)}d(bp,"getDuplicateReferences");function ea(e,t,r){var i,n,a;if(e!==null&&typeof e=="object")if(n=t.indexOf(e),n!==-1)r.indexOf(n)===-1&&r.push(n);else if(t.push(e),Array.isArray(e))for(n=0,a=e.length;n<a;n+=1)ea(e[n],t,r);else for(i=Object.keys(e),n=0,a=i.length;n<a;n+=1)ea(e[i[n]],t,r)}d(ea,"inspectNode");function H2(e,t){t=t||{};var r=new ap(t);r.noRefs||bp(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),Ce(r,0,i,!0,!0)?r.dump+`
|
|
170
|
+
`:""}d(H2,"dump$1");function Y2(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}d(Y2,"renamed");var j2=hf,U2=C2.load;var Ft={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4},$c={arrow_point:9,arrow_cross:12.5,arrow_circle:12.5};function ki(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=gt(e),t=gt(t);const[r,i]=[e.x,e.y],[n,a]=[t.x,t.y],s=n-r,o=a-i;return{angle:Math.atan(o/s),deltaX:s,deltaY:o}}d(ki,"calculateDeltaAndAngle");var gt=d(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),G2=d(e=>({x:d(function(t,r,i){let n=0;const a=gt(i[0]).x<gt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Ft,e.arrowTypeStart)){const{angle:p,deltaX:g}=ki(i[0],i[1]);n=Ft[e.arrowTypeStart]*Math.cos(p)*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Ft,e.arrowTypeEnd)){const{angle:p,deltaX:g}=ki(i[i.length-1],i[i.length-2]);n=Ft[e.arrowTypeEnd]*Math.cos(p)*(g>=0?1:-1)}const s=Math.abs(gt(t).x-gt(i[i.length-1]).x),o=Math.abs(gt(t).y-gt(i[i.length-1]).y),l=Math.abs(gt(t).x-gt(i[0]).x),c=Math.abs(gt(t).y-gt(i[0]).y),h=Ft[e.arrowTypeStart],u=Ft[e.arrowTypeEnd],f=1;if(s<u&&s>0&&o<u){let p=u+f-s;p*=a==="right"?-1:1,n-=p}if(l<h&&l>0&&c<h){let p=h+f-l;p*=a==="right"?-1:1,n+=p}return gt(t).x+n},"x"),y:d(function(t,r,i){let n=0;const a=gt(i[0]).y<gt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Ft,e.arrowTypeStart)){const{angle:p,deltaY:g}=ki(i[0],i[1]);n=Ft[e.arrowTypeStart]*Math.abs(Math.sin(p))*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Ft,e.arrowTypeEnd)){const{angle:p,deltaY:g}=ki(i[i.length-1],i[i.length-2]);n=Ft[e.arrowTypeEnd]*Math.abs(Math.sin(p))*(g>=0?1:-1)}const s=Math.abs(gt(t).y-gt(i[i.length-1]).y),o=Math.abs(gt(t).x-gt(i[i.length-1]).x),l=Math.abs(gt(t).y-gt(i[0]).y),c=Math.abs(gt(t).x-gt(i[0]).x),h=Ft[e.arrowTypeStart],u=Ft[e.arrowTypeEnd],f=1;if(s<u&&s>0&&o<u){let p=u+f-s;p*=a==="up"?-1:1,n-=p}if(l<h&&l>0&&c<h){let p=h+f-l;p*=a==="up"?-1:1,n+=p}return gt(t).y+n},"y")}),"getLineFunctionsWithOffset"),Xo=d(({flowchart:e})=>{const t=e?.subGraphTitleMargin?.top??0,r=e?.subGraphTitleMargin?.bottom??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins"),V2=d(e=>{const{handDrawnSeed:t}=ut();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),Qr=d(e=>{const t=X2([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),X2=d(e=>{const t=new Map;return e.forEach(r=>{const[i,n]=r.split(":");t.set(i.trim(),n?.trim())}),t},"styles2Map"),kp=d(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),H=d(e=>{const{stylesArray:t}=Qr(e),r=[],i=[],n=[],a=[];return t.forEach(s=>{const o=s[0];kp(o)?r.push(s.join(":")+" !important"):(i.push(s.join(":")+" !important"),o.includes("stroke")&&n.push(s.join(":")+" !important"),o==="fill"&&a.push(s.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:n,backgroundStyles:a}},"styles2String"),W=d((e,t)=>{const{themeVariables:r,handDrawnSeed:i}=ut(),{nodeBorder:n,mainBkg:a}=r,{stylesMap:s}=Qr(e);return Object.assign({roughness:.7,fill:s.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:s.get("stroke")||n,seed:i,strokeWidth:s.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:Z2(s.get("stroke-dasharray"))},t)},"userNodeOverrides"),Z2=d(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const n=isNaN(t[0])?0:t[0];return[n,n]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray"),hi={},_t={},Fc;function Q2(){return Fc||(Fc=1,Object.defineProperty(_t,"__esModule",{value:!0}),_t.BLANK_URL=_t.relativeFirstCharacters=_t.whitespaceEscapeCharsRegex=_t.urlSchemeRegex=_t.ctrlCharactersRegex=_t.htmlCtrlEntityRegex=_t.htmlEntitiesRegex=_t.invalidProtocolRegex=void 0,_t.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,_t.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,_t.htmlCtrlEntityRegex=/&(newline|tab);/gi,_t.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,_t.urlSchemeRegex=/^.+(:|:)/gim,_t.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,_t.relativeFirstCharacters=[".","/"],_t.BLANK_URL="about:blank"),_t}var Rc;function K2(){if(Rc)return hi;Rc=1,Object.defineProperty(hi,"__esModule",{value:!0}),hi.sanitizeUrl=void 0;var e=Q2();function t(s){return e.relativeFirstCharacters.indexOf(s[0])>-1}function r(s){var o=s.replace(e.ctrlCharactersRegex,"");return o.replace(e.htmlEntitiesRegex,function(l,c){return String.fromCharCode(c)})}function i(s){return URL.canParse(s)}function n(s){try{return decodeURIComponent(s)}catch{return s}}function a(s){if(!s)return e.BLANK_URL;var o,l=n(s.trim());do l=r(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=n(l),o=l.match(e.ctrlCharactersRegex)||l.match(e.htmlEntitiesRegex)||l.match(e.htmlCtrlEntityRegex)||l.match(e.whitespaceEscapeCharsRegex);while(o&&o.length>0);var c=l;if(!c)return e.BLANK_URL;if(t(c))return c;var h=c.trimStart(),u=h.match(e.urlSchemeRegex);if(!u)return c;var f=u[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(f))return e.BLANK_URL;var p=h.replace(/\\/g,"/");if(f==="mailto:"||f.includes("://"))return p;if(f==="http:"||f==="https:"){if(!i(p))return e.BLANK_URL;var g=new URL(p);return g.protocol=g.protocol.toLowerCase(),g.hostname=g.hostname.toLowerCase(),g.toString()}return p}return hi.sanitizeUrl=a,hi}var J2=K2(),tw="",ew={curveBasis:Sn,curveBasisClosed:Mk,curveBasisOpen:$k,curveBumpX:xu,curveBumpY:bu,curveBundle:Fk,curveCardinalClosed:Rk,curveCardinalOpen:Dk,curveCardinal:Cu,curveCatmullRomClosed:Ik,curveCatmullRomOpen:Ok,curveCatmullRom:vu,curveLinear:Un,curveLinearClosed:Pk,curveMonotoneX:Mu,curveMonotoneY:$u,curveNatural:Ru,curveStep:Du,curveStepAfter:Ou,curveStepBefore:Iu},rw=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,iw=d(function(e,t){const r=wp(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const s=r.map(o=>o.args);Dn(s),i=Ct(i,[...s])}else i=r.args;if(!i)return;let n=Co(e,t);const a="config";return i[a]!==void 0&&(n==="flowchart-v2"&&(n="flowchart"),i[n]=i[a],delete i[a]),i},"detectInit"),wp=d(function(e,t=null){try{const r=new RegExp(`[%]{2}(?![{]${rw.source})(?=[}][%]{2}).*
|
|
171
|
+
`,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),A.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let i;const n=[];for(;(i=Bi.exec(e))!==null;)if(i.index===Bi.lastIndex&&Bi.lastIndex++,i&&!t||t&&i[1]?.match(t)||t&&i[2]?.match(t)){const a=i[1]?i[1]:i[2],s=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;n.push({type:a,args:s})}return n.length===0?{type:e,args:null}:n.length===1?n[0]:n}catch(r){return A.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),nw=d(function(e){return e.replace(Bi,"")},"removeDirectives"),aw=d(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function Zo(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return ew[r]??t}d(Zo,"interpolateToCurve");function _p(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?J2.sanitizeUrl(r):r}d(_p,"formatUrl");var sw=d((e,...t)=>{const r=e.split("."),i=r.length-1,n=r[i];let a=window;for(let s=0;s<i;s++)if(a=a[r[s]],!a){A.error(`Function name: ${e} not found in window`);return}a[n](...t)},"runFunc");function Qo(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}d(Qo,"distance");function Cp(e){let t,r=0;e.forEach(n=>{r+=Qo(n,t),t=n});const i=r/2;return Ko(e,i)}d(Cp,"traverseEdge");function Sp(e){return e.length===1?e[0]:Cp(e)}d(Sp,"calcLabelPosition");var Dc=d((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),Ko=d((e,t)=>{let r,i=t;for(const n of e){if(r){const a=Qo(n,r);if(a===0)return r;if(a<i)i-=a;else{const s=i/a;if(s<=0)return r;if(s>=1)return{x:n.x,y:n.y};if(s>0&&s<1)return{x:Dc((1-s)*r.x+s*n.x,5),y:Dc((1-s)*r.y+s*n.y,5)}}}r=n}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),ow=d((e,t,r)=>{A.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const n=Ko(t,25),a=e?10:5,s=Math.atan2(t[0].y-n.y,t[0].x-n.x),o={x:0,y:0};return o.x=Math.sin(s)*a+(t[0].x+n.x)/2,o.y=-Math.cos(s)*a+(t[0].y+n.y)/2,o},"calcCardinalityPosition");function vp(e,t,r){const i=structuredClone(r);A.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const n=25+e,a=Ko(i,n),s=10+e*.5,o=Math.atan2(i[0].y-a.y,i[0].x-a.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(o+Math.PI)*s+(i[0].x+a.x)/2,l.y=-Math.cos(o+Math.PI)*s+(i[0].y+a.y)/2):t==="end_right"?(l.x=Math.sin(o-Math.PI)*s+(i[0].x+a.x)/2-5,l.y=-Math.cos(o-Math.PI)*s+(i[0].y+a.y)/2-5):t==="end_left"?(l.x=Math.sin(o)*s+(i[0].x+a.x)/2-5,l.y=-Math.cos(o)*s+(i[0].y+a.y)/2-5):(l.x=Math.sin(o)*s+(i[0].x+a.x)/2,l.y=-Math.cos(o)*s+(i[0].y+a.y)/2),l}d(vp,"calcTerminalLabelPosition");function Tp(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}d(Tp,"getStylesFromArray");var Ic=0,lw=d(()=>(Ic++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Ic),"generateId");function Ap(e){let t="";const r="0123456789abcdef",i=r.length;for(let n=0;n<e;n++)t+=r.charAt(Math.floor(Math.random()*i));return t}d(Ap,"makeRandomHex");var cw=d(e=>Ap(e.length),"random"),hw=d(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),uw=d(function(e,t){const r=t.text.replace(Zr.lineBreakRegex," "),[,i]=Ta(t.fontSize),n=e.append("text");n.attr("x",t.x),n.attr("y",t.y),n.style("text-anchor",t.anchor),n.style("font-family",t.fontFamily),n.style("font-size",i),n.style("font-weight",t.fontWeight),n.attr("fill",t.fill),t.class!==void 0&&n.attr("class",t.class);const a=n.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.attr("fill",t.fill),a.text(r),n},"drawSimpleText"),fw=uo((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Zr.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),n=[];let a="";return i.forEach((s,o)=>{const l=Oe(`${s} `,r),c=Oe(a,r);if(l>t){const{hyphenatedStrings:f,remainingWord:p}=pw(s,t,"-",r);n.push(a,...f),a=p}else c+l>=t?(n.push(a),a=s):a=[a,s].filter(Boolean).join(" ");o+1===i.length&&n.push(a)}),n.filter(s=>s!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),pw=uo((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const n=[...e],a=[];let s="";return n.forEach((o,l)=>{const c=`${s}${o}`;if(Oe(c,i)>=t){const u=l+1,f=n.length===u,p=`${c}${r}`;a.push(f?c:p),s=""}else s=c}),{hyphenatedStrings:a,remainingWord:s}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function Bp(e,t){return Jo(e,t).height}d(Bp,"calculateTextHeight");function Oe(e,t){return Jo(e,t).width}d(Oe,"calculateTextWidth");var Jo=uo((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:n=400}=t;if(!e)return{width:0,height:0};const[,a]=Ta(r),s=["sans-serif",i],o=e.split(Zr.lineBreakRegex),l=[],c=at("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const f of s){let p=0;const g={width:0,height:0,lineHeight:0};for(const m of o){const y=hw();y.text=m||tw;const x=uw(h,y).style("font-size",a).style("font-weight",n).style("font-family",f),b=(x._groups||x)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");g.width=Math.round(Math.max(g.width,b.width)),p=Math.round(b.height),g.height+=p,g.lineHeight=Math.round(Math.max(g.lineHeight,p))}l.push(g)}h.remove();const u=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[u]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),qr,dw=(qr=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},d(qr,"InitIDGenerator"),qr),un,gw=d(function(e){return un=un||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),un.innerHTML=e,unescape(un.textContent)},"entityDecode");function tl(e){return"str"in e}d(tl,"isDetailedError");var mw=d((e,t,r,i)=>{if(!i)return;const n=e.node()?.getBBox();n&&e.append("text").text(i).attr("text-anchor","middle").attr("x",n.x+n.width/2).attr("y",-r).attr("class",t)},"insertTitle"),Ta=d(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function el(e,t){return Ym({},e,t)}d(el,"cleanAndMerge");var he={assignWithDepth:Ct,wrapLabel:fw,calculateTextHeight:Bp,calculateTextWidth:Oe,calculateTextDimensions:Jo,cleanAndMerge:el,detectInit:iw,detectDirective:wp,isSubstringInArray:aw,interpolateToCurve:Zo,calcLabelPosition:Sp,calcCardinalityPosition:ow,calcTerminalLabelPosition:vp,formatUrl:_p,getStylesFromArray:Tp,generateId:lw,random:cw,runFunc:sw,entityDecode:gw,insertTitle:mw,isLabelCoordinateInPath:Lp,parseFontSize:Ta,InitIDGenerator:dw},yw=d(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),t},"encodeEntities"),xr=d(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),dA=d((e,t,{counter:r=0,prefix:i,suffix:n},a)=>a||`${i?`${i}_`:""}${e}_${t}_${r}${n?`_${n}`:""}`,"getEdgeId");function It(e){return e??null}d(It,"handleUndefinedAttr");function Lp(e,t){const r=Math.round(e.x),i=Math.round(e.y),n=t.replace(/(\d+\.\d+)/g,a=>Math.round(parseFloat(a)).toString());return n.includes(r.toString())||n.includes(i.toString())}d(Lp,"isLabelCoordinateInPath");const xw=Object.freeze({left:0,top:0,width:16,height:16}),ra=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Ep=Object.freeze({...xw,...ra}),bw=Object.freeze({...Ep,body:"",hidden:!1}),kw=Object.freeze({width:null,height:null}),ww=Object.freeze({...kw,...ra}),_w=(e,t,r,i="")=>{const n=e.split(":");if(e.slice(0,1)==="@"){if(n.length<2||n.length>3)return null;i=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const o=n.pop(),l=n.pop(),c={provider:n.length>0?n[0]:i,prefix:l,name:o};return as(c)?c:null}const a=n[0],s=a.split("-");if(s.length>1){const o={provider:i,prefix:s.shift(),name:s.join("-")};return as(o)?o:null}if(r&&i===""){const o={provider:i,prefix:"",name:a};return as(o,r)?o:null}return null},as=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function Cw(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const i=((e.rotate||0)+(t.rotate||0))%4;return i&&(r.rotate=i),r}function Oc(e,t){const r=Cw(e,t);for(const i in bw)i in ra?i in e&&!(i in r)&&(r[i]=ra[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function Sw(e,t){const r=e.icons,i=e.aliases||Object.create(null),n=Object.create(null);function a(s){if(r[s])return n[s]=[];if(!(s in n)){n[s]=null;const o=i[s]&&i[s].parent,l=o&&a(o);l&&(n[s]=[o].concat(l))}return n[s]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(a),n}function Pc(e,t,r){const i=e.icons,n=e.aliases||Object.create(null);let a={};function s(o){a=Oc(i[o]||n[o],a)}return s(t),r.forEach(s),Oc(e,a)}function vw(e,t){if(e.icons[t])return Pc(e,t,[]);const r=Sw(e,[t])[t];return r?Pc(e,t,r):null}const Tw=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Aw=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Nc(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const i=e.split(Tw);if(i===null||!i.length)return e;const n=[];let a=i.shift(),s=Aw.test(a);for(;;){if(s){const o=parseFloat(a);isNaN(o)?n.push(a):n.push(Math.ceil(o*t*r)/r)}else n.push(a);if(a=i.shift(),a===void 0)return n.join("");s=!s}}function Bw(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const n=e.indexOf(">",i),a=e.indexOf("</"+t);if(n===-1||a===-1)break;const s=e.indexOf(">",a);if(s===-1)break;r+=e.slice(n+1,a).trim(),e=e.slice(0,i).trim()+e.slice(s+1)}return{defs:r,content:e}}function Lw(e,t){return e?"<defs>"+e+"</defs>"+t:t}function Ew(e,t,r){const i=Bw(e);return Lw(i.defs,t+i.content+r)}const Mw=e=>e==="unset"||e==="undefined"||e==="none";function $w(e,t){const r={...Ep,...e},i={...ww,...t},n={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,i].forEach(m=>{const y=[],x=m.hFlip,b=m.vFlip;let k=m.rotate;x?b?k+=2:(y.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),y.push("scale(-1 1)"),n.top=n.left=0):b&&(y.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),y.push("scale(1 -1)"),n.top=n.left=0);let C;switch(k<0&&(k-=Math.floor(k/4)*4),k=k%4,k){case 1:C=n.height/2+n.top,y.unshift("rotate(90 "+C.toString()+" "+C.toString()+")");break;case 2:y.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:C=n.width/2+n.left,y.unshift("rotate(-90 "+C.toString()+" "+C.toString()+")");break}k%2===1&&(n.left!==n.top&&(C=n.left,n.left=n.top,n.top=C),n.width!==n.height&&(C=n.width,n.width=n.height,n.height=C)),y.length&&(a=Ew(a,'<g transform="'+y.join(" ")+'">',"</g>"))});const s=i.width,o=i.height,l=n.width,c=n.height;let h,u;s===null?(u=o===null?"1em":o==="auto"?c:o,h=Nc(u,l/c)):(h=s==="auto"?l:s,u=o===null?Nc(h,c/l):o==="auto"?c:o);const f={},p=(m,y)=>{Mw(y)||(f[m]=y.toString())};p("width",h),p("height",u);const g=[n.left,n.top,l,c];return f.viewBox=g.join(" "),{attributes:f,viewBox:g,body:a}}const Fw=/\sid="(\S+)"/g,zc=new Map;function Rw(e){e=e.replace(/[0-9]+$/,"")||"a";const t=zc.get(e)||0;return zc.set(e,t+1),t?`${e}${t}`:e}function Dw(e){const t=[];let r;for(;r=Fw.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(n=>{const a=Rw(n),s=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function Iw(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)r+=" "+i+'="'+t[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}function rl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var br=rl();function Mp(e){br=e}var Ei={exec:()=>null};function ht(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(n,a)=>{let s=typeof a=="string"?a:a.source;return s=s.replace(Wt.caret,"$1"),r=r.replace(n,s),i},getRegex:()=>new RegExp(r,t)};return i}var Ow=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Wt={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,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ 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,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,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")},Pw=/^(?:[ \t]*(?:\n|$))+/,Nw=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,zw=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Vi=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,qw=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,il=/(?:[*+-]|\d{1,9}[.)])/,$p=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Fp=ht($p).replace(/bull/g,il).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(),Ww=ht($p).replace(/bull/g,il).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(),nl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Hw=/^[^\n]+/,al=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Yw=ht(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",al).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),jw=ht(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,il).getRegex(),Aa="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",sl=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Uw=ht("^ {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",sl).replace("tag",Aa).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Rp=ht(nl).replace("hr",Vi).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[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Aa).getRegex(),Gw=ht(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Rp).getRegex(),ol={blockquote:Gw,code:Nw,def:Yw,fences:zw,heading:qw,hr:Vi,html:Uw,lheading:Fp,list:jw,newline:Pw,paragraph:Rp,table:Ei,text:Hw},qc=ht("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Vi).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[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Aa).getRegex(),Vw={...ol,lheading:Ww,table:qc,paragraph:ht(nl).replace("hr",Vi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",qc).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Aa).getRegex()},Xw={...ol,html:ht(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",sl).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:Ei,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ht(nl).replace("hr",Vi).replace("heading",` *#{1,6} *[^
|
|
172
|
+
]`).replace("lheading",Fp).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Zw=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Qw=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Dp=/^( {2,}|\\)\n(?!\s*$)/,Kw=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Ba=/[\p{P}\p{S}]/u,ll=/[\s\p{P}\p{S}]/u,Ip=/[^\s\p{P}\p{S}]/u,Jw=ht(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,ll).getRegex(),Op=/(?!~)[\p{P}\p{S}]/u,t_=/(?!~)[\s\p{P}\p{S}]/u,e_=/(?:[^\s\p{P}\p{S}]|~)/u,r_=ht(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Ow?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Pp=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,i_=ht(Pp,"u").replace(/punct/g,Ba).getRegex(),n_=ht(Pp,"u").replace(/punct/g,Op).getRegex(),Np="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",a_=ht(Np,"gu").replace(/notPunctSpace/g,Ip).replace(/punctSpace/g,ll).replace(/punct/g,Ba).getRegex(),s_=ht(Np,"gu").replace(/notPunctSpace/g,e_).replace(/punctSpace/g,t_).replace(/punct/g,Op).getRegex(),o_=ht("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Ip).replace(/punctSpace/g,ll).replace(/punct/g,Ba).getRegex(),l_=ht(/\\(punct)/,"gu").replace(/punct/g,Ba).getRegex(),c_=ht(/^<(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(),h_=ht(sl).replace("(?:-->|$)","-->").getRegex(),u_=ht("^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",h_).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ia=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,f_=ht(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",ia).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),zp=ht(/^!?\[(label)\]\[(ref)\]/).replace("label",ia).replace("ref",al).getRegex(),qp=ht(/^!?\[(ref)\](?:\[\])?/).replace("ref",al).getRegex(),p_=ht("reflink|nolink(?!\\()","g").replace("reflink",zp).replace("nolink",qp).getRegex(),Wc=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,cl={_backpedal:Ei,anyPunctuation:l_,autolink:c_,blockSkip:r_,br:Dp,code:Qw,del:Ei,emStrongLDelim:i_,emStrongRDelimAst:a_,emStrongRDelimUnd:o_,escape:Zw,link:f_,nolink:qp,punctuation:Jw,reflink:zp,reflinkSearch:p_,tag:u_,text:Kw,url:Ei},d_={...cl,link:ht(/^!?\[(label)\]\((.*?)\)/).replace("label",ia).getRegex(),reflink:ht(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ia).getRegex()},Zs={...cl,emStrongRDelimAst:s_,emStrongLDelim:n_,url:ht(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Wc).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:ht(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Wc).getRegex()},g_={...Zs,br:ht(Dp).replace("{2,}","*").getRegex(),text:ht(Zs.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},fn={normal:ol,gfm:Vw,pedantic:Xw},ui={normal:cl,gfm:Zs,breaks:g_,pedantic:d_},m_={"&":"&","<":"<",">":">",'"':""","'":"'"},Hc=e=>m_[e];function xe(e,t){if(t){if(Wt.escapeTest.test(e))return e.replace(Wt.escapeReplace,Hc)}else if(Wt.escapeTestNoEncode.test(e))return e.replace(Wt.escapeReplaceNoEncode,Hc);return e}function Yc(e){try{e=encodeURI(e).replace(Wt.percentDecode,"%")}catch{return null}return e}function jc(e,t){let r=e.replace(Wt.findPipe,(a,s,o)=>{let l=!1,c=s;for(;--c>=0&&o[c]==="\\";)l=!l;return l?"|":" |"}),i=r.split(Wt.splitPipe),n=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;n<i.length;n++)i[n]=i[n].trim().replace(Wt.slashPipe,"|");return i}function fi(e,t,r){let i=e.length;if(i===0)return"";let n=0;for(;n<i&&e.charAt(i-n-1)===t;)n++;return e.slice(0,i-n)}function y_(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return r>0?-2:-1}function Uc(e,t,r,i,n){let a=t.href,s=t.title||null,o=e[1].replace(n.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:s,text:o,tokens:i.inlineTokens(o)};return i.state.inLink=!1,l}function x_(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let n=i[1];return t.split(`
|
|
173
|
+
`).map(a=>{let s=a.match(r.other.beginningSpace);if(s===null)return a;let[o]=s;return o.length>=n.length?a.slice(n.length):a}).join(`
|
|
174
|
+
`)}var na=class{options;rules;lexer;constructor(t){this.options=t||br}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let i=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?i:fi(i,`
|
|
175
|
+
`)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],n=x_(i,r[3]||"",this.rules);return{type:"code",raw:i,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:n}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let i=r[2].trim();if(this.rules.other.endingHash.test(i)){let n=fi(i,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(i=n.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:fi(r[0],`
|
|
176
|
+
`)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=fi(r[0],`
|
|
177
|
+
`).split(`
|
|
178
|
+
`),n="",a="",s=[];for(;i.length>0;){let o=!1,l=[],c;for(c=0;c<i.length;c++)if(this.rules.other.blockquoteStart.test(i[c]))l.push(i[c]),o=!0;else if(!o)l.push(i[c]);else break;i=i.slice(c);let h=l.join(`
|
|
179
|
+
`),u=h.replace(this.rules.other.blockquoteSetextReplace,`
|
|
180
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
|
|
181
|
+
${h}`:h,a=a?`${a}
|
|
182
|
+
${u}`:u;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,s,!0),this.lexer.state.top=f,i.length===0)break;let p=s.at(-1);if(p?.type==="code")break;if(p?.type==="blockquote"){let g=p,m=g.raw+`
|
|
183
|
+
`+i.join(`
|
|
184
|
+
`),y=this.blockquote(m);s[s.length-1]=y,n=n.substring(0,n.length-g.raw.length)+y.raw,a=a.substring(0,a.length-g.text.length)+y.text;break}else if(p?.type==="list"){let g=p,m=g.raw+`
|
|
185
|
+
`+i.join(`
|
|
186
|
+
`),y=this.list(m);s[s.length-1]=y,n=n.substring(0,n.length-p.raw.length)+y.raw,a=a.substring(0,a.length-g.raw.length)+y.raw,i=m.substring(s.at(-1).raw.length).split(`
|
|
187
|
+
`);continue}}return{type:"blockquote",raw:n,tokens:s,text:a}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),n=i.length>1,a={type:"list",raw:"",ordered:n,start:n?+i.slice(0,-1):"",loose:!1,items:[]};i=n?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=n?i:"[*+-]");let s=this.rules.other.listItemRegex(i),o=!1;for(;t;){let c=!1,h="",u="";if(!(r=s.exec(t))||this.rules.block.hr.test(t))break;h=r[0],t=t.substring(h.length);let f=r[2].split(`
|
|
188
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),p=t.split(`
|
|
189
|
+
`,1)[0],g=!f.trim(),m=0;if(this.options.pedantic?(m=2,u=f.trimStart()):g?m=r[1].length+1:(m=r[2].search(this.rules.other.nonSpaceChar),m=m>4?1:m,u=f.slice(m),m+=r[1].length),g&&this.rules.other.blankLine.test(p)&&(h+=p+`
|
|
190
|
+
`,t=t.substring(p.length+1),c=!0),!c){let b=this.rules.other.nextBulletRegex(m),k=this.rules.other.hrRegex(m),C=this.rules.other.fencesBeginRegex(m),_=this.rules.other.headingBeginRegex(m),T=this.rules.other.htmlBeginRegex(m);for(;t;){let v=t.split(`
|
|
191
|
+
`,1)[0],B;if(p=v,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting," "),B=p):B=p.replace(this.rules.other.tabCharGlobal," "),C.test(p)||_.test(p)||T.test(p)||b.test(p)||k.test(p))break;if(B.search(this.rules.other.nonSpaceChar)>=m||!p.trim())u+=`
|
|
192
|
+
`+B.slice(m);else{if(g||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||C.test(f)||_.test(f)||k.test(f))break;u+=`
|
|
193
|
+
`+p}!g&&!p.trim()&&(g=!0),h+=v+`
|
|
194
|
+
`,t=t.substring(v.length+1),f=B.slice(m)}}a.loose||(o?a.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(o=!0));let y=null,x;this.options.gfm&&(y=this.rules.other.listIsTask.exec(u),y&&(x=y[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:h,task:!!y,checked:x,loose:!1,text:u,tokens:[]}),a.raw+=h}let l=a.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let c=0;c<a.items.length;c++)if(this.lexer.state.top=!1,a.items[c].tokens=this.lexer.blockTokens(a.items[c].text,[]),!a.loose){let h=a.items[c].tokens.filter(f=>f.type==="space"),u=h.length>0&&h.some(f=>this.rules.other.anyLine.test(f.raw));a.loose=u}if(a.loose)for(let c=0;c<a.items.length;c++)a.items[c].loose=!0;return a}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:n,title:a}}}table(t){let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=jc(r[1]),n=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=r[3]?.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
195
|
+
`):[],s={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===n.length){for(let o of n)this.rules.other.tableAlignRight.test(o)?s.align.push("right"):this.rules.other.tableAlignCenter.test(o)?s.align.push("center"):this.rules.other.tableAlignLeft.test(o)?s.align.push("left"):s.align.push(null);for(let o=0;o<i.length;o++)s.header.push({text:i[o],tokens:this.lexer.inline(i[o]),header:!0,align:s.align[o]});for(let o of a)s.rows.push(jc(o,s.header.length).map((l,c)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:s.align[c]})));return s}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let i=r[1].charAt(r[1].length-1)===`
|
|
196
|
+
`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let s=fi(i.slice(0,-1),"\\");if((i.length-s.length)%2===0)return}else{let s=y_(r[2],"()");if(s===-2)return;if(s>-1){let o=(r[0].indexOf("!")===0?5:4)+r[1].length+s;r[2]=r[2].substring(0,s),r[0]=r[0].substring(0,o).trim(),r[3]=""}}let n=r[2],a="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(n);s&&(n=s[1],a=s[3])}else a=r[3]?r[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?n=n.slice(1):n=n.slice(1,-1)),Uc(r,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let n=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=r[n.toLowerCase()];if(!a){let s=i[0].charAt(0);return{type:"text",raw:s,text:s}}return Uc(i,a,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let n=this.rules.inline.emStrongLDelim.exec(t);if(!(!n||n[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[2])||!i||this.rules.inline.punctuation.exec(i))){let a=[...n[0]].length-1,s,o,l=a,c=0,h=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,r=r.slice(-1*t.length+a);(n=h.exec(r))!=null;){if(s=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!s)continue;if(o=[...s].length,n[3]||n[4]){l+=o;continue}else if((n[5]||n[6])&&a%3&&!((a+o)%3)){c+=o;continue}if(l-=o,l>0)continue;o=Math.min(o,o+l+c);let u=[...n[0]][0].length,f=t.slice(0,a+n.index+u+o);if(Math.min(a,o)%2){let g=f.slice(1,-1);return{type:"em",raw:f,text:g,tokens:this.lexer.inlineTokens(g)}}let p=f.slice(2,-2);return{type:"strong",raw:f,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(i),a=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return n&&a&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let i,n;return r[2]==="@"?(i=r[1],n="mailto:"+i):(i=r[1],n=i),{type:"link",raw:r[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}}}url(t){let r;if(r=this.rules.inline.url.exec(t)){let i,n;if(r[2]==="@")i=r[0],n="mailto:"+i;else{let a;do a=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(a!==r[0]);i=r[0],r[1]==="www."?n="http://"+r[0]:n=r[0]}return{type:"link",raw:r[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},oe=class Qs{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||br,this.options.tokenizer=this.options.tokenizer||new na,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 r={other:Wt,block:fn.normal,inline:ui.normal};this.options.pedantic?(r.block=fn.pedantic,r.inline=ui.pedantic):this.options.gfm&&(r.block=fn.gfm,this.options.breaks?r.inline=ui.breaks:r.inline=ui.gfm),this.tokenizer.rules=r}static get rules(){return{block:fn,inline:ui}}static lex(t,r){return new Qs(r).lex(t)}static lexInline(t,r){return new Qs(r).inlineTokens(t)}lex(t){t=t.replace(Wt.carriageReturn,`
|
|
197
|
+
`),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){for(this.options.pedantic&&(t=t.replace(Wt.tabCharGlobal," ").replace(Wt.spaceLine,""));t;){let n;if(this.options.extensions?.block?.some(s=>(n=s.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))continue;if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length);let s=r.at(-1);n.raw.length===1&&s!==void 0?s.raw+=`
|
|
198
|
+
`:r.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length);let s=r.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=(s.raw.endsWith(`
|
|
199
|
+
`)?"":`
|
|
200
|
+
`)+n.raw,s.text+=`
|
|
201
|
+
`+n.text,this.inlineQueue.at(-1).src=s.text):r.push(n);continue}if(n=this.tokenizer.fences(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.heading(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.hr(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.blockquote(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.list(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.html(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.def(t)){t=t.substring(n.raw.length);let s=r.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=(s.raw.endsWith(`
|
|
202
|
+
`)?"":`
|
|
203
|
+
`)+n.raw,s.text+=`
|
|
204
|
+
`+n.raw,this.inlineQueue.at(-1).src=s.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title},r.push(n));continue}if(n=this.tokenizer.table(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.lheading(t)){t=t.substring(n.raw.length),r.push(n);continue}let a=t;if(this.options.extensions?.startBlock){let s=1/0,o=t.slice(1),l;this.options.extensions.startBlock.forEach(c=>{l=c.call({lexer:this},o),typeof l=="number"&&l>=0&&(s=Math.min(s,l))}),s<1/0&&s>=0&&(a=t.substring(0,s+1))}if(this.state.top&&(n=this.tokenizer.paragraph(a))){let s=r.at(-1);i&&s?.type==="paragraph"?(s.raw+=(s.raw.endsWith(`
|
|
205
|
+
`)?"":`
|
|
206
|
+
`)+n.raw,s.text+=`
|
|
207
|
+
`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(n),i=a.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length);let s=r.at(-1);s?.type==="text"?(s.raw+=(s.raw.endsWith(`
|
|
208
|
+
`)?"":`
|
|
209
|
+
`)+n.raw,s.text+=`
|
|
210
|
+
`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(n);continue}if(t){let s="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let i=t,n=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(n=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)l.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(n=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,n.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(n=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)a=n[2]?n[2].length:0,i=i.slice(0,n.index+a)+"["+"a".repeat(n[0].length-a-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let s=!1,o="";for(;t;){s||(o=""),s=!1;let l;if(this.options.extensions?.inline?.some(h=>(l=h.call({lexer:this},t,r))?(t=t.substring(l.raw.length),r.push(l),!0):!1))continue;if(l=this.tokenizer.escape(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.tag(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.link(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(l.raw.length);let h=r.at(-1);l.type==="text"&&h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue}if(l=this.tokenizer.emStrong(t,i,o)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.codespan(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.br(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.del(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.autolink(t)){t=t.substring(l.raw.length),r.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(t))){t=t.substring(l.raw.length),r.push(l);continue}let c=t;if(this.options.extensions?.startInline){let h=1/0,u=t.slice(1),f;this.options.extensions.startInline.forEach(p=>{f=p.call({lexer:this},u),typeof f=="number"&&f>=0&&(h=Math.min(h,f))}),h<1/0&&h>=0&&(c=t.substring(0,h+1))}if(l=this.tokenizer.inlineText(c)){t=t.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(o=l.raw.slice(-1)),s=!0;let h=r.at(-1);h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return r}},aa=class{options;parser;constructor(t){this.options=t||br}space(t){return""}code({text:t,lang:r,escaped:i}){let n=(r||"").match(Wt.notSpaceStart)?.[0],a=t.replace(Wt.endingNewline,"")+`
|
|
211
|
+
`;return n?'<pre><code class="language-'+xe(n)+'">'+(i?a:xe(a,!0))+`</code></pre>
|
|
212
|
+
`:"<pre><code>"+(i?a:xe(a,!0))+`</code></pre>
|
|
213
|
+
`}blockquote({tokens:t}){return`<blockquote>
|
|
214
|
+
${this.parser.parse(t)}</blockquote>
|
|
215
|
+
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
|
|
216
|
+
`}hr(t){return`<hr>
|
|
217
|
+
`}list(t){let r=t.ordered,i=t.start,n="";for(let o=0;o<t.items.length;o++){let l=t.items[o];n+=this.listitem(l)}let a=r?"ol":"ul",s=r&&i!==1?' start="'+i+'"':"";return"<"+a+s+`>
|
|
218
|
+
`+n+"</"+a+`>
|
|
219
|
+
`}listitem(t){let r="";if(t.task){let i=this.checkbox({checked:!!t.checked});t.loose?t.tokens[0]?.type==="paragraph"?(t.tokens[0].text=i+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=i+" "+xe(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:i+" ",text:i+" ",escaped:!0}):r+=i+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
|
|
220
|
+
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
221
|
+
`}table(t){let r="",i="";for(let a=0;a<t.header.length;a++)i+=this.tablecell(t.header[a]);r+=this.tablerow({text:i});let n="";for(let a=0;a<t.rows.length;a++){let s=t.rows[a];i="";for(let o=0;o<s.length;o++)i+=this.tablecell(s[o]);n+=this.tablerow({text:i})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
|
|
222
|
+
<thead>
|
|
223
|
+
`+r+`</thead>
|
|
224
|
+
`+n+`</table>
|
|
225
|
+
`}tablerow({text:t}){return`<tr>
|
|
226
|
+
${t}</tr>
|
|
227
|
+
`}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
|
|
228
|
+
`}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>${xe(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:i}){let n=this.parser.parseInline(i),a=Yc(t);if(a===null)return n;t=a;let s='<a href="'+t+'"';return r&&(s+=' title="'+xe(r)+'"'),s+=">"+n+"</a>",s}image({href:t,title:r,text:i,tokens:n}){n&&(i=this.parser.parseInline(n,this.parser.textRenderer));let a=Yc(t);if(a===null)return xe(i);t=a;let s=`<img src="${t}" alt="${i}"`;return r&&(s+=` title="${xe(r)}"`),s+=">",s}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:xe(t.text)}},hl=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""}},le=class Ks{options;renderer;textRenderer;constructor(t){this.options=t||br,this.options.renderer=this.options.renderer||new aa,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new hl}static parse(t,r){return new Ks(r).parse(t)}static parseInline(t,r){return new Ks(r).parseInline(t)}parse(t,r=!0){let i="";for(let n=0;n<t.length;n++){let a=t[n];if(this.options.extensions?.renderers?.[a.type]){let o=a,l=this.options.extensions.renderers[o.type].call({parser:this},o);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(o.type)){i+=l||"";continue}}let s=a;switch(s.type){case"space":{i+=this.renderer.space(s);continue}case"hr":{i+=this.renderer.hr(s);continue}case"heading":{i+=this.renderer.heading(s);continue}case"code":{i+=this.renderer.code(s);continue}case"table":{i+=this.renderer.table(s);continue}case"blockquote":{i+=this.renderer.blockquote(s);continue}case"list":{i+=this.renderer.list(s);continue}case"html":{i+=this.renderer.html(s);continue}case"def":{i+=this.renderer.def(s);continue}case"paragraph":{i+=this.renderer.paragraph(s);continue}case"text":{let o=s,l=this.renderer.text(o);for(;n+1<t.length&&t[n+1].type==="text";)o=t[++n],l+=`
|
|
229
|
+
`+this.renderer.text(o);r?i+=this.renderer.paragraph({type:"paragraph",raw:l,text:l,tokens:[{type:"text",raw:l,text:l,escaped:!0}]}):i+=l;continue}default:{let o='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return i}parseInline(t,r=this.renderer){let i="";for(let n=0;n<t.length;n++){let a=t[n];if(this.options.extensions?.renderers?.[a.type]){let o=this.options.extensions.renderers[a.type].call({parser:this},a);if(o!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){i+=o||"";continue}}let s=a;switch(s.type){case"escape":{i+=r.text(s);break}case"html":{i+=r.html(s);break}case"link":{i+=r.link(s);break}case"image":{i+=r.image(s);break}case"strong":{i+=r.strong(s);break}case"em":{i+=r.em(s);break}case"codespan":{i+=r.codespan(s);break}case"br":{i+=r.br(s);break}case"del":{i+=r.del(s);break}case"text":{i+=r.text(s);break}default:{let o='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return i}},wi=class{options;block;constructor(t){this.options=t||br}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(){return this.block?oe.lex:oe.lexInline}provideParser(){return this.block?le.parse:le.parseInline}},b_=class{defaults=rl();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=le;Renderer=aa;TextRenderer=hl;Lexer=oe;Tokenizer=na;Hooks=wi;constructor(...t){this.use(...t)}walkTokens(t,r){let i=[];for(let n of t)switch(i=i.concat(r.call(this,n)),n.type){case"table":{let a=n;for(let s of a.header)i=i.concat(this.walkTokens(s.tokens,r));for(let s of a.rows)for(let o of s)i=i.concat(this.walkTokens(o.tokens,r));break}case"list":{let a=n;i=i.concat(this.walkTokens(a.items,r));break}default:{let a=n;this.defaults.extensions?.childTokens?.[a.type]?this.defaults.extensions.childTokens[a.type].forEach(s=>{let o=a[s].flat(1/0);i=i.concat(this.walkTokens(o,r))}):a.tokens&&(i=i.concat(this.walkTokens(a.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let n={...i};if(n.async=this.defaults.async||n.async||!1,i.extensions&&(i.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let s=r.renderers[a.name];s?r.renderers[a.name]=function(...o){let l=a.renderer.apply(this,o);return l===!1&&(l=s.apply(this,o)),l}:r.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=r[a.level];s?s.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),n.extensions=r),i.renderer){let a=this.defaults.renderer||new aa(this.defaults);for(let s in i.renderer){if(!(s in a))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let o=s,l=i.renderer[o],c=a[o];a[o]=(...h)=>{let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u||""}}n.renderer=a}if(i.tokenizer){let a=this.defaults.tokenizer||new na(this.defaults);for(let s in i.tokenizer){if(!(s in a))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let o=s,l=i.tokenizer[o],c=a[o];a[o]=(...h)=>{let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u}}n.tokenizer=a}if(i.hooks){let a=this.defaults.hooks||new wi;for(let s in i.hooks){if(!(s in a))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let o=s,l=i.hooks[o],c=a[o];wi.passThroughHooks.has(s)?a[o]=h=>{if(this.defaults.async&&wi.passThroughHooksRespectAsync.has(s))return(async()=>{let f=await l.call(a,h);return c.call(a,f)})();let u=l.call(a,h);return c.call(a,u)}:a[o]=(...h)=>{if(this.defaults.async)return(async()=>{let f=await l.apply(a,h);return f===!1&&(f=await c.apply(a,h)),f})();let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u}}n.hooks=a}if(i.walkTokens){let a=this.defaults.walkTokens,s=i.walkTokens;n.walkTokens=function(o){let l=[];return l.push(s.call(this,o)),a&&(l=l.concat(a.call(this,o))),l}}this.defaults={...this.defaults,...n}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return oe.lex(t,r??this.defaults)}parser(t,r){return le.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let n={...i},a={...this.defaults,...n},s=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&n.async===!1)return s(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 r>"u"||r===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(a.hooks&&(a.hooks.options=a,a.hooks.block=t),a.async)return(async()=>{let o=a.hooks?await a.hooks.preprocess(r):r,l=await(a.hooks?await a.hooks.provideLexer():t?oe.lex:oe.lexInline)(o,a),c=a.hooks?await a.hooks.processAllTokens(l):l;a.walkTokens&&await Promise.all(this.walkTokens(c,a.walkTokens));let h=await(a.hooks?await a.hooks.provideParser():t?le.parse:le.parseInline)(c,a);return a.hooks?await a.hooks.postprocess(h):h})().catch(s);try{a.hooks&&(r=a.hooks.preprocess(r));let o=(a.hooks?a.hooks.provideLexer():t?oe.lex:oe.lexInline)(r,a);a.hooks&&(o=a.hooks.processAllTokens(o)),a.walkTokens&&this.walkTokens(o,a.walkTokens);let l=(a.hooks?a.hooks.provideParser():t?le.parse:le.parseInline)(o,a);return a.hooks&&(l=a.hooks.postprocess(l)),l}catch(o){return s(o)}}}onError(t,r){return i=>{if(i.message+=`
|
|
230
|
+
Please report this to https://github.com/markedjs/marked.`,t){let n="<p>An error occurred:</p><pre>"+xe(i.message+"",!0)+"</pre>";return r?Promise.resolve(n):n}if(r)return Promise.reject(i);throw i}}},gr=new b_;function ft(e,t){return gr.parse(e,t)}ft.options=ft.setOptions=function(e){return gr.setOptions(e),ft.defaults=gr.defaults,Mp(ft.defaults),ft};ft.getDefaults=rl;ft.defaults=br;ft.use=function(...e){return gr.use(...e),ft.defaults=gr.defaults,Mp(ft.defaults),ft};ft.walkTokens=function(e,t){return gr.walkTokens(e,t)};ft.parseInline=gr.parseInline;ft.Parser=le;ft.parser=le.parse;ft.Renderer=aa;ft.TextRenderer=hl;ft.Lexer=oe;ft.lexer=oe.lex;ft.Tokenizer=na;ft.Hooks=wi;ft.parse=ft;ft.options;ft.setOptions;ft.use;ft.walkTokens;ft.parseInline;le.parse;oe.lex;function Wp(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.from(typeof e=="string"?[e]:e);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var n=i.reduce(function(o,l){var c=l.match(/\n([\t ]+|(?!\s).)/g);return c?o.concat(c.map(function(h){var u,f;return(f=(u=h.match(/[\t ]/g))===null||u===void 0?void 0:u.length)!==null&&f!==void 0?f:0})):o},[]);if(n.length){var a=new RegExp(`
|
|
231
|
+
[ ]{`+Math.min.apply(Math,n)+"}","g");i=i.map(function(o){return o.replace(a,`
|
|
232
|
+
`)})}i[0]=i[0].replace(/^\r?\n/,"");var s=i[0];return t.forEach(function(o,l){var c=s.match(/(?:^|\n)( *)$/),h=c?c[1]:"",u=o;typeof o=="string"&&o.includes(`
|
|
233
|
+
`)&&(u=String(o).split(`
|
|
234
|
+
`).map(function(f,p){return p===0?f:""+h+f}).join(`
|
|
235
|
+
`)),s+=u+i[l+1]}),s}var k_={body:'<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>',height:80,width:80},Js=new Map,Hp=new Map,w_=d(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(A.debug("Registering icon pack:",t.name),"loader"in t)Hp.set(t.name,t.loader);else if("icons"in t)Js.set(t.name,t.icons);else throw A.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),Yp=d(async(e,t)=>{const r=_w(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let n=Js.get(i);if(!n){const s=Hp.get(i);if(!s)throw new Error(`Icon set not found: ${r.prefix}`);try{n={...await s(),prefix:i},Js.set(i,n)}catch(o){throw A.error(o),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=vw(n,r.name);if(!a)throw new Error(`Icon not found: ${e}`);return a},"getRegisteredIconData"),__=d(async e=>{try{return await Yp(e),!0}catch{return!1}},"isIconAvailable"),Xi=d(async(e,t,r)=>{let i;try{i=await Yp(e,t?.fallbackPrefix)}catch(s){A.error(s),i=k_}const n=$w(i,t),a=Iw(Dw(n.body),{...n.attributes,...r});return re(a,Rt())},"getIconSVG");function jp(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
|
|
236
|
+
`).replace(/\n{2,}/g,`
|
|
237
|
+
`),n=Wp(i);return t===!1?n.replace(/ /g," "):n}d(jp,"preprocessMarkdown");function Up(e,t={}){const r=jp(e,t),i=ft.lexer(r),n=[[]];let a=0;function s(o,l="normal"){o.type==="text"?o.text.split(`
|
|
238
|
+
`).forEach((h,u)=>{u!==0&&(a++,n.push([])),h.split(" ").forEach(f=>{f=f.replace(/'/g,"'"),f&&n[a].push({content:f,type:l})})}):o.type==="strong"||o.type==="em"?o.tokens.forEach(c=>{s(c,o.type)}):o.type==="html"&&n[a].push({content:o.text,type:"normal"})}return d(s,"processNode"),i.forEach(o=>{o.type==="paragraph"?o.tokens?.forEach(l=>{s(l)}):o.type==="html"?n[a].push({content:o.text,type:"normal"}):n[a].push({content:o.raw,type:"normal"})}),n}d(Up,"markdownToLines");function Gp(e,{markdownAutoWrap:t}={}){const r=ft.lexer(e);function i(n){return n.type==="text"?t===!1?n.text.replace(/\n */g,"<br/>").replace(/ /g," "):n.text.replace(/\n */g,"<br/>"):n.type==="strong"?`<strong>${n.tokens?.map(i).join("")}</strong>`:n.type==="em"?`<em>${n.tokens?.map(i).join("")}</em>`:n.type==="paragraph"?`<p>${n.tokens?.map(i).join("")}</p>`:n.type==="space"?"":n.type==="html"?`${n.text}`:n.type==="escape"?n.text:(A.warn(`Unsupported markdown: ${n.type}`),n.raw)}return d(i,"output"),r.map(i).join("")}d(Gp,"markdownToHTML");function Vp(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}d(Vp,"splitTextToChars");function Xp(e,t){const r=Vp(t.content);return ul(e,[],r,t.type)}d(Xp,"splitWordToFitWidth");function ul(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[n,...a]=r,s=[...t,n];return e([{content:s.join(""),type:i}])?ul(e,s,a,i):(t.length===0&&n&&(t.push(n),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}d(ul,"splitWordToFitWidthRecursion");function Zp(e,t){if(e.some(({content:r})=>r.includes(`
|
|
239
|
+
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return sa(e,t)}d(Zp,"splitLineToFitWidth");function sa(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let n="";e[0].content===" "&&(n=" ",e.shift());const a=e.shift()??{content:" ",type:"normal"},s=[...i];if(n!==""&&s.push({content:n,type:"normal"}),s.push(a),t(s))return sa(e,t,r,s);if(i.length>0)r.push(i),e.unshift(a);else if(a.content){const[o,l]=Xp(t,a);r.push([o]),l.content&&e.unshift(l)}return sa(e,t,r)}d(sa,"splitLineToFitWidthRecursion");function to(e,t){t&&e.attr("style",t)}d(to,"applyStyle");async function Qp(e,t,r,i,n=!1,a=Rt()){const s=e.append("foreignObject");s.attr("width",`${10*r}px`),s.attr("height",`${10*r}px`);const o=s.append("xhtml:div"),l=Hr(t.label)?await So(t.label.replace(Zr.lineBreakRegex,`
|
|
240
|
+
`),a):re(t.label,a),c=t.isNode?"nodeLabel":"edgeLabel",h=o.append("span");h.html(l),to(h,t.labelStyle),h.attr("class",`${c} ${i}`),to(o,t.labelStyle),o.style("display","table-cell"),o.style("white-space","nowrap"),o.style("line-height","1.5"),o.style("max-width",r+"px"),o.style("text-align","center"),o.attr("xmlns","http://www.w3.org/1999/xhtml"),n&&o.attr("class","labelBkg");let u=o.node().getBoundingClientRect();return u.width===r&&(o.style("display","table"),o.style("white-space","break-spaces"),o.style("width",r+"px"),u=o.node().getBoundingClientRect()),s.node()}d(Qp,"addHtmlSpan");function La(e,t,r){return e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em")}d(La,"createTspan");function Kp(e,t,r){const i=e.append("text"),n=La(i,1,t);Ea(n,r);const a=n.node().getComputedTextLength();return i.remove(),a}d(Kp,"computeWidthOfText");function C_(e,t,r){const i=e.append("text"),n=La(i,1,t);Ea(n,[{content:r,type:"normal"}]);const a=n.node()?.getBoundingClientRect();return a&&i.remove(),a}d(C_,"computeDimensionOfText");function Jp(e,t,r,i=!1){const a=t.append("g"),s=a.insert("rect").attr("class","background").attr("style","stroke: none"),o=a.append("text").attr("y","-10.1");let l=0;for(const c of r){const h=d(f=>Kp(a,1.1,f)<=e,"checkWidth"),u=h(c)?[c]:Zp(c,h);for(const f of u){const p=La(o,l,1.1);Ea(p,f),l++}}if(i){const c=o.node().getBBox(),h=2;return s.attr("x",c.x-h).attr("y",c.y-h).attr("width",c.width+2*h).attr("height",c.height+2*h),a.node()}else return o.node()}d(Jp,"createFormattedText");function Ea(e,t){e.text(""),t.forEach((r,i)=>{const n=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?n.text(r.content):n.text(" "+r.content)})}d(Ea,"updateTextContentAndStyles");async function td(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(n,a,s)=>(r.push((async()=>{const o=`${a}:${s}`;return await __(o)?await Xi(o,void 0,{class:"label-icon"}):`<i class='${re(n,t).replace(":"," ")}'></i>`})()),n));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}d(td,"replaceIconSubstring");var Ve=d(async(e,t="",{style:r="",isTitle:i=!1,classes:n="",useHtmlLabels:a=!0,isNode:s=!0,width:o=200,addSvgBackground:l=!1}={},c)=>{if(A.debug("XYZ createText",t,r,i,n,a,s,"addSvgBackground: ",l),a){const h=Gp(t,c),u=await td(xr(h),c),f=t.replace(/\\\\/g,"\\"),p={isNode:s,label:Hr(t)?f:u,labelStyle:r.replace("fill:","color:")};return await Qp(e,p,o,n,l,c)}else{const h=t.replace(/<br\s*\/?>/g,"<br/>"),u=Up(h.replace("<br>","<br/>"),c),f=Jp(o,e,u,t?l:!1);if(s){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");at(f).attr("style",p)}else{const p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");at(f).select("rect").attr("style",p.replace(/background:/g,"fill:"));const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");at(f).select("text").attr("style",g)}return f}},"createText");function ss(e,t,r){if(e&&e.length){const[i,n]=t,a=Math.PI/180*r,s=Math.cos(a),o=Math.sin(a);for(const l of e){const[c,h]=l;l[0]=(c-i)*s-(h-n)*o+i,l[1]=(c-i)*o+(h-n)*s+n}}}function S_(e,t){return e[0]===t[0]&&e[1]===t[1]}function v_(e,t,r,i=1){const n=r,a=Math.max(t,.1),s=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,o=[0,0];if(n)for(const c of s)ss(c,o,n);const l=(function(c,h,u){const f=[];for(const b of c){const k=[...b];S_(k[0],k[k.length-1])||k.push([k[0][0],k[0][1]]),k.length>2&&f.push(k)}const p=[];h=Math.max(h,.1);const g=[];for(const b of f)for(let k=0;k<b.length-1;k++){const C=b[k],_=b[k+1];if(C[1]!==_[1]){const T=Math.min(C[1],_[1]);g.push({ymin:T,ymax:Math.max(C[1],_[1]),x:T===C[1]?C[0]:_[0],islope:(_[0]-C[0])/(_[1]-C[1])})}}if(g.sort(((b,k)=>b.ymin<k.ymin?-1:b.ymin>k.ymin?1:b.x<k.x?-1:b.x>k.x?1:b.ymax===k.ymax?0:(b.ymax-k.ymax)/Math.abs(b.ymax-k.ymax))),!g.length)return p;let m=[],y=g[0].ymin,x=0;for(;m.length||g.length;){if(g.length){let b=-1;for(let k=0;k<g.length&&!(g[k].ymin>y);k++)b=k;g.splice(0,b+1).forEach((k=>{m.push({s:y,edge:k})}))}if(m=m.filter((b=>!(b.edge.ymax<=y))),m.sort(((b,k)=>b.edge.x===k.edge.x?0:(b.edge.x-k.edge.x)/Math.abs(b.edge.x-k.edge.x))),(u!==1||x%h==0)&&m.length>1)for(let b=0;b<m.length;b+=2){const k=b+1;if(k>=m.length)break;const C=m[b].edge,_=m[k].edge;p.push([[Math.round(C.x),y],[Math.round(_.x),y]])}y+=u,m.forEach((b=>{b.edge.x=b.edge.x+u*b.edge.islope})),x++}return p})(s,a,i);if(n){for(const c of s)ss(c,o,-n);(function(c,h,u){const f=[];c.forEach((p=>f.push(...p))),ss(f,h,u)})(l,o,-n)}return l}function Zi(e,t){var r;const i=t.hachureAngle+90;let n=t.hachureGap;n<0&&(n=4*t.strokeWidth),n=Math.round(Math.max(n,.1));let a=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=n),v_(e,n,i,a||1)}class fl{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=Zi(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const n of t)i.push(...this.helper.doubleLineOps(n[0][0],n[0][1],n[1][0],n[1][1],r));return i}}function Ma(e){const t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}class T_ extends fl{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const n=Zi(t,Object.assign({},r,{hachureGap:i})),a=Math.PI/180*r.hachureAngle,s=[],o=.5*i*Math.cos(a),l=.5*i*Math.sin(a);for(const[c,h]of n)Ma([c,h])&&s.push([[c[0]-o,c[1]+l],[...h]],[[c[0]+o,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(s,r)}}}class A_ extends fl{fillPolygons(t,r){const i=this._fillPolygons(t,r),n=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(t,n);return i.ops=i.ops.concat(a.ops),i}}class B_{constructor(t){this.helper=t}fillPolygons(t,r){const i=Zi(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);const s=n/4;for(const o of t){const l=Ma(o),c=l/n,h=Math.ceil(c)-1,u=l-h*n,f=(o[0][0]+o[1][0])/2-n/4,p=Math.min(o[0][1],o[1][1]);for(let g=0;g<h;g++){const m=p+u+g*n,y=f-s+2*Math.random()*s,x=m-s+2*Math.random()*s,b=this.helper.ellipse(y,x,a,a,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class L_{constructor(t){this.helper=t}fillPolygons(t,r){const i=Zi(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,n=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,a=[];return t.forEach((s=>{const o=Ma(s),l=Math.floor(o/(i+n)),c=(o+n-l*(i+n))/2;let h=s[0],u=s[1];h[0]>u[0]&&(h=s[1],u=s[0]);const f=Math.atan((u[1]-h[1])/(u[0]-h[0]));for(let p=0;p<l;p++){const g=p*(i+n),m=g+i,y=[h[0]+g*Math.cos(f)+c*Math.cos(f),h[1]+g*Math.sin(f)+c*Math.sin(f)],x=[h[0]+m*Math.cos(f)+c*Math.cos(f),h[1]+m*Math.sin(f)+c*Math.sin(f)];a.push(...this.helper.doubleLineOps(y[0],y[1],x[0],x[1],r))}})),a}}class E_{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,n=r.zigzagOffset<0?i:r.zigzagOffset,a=Zi(t,r=Object.assign({},r,{hachureGap:i+n}));return{type:"fillSketch",ops:this.zigzagLines(a,n,r)}}zigzagLines(t,r,i){const n=[];return t.forEach((a=>{const s=Ma(a),o=Math.round(s/(2*r));let l=a[0],c=a[1];l[0]>c[0]&&(l=a[1],c=a[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let u=0;u<o;u++){const f=2*u*r,p=2*(u+1)*r,g=Math.sqrt(2*Math.pow(r,2)),m=[l[0]+f*Math.cos(h),l[1]+f*Math.sin(h)],y=[l[0]+p*Math.cos(h),l[1]+p*Math.sin(h)],x=[m[0]+g*Math.cos(h+Math.PI/4),m[1]+g*Math.sin(h+Math.PI/4)];n.push(...this.helper.doubleLineOps(m[0],m[1],x[0],x[1],i),...this.helper.doubleLineOps(x[0],x[1],y[0],y[1],i))}})),n}}const Ut={};class M_{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const $_=0,os=1,Gc=2,pn={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function ls(e,t){return e.type===t}function pl(e){const t=[],r=(function(s){const o=new Array;for(;s!=="";)if(s.match(/^([ \t\r\n,]+)/))s=s.substr(RegExp.$1.length);else if(s.match(/^([aAcChHlLmMqQsStTvVzZ])/))o[o.length]={type:$_,text:RegExp.$1},s=s.substr(RegExp.$1.length);else{if(!s.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];o[o.length]={type:os,text:`${parseFloat(RegExp.$1)}`},s=s.substr(RegExp.$1.length)}return o[o.length]={type:Gc,text:""},o})(e);let i="BOD",n=0,a=r[n];for(;!ls(a,Gc);){let s=0;const o=[];if(i==="BOD"){if(a.text!=="M"&&a.text!=="m")return pl("M0,0"+e);n++,s=pn[a.text],i=a.text}else ls(a,os)?s=pn[i]:(n++,s=pn[a.text],i=a.text);if(!(n+s<r.length))throw new Error("Path data ended short");for(let l=n;l<n+s;l++){const c=r[l];if(!ls(c,os))throw new Error("Param not a number: "+i+","+c.text);o[o.length]=+c.text}if(typeof pn[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:o};t.push(l),n+=s,a=r[n],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function ed(e){let t=0,r=0,i=0,n=0;const a=[];for(const{key:s,data:o}of e)switch(s){case"M":a.push({key:"M",data:[...o]}),[t,r]=o,[i,n]=o;break;case"m":t+=o[0],r+=o[1],a.push({key:"M",data:[t,r]}),i=t,n=r;break;case"L":a.push({key:"L",data:[...o]}),[t,r]=o;break;case"l":t+=o[0],r+=o[1],a.push({key:"L",data:[t,r]});break;case"C":a.push({key:"C",data:[...o]}),t=o[4],r=o[5];break;case"c":{const l=o.map(((c,h)=>h%2?c+r:c+t));a.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":a.push({key:"Q",data:[...o]}),t=o[2],r=o[3];break;case"q":{const l=o.map(((c,h)=>h%2?c+r:c+t));a.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":a.push({key:"A",data:[...o]}),t=o[5],r=o[6];break;case"a":t+=o[5],r+=o[6],a.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],t,r]});break;case"H":a.push({key:"H",data:[...o]}),t=o[0];break;case"h":t+=o[0],a.push({key:"H",data:[t]});break;case"V":a.push({key:"V",data:[...o]}),r=o[0];break;case"v":r+=o[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...o]}),t=o[2],r=o[3];break;case"s":{const l=o.map(((c,h)=>h%2?c+r:c+t));a.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":a.push({key:"T",data:[...o]}),t=o[0],r=o[1];break;case"t":t+=o[0],r+=o[1],a.push({key:"T",data:[t,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),t=i,r=n}return a}function rd(e){const t=[];let r="",i=0,n=0,a=0,s=0,o=0,l=0;for(const{key:c,data:h}of e){switch(c){case"M":t.push({key:"M",data:[...h]}),[i,n]=h,[a,s]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],n=h[5],o=h[2],l=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,n]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,n]});break;case"V":n=h[0],t.push({key:"L",data:[i,n]});break;case"S":{let u=0,f=0;r==="C"||r==="S"?(u=i+(i-o),f=n+(n-l)):(u=i,f=n),t.push({key:"C",data:[u,f,...h]}),o=h[0],l=h[1],i=h[2],n=h[3];break}case"T":{const[u,f]=h;let p=0,g=0;r==="Q"||r==="T"?(p=i+(i-o),g=n+(n-l)):(p=i,g=n);const m=i+2*(p-i)/3,y=n+2*(g-n)/3,x=u+2*(p-u)/3,b=f+2*(g-f)/3;t.push({key:"C",data:[m,y,x,b,u,f]}),o=p,l=g,i=u,n=f;break}case"Q":{const[u,f,p,g]=h,m=i+2*(u-i)/3,y=n+2*(f-n)/3,x=p+2*(u-p)/3,b=g+2*(f-g)/3;t.push({key:"C",data:[m,y,x,b,p,g]}),o=u,l=f,i=p,n=g;break}case"A":{const u=Math.abs(h[0]),f=Math.abs(h[1]),p=h[2],g=h[3],m=h[4],y=h[5],x=h[6];u===0||f===0?(t.push({key:"C",data:[i,n,y,x,y,x]}),i=y,n=x):(i!==y||n!==x)&&(id(i,n,y,x,u,f,p,g,m).forEach((function(b){t.push({key:"C",data:b})})),i=y,n=x);break}case"Z":t.push({key:"Z",data:[]}),i=a,n=s}r=c}return t}function pi(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function id(e,t,r,i,n,a,s,o,l,c){const h=(u=s,Math.PI*u/180);var u;let f=[],p=0,g=0,m=0,y=0;if(c)[p,g,m,y]=c;else{[e,t]=pi(e,t,-h),[r,i]=pi(r,i,-h);const M=(e-r)/2,L=(t-i)/2;let N=M*M/(n*n)+L*L/(a*a);N>1&&(N=Math.sqrt(N),n*=N,a*=N);const I=n*n,j=a*a,G=I*j-I*L*L-j*M*M,mt=I*L*L+j*M*M,kt=(o===l?-1:1)*Math.sqrt(Math.abs(G/mt));m=kt*n*L/a+(e+r)/2,y=kt*-a*M/n+(t+i)/2,p=Math.asin(parseFloat(((t-y)/a).toFixed(9))),g=Math.asin(parseFloat(((i-y)/a).toFixed(9))),e<m&&(p=Math.PI-p),r<m&&(g=Math.PI-g),p<0&&(p=2*Math.PI+p),g<0&&(g=2*Math.PI+g),l&&p>g&&(p-=2*Math.PI),!l&&g>p&&(g-=2*Math.PI)}let x=g-p;if(Math.abs(x)>120*Math.PI/180){const M=g,L=r,N=i;g=l&&g>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,f=id(r=m+n*Math.cos(g),i=y+a*Math.sin(g),L,N,n,a,s,0,l,[g,M,m,y])}x=g-p;const b=Math.cos(p),k=Math.sin(p),C=Math.cos(g),_=Math.sin(g),T=Math.tan(x/4),v=4/3*n*T,B=4/3*a*T,F=[e,t],D=[e+v*k,t-B*b],E=[r+v*_,i-B*C],R=[r,i];if(D[0]=2*F[0]-D[0],D[1]=2*F[1]-D[1],c)return[D,E,R].concat(f);{f=[D,E,R].concat(f);const M=[];for(let L=0;L<f.length;L+=3){const N=pi(f[L][0],f[L][1],h),I=pi(f[L+1][0],f[L+1][1],h),j=pi(f[L+2][0],f[L+2][1],h);M.push([N[0],N[1],I[0],I[1],j[0],j[1]])}return M}}const F_={randOffset:function(e,t){return J(e,t)},randOffsetWithRange:function(e,t,r){return oa(e,t,r)},ellipse:function(e,t,r,i,n){const a=ad(r,i,n);return eo(e,t,n,a).opset},doubleLineOps:function(e,t,r,i,n){return Ue(e,t,r,i,n,!0)}};function nd(e,t,r,i,n){return{type:"path",ops:Ue(e,t,r,i,n)}}function An(e,t,r){const i=(e||[]).length;if(i>2){const n=[];for(let a=0;a<i-1;a++)n.push(...Ue(e[a][0],e[a][1],e[a+1][0],e[a+1][1],r));return t&&n.push(...Ue(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:n}}return i===2?nd(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function R_(e,t,r,i,n){return(function(a,s){return An(a,!0,s)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],n)}function Vc(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=dn(r[0],1*(1+.2*t.roughness),t),n=t.disableMultiStroke?[]:dn(r[0],1.5*(1+.22*t.roughness),Qc(t));for(let a=1;a<r.length;a++){const s=r[a];if(s.length){const o=dn(s,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:dn(s,1.5*(1+.22*t.roughness),Qc(t));for(const c of o)c.op!=="move"&&i.push(c);for(const c of l)c.op!=="move"&&n.push(c)}}return{type:"path",ops:i.concat(n)}}return{type:"path",ops:[]}}function ad(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),n=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),a=2*Math.PI/n;let s=Math.abs(e/2),o=Math.abs(t/2);const l=1-r.curveFitting;return s+=J(s*l,r),o+=J(o*l,r),{increment:a,rx:s,ry:o}}function eo(e,t,r,i){const[n,a]=Kc(i.increment,e,t,i.rx,i.ry,1,i.increment*oa(.1,oa(.4,1,r),r),r);let s=la(n,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[o]=Kc(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=la(o,null,r);s=s.concat(l)}return{estimatedPoints:a,opset:{type:"path",ops:s}}}function Xc(e,t,r,i,n,a,s,o,l){const c=e,h=t;let u=Math.abs(r/2),f=Math.abs(i/2);u+=J(.01*u,l),f+=J(.01*f,l);let p=n,g=a;for(;p<0;)p+=2*Math.PI,g+=2*Math.PI;g-p>2*Math.PI&&(p=0,g=2*Math.PI);const m=2*Math.PI/l.curveStepCount,y=Math.min(m/2,(g-p)/2),x=Jc(y,c,h,u,f,p,g,1,l);if(!l.disableMultiStroke){const b=Jc(y,c,h,u,f,p,g,1.5,l);x.push(...b)}return s&&(o?x.push(...Ue(c,h,c+u*Math.cos(p),h+f*Math.sin(p),l),...Ue(c,h,c+u*Math.cos(g),h+f*Math.sin(g),l)):x.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+u*Math.cos(p),h+f*Math.sin(p)]})),{type:"path",ops:x}}function Zc(e,t){const r=rd(ed(pl(e))),i=[];let n=[0,0],a=[0,0];for(const{key:s,data:o}of r)switch(s){case"M":a=[o[0],o[1]],n=[o[0],o[1]];break;case"L":i.push(...Ue(a[0],a[1],o[0],o[1],t)),a=[o[0],o[1]];break;case"C":{const[l,c,h,u,f,p]=o;i.push(...D_(l,c,h,u,f,p,a,t)),a=[f,p];break}case"Z":i.push(...Ue(a[0],a[1],n[0],n[1],t)),a=[n[0],n[1]]}return{type:"path",ops:i}}function cs(e,t){const r=[];for(const i of e)if(i.length){const n=t.maxRandomnessOffset||0,a=i.length;if(a>2){r.push({op:"move",data:[i[0][0]+J(n,t),i[0][1]+J(n,t)]});for(let s=1;s<a;s++)r.push({op:"lineTo",data:[i[s][0]+J(n,t),i[s][1]+J(n,t)]})}}return{type:"fillPath",ops:r}}function Ar(e,t){return(function(r,i){let n=r.fillStyle||"hachure";if(!Ut[n])switch(n){case"zigzag":Ut[n]||(Ut[n]=new T_(i));break;case"cross-hatch":Ut[n]||(Ut[n]=new A_(i));break;case"dots":Ut[n]||(Ut[n]=new B_(i));break;case"dashed":Ut[n]||(Ut[n]=new L_(i));break;case"zigzag-line":Ut[n]||(Ut[n]=new E_(i));break;default:n="hachure",Ut[n]||(Ut[n]=new fl(i))}return Ut[n]})(t,F_).fillPolygons(e,t)}function Qc(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function sd(e){return e.randomizer||(e.randomizer=new M_(e.seed||0)),e.randomizer.next()}function oa(e,t,r,i=1){return r.roughness*i*(sd(r)*(t-e)+e)}function J(e,t,r=1){return oa(-e,e,t,r)}function Ue(e,t,r,i,n,a=!1){const s=a?n.disableMultiStrokeFill:n.disableMultiStroke,o=ro(e,t,r,i,n,!0,!1);if(s)return o;const l=ro(e,t,r,i,n,!0,!0);return o.concat(l)}function ro(e,t,r,i,n,a,s){const o=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(o);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let h=n.maxRandomnessOffset||0;h*h*100>o&&(h=l/10);const u=h/2,f=.2+.2*sd(n);let p=n.bowing*n.maxRandomnessOffset*(i-t)/200,g=n.bowing*n.maxRandomnessOffset*(e-r)/200;p=J(p,n,c),g=J(g,n,c);const m=[],y=()=>J(u,n,c),x=()=>J(h,n,c),b=n.preserveVertices;return s?m.push({op:"move",data:[e+(b?0:y()),t+(b?0:y())]}):m.push({op:"move",data:[e+(b?0:J(h,n,c)),t+(b?0:J(h,n,c))]}),s?m.push({op:"bcurveTo",data:[p+e+(r-e)*f+y(),g+t+(i-t)*f+y(),p+e+2*(r-e)*f+y(),g+t+2*(i-t)*f+y(),r+(b?0:y()),i+(b?0:y())]}):m.push({op:"bcurveTo",data:[p+e+(r-e)*f+x(),g+t+(i-t)*f+x(),p+e+2*(r-e)*f+x(),g+t+2*(i-t)*f+x(),r+(b?0:x()),i+(b?0:x())]}),m}function dn(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+J(t,r),e[0][1]+J(t,r)]),i.push([e[0][0]+J(t,r),e[0][1]+J(t,r)]);for(let n=1;n<e.length;n++)i.push([e[n][0]+J(t,r),e[n][1]+J(t,r)]),n===e.length-1&&i.push([e[n][0]+J(t,r),e[n][1]+J(t,r)]);return la(i,null,r)}function la(e,t,r){const i=e.length,n=[];if(i>3){const a=[],s=1-r.curveTightness;n.push({op:"move",data:[e[1][0],e[1][1]]});for(let o=1;o+2<i;o++){const l=e[o];a[0]=[l[0],l[1]],a[1]=[l[0]+(s*e[o+1][0]-s*e[o-1][0])/6,l[1]+(s*e[o+1][1]-s*e[o-1][1])/6],a[2]=[e[o+1][0]+(s*e[o][0]-s*e[o+2][0])/6,e[o+1][1]+(s*e[o][1]-s*e[o+2][1])/6],a[3]=[e[o+1][0],e[o+1][1]],n.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}}else i===3?(n.push({op:"move",data:[e[1][0],e[1][1]]}),n.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&n.push(...ro(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return n}function Kc(e,t,r,i,n,a,s,o){const l=[],c=[];if(o.roughness===0){e/=4,c.push([t+i*Math.cos(-e),r+n*Math.sin(-e)]);for(let h=0;h<=2*Math.PI;h+=e){const u=[t+i*Math.cos(h),r+n*Math.sin(h)];l.push(u),c.push(u)}c.push([t+i*Math.cos(0),r+n*Math.sin(0)]),c.push([t+i*Math.cos(e),r+n*Math.sin(e)])}else{const h=J(.5,o)-Math.PI/2;c.push([J(a,o)+t+.9*i*Math.cos(h-e),J(a,o)+r+.9*n*Math.sin(h-e)]);const u=2*Math.PI+h-.01;for(let f=h;f<u;f+=e){const p=[J(a,o)+t+i*Math.cos(f),J(a,o)+r+n*Math.sin(f)];l.push(p),c.push(p)}c.push([J(a,o)+t+i*Math.cos(h+2*Math.PI+.5*s),J(a,o)+r+n*Math.sin(h+2*Math.PI+.5*s)]),c.push([J(a,o)+t+.98*i*Math.cos(h+s),J(a,o)+r+.98*n*Math.sin(h+s)]),c.push([J(a,o)+t+.9*i*Math.cos(h+.5*s),J(a,o)+r+.9*n*Math.sin(h+.5*s)])}return[c,l]}function Jc(e,t,r,i,n,a,s,o,l){const c=a+J(.1,l),h=[];h.push([J(o,l)+t+.9*i*Math.cos(c-e),J(o,l)+r+.9*n*Math.sin(c-e)]);for(let u=c;u<=s;u+=e)h.push([J(o,l)+t+i*Math.cos(u),J(o,l)+r+n*Math.sin(u)]);return h.push([t+i*Math.cos(s),r+n*Math.sin(s)]),h.push([t+i*Math.cos(s),r+n*Math.sin(s)]),la(h,null,l)}function D_(e,t,r,i,n,a,s,o){const l=[],c=[o.maxRandomnessOffset||1,(o.maxRandomnessOffset||1)+.3];let h=[0,0];const u=o.disableMultiStroke?1:2,f=o.preserveVertices;for(let p=0;p<u;p++)p===0?l.push({op:"move",data:[s[0],s[1]]}):l.push({op:"move",data:[s[0]+(f?0:J(c[0],o)),s[1]+(f?0:J(c[0],o))]}),h=f?[n,a]:[n+J(c[p],o),a+J(c[p],o)],l.push({op:"bcurveTo",data:[e+J(c[p],o),t+J(c[p],o),r+J(c[p],o),i+J(c[p],o),h[0],h[1]]});return l}function di(e){return[...e]}function th(e,t=0){const r=e.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(r===3)i.push(di(e[0]),di(e[1]),di(e[2]),di(e[2]));else{const n=[];n.push(e[0],e[0]);for(let o=1;o<e.length;o++)n.push(e[o]),o===e.length-1&&n.push(e[o]);const a=[],s=1-t;i.push(di(n[0]));for(let o=1;o+2<n.length;o++){const l=n[o];a[0]=[l[0],l[1]],a[1]=[l[0]+(s*n[o+1][0]-s*n[o-1][0])/6,l[1]+(s*n[o+1][1]-s*n[o-1][1])/6],a[2]=[n[o+1][0]+(s*n[o][0]-s*n[o+2][0])/6,n[o+1][1]+(s*n[o][1]-s*n[o+2][1])/6],a[3]=[n[o+1][0],n[o+1][1]],i.push(a[1],a[2],a[3])}}return i}function Bn(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function I_(e,t,r){const i=Bn(t,r);if(i===0)return Bn(e,t);let n=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return n=Math.max(0,Math.min(1,n)),Bn(e,rr(t,r,n))}function rr(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function io(e,t,r,i){const n=i||[];if((function(o,l){const c=o[l+0],h=o[l+1],u=o[l+2],f=o[l+3];let p=3*h[0]-2*c[0]-f[0];p*=p;let g=3*h[1]-2*c[1]-f[1];g*=g;let m=3*u[0]-2*f[0]-c[0];m*=m;let y=3*u[1]-2*f[1]-c[1];return y*=y,p<m&&(p=m),g<y&&(g=y),p+g})(e,t)<r){const o=e[t+0];n.length?(a=n[n.length-1],s=o,Math.sqrt(Bn(a,s))>1&&n.push(o)):n.push(o),n.push(e[t+3])}else{const l=e[t+0],c=e[t+1],h=e[t+2],u=e[t+3],f=rr(l,c,.5),p=rr(c,h,.5),g=rr(h,u,.5),m=rr(f,p,.5),y=rr(p,g,.5),x=rr(m,y,.5);io([l,f,m,x],0,r,n),io([x,y,g,u],0,r,n)}var a,s;return n}function O_(e,t){return ca(e,0,e.length,t)}function ca(e,t,r,i,n){const a=n||[],s=e[t],o=e[r-1];let l=0,c=1;for(let h=t+1;h<r-1;++h){const u=I_(e[h],s,o);u>l&&(l=u,c=h)}return Math.sqrt(l)>i?(ca(e,t,c+1,i,a),ca(e,c,r,i,a)):(a.length||a.push(s),a.push(o)),a}function hs(e,t=.15,r){const i=[],n=(e.length-1)/3;for(let a=0;a<n;a++)io(e,3*a,t,i);return r&&r>0?ca(i,0,i.length,r):i}const Qt="none";class ha{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,n,a){const s=this._o(a);return this._d("line",[nd(t,r,i,n,s)],s)}rectangle(t,r,i,n,a){const s=this._o(a),o=[],l=R_(t,r,i,n,s);if(s.fill){const c=[[t,r],[t+i,r],[t+i,r+n],[t,r+n]];s.fillStyle==="solid"?o.push(cs([c],s)):o.push(Ar([c],s))}return s.stroke!==Qt&&o.push(l),this._d("rectangle",o,s)}ellipse(t,r,i,n,a){const s=this._o(a),o=[],l=ad(i,n,s),c=eo(t,r,s,l);if(s.fill)if(s.fillStyle==="solid"){const h=eo(t,r,s,l).opset;h.type="fillPath",o.push(h)}else o.push(Ar([c.estimatedPoints],s));return s.stroke!==Qt&&o.push(c.opset),this._d("ellipse",o,s)}circle(t,r,i,n){const a=this.ellipse(t,r,i,i,n);return a.shape="circle",a}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[An(t,!1,i)],i)}arc(t,r,i,n,a,s,o=!1,l){const c=this._o(l),h=[],u=Xc(t,r,i,n,a,s,o,!0,c);if(o&&c.fill)if(c.fillStyle==="solid"){const f=Object.assign({},c);f.disableMultiStroke=!0;const p=Xc(t,r,i,n,a,s,!0,!1,f);p.type="fillPath",h.push(p)}else h.push((function(f,p,g,m,y,x,b){const k=f,C=p;let _=Math.abs(g/2),T=Math.abs(m/2);_+=J(.01*_,b),T+=J(.01*T,b);let v=y,B=x;for(;v<0;)v+=2*Math.PI,B+=2*Math.PI;B-v>2*Math.PI&&(v=0,B=2*Math.PI);const F=(B-v)/b.curveStepCount,D=[];for(let E=v;E<=B;E+=F)D.push([k+_*Math.cos(E),C+T*Math.sin(E)]);return D.push([k+_*Math.cos(B),C+T*Math.sin(B)]),D.push([k,C]),Ar([D],b)})(t,r,i,n,a,s,c));return c.stroke!==Qt&&h.push(u),this._d("arc",h,c)}curve(t,r){const i=this._o(r),n=[],a=Vc(t,i);if(i.fill&&i.fill!==Qt)if(i.fillStyle==="solid"){const s=Vc(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(s.ops)})}else{const s=[],o=t;if(o.length){const l=typeof o[0][0]=="number"?[o]:o;for(const c of l)c.length<3?s.push(...c):c.length===3?s.push(...hs(th([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):s.push(...hs(th(c),10,(1+i.roughness)/2))}s.length&&n.push(Ar([s],i))}return i.stroke!==Qt&&n.push(a),this._d("curve",n,i)}polygon(t,r){const i=this._o(r),n=[],a=An(t,!0,i);return i.fill&&(i.fillStyle==="solid"?n.push(cs([t],i)):n.push(Ar([t],i))),i.stroke!==Qt&&n.push(a),this._d("polygon",n,i)}path(t,r){const i=this._o(r),n=[];if(!t)return this._d("path",n,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const a=i.fill&&i.fill!=="transparent"&&i.fill!==Qt,s=i.stroke!==Qt,o=!!(i.simplification&&i.simplification<1),l=(function(h,u,f){const p=rd(ed(pl(h))),g=[];let m=[],y=[0,0],x=[];const b=()=>{x.length>=4&&m.push(...hs(x,u)),x=[]},k=()=>{b(),m.length&&(g.push(m),m=[])};for(const{key:_,data:T}of p)switch(_){case"M":k(),y=[T[0],T[1]],m.push(y);break;case"L":b(),m.push([T[0],T[1]]);break;case"C":if(!x.length){const v=m.length?m[m.length-1]:y;x.push([v[0],v[1]])}x.push([T[0],T[1]]),x.push([T[2],T[3]]),x.push([T[4],T[5]]);break;case"Z":b(),m.push([y[0],y[1]])}if(k(),!f)return g;const C=[];for(const _ of g){const T=O_(_,f);T.length&&C.push(T)}return C})(t,1,o?4-4*(i.simplification||1):(1+i.roughness)/2),c=Zc(t,i);if(a)if(i.fillStyle==="solid")if(l.length===1){const h=Zc(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else n.push(cs(l,i));else n.push(Ar(l,i));return s&&(o?l.forEach((h=>{n.push(An(h,!1,i))})):n.push(c)),this._d("path",n,i)}opsToPath(t,r){let i="";for(const n of t.ops){const a=typeof r=="number"&&r>=0?n.data.map((s=>+s.toFixed(r))):n.data;switch(n.op){case"move":i+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":i+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":i+=`L${a[0]} ${a[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,n=[];for(const a of r){let s=null;switch(a.type){case"path":s={d:this.opsToPath(a),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Qt};break;case"fillPath":s={d:this.opsToPath(a),stroke:Qt,strokeWidth:0,fill:i.fill||Qt};break;case"fillSketch":s=this.fillSketch(a,i)}s&&n.push(s)}return n}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||Qt,strokeWidth:i,fill:Qt}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class P_{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new ha(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.ctx,a=t.options.fixedDecimalPlaceDigits;for(const s of r)switch(s.type){case"path":n.save(),n.strokeStyle=i.stroke==="none"?"transparent":i.stroke,n.lineWidth=i.strokeWidth,i.strokeLineDash&&n.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(n.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(n,s,a),n.restore();break;case"fillPath":{n.save(),n.fillStyle=i.fill||"";const o=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(n,s,a,o),n.restore();break}case"fillSketch":this.fillSketch(n,s,i)}}fillSketch(t,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=n,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,n="nonzero"){t.beginPath();for(const a of r.ops){const s=typeof i=="number"&&i>=0?a.data.map((o=>+o.toFixed(i))):a.data;switch(a.op){case"move":t.moveTo(s[0],s[1]);break;case"bcurveTo":t.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5]);break;case"lineTo":t.lineTo(s[0],s[1])}}r.type==="fillPath"?t.fill(n):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,n,a){const s=this.gen.line(t,r,i,n,a);return this.draw(s),s}rectangle(t,r,i,n,a){const s=this.gen.rectangle(t,r,i,n,a);return this.draw(s),s}ellipse(t,r,i,n,a){const s=this.gen.ellipse(t,r,i,n,a);return this.draw(s),s}circle(t,r,i,n){const a=this.gen.circle(t,r,i,n);return this.draw(a),a}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,n,a,s,o=!1,l){const c=this.gen.arc(t,r,i,n,a,s,o,l);return this.draw(c),c}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){const i=this.gen.path(t,r);return this.draw(i),i}}const gn="http://www.w3.org/2000/svg";class N_{constructor(t,r){this.svg=t,this.gen=new ha(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,a=n.createElementNS(gn,"g"),s=t.options.fixedDecimalPlaceDigits;for(const o of r){let l=null;switch(o.type){case"path":l=n.createElementNS(gn,"path"),l.setAttribute("d",this.opsToPath(o,s)),l.setAttribute("stroke",i.stroke),l.setAttribute("stroke-width",i.strokeWidth+""),l.setAttribute("fill","none"),i.strokeLineDash&&l.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":l=n.createElementNS(gn,"path"),l.setAttribute("d",this.opsToPath(o,s)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(n,o,i)}l&&a.appendChild(l)}return a}fillSketch(t,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2);const a=t.createElementNS(gn,"path");return a.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),a.setAttribute("stroke",i.fill||""),a.setAttribute("stroke-width",n+""),a.setAttribute("fill","none"),i.fillLineDash&&a.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,n,a){const s=this.gen.line(t,r,i,n,a);return this.draw(s)}rectangle(t,r,i,n,a){const s=this.gen.rectangle(t,r,i,n,a);return this.draw(s)}ellipse(t,r,i,n,a){const s=this.gen.ellipse(t,r,i,n,a);return this.draw(s)}circle(t,r,i,n){const a=this.gen.circle(t,r,i,n);return this.draw(a)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,n,a,s,o=!1,l){const c=this.gen.arc(t,r,i,n,a,s,o,l);return this.draw(c)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}var q={canvas:(e,t)=>new P_(e,t),svg:(e,t)=>new N_(e,t),generator:e=>new ha(e),newSeed:()=>ha.newSeed()},K=d(async(e,t,r)=>{let i;const n=t.useHtmlLabels||vt(ut()?.htmlLabels);r?i=r:i="node default";const a=e.insert("g").attr("class",i).attr("id",t.domId||t.id),s=a.insert("g").attr("class","label").attr("style",It(t.labelStyle));let o;t.label===void 0?o="":o=typeof t.label=="string"?t.label:t.label[0];const l=await Ve(s,re(xr(o),ut()),{useHtmlLabels:n,width:t.width||ut().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:t.labelStyle,addSvgBackground:!!t.icon||!!t.img});let c=l.getBBox();const h=(t?.padding??0)/2;if(n){const u=l.children[0],f=at(l),p=u.getElementsByTagName("img");if(p){const g=o.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...p].map(m=>new Promise(y=>{function x(){if(m.style.display="flex",m.style.flexDirection="column",g){const b=ut().fontSize?ut().fontSize:window.getComputedStyle(document.body).fontSize,k=5,[C=Fh.fontSize]=Ta(b),_=C*k+"px";m.style.minWidth=_,m.style.maxWidth=_}else m.style.width="100%";y(m)}d(x,"setupImage"),setTimeout(()=>{m.complete&&x()}),m.addEventListener("error",x),m.addEventListener("load",x)})))}c=u.getBoundingClientRect(),f.attr("width",c.width),f.attr("height",c.height)}return n?s.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):s.attr("transform","translate(0, "+-c.height/2+")"),t.centerLabel&&s.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:a,bbox:c,halfPadding:h,label:s}},"labelHelper"),us=d(async(e,t,r)=>{const i=r.useHtmlLabels||vt(ut()?.flowchart?.htmlLabels),n=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await Ve(n,re(xr(t),ut()),{useHtmlLabels:i,width:r.width||ut()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let s=a.getBBox();const o=r.padding/2;if(vt(ut()?.flowchart?.htmlLabels)){const l=a.children[0],c=at(a);s=l.getBoundingClientRect(),c.attr("width",s.width),c.attr("height",s.height)}return i?n.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"):n.attr("transform","translate(0, "+-s.height/2+")"),r.centerLabel&&n.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:e,bbox:s,halfPadding:o,label:n}},"insertLabel"),Y=d((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),Q=d((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function it(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}d(it,"createPathFromPoints");function Ge(e,t,r,i,n,a){const s=[],l=r-e,c=i-t,h=l/a,u=2*Math.PI/h,f=t+c/2;for(let p=0;p<=50;p++){const g=p/50,m=e+g*l,y=f+n*Math.sin(u*(m-e));s.push({x:m,y})}return s}d(Ge,"generateFullSineWavePoints");function Ni(e,t,r,i,n,a){const s=[],o=n*Math.PI/180,h=(a*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const f=o+u*h,p=e+r*Math.cos(f),g=t+r*Math.sin(f);s.push({x:-p,y:-g})}return s}d(Ni,"generateCirclePoints");var z_=d((e,t)=>{var r=e.x,i=e.y,n=t.x-r,a=t.y-i,s=e.width/2,o=e.height/2,l,c;return Math.abs(a)*s>Math.abs(n)*o?(a<0&&(o=-o),l=a===0?0:o*n/a,c=o):(n<0&&(s=-s),l=s,c=n===0?0:s*a/n),{x:r+l,y:i+c}},"intersectRect"),Kr=z_;function od(e,t){t&&e.attr("style",t)}d(od,"applyStyle");async function ld(e){const t=at(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div"),i=ut();let n=e.label;e.label&&Hr(e.label)&&(n=await So(e.label.replace(Zr.lineBreakRegex,`
|
|
241
|
+
`),i));const s='<span class="'+(e.isNode?"nodeLabel":"edgeLabel")+'" '+(e.labelStyle?'style="'+e.labelStyle+'"':"")+">"+n+"</span>";return r.html(re(s,i)),od(r,e.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),t.node()}d(ld,"addHtmlLabel");var q_=d(async(e,t,r,i)=>{let n=e||"";if(typeof n=="object"&&(n=n[0]),vt(ut().flowchart.htmlLabels)){n=n.replace(/\\n|\n/g,"<br />"),A.info("vertexText"+n);const a={isNode:i,label:xr(n).replace(/fa[blrs]?:fa-[\w-]+/g,o=>`<i class='${o.replace(":"," ")}'></i>`),labelStyle:t&&t.replace("fill:","color:")};return await ld(a)}else{const a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("style",t.replace("color:","fill:"));let s=[];typeof n=="string"?s=n.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(n)?s=n:s=[];for(const o of s){const l=document.createElementNS("http://www.w3.org/2000/svg","tspan");l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.setAttribute("dy","1em"),l.setAttribute("x","0"),r?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=o.trim(),a.appendChild(l)}return a}},"createLabel"),or=q_,Xe=d((e,t,r,i,n)=>["M",e+n,t,"H",e+r-n,"A",n,n,0,0,1,e+r,t+n,"V",t+i-n,"A",n,n,0,0,1,e+r-n,t+i,"H",e+n,"A",n,n,0,0,1,e,t+i-n,"V",t+n,"A",n,n,0,0,1,e+n,t,"Z"].join(" "),"createRoundedRectPathD"),cd=d(async(e,t)=>{A.info("Creating subgraph rect for ",t.id,t);const r=ut(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:a,clusterBorder:s}=i,{labelStyles:o,nodeStyles:l,borderStyles:c,backgroundStyles:h}=H(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),f=vt(r.flowchart.htmlLabels),p=u.insert("g").attr("class","cluster-label "),g=await Ve(p,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0});let m=g.getBBox();if(vt(r.flowchart.htmlLabels)){const v=g.children[0],B=at(g);m=v.getBoundingClientRect(),B.attr("width",m.width),B.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-y/2,k=t.y-x/2;A.trace("Data ",t,JSON.stringify(t));let C;if(t.look==="handDrawn"){const v=q.svg(u),B=W(t,{roughness:.7,fill:a,stroke:s,fillWeight:3,seed:n}),F=v.path(Xe(b,k,y,x,0),B);C=u.insert(()=>(A.debug("Rough node insert CXC",F),F),":first-child"),C.select("path:nth-child(2)").attr("style",c.join(";")),C.select("path").attr("style",h.join(";").replace("fill","stroke"))}else C=u.insert("rect",":first-child"),C.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:_}=Xo(r);if(p.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+_})`),o){const v=p.select("span");v&&v.attr("style",o)}const T=C.node().getBBox();return t.offsetX=0,t.width=T.width,t.height=T.height,t.offsetY=m.height-t.padding/2,t.intersect=function(v){return Kr(t,v)},{cluster:u,labelBBox:m}},"rect"),W_=d((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.id),i=r.insert("rect",":first-child"),n=0*t.padding,a=n/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2-a).attr("width",t.width+n).attr("height",t.height+n).attr("fill","none");const s=i.node().getBBox();return t.width=s.width,t.height=s.height,t.intersect=function(o){return Kr(t,o)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),H_=d(async(e,t)=>{const r=ut(),{themeVariables:i,handDrawnSeed:n}=r,{altBackground:a,compositeBackground:s,compositeTitleBackground:o,nodeBorder:l}=i,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-id",t.id).attr("data-look",t.look),h=c.insert("g",":first-child"),u=c.insert("g").attr("class","cluster-label");let f=c.append("rect");const p=u.node().appendChild(await or(t.label,t.labelStyle,void 0,!0));let g=p.getBBox();if(vt(r.flowchart.htmlLabels)){const F=p.children[0],D=at(p);g=F.getBoundingClientRect(),D.attr("width",g.width),D.attr("height",g.height)}const m=0*t.padding,y=m/2,x=(t.width<=g.width+t.padding?g.width+t.padding:t.width)+m;t.width<=g.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+m,k=t.height+m-g.height-6,C=t.x-x/2,_=t.y-b/2;t.width=x;const T=t.y-t.height/2-y+g.height+2;let v;if(t.look==="handDrawn"){const F=t.cssClasses.includes("statediagram-cluster-alt"),D=q.svg(c),E=t.rx||t.ry?D.path(Xe(C,_,x,b,10),{roughness:.7,fill:o,fillStyle:"solid",stroke:l,seed:n}):D.rectangle(C,_,x,b,{seed:n});v=c.insert(()=>E,":first-child");const R=D.rectangle(C,T,x,k,{fill:F?a:s,fillStyle:F?"hachure":"solid",stroke:l,seed:n});v=c.insert(()=>E,":first-child"),f=c.insert(()=>R)}else v=h.insert("rect",":first-child"),v.attr("class","outer").attr("x",C).attr("y",_).attr("width",x).attr("height",b).attr("data-look",t.look),f.attr("class","inner").attr("x",C).attr("y",T).attr("width",x).attr("height",k);u.attr("transform",`translate(${t.x-g.width/2}, ${_+1-(vt(r.flowchart.htmlLabels)?0:3)})`);const B=v.node().getBBox();return t.height=B.height,t.offsetX=0,t.offsetY=g.height-t.padding/2,t.labelBBox=g,t.intersect=function(F){return Kr(t,F)},{cluster:c,labelBBox:g}},"roundedWithTitle"),Y_=d(async(e,t)=>{A.info("Creating subgraph rect for ",t.id,t);const r=ut(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:a,clusterBorder:s}=i,{labelStyles:o,nodeStyles:l,borderStyles:c,backgroundStyles:h}=H(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),f=vt(r.flowchart.htmlLabels),p=u.insert("g").attr("class","cluster-label "),g=await Ve(p,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width});let m=g.getBBox();if(vt(r.flowchart.htmlLabels)){const v=g.children[0],B=at(g);m=v.getBoundingClientRect(),B.attr("width",m.width),B.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-y/2,k=t.y-x/2;A.trace("Data ",t,JSON.stringify(t));let C;if(t.look==="handDrawn"){const v=q.svg(u),B=W(t,{roughness:.7,fill:a,stroke:s,fillWeight:4,seed:n}),F=v.path(Xe(b,k,y,x,t.rx),B);C=u.insert(()=>(A.debug("Rough node insert CXC",F),F),":first-child"),C.select("path:nth-child(2)").attr("style",c.join(";")),C.select("path").attr("style",h.join(";").replace("fill","stroke"))}else C=u.insert("rect",":first-child"),C.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:_}=Xo(r);if(p.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+_})`),o){const v=p.select("span");v&&v.attr("style",o)}const T=C.node().getBBox();return t.offsetX=0,t.width=T.width,t.height=T.height,t.offsetY=m.height-t.padding/2,t.intersect=function(v){return Kr(t,v)},{cluster:u,labelBBox:m}},"kanbanSection"),j_=d((e,t)=>{const r=ut(),{themeVariables:i,handDrawnSeed:n}=r,{nodeBorder:a}=i,s=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-look",t.look),o=s.insert("g",":first-child"),l=0*t.padding,c=t.width+l;t.diff=-t.padding;const h=t.height+l,u=t.x-c/2,f=t.y-h/2;t.width=c;let p;if(t.look==="handDrawn"){const y=q.svg(s).rectangle(u,f,c,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:n});p=s.insert(()=>y,":first-child")}else p=o.insert("rect",":first-child"),p.attr("class","divider").attr("x",u).attr("y",f).attr("width",c).attr("height",h).attr("data-look",t.look);const g=p.node().getBBox();return t.height=g.height,t.offsetX=0,t.offsetY=0,t.intersect=function(m){return Kr(t,m)},{cluster:s,labelBBox:{}}},"divider"),U_=cd,G_={rect:cd,squareRect:U_,roundedWithTitle:H_,noteGroup:W_,divider:j_,kanbanSection:Y_},hd=new Map,V_=d(async(e,t)=>{const r=t.shape||"rect",i=await G_[r](e,t);return hd.set(t.id,i),i},"insertCluster"),kA=d(()=>{hd=new Map},"clear");function ud(e,t){return e.intersect(t)}d(ud,"intersectNode");var X_=ud;function fd(e,t,r,i){var n=e.x,a=e.y,s=n-i.x,o=a-i.y,l=Math.sqrt(t*t*o*o+r*r*s*s),c=Math.abs(t*r*s/l);i.x<n&&(c=-c);var h=Math.abs(t*r*o/l);return i.y<a&&(h=-h),{x:n+c,y:a+h}}d(fd,"intersectEllipse");var pd=fd;function dd(e,t,r){return pd(e,t,t,r)}d(dd,"intersectCircle");var Z_=dd;function gd(e,t,r,i){{const n=t.y-e.y,a=e.x-t.x,s=t.x*e.y-e.x*t.y,o=n*r.x+a*r.y+s,l=n*i.x+a*i.y+s,c=1e-6;if(o!==0&&l!==0&&no(o,l))return;const h=i.y-r.y,u=r.x-i.x,f=i.x*r.y-r.x*i.y,p=h*e.x+u*e.y+f,g=h*t.x+u*t.y+f;if(Math.abs(p)<c&&Math.abs(g)<c&&no(p,g))return;const m=n*u-h*a;if(m===0)return;const y=Math.abs(m/2);let x=a*f-u*s;const b=x<0?(x-y)/m:(x+y)/m;x=h*s-n*f;const k=x<0?(x-y)/m:(x+y)/m;return{x:b,y:k}}}d(gd,"intersectLine");function no(e,t){return e*t>0}d(no,"sameSign");var Q_=gd;function md(e,t,r){let i=e.x,n=e.y,a=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){s=Math.min(s,h.x),o=Math.min(o,h.y)}):(s=Math.min(s,t.x),o=Math.min(o,t.y));let l=i-e.width/2-s,c=n-e.height/2-o;for(let h=0;h<t.length;h++){let u=t[h],f=t[h<t.length-1?h+1:0],p=Q_(e,r,{x:l+u.x,y:c+u.y},{x:l+f.x,y:c+f.y});p&&a.push(p)}return a.length?(a.length>1&&a.sort(function(h,u){let f=h.x-r.x,p=h.y-r.y,g=Math.sqrt(f*f+p*p),m=u.x-r.x,y=u.y-r.y,x=Math.sqrt(m*m+y*y);return g<x?-1:g===x?0:1}),a[0]):e}d(md,"intersectPolygon");var K_=md,P={node:X_,circle:Z_,ellipse:pd,polygon:K_,rect:Kr};function yd(e,t){const{labelStyles:r}=H(t);t.labelStyle=r;const i=Q(t);let n=i;i||(n="anchor");const a=e.insert("g").attr("class",n).attr("id",t.domId||t.id),s=1,{cssStyles:o}=t,l=q.svg(a),c=W(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const h=l.circle(0,0,s*2,c),u=a.insert(()=>h,":first-child");return u.attr("class","anchor").attr("style",It(o)),Y(t,u),t.intersect=function(f){return A.info("Circle intersect",t,s,f),P.circle(t,s,f)},a}d(yd,"anchor");function ao(e,t,r,i,n,a,s){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),u=(r-e)/2,f=(i-t)/2,p=u/n,g=f/a,m=Math.sqrt(p**2+g**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-m**2),x=l+y*a*Math.sin(h)*(s?-1:1),b=c-y*n*Math.cos(h)*(s?-1:1),k=Math.atan2((t-b)/a,(e-x)/n);let _=Math.atan2((i-b)/a,(r-x)/n)-k;s&&_<0&&(_+=2*Math.PI),!s&&_>0&&(_-=2*Math.PI);const T=[];for(let v=0;v<20;v++){const B=v/19,F=k+B*_,D=x+n*Math.cos(F),E=b+a*Math.sin(F);T.push({x:D,y:E})}return T}d(ao,"generateArcPoints");async function xd(e,t){const{labelStyles:r,nodeStyles:i}=H(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await K(e,t,Q(t)),s=a.width+t.padding+20,o=a.height+t.padding,l=o/2,c=l/(2.5+o/50),{cssStyles:h}=t,u=[{x:s/2,y:-o/2},{x:-s/2,y:-o/2},...ao(-s/2,-o/2,-s/2,o/2,c,l,!1),{x:s/2,y:o/2},...ao(s/2,o/2,s/2,-o/2,c,l,!0)],f=q.svg(n),p=W(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=it(u),m=f.path(g,p),y=n.insert(()=>m,":first-child");return y.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(${c/2}, 0)`),Y(t,y),t.intersect=function(x){return P.polygon(t,u,x)},n}d(xd,"bowTieRect");function Ze(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(n){return n.x+","+n.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}d(Ze,"insertPolygonShape");async function bd(e,t){const{labelStyles:r,nodeStyles:i}=H(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await K(e,t,Q(t)),s=a.height+t.padding,o=12,l=a.width+t.padding+o,c=0,h=l,u=-s,f=0,p=[{x:c+o,y:u},{x:h,y:u},{x:h,y:f},{x:c,y:f},{x:c,y:u+o},{x:c+o,y:u}];let g;const{cssStyles:m}=t;if(t.look==="handDrawn"){const y=q.svg(n),x=W(t,{}),b=it(p),k=y.path(b,x);g=n.insert(()=>k,":first-child").attr("transform",`translate(${-l/2}, ${s/2})`),m&&g.attr("style",m)}else g=Ze(n,l,s,p);return i&&g.attr("style",i),Y(t,g),t.intersect=function(y){return P.polygon(t,p,y)},n}d(bd,"card");function kd(e,t){const{nodeStyles:r}=H(t);t.label="";const i=e.insert("g").attr("class",Q(t)).attr("id",t.domId??t.id),{cssStyles:n}=t,a=Math.max(28,t.width??0),s=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],o=q.svg(i),l=W(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=it(s),h=o.path(c,l),u=i.insert(()=>h,":first-child");return n&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",n),r&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(f){return P.polygon(t,s,f)},i}d(kd,"choice");async function dl(e,t,r){const{labelStyles:i,nodeStyles:n}=H(t);t.labelStyle=i;const{shapeSvg:a,bbox:s,halfPadding:o}=await K(e,t,Q(t)),l=r?.padding??o,c=s.width/2+l;let h;const{cssStyles:u}=t;if(t.look==="handDrawn"){const f=q.svg(a),p=W(t,{}),g=f.circle(0,0,c*2,p);h=a.insert(()=>g,":first-child"),h.attr("class","basic label-container").attr("style",It(u))}else h=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",n).attr("r",c).attr("cx",0).attr("cy",0);return Y(t,h),t.calcIntersect=function(f,p){const g=f.width/2;return P.circle(f,g,p)},t.intersect=function(f){return A.info("Circle intersect",t,c,f),P.circle(t,c,f)},a}d(dl,"circle");function wd(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,n={x:i/2*t,y:i/2*r},a={x:-(i/2)*t,y:i/2*r},s={x:-(i/2)*t,y:-(i/2)*r},o={x:i/2*t,y:-(i/2)*r};return`M ${a.x},${a.y} L ${o.x},${o.y}
|
|
242
|
+
M ${n.x},${n.y} L ${s.x},${s.y}`}d(wd,"createLine");function _d(e,t){const{labelStyles:r,nodeStyles:i}=H(t);t.labelStyle=r,t.label="";const n=e.insert("g").attr("class",Q(t)).attr("id",t.domId??t.id),a=Math.max(30,t?.width??0),{cssStyles:s}=t,o=q.svg(n),l=W(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=o.circle(0,0,a*2,l),h=wd(a),u=o.path(h,l),f=n.insert(()=>c,":first-child");return f.insert(()=>u),s&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",s),i&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",i),Y(t,f),t.intersect=function(p){return A.info("crossedCircle intersect",t,{radius:a,point:p}),P.circle(t,a,p)},n}d(_d,"crossedCircle");function $e(e,t,r,i=100,n=0,a=180){const s=[],o=n*Math.PI/180,h=(a*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const f=o+u*h,p=e+r*Math.cos(f),g=t+r*Math.sin(f);s.push({x:-p,y:-g})}return s}d($e,"generateCirclePoints");async function Cd(e,t){const{labelStyles:r,nodeStyles:i}=H(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await K(e,t,Q(t)),o=a.width+(t.padding??0),l=a.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...$e(o/2,-l/2,c,30,-90,0),{x:-o/2-c,y:c},...$e(o/2+c*2,-c,c,20,-180,-270),...$e(o/2+c*2,c,c,20,-90,-180),{x:-o/2-c,y:-l/2},...$e(o/2,l/2,c,20,0,90)],f=[{x:o/2,y:-l/2-c},{x:-o/2,y:-l/2-c},...$e(o/2,-l/2,c,20,-90,0),{x:-o/2-c,y:-c},...$e(o/2+o*.1,-c,c,20,-180,-270),...$e(o/2+o*.1,c,c,20,-90,-180),{x:-o/2-c,y:l/2},...$e(o/2,l/2,c,20,0,90),{x:-o/2,y:l/2+c},{x:o/2,y:l/2+c}],p=q.svg(n),g=W(t,{fill:"none"});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=it(u).replace("Z",""),x=p.path(y,g),b=it(f),k=p.path(b,{...g}),C=n.insert("g",":first-child");return C.insert(()=>k,":first-child").attr("stroke-opacity",0),C.insert(()=>x,":first-child"),C.attr("class","text"),h&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",i),C.attr("transform",`translate(${c}, 0)`),s.attr("transform",`translate(${-o/2+c-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Y(t,C),t.intersect=function(_){return P.polygon(t,f,_)},n}d(Cd,"curlyBraceLeft");function Fe(e,t,r,i=100,n=0,a=180){const s=[],o=n*Math.PI/180,h=(a*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const f=o+u*h,p=e+r*Math.cos(f),g=t+r*Math.sin(f);s.push({x:p,y:g})}return s}d(Fe,"generateCirclePoints");async function Sd(e,t){const{labelStyles:r,nodeStyles:i}=H(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await K(e,t,Q(t)),o=a.width+(t.padding??0),l=a.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...Fe(o/2,-l/2,c,20,-90,0),{x:o/2+c,y:-c},...Fe(o/2+c*2,-c,c,20,-180,-270),...Fe(o/2+c*2,c,c,20,-90,-180),{x:o/2+c,y:l/2},...Fe(o/2,l/2,c,20,0,90)],f=[{x:-o/2,y:-l/2-c},{x:o/2,y:-l/2-c},...Fe(o/2,-l/2,c,20,-90,0),{x:o/2+c,y:-c},...Fe(o/2+c*2,-c,c,20,-180,-270),...Fe(o/2+c*2,c,c,20,-90,-180),{x:o/2+c,y:l/2},...Fe(o/2,l/2,c,20,0,90),{x:o/2,y:l/2+c},{x:-o/2,y:l/2+c}],p=q.svg(n),g=W(t,{fill:"none"});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=it(u).replace("Z",""),x=p.path(y,g),b=it(f),k=p.path(b,{...g}),C=n.insert("g",":first-child");return C.insert(()=>k,":first-child").attr("stroke-opacity",0),C.insert(()=>x,":first-child"),C.attr("class","text"),h&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",i),C.attr("transform",`translate(${-c}, 0)`),s.attr("transform",`translate(${-o/2+(t.padding??0)/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Y(t,C),t.intersect=function(_){return P.polygon(t,f,_)},n}d(Sd,"curlyBraceRight");function Lt(e,t,r,i=100,n=0,a=180){const s=[],o=n*Math.PI/180,h=(a*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const f=o+u*h,p=e+r*Math.cos(f),g=t+r*Math.sin(f);s.push({x:-p,y:-g})}return s}d(Lt,"generateCirclePoints");async function vd(e,t){const{labelStyles:r,nodeStyles:i}=H(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await K(e,t,Q(t)),o=a.width+(t.padding??0),l=a.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...Lt(o/2,-l/2,c,30,-90,0),{x:-o/2-c,y:c},...Lt(o/2+c*2,-c,c,20,-180,-270),...Lt(o/2+c*2,c,c,20,-90,-180),{x:-o/2-c,y:-l/2},...Lt(o/2,l/2,c,20,0,90)],f=[...Lt(-o/2+c+c/2,-l/2,c,20,-90,-180),{x:o/2-c/2,y:c},...Lt(-o/2-c/2,-c,c,20,0,90),...Lt(-o/2-c/2,c,c,20,-90,0),{x:o/2-c/2,y:-c},...Lt(-o/2+c+c/2,l/2,c,30,-180,-270)],p=[{x:o/2,y:-l/2-c},{x:-o/2,y:-l/2-c},...Lt(o/2,-l/2,c,20,-90,0),{x:-o/2-c,y:-c},...Lt(o/2+c*2,-c,c,20,-180,-270),...Lt(o/2+c*2,c,c,20,-90,-180),{x:-o/2-c,y:l/2},...Lt(o/2,l/2,c,20,0,90),{x:-o/2,y:l/2+c},{x:o/2-c-c/2,y:l/2+c},...Lt(-o/2+c+c/2,-l/2,c,20,-90,-180),{x:o/2-c/2,y:c},...Lt(-o/2-c/2,-c,c,20,0,90),...Lt(-o/2-c/2,c,c,20,-90,0),{x:o/2-c/2,y:-c},...Lt(-o/2+c+c/2,l/2,c,30,-180,-270)],g=q.svg(n),m=W(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const x=it(u).replace("Z",""),b=g.path(x,m),C=it(f).replace("Z",""),_=g.path(C,m),T=it(p),v=g.path(T,{...m}),B=n.insert("g",":first-child");return B.insert(()=>v,":first-child").attr("stroke-opacity",0),B.insert(()=>b,":first-child"),B.insert(()=>_,":first-child"),B.attr("class","text"),h&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(${c-c/4}, 0)`),s.attr("transform",`translate(${-o/2+(t.padding??0)/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Y(t,B),t.intersect=function(F){return P.polygon(t,p,F)},n}d(vd,"curlyBraces");async function Td(e,t){const{labelStyles:r,nodeStyles:i}=H(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await K(e,t,Q(t)),s=80,o=20,l=Math.max(s,(a.width+(t.padding??0)*2)*1.25,t?.width??0),c=Math.max(o,a.height+(t.padding??0)*2,t?.height??0),h=c/2,{cssStyles:u}=t,f=q.svg(n),p=W(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=l,m=c,y=g-h,x=m/4,b=[{x:y,y:0},{x,y:0},{x:0,y:m/2},{x,y:m},{x:y,y:m},...Ni(-y,-m/2,h,50,270,90)],k=it(b),C=f.path(k,p),_=n.insert(()=>C,":first-child");return _.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",i),_.attr("transform",`translate(${-l/2}, ${-c/2})`),Y(t,_),t.intersect=function(T){return P.polygon(t,b,T)},n}d(Td,"curvedTrapezoid");var J_=d((e,t,r,i,n,a)=>[`M${e},${t+a}`,`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),tC=d((e,t,r,i,n,a)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),eC=d((e,t,r,i,n,a)=>[`M${e-r/2},${-i/2}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function Ad(e,t){const{labelStyles:r,nodeStyles:i}=H(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await K(e,t,Q(t)),o=Math.max(a.width+t.padding,t.width??0),l=o/2,c=l/(2.5+o/50),h=Math.max(a.height+c+t.padding,t.height??0);let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const p=q.svg(n),g=tC(0,0,o,h,l,c),m=eC(0,c,o,h,l,c),y=p.path(g,W(t,{})),x=p.path(m,W(t,{fill:"none"}));u=n.insert(()=>x,":first-child"),u=n.insert(()=>y,":first-child"),u.attr("class","basic label-container"),f&&u.attr("style",f)}else{const p=J_(0,0,o,h,l,c);u=n.insert("path",":first-child").attr("d",p).attr("class","basic label-container").attr("style",It(f)).attr("style",i)}return u.attr("label-offset-y",c),u.attr("transform",`translate(${-o/2}, ${-(h/2+c)})`),Y(t,u),s.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+(t.padding??0)/1.5-(a.y-(a.top??0))})`),t.intersect=function(p){const g=P.rect(t,p),m=g.x-(t.x??0);if(l!=0&&(Math.abs(m)<(t.width??0)/2||Math.abs(m)==(t.width??0)/2&&Math.abs(g.y-(t.y??0))>(t.height??0)/2-c)){let y=c*c*(1-m*m/(l*l));y>0&&(y=Math.sqrt(y)),y=c-y,p.y-(t.y??0)>0&&(y=-y),g.y+=y}return g},n}d(Ad,"cylinder");async function Bd(e,t){const{labelStyles:r,nodeStyles:i}=H(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await K(e,t,Q(t)),o=a.width+t.padding,l=a.height+t.padding,c=l*.2,h=-o/2,u=-l/2-c/2,{cssStyles:f}=t,p=q.svg(n),g=W(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:h,y:u+c},{x:-h,y:u+c},{x:-h,y:-u},{x:h,y:-u},{x:h,y:u},{x:-h,y:u},{x:-h,y:u+c}],y=p.polygon(m.map(b=>[b.x,b.y]),g),x=n.insert(()=>y,":first-child");return x.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),s.attr("transform",`translate(${h+(t.padding??0)/2-(a.x-(a.left??0))}, ${u+c+(t.padding??0)/2-(a.y-(a.top??0))})`),Y(t,x),t.intersect=function(b){return P.rect(t,b)},n}d(Bd,"dividedRectangle");async function Ld(e,t){const{labelStyles:r,nodeStyles:i}=H(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:s}=await K(e,t,Q(t)),l=a.width/2+s+5,c=a.width/2+s;let h;const{cssStyles:u}=t;if(t.look==="handDrawn"){const f=q.svg(n),p=W(t,{roughness:.2,strokeWidth:2.5}),g=W(t,{roughness:.2,strokeWidth:1.5}),m=f.circle(0,0,l*2,p),y=f.circle(0,0,c*2,g);h=n.insert("g",":first-child"),h.attr("class",It(t.cssClasses)).attr("style",It(u)),h.node()?.appendChild(m),h.node()?.appendChild(y)}else{h=n.insert("g",":first-child");const f=h.insert("circle",":first-child"),p=h.insert("circle");h.attr("class","basic label-container").attr("style",i),f.attr("class","outer-circle").attr("style",i).attr("r",l).attr("cx",0).attr("cy",0),p.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)}return Y(t,h),t.intersect=function(f){return A.info("DoubleCircle intersect",t,l,f),P.circle(t,l,f)},n}d(Ld,"doublecircle");function Ed(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=H(t);t.label="",t.labelStyle=i;const a=e.insert("g").attr("class",Q(t)).attr("id",t.domId??t.id),s=7,{cssStyles:o}=t,l=q.svg(a),{nodeBorder:c}=r,h=W(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const u=l.circle(0,0,s*2,h),f=a.insert(()=>u,":first-child");return f.selectAll("path").attr("style",`fill: ${c} !important;`),o&&o.length>0&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",o),n&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",n),Y(t,f),t.intersect=function(p){return A.info("filledCircle intersect",t,{radius:s,point:p}),P.circle(t,s,p)},a}d(Ed,"filledCircle");async function Md(e,t){const{labelStyles:r,nodeStyles:i}=H(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await K(e,t,Q(t)),o=a.width+(t.padding??0),l=o+a.height,c=o+a.height,h=[{x:0,y:-l},{x:c,y:-l},{x:c/2,y:0}],{cssStyles:u}=t,f=q.svg(n),p=W(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=it(h),m=f.path(g,p),y=n.insert(()=>m,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return u&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),t.width=o,t.height=l,Y(t,y),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-l/2+(t.padding??0)/2+(a.y-(a.top??0))})`),t.intersect=function(x){return A.info("Triangle intersect",t,h,x),P.polygon(t,h,x)},n}d(Md,"flippedTriangle");function $d(e,t,{dir:r,config:{state:i,themeVariables:n}}){const{nodeStyles:a}=H(t);t.label="";const s=e.insert("g").attr("class",Q(t)).attr("id",t.domId??t.id),{cssStyles:o}=t;let l=Math.max(70,t?.width??0),c=Math.max(10,t?.height??0);r==="LR"&&(l=Math.max(10,t?.width??0),c=Math.max(70,t?.height??0));const h=-1*l/2,u=-1*c/2,f=q.svg(s),p=W(t,{stroke:n.lineColor,fill:n.lineColor});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=f.rectangle(h,u,l,c,p),m=s.insert(()=>g,":first-child");o&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",o),a&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",a),Y(t,m);const y=i?.padding??0;return t.width&&t.height&&(t.width+=y/2||0,t.height+=y/2||0),t.intersect=function(x){return P.rect(t,x)},s}d($d,"forkJoin");async function Fd(e,t){const{labelStyles:r,nodeStyles:i}=H(t);t.labelStyle=r;const n=80,a=50,{shapeSvg:s,bbox:o}=await K(e,t,Q(t)),l=Math.max(n,o.width+(t.padding??0)*2,t?.width??0),c=Math.max(a,o.height+(t.padding??0)*2,t?.height??0),h=c/2,{cssStyles:u}=t,f=q.svg(s),p=W(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=[{x:-l/2,y:-c/2},{x:l/2-h,y:-c/2},...Ni(-l/2+h,0,h,50,90,270),{x:l/2-h,y:c/2},{x:-l/2,y:c/2}],m=it(g),y=f.path(m,p),x=s.insert(()=>y,":first-child");return x.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),Y(t,x),t.intersect=function(b){return A.info("Pill intersect",t,{radius:h,point:b}),P.polygon(t,g,b)},s}d(Fd,"halfRoundedRectangle");async function Rd(e,t){const{labelStyles:r,nodeStyles:i}=H(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await K(e,t,Q(t)),s=a.height+(t.padding??0),o=a.width+(t.padding??0)*2.5,{cssStyles:l}=t,c=q.svg(n),h=W(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");let u=o/2;const f=u/6;u=u+f;const p=s/2,g=p/2,m=u-g,y=[{x:-m,y:-p},{x:0,y:-p},{x:m,y:-p},{x:u,y:0},{x:m,y:p},{x:0,y:p},{x:-m,y:p},{x:-u,y:0}],x=it(y),b=c.path(x,h),k=n.insert(()=>b,":first-child");return k.attr("class","basic label-container"),l&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",l),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),t.width=o,t.height=s,Y(t,k),t.intersect=function(C){return P.polygon(t,y,C)},n}d(Rd,"hexagon");async function Dd(e,t){const{labelStyles:r,nodeStyles:i}=H(t);t.label="",t.labelStyle=r;const{shapeSvg:n}=await K(e,t,Q(t)),a=Math.max(30,t?.width??0),s=Math.max(30,t?.height??0),{cssStyles:o}=t,l=q.svg(n),c=W(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=[{x:0,y:0},{x:a,y:0},{x:0,y:s},{x:a,y:s}],u=it(h),f=l.path(u,c),p=n.insert(()=>f,":first-child");return p.attr("class","basic label-container"),o&&t.look!=="handDrawn"&&p.selectChildren("path").attr("style",o),i&&t.look!=="handDrawn"&&p.selectChildren("path").attr("style",i),p.attr("transform",`translate(${-a/2}, ${-s/2})`),Y(t,p),t.intersect=function(g){return A.info("Pill intersect",t,{points:h}),P.polygon(t,h,g)},n}d(Dd,"hourglass");async function Id(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=H(t);t.labelStyle=n;const a=t.assetHeight??48,s=t.assetWidth??48,o=Math.max(a,s),l=i?.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:c,bbox:h,label:u}=await K(e,t,"icon-shape default"),f=t.pos==="t",p=o,g=o,{nodeBorder:m}=r,{stylesMap:y}=Qr(t),x=-g/2,b=-p/2,k=t.label?8:0,C=q.svg(c),_=W(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const T=C.rectangle(x,b,g,p,_),v=Math.max(g,h.width),B=p+h.height+k,F=C.rectangle(-v/2,-B/2,v,B,{..._,fill:"transparent",stroke:"none"}),D=c.insert(()=>T,":first-child"),E=c.insert(()=>F);if(t.icon){const R=c.append("g");R.html(`<g>${await Xi(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const M=R.node().getBBox(),L=M.width,N=M.height,I=M.x,j=M.y;R.attr("transform",`translate(${-L/2-I},${f?h.height/2+k/2-N/2-j:-h.height/2-k/2-N/2-j})`),R.attr("style",`color: ${y.get("stroke")??m};`)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-B/2:B/2-h.height})`),D.attr("transform",`translate(0,${f?h.height/2+k/2:-h.height/2-k/2})`),Y(t,E),t.intersect=function(R){if(A.info("iconSquare intersect",t,R),!t.label)return P.rect(t,R);const M=t.x??0,L=t.y??0,N=t.height??0;let I=[];return f?I=[{x:M-h.width/2,y:L-N/2},{x:M+h.width/2,y:L-N/2},{x:M+h.width/2,y:L-N/2+h.height+k},{x:M+g/2,y:L-N/2+h.height+k},{x:M+g/2,y:L+N/2},{x:M-g/2,y:L+N/2},{x:M-g/2,y:L-N/2+h.height+k},{x:M-h.width/2,y:L-N/2+h.height+k}]:I=[{x:M-g/2,y:L-N/2},{x:M+g/2,y:L-N/2},{x:M+g/2,y:L-N/2+p},{x:M+h.width/2,y:L-N/2+p},{x:M+h.width/2/2,y:L+N/2},{x:M-h.width/2,y:L+N/2},{x:M-h.width/2,y:L-N/2+p},{x:M-g/2,y:L-N/2+p}],P.polygon(t,I,R)},c}d(Id,"icon");async function Od(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=H(t);t.labelStyle=n;const a=t.assetHeight??48,s=t.assetWidth??48,o=Math.max(a,s),l=i?.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:c,bbox:h,label:u}=await K(e,t,"icon-shape default"),f=20,p=t.label?8:0,g=t.pos==="t",{nodeBorder:m,mainBkg:y}=r,{stylesMap:x}=Qr(t),b=q.svg(c),k=W(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const C=x.get("fill");k.stroke=C??y;const _=c.append("g");t.icon&&_.html(`<g>${await Xi(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const T=_.node().getBBox(),v=T.width,B=T.height,F=T.x,D=T.y,E=Math.max(v,B)*Math.SQRT2+f*2,R=b.circle(0,0,E,k),M=Math.max(E,h.width),L=E+h.height+p,N=b.rectangle(-M/2,-L/2,M,L,{...k,fill:"transparent",stroke:"none"}),I=c.insert(()=>R,":first-child"),j=c.insert(()=>N);return _.attr("transform",`translate(${-v/2-F},${g?h.height/2+p/2-B/2-D:-h.height/2-p/2-B/2-D})`),_.attr("style",`color: ${x.get("stroke")??m};`),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-L/2:L/2-h.height})`),I.attr("transform",`translate(0,${g?h.height/2+p/2:-h.height/2-p/2})`),Y(t,j),t.intersect=function(G){return A.info("iconSquare intersect",t,G),P.rect(t,G)},c}d(Od,"iconCircle");async function Pd(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=H(t);t.labelStyle=n;const a=t.assetHeight??48,s=t.assetWidth??48,o=Math.max(a,s),l=i?.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:f}=await K(e,t,"icon-shape default"),p=t.pos==="t",g=o+u*2,m=o+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=Qr(t),k=-m/2,C=-g/2,_=t.label?8:0,T=q.svg(c),v=W(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const B=b.get("fill");v.stroke=B??x;const F=T.path(Xe(k,C,m,g,5),v),D=Math.max(m,h.width),E=g+h.height+_,R=T.rectangle(-D/2,-E/2,D,E,{...v,fill:"transparent",stroke:"none"}),M=c.insert(()=>F,":first-child").attr("class","icon-shape2"),L=c.insert(()=>R);if(t.icon){const N=c.append("g");N.html(`<g>${await Xi(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const I=N.node().getBBox(),j=I.width,G=I.height,mt=I.x,kt=I.y;N.attr("transform",`translate(${-j/2-mt},${p?h.height/2+_/2-G/2-kt:-h.height/2-_/2-G/2-kt})`),N.attr("style",`color: ${b.get("stroke")??y};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-E/2:E/2-h.height})`),M.attr("transform",`translate(0,${p?h.height/2+_/2:-h.height/2-_/2})`),Y(t,L),t.intersect=function(N){if(A.info("iconSquare intersect",t,N),!t.label)return P.rect(t,N);const I=t.x??0,j=t.y??0,G=t.height??0;let mt=[];return p?mt=[{x:I-h.width/2,y:j-G/2},{x:I+h.width/2,y:j-G/2},{x:I+h.width/2,y:j-G/2+h.height+_},{x:I+m/2,y:j-G/2+h.height+_},{x:I+m/2,y:j+G/2},{x:I-m/2,y:j+G/2},{x:I-m/2,y:j-G/2+h.height+_},{x:I-h.width/2,y:j-G/2+h.height+_}]:mt=[{x:I-m/2,y:j-G/2},{x:I+m/2,y:j-G/2},{x:I+m/2,y:j-G/2+g},{x:I+h.width/2,y:j-G/2+g},{x:I+h.width/2/2,y:j+G/2},{x:I-h.width/2,y:j+G/2},{x:I-h.width/2,y:j-G/2+g},{x:I-m/2,y:j-G/2+g}],P.polygon(t,mt,N)},c}d(Pd,"iconRounded");async function Nd(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=H(t);t.labelStyle=n;const a=t.assetHeight??48,s=t.assetWidth??48,o=Math.max(a,s),l=i?.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:f}=await K(e,t,"icon-shape default"),p=t.pos==="t",g=o+u*2,m=o+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=Qr(t),k=-m/2,C=-g/2,_=t.label?8:0,T=q.svg(c),v=W(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const B=b.get("fill");v.stroke=B??x;const F=T.path(Xe(k,C,m,g,.1),v),D=Math.max(m,h.width),E=g+h.height+_,R=T.rectangle(-D/2,-E/2,D,E,{...v,fill:"transparent",stroke:"none"}),M=c.insert(()=>F,":first-child"),L=c.insert(()=>R);if(t.icon){const N=c.append("g");N.html(`<g>${await Xi(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const I=N.node().getBBox(),j=I.width,G=I.height,mt=I.x,kt=I.y;N.attr("transform",`translate(${-j/2-mt},${p?h.height/2+_/2-G/2-kt:-h.height/2-_/2-G/2-kt})`),N.attr("style",`color: ${b.get("stroke")??y};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-E/2:E/2-h.height})`),M.attr("transform",`translate(0,${p?h.height/2+_/2:-h.height/2-_/2})`),Y(t,L),t.intersect=function(N){if(A.info("iconSquare intersect",t,N),!t.label)return P.rect(t,N);const I=t.x??0,j=t.y??0,G=t.height??0;let mt=[];return p?mt=[{x:I-h.width/2,y:j-G/2},{x:I+h.width/2,y:j-G/2},{x:I+h.width/2,y:j-G/2+h.height+_},{x:I+m/2,y:j-G/2+h.height+_},{x:I+m/2,y:j+G/2},{x:I-m/2,y:j+G/2},{x:I-m/2,y:j-G/2+h.height+_},{x:I-h.width/2,y:j-G/2+h.height+_}]:mt=[{x:I-m/2,y:j-G/2},{x:I+m/2,y:j-G/2},{x:I+m/2,y:j-G/2+g},{x:I+h.width/2,y:j-G/2+g},{x:I+h.width/2/2,y:j+G/2},{x:I-h.width/2,y:j+G/2},{x:I-h.width/2,y:j-G/2+g},{x:I-m/2,y:j-G/2+g}],P.polygon(t,mt,N)},c}d(Nd,"iconSquare");async function zd(e,t,{config:{flowchart:r}}){const i=new Image;i.src=t?.img??"",await i.decode();const n=Number(i.naturalWidth.toString().replace("px","")),a=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=n/a;const{labelStyles:s}=H(t);t.labelStyle=s;const o=r?.wrappingWidth;t.defaultWidth=r?.wrappingWidth;const l=Math.max(t.label?o??0:0,t?.assetWidth??n),c=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:l,h=t.constraint==="on"?c/t.imageAspectRatio:t?.assetHeight??a;t.width=Math.max(c,o??0);const{shapeSvg:u,bbox:f,label:p}=await K(e,t,"image-shape default"),g=t.pos==="t",m=-c/2,y=-h/2,x=t.label?8:0,b=q.svg(u),k=W(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const C=b.rectangle(m,y,c,h,k),_=Math.max(c,f.width),T=h+f.height+x,v=b.rectangle(-_/2,-T/2,_,T,{...k,fill:"none",stroke:"none"}),B=u.insert(()=>C,":first-child"),F=u.insert(()=>v);if(t.img){const D=u.append("image");D.attr("href",t.img),D.attr("width",c),D.attr("height",h),D.attr("preserveAspectRatio","none"),D.attr("transform",`translate(${-c/2},${g?T/2-h:-T/2})`)}return p.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${g?-h/2-f.height/2-x/2:h/2-f.height/2+x/2})`),B.attr("transform",`translate(0,${g?f.height/2+x/2:-f.height/2-x/2})`),Y(t,F),t.intersect=function(D){if(A.info("iconSquare intersect",t,D),!t.label)return P.rect(t,D);const E=t.x??0,R=t.y??0,M=t.height??0;let L=[];return g?L=[{x:E-f.width/2,y:R-M/2},{x:E+f.width/2,y:R-M/2},{x:E+f.width/2,y:R-M/2+f.height+x},{x:E+c/2,y:R-M/2+f.height+x},{x:E+c/2,y:R+M/2},{x:E-c/2,y:R+M/2},{x:E-c/2,y:R-M/2+f.height+x},{x:E-f.width/2,y:R-M/2+f.height+x}]:L=[{x:E-c/2,y:R-M/2},{x:E+c/2,y:R-M/2},{x:E+c/2,y:R-M/2+h},{x:E+f.width/2,y:R-M/2+h},{x:E+f.width/2/2,y:R+M/2},{x:E-f.width/2,y:R+M/2},{x:E-f.width/2,y:R-M/2+h},{x:E-c/2,y:R-M/2+h}],P.polygon(t,L,D)},u}d(zd,"imageSquare");async function qd(e,t){const{labelStyles:r,nodeStyles:i}=H(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await K(e,t,Q(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),o=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=[{x:0,y:0},{x:s,y:0},{x:s+3*o/6,y:-o},{x:-3*o/6,y:-o}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=q.svg(n),f=W(t,{}),p=it(l),g=u.path(p,f);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=Ze(n,s,o,l);return i&&c.attr("style",i),t.width=s,t.height=o,Y(t,c),t.intersect=function(u){return P.polygon(t,l,u)},n}d(qd,"inv_trapezoid");async function $a(e,t,r){const{labelStyles:i,nodeStyles:n}=H(t);t.labelStyle=i;const{shapeSvg:a,bbox:s}=await K(e,t,Q(t)),o=Math.max(s.width+r.labelPaddingX*2,t?.width||0),l=Math.max(s.height+r.labelPaddingY*2,t?.height||0),c=-o/2,h=-l/2;let u,{rx:f,ry:p}=t;const{cssStyles:g}=t;if(r?.rx&&r.ry&&(f=r.rx,p=r.ry),t.look==="handDrawn"){const m=q.svg(a),y=W(t,{}),x=f||p?m.path(Xe(c,h,o,l,f||0),y):m.rectangle(c,h,o,l,y);u=a.insert(()=>x,":first-child"),u.attr("class","basic label-container").attr("style",It(g))}else u=a.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",n).attr("rx",It(f)).attr("ry",It(p)).attr("x",c).attr("y",h).attr("width",o).attr("height",l);return Y(t,u),t.calcIntersect=function(m,y){return P.rect(m,y)},t.intersect=function(m){return P.rect(t,m)},a}d($a,"drawRect");async function Wd(e,t){const{shapeSvg:r,bbox:i,label:n}=await K(e,t,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),n.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),Y(t,a),t.intersect=function(l){return P.rect(t,l)},r}d(Wd,"labelRect");async function Hd(e,t){const{labelStyles:r,nodeStyles:i}=H(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await K(e,t,Q(t)),s=Math.max(a.width+(t.padding??0),t?.width??0),o=Math.max(a.height+(t.padding??0),t?.height??0),l=[{x:0,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:-(3*o)/6,y:-o}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=q.svg(n),f=W(t,{}),p=it(l),g=u.path(p,f);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=Ze(n,s,o,l);return i&&c.attr("style",i),t.width=s,t.height=o,Y(t,c),t.intersect=function(u){return P.polygon(t,l,u)},n}d(Hd,"lean_left");async function Yd(e,t){const{labelStyles:r,nodeStyles:i}=H(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await K(e,t,Q(t)),s=Math.max(a.width+(t.padding??0),t?.width??0),o=Math.max(a.height+(t.padding??0),t?.height??0),l=[{x:-3*o/6,y:0},{x:s,y:0},{x:s+3*o/6,y:-o},{x:0,y:-o}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=q.svg(n),f=W(t,{}),p=it(l),g=u.path(p,f);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=Ze(n,s,o,l);return i&&c.attr("style",i),t.width=s,t.height=o,Y(t,c),t.intersect=function(u){return P.polygon(t,l,u)},n}d(Yd,"lean_right");function jd(e,t){const{labelStyles:r,nodeStyles:i}=H(t);t.label="",t.labelStyle=r;const n=e.insert("g").attr("class",Q(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,s=Math.max(35,t?.width??0),o=Math.max(35,t?.height??0),l=7,c=[{x:s,y:0},{x:0,y:o+l/2},{x:s-2*l,y:o+l/2},{x:0,y:2*o},{x:s,y:o-l/2},{x:2*l,y:o-l/2}],h=q.svg(n),u=W(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=it(c),p=h.path(f,u),g=n.insert(()=>p,":first-child");return a&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),g.attr("transform",`translate(-${s/2},${-o})`),Y(t,g),t.intersect=function(m){return A.info("lightningBolt intersect",t,m),P.polygon(t,c,m)},n}d(jd,"lightningBolt");var rC=d((e,t,r,i,n,a,s)=>[`M${e},${t+a}`,`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+s}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),iC=d((e,t,r,i,n,a,s)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+s}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),nC=d((e,t,r,i,n,a)=>[`M${e-r/2},${-i/2}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function Ud(e,t){const{labelStyles:r,nodeStyles:i}=H(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await K(e,t,Q(t)),o=Math.max(a.width+(t.padding??0),t.width??0),l=o/2,c=l/(2.5+o/50),h=Math.max(a.height+c+(t.padding??0),t.height??0),u=h*.1;let f;const{cssStyles:p}=t;if(t.look==="handDrawn"){const g=q.svg(n),m=iC(0,0,o,h,l,c,u),y=nC(0,c,o,h,l,c),x=W(t,{}),b=g.path(m,x),k=g.path(y,x);n.insert(()=>k,":first-child").attr("class","line"),f=n.insert(()=>b,":first-child"),f.attr("class","basic label-container"),p&&f.attr("style",p)}else{const g=rC(0,0,o,h,l,c,u);f=n.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",It(p)).attr("style",i)}return f.attr("label-offset-y",c),f.attr("transform",`translate(${-o/2}, ${-(h/2+c)})`),Y(t,f),s.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+c-(a.y-(a.top??0))})`),t.intersect=function(g){const m=P.rect(t,g),y=m.x-(t.x??0);if(l!=0&&(Math.abs(y)<(t.width??0)/2||Math.abs(y)==(t.width??0)/2&&Math.abs(m.y-(t.y??0))>(t.height??0)/2-c)){let x=c*c*(1-y*y/(l*l));x>0&&(x=Math.sqrt(x)),x=c-x,g.y-(t.y??0)>0&&(x=-x),m.y+=x}return m},n}d(Ud,"linedCylinder");async function Gd(e,t){const{labelStyles:r,nodeStyles:i}=H(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await K(e,t,Q(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=l/4,h=l+c,{cssStyles:u}=t,f=q.svg(n),p=W(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=[{x:-o/2-o/2*.1,y:-h/2},{x:-o/2-o/2*.1,y:h/2},...Ge(-o/2-o/2*.1,h/2,o/2+o/2*.1,h/2,c,.8),{x:o/2+o/2*.1,y:-h/2},{x:-o/2-o/2*.1,y:-h/2},{x:-o/2,y:-h/2},{x:-o/2,y:h/2*1.1},{x:-o/2,y:-h/2}],m=f.polygon(g.map(x=>[x.x,x.y]),p),y=n.insert(()=>m,":first-child");return y.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-o/2+(t.padding??0)+o/2*.1/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)-c/2-(a.y-(a.top??0))})`),Y(t,y),t.intersect=function(x){return P.polygon(t,g,x)},n}d(Gd,"linedWaveEdgedRect");async function Vd(e,t){const{labelStyles:r,nodeStyles:i}=H(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await K(e,t,Q(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=5,h=-o/2,u=-l/2,{cssStyles:f}=t,p=q.svg(n),g=W(t,{}),m=[{x:h-c,y:u+c},{x:h-c,y:u+l+c},{x:h+o-c,y:u+l+c},{x:h+o-c,y:u+l},{x:h+o,y:u+l},{x:h+o,y:u+l-c},{x:h+o+c,y:u+l-c},{x:h+o+c,y:u-c},{x:h+c,y:u-c},{x:h+c,y:u},{x:h,y:u},{x:h,y:u+c}],y=[{x:h,y:u+c},{x:h+o-c,y:u+c},{x:h+o-c,y:u+l},{x:h+o,y:u+l},{x:h+o,y:u},{x:h,y:u}];t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=it(m),b=p.path(x,g),k=it(y),C=p.path(k,{...g,fill:"none"}),_=n.insert(()=>C,":first-child");return _.insert(()=>b,":first-child"),_.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),s.attr("transform",`translate(${-(a.width/2)-c-(a.x-(a.left??0))}, ${-(a.height/2)+c-(a.y-(a.top??0))})`),Y(t,_),t.intersect=function(T){return P.polygon(t,m,T)},n}d(Vd,"multiRect");async function Xd(e,t){const{labelStyles:r,nodeStyles:i}=H(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await K(e,t,Q(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=l/4,h=l+c,u=-o/2,f=-h/2,p=5,{cssStyles:g}=t,m=Ge(u-p,f+h+p,u+o-p,f+h+p,c,.8),y=m?.[m.length-1],x=[{x:u-p,y:f+p},{x:u-p,y:f+h+p},...m,{x:u+o-p,y:y.y-p},{x:u+o,y:y.y-p},{x:u+o,y:y.y-2*p},{x:u+o+p,y:y.y-2*p},{x:u+o+p,y:f-p},{x:u+p,y:f-p},{x:u+p,y:f},{x:u,y:f},{x:u,y:f+p}],b=[{x:u,y:f+p},{x:u+o-p,y:f+p},{x:u+o-p,y:y.y-p},{x:u+o,y:y.y-p},{x:u+o,y:f},{x:u,y:f}],k=q.svg(n),C=W(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const _=it(x),T=k.path(_,C),v=it(b),B=k.path(v,C),F=n.insert(()=>T,":first-child");return F.insert(()=>B),F.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-(a.width/2)-p-(a.x-(a.left??0))}, ${-(a.height/2)+p-c/2-(a.y-(a.top??0))})`),Y(t,F),t.intersect=function(D){return P.polygon(t,x,D)},n}d(Xd,"multiWaveEdgedRectangle");async function Zd(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=H(t);t.labelStyle=i,t.useHtmlLabels||Rt().flowchart?.htmlLabels!==!1||(t.centerLabel=!0);const{shapeSvg:s,bbox:o,label:l}=await K(e,t,Q(t)),c=Math.max(o.width+(t.padding??0)*2,t?.width??0),h=Math.max(o.height+(t.padding??0)*2,t?.height??0),u=-c/2,f=-h/2,{cssStyles:p}=t,g=q.svg(s),m=W(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=g.rectangle(u,f,c,h,m),x=s.insert(()=>y,":first-child");return x.attr("class","basic label-container"),p&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",p),n&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",n),l.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),Y(t,x),t.intersect=function(b){return P.rect(t,b)},s}d(Zd,"note");var aC=d((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function Qd(e,t){const{labelStyles:r,nodeStyles:i}=H(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await K(e,t,Q(t)),s=a.width+t.padding,o=a.height+t.padding,l=s+o,c=.5,h=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const p=q.svg(n),g=W(t,{}),m=aC(0,0,l),y=p.path(m,g);u=n.insert(()=>y,":first-child").attr("transform",`translate(${-l/2+c}, ${l/2})`),f&&u.attr("style",f)}else u=Ze(n,l,l,h),u.attr("transform",`translate(${-l/2+c}, ${l/2})`);return i&&u.attr("style",i),Y(t,u),t.calcIntersect=function(p,g){const m=p.width,y=[{x:m/2,y:0},{x:m,y:-m/2},{x:m/2,y:-m},{x:0,y:-m/2}],x=P.polygon(p,y,g);return{x:x.x-.5,y:x.y-.5}},t.intersect=function(p){return this.calcIntersect(t,p)},n}d(Qd,"question");async function Kd(e,t){const{labelStyles:r,nodeStyles:i}=H(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await K(e,t,Q(t)),o=Math.max(a.width+(t.padding??0),t?.width??0),l=Math.max(a.height+(t.padding??0),t?.height??0),c=-o/2,h=-l/2,u=h/2,f=[{x:c+u,y:h},{x:c,y:0},{x:c+u,y:-h},{x:-c,y:-h},{x:-c,y:h}],{cssStyles:p}=t,g=q.svg(n),m=W(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=it(f),x=g.path(y,m),b=n.insert(()=>x,":first-child");return b.attr("class","basic label-container"),p&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(${-u/2},0)`),s.attr("transform",`translate(${-u/2-a.width/2-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),Y(t,b),t.intersect=function(k){return P.polygon(t,f,k)},n}d(Kd,"rect_left_inv_arrow");async function Jd(e,t){const{labelStyles:r,nodeStyles:i}=H(t);t.labelStyle=r;let n;t.cssClasses?n="node "+t.cssClasses:n="node default";const a=e.insert("g").attr("class",n).attr("id",t.domId||t.id),s=a.insert("g"),o=a.insert("g").attr("class","label").attr("style",i),l=t.description,c=t.label,h=o.node().appendChild(await or(c,t.labelStyle,!0,!0));let u={width:0,height:0};if(vt(ut()?.flowchart?.htmlLabels)){const B=h.children[0],F=at(h);u=B.getBoundingClientRect(),F.attr("width",u.width),F.attr("height",u.height)}A.info("Text 2",l);const f=l||[],p=h.getBBox(),g=o.node().appendChild(await or(f.join?f.join("<br/>"):f,t.labelStyle,!0,!0)),m=g.children[0],y=at(g);u=m.getBoundingClientRect(),y.attr("width",u.width),y.attr("height",u.height);const x=(t.padding||0)/2;at(g).attr("transform","translate( "+(u.width>p.width?0:(p.width-u.width)/2)+", "+(p.height+x+5)+")"),at(h).attr("transform","translate( "+(u.width<p.width?0:-(p.width-u.width)/2)+", 0)"),u=o.node().getBBox(),o.attr("transform","translate("+-u.width/2+", "+(-u.height/2-x+3)+")");const b=u.width+(t.padding||0),k=u.height+(t.padding||0),C=-u.width/2-x,_=-u.height/2-x;let T,v;if(t.look==="handDrawn"){const B=q.svg(a),F=W(t,{}),D=B.path(Xe(C,_,b,k,t.rx||0),F),E=B.line(-u.width/2-x,-u.height/2-x+p.height+x,u.width/2+x,-u.height/2-x+p.height+x,F);v=a.insert(()=>(A.debug("Rough node insert CXC",D),E),":first-child"),T=a.insert(()=>(A.debug("Rough node insert CXC",D),D),":first-child")}else T=s.insert("rect",":first-child"),v=s.insert("line"),T.attr("class","outer title-state").attr("style",i).attr("x",-u.width/2-x).attr("y",-u.height/2-x).attr("width",u.width+(t.padding||0)).attr("height",u.height+(t.padding||0)),v.attr("class","divider").attr("x1",-u.width/2-x).attr("x2",u.width/2+x).attr("y1",-u.height/2-x+p.height+x).attr("y2",-u.height/2-x+p.height+x);return Y(t,T),t.intersect=function(B){return P.rect(t,B)},a}d(Jd,"rectWithTitle");function _i(e,t,r,i,n,a,s){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),u=(r-e)/2,f=(i-t)/2,p=u/n,g=f/a,m=Math.sqrt(p**2+g**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-m**2),x=l+y*a*Math.sin(h)*(s?-1:1),b=c-y*n*Math.cos(h)*(s?-1:1),k=Math.atan2((t-b)/a,(e-x)/n);let _=Math.atan2((i-b)/a,(r-x)/n)-k;s&&_<0&&(_+=2*Math.PI),!s&&_>0&&(_-=2*Math.PI);const T=[];for(let v=0;v<20;v++){const B=v/19,F=k+B*_,D=x+n*Math.cos(F),E=b+a*Math.sin(F);T.push({x:D,y:E})}return T}d(_i,"generateArcPoints");async function tg(e,t){const{labelStyles:r,nodeStyles:i}=H(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await K(e,t,Q(t)),s=t?.padding??0,o=t?.padding??0,l=(t?.width?t?.width:a.width)+s*2,c=(t?.height?t?.height:a.height)+o*2,h=t.radius||5,u=t.taper||5,{cssStyles:f}=t,p=q.svg(n),g=W(t,{});t.stroke&&(g.stroke=t.stroke),t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:-l/2+u,y:-c/2},{x:l/2-u,y:-c/2},..._i(l/2-u,-c/2,l/2,-c/2+u,h,h,!0),{x:l/2,y:-c/2+u},{x:l/2,y:c/2-u},..._i(l/2,c/2-u,l/2-u,c/2,h,h,!0),{x:l/2-u,y:c/2},{x:-l/2+u,y:c/2},..._i(-l/2+u,c/2,-l/2,c/2-u,h,h,!0),{x:-l/2,y:c/2-u},{x:-l/2,y:-c/2+u},..._i(-l/2,-c/2+u,-l/2+u,-c/2,h,h,!0)],y=it(m),x=p.path(y,g),b=n.insert(()=>x,":first-child");return b.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),Y(t,b),t.intersect=function(k){return P.polygon(t,m,k)},n}d(tg,"roundedRect");async function eg(e,t){const{labelStyles:r,nodeStyles:i}=H(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await K(e,t,Q(t)),o=t?.padding??0,l=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),h=-a.width/2-o,u=-a.height/2-o,{cssStyles:f}=t,p=q.svg(n),g=W(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:h,y:u},{x:h+l+8,y:u},{x:h+l+8,y:u+c},{x:h-8,y:u+c},{x:h-8,y:u},{x:h,y:u},{x:h,y:u+c}],y=p.polygon(m.map(b=>[b.x,b.y]),g),x=n.insert(()=>y,":first-child");return x.attr("class","basic label-container").attr("style",It(f)),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),f&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),s.attr("transform",`translate(${-l/2+4+(t.padding??0)-(a.x-(a.left??0))},${-c/2+(t.padding??0)-(a.y-(a.top??0))})`),Y(t,x),t.intersect=function(b){return P.rect(t,b)},n}d(eg,"shadedProcess");async function rg(e,t){const{labelStyles:r,nodeStyles:i}=H(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await K(e,t,Q(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=-o/2,h=-l/2,{cssStyles:u}=t,f=q.svg(n),p=W(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=[{x:c,y:h},{x:c,y:h+l},{x:c+o,y:h+l},{x:c+o,y:h-l/2}],m=it(g),y=f.path(m,p),x=n.insert(()=>y,":first-child");return x.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),x.attr("transform",`translate(0, ${l/4})`),s.attr("transform",`translate(${-o/2+(t.padding??0)-(a.x-(a.left??0))}, ${-l/4+(t.padding??0)-(a.y-(a.top??0))})`),Y(t,x),t.intersect=function(b){return P.polygon(t,g,b)},n}d(rg,"slopedRect");async function ig(e,t){const r={rx:0,ry:0,labelPaddingX:t.labelPaddingX??(t?.padding||0)*2,labelPaddingY:(t?.padding||0)*1};return $a(e,t,r)}d(ig,"squareRect");async function ng(e,t){const{labelStyles:r,nodeStyles:i}=H(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await K(e,t,Q(t)),s=a.height+t.padding,o=a.width+s/4+t.padding,l=s/2,{cssStyles:c}=t,h=q.svg(n),u=W(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=[{x:-o/2+l,y:-s/2},{x:o/2-l,y:-s/2},...Ni(-o/2+l,0,l,50,90,270),{x:o/2-l,y:s/2},...Ni(o/2-l,0,l,50,270,450)],p=it(f),g=h.path(p,u),m=n.insert(()=>g,":first-child");return m.attr("class","basic label-container outer-path"),c&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",c),i&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",i),Y(t,m),t.intersect=function(y){return P.polygon(t,f,y)},n}d(ng,"stadium");async function ag(e,t){return $a(e,t,{rx:5,ry:5})}d(ag,"state");function sg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=H(t);t.labelStyle=i;const{cssStyles:a}=t,{lineColor:s,stateBorder:o,nodeBorder:l}=r,c=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),h=q.svg(c),u=W(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=h.circle(0,0,14,{...u,stroke:s,strokeWidth:2}),p=o??l,g=h.circle(0,0,5,{...u,fill:p,stroke:p,strokeWidth:2,fillStyle:"solid"}),m=c.insert(()=>f,":first-child");return m.insert(()=>g),a&&m.selectAll("path").attr("style",a),n&&m.selectAll("path").attr("style",n),Y(t,m),t.intersect=function(y){return P.circle(t,7,y)},c}d(sg,"stateEnd");function og(e,t,{config:{themeVariables:r}}){const{lineColor:i}=r,n=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let a;if(t.look==="handDrawn"){const o=q.svg(n).circle(0,0,14,V2(i));a=n.insert(()=>o),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else a=n.insert("circle",":first-child"),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return Y(t,a),t.intersect=function(s){return P.circle(t,7,s)},n}d(og,"stateStart");async function lg(e,t){const{labelStyles:r,nodeStyles:i}=H(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await K(e,t,Q(t)),s=(t?.padding||0)/2,o=a.width+t.padding,l=a.height+t.padding,c=-a.width/2-s,h=-a.height/2-s,u=[{x:0,y:0},{x:o,y:0},{x:o,y:-l},{x:0,y:-l},{x:0,y:0},{x:-8,y:0},{x:o+8,y:0},{x:o+8,y:-l},{x:-8,y:-l},{x:-8,y:0}];if(t.look==="handDrawn"){const f=q.svg(n),p=W(t,{}),g=f.rectangle(c-8,h,o+16,l,p),m=f.line(c,h,c,h+l,p),y=f.line(c+o,h,c+o,h+l,p);n.insert(()=>m,":first-child"),n.insert(()=>y,":first-child");const x=n.insert(()=>g,":first-child"),{cssStyles:b}=t;x.attr("class","basic label-container").attr("style",It(b)),Y(t,x)}else{const f=Ze(n,o,l,u);i&&f.attr("style",i),Y(t,f)}return t.intersect=function(f){return P.polygon(t,u,f)},n}d(lg,"subroutine");async function cg(e,t){const{labelStyles:r,nodeStyles:i}=H(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await K(e,t,Q(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),o=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=-s/2,c=-o/2,h=.2*o,u=.2*o,{cssStyles:f}=t,p=q.svg(n),g=W(t,{}),m=[{x:l-h/2,y:c},{x:l+s+h/2,y:c},{x:l+s+h/2,y:c+o},{x:l-h/2,y:c+o}],y=[{x:l+s-h/2,y:c+o},{x:l+s+h/2,y:c+o},{x:l+s+h/2,y:c+o-u}];t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=it(m),b=p.path(x,g),k=it(y),C=p.path(k,{...g,fillStyle:"solid"}),_=n.insert(()=>C,":first-child");return _.insert(()=>b,":first-child"),_.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),Y(t,_),t.intersect=function(T){return P.polygon(t,m,T)},n}d(cg,"taggedRect");async function hg(e,t){const{labelStyles:r,nodeStyles:i}=H(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await K(e,t,Q(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=l/4,h=.2*o,u=.2*l,f=l+c,{cssStyles:p}=t,g=q.svg(n),m=W(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-o/2-o/2*.1,y:f/2},...Ge(-o/2-o/2*.1,f/2,o/2+o/2*.1,f/2,c,.8),{x:o/2+o/2*.1,y:-f/2},{x:-o/2-o/2*.1,y:-f/2}],x=-o/2+o/2*.1,b=-f/2-u*.4,k=[{x:x+o-h,y:(b+l)*1.4},{x:x+o,y:b+l-u},{x:x+o,y:(b+l)*.9},...Ge(x+o,(b+l)*1.3,x+o-h,(b+l)*1.5,-l*.03,.5)],C=it(y),_=g.path(C,m),T=it(k),v=g.path(T,{...m,fillStyle:"solid"}),B=n.insert(()=>v,":first-child");return B.insert(()=>_,":first-child"),B.attr("class","basic label-container"),p&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-o/2+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-c/2-(a.y-(a.top??0))})`),Y(t,B),t.intersect=function(F){return P.polygon(t,y,F)},n}d(hg,"taggedWaveEdgedRectangle");async function ug(e,t){const{labelStyles:r,nodeStyles:i}=H(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await K(e,t,Q(t)),s=Math.max(a.width+t.padding,t?.width||0),o=Math.max(a.height+t.padding,t?.height||0),l=-s/2,c=-o/2,h=n.insert("rect",":first-child");return h.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",c).attr("width",s).attr("height",o),Y(t,h),t.intersect=function(u){return P.rect(t,u)},n}d(ug,"text");var sC=d((e,t,r,i,n,a)=>`M${e},${t}
|
|
243
|
+
a${n},${a} 0,0,1 0,${-i}
|
|
244
|
+
l${r},0
|
|
245
|
+
a${n},${a} 0,0,1 0,${i}
|
|
246
|
+
M${r},${-i}
|
|
247
|
+
a${n},${a} 0,0,0 0,${i}
|
|
248
|
+
l${-r},0`,"createCylinderPathD"),oC=d((e,t,r,i,n,a)=>[`M${e},${t}`,`M${e+r},${t}`,`a${n},${a} 0,0,0 0,${-i}`,`l${-r},0`,`a${n},${a} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),lC=d((e,t,r,i,n,a)=>[`M${e+r/2},${-i/2}`,`a${n},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD");async function fg(e,t){const{labelStyles:r,nodeStyles:i}=H(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s,halfPadding:o}=await K(e,t,Q(t)),l=t.look==="neo"?o*2:o,c=a.height+l,h=c/2,u=h/(2.5+c/50),f=a.width+u+l,{cssStyles:p}=t;let g;if(t.look==="handDrawn"){const m=q.svg(n),y=oC(0,0,f,c,u,h),x=lC(0,0,f,c,u,h),b=m.path(y,W(t,{})),k=m.path(x,W(t,{fill:"none"}));g=n.insert(()=>k,":first-child"),g=n.insert(()=>b,":first-child"),g.attr("class","basic label-container"),p&&g.attr("style",p)}else{const m=sC(0,0,f,c,u,h);g=n.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",It(p)).attr("style",i),g.attr("class","basic label-container"),p&&g.selectAll("path").attr("style",p),i&&g.selectAll("path").attr("style",i)}return g.attr("label-offset-x",u),g.attr("transform",`translate(${-f/2}, ${c/2} )`),s.attr("transform",`translate(${-(a.width/2)-u-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),Y(t,g),t.intersect=function(m){const y=P.rect(t,m),x=y.y-(t.y??0);if(h!=0&&(Math.abs(x)<(t.height??0)/2||Math.abs(x)==(t.height??0)/2&&Math.abs(y.x-(t.x??0))>(t.width??0)/2-u)){let b=u*u*(1-x*x/(h*h));b!=0&&(b=Math.sqrt(Math.abs(b))),b=u-b,m.x-(t.x??0)>0&&(b=-b),y.x+=b}return y},n}d(fg,"tiltedCylinder");async function pg(e,t){const{labelStyles:r,nodeStyles:i}=H(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await K(e,t,Q(t)),s=a.width+t.padding,o=a.height+t.padding,l=[{x:-3*o/6,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:0,y:-o}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=q.svg(n),f=W(t,{}),p=it(l),g=u.path(p,f);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=Ze(n,s,o,l);return i&&c.attr("style",i),t.width=s,t.height=o,Y(t,c),t.intersect=function(u){return P.polygon(t,l,u)},n}d(pg,"trapezoid");async function dg(e,t){const{labelStyles:r,nodeStyles:i}=H(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await K(e,t,Q(t)),s=60,o=20,l=Math.max(s,a.width+(t.padding??0)*2,t?.width??0),c=Math.max(o,a.height+(t.padding??0)*2,t?.height??0),{cssStyles:h}=t,u=q.svg(n),f=W(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const p=[{x:-l/2*.8,y:-c/2},{x:l/2*.8,y:-c/2},{x:l/2,y:-c/2*.6},{x:l/2,y:c/2},{x:-l/2,y:c/2},{x:-l/2,y:-c/2*.6}],g=it(p),m=u.path(g,f),y=n.insert(()=>m,":first-child");return y.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",h),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),Y(t,y),t.intersect=function(x){return P.polygon(t,p,x)},n}d(dg,"trapezoidalPentagon");async function gg(e,t){const{labelStyles:r,nodeStyles:i}=H(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await K(e,t,Q(t)),o=vt(ut().flowchart?.htmlLabels),l=a.width+(t.padding??0),c=l+a.height,h=l+a.height,u=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-c}],{cssStyles:f}=t,p=q.svg(n),g=W(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=it(u),y=p.path(m,g),x=n.insert(()=>y,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return f&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),t.width=l,t.height=c,Y(t,x),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${c/2-(a.height+(t.padding??0)/(o?2:1)-(a.y-(a.top??0)))})`),t.intersect=function(b){return A.info("Triangle intersect",t,u,b),P.polygon(t,u,b)},n}d(gg,"triangle");async function mg(e,t){const{labelStyles:r,nodeStyles:i}=H(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await K(e,t,Q(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=l/8,h=l+c,{cssStyles:u}=t,p=70-o,g=p>0?p/2:0,m=q.svg(n),y=W(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-o/2-g,y:h/2},...Ge(-o/2-g,h/2,o/2+g,h/2,c,.8),{x:o/2+g,y:-h/2},{x:-o/2-g,y:-h/2}],b=it(x),k=m.path(b,y),C=n.insert(()=>k,":first-child");return C.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",i),C.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-o/2+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-c-(a.y-(a.top??0))})`),Y(t,C),t.intersect=function(_){return P.polygon(t,x,_)},n}d(mg,"waveEdgedRectangle");async function yg(e,t){const{labelStyles:r,nodeStyles:i}=H(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await K(e,t,Q(t)),s=100,o=50,l=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),h=l/c;let u=l,f=c;u>f*h?f=u/h:u=f*h,u=Math.max(u,s),f=Math.max(f,o);const p=Math.min(f*.2,f/4),g=f+p*2,{cssStyles:m}=t,y=q.svg(n),x=W(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const b=[{x:-u/2,y:g/2},...Ge(-u/2,g/2,u/2,g/2,p,1),{x:u/2,y:-g/2},...Ge(u/2,-g/2,-u/2,-g/2,p,-1)],k=it(b),C=y.path(k,x),_=n.insert(()=>C,":first-child");return _.attr("class","basic label-container"),m&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),Y(t,_),t.intersect=function(T){return P.polygon(t,b,T)},n}d(yg,"waveRectangle");async function xg(e,t){const{labelStyles:r,nodeStyles:i}=H(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await K(e,t,Q(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=5,h=-o/2,u=-l/2,{cssStyles:f}=t,p=q.svg(n),g=W(t,{}),m=[{x:h-c,y:u-c},{x:h-c,y:u+l},{x:h+o,y:u+l},{x:h+o,y:u-c}],y=`M${h-c},${u-c} L${h+o},${u-c} L${h+o},${u+l} L${h-c},${u+l} L${h-c},${u-c}
|
|
249
|
+
M${h-c},${u} L${h+o},${u}
|
|
250
|
+
M${h},${u-c} L${h},${u+l}`;t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=p.path(y,g),b=n.insert(()=>x,":first-child");return b.attr("transform",`translate(${c/2}, ${c/2})`),b.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),s.attr("transform",`translate(${-(a.width/2)+c/2-(a.x-(a.left??0))}, ${-(a.height/2)+c/2-(a.y-(a.top??0))})`),Y(t,b),t.intersect=function(k){return P.polygon(t,m,k)},n}d(xg,"windowPane");async function gl(e,t){const r=t;if(r.alias&&(t.label=r.alias),t.look==="handDrawn"){const{themeVariables:st}=Rt(),{background:et}=st,At={...t,id:t.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${et}`]};await gl(e,At)}const i=Rt();t.useHtmlLabels=i.htmlLabels;let n=i.er?.diagramPadding??10,a=i.er?.entityPadding??6;const{cssStyles:s}=t,{labelStyles:o,nodeStyles:l}=H(t);if(r.attributes.length===0&&t.label){const st={rx:0,ry:0,labelPaddingX:n,labelPaddingY:n*1.5};Oe(t.label,i)+st.labelPaddingX*2<i.er.minEntityWidth&&(t.width=i.er.minEntityWidth);const et=await $a(e,t,st);if(!vt(i.htmlLabels)){const At=et.select("text"),nt=At.node()?.getBBox();At.attr("transform",`translate(${-nt.width/2}, 0)`)}return et}i.htmlLabels||(n*=1.25,a*=1.25);let c=Q(t);c||(c="node default");const h=e.insert("g").attr("class",c).attr("id",t.domId||t.id),u=await Lr(h,t.label??"",i,0,0,["name"],o);u.height+=a;let f=0;const p=[],g=[];let m=0,y=0,x=0,b=0,k=!0,C=!0;for(const st of r.attributes){const et=await Lr(h,st.type,i,0,f,["attribute-type"],o);m=Math.max(m,et.width+n);const At=await Lr(h,st.name,i,0,f,["attribute-name"],o);y=Math.max(y,At.width+n);const nt=await Lr(h,st.keys.join(),i,0,f,["attribute-keys"],o);x=Math.max(x,nt.width+n);const Zt=await Lr(h,st.comment,i,0,f,["attribute-comment"],o);b=Math.max(b,Zt.width+n);const Jt=Math.max(et.height,At.height,nt.height,Zt.height)+a;g.push({yOffset:f,rowHeight:Jt}),f+=Jt}let _=4;x<=n&&(k=!1,x=0,_--),b<=n&&(C=!1,b=0,_--);const T=h.node().getBBox();if(u.width+n*2-(m+y+x+b)>0){const st=u.width+n*2-(m+y+x+b);m+=st/_,y+=st/_,x>0&&(x+=st/_),b>0&&(b+=st/_)}const v=m+y+x+b,B=q.svg(h),F=W(t,{});t.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");let D=0;g.length>0&&(D=g.reduce((st,et)=>st+(et?.rowHeight??0),0));const E=Math.max(T.width+n*2,t?.width||0,v),R=Math.max((D??0)+u.height,t?.height||0),M=-E/2,L=-R/2;h.selectAll("g:not(:first-child)").each((st,et,At)=>{const nt=at(At[et]),Zt=nt.attr("transform");let Jt=0,ve=0;if(Zt){const Qe=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Zt);Qe&&(Jt=parseFloat(Qe[1]),ve=parseFloat(Qe[2]),nt.attr("class").includes("attribute-name")?Jt+=m:nt.attr("class").includes("attribute-keys")?Jt+=m+y:nt.attr("class").includes("attribute-comment")&&(Jt+=m+y+x))}nt.attr("transform",`translate(${M+n/2+Jt}, ${ve+L+u.height+a/2})`)}),h.select(".name").attr("transform","translate("+-u.width/2+", "+(L+a/2)+")");const N=B.rectangle(M,L,E,R,F),I=h.insert(()=>N,":first-child").attr("style",s.join("")),{themeVariables:j}=Rt(),{rowEven:G,rowOdd:mt,nodeBorder:kt}=j;p.push(0);for(const[st,et]of g.entries()){const nt=(st+1)%2===0&&et.yOffset!==0,Zt=B.rectangle(M,u.height+L+et?.yOffset,E,et?.rowHeight,{...F,fill:nt?G:mt,stroke:kt});h.insert(()=>Zt,"g.label").attr("style",s.join("")).attr("class",`row-rect-${nt?"even":"odd"}`)}let ot=B.line(M,u.height+L,E+M,u.height+L,F);h.insert(()=>ot).attr("class","divider"),ot=B.line(m+M,u.height+L,m+M,R+L,F),h.insert(()=>ot).attr("class","divider"),k&&(ot=B.line(m+y+M,u.height+L,m+y+M,R+L,F),h.insert(()=>ot).attr("class","divider")),C&&(ot=B.line(m+y+x+M,u.height+L,m+y+x+M,R+L,F),h.insert(()=>ot).attr("class","divider"));for(const st of p)ot=B.line(M,u.height+L+st,E+M,u.height+L+st,F),h.insert(()=>ot).attr("class","divider");if(Y(t,I),l&&t.look!=="handDrawn"){const et=l.split(";")?.filter(At=>At.includes("stroke"))?.map(At=>`${At}`).join("; ");h.selectAll("path").attr("style",et??""),h.selectAll(".row-rect-even path").attr("style",l)}return t.intersect=function(st){return P.rect(t,st)},h}d(gl,"erBox");async function Lr(e,t,r,i=0,n=0,a=[],s=""){const o=e.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${i}, ${n})`).attr("style",s);t!==ac(t)&&(t=ac(t),t=t.replaceAll("<","<").replaceAll(">",">"));const l=o.node().appendChild(await Ve(o,t,{width:Oe(t,r)+100,style:s,useHtmlLabels:r.htmlLabels},r));if(t.includes("<")||t.includes(">")){let h=l.children[0];for(h.textContent=h.textContent.replaceAll("<","<").replaceAll(">",">");h.childNodes[0];)h=h.childNodes[0],h.textContent=h.textContent.replaceAll("<","<").replaceAll(">",">")}let c=l.getBBox();if(vt(r.htmlLabels)){const h=l.children[0];h.style.textAlign="start";const u=at(l);c=h.getBoundingClientRect(),u.attr("width",c.width),u.attr("height",c.height)}return c}d(Lr,"addText");async function bg(e,t,r,i,n=r.class.padding??12){const a=i?0:3,s=e.insert("g").attr("class",Q(t)).attr("id",t.domId||t.id);let o=null,l=null,c=null,h=null,u=0,f=0,p=0;if(o=s.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await Ci(o,{text:`«${b}»`},0),u=o.node().getBBox().height}l=s.insert("g").attr("class","label-group text"),await Ci(l,t,0,["font-weight: bolder"]);const g=l.node().getBBox();f=g.height,c=s.insert("g").attr("class","members-group text");let m=0;for(const b of t.members){const k=await Ci(c,b,m,[b.parseClassifier()]);m+=k+a}p=c.node().getBBox().height,p<=0&&(p=n/2),h=s.insert("g").attr("class","methods-group text");let y=0;for(const b of t.methods){const k=await Ci(h,b,y,[b.parseClassifier()]);y+=k+a}let x=s.node().getBBox();if(o!==null){const b=o.node().getBBox();o.attr("transform",`translate(${-b.width/2})`)}return l.attr("transform",`translate(${-g.width/2}, ${u})`),x=s.node().getBBox(),c.attr("transform",`translate(0, ${u+f+n*2})`),x=s.node().getBBox(),h.attr("transform",`translate(0, ${u+f+(p?p+n*4:n*2)})`),x=s.node().getBBox(),{shapeSvg:s,bbox:x}}d(bg,"textHelper");async function Ci(e,t,r,i=[]){const n=e.insert("g").attr("class","label").attr("style",i.join("; ")),a=Rt();let s="useHtmlLabels"in t?t.useHtmlLabels:vt(a.htmlLabels)??!0,o="";"text"in t?o=t.text:o=t.label,!s&&o.startsWith("\\")&&(o=o.substring(1)),Hr(o)&&(s=!0);const l=await Ve(n,Lo(xr(o)),{width:Oe(o,a)+50,classes:"markdown-node-label",useHtmlLabels:s},a);let c,h=1;if(s){const u=l.children[0],f=at(l);h=u.innerHTML.split("<br>").length,u.innerHTML.includes("</math>")&&(h+=u.innerHTML.split("<mrow>").length-1);const p=u.getElementsByTagName("img");if(p){const g=o.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...p].map(m=>new Promise(y=>{function x(){if(m.style.display="flex",m.style.flexDirection="column",g){const b=a.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,C=parseInt(b,10)*5+"px";m.style.minWidth=C,m.style.maxWidth=C}else m.style.width="100%";y(m)}d(x,"setupImage"),setTimeout(()=>{m.complete&&x()}),m.addEventListener("error",x),m.addEventListener("load",x)})))}c=u.getBoundingClientRect(),f.attr("width",c.width),f.attr("height",c.height)}else{i.includes("font-weight: bolder")&&at(l).selectAll("tspan").attr("font-weight",""),h=l.children.length;const u=l.children[0];(l.textContent===""||l.textContent.includes(">"))&&(u.textContent=o[0]+o.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),o[1]===" "&&(u.textContent=u.textContent[0]+" "+u.textContent.substring(1))),u.textContent==="undefined"&&(u.textContent=""),c=l.getBBox()}return n.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}d(Ci,"addText");async function kg(e,t){const r=ut(),i=r.class.padding??12,n=i,a=t.useHtmlLabels??vt(r.htmlLabels)??!0,s=t;s.annotations=s.annotations??[],s.members=s.members??[],s.methods=s.methods??[];const{shapeSvg:o,bbox:l}=await bg(e,t,r,a,n),{labelStyles:c,nodeStyles:h}=H(t);t.labelStyle=c,t.cssStyles=s.styles||"";const u=s.styles?.join(";")||h||"";t.cssStyles||(t.cssStyles=u.replaceAll("!important","").split(";"));const f=s.members.length===0&&s.methods.length===0&&!r.class?.hideEmptyMembersBox,p=q.svg(o),g=W(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=l.width;let y=l.height;s.members.length===0&&s.methods.length===0?y+=n:s.members.length>0&&s.methods.length===0&&(y+=n*2);const x=-m/2,b=-y/2,k=p.rectangle(x-i,b-i-(f?i:s.members.length===0&&s.methods.length===0?-i/2:0),m+2*i,y+2*i+(f?i*2:s.members.length===0&&s.methods.length===0?-i:0),g),C=o.insert(()=>k,":first-child");C.attr("class","basic label-container");const _=C.node().getBBox();o.selectAll(".text").each((F,D,E)=>{const R=at(E[D]),M=R.attr("transform");let L=0;if(M){const G=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(M);G&&(L=parseFloat(G[2]))}let N=L+b+i-(f?i:s.members.length===0&&s.methods.length===0?-i/2:0);a||(N-=4);let I=x;(R.attr("class").includes("label-group")||R.attr("class").includes("annotation-group"))&&(I=-R.node()?.getBBox().width/2||0,o.selectAll("text").each(function(j,G,mt){window.getComputedStyle(mt[G]).textAnchor==="middle"&&(I=0)})),R.attr("transform",`translate(${I}, ${N})`)});const T=o.select(".annotation-group").node().getBBox().height-(f?i/2:0)||0,v=o.select(".label-group").node().getBBox().height-(f?i/2:0)||0,B=o.select(".members-group").node().getBBox().height-(f?i/2:0)||0;if(s.members.length>0||s.methods.length>0||f){const F=p.line(_.x,T+v+b+i,_.x+_.width,T+v+b+i,g);o.insert(()=>F).attr("class","divider").attr("style",u)}if(f||s.members.length>0||s.methods.length>0){const F=p.line(_.x,T+v+B+b+n*2+i,_.x+_.width,T+v+B+b+i+n*2,g);o.insert(()=>F).attr("class","divider").attr("style",u)}if(s.look!=="handDrawn"&&o.selectAll("path").attr("style",u),C.select(":nth-child(2)").attr("style",u),o.selectAll(".divider").select("path").attr("style",u),t.labelStyle?o.selectAll("span").attr("style",t.labelStyle):o.selectAll("span").attr("style",u),!a){const F=RegExp(/color\s*:\s*([^;]*)/),D=F.exec(u);if(D){const E=D[0].replace("color","fill");o.selectAll("tspan").attr("style",E)}else if(c){const E=F.exec(c);if(E){const R=E[0].replace("color","fill");o.selectAll("tspan").attr("style",R)}}}return Y(t,C),t.intersect=function(F){return P.rect(t,F)},o}d(kg,"classBox");async function wg(e,t){const{labelStyles:r,nodeStyles:i}=H(t);t.labelStyle=r;const n=t,a=t,s=20,o=20,l="verifyMethod"in t,c=Q(t),h=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let u;l?u=await be(h,`<<${n.type}>>`,0,t.labelStyle):u=await be(h,"<<Element>>",0,t.labelStyle);let f=u;const p=await be(h,n.name,f,t.labelStyle+"; font-weight: bold;");if(f+=p+o,l){const T=await be(h,`${n.requirementId?`ID: ${n.requirementId}`:""}`,f,t.labelStyle);f+=T;const v=await be(h,`${n.text?`Text: ${n.text}`:""}`,f,t.labelStyle);f+=v;const B=await be(h,`${n.risk?`Risk: ${n.risk}`:""}`,f,t.labelStyle);f+=B,await be(h,`${n.verifyMethod?`Verification: ${n.verifyMethod}`:""}`,f,t.labelStyle)}else{const T=await be(h,`${a.type?`Type: ${a.type}`:""}`,f,t.labelStyle);f+=T,await be(h,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,f,t.labelStyle)}const g=(h.node()?.getBBox().width??200)+s,m=(h.node()?.getBBox().height??200)+s,y=-g/2,x=-m/2,b=q.svg(h),k=W(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const C=b.rectangle(y,x,g,m,k),_=h.insert(()=>C,":first-child");if(_.attr("class","basic label-container").attr("style",i),h.selectAll(".label").each((T,v,B)=>{const F=at(B[v]),D=F.attr("transform");let E=0,R=0;if(D){const I=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(D);I&&(E=parseFloat(I[1]),R=parseFloat(I[2]))}const M=R-m/2;let L=y+s/2;(v===0||v===1)&&(L=E),F.attr("transform",`translate(${L}, ${M+s})`)}),f>u+p+o){const T=b.line(y,x+u+p+o,y+g,x+u+p+o,k);h.insert(()=>T).attr("style",i)}return Y(t,_),t.intersect=function(T){return P.rect(t,T)},h}d(wg,"requirementBox");async function be(e,t,r,i=""){if(t==="")return 0;const n=e.insert("g").attr("class","label").attr("style",i),a=ut(),s=a.htmlLabels??!0,o=await Ve(n,Lo(xr(t)),{width:Oe(t,a)+50,classes:"markdown-node-label",useHtmlLabels:s,style:i},a);let l;if(s){const c=o.children[0],h=at(o);l=c.getBoundingClientRect(),h.attr("width",l.width),h.attr("height",l.height)}else{const c=o.children[0];for(const h of c.children)h.textContent=h.textContent.replaceAll(">",">").replaceAll("<","<"),i&&h.setAttribute("style",i);l=o.getBBox(),l.height+=6}return n.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}d(be,"addText");var cC=d(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function _g(e,t,{config:r}){const{labelStyles:i,nodeStyles:n}=H(t);t.labelStyle=i||"";const a=10,s=t.width;t.width=(t.width??200)-10;const{shapeSvg:o,bbox:l,label:c}=await K(e,t,Q(t)),h=t.padding||10;let u="",f;"ticket"in t&&t.ticket&&r?.kanban?.ticketBaseUrl&&(u=r?.kanban?.ticketBaseUrl.replace("#TICKET#",t.ticket),f=o.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).attr("target","_blank"));const p={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let g,m;f?{label:g,bbox:m}=await us(f,"ticket"in t&&t.ticket||"",p):{label:g,bbox:m}=await us(o,"ticket"in t&&t.ticket||"",p);const{label:y,bbox:x}=await us(o,"assigned"in t&&t.assigned||"",p);t.width=s;const b=10,k=t?.width||0,C=Math.max(m.height,x.height)/2,_=Math.max(l.height+b*2,t?.height||0)+C,T=-k/2,v=-_/2;c.attr("transform","translate("+(h-k/2)+", "+(-C-l.height/2)+")"),g.attr("transform","translate("+(h-k/2)+", "+(-C+l.height/2)+")"),y.attr("transform","translate("+(h+k/2-x.width-2*a)+", "+(-C+l.height/2)+")");let B;const{rx:F,ry:D}=t,{cssStyles:E}=t;if(t.look==="handDrawn"){const R=q.svg(o),M=W(t,{}),L=F||D?R.path(Xe(T,v,k,_,F||0),M):R.rectangle(T,v,k,_,M);B=o.insert(()=>L,":first-child"),B.attr("class","basic label-container").attr("style",E||null)}else{B=o.insert("rect",":first-child"),B.attr("class","basic label-container __APA__").attr("style",n).attr("rx",F??5).attr("ry",D??5).attr("x",T).attr("y",v).attr("width",k).attr("height",_);const R="priority"in t&&t.priority;if(R){const M=o.append("line"),L=T+2,N=v+Math.floor((F??0)/2),I=v+_-Math.floor((F??0)/2);M.attr("x1",L).attr("y1",N).attr("x2",L).attr("y2",I).attr("stroke-width","4").attr("stroke",cC(R))}}return Y(t,B),t.height=_,t.intersect=function(R){return P.rect(t,R)},o}d(_g,"kanbanItem");async function Cg(e,t){const{labelStyles:r,nodeStyles:i}=H(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:s,label:o}=await K(e,t,Q(t)),l=a.width+10*s,c=a.height+8*s,h=.15*l,{cssStyles:u}=t,f=a.width+20,p=a.height+20,g=Math.max(l,f),m=Math.max(c,p);o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let y;const x=`M0 0
|
|
251
|
+
a${h},${h} 1 0,0 ${g*.25},${-1*m*.1}
|
|
252
|
+
a${h},${h} 1 0,0 ${g*.25},0
|
|
253
|
+
a${h},${h} 1 0,0 ${g*.25},0
|
|
254
|
+
a${h},${h} 1 0,0 ${g*.25},${m*.1}
|
|
255
|
+
|
|
256
|
+
a${h},${h} 1 0,0 ${g*.15},${m*.33}
|
|
257
|
+
a${h*.8},${h*.8} 1 0,0 0,${m*.34}
|
|
258
|
+
a${h},${h} 1 0,0 ${-1*g*.15},${m*.33}
|
|
259
|
+
|
|
260
|
+
a${h},${h} 1 0,0 ${-1*g*.25},${m*.15}
|
|
261
|
+
a${h},${h} 1 0,0 ${-1*g*.25},0
|
|
262
|
+
a${h},${h} 1 0,0 ${-1*g*.25},0
|
|
263
|
+
a${h},${h} 1 0,0 ${-1*g*.25},${-1*m*.15}
|
|
264
|
+
|
|
265
|
+
a${h},${h} 1 0,0 ${-1*g*.1},${-1*m*.33}
|
|
266
|
+
a${h*.8},${h*.8} 1 0,0 0,${-1*m*.34}
|
|
267
|
+
a${h},${h} 1 0,0 ${g*.1},${-1*m*.33}
|
|
268
|
+
H0 V0 Z`;if(t.look==="handDrawn"){const b=q.svg(n),k=W(t,{}),C=b.path(x,k);y=n.insert(()=>C,":first-child"),y.attr("class","basic label-container").attr("style",It(u))}else y=n.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",x);return y.attr("transform",`translate(${-g/2}, ${-m/2})`),Y(t,y),t.calcIntersect=function(b,k){return P.rect(b,k)},t.intersect=function(b){return A.info("Bang intersect",t,b),P.rect(t,b)},n}d(Cg,"bang");async function Sg(e,t){const{labelStyles:r,nodeStyles:i}=H(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:s,label:o}=await K(e,t,Q(t)),l=a.width+2*s,c=a.height+2*s,h=.15*l,u=.25*l,f=.35*l,p=.2*l,{cssStyles:g}=t;let m;const y=`M0 0
|
|
269
|
+
a${h},${h} 0 0,1 ${l*.25},${-1*l*.1}
|
|
270
|
+
a${f},${f} 1 0,1 ${l*.4},${-1*l*.1}
|
|
271
|
+
a${u},${u} 1 0,1 ${l*.35},${l*.2}
|
|
272
|
+
|
|
273
|
+
a${h},${h} 1 0,1 ${l*.15},${c*.35}
|
|
274
|
+
a${p},${p} 1 0,1 ${-1*l*.15},${c*.65}
|
|
275
|
+
|
|
276
|
+
a${u},${h} 1 0,1 ${-1*l*.25},${l*.15}
|
|
277
|
+
a${f},${f} 1 0,1 ${-1*l*.5},0
|
|
278
|
+
a${h},${h} 1 0,1 ${-1*l*.25},${-1*l*.15}
|
|
279
|
+
|
|
280
|
+
a${h},${h} 1 0,1 ${-1*l*.1},${-1*c*.35}
|
|
281
|
+
a${p},${p} 1 0,1 ${l*.1},${-1*c*.65}
|
|
282
|
+
H0 V0 Z`;if(t.look==="handDrawn"){const x=q.svg(n),b=W(t,{}),k=x.path(y,b);m=n.insert(()=>k,":first-child"),m.attr("class","basic label-container").attr("style",It(g))}else m=n.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",y);return o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),m.attr("transform",`translate(${-l/2}, ${-c/2})`),Y(t,m),t.calcIntersect=function(x,b){return P.rect(x,b)},t.intersect=function(x){return A.info("Cloud intersect",t,x),P.rect(t,x)},n}d(Sg,"cloud");async function vg(e,t){const{labelStyles:r,nodeStyles:i}=H(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:s,label:o}=await K(e,t,Q(t)),l=a.width+8*s,c=a.height+2*s,h=5,u=`
|
|
283
|
+
M${-l/2} ${c/2-h}
|
|
284
|
+
v${-c+2*h}
|
|
285
|
+
q0,-${h} ${h},-${h}
|
|
286
|
+
h${l-2*h}
|
|
287
|
+
q${h},0 ${h},${h}
|
|
288
|
+
v${c-2*h}
|
|
289
|
+
q0,${h} -${h},${h}
|
|
290
|
+
h${-l+2*h}
|
|
291
|
+
q-${h},0 -${h},-${h}
|
|
292
|
+
Z
|
|
293
|
+
`,f=n.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",u);return n.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",c/2).attr("x2",l/2).attr("y2",c/2),o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),n.append(()=>o.node()),Y(t,f),t.calcIntersect=function(p,g){return P.rect(p,g)},t.intersect=function(p){return P.rect(t,p)},n}d(vg,"defaultMindmapNode");async function Tg(e,t){const r={padding:t.padding??0};return dl(e,t,r)}d(Tg,"mindmapCircle");var hC=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:ig},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:tg},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:ng},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:lg},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Ad},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:dl},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:Cg},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:Sg},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Qd},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Rd},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Yd},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Hd},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:pg},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:qd},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Ld},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:ug},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:bd},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:eg},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:og},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:sg},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:$d},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Dd},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Cd},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Sd},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:vd},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:jd},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:mg},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Fd},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:fg},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Ud},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Td},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Bd},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:gg},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:xg},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Ed},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:dg},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Md},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:rg},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Xd},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Vd},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:xd},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:_d},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:hg},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:cg},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:yg},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Kd},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Gd}],uC=d(()=>{const t=[...Object.entries({state:ag,choice:kd,note:Zd,rectWithTitle:Jd,labelRect:Wd,iconSquare:Nd,iconCircle:Od,icon:Id,iconRounded:Pd,imageSquare:zd,anchor:yd,kanbanItem:_g,mindmapCircle:Tg,defaultMindmapNode:vg,classBox:kg,erBox:gl,requirementBox:wg}),...hC.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(n=>[n,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),Ag=uC();function fC(e){return e in Ag}d(fC,"isValidShape");var Fa=new Map;async function Bg(e,t,r){let i,n;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const a=t.shape?Ag[t.shape]:void 0;if(!a)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let s;r.config.securityLevel==="sandbox"?s="_top":t.linkTarget&&(s=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",s??null),n=await a(i,t,r)}else n=await a(e,t,r),i=n;return t.tooltip&&n.attr("title",t.tooltip),Fa.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}d(Bg,"insertNode");var wA=d((e,t)=>{Fa.set(t.id,e)},"setNodeElem"),_A=d(()=>{Fa.clear()},"clear"),CA=d(e=>{const t=Fa.get(e.id);A.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode"),pC=d((e,t,r,i,n,a)=>{t.arrowTypeStart&&eh(e,"start",t.arrowTypeStart,r,i,n,a),t.arrowTypeEnd&&eh(e,"end",t.arrowTypeEnd,r,i,n,a)},"addEdgeMarkers"),dC={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},eh=d((e,t,r,i,n,a,s)=>{const o=dC[r];if(!o){A.warn(`Unknown arrow type: ${r}`);return}const l=o.type,h=`${n}_${a}-${l}${t==="start"?"Start":"End"}`;if(s&&s.trim()!==""){const u=s.replace(/[^\dA-Za-z]/g,"_"),f=`${h}_${u}`;if(!document.getElementById(f)){const p=document.getElementById(h);if(p){const g=p.cloneNode(!0);g.id=f,g.querySelectorAll("path, circle, line").forEach(y=>{y.setAttribute("stroke",s),o.fill&&y.setAttribute("fill",s)}),p.parentNode?.appendChild(g)}}e.attr(`marker-${t}`,`url(${i}#${f})`)}else e.attr(`marker-${t}`,`url(${i}#${h})`)},"addEdgeMarker"),ua=new Map,Et=new Map,SA=d(()=>{ua.clear(),Et.clear()},"clear"),mn=d(e=>e?e.reduce((r,i)=>r+";"+i,""):"","getLabelStyles"),gC=d(async(e,t)=>{let r=vt(ut().flowchart.htmlLabels);const{labelStyles:i}=H(t);t.labelStyle=i;const n=await Ve(e,t.label,{style:t.labelStyle,useHtmlLabels:r,addSvgBackground:!0,isNode:!1});A.info("abc82",t,t.labelType);const a=e.insert("g").attr("class","edgeLabel"),s=a.insert("g").attr("class","label").attr("data-id",t.id);s.node().appendChild(n);let o=n.getBBox();if(r){const c=n.children[0],h=at(n);o=c.getBoundingClientRect(),h.attr("width",o.width),h.attr("height",o.height)}s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),ua.set(t.id,a),t.width=o.width,t.height=o.height;let l;if(t.startLabelLeft){const c=await or(t.startLabelLeft,mn(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=u.node().appendChild(c);const f=c.getBBox();u.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),Et.get(t.id)||Et.set(t.id,{}),Et.get(t.id).startLeft=h,Si(l,t.startLabelLeft)}if(t.startLabelRight){const c=await or(t.startLabelRight,mn(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=h.node().appendChild(c),u.node().appendChild(c);const f=c.getBBox();u.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),Et.get(t.id)||Et.set(t.id,{}),Et.get(t.id).startRight=h,Si(l,t.startLabelRight)}if(t.endLabelLeft){const c=await or(t.endLabelLeft,mn(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=u.node().appendChild(c);const f=c.getBBox();u.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),h.node().appendChild(c),Et.get(t.id)||Et.set(t.id,{}),Et.get(t.id).endLeft=h,Si(l,t.endLabelLeft)}if(t.endLabelRight){const c=await or(t.endLabelRight,mn(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=u.node().appendChild(c);const f=c.getBBox();u.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),h.node().appendChild(c),Et.get(t.id)||Et.set(t.id,{}),Et.get(t.id).endRight=h,Si(l,t.endLabelRight)}return n},"insertEdgeLabel");function Si(e,t){ut().flowchart.htmlLabels&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}d(Si,"setTerminalWidth");var mC=d((e,t)=>{A.debug("Moving label abc88 ",e.id,e.label,ua.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=ut(),{subGraphTitleTotalMargin:n}=Xo(i);if(e.label){const a=ua.get(e.id);let s=e.x,o=e.y;if(r){const l=he.calcLabelPosition(r);A.debug("Moving label "+e.label+" from (",s,",",o,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(s=l.x,o=l.y)}a.attr("transform",`translate(${s}, ${o+n/2})`)}if(e.startLabelLeft){const a=Et.get(e.id).startLeft;let s=e.x,o=e.y;if(r){const l=he.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(e.startLabelRight){const a=Et.get(e.id).startRight;let s=e.x,o=e.y;if(r){const l=he.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(e.endLabelLeft){const a=Et.get(e.id).endLeft;let s=e.x,o=e.y;if(r){const l=he.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(e.endLabelRight){const a=Et.get(e.id).endRight;let s=e.x,o=e.y;if(r){const l=he.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}},"positionEdgeLabel"),yC=d((e,t)=>{const r=e.x,i=e.y,n=Math.abs(t.x-r),a=Math.abs(t.y-i),s=e.width/2,o=e.height/2;return n>=s||a>=o},"outsideNode"),xC=d((e,t,r)=>{A.debug(`intersection calc abc89:
|
|
294
|
+
outsidePoint: ${JSON.stringify(t)}
|
|
295
|
+
insidePoint : ${JSON.stringify(r)}
|
|
296
|
+
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,n=e.y,a=Math.abs(i-r.x),s=e.width/2;let o=r.x<t.x?s-a:s+a;const l=e.height/2,c=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(n-t.y)*s>Math.abs(i-t.x)*l){let u=r.y<t.y?t.y-l-n:n-l-t.y;o=h*u/c;const f={x:r.x<t.x?r.x+o:r.x-h+o,y:r.y<t.y?r.y+c-u:r.y-c+u};return o===0&&(f.x=t.x,f.y=t.y),h===0&&(f.x=t.x),c===0&&(f.y=t.y),A.debug(`abc89 top/bottom calc, Q ${c}, q ${u}, R ${h}, r ${o}`,f),f}else{r.x<t.x?o=t.x-s-i:o=i-s-t.x;let u=c*o/h,f=r.x<t.x?r.x+h-o:r.x-h+o,p=r.y<t.y?r.y+u:r.y-u;return A.debug(`sides calc abc89, Q ${c}, q ${u}, R ${h}, r ${o}`,{_x:f,_y:p}),o===0&&(f=t.x,p=t.y),h===0&&(f=t.x),c===0&&(p=t.y),{x:f,y:p}}},"intersection"),rh=d((e,t)=>{A.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],n=!1;return e.forEach(a=>{if(A.info("abc88 checking point",a,t),!yC(t,a)&&!n){const s=xC(t,i,a);A.debug("abc88 inside",a,i,s),A.debug("abc88 intersection",s,t);let o=!1;r.forEach(l=>{o=o||l.x===s.x&&l.y===s.y}),r.some(l=>l.x===s.x&&l.y===s.y)?A.warn("abc88 no intersect",s,r):r.push(s),n=!0}else A.warn("abc88 outside",a,i),i=a,n||r.push(a)}),A.debug("returning points",r),r},"cutPathAtIntersect");function Lg(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const n=e[i-1],a=e[i],s=e[i+1];(n.x===a.x&&a.y===s.y&&Math.abs(a.x-s.x)>5&&Math.abs(a.y-n.y)>5||n.y===a.y&&a.x===s.x&&Math.abs(a.x-n.x)>5&&Math.abs(a.y-s.y)>5)&&(t.push(a),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}d(Lg,"extractCornerPoints");var ih=d(function(e,t,r){const i=t.x-e.x,n=t.y-e.y,a=Math.sqrt(i*i+n*n),s=r/a;return{x:t.x-s*i,y:t.y-s*n}},"findAdjacentPoint"),bC=d(function(e){const{cornerPointPositions:t}=Lg(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const n=e[i-1],a=e[i+1],s=e[i],o=ih(n,s,5),l=ih(a,s,5),c=l.x-o.x,h=l.y-o.y;r.push(o);const u=Math.sqrt(2)*2;let f={x:s.x,y:s.y};if(Math.abs(a.x-n.x)>10&&Math.abs(a.y-n.y)>=10){A.debug("Corner point fixing",Math.abs(a.x-n.x),Math.abs(a.y-n.y));const p=5;s.x===o.x?f={x:c<0?o.x-p+u:o.x+p-u,y:h<0?o.y-u:o.y+u}:f={x:c<0?o.x-u:o.x+u,y:h<0?o.y-p+u:o.y+p-u}}else A.debug("Corner point skipping fixing",Math.abs(a.x-n.x),Math.abs(a.y-n.y));r.push(f,l)}else r.push(e[i]);return r},"fixCorners"),kC=d((e,t,r)=>{const i=e-t-r,n=2,a=2,s=n+a,o=Math.floor(i/s),l=Array(o).fill(`${n} ${a}`).join(" ");return`0 ${t} ${l} ${r}`},"generateDashArray"),wC=d(function(e,t,r,i,n,a,s,o=!1){const{handDrawnSeed:l}=ut();let c=t.points,h=!1;const u=n;var f=a;const p=[];for(const L in t.cssCompiledStyles)kp(L)||p.push(t.cssCompiledStyles[L]);A.debug("UIO intersect check",t.points,f.x,u.x),f.intersect&&u.intersect&&!o&&(c=c.slice(1,t.points.length-1),c.unshift(u.intersect(c[0])),A.debug("Last point UIO",t.start,"-->",t.end,c[c.length-1],f,f.intersect(c[c.length-1])),c.push(f.intersect(c[c.length-1])));const g=btoa(JSON.stringify(c));t.toCluster&&(A.info("to cluster abc88",r.get(t.toCluster)),c=rh(t.points,r.get(t.toCluster).node),h=!0),t.fromCluster&&(A.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(c,null,2)),c=rh(c.reverse(),r.get(t.fromCluster).node).reverse(),h=!0);let m=c.filter(L=>!Number.isNaN(L.y));m=bC(m);let y=Sn;switch(y=Un,t.curve){case"linear":y=Un;break;case"basis":y=Sn;break;case"cardinal":y=Cu;break;case"bumpX":y=xu;break;case"bumpY":y=bu;break;case"catmullRom":y=vu;break;case"monotoneX":y=Mu;break;case"monotoneY":y=$u;break;case"natural":y=Ru;break;case"step":y=Du;break;case"stepAfter":y=Ou;break;case"stepBefore":y=Iu;break;default:y=Sn}const{x,y:b}=G2(t),k=Ek().x(x).y(b).curve(y);let C;switch(t.thickness){case"normal":C="edge-thickness-normal";break;case"thick":C="edge-thickness-thick";break;case"invisible":C="edge-thickness-invisible";break;default:C="edge-thickness-normal"}switch(t.pattern){case"solid":C+=" edge-pattern-solid";break;case"dotted":C+=" edge-pattern-dotted";break;case"dashed":C+=" edge-pattern-dashed";break;default:C+=" edge-pattern-solid"}let _,T=t.curve==="rounded"?Eg(Mg(m,t),5):k(m);const v=Array.isArray(t.style)?t.style:[t.style];let B=v.find(L=>L?.startsWith("stroke:")),F=!1;if(t.look==="handDrawn"){const L=q.svg(e);Object.assign([],m);const N=L.path(T,{roughness:.3,seed:l});C+=" transition",_=at(N).select("path").attr("id",t.id).attr("class"," "+C+(t.classes?" "+t.classes:"")).attr("style",v?v.reduce((j,G)=>j+";"+G,""):"");let I=_.attr("d");_.attr("d",I),e.node().appendChild(_.node())}else{const L=p.join(";"),N=v?v.reduce((st,et)=>st+et+";",""):"";let I="";t.animate&&(I=" edge-animation-fast"),t.animation&&(I=" edge-animation-"+t.animation);const j=(L?L+";"+N+";":N)+";"+(v?v.reduce((st,et)=>st+";"+et,""):"");_=e.append("path").attr("d",T).attr("id",t.id).attr("class"," "+C+(t.classes?" "+t.classes:"")+(I??"")).attr("style",j),B=j.match(/stroke:([^;]+)/)?.[1],F=t.animate===!0||!!t.animation||L.includes("animation");const G=_.node(),mt=typeof G.getTotalLength=="function"?G.getTotalLength():0,kt=$c[t.arrowTypeStart]||0,ot=$c[t.arrowTypeEnd]||0;if(t.look==="neo"&&!F){const et=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?kC(mt,kt,ot):`0 ${kt} ${mt-kt-ot} ${ot}`}; stroke-dashoffset: 0;`;_.attr("style",et+_.attr("style"))}}_.attr("data-edge",!0),_.attr("data-et","edge"),_.attr("data-id",t.id),_.attr("data-points",g),t.showPoints&&m.forEach(L=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",L.x).attr("cy",L.y)});let D="";(ut().flowchart.arrowMarkerAbsolute||ut().state.arrowMarkerAbsolute)&&(D=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,D=D.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),A.info("arrowTypeStart",t.arrowTypeStart),A.info("arrowTypeEnd",t.arrowTypeEnd),pC(_,t,D,s,i,B);const E=Math.floor(c.length/2),R=c[E];he.isLabelCoordinateInPath(R,_.attr("d"))||(h=!0);let M={};return h&&(M.updatedPath=c),M.originalPath=t.points,M},"insertEdge");function Eg(e,t){if(e.length<2)return"";let r="";const i=e.length,n=1e-5;for(let a=0;a<i;a++){const s=e[a],o=e[a-1],l=e[a+1];if(a===0)r+=`M${s.x},${s.y}`;else if(a===i-1)r+=`L${s.x},${s.y}`;else{const c=s.x-o.x,h=s.y-o.y,u=l.x-s.x,f=l.y-s.y,p=Math.hypot(c,h),g=Math.hypot(u,f);if(p<n||g<n){r+=`L${s.x},${s.y}`;continue}const m=c/p,y=h/p,x=u/g,b=f/g,k=m*x+y*b,C=Math.max(-1,Math.min(1,k)),_=Math.acos(C);if(_<n||Math.abs(Math.PI-_)<n){r+=`L${s.x},${s.y}`;continue}const T=Math.min(t/Math.sin(_/2),p/2,g/2),v=s.x-m*T,B=s.y-y*T,F=s.x+x*T,D=s.y+b*T;r+=`L${v},${B}`,r+=`Q${s.x},${s.y} ${F},${D}`}}return r}d(Eg,"generateRoundedPath");function so(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const r=t.x-e.x,i=t.y-e.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}d(so,"calculateDeltaAndAngle");function Mg(e,t){const r=e.map(n=>({...n}));if(e.length>=2&&Ft[t.arrowTypeStart]){const n=Ft[t.arrowTypeStart],a=e[0],s=e[1],{angle:o}=so(a,s),l=n*Math.cos(o),c=n*Math.sin(o);r[0].x=a.x+l,r[0].y=a.y+c}const i=e.length;if(i>=2&&Ft[t.arrowTypeEnd]){const n=Ft[t.arrowTypeEnd],a=e[i-1],s=e[i-2],{angle:o}=so(s,a),l=n*Math.cos(o),c=n*Math.sin(o);r[i-1].x=a.x-l,r[i-1].y=a.y-c}return r}d(Mg,"applyMarkerOffsetsToPoints");var _C=d((e,t,r,i)=>{t.forEach(n=>{PC[n](e,r,i)})},"insertMarkers"),CC=d((e,t,r)=>{A.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),SC=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),vC=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),TC=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),AC=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),BC=d((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),LC=d((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),EC=d((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),MC=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),$C=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),FC=d((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),n.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),RC=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),DC=d((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),n.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),IC=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
|
|
297
|
+
L20,10
|
|
298
|
+
M20,10
|
|
299
|
+
L0,20`)},"requirement_arrow"),OC=d((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),PC={extension:CC,composition:SC,aggregation:vC,dependency:TC,lollipop:AC,point:BC,circle:LC,cross:EC,barb:MC,only_one:$C,zero_or_one:FC,one_or_more:RC,zero_or_more:DC,requirement_arrow:IC,requirement_contains:OC},NC=_C,zC={common:Zr,getConfig:Rt,insertCluster:V_,insertEdge:wC,insertEdgeLabel:gC,insertMarkers:NC,insertNode:Bg,interpolateToCurve:Zo,labelHelper:K,log:A,positionEdgeLabel:mC},zi={},$g=d(e=>{for(const t of e)zi[t.name]=t},"registerLayoutLoaders"),qC=d(()=>{$g([{name:"dagre",loader:d(async()=>await pt(()=>import("./dagre-6UL2VRFP-DaYzb3MT.js"),__vite__mapDeps([0,1,2,3,4,5,6])),"loader")},{name:"cose-bilkent",loader:d(async()=>await pt(()=>import("./cose-bilkent-S5V4N54A-BAREnRga.js"),__vite__mapDeps([7,8,2,3])),"loader")}])},"registerDefaultLayoutLoaders");qC();var vA=d(async(e,t)=>{if(!(e.layoutAlgorithm in zi))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const r=zi[e.layoutAlgorithm];return(await r.loader()).render(e,t,zC,{algorithm:r.algorithm})},"render"),TA=d((e="",{fallback:t="dagre"}={})=>{if(e in zi)return e;if(t in zi)return A.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),Fg="comm",Rg="rule",Dg="decl",WC="@import",HC="@namespace",YC="@keyframes",jC="@layer",Ig=Math.abs,ml=String.fromCharCode;function Og(e){return e.trim()}function Ln(e,t,r){return e.replace(t,r)}function UC(e,t,r){return e.indexOf(t,r)}function Fr(e,t){return e.charCodeAt(t)|0}function Vr(e,t,r){return e.slice(t,r)}function ke(e){return e.length}function GC(e){return e.length}function yn(e,t){return t.push(e),e}var Ra=1,Xr=1,Pg=0,ie=0,bt=0,Jr="";function yl(e,t,r,i,n,a,s,o){return{value:e,root:t,parent:r,type:i,props:n,children:a,line:Ra,column:Xr,length:s,return:"",siblings:o}}function VC(){return bt}function XC(){return bt=ie>0?Fr(Jr,--ie):0,Xr--,bt===10&&(Xr=1,Ra--),bt}function fe(){return bt=ie<Pg?Fr(Jr,ie++):0,Xr++,bt===10&&(Xr=1,Ra++),bt}function qe(){return Fr(Jr,ie)}function En(){return ie}function Da(e,t){return Vr(Jr,e,t)}function qi(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function ZC(e){return Ra=Xr=1,Pg=ke(Jr=e),ie=0,[]}function QC(e){return Jr="",e}function fs(e){return Og(Da(ie-1,oo(e===91?e+2:e===40?e+1:e)))}function KC(e){for(;(bt=qe())&&bt<33;)fe();return qi(e)>2||qi(bt)>3?"":" "}function JC(e,t){for(;--t&&fe()&&!(bt<48||bt>102||bt>57&&bt<65||bt>70&&bt<97););return Da(e,En()+(t<6&&qe()==32&&fe()==32))}function oo(e){for(;fe();)switch(bt){case e:return ie;case 34:case 39:e!==34&&e!==39&&oo(bt);break;case 40:e===41&&oo(e);break;case 92:fe();break}return ie}function tS(e,t){for(;fe()&&e+bt!==57;)if(e+bt===84&&qe()===47)break;return"/*"+Da(t,ie-1)+"*"+ml(e===47?e:fe())}function eS(e){for(;!qi(qe());)fe();return Da(e,ie)}function rS(e){return QC(Mn("",null,null,null,[""],e=ZC(e),0,[0],e))}function Mn(e,t,r,i,n,a,s,o,l){for(var c=0,h=0,u=s,f=0,p=0,g=0,m=1,y=1,x=1,b=0,k="",C=n,_=a,T=i,v=k;y;)switch(g=b,b=fe()){case 40:if(g!=108&&Fr(v,u-1)==58){UC(v+=Ln(fs(b),"&","&\f"),"&\f",Ig(c?o[c-1]:0))!=-1&&(x=-1);break}case 34:case 39:case 91:v+=fs(b);break;case 9:case 10:case 13:case 32:v+=KC(g);break;case 92:v+=JC(En()-1,7);continue;case 47:switch(qe()){case 42:case 47:yn(iS(tS(fe(),En()),t,r,l),l),(qi(g||1)==5||qi(qe()||1)==5)&&ke(v)&&Vr(v,-1,void 0)!==" "&&(v+=" ");break;default:v+="/"}break;case 123*m:o[c++]=ke(v)*x;case 125*m:case 59:case 0:switch(b){case 0:case 125:y=0;case 59+h:x==-1&&(v=Ln(v,/\f/g,"")),p>0&&(ke(v)-u||m===0&&g===47)&&yn(p>32?ah(v+";",i,r,u-1,l):ah(Ln(v," ","")+";",i,r,u-2,l),l);break;case 59:v+=";";default:if(yn(T=nh(v,t,r,c,h,n,o,k,C=[],_=[],u,a),a),b===123)if(h===0)Mn(v,t,T,T,C,a,u,o,_);else{switch(f){case 99:if(Fr(v,3)===110)break;case 108:if(Fr(v,2)===97)break;default:h=0;case 100:case 109:case 115:}h?Mn(e,T,T,i&&yn(nh(e,T,T,0,0,n,o,k,n,C=[],u,_),_),n,_,u,o,i?C:_):Mn(v,T,T,T,[""],_,0,o,_)}}c=h=p=0,m=x=1,k=v="",u=s;break;case 58:u=1+ke(v),p=g;default:if(m<1){if(b==123)--m;else if(b==125&&m++==0&&XC()==125)continue}switch(v+=ml(b),b*m){case 38:x=h>0?1:(v+="\f",-1);break;case 44:o[c++]=(ke(v)-1)*x,x=1;break;case 64:qe()===45&&(v+=fs(fe())),f=qe(),h=u=ke(k=v+=eS(En())),b++;break;case 45:g===45&&ke(v)==2&&(m=0)}}return a}function nh(e,t,r,i,n,a,s,o,l,c,h,u){for(var f=n-1,p=n===0?a:[""],g=GC(p),m=0,y=0,x=0;m<i;++m)for(var b=0,k=Vr(e,f+1,f=Ig(y=s[m])),C=e;b<g;++b)(C=Og(y>0?p[b]+" "+k:Ln(k,/&\f/g,p[b])))&&(l[x++]=C);return yl(e,t,r,n===0?Rg:o,l,c,h,u)}function iS(e,t,r,i){return yl(e,t,r,Fg,ml(VC()),Vr(e,2,-2),0,i)}function ah(e,t,r,i,n){return yl(e,t,r,Dg,Vr(e,0,i),Vr(e,i+1,-1),i,n)}function lo(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function nS(e,t,r,i){switch(e.type){case jC:if(e.children.length)break;case WC:case HC:case Dg:return e.return=e.return||e.value;case Fg:return"";case YC:return e.return=e.value+"{"+lo(e.children,i)+"}";case Rg:if(!ke(e.value=e.props.join(",")))return""}return ke(r=lo(e.children,i))?e.return=e.value+"{"+r+"}":""}var Ng="c4",aS=d(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),sS=d(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./c4Diagram-YG6GDRKO-DRyPatZ_.js");return{diagram:t}},__vite__mapDeps([9,10,2,3]));return{id:Ng,diagram:e}},"loader"),oS={id:Ng,detector:aS,loader:sS},lS=oS,zg="flowchart",cS=d((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),hS=d(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./flowDiagram-NV44I4VS-CzqhQp8s.js");return{diagram:t}},__vite__mapDeps([11,12,13,14,15,2,3]));return{id:zg,diagram:e}},"loader"),uS={id:zg,detector:cS,loader:hS},fS=uS,qg="flowchart-v2",pS=d((e,t)=>t?.flowchart?.defaultRenderer==="dagre-d3"?!1:(t?.flowchart?.defaultRenderer==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(e)),"detector"),dS=d(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./flowDiagram-NV44I4VS-CzqhQp8s.js");return{diagram:t}},__vite__mapDeps([11,12,13,14,15,2,3]));return{id:qg,diagram:e}},"loader"),gS={id:qg,detector:pS,loader:dS},mS=gS,Wg="er",yS=d(e=>/^\s*erDiagram/.test(e),"detector"),xS=d(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./erDiagram-Q2GNP2WA-Bo17Xmng.js");return{diagram:t}},__vite__mapDeps([16,13,14,15,2,3]));return{id:Wg,diagram:e}},"loader"),bS={id:Wg,detector:yS,loader:xS},kS=bS,Hg="gitGraph",wS=d(e=>/^\s*gitGraph/.test(e),"detector"),_S=d(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./gitGraphDiagram-NY62KEGX-CoFQTy9O.js");return{diagram:t}},__vite__mapDeps([17,18,19,20,2,3,4,6]));return{id:Hg,diagram:e}},"loader"),CS={id:Hg,detector:wS,loader:_S},SS=CS,Yg="gantt",vS=d(e=>/^\s*gantt/.test(e),"detector"),TS=d(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./ganttDiagram-JELNMOA3-TXwXtUcq.js");return{diagram:t}},__vite__mapDeps([21,2,3,22,23,24]));return{id:Yg,diagram:e}},"loader"),AS={id:Yg,detector:vS,loader:TS},BS=AS,jg="info",LS=d(e=>/^\s*info/.test(e),"detector"),ES=d(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./infoDiagram-WHAUD3N6-Dq0xXfVu.js");return{diagram:t}},__vite__mapDeps([25,20,2,3,4,6]));return{id:jg,diagram:e}},"loader"),MS={id:jg,detector:LS,loader:ES},Ug="pie",$S=d(e=>/^\s*pie/.test(e),"detector"),FS=d(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./pieDiagram-ADFJNKIX-C45wSpld.js");return{diagram:t}},__vite__mapDeps([26,18,20,2,3,4,6,27,28,23]));return{id:Ug,diagram:e}},"loader"),RS={id:Ug,detector:$S,loader:FS},Gg="quadrantChart",DS=d(e=>/^\s*quadrantChart/.test(e),"detector"),IS=d(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./quadrantDiagram-AYHSOK5B-tv-_fe-W.js");return{diagram:t}},__vite__mapDeps([29,22,23,24,2,3]));return{id:Gg,diagram:e}},"loader"),OS={id:Gg,detector:DS,loader:IS},PS=OS,Vg="xychart",NS=d(e=>/^\s*xychart(-beta)?/.test(e),"detector"),zS=d(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./xychartDiagram-PRI3JC2R-C3vbJhd1.js");return{diagram:t}},__vite__mapDeps([30,23,28,22,24,2,3]));return{id:Vg,diagram:e}},"loader"),qS={id:Vg,detector:NS,loader:zS},WS=qS,Xg="requirement",HS=d(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),YS=d(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./requirementDiagram-UZGBJVZJ-Dn6PDfkL.js");return{diagram:t}},__vite__mapDeps([31,13,14,2,3]));return{id:Xg,diagram:e}},"loader"),jS={id:Xg,detector:HS,loader:YS},US=jS,Zg="sequence",GS=d(e=>/^\s*sequenceDiagram/.test(e),"detector"),VS=d(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./sequenceDiagram-WL72ISMW-B-o1CUJ5.js");return{diagram:t}},__vite__mapDeps([32,10,19,2,3]));return{id:Zg,diagram:e}},"loader"),XS={id:Zg,detector:GS,loader:VS},ZS=XS,Qg="class",QS=d((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),KS=d(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./classDiagram-2ON5EDUG-CNn53ohi.js");return{diagram:t}},__vite__mapDeps([33,34,12,13,14,2,3]));return{id:Qg,diagram:e}},"loader"),JS={id:Qg,detector:QS,loader:KS},tv=JS,Kg="classDiagram",ev=d((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),rv=d(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./classDiagram-v2-WZHVMYZB-CNn53ohi.js");return{diagram:t}},__vite__mapDeps([35,34,12,13,14,2,3]));return{id:Kg,diagram:e}},"loader"),iv={id:Kg,detector:ev,loader:rv},nv=iv,Jg="state",av=d((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),sv=d(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./stateDiagram-FKZM4ZOC-hzrupXQi.js");return{diagram:t}},__vite__mapDeps([36,37,13,14,1,2,3,4,5,6]));return{id:Jg,diagram:e}},"loader"),ov={id:Jg,detector:av,loader:sv},lv=ov,tm="stateDiagram",cv=d((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),hv=d(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./stateDiagram-v2-4FDKWEC3-DN-c2M96.js");return{diagram:t}},__vite__mapDeps([38,37,13,14,2,3]));return{id:tm,diagram:e}},"loader"),uv={id:tm,detector:cv,loader:hv},fv=uv,em="journey",pv=d(e=>/^\s*journey/.test(e),"detector"),dv=d(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./journeyDiagram-XKPGCS4Q-jIg5BOfC.js");return{diagram:t}},__vite__mapDeps([39,10,12,27,2,3]));return{id:em,diagram:e}},"loader"),gv={id:em,detector:pv,loader:dv},mv=gv,yv=d((e,t,r)=>{A.debug(`rendering svg for syntax error
|
|
300
|
+
`);const i=Nk(t),n=i.append("g");i.attr("viewBox","0 0 2412 512"),qh(i,100,512,!0),n.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),n.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),n.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),n.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),n.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),n.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),n.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),n.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),rm={draw:yv},xv=rm,bv={db:{},renderer:rm,parser:{parse:d(()=>{},"parse")}},kv=bv,im="flowchart-elk",wv=d((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),_v=d(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./flowDiagram-NV44I4VS-CzqhQp8s.js");return{diagram:t}},__vite__mapDeps([11,12,13,14,15,2,3]));return{id:im,diagram:e}},"loader"),Cv={id:im,detector:wv,loader:_v},Sv=Cv,nm="timeline",vv=d(e=>/^\s*timeline/.test(e),"detector"),Tv=d(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./timeline-definition-IT6M3QCI-R5SP9GDo.js");return{diagram:t}},__vite__mapDeps([40,27,2,3]));return{id:nm,diagram:e}},"loader"),Av={id:nm,detector:vv,loader:Tv},Bv=Av,am="mindmap",Lv=d(e=>/^\s*mindmap/.test(e),"detector"),Ev=d(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./mindmap-definition-VGOIOE7T-o-4ubbY9.js");return{diagram:t}},__vite__mapDeps([41,13,14,2,3]));return{id:am,diagram:e}},"loader"),Mv={id:am,detector:Lv,loader:Ev},$v=Mv,sm="kanban",Fv=d(e=>/^\s*kanban/.test(e),"detector"),Rv=d(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./kanban-definition-3W4ZIXB7-D2giu6aZ.js");return{diagram:t}},__vite__mapDeps([42,12,2,3]));return{id:sm,diagram:e}},"loader"),Dv={id:sm,detector:Fv,loader:Rv},Iv=Dv,om="sankey",Ov=d(e=>/^\s*sankey(-beta)?/.test(e),"detector"),Pv=d(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./sankeyDiagram-TZEHDZUN-CbXTZAsG.js");return{diagram:t}},__vite__mapDeps([43,28,23,2,3]));return{id:om,diagram:e}},"loader"),Nv={id:om,detector:Ov,loader:Pv},zv=Nv,lm="packet",qv=d(e=>/^\s*packet(-beta)?/.test(e),"detector"),Wv=d(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./diagram-S2PKOQOG-0UfIeT-1.js");return{diagram:t}},__vite__mapDeps([44,18,20,2,3,4,6]));return{id:lm,diagram:e}},"loader"),Hv={id:lm,detector:qv,loader:Wv},cm="radar",Yv=d(e=>/^\s*radar-beta/.test(e),"detector"),jv=d(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./diagram-QEK2KX5R-CR4VU2La.js");return{diagram:t}},__vite__mapDeps([45,18,20,2,3,4,6]));return{id:cm,diagram:e}},"loader"),Uv={id:cm,detector:Yv,loader:jv},hm="block",Gv=d(e=>/^\s*block(-beta)?/.test(e),"detector"),Vv=d(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./blockDiagram-VD42YOAC-Bv-mqdQH.js");return{diagram:t}},__vite__mapDeps([46,12,2,3,1,4,15]));return{id:hm,diagram:e}},"loader"),Xv={id:hm,detector:Gv,loader:Vv},Zv=Xv,um="architecture",Qv=d(e=>/^\s*architecture/.test(e),"detector"),Kv=d(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./architectureDiagram-VXUJARFQ-CEGpqUlZ.js");return{diagram:t}},__vite__mapDeps([47,18,20,2,3,4,6,8]));return{id:um,diagram:e}},"loader"),Jv={id:um,detector:Qv,loader:Kv},tT=Jv,fm="treemap",eT=d(e=>/^\s*treemap/.test(e),"detector"),rT=d(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./diagram-PSM6KHXK-BFltDqvd.js");return{diagram:t}},__vite__mapDeps([48,14,18,20,2,3,4,6,24,28,23]));return{id:fm,diagram:e}},"loader"),iT={id:fm,detector:eT,loader:rT},sh=!1,Ia=d(()=>{sh||(sh=!0,Nn("error",kv,e=>e.toLowerCase().trim()==="error"),Nn("---",{db:{clear:d(()=>{},"clear")},styles:{},renderer:{draw:d(()=>{},"draw")},parser:{parse:d(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:d(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),ws(Sv,$v,tT),ws(lS,Iv,nv,tv,kS,BS,MS,RS,US,ZS,mS,fS,Bv,SS,fv,lv,mv,PS,zv,Hv,WS,Zv,Uv,iT))},"addDiagrams"),nT=d(async()=>{A.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(ur).map(async([r,{detector:i,loader:n}])=>{if(n)try{vs(r)}catch{try{const{diagram:a,id:s}=await n();Nn(s,a,i)}catch(a){throw A.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete ur[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){A.error(`Failed to load ${t.length} external diagrams`);for(const r of t)A.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),aT="graphics-document document";function pm(e,t){e.attr("role",aT),t!==""&&e.attr("aria-roledescription",t)}d(pm,"setA11yDiagramInfo");function dm(e,t,r,i){if(e.insert!==void 0){if(r){const n=`chart-desc-${i}`;e.attr("aria-describedby",n),e.insert("desc",":first-child").attr("id",n).text(r)}if(t){const n=`chart-title-${i}`;e.attr("aria-labelledby",n),e.insert("title",":first-child").attr("id",n).text(t)}}}d(dm,"addSVGa11yTitleDescription");var cr,co=(cr=class{constructor(t,r,i,n,a){this.type=t,this.text=r,this.db=i,this.parser=n,this.renderer=a}static async fromText(t,r={}){const i=Rt(),n=Co(t,i);t=yw(t)+`
|
|
301
|
+
`;try{vs(n)}catch{const c=gy(n);if(!c)throw new Lh(`Diagram ${n} not found.`);const{id:h,diagram:u}=await c();Nn(h,u)}const{db:a,parser:s,renderer:o,init:l}=vs(n);return s.parser&&(s.parser.yy=a),a.clear?.(),l?.(i),r.title&&a.setDiagramTitle?.(r.title),await s.parse(t),new cr(n,t,a,s,o)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},d(cr,"Diagram"),cr),oh=[],sT=d(()=>{oh.forEach(e=>{e()}),oh=[]},"attachFunctions"),oT=d(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function gm(e){const t=e.match(Bh);if(!t)return{text:e,metadata:{}};let r=U2(t[1],{schema:j2})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};const i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:e.slice(t[0].length),metadata:i}}d(gm,"extractFrontMatter");var lT=d(e=>e.replace(/\r\n?/g,`
|
|
302
|
+
`).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),cT=d(e=>{const{text:t,metadata:r}=gm(e),{displayMode:i,title:n,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:n,config:a,text:t}},"processFrontmatter"),hT=d(e=>{const t=he.detectInit(e)??{},r=he.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):r?.type==="wrap"&&(t.wrap=!0),{text:nw(e),directive:t}},"processDirectives");function xl(e){const t=lT(e),r=cT(t),i=hT(r.text),n=el(r.config,i.directive);return e=oT(i.text),{code:e,title:r.title,config:n}}d(xl,"preprocessDiagram");function mm(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}d(mm,"toBase64");var uT=5e4,fT="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",pT="sandbox",dT="loose",gT="http://www.w3.org/2000/svg",mT="http://www.w3.org/1999/xlink",yT="http://www.w3.org/1999/xhtml",xT="100%",bT="100%",kT="border:0;margin:0;",wT="margin:0",_T="allow-top-navigation-by-user-activation allow-popups",CT='The "iframe" tag is not supported by your browser.',ST=["foreignobject"],vT=["dominant-baseline"];function bl(e){const t=xl(e);return On(),My(t.config??{}),t}d(bl,"processAndSetConfigs");async function ym(e,t){Ia();try{const{code:r,config:i}=bl(e);return{diagramType:(await bm(r)).type,config:i}}catch(r){if(t?.suppressErrors)return!1;throw r}}d(ym,"parse");var lh=d((e,t,r=[])=>`
|
|
303
|
+
.${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),TT=d((e,t=new Map)=>{let r="";if(e.themeCSS!==void 0&&(r+=`
|
|
304
|
+
${e.themeCSS}`),e.fontFamily!==void 0&&(r+=`
|
|
305
|
+
:root { --mermaid-font-family: ${e.fontFamily}}`),e.altFontFamily!==void 0&&(r+=`
|
|
306
|
+
:root { --mermaid-alt-font-family: ${e.altFontFamily}}`),t instanceof Map){const s=e.htmlLabels??e.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(o=>{ql(o.styles)||s.forEach(l=>{r+=lh(o.id,l,o.styles)}),ql(o.textStyles)||(r+=lh(o.id,"tspan",(o?.textStyles||[]).map(l=>l.replace("color","fill"))))})}return r},"createCssStyles"),AT=d((e,t,r,i)=>{const n=TT(e,r),a=Qy(t,n,e.themeVariables);return lo(rS(`${i}{${a}}`),nS)},"createUserStyles"),BT=d((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=xr(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),LT=d((e="",t)=>{const r=t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":bT,i=mm(`<body style="${wT}">${e}</body>`);return`<iframe style="width:${xT};height:${r};${kT}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${_T}">
|
|
307
|
+
${CT}
|
|
308
|
+
</iframe>`},"putIntoIFrame"),ch=d((e,t,r,i,n)=>{const a=e.append("div");a.attr("id",r),i&&a.attr("style",i);const s=a.append("svg").attr("id",t).attr("width","100%").attr("xmlns",gT);return n&&s.attr("xmlns:xlink",n),s.append("g"),e},"appendDivSvgG");function ho(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}d(ho,"sandboxedIframe");var ET=d((e,t,r,i)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(i)?.remove()},"removeExistingElements"),MT=d(async function(e,t,r){Ia();const i=bl(t);t=i.code;const n=Rt();A.debug(n),t.length>(n?.maxTextSize??uT)&&(t=fT);const a="#"+e,s="i"+e,o="#"+s,l="d"+e,c="#"+l,h=d(()=>{const M=at(f?o:c).node();M&&"remove"in M&&M.remove()},"removeTempElements");let u=at("body");const f=n.securityLevel===pT,p=n.securityLevel===dT,g=n.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),f){const R=ho(at(r),s);u=at(R.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=at(r);ch(u,e,l,`font-family: ${g}`,mT)}else{if(ET(document,e,l,s),f){const R=ho(at("body"),s);u=at(R.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=at("body");ch(u,e,l)}let m,y;try{m=await co.fromText(t,{title:i.title})}catch(R){if(n.suppressErrorRendering)throw h(),R;m=await co.fromText("error"),y=R}const x=u.select(c).node(),b=m.type,k=x.firstChild,C=k.firstChild,_=m.renderer.getClasses?.(t,m),T=AT(n,b,_,a),v=document.createElement("style");v.innerHTML=T,k.insertBefore(v,C);try{await m.renderer.draw(t,e,rc.version,m)}catch(R){throw n.suppressErrorRendering?h():xv.draw(t,e,rc.version),R}const B=u.select(`${c} svg`),F=m.db.getAccTitle?.(),D=m.db.getAccDescription?.();km(b,B,F,D),u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",yT);let E=u.select(c).node().innerHTML;if(A.debug("config.arrowMarkerAbsolute",n.arrowMarkerAbsolute),E=BT(E,f,vt(n.arrowMarkerAbsolute)),f){const R=u.select(c+" svg").node();E=LT(E,R)}else p||(E=He.sanitize(E,{ADD_TAGS:ST,ADD_ATTR:vT,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(sT(),y)throw y;return h(),{diagramType:b,svg:E,bindFunctions:m.db.bindFunctions}},"render");function xm(e={}){const t=Ct({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),Ly(t),t?.theme&&t.theme in Re?t.themeVariables=Re[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Re.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?By(t):Rh();_o(r.logLevel),Ia()}d(xm,"initialize");var bm=d((e,t={})=>{const{code:r}=xl(e);return co.fromText(r,t)},"getDiagramFromText");function km(e,t,r,i){pm(t,e),dm(t,r,i,t.attr("id"))}d(km,"addA11yInfo");var mr=Object.freeze({render:MT,parse:ym,getDiagramFromText:bm,initialize:xm,getConfig:Rt,setConfig:Dh,getSiteConfig:Rh,updateSiteConfig:Ey,reset:d(()=>{On()},"reset"),globalReset:d(()=>{On(Wr)},"globalReset"),defaultConfig:Wr});_o(Rt().logLevel);On(Rt());var $T=d((e,t,r)=>{A.warn(e),tl(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),wm=d(async function(e={querySelector:".mermaid"}){try{await FT(e)}catch(t){if(tl(t)&&A.error(t.str),Pe.parseError&&Pe.parseError(t),!e.suppressErrors)throw A.error("Use the suppressErrors option to suppress these errors"),t}},"run"),FT=d(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=mr.getConfig();A.debug(`${e?"":"No "}Callback function found`);let n;if(r)n=r;else if(t)n=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");A.debug(`Found ${n.length} diagrams`),i?.startOnLoad!==void 0&&(A.debug("Start On Load: "+i?.startOnLoad),mr.updateSiteConfig({startOnLoad:i?.startOnLoad}));const a=new he.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let s;const o=[];for(const l of Array.from(n)){if(A.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${a.next()}`;s=l.innerHTML,s=Wp(he.entityDecode(s)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=he.detectInit(s);h&&A.debug("Detected early reinit: ",h);try{const{svg:u,bindFunctions:f}=await vm(c,s,l);l.innerHTML=u,e&&await e(c),f&&f(l)}catch(u){$T(u,o,Pe.parseError)}}if(o.length>0)throw o[0]},"runThrowsErrors"),_m=d(function(e){mr.initialize(e)},"initialize"),RT=d(async function(e,t,r){A.warn("mermaid.init is deprecated. Please use run instead."),e&&_m(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await wm(i)},"init"),DT=d(async(e,{lazyLoad:t=!0}={})=>{Ia(),ws(...e),t===!1&&await nT()},"registerExternalDiagrams"),Cm=d(function(){if(Pe.startOnLoad){const{startOnLoad:e}=mr.getConfig();e&&Pe.run().catch(t=>A.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",Cm,!1);var IT=d(function(e){Pe.parseError=e},"setParseErrorHandler"),fa=[],ps=!1,Sm=d(async()=>{if(!ps){for(ps=!0;fa.length>0;){const e=fa.shift();if(e)try{await e()}catch(t){A.error("Error executing queue",t)}}ps=!1}},"executeQueue"),OT=d(async(e,t)=>new Promise((r,i)=>{const n=d(()=>new Promise((a,s)=>{mr.parse(e,t).then(o=>{a(o),r(o)},o=>{A.error("Error parsing",o),Pe.parseError?.(o),s(o),i(o)})}),"performCall");fa.push(n),Sm().catch(i)}),"parse"),vm=d((e,t,r)=>new Promise((i,n)=>{const a=d(()=>new Promise((s,o)=>{mr.render(e,t,r).then(l=>{s(l),i(l)},l=>{A.error("Error parsing",l),Pe.parseError?.(l),o(l),n(l)})}),"performCall");fa.push(a),Sm().catch(n)}),"render"),PT=d(()=>Object.keys(ur).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),Pe={startOnLoad:!0,mermaidAPI:mr,parse:OT,render:vm,init:RT,run:wm,registerExternalDiagrams:DT,registerLayoutLoaders:$g,initialize:_m,parseError:void 0,contentLoaded:Cm,setParseErrorHandler:IT,detectType:Co,registerIconPacks:w_,getRegisteredDiagramsMetadata:PT},kl=Pe;function Tt(e,t){return typeof document>"u"?t:getComputedStyle(document.documentElement).getPropertyValue(e).trim()||t}function Tm(){const e=ds()==="dark";return{primaryColor:Tt("--accent-red",e?"#E84545":"#D92B2B"),primaryTextColor:Tt("--text-main",e?"#E0E0E0":"#111"),primaryBorderColor:Tt("--accent-red",e?"#E84545":"#D92B2B"),lineColor:Tt("--text-secondary",e?"#888":"#666"),secondaryColor:Tt("--bg-secondary",e?"#2A2A2A":"#F5F5F5"),tertiaryColor:Tt("--bg-main",e?"#1E1E1E":"#FFFFFF"),background:Tt("--bg-main",e?"#1E1E1E":"#FFFFFF"),textColor:Tt("--text-main",e?"#E0E0E0":"#111"),actorBkg:Tt("--bg-secondary",e?"#2A2A2A":"#F5F5F5"),actorBorder:Tt("--accent-red",e?"#E84545":"#D92B2B"),actorTextColor:Tt("--text-main",e?"#E0E0E0":"#111"),signalColor:Tt("--text-main",e?"#E0E0E0":"#111"),signalTextColor:Tt("--text-main",e?"#E0E0E0":"#111"),activationBkgColor:Tt("--path-bg",e?"#333":"#F0F0F0"),activationBorderColor:Tt("--accent-red",e?"#E84545":"#D92B2B"),nodeBkg:Tt("--bg-secondary",e?"#2A2A2A":"#F5F5F5"),nodeBorder:Tt("--accent-red",e?"#E84545":"#D92B2B"),nodeTextColor:Tt("--text-main",e?"#E0E0E0":"#111"),fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'}}function NT(){kl.initialize({startOnLoad:!1,theme:"base",themeVariables:Tm(),securityLevel:"loose",flowchart:{htmlLabels:!0,curve:"basis"},sequence:{diagramMarginX:10,diagramMarginY:10,actorMargin:50,mirrorActors:!1}})}function zT(){kl.initialize({startOnLoad:!1,theme:"base",themeVariables:Tm(),securityLevel:"loose"})}let qT=0;async function WT(e){const t=`mermaid-${Date.now()}-${qT++}`;try{const{svg:r}=await kl.render(t,e);return r}catch(r){return console.error("Mermaid render error:",r),`<pre class="mermaid-error">Mermaid 渲染错误: ${r instanceof Error?r.message:"未知错误"}</pre>`}}const HT=["flowchart","graph","sequenceDiagram","classDiagram","stateDiagram","erDiagram","gantt","pie","journey","gitGraph","mindmap","timeline","quadrantChart","sankey","xychart"];function YT(e){const t=e.trim();return HT.some(r=>t.startsWith(r)||t.startsWith("%%{"))}const jT=["innerHTML"],UT=jm({__name:"MarkdownContent",props:{content:{}},setup(e){const t=e,r=zl(),i=zl(new Map);Va(()=>{NT()});let n=ds();const a=()=>{const h=ds();h!==n&&(n=h,zT(),c())};Va(()=>{const h=setInterval(a,500);return()=>clearInterval(h)});const s=new lt.Renderer,o=s.code.bind(s);s.code=function(h){const{text:u,lang:f}=h;if(f==="mermaid"||YT(u)){const p=`mermaid-block-${Math.random().toString(36).slice(2,10)}`;return i.value.set(p,u),`<div class="mermaid-container" data-mermaid-id="${p}"><div class="mermaid-loading">加载图表中...</div></div>`}return o(h)},lt.setOptions({gfm:!0,breaks:!0}),lt.use({renderer:s}),He.addHook("uponSanitizeAttribute",(h,u)=>{u.attrName==="data-mermaid-id"&&(u.forceKeepAttr=!0)});const l=Um(()=>{if(!t.content)return"";i.value.clear();const h=lt.parse(t.content);return He.sanitize(h,{ADD_ATTR:["data-mermaid-id"]})});async function c(){if(await Xm(),!r.value)return;const h=r.value.querySelectorAll(".mermaid-container[data-mermaid-id]");for(const u of h){const f=u.getAttribute("data-mermaid-id");if(!f)continue;const p=i.value.get(f);if(p)try{const g=await WT(p);u.innerHTML=g,u.classList.add("mermaid-rendered")}catch{u.innerHTML='<div class="mermaid-error">图表渲染失败</div>'}}}return Gm(l,()=>{c()},{flush:"post"}),Va(()=>{c()}),(h,u)=>(Zm(),Vm("div",{ref_key:"containerRef",ref:r,class:"markdown-content",innerHTML:l.value},null,8,jT))}}),AA=Qm(UT,[["__scopeId","data-v-981a6f0d"]]);export{Wh as $,Ai as A,sy as B,sx as C,el as D,Rt as E,Fh as F,cw as G,Nk as H,rc as I,j2 as J,wy as K,Hr as L,tA as M,Ta as N,zy as O,So as P,ac as Q,Ek as R,Sn as S,lw as T,Yi as U,Vy as V,Hi as W,z as X,Z as Y,tw as Z,d as _,tx as a,Tk as a0,Oo as a1,sA as a2,cA as a3,Tr as a4,vc as a5,Sc as a6,uA as a7,hA as a8,lA as a9,gC as aA,C_ as aB,AA as aC,Ak as aD,JT as aE,Xi as aF,w_ as aG,k_ as aH,Fo as aI,ze as aJ,xc as aK,s1 as aL,Fi as aM,H as aN,kp as aO,Xt as aP,Jb as aQ,$o as aR,ru as aS,Ui as aT,au as aU,iA as aV,nA as aa,aA as ab,pA as ac,oA as ad,fA as ae,V_ as af,Bg as ag,CA as ah,G2 as ai,vt as aj,Ve as ak,Xo as al,td as am,xr as an,Tp as ao,tt as ap,_e as aq,ql as ar,NC as as,_A as at,SA as au,kA as av,Y as aw,wA as ax,wC as ay,mC as az,Jy as b,ut as c,at as d,qh as e,Ct as f,rx as g,Oe as h,re as i,J2 as j,Zr as k,A as l,Bp as m,eA as n,TA as o,ix as p,nx as q,vA as r,ex as s,U2 as t,he as u,fC as v,fw as w,dA as x,Ky as y,rA as z};
|