ompchamber 2.0.2 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -11
- package/bunfig.toml +11 -0
- package/dist/client/index.html +16 -5
- package/dist/client/index.js +1393 -0
- package/dist/client/static/js/index-8t70jhyj.js +5149 -0
- package/dist/client/static/js/index-n4wkqj7t.css +1 -0
- package/index.html +54 -0
- package/package.json +9 -10
- package/public/apple-touch-icon.png +0 -0
- package/public/icon-192x192.png +0 -0
- package/public/icon.svg +60 -0
- package/public/manifest.webmanifest +38 -0
- package/src/cli/lib/commands/serve.js +9 -5
- package/src/cli/lib/runtime.js +18 -7
- package/src/client/components/common/code-editor/handler.test.ts +274 -0
- package/src/client/components/common/code-editor/handler.ts +175 -0
- package/src/client/components/common/code-editor/index.tsx +185 -220
- package/src/client/components/common/code-surface/index.tsx +109 -12
- package/src/client/components/common/lazy-panels.tsx +5 -1
- package/src/client/components/common/provider-icon/glyphs.ts +118 -0
- package/src/client/components/common/provider-icon/index.tsx +85 -0
- package/src/client/components/common/viewport.ts +5 -3
- package/src/client/components/layout/RightActivityBar.tsx +2 -1
- package/src/client/components/layout/desktop-layout/TopNavbar.tsx +21 -4
- package/src/client/components/layout/desktop-layout/WorkspacePanels.tsx +4 -0
- package/src/client/components/layout/desktop-layout/index.tsx +26 -4
- package/src/client/components/mobile/LayoutWrapper.tsx +16 -0
- package/src/client/components/mobile/RightSidebar.tsx +11 -4
- package/src/client/components/mobile/SessionSidebar.tsx +10 -0
- package/src/client/components/mobile/mobile-right-sidebar/FullEditor.tsx +0 -1
- package/src/client/components/mobile/mobile-session-sidebar/Item.tsx +16 -1
- package/src/client/components/mobile/mobile-session-sidebar/List.tsx +3 -0
- package/src/client/components/settings/categories/ProviderSettings.tsx +45 -4
- package/src/client/components/settings/categories/UsageSettings.tsx +22 -7
- package/src/client/components/settings/categories/provider-settings/AddModelModal.tsx +322 -0
- package/src/client/components/settings/categories/provider-settings/AddProviderModal.tsx +152 -56
- package/src/client/components/settings/categories/provider-settings/AuthSection.tsx +52 -1
- package/src/client/components/settings/categories/provider-settings/DeleteProviderModal.tsx +133 -0
- package/src/client/components/settings/categories/provider-settings/DialectFields.tsx +136 -0
- package/src/client/components/settings/categories/provider-settings/EffortLadder.tsx +89 -0
- package/src/client/components/settings/categories/provider-settings/Header.tsx +2 -2
- package/src/client/components/settings/categories/provider-settings/LoginModal.tsx +2 -2
- package/src/client/components/settings/categories/provider-settings/ModelsList.tsx +22 -2
- package/src/client/components/settings/categories/provider-settings/PresetPicker.tsx +82 -0
- package/src/client/components/settings/categories/provider-settings/PriceFields.tsx +107 -0
- package/src/client/components/settings/categories/provider-settings/ReconnectModal.tsx +43 -22
- package/src/client/components/settings/categories/provider-settings/SidebarList.tsx +2 -2
- package/src/client/components/settings/categories/usage-settings/LimitsSection.tsx +115 -0
- package/src/client/components/settings/categories/usage-settings/ProviderCard.tsx +19 -26
- package/src/client/components/settings/categories/usage-settings/ProviderDetail.tsx +29 -22
- package/src/client/components/settings/categories/usage-settings/SidebarList.tsx +60 -48
- package/src/client/components/settings/categories/usage-settings/format.ts +36 -0
- package/src/client/components/settings/categories/usage-settings/providers.ts +52 -28
- package/src/client/components/workspace/browser-panel/AddressBar.tsx +1 -10
- package/src/client/components/workspace/browser-panel/Screencast.tsx +4 -5
- package/src/client/components/workspace/browser-panel/index.tsx +6 -6
- package/src/client/components/workspace/browser-toolbar/index.tsx +22 -12
- package/src/client/components/workspace/chat-timeline/AiMessageFooter.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/GeneratingIndicator.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/ToolCallCard.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Todo.tsx +1 -1
- package/src/client/components/workspace/diff-panel/Toolbar.tsx +71 -38
- package/src/client/components/workspace/diff-panel/index.tsx +139 -53
- package/src/client/components/workspace/editor/CommandPalette.test.ts +242 -0
- package/src/client/components/workspace/editor/CommandPalette.tsx +138 -0
- package/src/client/components/workspace/editor/FindWidget.test.ts +261 -0
- package/src/client/components/workspace/editor/FindWidget.tsx +219 -0
- package/src/client/components/workspace/editor/Tabs.tsx +2 -2
- package/src/client/components/workspace/editor/Toolbar.tsx +129 -26
- package/src/client/components/workspace/editor/index.tsx +180 -62
- package/src/client/components/workspace/file-explorer/Modals.tsx +79 -2
- package/src/client/components/workspace/file-explorer/TreeItem.tsx +43 -113
- package/src/client/components/workspace/model-dropdown/Item.tsx +13 -23
- package/src/client/components/workspace/model-dropdown/Panel.tsx +1 -1
- package/src/client/components/workspace/model-dropdown/Section.tsx +13 -4
- package/src/client/components/workspace/model-dropdown/index.tsx +7 -3
- package/src/client/components/workspace/todo-panel/PhaseGroup.tsx +76 -0
- package/src/client/components/workspace/todo-panel/Row.tsx +69 -0
- package/src/client/components/workspace/todo-panel/index.tsx +161 -0
- package/src/client/components/workspace/usage-panel/ProviderSelect.tsx +10 -5
- package/src/client/components/workspace/usage-panel/index.tsx +36 -18
- package/src/client/data/samples/dialogue-session.ts +1 -1
- package/src/client/data/samples/sample-tools/other.ts +1 -1
- package/src/client/data/settings/provider.ts +141 -9
- package/src/client/hooks/editor/find-harness.test-util.ts +170 -0
- package/src/client/hooks/editor/scroll-container.test.ts +102 -0
- package/src/client/hooks/editor/scroll-container.ts +26 -0
- package/src/client/hooks/editor/use-code-window.ts +2 -20
- package/src/client/hooks/editor/use-editor-find-write.test.ts +170 -0
- package/src/client/hooks/editor/use-editor-find.test.ts +118 -0
- package/src/client/hooks/editor/use-editor-find.ts +321 -0
- package/src/client/hooks/editor/use-editor-history.test.ts +216 -0
- package/src/client/hooks/editor/use-editor-history.ts +134 -0
- package/src/client/hooks/editor/use-file-editor.ts +24 -27
- package/src/client/hooks/editor/use-occurrences.test.ts +236 -0
- package/src/client/hooks/editor/use-occurrences.ts +98 -0
- package/src/client/hooks/models/use-provider-names.ts +1 -1
- package/src/client/hooks/settings/providers/actions.ts +337 -0
- package/src/client/hooks/settings/providers/api.ts +69 -0
- package/src/client/hooks/settings/providers/index.ts +138 -0
- package/src/client/hooks/settings/providers/messages.ts +77 -0
- package/src/client/hooks/settings/useUsageReport.ts +8 -3
- package/src/client/hooks/ui/theme.ts +3 -3
- package/src/client/hooks/workspace/file-tabs.ts +62 -11
- package/src/client/hooks/workspace/file-tree-actions.test.ts +348 -0
- package/src/client/hooks/workspace/file-tree-actions.ts +250 -0
- package/src/client/hooks/workspace/session-todos.ts +102 -0
- package/src/client/stubs/elkjs.ts +6 -1
- package/src/client/tailwind.css +30 -0
- package/src/server/index.ts +20 -2
- package/src/server/lib/assets/font-css.server.ts +86 -0
- package/src/server/lib/assets/fonts.server.ts +117 -0
- package/src/server/lib/bundler/css.ts +116 -0
- package/src/server/lib/lifecycle/shell-route.ts +17 -0
- package/src/server/lib/models/provider-listing.server.ts +257 -0
- package/src/server/lib/models/provider-registry.server.test.ts +122 -0
- package/src/server/lib/models/provider-registry.server.ts +76 -25
- package/src/server/lib/omp/config/models-config.ts +11 -0
- package/src/server/lib/omp/config/models-validation.test.ts +137 -0
- package/src/server/lib/omp/config/models-validation.ts +111 -2
- package/src/server/lib/omp/config/provider-seeds.test.ts +167 -0
- package/src/server/lib/omp/config/provider-seeds.ts +176 -0
- package/src/server/lib/omp/config/providers.ts +94 -100
- package/src/server/lib/omp/core/auth-credentials.ts +45 -0
- package/src/server/lib/omp/session/todos.ts +100 -0
- package/src/server/lib/omp/session/{usage.ts → usage/aggregate.ts} +1 -118
- package/src/server/lib/omp/session/usage/shaping.ts +130 -0
- package/src/server/lib/usage/deepseek.ts +4 -5
- package/src/server/lib/usage/kenari.ts +7 -6
- package/src/server/lib/usage/omp-usage.server.test.ts +126 -0
- package/src/server/lib/usage/omp-usage.server.ts +194 -0
- package/src/server/lib/usage/provider-key.ts +81 -3
- package/src/server/lib/usage/providers.server.test.ts +47 -0
- package/src/server/lib/usage/providers.server.ts +208 -0
- package/src/server/lib/usage/vendor-balance.server.test.ts +104 -0
- package/src/server/lib/usage/vendor-balance.server.ts +284 -0
- package/src/server/plugins/shell.server.ts +56 -0
- package/src/server/plugins/ssr.ts +24 -36
- package/src/server/plugins/static.test.ts +26 -29
- package/src/server/plugins/static.ts +40 -19
- package/src/server/routes/fs/action-create.test.ts +90 -0
- package/src/server/routes/fs/action.ts +23 -0
- package/src/server/routes/omp/index.ts +2 -0
- package/src/server/routes/omp/session-todos.ts +80 -0
- package/src/server/routes/settings/index.ts +2 -0
- package/src/server/routes/settings/provider-model.ts +107 -0
- package/src/server/routes/settings/provider-models.ts +65 -202
- package/src/server/routes/settings/providers.ts +22 -7
- package/src/server/routes/settings/usage.ts +125 -45
- package/src/server/routes/telemetry/tokens.ts +2 -1
- package/src/shared/lib/chat/{todo-parser.ts → todo/parser.ts} +17 -0
- package/src/shared/lib/chat/todo/progress.ts +97 -0
- package/src/shared/lib/chat/todo/snapshot.test.ts +156 -0
- package/src/shared/lib/chat/todo/snapshot.ts +215 -0
- package/src/shared/lib/code/editor/commands.test.ts +155 -0
- package/src/shared/lib/code/editor/commands.ts +260 -0
- package/src/shared/lib/code/editor/edits.test.ts +100 -0
- package/src/shared/lib/code/editor/edits.ts +122 -0
- package/src/shared/lib/code/editor/find-status.test.ts +50 -0
- package/src/shared/lib/code/editor/find-status.ts +36 -0
- package/src/shared/lib/code/editor/find.test.ts +203 -0
- package/src/shared/lib/code/editor/find.ts +224 -0
- package/src/{client/components/common/code-editor → shared/lib/code/editor}/history.test.ts +1 -1
- package/src/shared/lib/code/editor/keymap.test.ts +109 -0
- package/src/shared/lib/code/editor/keymap.ts +151 -0
- package/src/shared/lib/code/editor/layers.test.ts +77 -0
- package/src/shared/lib/code/editor/layers.ts +67 -0
- package/src/shared/lib/code/editor/line-edits.test.ts +131 -0
- package/src/shared/lib/code/editor/line-edits.ts +159 -0
- package/src/shared/lib/code/editor/lines.test.ts +81 -0
- package/src/shared/lib/code/editor/lines.ts +83 -0
- package/src/shared/lib/code/editor/marks.test.ts +86 -0
- package/src/shared/lib/code/editor/marks.ts +106 -0
- package/src/shared/lib/code/editor/occurrences.test.ts +117 -0
- package/src/shared/lib/code/editor/occurrences.ts +111 -0
- package/src/shared/lib/code/editor/palette.test.ts +91 -0
- package/src/shared/lib/code/editor/palette.ts +92 -0
- package/src/shared/lib/code/editor/reset-css.test.ts +35 -0
- package/src/shared/lib/code/editor/reset-css.ts +32 -0
- package/src/shared/lib/code/editor/text-commands.test.ts +178 -0
- package/src/shared/lib/code/editor/text-commands.ts +154 -0
- package/src/shared/lib/code/syntax-highlight.test.ts +75 -0
- package/src/shared/lib/code/syntax-highlight.ts +29 -17
- package/src/shared/lib/code/windowed-highlight.ts +52 -1
- package/src/shared/lib/fs/diff-parser.test.ts +116 -0
- package/src/shared/lib/fs/diff-parser.ts +86 -33
- package/src/shared/lib/models/{provider-connection.ts → provider/connection.ts} +37 -0
- package/src/shared/lib/models/provider/dialect.ts +179 -0
- package/src/shared/lib/models/provider/glyph.test.ts +116 -0
- package/src/shared/lib/models/provider/glyph.ts +200 -0
- package/src/shared/lib/models/{provider-models.ts → provider/models.ts} +91 -6
- package/src/shared/lib/models/provider/presets.test.ts +172 -0
- package/src/shared/lib/models/provider/presets.ts +83 -0
- package/src/shared/lib/ui/key-binding.test.ts +115 -0
- package/src/shared/lib/ui/key-binding.ts +143 -0
- package/src/shared/lib/util/platform.test.ts +87 -0
- package/src/shared/lib/util/platform.ts +30 -0
- package/src/shared/lib/workspace/file-tab-id.ts +29 -0
- package/src/shared/lib/workspace/keymap.test.ts +82 -0
- package/src/shared/lib/workspace/keymap.ts +30 -0
- package/src/shared/lib/workspace/refresh-cadence.ts +9 -0
- package/src/shared/lib/workspace/right-panels.ts +8 -0
- package/src/shared/lib/workspace/session-state/store.ts +0 -1
- package/src/shared/types/index.ts +1 -0
- package/src/shared/types/settings/provider.ts +81 -0
- package/src/shared/types/settings/usage.ts +88 -14
- package/src/shared/types/todo.ts +108 -0
- package/tsconfig.json +3 -1
- package/dist/client/static/css/index.5f630421b7.css +0 -2
- package/dist/client/static/font/KaTeX_AMS-Regular.a79f1c3119.woff2 +0 -0
- package/dist/client/static/font/KaTeX_Caligraphic-Bold.ec17d13264.woff2 +0 -0
- package/dist/client/static/font/KaTeX_Caligraphic-Regular.55fac25845.woff2 +0 -0
- package/dist/client/static/font/KaTeX_Fraktur-Bold.d42a5579b0.woff2 +0 -0
- package/dist/client/static/font/KaTeX_Fraktur-Regular.d3c882a649.woff2 +0 -0
- package/dist/client/static/font/KaTeX_Main-Bold.c3fb5ac22f.woff2 +0 -0
- package/dist/client/static/font/KaTeX_Main-BoldItalic.6f2bb1dff2.woff2 +0 -0
- package/dist/client/static/font/KaTeX_Main-Italic.8916142bec.woff2 +0 -0
- package/dist/client/static/font/KaTeX_Main-Regular.0462f03bdf.woff2 +0 -0
- package/dist/client/static/font/KaTeX_Math-BoldItalic.572d331f69.woff2 +0 -0
- package/dist/client/static/font/KaTeX_Math-Italic.f28c23acad.woff2 +0 -0
- package/dist/client/static/font/KaTeX_SansSerif-Bold.8c5b5494b6.woff2 +0 -0
- package/dist/client/static/font/KaTeX_SansSerif-Italic.3b1e59b3ba.woff2 +0 -0
- package/dist/client/static/font/KaTeX_SansSerif-Regular.ba21ed5f84.woff2 +0 -0
- package/dist/client/static/font/KaTeX_Script-Regular.03e9641d6f.woff2 +0 -0
- package/dist/client/static/font/KaTeX_Size1-Regular.eae34984b3.woff2 +0 -0
- package/dist/client/static/font/KaTeX_Size2-Regular.5916a24fa3.woff2 +0 -0
- package/dist/client/static/font/KaTeX_Size4-Regular.10d95fd3a2.woff2 +0 -0
- package/dist/client/static/font/KaTeX_Typewriter-Regular.a8709e3622.woff2 +0 -0
- package/dist/client/static/font/fira-code-latin-400-normal.2655b10c55.woff2 +0 -0
- package/dist/client/static/font/fira-code-latin-500-normal.92a991f204.woff2 +0 -0
- package/dist/client/static/font/fira-code-latin-600-normal.43788eb7f1.woff2 +0 -0
- package/dist/client/static/font/fira-code-latin-700-normal.2667215d33.woff2 +0 -0
- package/dist/client/static/js/77.0d81c74cf0.js +0 -139
- package/dist/client/static/js/77.0d81c74cf0.js.LICENSE.txt +0 -8
- package/dist/client/static/js/async/0.8e59f2eb5b.js +0 -1
- package/dist/client/static/js/async/0k.5852e6b4fa.js +0 -1
- package/dist/client/static/js/async/0w.9ed36d5860.js +0 -1
- package/dist/client/static/js/async/1.f387c12b63.js +0 -1
- package/dist/client/static/js/async/12.d091f91c99.js +0 -1
- package/dist/client/static/js/async/13.8f810a8a6c.js +0 -1
- package/dist/client/static/js/async/19.6fe909d55a.js +0 -160
- package/dist/client/static/js/async/1b.23f1141a38.js +0 -1
- package/dist/client/static/js/async/1k.973e8e21fc.js +0 -2
- package/dist/client/static/js/async/1k.973e8e21fc.js.LICENSE.txt +0 -11
- package/dist/client/static/js/async/1p.0d5cddda96.js +0 -1
- package/dist/client/static/js/async/2.b589f1733b.js +0 -1
- package/dist/client/static/js/async/2v.96165101de.js +0 -1
- package/dist/client/static/js/async/3.0cacc08423.js +0 -1
- package/dist/client/static/js/async/37.b28b2f61cd.js +0 -1
- package/dist/client/static/js/async/3d.5085fb913f.js +0 -1
- package/dist/client/static/js/async/3j.357c80ff38.js +0 -2
- package/dist/client/static/js/async/3j.357c80ff38.js.LICENSE.txt +0 -11
- package/dist/client/static/js/async/3p.bcf32a0983.js +0 -1
- package/dist/client/static/js/async/3r.3a69e98ee0.js +0 -64
- package/dist/client/static/js/async/3u.1228460e2a.js +0 -1
- package/dist/client/static/js/async/3y.3530b824ad.js +0 -198
- package/dist/client/static/js/async/3y.3530b824ad.js.LICENSE.txt +0 -5
- package/dist/client/static/js/async/4.9442eeb472.js +0 -1
- package/dist/client/static/js/async/4e.678285ca55.js +0 -1
- package/dist/client/static/js/async/4k.33a0c7eeb4.js +0 -1
- package/dist/client/static/js/async/4m.928a1dde85.js +0 -31
- package/dist/client/static/js/async/4m.928a1dde85.js.LICENSE.txt +0 -11
- package/dist/client/static/js/async/4q.aad20dab25.js +0 -1
- package/dist/client/static/js/async/5.ebaf8b89cc.js +0 -36
- package/dist/client/static/js/async/51.95bcae98af.js +0 -2
- package/dist/client/static/js/async/51.95bcae98af.js.LICENSE.txt +0 -6
- package/dist/client/static/js/async/5b.d88304bc13.js +0 -1
- package/dist/client/static/js/async/5j.d6407c4248.js +0 -287
- package/dist/client/static/js/async/5o.88316d4460.js +0 -62
- package/dist/client/static/js/async/6.f034c9b528.js +0 -1
- package/dist/client/static/js/async/66.5dfa29f957.js +0 -93
- package/dist/client/static/js/async/6o.5b1a06a382.js +0 -1
- package/dist/client/static/js/async/7.e4a9288dd0.js +0 -1
- package/dist/client/static/js/async/73.308dff4da8.js +0 -1
- package/dist/client/static/js/async/7e.a1cc9bfd88.js +0 -1
- package/dist/client/static/js/async/7g.a7814350c3.js +0 -1
- package/dist/client/static/js/async/7l.fadbbc0583.js +0 -1
- package/dist/client/static/js/async/8.5067439d8c.js +0 -1
- package/dist/client/static/js/async/8j.ea110663fb.js +0 -1
- package/dist/client/static/js/async/a.bce4542392.js +0 -1
- package/dist/client/static/js/async/aa.65d3852576.js +0 -1
- package/dist/client/static/js/async/ar.9303e5f2e8.js +0 -2
- package/dist/client/static/js/async/ar.9303e5f2e8.js.LICENSE.txt +0 -11
- package/dist/client/static/js/async/az.d656062b0f.js +0 -1
- package/dist/client/static/js/async/b.b4f6f06515.js +0 -1
- package/dist/client/static/js/async/bi.09688ba75c.js +0 -1
- package/dist/client/static/js/async/bq.586bc738d1.js +0 -1
- package/dist/client/static/js/async/c.797d933882.js +0 -1
- package/dist/client/static/js/async/c0.0af1e640d3.js +0 -24
- package/dist/client/static/js/async/ca.8a52cfd447.js +0 -1
- package/dist/client/static/js/async/cf.d34fff5d67.js +0 -1
- package/dist/client/static/js/async/ct.b74928f7a3.js +0 -1
- package/dist/client/static/js/async/cx.3cb0242a3a.js +0 -226
- package/dist/client/static/js/async/d.a5fc8fe1b3.js +0 -1
- package/dist/client/static/js/async/da.f62c70f6c8.js +0 -1
- package/dist/client/static/js/async/dp.1725d6432c.js +0 -1
- package/dist/client/static/js/async/e.93214d622b.js +0 -79
- package/dist/client/static/js/async/f.ab50467719.js +0 -19
- package/dist/client/static/js/async/f.ab50467719.js.LICENSE.txt +0 -12
- package/dist/client/static/js/async/f7.46971e9d6d.js +0 -2
- package/dist/client/static/js/async/f7.46971e9d6d.js.LICENSE.txt +0 -6
- package/dist/client/static/js/async/f8.bbf0dbae70.js +0 -1
- package/dist/client/static/js/async/g.cb81980498.js +0 -2
- package/dist/client/static/js/async/g.cb81980498.js.LICENSE.txt +0 -11
- package/dist/client/static/js/async/h.4e790471e4.js +0 -27
- package/dist/client/static/js/async/h1.393f066d09.js +0 -1
- package/dist/client/static/js/async/h3.216e9798ab.js +0 -148
- package/dist/client/static/js/async/hd.0da931b622.js +0 -1
- package/dist/client/static/js/async/hk.ba7fb04d41.js +0 -1
- package/dist/client/static/js/async/hn.b645041e00.js +0 -1
- package/dist/client/static/js/async/ho.475a5e1ae4.js +0 -1
- package/dist/client/static/js/async/hp.e9fe2e395a.js +0 -2
- package/dist/client/static/js/async/hp.e9fe2e395a.js.LICENSE.txt +0 -17
- package/dist/client/static/js/async/hs.e7c59d8090.js +0 -41
- package/dist/client/static/js/async/i.7c148e8440.js +0 -1
- package/dist/client/static/js/async/id.573df20f29.js +0 -1
- package/dist/client/static/js/async/j.ab925882d8.js +0 -1
- package/dist/client/static/js/async/jd.63886a1f09.js +0 -1
- package/dist/client/static/js/async/jg.d86ebd4013.js +0 -86
- package/dist/client/static/js/async/jl.874d352278.js +0 -1
- package/dist/client/static/js/async/jll.11313b455a.js +0 -1
- package/dist/client/static/js/async/js.67182759ef.js +0 -1
- package/dist/client/static/js/async/jsc.23b70d6f40.js +0 -1
- package/dist/client/static/js/async/jse.334588ff5d.js +0 -1
- package/dist/client/static/js/async/jz.72eb929106.js +0 -77
- package/dist/client/static/js/async/k.3210286401.js +0 -217
- package/dist/client/static/js/async/ka.c1990ecaa3.js +0 -115
- package/dist/client/static/js/async/katex-vendor.de6a87c308.js +0 -1
- package/dist/client/static/js/async/ku.29c8a59d0c.js +0 -1
- package/dist/client/static/js/async/ky.8dab1dade0.js +0 -1
- package/dist/client/static/js/async/l.12dd34e1be.js +0 -1
- package/dist/client/static/js/async/l9.949710adaf.js +0 -83
- package/dist/client/static/js/async/l9.949710adaf.js.LICENSE.txt +0 -13
- package/dist/client/static/js/async/ls.9d9a01026c.js +0 -104
- package/dist/client/static/js/async/m.eb2e6752e2.js +0 -28
- package/dist/client/static/js/async/m.eb2e6752e2.js.LICENSE.txt +0 -11
- package/dist/client/static/js/async/m3.d2b05f9604.js +0 -2
- package/dist/client/static/js/async/m3.d2b05f9604.js.LICENSE.txt +0 -6
- package/dist/client/static/js/async/ma.2c261b04dd.js +0 -2
- package/dist/client/static/js/async/ma.2c261b04dd.js.LICENSE.txt +0 -6
- package/dist/client/static/js/async/me.8ace414f80.js +0 -23
- package/dist/client/static/js/async/ms.98960af4eb.js +0 -67
- package/dist/client/static/js/async/ms.98960af4eb.js.LICENSE.txt +0 -12
- package/dist/client/static/js/async/mt.0352e976d8.js +0 -1
- package/dist/client/static/js/async/n.a9f1c51701.js +0 -1
- package/dist/client/static/js/async/na.a36cd532d6.js +0 -1
- package/dist/client/static/js/async/nk.fc7e58325e.js +0 -1
- package/dist/client/static/js/async/o.36353dfb88.js +0 -1
- package/dist/client/static/js/async/oc.b73042e8bd.js +0 -8
- package/dist/client/static/js/async/og.8eb577893a.js +0 -193
- package/dist/client/static/js/async/p.48ecfcd14e.js +0 -1
- package/dist/client/static/js/async/px.fc6877924b.js +0 -1
- package/dist/client/static/js/async/q.22588845a9.js +0 -21
- package/dist/client/static/js/async/q.22588845a9.js.LICENSE.txt +0 -6
- package/dist/client/static/js/async/q5.97dc1481b6.js +0 -286
- package/dist/client/static/js/async/qs.2a9ddb3c72.js +0 -1
- package/dist/client/static/js/async/r.51010ad87c.js +0 -1
- package/dist/client/static/js/async/rd.cb6bf495bb.js +0 -2
- package/dist/client/static/js/async/rd.cb6bf495bb.js.LICENSE.txt +0 -4
- package/dist/client/static/js/async/s.0f395cdda5.js +0 -94
- package/dist/client/static/js/async/t.4dca0e2ba8.js +0 -1
- package/dist/client/static/js/async/t9.d44f57d518.js +0 -1
- package/dist/client/static/js/async/ta.973534bbec.js +0 -1
- package/dist/client/static/js/async/tr.e878658140.js +0 -309
- package/dist/client/static/js/async/u.0871ac5b22.js +0 -1
- package/dist/client/static/js/async/ud.3065bfee31.js +0 -2
- package/dist/client/static/js/async/ud.3065bfee31.js.LICENSE.txt +0 -4
- package/dist/client/static/js/async/up.ea990da0ff.js +0 -32
- package/dist/client/static/js/async/uw.8890abbabc.js +0 -1
- package/dist/client/static/js/async/v.7d28d3c241.js +0 -34
- package/dist/client/static/js/async/vp.9b13bf8610.js +0 -1
- package/dist/client/static/js/async/vt.42416b707d.js +0 -1
- package/dist/client/static/js/async/w.08ac210f60.js +0 -1
- package/dist/client/static/js/async/wt.ad92393a90.js +0 -1
- package/dist/client/static/js/async/x.563f72ca6b.js +0 -1
- package/dist/client/static/js/async/x0.475516418f.js +0 -1
- package/dist/client/static/js/async/x1.da8687159b.js +0 -90
- package/dist/client/static/js/async/xe.da8dcc2015.js +0 -2
- package/dist/client/static/js/async/xe.da8dcc2015.js.LICENSE.txt +0 -11
- package/dist/client/static/js/async/xl.a3c562a58c.js +0 -1
- package/dist/client/static/js/async/xn.6510c0abe2.js +0 -2
- package/dist/client/static/js/async/xn.6510c0abe2.js.LICENSE.txt +0 -6
- package/dist/client/static/js/async/xn1.83a7784fe1.js +0 -10
- package/dist/client/static/js/async/xn1.83a7784fe1.js.LICENSE.txt +0 -11
- package/dist/client/static/js/async/xnl.feb0021e50.js +0 -2
- package/dist/client/static/js/async/xnl.feb0021e50.js.LICENSE.txt +0 -12
- package/dist/client/static/js/async/y.1a9ed7a5d8.js +0 -1
- package/dist/client/static/js/async/y6.43c57defe4.js +0 -1
- package/dist/client/static/js/async/yb.8c1342401d.js +0 -1
- package/dist/client/static/js/async/ybq.4491f2f2dc.js +0 -1
- package/dist/client/static/js/async/yg.35bebd6d0c.js +0 -149
- package/dist/client/static/js/async/yq.917ddd7ba2.js +0 -1
- package/dist/client/static/js/async/ys.00687cf82d.js +0 -38
- package/dist/client/static/js/async/yv.d99d829136.js +0 -1
- package/dist/client/static/js/async/z.56f61a4374.js +0 -1
- package/dist/client/static/js/async/zi.5fdb07b86a.js +0 -24
- package/dist/client/static/js/async/zj.654f37e8ff.js +0 -1
- package/dist/client/static/js/async/zn.966d6f1cc6.js +0 -1
- package/dist/client/static/js/async/zo.26213b40c0.js +0 -1
- package/dist/client/static/js/async/zx.e9f4105e00.js +0 -1
- package/dist/client/static/js/index.e6a257402a.js +0 -38
- package/dist/client/static/js/index.e6a257402a.js.LICENSE.txt +0 -4
- package/dist/client/static/js/markdown-vendor.71e43278b3.js +0 -144
- package/dist/client/static/js/shiki-vendor.cb8452ddcd.js +0 -1
- package/src/client/components/settings/categories/provider-settings/Icons.tsx +0 -35
- package/src/client/hooks/settings/providers.ts +0 -326
- package/src/server/plugins/dev-assets.ts +0 -49
- package/src/shared/lib/code/editor-utils.ts +0 -16
- package/src/shared/lib/models/provider-presets.ts +0 -29
- /package/dist/client/{apple-touch-icon.png → static/apple-touch-icon-dskx5sr3.png} +0 -0
- /package/dist/client/{icon-192x192.png → static/icon-192x192-6gn5cr2f.png} +0 -0
- /package/dist/client/{icon.svg → static/icon-d07z9dtz.svg} +0 -0
- /package/dist/client/{manifest.webmanifest → static/manifest-bnyy75kt.webmanifest} +0 -0
- /package/{dist/client → public}/icon-512x512.png +0 -0
- /package/{dist/client → public}/icon-maskable-512x512.png +0 -0
- /package/{dist/client → public}/sw.js +0 -0
- /package/src/{client/components/common/code-editor → shared/lib/code/editor}/history.ts +0 -0
- /package/src/shared/lib/models/{provider-cleanup.ts → provider/cleanup.ts} +0 -0
- /package/src/shared/lib/models/{provider-label.ts → provider/label.ts} +0 -0
|
@@ -1,198 +0,0 @@
|
|
|
1
|
-
/*! LICENSE: 3y.3530b824ad.js.LICENSE.txt */
|
|
2
|
-
(self.rspackChunkompchamber=self.rspackChunkompchamber||[]).push([["3y"],{XQ(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BLANK_URL=e.relativeFirstCharacters=e.whitespaceEscapeCharsRegex=e.urlSchemeRegex=e.ctrlCharactersRegex=e.htmlCtrlEntityRegex=e.htmlEntitiesRegex=e.invalidProtocolRegex=void 0,e.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,e.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,e.htmlCtrlEntityRegex=/&(newline|tab);/gi,e.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,e.urlSchemeRegex=/^.+(:|:)/gim,e.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,e.relativeFirstCharacters=[".","/"],e.BLANK_URL="about:blank"},tP(t,e,r){"use strict";e.J=function(t){if(!t)return i.BLANK_URL;var e,r=o(t.trim());do e=(r=o(r=r.replace(i.ctrlCharactersRegex,"").replace(i.htmlEntitiesRegex,function(t,e){return String.fromCharCode(e)}).replace(i.htmlCtrlEntityRegex,"").replace(i.ctrlCharactersRegex,"").replace(i.whitespaceEscapeCharsRegex,"").trim())).match(i.ctrlCharactersRegex)||r.match(i.htmlEntitiesRegex)||r.match(i.htmlCtrlEntityRegex)||r.match(i.whitespaceEscapeCharsRegex);while(e&&e.length>0)var a=r;if(!a)return i.BLANK_URL;if(i.relativeFirstCharacters.indexOf(a[0])>-1)return a;var s=a.trimStart(),n=s.match(i.urlSchemeRegex);if(!n)return a;var l=n[0].toLowerCase().trim();if(i.invalidProtocolRegex.test(l))return i.BLANK_URL;var h=s.replace(/\\/g,"/");if("mailto:"===l||l.includes("://"))return h;if("http:"===l||"https:"===l){if(!URL.canParse(h))return i.BLANK_URL;var c=new URL(h);return c.protocol=c.protocol.toLowerCase(),c.hostname=c.hostname.toLowerCase(),c.toString()}return h};var i=r("XQ");function o(t){try{return decodeURIComponent(t)}catch(e){return t}}},h0(t){t.exports=function(){"use strict";var t="millisecond",e="second",r="minute",i="hour",o="week",a="month",s="quarter",n="year",l="date",h="Invalid Date",c=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,d=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,u=function(t,e,r){var i=String(t);return!i||i.length>=e?t:""+Array(e+1-i.length).join(r)+t},g="en",p={};p[g]={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],r=t%100;return"["+t+(e[(r-20)%10]||e[r]||e[0])+"]"}};var f="$isDayjsObject",y=function(t){return t instanceof b||!(!t||!t[f])},m=function t(e,r,i){var o;if(!e)return g;if("string"==typeof e){var a=e.toLowerCase();p[a]&&(o=a),r&&(p[a]=r,o=a);var s=e.split("-");if(!o&&s.length>1)return t(s[0])}else{var n=e.name;p[n]=e,o=n}return!i&&o&&(g=o),o||!i&&g},C=function(t,e){if(y(t))return t.clone();var r="object"==typeof e?e:{};return r.date=t,r.args=arguments,new b(r)},x={s:u,z:function(t){var e=-t.utcOffset(),r=Math.abs(e);return(e<=0?"+":"-")+u(Math.floor(r/60),2,"0")+":"+u(r%60,2,"0")},m:function t(e,r){if(e.date()<r.date())return-t(r,e);var i=12*(r.year()-e.year())+(r.month()-e.month()),o=e.clone().add(i,a),s=r-o<0,n=e.clone().add(i+(s?-1:1),a);return+(-(i+(r-o)/(s?o-n:n-o))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(h){return({M:a,y:n,w:o,d:"day",D:l,h:i,m:r,s:e,ms:t,Q:s})[h]||String(h||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}};x.l=m,x.i=y,x.w=function(t,e){return C(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var b=function(){function u(t){this.$L=m(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[f]=!0}var g=u.prototype;return g.parse=function(t){this.$d=function(t){var e=t.date,r=t.utc;if(null===e)return new Date(0/0);if(x.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var i=e.match(c);if(i){var o=i[2]-1||0,a=(i[7]||"0").substring(0,3);return r?new Date(Date.UTC(i[1],o,i[3]||1,i[4]||0,i[5]||0,i[6]||0,a)):new Date(i[1],o,i[3]||1,i[4]||0,i[5]||0,i[6]||0,a)}}return new Date(e)}(t),this.init()},g.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},g.$utils=function(){return x},g.isValid=function(){return this.$d.toString()!==h},g.isSame=function(t,e){var r=C(t);return this.startOf(e)<=r&&r<=this.endOf(e)},g.isAfter=function(t,e){return C(t)<this.startOf(e)},g.isBefore=function(t,e){return this.endOf(e)<C(t)},g.$g=function(t,e,r){return x.u(t)?this[e]:this.set(r,t)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(t,s){var h=this,c=!!x.u(s)||s,d=x.p(t),u=function(t,e){var r=x.w(h.$u?Date.UTC(h.$y,e,t):new Date(h.$y,e,t),h);return c?r:r.endOf("day")},g=function(t,e){return x.w(h.toDate()[t].apply(h.toDate("s"),(c?[0,0,0,0]:[23,59,59,999]).slice(e)),h)},p=this.$W,f=this.$M,y=this.$D,m="set"+(this.$u?"UTC":"");switch(d){case n:return c?u(1,0):u(31,11);case a:return c?u(1,f):u(0,f+1);case o:var C=this.$locale().weekStart||0,b=(p<C?p+7:p)-C;return u(c?y-b:y+(6-b),f);case"day":case l:return g(m+"Hours",0);case i:return g(m+"Minutes",1);case r:return g(m+"Seconds",2);case e:return g(m+"Milliseconds",3);default:return this.clone()}},g.endOf=function(t){return this.startOf(t,!1)},g.$set=function(o,s){var h,c=x.p(o),d="set"+(this.$u?"UTC":""),u=((h={}).day=d+"Date",h[l]=d+"Date",h[a]=d+"Month",h[n]=d+"FullYear",h[i]=d+"Hours",h[r]=d+"Minutes",h[e]=d+"Seconds",h[t]=d+"Milliseconds",h)[c],g="day"===c?this.$D+(s-this.$W):s;if(c===a||c===n){var p=this.clone().set(l,1);p.$d[u](g),p.init(),this.$d=p.set(l,Math.min(this.$D,p.daysInMonth())).$d}else u&&this.$d[u](g);return this.init(),this},g.set=function(t,e){return this.clone().$set(t,e)},g.get=function(t){return this[x.p(t)]()},g.add=function(t,s){var l,h=this;t=Number(t);var c=x.p(s),d=function(e){var r=C(h);return x.w(r.date(r.date()+Math.round(e*t)),h)};if(c===a)return this.set(a,this.$M+t);if(c===n)return this.set(n,this.$y+t);if("day"===c)return d(1);if(c===o)return d(7);var u=((l={})[r]=6e4,l[i]=36e5,l[e]=1e3,l)[c]||1,g=this.$d.getTime()+t*u;return x.w(g,this)},g.subtract=function(t,e){return this.add(-1*t,e)},g.format=function(t){var e=this,r=this.$locale();if(!this.isValid())return r.invalidDate||h;var i=t||"YYYY-MM-DDTHH:mm:ssZ",o=x.z(this),a=this.$H,s=this.$m,n=this.$M,l=r.weekdays,c=r.months,u=r.meridiem,g=function(t,r,o,a){return t&&(t[r]||t(e,i))||o[r].slice(0,a)},p=function(t){return x.s(a%12||12,t,"0")},f=u||function(t,e,r){var i=t<12?"AM":"PM";return r?i.toLowerCase():i};return i.replace(d,function(t,i){return i||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return x.s(e.$y,4,"0");case"M":return n+1;case"MM":return x.s(n+1,2,"0");case"MMM":return g(r.monthsShort,n,c,3);case"MMMM":return g(c,n);case"D":return e.$D;case"DD":return x.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return g(r.weekdaysMin,e.$W,l,2);case"ddd":return g(r.weekdaysShort,e.$W,l,3);case"dddd":return l[e.$W];case"H":return String(a);case"HH":return x.s(a,2,"0");case"h":return p(1);case"hh":return p(2);case"a":return f(a,s,!0);case"A":return f(a,s,!1);case"m":return String(s);case"mm":return x.s(s,2,"0");case"s":return String(e.$s);case"ss":return x.s(e.$s,2,"0");case"SSS":return x.s(e.$ms,3,"0");case"Z":return o}return null}(t)||o.replace(":","")})},g.utcOffset=function(){return-(15*Math.round(this.$d.getTimezoneOffset()/15))},g.diff=function(t,l,h){var c,d=this,u=x.p(l),g=C(t),p=(g.utcOffset()-this.utcOffset())*6e4,f=this-g,y=function(){return x.m(d,g)};switch(u){case n:c=y()/12;break;case a:c=y();break;case s:c=y()/3;break;case o:c=(f-p)/6048e5;break;case"day":c=(f-p)/864e5;break;case i:c=f/36e5;break;case r:c=f/6e4;break;case e:c=f/1e3;break;default:c=f}return h?c:x.a(c)},g.daysInMonth=function(){return this.endOf(a).$D},g.$locale=function(){return p[this.$L]},g.locale=function(t,e){if(!t)return this.$L;var r=this.clone(),i=m(t,e,!0);return i&&(r.$L=i),r},g.clone=function(){return x.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},u}(),k=b.prototype;return C.prototype=k,[["$ms",t],["$s",e],["$m",r],["$H",i],["$W","day"],["$M",a],["$y",n],["$D",l]].forEach(function(t){k[t[1]]=function(e){return this.$g(e,t[0],t[1])}}),C.extend=function(t,e){return t.$i||(t(e,b,C),t.$i=!0),C},C.locale=m,C.isDayjs=y,C.unix=function(t){return C(1e3*t)},C.en=p[g],C.Ls=p,C.p={},C}()},nh(t,e,r){"use strict";function i(t,e,r){if(t&&t.length){let[i,o]=e,a=Math.PI/180*r,s=Math.cos(a),n=Math.sin(a);for(let e of t){let[t,r]=e;e[0]=(t-i)*s-(r-o)*n+i,e[1]=(t-i)*n+(r-o)*s+o}}}function o(t,e){var r;let o=e.hachureAngle+90,a=e.hachureGap;a<0&&(a=4*e.strokeWidth),a=Math.round(Math.max(a,.1));let s=1;return e.roughness>=1&&((null==(r=e.randomizer)?void 0:r.next())||Math.random())>.7&&(s=a),function(t,e,r,o=1){let a=Math.max(e,.1),s=t[0]&&t[0][0]&&"number"==typeof t[0][0]?[t]:t,n=[0,0];if(r)for(let t of s)i(t,n,r);let l=function(t,e,r){let i=[];for(let e of t){var o,a;let t=[...e];o=t[0],a=t[t.length-1],o[0]===a[0]&&o[1]===a[1]||t.push([t[0][0],t[0][1]]),t.length>2&&i.push(t)}let s=[];e=Math.max(e,.1);let n=[];for(let t of i)for(let e=0;e<t.length-1;e++){let r=t[e],i=t[e+1];if(r[1]!==i[1]){let t=Math.min(r[1],i[1]);n.push({ymin:t,ymax:Math.max(r[1],i[1]),x:t===r[1]?r[0]:i[0],islope:(i[0]-r[0])/(i[1]-r[1])})}}if(n.sort((t,e)=>t.ymin<e.ymin?-1:t.ymin>e.ymin?1:t.x<e.x?-1:t.x>e.x?1:t.ymax===e.ymax?0:(t.ymax-e.ymax)/Math.abs(t.ymax-e.ymax)),!n.length)return s;let l=[],h=n[0].ymin,c=0;for(;l.length||n.length;){if(n.length){let t=-1;for(let e=0;e<n.length&&!(n[e].ymin>h);e++)t=e;n.splice(0,t+1).forEach(t=>{l.push({s:h,edge:t})})}if((l=l.filter(t=>!(t.edge.ymax<=h))).sort((t,e)=>t.edge.x===e.edge.x?0:(t.edge.x-e.edge.x)/Math.abs(t.edge.x-e.edge.x)),(1!==r||c%e==0)&&l.length>1)for(let t=0;t<l.length;t+=2){let e=t+1;if(e>=l.length)break;let r=l[t].edge,i=l[e].edge;s.push([[Math.round(r.x),h],[Math.round(i.x),h]])}h+=r,l.forEach(t=>{t.edge.x=t.edge.x+r*t.edge.islope}),c++}return s}(s,a,o);if(r){let t;for(let t of s)i(t,n,-r);t=[],l.forEach(e=>t.push(...e)),i(t,n,-r)}return l}(t,a,o,s||1)}class a{constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){let r=o(t,e);return{type:"fillSketch",ops:this.renderLines(r,e)}}renderLines(t,e){let r=[];for(let i of t)r.push(...this.helper.doubleLineOps(i[0][0],i[0][1],i[1][0],i[1][1],e));return r}}function s(t){let e=t[0],r=t[1];return Math.sqrt(Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2))}class n extends a{fillPolygons(t,e){let r=e.hachureGap;r<0&&(r=4*e.strokeWidth);let i=o(t,Object.assign({},e,{hachureGap:r=Math.max(r,.1)})),a=Math.PI/180*e.hachureAngle,n=[],l=.5*r*Math.cos(a),h=.5*r*Math.sin(a);for(let[t,e]of i)s([t,e])&&n.push([[t[0]-l,t[1]+h],[...e]],[[t[0]+l,t[1]-h],[...e]]);return{type:"fillSketch",ops:this.renderLines(n,e)}}}class l extends a{fillPolygons(t,e){let r=this._fillPolygons(t,e),i=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),o=this._fillPolygons(t,i);return r.ops=r.ops.concat(o.ops),r}}class h{constructor(t){this.helper=t}fillPolygons(t,e){let r=o(t,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(r,e)}dotsOnLines(t,e){let r=[],i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.max(i,.1);let o=e.fillWeight;o<0&&(o=e.strokeWidth/2);let a=i/4;for(let n of t){let t=s(n),l=Math.ceil(t/i)-1,h=t-l*i,c=(n[0][0]+n[1][0])/2-i/4,d=Math.min(n[0][1],n[1][1]);for(let t=0;t<l;t++){let s=c-a+2*Math.random()*a,n=d+h+t*i-a+2*Math.random()*a,l=this.helper.ellipse(s,n,o,o,e);r.push(...l.ops)}}return{type:"fillSketch",ops:r}}}class c{constructor(t){this.helper=t}fillPolygons(t,e){let r=o(t,e);return{type:"fillSketch",ops:this.dashedLine(r,e)}}dashedLine(t,e){let r=e.dashOffset<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashOffset,i=e.dashGap<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashGap,o=[];return t.forEach(t=>{let a=s(t),n=Math.floor(a/(r+i)),l=(a+i-n*(r+i))/2,h=t[0],c=t[1];h[0]>c[0]&&(h=t[1],c=t[0]);let d=Math.atan((c[1]-h[1])/(c[0]-h[0]));for(let t=0;t<n;t++){let a=t*(r+i),s=a+r,n=[h[0]+a*Math.cos(d)+l*Math.cos(d),h[1]+a*Math.sin(d)+l*Math.sin(d)],c=[h[0]+s*Math.cos(d)+l*Math.cos(d),h[1]+s*Math.sin(d)+l*Math.sin(d)];o.push(...this.helper.doubleLineOps(n[0],n[1],c[0],c[1],e))}}),o}}class d{constructor(t){this.helper=t}fillPolygons(t,e){let r=e.hachureGap<0?4*e.strokeWidth:e.hachureGap,i=e.zigzagOffset<0?r:e.zigzagOffset,a=o(t,e=Object.assign({},e,{hachureGap:r+i}));return{type:"fillSketch",ops:this.zigzagLines(a,i,e)}}zigzagLines(t,e,r){let i=[];return t.forEach(t=>{let o=Math.round(s(t)/(2*e)),a=t[0],n=t[1];a[0]>n[0]&&(a=t[1],n=t[0]);let l=Math.atan((n[1]-a[1])/(n[0]-a[0]));for(let t=0;t<o;t++){let o=2*t*e,s=2*(t+1)*e,n=Math.sqrt(2*Math.pow(e,2)),h=[a[0]+o*Math.cos(l),a[1]+o*Math.sin(l)],c=[a[0]+s*Math.cos(l),a[1]+s*Math.sin(l)],d=[h[0]+n*Math.cos(l+Math.PI/4),h[1]+n*Math.sin(l+Math.PI/4)];i.push(...this.helper.doubleLineOps(h[0],h[1],d[0],d[1],r),...this.helper.doubleLineOps(d[0],d[1],c[0],c[1],r))}}),i}}let u={};class g{constructor(t){this.seed=t}next(){return this.seed?(0x7fffffff&(this.seed=Math.imul(48271,this.seed)))/0x80000000:Math.random()}}let p={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 f(t){let e=[],r=function(t){let e=[];for(;""!==t;)if(t.match(/^([ \t\r\n,]+)/))t=t.substr(RegExp.$1.length);else if(t.match(/^([aAcChHlLmMqQsStTvVzZ])/))e[e.length]={type:0,text:RegExp.$1},t=t.substr(RegExp.$1.length);else{if(!t.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];e[e.length]={type:1,text:`${parseFloat(RegExp.$1)}`},t=t.substr(RegExp.$1.length)}return e[e.length]={type:2,text:""},e}(t),i="BOD",o=0,a=r[0];for(;2!==a.type;){let s=0,n=[];if("BOD"===i){if("M"!==a.text&&"m"!==a.text)return f("M0,0"+t);o++,s=p[a.text],i=a.text}else 1===a.type?s=p[i]:(o++,s=p[a.text],i=a.text);if(!(o+s<r.length))throw Error("Path data ended short");for(let t=o;t<o+s;t++){let e=r[t];if(1!==e.type)throw Error("Param not a number: "+i+","+e.text);n[n.length]=+e.text}if("number"!=typeof p[i])throw Error("Bad segment: "+i);{let t={key:i,data:n};e.push(t),o+=s,a=r[o],"M"===i&&(i="L"),"m"===i&&(i="l")}}return e}function y(t){let e=0,r=0,i=0,o=0,a=[];for(let{key:s,data:n}of t)switch(s){case"M":a.push({key:"M",data:[...n]}),[e,r]=n,[i,o]=n;break;case"m":e+=n[0],r+=n[1],a.push({key:"M",data:[e,r]}),i=e,o=r;break;case"L":a.push({key:"L",data:[...n]}),[e,r]=n;break;case"l":e+=n[0],r+=n[1],a.push({key:"L",data:[e,r]});break;case"C":a.push({key:"C",data:[...n]}),e=n[4],r=n[5];break;case"c":{let t=n.map((t,i)=>i%2?t+r:t+e);a.push({key:"C",data:t}),e=t[4],r=t[5];break}case"Q":a.push({key:"Q",data:[...n]}),e=n[2],r=n[3];break;case"q":{let t=n.map((t,i)=>i%2?t+r:t+e);a.push({key:"Q",data:t}),e=t[2],r=t[3];break}case"A":a.push({key:"A",data:[...n]}),e=n[5],r=n[6];break;case"a":e+=n[5],r+=n[6],a.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],e,r]});break;case"H":a.push({key:"H",data:[...n]}),e=n[0];break;case"h":e+=n[0],a.push({key:"H",data:[e]});break;case"V":a.push({key:"V",data:[...n]}),r=n[0];break;case"v":r+=n[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...n]}),e=n[2],r=n[3];break;case"s":{let t=n.map((t,i)=>i%2?t+r:t+e);a.push({key:"S",data:t}),e=t[2],r=t[3];break}case"T":a.push({key:"T",data:[...n]}),e=n[0],r=n[1];break;case"t":e+=n[0],r+=n[1],a.push({key:"T",data:[e,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),e=i,r=o}return a}function m(t){let e=[],r="",i=0,o=0,a=0,s=0,n=0,l=0;for(let{key:h,data:c}of t){switch(h){case"M":e.push({key:"M",data:[...c]}),[i,o]=c,[a,s]=c;break;case"C":e.push({key:"C",data:[...c]}),i=c[4],o=c[5],n=c[2],l=c[3];break;case"L":e.push({key:"L",data:[...c]}),[i,o]=c;break;case"H":i=c[0],e.push({key:"L",data:[i,o]});break;case"V":o=c[0],e.push({key:"L",data:[i,o]});break;case"S":{let t=0,a=0;"C"===r||"S"===r?(t=i+(i-n),a=o+(o-l)):(t=i,a=o),e.push({key:"C",data:[t,a,...c]}),n=c[0],l=c[1],i=c[2],o=c[3];break}case"T":{let[t,a]=c,s=0,h=0;"Q"===r||"T"===r?(s=i+(i-n),h=o+(o-l)):(s=i,h=o);let d=i+2*(s-i)/3,u=o+2*(h-o)/3,g=t+2*(s-t)/3,p=a+2*(h-a)/3;e.push({key:"C",data:[d,u,g,p,t,a]}),n=s,l=h,i=t,o=a;break}case"Q":{let[t,r,a,s]=c,h=i+2*(t-i)/3,d=o+2*(r-o)/3,u=a+2*(t-a)/3,g=s+2*(r-s)/3;e.push({key:"C",data:[h,d,u,g,a,s]}),n=t,l=r,i=a,o=s;break}case"A":{let t=Math.abs(c[0]),r=Math.abs(c[1]),a=c[2],s=c[3],n=c[4],l=c[5],h=c[6];0===t||0===r?(e.push({key:"C",data:[i,o,l,h,l,h]}),i=l,o=h):(i!==l||o!==h)&&((function t(e,r,i,o,a,s,n,l,h,c){let d=Math.PI*n/180,u=[],g=0,p=0,f=0,y=0;if(c)[g,p,f,y]=c;else{[e,r]=C(e,r,-d),[i,o]=C(i,o,-d);let t=(e-i)/2,n=(r-o)/2,c=t*t/(a*a)+n*n/(s*s);c>1&&(a*=c=Math.sqrt(c),s*=c);let u=a*a,m=s*s,x=(l===h?-1:1)*Math.sqrt(Math.abs((u*m-u*n*n-m*t*t)/(u*n*n+m*t*t)));f=x*a*n/s+(e+i)/2,y=-(x*s)*t/a+(r+o)/2,g=Math.asin(parseFloat(((r-y)/s).toFixed(9))),p=Math.asin(parseFloat(((o-y)/s).toFixed(9))),e<f&&(g=Math.PI-g),i<f&&(p=Math.PI-p),g<0&&(g=2*Math.PI+g),p<0&&(p=2*Math.PI+p),h&&g>p&&(g-=2*Math.PI),!h&&p>g&&(p-=2*Math.PI)}let m=p-g;if(Math.abs(m)>120*Math.PI/180){let e=p,r=i,l=o;u=t(i=f+a*Math.cos(p=h&&p>g?g+120*Math.PI/180*1:g+-(120*Math.PI/180*1)),o=y+s*Math.sin(p),r,l,a,s,n,0,h,[p,e,f,y])}m=p-g;let x=Math.cos(g),b=Math.cos(p),k=Math.tan(m/4),w=4/3*a*k,B=4/3*s*k,T=[e,r],S=[e+w*Math.sin(g),r-B*x],v=[i+w*Math.sin(p),o-B*b],_=[i,o];if(S[0]=2*T[0]-S[0],S[1]=2*T[1]-S[1],c)return[S,v,_].concat(u);{u=[S,v,_].concat(u);let t=[];for(let e=0;e<u.length;e+=3){let r=C(u[e][0],u[e][1],d),i=C(u[e+1][0],u[e+1][1],d),o=C(u[e+2][0],u[e+2][1],d);t.push([r[0],r[1],i[0],i[1],o[0],o[1]])}return t}})(i,o,l,h,t,r,a,s,n).forEach(function(t){e.push({key:"C",data:t})}),i=l,o=h);break}case"Z":e.push({key:"Z",data:[]}),i=a,o=s}r=h}return e}function C(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}let x={randOffset:function(t,e){return $(t,e)},randOffsetWithRange:function(t,e,r){return M(t,e,r)},ellipse:function(t,e,r,i,o){let a=B(r,i,o);return T(t,e,o,a).opset},doubleLineOps:function(t,e,r,i,o){return E(t,e,r,i,o,!0)}};function b(t,e,r,i,o){return{type:"path",ops:E(t,e,r,i,o)}}function k(t,e,r){let i=(t||[]).length;if(i>2){let o=[];for(let e=0;e<i-1;e++)o.push(...E(t[e][0],t[e][1],t[e+1][0],t[e+1][1],r));return e&&o.push(...E(t[i-1][0],t[i-1][1],t[0][0],t[0][1],r)),{type:"path",ops:o}}return 2===i?b(t[0][0],t[0][1],t[1][0],t[1][1],r):{type:"path",ops:[]}}function w(t,e){if(t.length){let r="number"==typeof t[0][0]?[t]:t,i=O(r[0],+(1+.2*e.roughness),e),o=e.disableMultiStroke?[]:O(r[0],1.5*(1+.22*e.roughness),L(e));for(let t=1;t<r.length;t++){let a=r[t];if(a.length){let t=O(a,+(1+.2*e.roughness),e),r=e.disableMultiStroke?[]:O(a,1.5*(1+.22*e.roughness),L(e));for(let e of t)"move"!==e.op&&i.push(e);for(let t of r)"move"!==t.op&&o.push(t)}}return{type:"path",ops:i.concat(o)}}return{type:"path",ops:[]}}function B(t,e,r){let i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(t/2,2)+Math.pow(e/2,2))/2)),o=2*Math.PI/Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),a=Math.abs(t/2),s=Math.abs(e/2),n=1-r.curveFitting;return a+=$(a*n,r),s+=$(s*n,r),{increment:o,rx:a,ry:s}}function T(t,e,r,i){let[o,a]=q(i.increment,t,e,i.rx,i.ry,1,i.increment*M(.1,M(.4,1,r),r),r),s=D(o,null,r);if(!r.disableMultiStroke&&0!==r.roughness){let[o]=q(i.increment,t,e,i.rx,i.ry,1.5,0,r),a=D(o,null,r);s=s.concat(a)}return{estimatedPoints:a,opset:{type:"path",ops:s}}}function S(t,e,r,i,o,a,s,n,l){let h=Math.abs(r/2),c=Math.abs(i/2);h+=$(.01*h,l),c+=$(.01*c,l);let d=o,u=a;for(;d<0;)d+=2*Math.PI,u+=2*Math.PI;u-d>2*Math.PI&&(d=0,u=2*Math.PI);let g=Math.min(2*Math.PI/l.curveStepCount/2,(u-d)/2),p=I(g,t,e,h,c,d,u,1,l);if(!l.disableMultiStroke){let r=I(g,t,e,h,c,d,u,1.5,l);p.push(...r)}return s&&(n?p.push(...E(t,e,t+h*Math.cos(d),e+c*Math.sin(d),l),...E(t,e,t+h*Math.cos(u),e+c*Math.sin(u),l)):p.push({op:"lineTo",data:[t,e]},{op:"lineTo",data:[t+h*Math.cos(d),e+c*Math.sin(d)]})),{type:"path",ops:p}}function v(t,e){let r=m(y(f(t))),i=[],o=[0,0],a=[0,0];for(let{key:t,data:s}of r)switch(t){case"M":a=[s[0],s[1]],o=[s[0],s[1]];break;case"L":i.push(...E(a[0],a[1],s[0],s[1],e)),a=[s[0],s[1]];break;case"C":{let[t,r,o,n,l,h]=s;i.push(...function(t,e,r,i,o,a,s,n){let l=[],h=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3],c=[0,0],d=n.disableMultiStroke?1:2,u=n.preserveVertices;for(let g=0;g<d;g++)0===g?l.push({op:"move",data:[s[0],s[1]]}):l.push({op:"move",data:[s[0]+(u?0:$(h[0],n)),s[1]+(u?0:$(h[0],n))]}),c=u?[o,a]:[o+$(h[g],n),a+$(h[g],n)],l.push({op:"bcurveTo",data:[t+$(h[g],n),e+$(h[g],n),r+$(h[g],n),i+$(h[g],n),c[0],c[1]]});return l}(t,r,o,n,l,h,a,e)),a=[l,h];break}case"Z":i.push(...E(a[0],a[1],o[0],o[1],e)),a=[o[0],o[1]]}return{type:"path",ops:i}}function _(t,e){let r=[];for(let i of t)if(i.length){let t=e.maxRandomnessOffset||0,o=i.length;if(o>2){r.push({op:"move",data:[i[0][0]+$(t,e),i[0][1]+$(t,e)]});for(let a=1;a<o;a++)r.push({op:"lineTo",data:[i[a][0]+$(t,e),i[a][1]+$(t,e)]})}}return{type:"fillPath",ops:r}}function F(t,e){return(function(t,e){let r=t.fillStyle||"hachure";if(!u[r])switch(r){case"zigzag":u[r]||(u[r]=new n(e));break;case"cross-hatch":u[r]||(u[r]=new l(e));break;case"dots":u[r]||(u[r]=new h(e));break;case"dashed":u[r]||(u[r]=new c(e));break;case"zigzag-line":u[r]||(u[r]=new d(e));break;default:u[r="hachure"]||(u[r]=new a(e))}return u[r]})(e,x).fillPolygons(t,e)}function L(t){let e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function A(t){return t.randomizer||(t.randomizer=new g(t.seed||0)),t.randomizer.next()}function M(t,e,r,i=1){return r.roughness*i*(A(r)*(e-t)+t)}function $(t,e,r=1){return M(-t,t,e,r)}function E(t,e,r,i,o,a=!1){let s=a?o.disableMultiStrokeFill:o.disableMultiStroke,n=K(t,e,r,i,o,!0,!1);if(s)return n;let l=K(t,e,r,i,o,!0,!0);return n.concat(l)}function K(t,e,r,i,o,a,s){let n=Math.pow(t-r,2)+Math.pow(e-i,2),l=Math.sqrt(n),h=1;h=l<200?1:l>500?.4:-.0016668*l+1.233334;let c=o.maxRandomnessOffset||0;c*c*100>n&&(c=l/10);let d=c/2,u=.2+.2*A(o),g=o.bowing*o.maxRandomnessOffset*(i-e)/200,p=o.bowing*o.maxRandomnessOffset*(t-r)/200;g=$(g,o,h),p=$(p,o,h);let f=[],y=o.preserveVertices;return a&&(s?f.push({op:"move",data:[t+(y?0:$(d,o,h)),e+(y?0:$(d,o,h))]}):f.push({op:"move",data:[t+(y?0:$(c,o,h)),e+(y?0:$(c,o,h))]})),s?f.push({op:"bcurveTo",data:[g+t+(r-t)*u+$(d,o,h),p+e+(i-e)*u+$(d,o,h),g+t+2*(r-t)*u+$(d,o,h),p+e+2*(i-e)*u+$(d,o,h),r+(y?0:$(d,o,h)),i+(y?0:$(d,o,h))]}):f.push({op:"bcurveTo",data:[g+t+(r-t)*u+$(c,o,h),p+e+(i-e)*u+$(c,o,h),g+t+2*(r-t)*u+$(c,o,h),p+e+2*(i-e)*u+$(c,o,h),r+(y?0:$(c,o,h)),i+(y?0:$(c,o,h))]}),f}function O(t,e,r){if(!t.length)return[];let i=[];i.push([t[0][0]+$(e,r),t[0][1]+$(e,r)]),i.push([t[0][0]+$(e,r),t[0][1]+$(e,r)]);for(let o=1;o<t.length;o++)i.push([t[o][0]+$(e,r),t[o][1]+$(e,r)]),o===t.length-1&&i.push([t[o][0]+$(e,r),t[o][1]+$(e,r)]);return D(i,null,r)}function D(t,e,r){let i=t.length,o=[];if(i>3){let a=[],s=1-r.curveTightness;o.push({op:"move",data:[t[1][0],t[1][1]]});for(let e=1;e+2<i;e++){let r=t[e];a[0]=[r[0],r[1]],a[1]=[r[0]+(s*t[e+1][0]-s*t[e-1][0])/6,r[1]+(s*t[e+1][1]-s*t[e-1][1])/6],a[2]=[t[e+1][0]+(s*t[e][0]-s*t[e+2][0])/6,t[e+1][1]+(s*t[e][1]-s*t[e+2][1])/6],a[3]=[t[e+1][0],t[e+1][1]],o.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}if(e&&2===e.length){let t=r.maxRandomnessOffset;o.push({op:"lineTo",data:[e[0]+$(t,r),e[1]+$(t,r)]})}}else 3===i?(o.push({op:"move",data:[t[1][0],t[1][1]]}),o.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[2][0],t[2][1]]})):2===i&&o.push(...K(t[0][0],t[0][1],t[1][0],t[1][1],r,!0,!0));return o}function q(t,e,r,i,o,a,s,n){let l=[],h=[];if(0===n.roughness){t/=4,h.push([e+i*Math.cos(-t),r+o*Math.sin(-t)]);for(let a=0;a<=2*Math.PI;a+=t){let t=[e+i*Math.cos(a),r+o*Math.sin(a)];l.push(t),h.push(t)}h.push([e+ +i,r+0*o]),h.push([e+i*Math.cos(t),r+o*Math.sin(t)])}else{let c=$(.5,n)-Math.PI/2;h.push([$(a,n)+e+.9*i*Math.cos(c-t),$(a,n)+r+.9*o*Math.sin(c-t)]);let d=2*Math.PI+c-.01;for(let s=c;s<d;s+=t){let t=[$(a,n)+e+i*Math.cos(s),$(a,n)+r+o*Math.sin(s)];l.push(t),h.push(t)}h.push([$(a,n)+e+i*Math.cos(c+2*Math.PI+.5*s),$(a,n)+r+o*Math.sin(c+2*Math.PI+.5*s)]),h.push([$(a,n)+e+.98*i*Math.cos(c+s),$(a,n)+r+.98*o*Math.sin(c+s)]),h.push([$(a,n)+e+.9*i*Math.cos(c+.5*s),$(a,n)+r+.9*o*Math.sin(c+.5*s)])}return[h,l]}function I(t,e,r,i,o,a,s,n,l){let h=a+$(.1,l),c=[];c.push([$(n,l)+e+.9*i*Math.cos(h-t),$(n,l)+r+.9*o*Math.sin(h-t)]);for(let a=h;a<=s;a+=t)c.push([$(n,l)+e+i*Math.cos(a),$(n,l)+r+o*Math.sin(a)]);return c.push([e+i*Math.cos(s),r+o*Math.sin(s)]),c.push([e+i*Math.cos(s),r+o*Math.sin(s)]),D(c,null,l)}function P(t,e=0){let r=t.length;if(r<3)throw Error("A curve must have at least three points.");let i=[];if(3===r)i.push([...t[0]],[...t[1]],[...t[2]],[...t[2]]);else{let r=[];r.push(t[0],t[0]);for(let e=1;e<t.length;e++)r.push(t[e]),e===t.length-1&&r.push(t[e]);let o=[],a=1-e;i.push([...r[0]]);for(let t=1;t+2<r.length;t++){let e=r[t];o[0]=[e[0],e[1]],o[1]=[e[0]+(a*r[t+1][0]-a*r[t-1][0])/6,e[1]+(a*r[t+1][1]-a*r[t-1][1])/6],o[2]=[r[t+1][0]+(a*r[t][0]-a*r[t+2][0])/6,r[t+1][1]+(a*r[t][1]-a*r[t+2][1])/6],o[3]=[r[t+1][0],r[t+1][1]],i.push(o[1],o[2],o[3])}}return i}function W(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}function z(t,e,r){return[t[0]+(e[0]-t[0])*r,t[1]+(e[1]-t[1])*r]}function R(t,e,r,i,o){let a=o||[],s=t[e],n=t[r-1],l=0,h=1;for(let i=e+1;i<r-1;++i){let e=function(t,e,r){let i=W(e,r);if(0===i)return W(t,e);let o=((t[0]-e[0])*(r[0]-e[0])+(t[1]-e[1])*(r[1]-e[1]))/i;return W(t,z(e,r,o=Math.max(0,Math.min(1,o))))}(t[i],s,n);e>l&&(l=e,h=i)}return Math.sqrt(l)>i?(R(t,e,h+1,i,a),R(t,h,r,i,a)):(a.length||a.push(s),a.push(n)),a}function j(t,e=.15,r){let i=[],o=(t.length-1)/3;for(let r=0;r<o;r++)!function t(e,r,i,o){let a,s,n,l,h,c,d,u,g=o||[];if(a=e[r+0],s=e[r+1],n=e[r+2],l=e[r+3],h=3*s[0]-2*a[0]-l[0],h*=h,c=3*s[1]-2*a[1]-l[1],c*=c,d=3*n[0]-2*l[0]-a[0],d*=d,u=3*n[1]-2*l[1]-a[1],u*=u,h<d&&(h=d),c<u&&(c=u),h+c<i){let t=e[r+0];g.length?Math.sqrt(W(g[g.length-1],t))>1&&g.push(t):g.push(t),g.push(e[r+3])}else{let o=e[r+0],a=e[r+1],s=e[r+2],n=e[r+3],l=z(o,a,.5),h=z(a,s,.5),c=z(s,n,.5),d=z(l,h,.5),u=z(h,c,.5),p=z(d,u,.5);t([o,l,d,p],0,i,g),t([p,u,c,n],0,i,g)}return g}(t,3*r,e,i);return r&&r>0?R(i,0,i.length,r):i}let N="none";class H{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(0x80000000*Math.random())}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,e,r){return{shape:t,sets:e||[],options:r||this.defaultOptions}}line(t,e,r,i,o){let a=this._o(o);return this._d("line",[b(t,e,r,i,a)],a)}rectangle(t,e,r,i,o){var a,s,n,l;let h=this._o(o),c=[],d=k([[a=t,s=e],[a+(n=r),s],[a+n,s+(l=i)],[a,s+l]],!0,h);if(h.fill){let o=[[t,e],[t+r,e],[t+r,e+i],[t,e+i]];"solid"===h.fillStyle?c.push(_([o],h)):c.push(F([o],h))}return h.stroke!==N&&c.push(d),this._d("rectangle",c,h)}ellipse(t,e,r,i,o){let a=this._o(o),s=[],n=B(r,i,a),l=T(t,e,a,n);if(a.fill)if("solid"===a.fillStyle){let r=T(t,e,a,n).opset;r.type="fillPath",s.push(r)}else s.push(F([l.estimatedPoints],a));return a.stroke!==N&&s.push(l.opset),this._d("ellipse",s,a)}circle(t,e,r,i){let o=this.ellipse(t,e,r,r,i);return o.shape="circle",o}linearPath(t,e){let r=this._o(e);return this._d("linearPath",[k(t,!1,r)],r)}arc(t,e,r,i,o,a,s=!1,n){let l=this._o(n),h=[],c=S(t,e,r,i,o,a,s,!0,l);if(s&&l.fill)if("solid"===l.fillStyle){let s=Object.assign({},l);s.disableMultiStroke=!0;let n=S(t,e,r,i,o,a,!0,!1,s);n.type="fillPath",h.push(n)}else h.push(function(t,e,r,i,o,a,s){let n=Math.abs(r/2),l=Math.abs(i/2);n+=$(.01*n,s),l+=$(.01*l,s);let h=o,c=a;for(;h<0;)h+=2*Math.PI,c+=2*Math.PI;c-h>2*Math.PI&&(h=0,c=2*Math.PI);let d=(c-h)/s.curveStepCount,u=[];for(let r=h;r<=c;r+=d)u.push([t+n*Math.cos(r),e+l*Math.sin(r)]);return u.push([t+n*Math.cos(c),e+l*Math.sin(c)]),u.push([t,e]),F([u],s)}(t,e,r,i,o,a,l));return l.stroke!==N&&h.push(c),this._d("arc",h,l)}curve(t,e){let r=this._o(e),i=[],o=w(t,r);if(r.fill&&r.fill!==N)if("solid"===r.fillStyle){let e=w(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else{let e=[];if(t.length)for(let i of"number"==typeof t[0][0]?[t]:t)i.length<3?e.push(...i):3===i.length?e.push(...j(P([i[0],i[0],i[1],i[2]]),10,(1+r.roughness)/2)):e.push(...j(P(i),10,(1+r.roughness)/2));e.length&&i.push(F([e],r))}return r.stroke!==N&&i.push(o),this._d("curve",i,r)}polygon(t,e){let r=this._o(e),i=[],o=k(t,!0,r);return r.fill&&("solid"===r.fillStyle?i.push(_([t],r)):i.push(F([t],r))),r.stroke!==N&&i.push(o),this._d("polygon",i,r)}path(t,e){let r=this._o(e),i=[];if(!t)return this._d("path",i,r);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");let o=r.fill&&"transparent"!==r.fill&&r.fill!==N,a=r.stroke!==N,s=!!(r.simplification&&r.simplification<1),n=function(t,e){let r=m(y(f(t))),i=[],o=[],a=[0,0],s=[],n=()=>{s.length>=4&&o.push(...j(s,1)),s=[]},l=()=>{n(),o.length&&(i.push(o),o=[])};for(let{key:t,data:e}of r)switch(t){case"M":l(),a=[e[0],e[1]],o.push(a);break;case"L":n(),o.push([e[0],e[1]]);break;case"C":if(!s.length){let t=o.length?o[o.length-1]:a;s.push([t[0],t[1]])}s.push([e[0],e[1]]),s.push([e[2],e[3]]),s.push([e[4],e[5]]);break;case"Z":n(),o.push([a[0],a[1]])}if(l(),!e)return i;let h=[];for(let t of i){let r=R(t,0,t.length,e);r.length&&h.push(r)}return h}(t,s?4-4*(r.simplification||1):(1+r.roughness)/2),l=v(t,r);if(o)if("solid"===r.fillStyle)if(1===n.length){let e=v(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else i.push(_(n,r));else i.push(F(n,r));return a&&(s?n.forEach(t=>{i.push(k(t,!1,r))}):i.push(l)),this._d("path",i,r)}opsToPath(t,e){let r="";for(let i of t.ops){let t="number"==typeof e&&e>=0?i.data.map(t=>+t.toFixed(e)):i.data;switch(i.op){case"move":r+=`M${t[0]} ${t[1]} `;break;case"bcurveTo":r+=`C${t[0]} ${t[1]}, ${t[2]} ${t[3]}, ${t[4]} ${t[5]} `;break;case"lineTo":r+=`L${t[0]} ${t[1]} `}}return r.trim()}toPaths(t){let e=t.sets||[],r=t.options||this.defaultOptions,i=[];for(let t of e){let e=null;switch(t.type){case"path":e={d:this.opsToPath(t),stroke:r.stroke,strokeWidth:r.strokeWidth,fill:N};break;case"fillPath":e={d:this.opsToPath(t),stroke:N,strokeWidth:0,fill:r.fill||N};break;case"fillSketch":e=this.fillSketch(t,r)}e&&i.push(e)}return i}fillSketch(t,e){let r=e.fillWeight;return r<0&&(r=e.strokeWidth/2),{d:this.opsToPath(t),stroke:e.fill||N,strokeWidth:r,fill:N}}_mergedShape(t){return t.filter((t,e)=>0===e||"move"!==t.op)}}class U{constructor(t,e){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new H(e)}draw(t){let e=t.sets||[],r=t.options||this.getDefaultOptions(),i=this.ctx,o=t.options.fixedDecimalPlaceDigits;for(let a of e)switch(a.type){case"path":i.save(),i.strokeStyle="none"===r.stroke?"transparent":r.stroke,i.lineWidth=r.strokeWidth,r.strokeLineDash&&i.setLineDash(r.strokeLineDash),r.strokeLineDashOffset&&(i.lineDashOffset=r.strokeLineDashOffset),this._drawToContext(i,a,o),i.restore();break;case"fillPath":{i.save(),i.fillStyle=r.fill||"";let e="curve"===t.shape||"polygon"===t.shape||"path"===t.shape?"evenodd":"nonzero";this._drawToContext(i,a,o,e),i.restore();break}case"fillSketch":this.fillSketch(i,a,r)}}fillSketch(t,e,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2),t.save(),r.fillLineDash&&t.setLineDash(r.fillLineDash),r.fillLineDashOffset&&(t.lineDashOffset=r.fillLineDashOffset),t.strokeStyle=r.fill||"",t.lineWidth=i,this._drawToContext(t,e,r.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,e,r,i="nonzero"){for(let i of(t.beginPath(),e.ops)){let e="number"==typeof r&&r>=0?i.data.map(t=>+t.toFixed(r)):i.data;switch(i.op){case"move":t.moveTo(e[0],e[1]);break;case"bcurveTo":t.bezierCurveTo(e[0],e[1],e[2],e[3],e[4],e[5]);break;case"lineTo":t.lineTo(e[0],e[1])}}"fillPath"===e.type?t.fill(i):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,e,r,i,o){let a=this.gen.line(t,e,r,i,o);return this.draw(a),a}rectangle(t,e,r,i,o){let a=this.gen.rectangle(t,e,r,i,o);return this.draw(a),a}ellipse(t,e,r,i,o){let a=this.gen.ellipse(t,e,r,i,o);return this.draw(a),a}circle(t,e,r,i){let o=this.gen.circle(t,e,r,i);return this.draw(o),o}linearPath(t,e){let r=this.gen.linearPath(t,e);return this.draw(r),r}polygon(t,e){let r=this.gen.polygon(t,e);return this.draw(r),r}arc(t,e,r,i,o,a,s=!1,n){let l=this.gen.arc(t,e,r,i,o,a,s,n);return this.draw(l),l}curve(t,e){let r=this.gen.curve(t,e);return this.draw(r),r}path(t,e){let r=this.gen.path(t,e);return this.draw(r),r}}let Y="http://www.w3.org/2000/svg";class X{constructor(t,e){this.svg=t,this.gen=new H(e)}draw(t){let e=t.sets||[],r=t.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,o=i.createElementNS(Y,"g"),a=t.options.fixedDecimalPlaceDigits;for(let s of e){let e=null;switch(s.type){case"path":(e=i.createElementNS(Y,"path")).setAttribute("d",this.opsToPath(s,a)),e.setAttribute("stroke",r.stroke),e.setAttribute("stroke-width",r.strokeWidth+""),e.setAttribute("fill","none"),r.strokeLineDash&&e.setAttribute("stroke-dasharray",r.strokeLineDash.join(" ").trim()),r.strokeLineDashOffset&&e.setAttribute("stroke-dashoffset",`${r.strokeLineDashOffset}`);break;case"fillPath":(e=i.createElementNS(Y,"path")).setAttribute("d",this.opsToPath(s,a)),e.setAttribute("stroke","none"),e.setAttribute("stroke-width","0"),e.setAttribute("fill",r.fill||""),"curve"!==t.shape&&"polygon"!==t.shape||e.setAttribute("fill-rule","evenodd");break;case"fillSketch":e=this.fillSketch(i,s,r)}e&&o.appendChild(e)}return o}fillSketch(t,e,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2);let o=t.createElementNS(Y,"path");return o.setAttribute("d",this.opsToPath(e,r.fixedDecimalPlaceDigits)),o.setAttribute("stroke",r.fill||""),o.setAttribute("stroke-width",i+""),o.setAttribute("fill","none"),r.fillLineDash&&o.setAttribute("stroke-dasharray",r.fillLineDash.join(" ").trim()),r.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${r.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,e){return this.gen.opsToPath(t,e)}line(t,e,r,i,o){let a=this.gen.line(t,e,r,i,o);return this.draw(a)}rectangle(t,e,r,i,o){let a=this.gen.rectangle(t,e,r,i,o);return this.draw(a)}ellipse(t,e,r,i,o){let a=this.gen.ellipse(t,e,r,i,o);return this.draw(a)}circle(t,e,r,i){let o=this.gen.circle(t,e,r,i);return this.draw(o)}linearPath(t,e){let r=this.gen.linearPath(t,e);return this.draw(r)}polygon(t,e){let r=this.gen.polygon(t,e);return this.draw(r)}arc(t,e,r,i,o,a,s=!1,n){let l=this.gen.arc(t,e,r,i,o,a,s,n);return this.draw(l)}curve(t,e){let r=this.gen.curve(t,e);return this.draw(r)}path(t,e){let r=this.gen.path(t,e);return this.draw(r)}}var G={canvas:(t,e)=>new U(t,e),svg:(t,e)=>new X(t,e),generator:t=>new H(t),newSeed:()=>H.newSeed()};r.d(e,{A:()=>G})},El(t,e,r){"use strict";function i(t,e){let r;if(void 0===e)for(let e of t)null!=e&&(r<e||void 0===r&&e>=e)&&(r=e);else{let i=-1;for(let o of t)null!=(o=e(o,++i,t))&&(r<o||void 0===r&&o>=o)&&(r=o)}return r}function o(t,e){let r;if(void 0===e)for(let e of t)null!=e&&(r>e||void 0===r&&e>=e)&&(r=e);else{let i=-1;for(let o of t)null!=(o=e(o,++i,t))&&(r>o||void 0===r&&o>=o)&&(r=o)}return r}function a(t){return t}function s(t){return"translate("+t+",0)"}function n(t){return"translate(0,"+t+")"}function l(){return!this.__axis}function h(t,e){var r=[],i=null,o=null,h=6,c=6,d=3,u="u">typeof window&&window.devicePixelRatio>1?0:.5,g=1===t||4===t?-1:1,p=4===t||2===t?"x":"y",f=1===t||3===t?s:n;function y(s){var n=null==i?e.ticks?e.ticks.apply(e,r):e.domain():i,y=null==o?e.tickFormat?e.tickFormat.apply(e,r):a:o,m=Math.max(h,0)+d,C=e.range(),x=+C[0]+u,b=+C[C.length-1]+u,k=(e.bandwidth?function(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),r=>+t(r)+e}:function(t){return e=>+t(e)})(e.copy(),u),w=s.selection?s.selection():s,B=w.selectAll(".domain").data([null]),T=w.selectAll(".tick").data(n,e).order(),S=T.exit(),v=T.enter().append("g").attr("class","tick"),_=T.select("line"),F=T.select("text");B=B.merge(B.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),T=T.merge(v),_=_.merge(v.append("line").attr("stroke","currentColor").attr(p+"2",g*h)),F=F.merge(v.append("text").attr("fill","currentColor").attr(p,g*m).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),s!==w&&(B=B.transition(s),T=T.transition(s),_=_.transition(s),F=F.transition(s),S=S.transition(s).attr("opacity",1e-6).attr("transform",function(t){return isFinite(t=k(t))?f(t+u):this.getAttribute("transform")}),v.attr("opacity",1e-6).attr("transform",function(t){var e=this.parentNode.__axis;return f((e&&isFinite(e=e(t))?e:k(t))+u)})),S.remove(),B.attr("d",4===t||2===t?c?"M"+g*c+","+x+"H"+u+"V"+b+"H"+g*c:"M"+u+","+x+"V"+b:c?"M"+x+","+g*c+"V"+u+"H"+b+"V"+g*c:"M"+x+","+u+"H"+b),T.attr("opacity",1).attr("transform",function(t){return f(k(t)+u)}),_.attr(p+"2",g*h),F.attr(p,g*m).text(y),w.filter(l).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),w.each(function(){this.__axis=k})}return y.scale=function(t){return arguments.length?(e=t,y):e},y.ticks=function(){return r=Array.from(arguments),y},y.tickArguments=function(t){return arguments.length?(r=null==t?[]:Array.from(t),y):r.slice()},y.tickValues=function(t){return arguments.length?(i=null==t?null:Array.from(t),y):i&&i.slice()},y.tickFormat=function(t){return arguments.length?(o=t,y):o},y.tickSize=function(t){return arguments.length?(h=c=+t,y):h},y.tickSizeInner=function(t){return arguments.length?(h=+t,y):h},y.tickSizeOuter=function(t){return arguments.length?(c=+t,y):c},y.tickPadding=function(t){return arguments.length?(d=+t,y):d},y.offset=function(t){return arguments.length?(u=+t,y):u},y}function c(t){return h(1,t)}function d(t){return h(3,t)}function u(){}function g(t){return null==t?u:function(){return this.querySelector(t)}}function p(){return[]}function f(t){return null==t?p:function(){return this.querySelectorAll(t)}}function y(t){return function(){return this.matches(t)}}function m(t){return function(e){return e.matches(t)}}r.d(e,{JLW:()=>oU,l78:()=>d,tlR:()=>c,qrM:()=>o4,Yu4:()=>o8,IA3:()=>o9,Wi0:()=>ae,PGM:()=>ar,OEq:()=>ao,y8u:()=>an,olC:()=>ah,IrU:()=>ad,oDi:()=>ap,Q7f:()=>ay,cVp:()=>aC,lUB:()=>oG,Lx9:()=>ab,nVG:()=>a_,uxU:()=>aF,Xf2:()=>aM,GZz:()=>aE,UPb:()=>aO,dyv:()=>aK,GPZ:()=>tn,Sk5:()=>eR,bEH:()=>ro,n8j:()=>oQ,T9B:()=>i,jkA:()=>o,rLf:()=>o1,WH:()=>function t(){var e,r,i=rc().unknown(void 0),o=i.domain,a=i.range,s=0,n=1,l=!1,h=0,c=0,d=.5;function u(){var t=o().length,i=n<s,u=i?n:s,g=i?s:n;e=(g-u)/Math.max(1,t-h+2*c),l&&(e=Math.floor(e)),u+=(g-u-e*(t-h))*d,r=e*(1-h),l&&(u=Math.round(u),r=Math.round(r));var p=(function(t,e,r){t*=1,e*=1,r=(o=arguments.length)<2?(e=t,t=0,1):o<3?1:+r;for(var i=-1,o=0|Math.max(0,Math.ceil((e-t)/r)),a=Array(o);++i<o;)a[i]=t+i*r;return a})(t).map(function(t){return u+e*t});return a(i?p.reverse():p)}return delete i.unknown,i.domain=function(t){return arguments.length?(o(t),u()):o()},i.range=function(t){return arguments.length?([s,n]=t,s*=1,n*=1,u()):[s,n]},i.rangeRound=function(t){return[s,n]=t,s*=1,n*=1,l=!0,u()},i.bandwidth=function(){return r},i.step=function(){return e},i.round=function(t){return arguments.length?(l=!!t,u()):l},i.padding=function(t){return arguments.length?(h=Math.min(1,c=+t),u()):h},i.paddingInner=function(t){return arguments.length?(h=Math.min(1,t),u()):h},i.paddingOuter=function(t){return arguments.length?(c=+t,u()):c},i.align=function(t){return arguments.length?(d=Math.max(0,Math.min(1,t)),u()):d},i.copy=function(){return t(o(),[s,n]).round(l).paddingInner(h).paddingOuter(c).align(d)},ra.apply(u(),arguments)},m4Y:()=>function t(){var e,r=rM();return r.copy=function(){return rA(r,t())},ra.apply(r,arguments),e=r.domain,r.ticks=function(t){var r=e();return function(t,e,r){if(e*=1,t*=1,!((r*=1)>0))return[];if(t===e)return[t];let i=e<t,[o,a,s]=i?rp(e,t,r):rp(t,e,r);if(!(a>=o))return[];let n=a-o+1,l=Array(n);if(i)if(s<0)for(let t=0;t<n;++t)l[t]=-((a-t)/s);else for(let t=0;t<n;++t)l[t]=(a-t)*s;else if(s<0)for(let t=0;t<n;++t)l[t]=-((o+t)/s);else for(let t=0;t<n;++t)l[t]=(o+t)*s;return l}(r[0],r[r.length-1],null==t?10:t)},r.tickFormat=function(t,r){var i=e();return function(t,e,r,i){var o,a,s=ry(t,e,r);switch((i=eK(null==i?",f":i)).type){case"s":var n=Math.max(Math.abs(t),Math.abs(e));return null!=i.precision||isNaN(a=Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(e$(n)/3)))-e$(Math.abs(s))))||(i.precision=a),tl(i,n);case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(a=Math.max(0,e$(Math.abs(Math.max(Math.abs(t),Math.abs(e)))-(o=Math.abs(o=s)))-e$(o))+1)||(i.precision=a-("e"===i.type));break;case"f":case"%":null!=i.precision||isNaN(a=Math.max(0,-e$(Math.abs(s))))||(i.precision=a-("%"===i.type)*2)}return tn(i)}(i[0],i[i.length-1],null==t?10:t,r)},r.nice=function(t){null==t&&(t=10);var i,o,a=e(),s=0,n=a.length-1,l=a[s],h=a[n],c=10;for(h<l&&(o=l,l=h,h=o,o=s,s=n,n=o);c-- >0;){if((o=rf(l,h,t))===i)return a[s]=l,a[n]=h,e(a);if(o>0)l=Math.floor(l/o)*o,h=Math.ceil(h/o)*o;else if(o<0)l=Math.ceil(l*o)/o,h=Math.floor(h*o)/o;else break;i=o}return r},r},UMr:()=>rc,w7C:()=>ox,zt:()=>ob,Ltv:()=>ok,UAC:()=>rz,DCK:()=>tc,TUC:()=>rV,Agd:()=>rP,t6C:()=>rO,wXd:()=>rq,ABi:()=>rU,Ui6:()=>r6,rGn:()=>rZ,ucG:()=>rD,YPH:()=>rH,Mol:()=>rG,PGu:()=>rY,GuW:()=>rX,hkb:()=>eQ});var C,x=Array.prototype.find;function b(){return this.firstElementChild}var k=Array.prototype.filter;function w(){return Array.from(this.children)}function B(t){return Array(t.length)}function T(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function S(t,e,r,i,o,a){for(var s,n=0,l=e.length,h=a.length;n<h;++n)(s=e[n])?(s.__data__=a[n],i[n]=s):r[n]=new T(t,a[n]);for(;n<l;++n)(s=e[n])&&(o[n]=s)}function v(t,e,r,i,o,a,s){var n,l,h,c=new Map,d=e.length,u=a.length,g=Array(d);for(n=0;n<d;++n)(l=e[n])&&(g[n]=h=s.call(l,l.__data__,n,e)+"",c.has(h)?o[n]=l:c.set(h,l));for(n=0;n<u;++n)h=s.call(t,a[n],n,a)+"",(l=c.get(h))?(i[n]=l,l.__data__=a[n],c.delete(h)):r[n]=new T(t,a[n]);for(n=0;n<d;++n)(l=e[n])&&c.get(g[n])===l&&(o[n]=l)}function _(t){return t.__data__}function F(t,e){return t<e?-1:t>e?1:t>=e?0:0/0}T.prototype={constructor:T,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var L="http://www.w3.org/1999/xhtml",A={svg:"http://www.w3.org/2000/svg",xhtml:L,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function M(t){var e=t+="",r=e.indexOf(":");return r>=0&&"xmlns"!==(e=t.slice(0,r))&&(t=t.slice(r+1)),A.hasOwnProperty(e)?{space:A[e],local:t}:t}function $(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function E(t,e){return t.style.getPropertyValue(e)||$(t).getComputedStyle(t,null).getPropertyValue(e)}function K(t){return t.trim().split(/^|\s+/)}function O(t){return t.classList||new D(t)}function D(t){this._node=t,this._names=K(t.getAttribute("class")||"")}function q(t,e){for(var r=O(t),i=-1,o=e.length;++i<o;)r.add(e[i])}function I(t,e){for(var r=O(t),i=-1,o=e.length;++i<o;)r.remove(e[i])}function P(){this.textContent=""}function W(){this.innerHTML=""}function z(){this.nextSibling&&this.parentNode.appendChild(this)}function R(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function j(t){var e=M(t);return(e.local?function(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}:function(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===L&&e.documentElement.namespaceURI===L?e.createElement(t):e.createElementNS(r,t)}})(e)}function N(){return null}function H(){var t=this.parentNode;t&&t.removeChild(this)}function U(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Y(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function X(t){return function(){var e=this.__on;if(e){for(var r,i=0,o=-1,a=e.length;i<a;++i)(r=e[i],t.type&&r.type!==t.type||r.name!==t.name)?e[++o]=r:this.removeEventListener(r.type,r.listener,r.options);++o?e.length=o:delete this.__on}}}function G(t,e,r){return function(){var i,o=this.__on,a=function(t){e.call(this,t,this.__data__)};if(o){for(var s=0,n=o.length;s<n;++s)if((i=o[s]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=r),i.value=e;return}}this.addEventListener(t.type,a,r),i={type:t.type,name:t.name,value:e,listener:a,options:r},o?o.push(i):this.__on=[i]}}function V(t,e,r){var i=$(t),o=i.CustomEvent;"function"==typeof o?o=new o(e,r):(o=i.document.createEvent("Event"),r?(o.initEvent(e,r.bubbles,r.cancelable),o.detail=r.detail):o.initEvent(e,!1,!1)),t.dispatchEvent(o)}D.prototype={add:function(t){0>this._names.indexOf(t)&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Z=[null];function Q(t,e){this._groups=t,this._parents=e}function J(){return new Q([[document.documentElement]],Z)}Q.prototype=J.prototype={constructor:Q,select:function(t){"function"!=typeof t&&(t=g(t));for(var e=this._groups,r=e.length,i=Array(r),o=0;o<r;++o)for(var a,s,n=e[o],l=n.length,h=i[o]=Array(l),c=0;c<l;++c)(a=n[c])&&(s=t.call(a,a.__data__,c,n))&&("__data__"in a&&(s.__data__=a.__data__),h[c]=s);return new Q(i,this._parents)},selectAll:function(t){if("function"==typeof t){var e;e=t,t=function(){var t;return t=e.apply(this,arguments),null==t?[]:Array.isArray(t)?t:Array.from(t)}}else t=f(t);for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var n,l=r[s],h=l.length,c=0;c<h;++c)(n=l[c])&&(o.push(t.call(n,n.__data__,c,l)),a.push(n));return new Q(o,a)},selectChild:function(t){var e;return this.select(null==t?b:(e="function"==typeof t?t:m(t),function(){return x.call(this.children,e)}))},selectChildren:function(t){var e;return this.selectAll(null==t?w:(e="function"==typeof t?t:m(t),function(){return k.call(this.children,e)}))},filter:function(t){"function"!=typeof t&&(t=y(t));for(var e=this._groups,r=e.length,i=Array(r),o=0;o<r;++o)for(var a,s=e[o],n=s.length,l=i[o]=[],h=0;h<n;++h)(a=s[h])&&t.call(a,a.__data__,h,s)&&l.push(a);return new Q(i,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,_);var r=e?v:S,i=this._parents,o=this._groups;"function"!=typeof t&&(C=t,t=function(){return C});for(var a=o.length,s=Array(a),n=Array(a),l=Array(a),h=0;h<a;++h){var c=i[h],d=o[h],u=d.length,g="object"==typeof(m=t.call(c,c&&c.__data__,h,i))&&"length"in m?m:Array.from(m),p=g.length,f=n[h]=Array(p),y=s[h]=Array(p);r(c,d,f,y,l[h]=Array(u),g,e);for(var m,C,x,b,k=0,w=0;k<p;++k)if(x=f[k]){for(k>=w&&(w=k+1);!(b=y[w])&&++w<p;);x._next=b||null}}return(s=new Q(s,i))._enter=n,s._exit=l,s},enter:function(){return new Q(this._enter||this._groups.map(B),this._parents)},exit:function(){return new Q(this._exit||this._groups.map(B),this._parents)},join:function(t,e,r){var i=this.enter(),o=this,a=this.exit();return"function"==typeof t?(i=t(i))&&(i=i.selection()):i=i.append(t+""),null!=e&&(o=e(o))&&(o=o.selection()),null==r?a.remove():r(a),i&&o?i.merge(o).order():o},merge:function(t){for(var e=t.selection?t.selection():t,r=this._groups,i=e._groups,o=r.length,a=i.length,s=Math.min(o,a),n=Array(o),l=0;l<s;++l)for(var h,c=r[l],d=i[l],u=c.length,g=n[l]=Array(u),p=0;p<u;++p)(h=c[p]||d[p])&&(g[p]=h);for(;l<o;++l)n[l]=r[l];return new Q(n,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,r=t.length;++e<r;)for(var i,o=t[e],a=o.length-1,s=o[a];--a>=0;)(i=o[a])&&(s&&4^i.compareDocumentPosition(s)&&s.parentNode.insertBefore(i,s),s=i);return this},sort:function(t){function e(e,r){return e&&r?t(e.__data__,r.__data__):!e-!r}t||(t=F);for(var r=this._groups,i=r.length,o=Array(i),a=0;a<i;++a){for(var s,n=r[a],l=n.length,h=o[a]=Array(l),c=0;c<l;++c)(s=n[c])&&(h[c]=s);h.sort(e)}return new Q(o,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var i=t[e],o=0,a=i.length;o<a;++o){var s=i[o];if(s)return s}return null},size:function(){let t=0;for(let e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,r=0,i=e.length;r<i;++r)for(var o,a=e[r],s=0,n=a.length;s<n;++s)(o=a[s])&&t.call(o,o.__data__,s,a);return this},attr:function(t,e){var r=M(t);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((null==e?r.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}}:"function"==typeof e?r.local?function(t,e){return function(){var r=e.apply(this,arguments);null==r?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}:function(t,e){return function(){var r=e.apply(this,arguments);null==r?this.removeAttribute(t):this.setAttribute(t,r)}}:r.local?function(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}:function(t,e){return function(){this.setAttribute(t,e)}})(r,e))},style:function(t,e,r){return arguments.length>1?this.each((null==e?function(t){return function(){this.style.removeProperty(t)}}:"function"==typeof e?function(t,e,r){return function(){var i=e.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,r)}}:function(t,e,r){return function(){this.style.setProperty(t,e,r)}})(t,e,null==r?"":r)):E(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?function(t){return function(){delete this[t]}}:"function"==typeof e?function(t,e){return function(){var r=e.apply(this,arguments);null==r?delete this[t]:this[t]=r}}:function(t,e){return function(){this[t]=e}})(t,e)):this.node()[t]},classed:function(t,e){var r=K(t+"");if(arguments.length<2){for(var i=O(this.node()),o=-1,a=r.length;++o<a;)if(!i.contains(r[o]))return!1;return!0}return this.each(("function"==typeof e?function(t,e){return function(){(e.apply(this,arguments)?q:I)(this,t)}}:e?function(t){return function(){q(this,t)}}:function(t){return function(){I(this,t)}})(r,e))},text:function(t){return arguments.length?this.each(null==t?P:("function"==typeof t?function(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}:function(t){return function(){this.textContent=t}})(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?W:("function"==typeof t?function(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}:function(t){return function(){this.innerHTML=t}})(t)):this.node().innerHTML},raise:function(){return this.each(z)},lower:function(){return this.each(R)},append:function(t){var e="function"==typeof t?t:j(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})},insert:function(t,e){var r="function"==typeof t?t:j(t),i=null==e?N:"function"==typeof e?e:g(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})},remove:function(){return this.each(H)},clone:function(t){return this.select(t?Y:U)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,r){var i,o,a=(t+"").trim().split(/^|\s+/).map(function(t){var e="",r=t.indexOf(".");return r>=0&&(e=t.slice(r+1),t=t.slice(0,r)),{type:t,name:e}}),s=a.length;if(arguments.length<2){var n=this.node().__on;if(n){for(var l,h=0,c=n.length;h<c;++h)for(i=0,l=n[h];i<s;++i)if((o=a[i]).type===l.type&&o.name===l.name)return l.value}return}for(n=e?G:X,i=0;i<s;++i)this.each(n(a[i],e,r));return this},dispatch:function(t,e){return this.each(("function"==typeof e?function(t,e){return function(){return V(this,t,e.apply(this,arguments))}}:function(t,e){return function(){return V(this,t,e)}})(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var i,o=t[e],a=0,s=o.length;a<s;++a)(i=o[a])&&(yield i)}};var tt={value:()=>{}};function te(){for(var t,e=0,r=arguments.length,i={};e<r;++e){if(!(t=arguments[e]+"")||t in i||/[\s.]/.test(t))throw Error("illegal type: "+t);i[t]=[]}return new tr(i)}function tr(t){this._=t}function ti(t,e,r){for(var i=0,o=t.length;i<o;++i)if(t[i].name===e){t[i]=tt,t=t.slice(0,i).concat(t.slice(i+1));break}return null!=r&&t.push({name:e,value:r}),t}tr.prototype=te.prototype={constructor:tr,on:function(t,e){var r,i=this._,o=(t+"").trim().split(/^|\s+/).map(function(t){var e="",r=t.indexOf(".");if(r>=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!i.hasOwnProperty(t))throw Error("unknown type: "+t);return{type:t,name:e}}),a=-1,s=o.length;if(arguments.length<2){for(;++a<s;)if((r=(t=o[a]).type)&&(r=function(t,e){for(var r,i=0,o=t.length;i<o;++i)if((r=t[i]).name===e)return r.value}(i[r],t.name)))return r;return}if(null!=e&&"function"!=typeof e)throw Error("invalid callback: "+e);for(;++a<s;)if(r=(t=o[a]).type)i[r]=ti(i[r],t.name,e);else if(null==e)for(r in i)i[r]=ti(i[r],t.name,null);return this},copy:function(){var t={},e=this._;for(var r in e)t[r]=e[r].slice();return new tr(t)},call:function(t,e){if((r=arguments.length-2)>0)for(var r,i,o=Array(r),a=0;a<r;++a)o[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw Error("unknown type: "+t);for(i=this._[t],a=0,r=i.length;a<r;++a)i[a].value.apply(e,o)},apply:function(t,e,r){if(!this._.hasOwnProperty(t))throw Error("unknown type: "+t);for(var i=this._[t],o=0,a=i.length;o<a;++o)i[o].value.apply(e,r)}};var to,ta,ts,tn,tl,th,tc,td,tu,tg=0,tp=0,tf=0,ty=0,tm=0,tC=0,tx="object"==typeof performance&&performance.now?performance:Date,tb="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function tk(){return tm||(tb(tw),tm=tx.now()+tC)}function tw(){tm=0}function tB(){this._call=this._time=this._next=null}function tT(t,e,r){var i=new tB;return i.restart(t,e,r),i}function tS(){tm=(ty=tx.now())+tC,tg=tp=0;try{tk(),++tg;for(var t,e=td;e;)(t=tm-e._time)>=0&&e._call.call(void 0,t),e=e._next;--tg}finally{tg=0,function(){for(var t,e,r=td,i=1/0;r;)r._call?(i>r._time&&(i=r._time),t=r,r=r._next):(e=r._next,r._next=null,r=t?t._next=e:td=e);tu=t,t_(i)}(),tm=0}}function tv(){var t=tx.now(),e=t-ty;e>1e3&&(tC-=e,ty=t)}function t_(t){!tg&&(tp&&(tp=clearTimeout(tp)),t-tm>24?(t<1/0&&(tp=setTimeout(tS,t-tx.now()-tC)),tf&&(tf=clearInterval(tf))):(tf||(ty=tx.now(),tf=setInterval(tv,1e3)),tg=1,tb(tS)))}function tF(t,e,r){var i=new tB;return e=null==e?0:+e,i.restart(r=>{i.stop(),t(r+e)},e,r),i}tB.prototype=tT.prototype={constructor:tB,restart:function(t,e,r){if("function"!=typeof t)throw TypeError("callback is not a function");r=(null==r?tk():+r)+(null==e?0:+e),this._next||tu===this||(tu?tu._next=this:td=this,tu=this),this._call=t,this._time=r,t_()},stop:function(){this._call&&(this._call=null,this._time=1/0,t_())}};var tL=te("start","end","cancel","interrupt"),tA=[];function tM(t,e,r,i,o,a){var s=t.__transition;if(s){if(r in s)return}else t.__transition={};!function(t,e,r){var i,o=t.__transition;function a(l){var h,c,d,u;if(1!==r.state)return n();for(h in o)if((u=o[h]).name===r.name){if(3===u.state)return tF(a);4===u.state?(u.state=6,u.timer.stop(),u.on.call("interrupt",t,t.__data__,u.index,u.group),delete o[h]):+h<e&&(u.state=6,u.timer.stop(),u.on.call("cancel",t,t.__data__,u.index,u.group),delete o[h])}if(tF(function(){3===r.state&&(r.state=4,r.timer.restart(s,r.delay,r.time),s(l))}),r.state=2,r.on.call("start",t,t.__data__,r.index,r.group),2===r.state){for(r.state=3,i=Array(d=r.tween.length),h=0,c=-1;h<d;++h)(u=r.tween[h].value.call(t,t.__data__,r.index,r.group))&&(i[++c]=u);i.length=c+1}}function s(e){for(var o=e<r.duration?r.ease.call(null,e/r.duration):(r.timer.restart(n),r.state=5,1),a=-1,s=i.length;++a<s;)i[a].call(t,o);5===r.state&&(r.on.call("end",t,t.__data__,r.index,r.group),n())}function n(){for(var i in r.state=6,r.timer.stop(),delete o[e],o)return;delete t.__transition}o[e]=r,r.timer=tT(function(t){r.state=1,r.timer.restart(a,r.delay,r.time),r.delay<=t&&a(t-r.delay)},0,r.time)}(t,r,{name:e,index:i,group:o,on:tL,tween:tA,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function t$(t,e){var r=tK(t,e);if(r.state>0)throw Error("too late; already scheduled");return r}function tE(t,e){var r=tK(t,e);if(r.state>3)throw Error("too late; already running");return r}function tK(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw Error("transition not found");return r}function tO(t,e){return t*=1,e*=1,function(r){return t*(1-r)+e*r}}var tD=180/Math.PI,tq={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function tI(t,e,r,i,o,a){var s,n,l;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(l=t*r+e*i)&&(r-=t*l,i-=e*l),(n=Math.sqrt(r*r+i*i))&&(r/=n,i/=n,l/=n),t*i<e*r&&(t=-t,e=-e,l=-l,s=-s),{translateX:o,translateY:a,rotate:Math.atan2(e,t)*tD,skewX:Math.atan(l)*tD,scaleX:s,scaleY:n}}function tP(t,e,r,i){function o(t){return t.length?t.pop()+" ":""}return function(a,s){var n,l,h,c,d=[],u=[];return a=t(a),s=t(s),!function(t,i,o,a,s,n){if(t!==o||i!==a){var l=s.push("translate(",null,e,null,r);n.push({i:l-4,x:tO(t,o)},{i:l-2,x:tO(i,a)})}else(o||a)&&s.push("translate("+o+e+a+r)}(a.translateX,a.translateY,s.translateX,s.translateY,d,u),n=a.rotate,l=s.rotate,n!==l?(n-l>180?l+=360:l-n>180&&(n+=360),u.push({i:d.push(o(d)+"rotate(",null,i)-2,x:tO(n,l)})):l&&d.push(o(d)+"rotate("+l+i),h=a.skewX,c=s.skewX,h!==c?u.push({i:d.push(o(d)+"skewX(",null,i)-2,x:tO(h,c)}):c&&d.push(o(d)+"skewX("+c+i),!function(t,e,r,i,a,s){if(t!==r||e!==i){var n=a.push(o(a)+"scale(",null,",",null,")");s.push({i:n-4,x:tO(t,r)},{i:n-2,x:tO(e,i)})}else(1!==r||1!==i)&&a.push(o(a)+"scale("+r+","+i+")")}(a.scaleX,a.scaleY,s.scaleX,s.scaleY,d,u),a=s=null,function(t){for(var e,r=-1,i=u.length;++r<i;)d[(e=u[r]).i]=e.x(t);return d.join("")}}}var tW=tP(function(t){let e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?tq:tI(e.a,e.b,e.c,e.d,e.e,e.f)},"px, ","px)","deg)"),tz=tP(function(t){return null==t?tq:(to||(to=document.createElementNS("http://www.w3.org/2000/svg","g")),to.setAttribute("transform",t),t=to.transform.baseVal.consolidate())?tI((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):tq},", ",")",")");function tR(t,e,r){var i=t._id;return t.each(function(){var t=tE(this,i);(t.value||(t.value={}))[e]=r.apply(this,arguments)}),function(t){return tK(t,i).value[e]}}function tj(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function tN(t,e){var r=Object.create(t.prototype);for(var i in e)r[i]=e[i];return r}function tH(){}var tU=1/.7,tY="\\s*([+-]?\\d+)\\s*",tX="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",tG="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",tV=/^#([0-9a-f]{3,8})$/,tZ=RegExp(`^rgb\\(${tY},${tY},${tY}\\)$`),tQ=RegExp(`^rgb\\(${tG},${tG},${tG}\\)$`),tJ=RegExp(`^rgba\\(${tY},${tY},${tY},${tX}\\)$`),t0=RegExp(`^rgba\\(${tG},${tG},${tG},${tX}\\)$`),t1=RegExp(`^hsl\\(${tX},${tG},${tG}\\)$`),t2=RegExp(`^hsla\\(${tX},${tG},${tG},${tX}\\)$`),t5={aliceblue:0xf0f8ff,antiquewhite:0xfaebd7,aqua:65535,aquamarine:8388564,azure:0xf0ffff,beige:0xf5f5dc,bisque:0xffe4c4,black:0,blanchedalmond:0xffebcd,blue:255,blueviolet:9055202,brown:0xa52a2a,burlywood:0xdeb887,cadetblue:6266528,chartreuse:8388352,chocolate:0xd2691e,coral:0xff7f50,cornflowerblue:6591981,cornsilk:0xfff8dc,crimson:0xdc143c,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:0xb8860b,darkgray:0xa9a9a9,darkgreen:25600,darkgrey:0xa9a9a9,darkkhaki:0xbdb76b,darkmagenta:9109643,darkolivegreen:5597999,darkorange:0xff8c00,darkorchid:0x9932cc,darkred:9109504,darksalmon:0xe9967a,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:0xff1493,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:0xb22222,floralwhite:0xfffaf0,forestgreen:2263842,fuchsia:0xff00ff,gainsboro:0xdcdcdc,ghostwhite:0xf8f8ff,gold:0xffd700,goldenrod:0xdaa520,gray:8421504,green:32768,greenyellow:0xadff2f,grey:8421504,honeydew:0xf0fff0,hotpink:0xff69b4,indianred:0xcd5c5c,indigo:4915330,ivory:0xfffff0,khaki:0xf0e68c,lavender:0xe6e6fa,lavenderblush:0xfff0f5,lawngreen:8190976,lemonchiffon:0xfffacd,lightblue:0xadd8e6,lightcoral:0xf08080,lightcyan:0xe0ffff,lightgoldenrodyellow:0xfafad2,lightgray:0xd3d3d3,lightgreen:9498256,lightgrey:0xd3d3d3,lightpink:0xffb6c1,lightsalmon:0xffa07a,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:0xb0c4de,lightyellow:0xffffe0,lime:65280,limegreen:3329330,linen:0xfaf0e6,magenta:0xff00ff,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:0xba55d3,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:0xc71585,midnightblue:1644912,mintcream:0xf5fffa,mistyrose:0xffe4e1,moccasin:0xffe4b5,navajowhite:0xffdead,navy:128,oldlace:0xfdf5e6,olive:8421376,olivedrab:7048739,orange:0xffa500,orangered:0xff4500,orchid:0xda70d6,palegoldenrod:0xeee8aa,palegreen:0x98fb98,paleturquoise:0xafeeee,palevioletred:0xdb7093,papayawhip:0xffefd5,peachpuff:0xffdab9,peru:0xcd853f,pink:0xffc0cb,plum:0xdda0dd,powderblue:0xb0e0e6,purple:8388736,rebeccapurple:6697881,red:0xff0000,rosybrown:0xbc8f8f,royalblue:4286945,saddlebrown:9127187,salmon:0xfa8072,sandybrown:0xf4a460,seagreen:3050327,seashell:0xfff5ee,sienna:0xa0522d,silver:0xc0c0c0,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:0xfffafa,springgreen:65407,steelblue:4620980,tan:0xd2b48c,teal:32896,thistle:0xd8bfd8,tomato:0xff6347,turquoise:4251856,violet:0xee82ee,wheat:0xf5deb3,white:0xffffff,whitesmoke:0xf5f5f5,yellow:0xffff00,yellowgreen:0x9acd32};function t3(){return this.rgb().formatHex()}function t4(){return this.rgb().formatRgb()}function t6(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=tV.exec(t))?(r=e[1].length,e=parseInt(e[1],16),6===r?t8(e):3===r?new ee(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===r?t7(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===r?t7(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=tZ.exec(t))?new ee(e[1],e[2],e[3],1):(e=tQ.exec(t))?new ee(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=tJ.exec(t))?t7(e[1],e[2],e[3],e[4]):(e=t0.exec(t))?t7(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=t1.exec(t))?en(e[1],e[2]/100,e[3]/100,1):(e=t2.exec(t))?en(e[1],e[2]/100,e[3]/100,e[4]):t5.hasOwnProperty(t)?t8(t5[t]):"transparent"===t?new ee(0/0,0/0,0/0,0):null}function t8(t){return new ee(t>>16&255,t>>8&255,255&t,1)}function t7(t,e,r,i){return i<=0&&(t=e=r=0/0),new ee(t,e,r,i)}function t9(t){return(t instanceof tH||(t=t6(t)),t)?new ee((t=t.rgb()).r,t.g,t.b,t.opacity):new ee}function et(t,e,r,i){return 1==arguments.length?t9(t):new ee(t,e,r,null==i?1:i)}function ee(t,e,r,i){this.r=+t,this.g=+e,this.b=+r,this.opacity=+i}function er(){return`#${es(this.r)}${es(this.g)}${es(this.b)}`}function ei(){let t=eo(this.opacity);return`${1===t?"rgb(":"rgba("}${ea(this.r)}, ${ea(this.g)}, ${ea(this.b)}${1===t?")":`, ${t})`}`}function eo(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function ea(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function es(t){return((t=ea(t))<16?"0":"")+t.toString(16)}function en(t,e,r,i){return i<=0?t=e=r=0/0:r<=0||r>=1?t=e=0/0:e<=0&&(t=0/0),new eh(t,e,r,i)}function el(t){if(t instanceof eh)return new eh(t.h,t.s,t.l,t.opacity);if(t instanceof tH||(t=t6(t)),!t)return new eh;if(t instanceof eh)return t;var e=(t=t.rgb()).r/255,r=t.g/255,i=t.b/255,o=Math.min(e,r,i),a=Math.max(e,r,i),s=0/0,n=a-o,l=(a+o)/2;return n?(s=e===a?(r-i)/n+(r<i)*6:r===a?(i-e)/n+2:(e-r)/n+4,n/=l<.5?a+o:2-a-o,s*=60):n=l>0&&l<1?0:s,new eh(s,n,l,t.opacity)}function eh(t,e,r,i){this.h=+t,this.s=+e,this.l=+r,this.opacity=+i}function ec(t){return(t=(t||0)%360)<0?t+360:t}function ed(t){return Math.max(0,Math.min(1,t||0))}function eu(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}tj(tH,t6,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:t3,formatHex:t3,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return el(this).formatHsl()},formatRgb:t4,toString:t4}),tj(ee,et,tN(tH,{brighter(t){return t=null==t?tU:Math.pow(tU,t),new ee(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new ee(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new ee(ea(this.r),ea(this.g),ea(this.b),eo(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:er,formatHex:er,formatHex8:function(){return`#${es(this.r)}${es(this.g)}${es(this.b)}${es((isNaN(this.opacity)?1:this.opacity)*255)}`},formatRgb:ei,toString:ei})),tj(eh,function(t,e,r,i){return 1==arguments.length?el(t):new eh(t,e,r,null==i?1:i)},tN(tH,{brighter(t){return t=null==t?tU:Math.pow(tU,t),new eh(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new eh(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*e,o=2*r-i;return new ee(eu(t>=240?t-240:t+120,o,i),eu(t,o,i),eu(t<120?t+240:t-120,o,i),this.opacity)},clamp(){return new eh(ec(this.h),ed(this.s),ed(this.l),eo(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(){let t=eo(this.opacity);return`${1===t?"hsl(":"hsla("}${ec(this.h)}, ${100*ed(this.s)}%, ${100*ed(this.l)}%${1===t?")":`, ${t})`}`}}));var eg=t=>()=>t;function ep(t,e){return function(r){return t+r*e}}function ef(t,e){var r=e-t;return r?ep(t,r):eg(isNaN(t)?e:t)}var ey=function t(e){var r,i=1==(r=+e)?ef:function(t,e){var i,o,a;return e-t?(i=t,o=e,i=Math.pow(i,a=r),o=Math.pow(o,a)-i,a=1/a,function(t){return Math.pow(i+t*o,a)}):eg(isNaN(t)?e:t)};function o(t,e){var r=i((t=et(t)).r,(e=et(e)).r),o=i(t.g,e.g),a=i(t.b,e.b),s=ef(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=o(e),t.b=a(e),t.opacity=s(e),t+""}}return o.gamma=t,o}(1),em=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,eC=RegExp(em.source,"g");function ex(t,e){var r,i,o,a,s,n=em.lastIndex=eC.lastIndex=0,l=-1,h=[],c=[];for(t+="",e+="";(o=em.exec(t))&&(a=eC.exec(e));)(s=a.index)>n&&(s=e.slice(n,s),h[l]?h[l]+=s:h[++l]=s),(o=o[0])===(a=a[0])?h[l]?h[l]+=a:h[++l]=a:(h[++l]=null,c.push({i:l,x:tO(o,a)})),n=eC.lastIndex;return n<e.length&&(s=e.slice(n),h[l]?h[l]+=s:h[++l]=s),h.length<2?c[0]?(r=c[0].x,function(t){return r(t)+""}):(i=e,function(){return i}):(e=c.length,function(t){for(var r,i=0;i<e;++i)h[(r=c[i]).i]=r.x(t);return h.join("")})}function eb(t,e){var r;return("number"==typeof e?tO:e instanceof t6?ey:(r=t6(e))?(e=r,ey):ex)(t,e)}var ek=J.prototype.constructor;function ew(t){return function(){this.style.removeProperty(t)}}var eB=0;function eT(t,e,r,i){this._groups=t,this._parents=e,this._name=r,this._id=i}var eS=J.prototype;eT.prototype=(function(t){return J().transition(t)}).prototype={constructor:eT,select:function(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=g(t));for(var i=this._groups,o=i.length,a=Array(o),s=0;s<o;++s)for(var n,l,h=i[s],c=h.length,d=a[s]=Array(c),u=0;u<c;++u)(n=h[u])&&(l=t.call(n,n.__data__,u,h))&&("__data__"in n&&(l.__data__=n.__data__),d[u]=l,tM(d[u],e,r,u,d,tK(n,r)));return new eT(a,this._parents,e,r)},selectAll:function(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=f(t));for(var i=this._groups,o=i.length,a=[],s=[],n=0;n<o;++n)for(var l,h=i[n],c=h.length,d=0;d<c;++d)if(l=h[d]){for(var u,g=t.call(l,l.__data__,d,h),p=tK(l,r),y=0,m=g.length;y<m;++y)(u=g[y])&&tM(u,e,r,y,g,p);a.push(g),s.push(l)}return new eT(a,s,e,r)},selectChild:eS.selectChild,selectChildren:eS.selectChildren,filter:function(t){"function"!=typeof t&&(t=y(t));for(var e=this._groups,r=e.length,i=Array(r),o=0;o<r;++o)for(var a,s=e[o],n=s.length,l=i[o]=[],h=0;h<n;++h)(a=s[h])&&t.call(a,a.__data__,h,s)&&l.push(a);return new eT(i,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw Error();for(var e=this._groups,r=t._groups,i=e.length,o=r.length,a=Math.min(i,o),s=Array(i),n=0;n<a;++n)for(var l,h=e[n],c=r[n],d=h.length,u=s[n]=Array(d),g=0;g<d;++g)(l=h[g]||c[g])&&(u[g]=l);for(;n<i;++n)s[n]=e[n];return new eT(s,this._parents,this._name,this._id)},selection:function(){return new ek(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,r=++eB,i=this._groups,o=i.length,a=0;a<o;++a)for(var s,n=i[a],l=n.length,h=0;h<l;++h)if(s=n[h]){var c=tK(s,e);tM(s,t,r,h,n,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new eT(i,this._parents,t,r)},call:eS.call,nodes:eS.nodes,node:eS.node,size:eS.size,empty:eS.empty,each:eS.each,on:function(t,e){var r,i,o,a,s,n,l=this._id;return arguments.length<2?tK(this.node(),l).on.on(t):this.each((r=l,i=t,o=e,n=(i+"").trim().split(/^|\s+/).every(function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t})?t$:tE,function(){var t=n(this,r),e=t.on;e!==a&&(s=(a=e).copy()).on(i,o),t.on=s}))},attr:function(t,e){var r=M(t),i="transform"===r?tz:eb;return this.attrTween(t,"function"==typeof e?(r.local?function(t,e,r){var i,o,a;return function(){var s,n,l=r(this);return null==l?void this.removeAttributeNS(t.space,t.local):(s=this.getAttributeNS(t.space,t.local))===(n=l+"")?null:s===i&&n===o?a:(o=n,a=e(i=s,l))}}:function(t,e,r){var i,o,a;return function(){var s,n,l=r(this);return null==l?void this.removeAttribute(t):(s=this.getAttribute(t))===(n=l+"")?null:s===i&&n===o?a:(o=n,a=e(i=s,l))}})(r,i,tR(this,"attr."+t,e)):null==e?(r.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}})(r):(r.local?function(t,e,r){var i,o,a=r+"";return function(){var s=this.getAttributeNS(t.space,t.local);return s===a?null:s===i?o:o=e(i=s,r)}}:function(t,e,r){var i,o,a=r+"";return function(){var s=this.getAttribute(t);return s===a?null:s===i?o:o=e(i=s,r)}})(r,i,e))},attrTween:function(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw Error();var i=M(t);return this.tween(r,(i.local?function(t,e){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&function(e){this.setAttributeNS(t.space,t.local,o.call(this,e))}),r}return o._value=e,o}:function(t,e){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&function(e){this.setAttribute(t,o.call(this,e))}),r}return o._value=e,o})(i,e))},style:function(t,e,r){var i,o,a,s,n,l,h,c,d,u,g,p,f,y,m,C,x,b,k,w,B,T="transform"==(t+="")?tW:eb;return null==e?this.styleTween(t,(i=t,function(){var t=E(this,i),e=(this.style.removeProperty(i),E(this,i));return t===e?null:t===o&&e===a?s:s=T(o=t,a=e)})).on("end.style."+t,ew(t)):"function"==typeof e?this.styleTween(t,(n=t,l=tR(this,"style."+t,e),function(){var t=E(this,n),e=l(this),r=e+"";return null==e&&(this.style.removeProperty(n),r=e=E(this,n)),t===r?null:t===h&&r===c?d:(c=r,d=T(h=t,e))})).each((u=this._id,x="end."+(C="style."+(g=t)),function(){var t=tE(this,u),e=t.on,r=null==t.value[C]?m||(m=ew(g)):void 0;(e!==p||y!==r)&&(f=(p=e).copy()).on(x,y=r),t.on=f})):this.styleTween(t,(b=t,B=e+"",function(){var t=E(this,b);return t===B?null:t===k?w:w=T(k=t,e)}),r).on("end.style."+t,null)},styleTween:function(t,e,r){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==e)return this.tween(i,null);if("function"!=typeof e)throw Error();return this.tween(i,function(t,e,r){var i,o;function a(){var a=e.apply(this,arguments);return a!==o&&(i=(o=a)&&function(e){this.style.setProperty(t,a.call(this,e),r)}),i}return a._value=e,a}(t,e,null==r?"":r))},text:function(t){var e,r;return this.tween("text","function"==typeof t?(e=tR(this,"text",t),function(){var t=e(this);this.textContent=null==t?"":t}):(r=null==t?"":t+"",function(){this.textContent=r}))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw Error();return this.tween(e,function(t){var e,r;function i(){var i=t.apply(this,arguments);return i!==r&&(e=(r=i)&&function(t){this.textContent=i.call(this,t)}),e}return i._value=t,i}(t))},remove:function(){var t;return this.on("end.remove",(t=this._id,function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}))},tween:function(t,e){var r=this._id;if(t+="",arguments.length<2){for(var i,o=tK(this.node(),r).tween,a=0,s=o.length;a<s;++a)if((i=o[a]).name===t)return i.value;return null}return this.each((null==e?function(t,e){var r,i;return function(){var o=tE(this,t),a=o.tween;if(a!==r){i=r=a;for(var s=0,n=i.length;s<n;++s)if(i[s].name===e){(i=i.slice()).splice(s,1);break}}o.tween=i}}:function(t,e,r){var i,o;if("function"!=typeof r)throw Error();return function(){var a=tE(this,t),s=a.tween;if(s!==i){o=(i=s).slice();for(var n={name:e,value:r},l=0,h=o.length;l<h;++l)if(o[l].name===e){o[l]=n;break}l===h&&o.push(n)}a.tween=o}})(r,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?function(t,e){return function(){t$(this,t).delay=+e.apply(this,arguments)}}:function(t,e){return e*=1,function(){t$(this,t).delay=e}})(e,t)):tK(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?function(t,e){return function(){tE(this,t).duration=+e.apply(this,arguments)}}:function(t,e){return e*=1,function(){tE(this,t).duration=e}})(e,t)):tK(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw Error();return function(){tE(this,t).ease=e}}(e,t)):tK(this.node(),e).ease},easeVarying:function(t){var e;if("function"!=typeof t)throw Error();return this.each((e=this._id,function(){var r=t.apply(this,arguments);if("function"!=typeof r)throw Error();tE(this,e).ease=r}))},end:function(){var t,e,r=this,i=r._id,o=r.size();return new Promise(function(a,s){var n={value:s},l={value:function(){0==--o&&a()}};r.each(function(){var r=tE(this,i),o=r.on;o!==t&&((e=(t=o).copy())._.cancel.push(n),e._.interrupt.push(n),e._.end.push(l)),r.on=e}),0===o&&a()})},[Symbol.iterator]:eS[Symbol.iterator]};var ev={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};J.prototype.interrupt=function(t){return this.each(function(){!function(t,e){var r,i,o,a=t.__transition,s=!0;if(a){for(o in e=null==e?null:e+"",a){if((r=a[o]).name!==e){s=!1;continue}i=r.state>2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete a[o]}s&&delete t.__transition}}(this,t)})},J.prototype.transition=function(t){var e,r;t instanceof eT?(e=t._id,t=t._name):(e=++eB,(r=ev).time=tk(),t=null==t?null:t+"");for(var i=this._groups,o=i.length,a=0;a<o;++a)for(var s,n=i[a],l=n.length,h=0;h<l;++h)(s=n[h])&&tM(s,t,e,h,n,r||function(t,e){for(var r;!(r=t.__transition)||!(r=r[e]);)if(!(t=t.parentNode))throw Error(`transition ${e} not found`);return r}(s,e));return new eT(i,this._parents,t,e)};let{abs:e_,max:eF,min:eL}=Math;function eA(t){return{type:t}}function eM(t,e){if(!isFinite(t)||0===t)return null;var r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"),i=t.slice(0,r);return[i.length>1?i[0]+i.slice(2):i,+t.slice(r+1)]}function e$(t){return(t=eM(Math.abs(t)))?t[1]:0/0}["w","e"].map(eA),["n","s"].map(eA),["n","w","e","s","nw","ne","sw","se"].map(eA);var eE=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function eK(t){var e;if(!(e=eE.exec(t)))throw Error("invalid format: "+t);return new eO({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function eO(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function eD(t,e){var r=eM(t,e);if(!r)return t+"";var i=r[0],o=r[1];return o<0?"0."+Array(-o).join("0")+i:i.length>o+1?i.slice(0,o+1)+"."+i.slice(o+1):i+Array(o-i.length+2).join("0")}eK.prototype=eO.prototype,eO.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var eq={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>eD(100*t,e),r:eD,s:function(t,e){var r=eM(t,e);if(!r)return ta=void 0,t.toPrecision(e);var i=r[0],o=r[1],a=o-(ta=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,s=i.length;return a===s?i:a>s?i+Array(a-s+1).join("0"):a>0?i.slice(0,a)+"."+i.slice(a):"0."+Array(1-a).join("0")+eM(t,Math.max(0,e+a-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function eI(t){return t}var eP=Array.prototype.map,eW=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function ez(t){var e=0,r=t.children,i=r&&r.length;if(i)for(;--i>=0;)e+=r[i].value;else e=1;t.value=e}function eR(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=eN)):void 0===e&&(e=ej);for(var r,i,o,a,s,n=new eY(t),l=[n];r=l.pop();)if((o=e(r.data))&&(s=(o=Array.from(o)).length))for(r.children=o,a=s-1;a>=0;--a)l.push(i=o[a]=new eY(o[a])),i.parent=r,i.depth=r.depth+1;return n.eachBefore(eU)}function ej(t){return t.children}function eN(t){return Array.isArray(t)?t[1]:null}function eH(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function eU(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function eY(t){this.data=t,this.depth=this.height=0,this.parent=null}function eX(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}tn=(ts=function(t){var e,r,i,o=void 0===t.grouping||void 0===t.thousands?eI:(e=eP.call(t.grouping,Number),r=t.thousands+"",function(t,i){for(var o=t.length,a=[],s=0,n=e[0],l=0;o>0&&n>0&&(l+n+1>i&&(n=Math.max(1,i-l)),a.push(t.substring(o-=n,o+n)),!((l+=n+1)>i));)n=e[s=(s+1)%e.length];return a.reverse().join(r)}),a=void 0===t.currency?"":t.currency[0]+"",s=void 0===t.currency?"":t.currency[1]+"",n=void 0===t.decimal?".":t.decimal+"",l=void 0===t.numerals?eI:(i=eP.call(t.numerals,String),function(t){return t.replace(/[0-9]/g,function(t){return i[+t]})}),h=void 0===t.percent?"%":t.percent+"",c=void 0===t.minus?"−":t.minus+"",d=void 0===t.nan?"NaN":t.nan+"";function u(t,e){var r=(t=eK(t)).fill,i=t.align,u=t.sign,g=t.symbol,p=t.zero,f=t.width,y=t.comma,m=t.precision,C=t.trim,x=t.type;"n"===x?(y=!0,x="g"):eq[x]||(void 0===m&&(m=12),C=!0,x="g"),(p||"0"===r&&"="===i)&&(p=!0,r="0",i="=");var b=(e&&void 0!==e.prefix?e.prefix:"")+("$"===g?a:"#"===g&&/[boxX]/.test(x)?"0"+x.toLowerCase():""),k=("$"===g?s:/[%p]/.test(x)?h:"")+(e&&void 0!==e.suffix?e.suffix:""),w=eq[x],B=/[defgprs%]/.test(x);function T(t){var e,a,s,h=b,g=k;if("c"===x)g=w(t)+g,t="";else{var T=(t*=1)<0||1/t<0;if(t=isNaN(t)?d:w(Math.abs(t),m),C&&(t=function(t){t:for(var e,r=t.length,i=1,o=-1;i<r;++i)switch(t[i]){case".":o=e=i;break;case"0":0===o&&(o=i),e=i;break;default:if(!+t[i])break t;o>0&&(o=0)}return o>0?t.slice(0,o)+t.slice(e+1):t}(t)),T&&0==+t&&"+"!==u&&(T=!1),h=(T?"("===u?u:c:"-"===u||"("===u?"":u)+h,g=("s"!==x||isNaN(t)||void 0===ta?"":eW[8+ta/3])+g+(T&&"("===u?")":""),B){for(e=-1,a=t.length;++e<a;)if(48>(s=t.charCodeAt(e))||s>57){g=(46===s?n+t.slice(e+1):t.slice(e))+g,t=t.slice(0,e);break}}}y&&!p&&(t=o(t,1/0));var S=h.length+t.length+g.length,v=S<f?Array(f-S+1).join(r):"";switch(y&&p&&(t=o(v+t,v.length?f-g.length:1/0),v=""),i){case"<":t=h+t+g+v;break;case"=":t=h+v+t+g;break;case"^":t=v.slice(0,S=v.length>>1)+h+t+g+v.slice(S);break;default:t=v+h+t+g}return l(t)}return m=void 0===m?6:/[gprs]/.test(x)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),T.toString=function(){return t+""},T}return{format:u,formatPrefix:function(t,e){var r=3*Math.max(-8,Math.min(8,Math.floor(e$(e)/3))),i=Math.pow(10,-r),o=u(((t=eK(t)).type="f",t),{suffix:eW[8+r/3]});return function(t){return o(i*t)}}}}({thousands:",",grouping:[3],currency:["$",""]})).format,tl=ts.formatPrefix,eY.prototype=eR.prototype={constructor:eY,count:function(){return this.eachAfter(ez)},each:function(t,e){let r=-1;for(let i of this)t.call(e,i,++r,this);return this},eachAfter:function(t,e){for(var r,i,o,a=this,s=[a],n=[],l=-1;a=s.pop();)if(n.push(a),r=a.children)for(i=0,o=r.length;i<o;++i)s.push(r[i]);for(;a=n.pop();)t.call(e,a,++l,this);return this},eachBefore:function(t,e){for(var r,i,o=this,a=[o],s=-1;o=a.pop();)if(t.call(e,o,++s,this),r=o.children)for(i=r.length-1;i>=0;--i)a.push(r[i]);return this},find:function(t,e){let r=-1;for(let i of this)if(t.call(e,i,++r,this))return i},sum:function(t){return this.eachAfter(function(e){for(var r=+t(e.data)||0,i=e.children,o=i&&i.length;--o>=0;)r+=i[o].value;e.value=r})},sort:function(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})},path:function(t){for(var e=this,r=function(t,e){if(t===e)return t;var r=t.ancestors(),i=e.ancestors(),o=null;for(t=r.pop(),e=i.pop();t===e;)o=t,t=r.pop(),e=i.pop();return o}(e,t),i=[e];e!==r;)i.push(e=e.parent);for(var o=i.length;t!==r;)i.splice(o,0,t),t=t.parent;return i},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t},links:function(){var t=this,e=[];return t.each(function(r){r!==t&&e.push({source:r.parent,target:r})}),e},copy:function(){return eR(this).eachBefore(eH)},[Symbol.iterator]:function*(){var t,e,r,i,o=this,a=[o];do for(t=a.reverse(),a=[];o=t.pop();)if(yield o,e=o.children)for(r=0,i=e.length;r<i;++r)a.push(e[r]);while(a.length)}};var eG=function t(e){function r(t,r,i,o,a){!function(t,e,r,i,o,a){for(var s,n,l,h,c,d,u,g,p,f,y,m=[],C=e.children,x=0,b=0,k=C.length,w=e.value;x<k;){l=o-r,h=a-i;do c=C[b++].value;while(!c&&b<k)for(d=u=c,p=Math.max(u/(y=c*c*(f=Math.max(h/l,l/h)/(w*t))),y/d);b<k;++b){if(c+=n=C[b].value,n<d&&(d=n),n>u&&(u=n),(g=Math.max(u/(y=c*c*f),y/d))>p){c-=n;break}p=g}m.push(s={value:c,dice:l<h,children:C.slice(x,b)}),s.dice?function(t,e,r,i,o){for(var a,s=t.children,n=-1,l=s.length,h=t.value&&(i-e)/t.value;++n<l;)(a=s[n]).y0=r,a.y1=o,a.x0=e,a.x1=e+=a.value*h}(s,r,i,o,w?i+=h*c/w:a):function(t,e,r,i,o){for(var a,s=t.children,n=-1,l=s.length,h=t.value&&(o-r)/t.value;++n<l;)(a=s[n]).x0=e,a.x1=i,a.y0=r,a.y1=r+=a.value*h}(s,r,i,w?r+=l*c/w:o,a),w-=c,x=b}}(e,t,r,i,o,a)}return r.ratio=function(e){return t((e*=1)>1?e:1)},r}((1+Math.sqrt(5))/2);function eV(){return 0}function eZ(t){return function(){return t}}function eQ(){var t=eG,e=!1,r=1,i=1,o=[0],a=eV,s=eV,n=eV,l=eV,h=eV;function c(t){return t.x0=t.y0=0,t.x1=r,t.y1=i,t.eachBefore(d),o=[0],e&&t.eachBefore(eX),t}function d(e){var r=o[e.depth],i=e.x0+r,c=e.y0+r,d=e.x1-r,u=e.y1-r;d<i&&(i=d=(i+d)/2),u<c&&(c=u=(c+u)/2),e.x0=i,e.y0=c,e.x1=d,e.y1=u,e.children&&(r=o[e.depth+1]=a(e)/2,i+=h(e)-r,c+=s(e)-r,d-=n(e)-r,u-=l(e)-r,d<i&&(i=d=(i+d)/2),u<c&&(c=u=(c+u)/2),t(e,i,c,d,u))}return c.round=function(t){return arguments.length?(e=!!t,c):e},c.size=function(t){return arguments.length?(r=+t[0],i=+t[1],c):[r,i]},c.tile=function(e){return arguments.length?(t=function(t){if("function"!=typeof t)throw Error();return t}(e),c):t},c.padding=function(t){return arguments.length?c.paddingInner(t).paddingOuter(t):c.paddingInner()},c.paddingInner=function(t){return arguments.length?(a="function"==typeof t?t:eZ(+t),c):a},c.paddingOuter=function(t){return arguments.length?c.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):c.paddingTop()},c.paddingTop=function(t){return arguments.length?(s="function"==typeof t?t:eZ(+t),c):s},c.paddingRight=function(t){return arguments.length?(n="function"==typeof t?t:eZ(+t),c):n},c.paddingBottom=function(t){return arguments.length?(l="function"==typeof t?t:eZ(+t),c):l},c.paddingLeft=function(t){return arguments.length?(h="function"==typeof t?t:eZ(+t),c):h},c}let eJ=Math.PI/180,e0=180/Math.PI,e1=4/29,e2=6/29,e5=6/29*3*(6/29),e3=6/29*(6/29)*(6/29);function e4(t){if(t instanceof e6)return new e6(t.l,t.a,t.b,t.opacity);if(t instanceof rr)return ri(t);t instanceof ee||(t=t9(t));var e,r,i=rt(t.r),o=rt(t.g),a=rt(t.b),s=e8((.2225045*i+.7168786*o+.0606169*a)/1);return i===o&&o===a?e=r=s:(e=e8((.4360747*i+.3850649*o+.1430804*a)/.96422),r=e8((.0139322*i+.0971045*o+.7141733*a)/.82521)),new e6(116*s-16,500*(e-s),200*(s-r),t.opacity)}function e6(t,e,r,i){this.l=+t,this.a=+e,this.b=+r,this.opacity=+i}function e8(t){return t>e3?Math.pow(t,1/3):t/e5+e1}function e7(t){return t>e2?t*t*t:e5*(t-e1)}function e9(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function rt(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function re(t,e,r,i){return 1==arguments.length?function(t){if(t instanceof rr)return new rr(t.h,t.c,t.l,t.opacity);if(t instanceof e6||(t=e4(t)),0===t.a&&0===t.b)return new rr(0/0,0<t.l&&t.l<100?0:0/0,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*e0;return new rr(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}(t):new rr(t,e,r,null==i?1:i)}function rr(t,e,r,i){this.h=+t,this.c=+e,this.l=+r,this.opacity=+i}function ri(t){if(isNaN(t.h))return new e6(t.l,0,0,t.opacity);var e=t.h*eJ;return new e6(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}tj(e6,function(t,e,r,i){return 1==arguments.length?e4(t):new e6(t,e,r,null==i?1:i)},tN(tH,{brighter(t){return new e6(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker(t){return new e6(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,r=isNaN(this.b)?t:t-this.b/200;return e=.96422*e7(e),new ee(e9(3.1338561*e-1.6168667*(t=+e7(t))-.4906146*(r=.82521*e7(r))),e9(-.9787684*e+1.9161415*t+.033454*r),e9(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}})),tj(rr,re,tN(tH,{brighter(t){return new rr(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker(t){return new rr(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb(){return ri(this).rgb()}}));var ro=(C=function(t,e){var r=e-t;return r?ep(t,r>180||r<-180?r-360*Math.round(r/360):r):eg(isNaN(t)?e:t)},function(t,e){var r=C((t=re(t)).h,(e=re(e)).h),i=ef(t.c,e.c),o=ef(t.l,e.l),a=ef(t.opacity,e.opacity);return function(e){return t.h=r(e),t.c=i(e),t.l=o(e),t.opacity=a(e),t+""}});function ra(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}class rs extends Map{constructor(t,e=rl){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(let[e,r]of t)this.set(e,r)}get(t){return super.get(rn(this,t))}has(t){return super.has(rn(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},r){let i=e(r);return t.has(i)?t.get(i):(t.set(i,r),r)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},r){let i=e(r);return t.has(i)&&(r=t.get(i),t.delete(i)),r}(this,t))}}function rn({_intern:t,_key:e},r){let i=e(r);return t.has(i)?t.get(i):r}function rl(t){return null!==t&&"object"==typeof t?t.valueOf():t}let rh=Symbol("implicit");function rc(){var t=new rs,e=[],r=[],i=rh;function o(o){let a=t.get(o);if(void 0===a){if(i!==rh)return i;t.set(o,a=e.push(o)-1)}return r[a%r.length]}return o.domain=function(r){if(!arguments.length)return e.slice();for(let i of(e=[],t=new rs,r))t.has(i)||t.set(i,e.push(i)-1);return o},o.range=function(t){return arguments.length?(r=Array.from(t),o):r.slice()},o.unknown=function(t){return arguments.length?(i=t,o):i},o.copy=function(){return rc(e,r).unknown(i)},ra.apply(o,arguments),o}let rd=Math.sqrt(50),ru=Math.sqrt(10),rg=Math.sqrt(2);function rp(t,e,r){let i,o,a,s=(e-t)/Math.max(0,r),n=Math.floor(Math.log10(s)),l=s/Math.pow(10,n),h=l>=rd?10:l>=ru?5:l>=rg?2:1;return(n<0?(i=Math.round(t*(a=Math.pow(10,-n)/h)),o=Math.round(e*a),i/a<t&&++i,o/a>e&&--o,a=-a):(i=Math.round(t/(a=Math.pow(10,n)*h)),o=Math.round(e/a),i*a<t&&++i,o*a>e&&--o),o<i&&.5<=r&&r<2)?rp(t,e,2*r):[i,o,a]}function rf(t,e,r){return rp(t*=1,e*=1,r*=1)[2]}function ry(t,e,r){e*=1,t*=1,r*=1;let i=e<t,o=i?rf(e,t,r):rf(t,e,r);return(i?-1:1)*(o<0?-(1/o):o)}function rm(t,e){return null==t||null==e?0/0:t<e?-1:t>e?1:t>=e?0:0/0}function rC(t,e){return null==t||null==e?0/0:e<t?-1:e>t?1:e>=t?0:0/0}function rx(t){let e,r,i;function o(t,i,a=0,s=t.length){if(a<s){if(0!==e(i,i))return s;do{let e=a+s>>>1;0>r(t[e],i)?a=e+1:s=e}while(a<s)}return a}return 2!==t.length?(e=rm,r=(e,r)=>rm(t(e),r),i=(e,r)=>t(e)-r):(e=t===rm||t===rC?t:rb,r=t,i=t),{left:o,center:function(t,e,r=0,a=t.length){let s=o(t,e,r,a-1);return s>r&&i(t[s-1],e)>-i(t[s],e)?s-1:s},right:function(t,i,o=0,a=t.length){if(o<a){if(0!==e(i,i))return a;do{let e=o+a>>>1;0>=r(t[e],i)?o=e+1:a=e}while(o<a)}return o}}}function rb(){return 0}let rk=rx(rm),rw=rk.right;rk.left,rx(function(t){return null===t?0/0:+t}).center;function rB(t,e){return t*=1,e*=1,function(r){return Math.round(t*(1-r)+e*r)}}function rT(t){return+t}var rS=[0,1];function rv(t){return t}function r_(t,e){var r;return(e-=t*=1)?function(r){return(r-t)/e}:(r=isNaN(e)?0/0:.5,function(){return r})}function rF(t,e,r){var i=t[0],o=t[1],a=e[0],s=e[1];return o<i?(i=r_(o,i),a=r(s,a)):(i=r_(i,o),a=r(a,s)),function(t){return a(i(t))}}function rL(t,e,r){var i=Math.min(t.length,e.length)-1,o=Array(i),a=Array(i),s=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<i;)o[s]=r_(t[s],t[s+1]),a[s]=r(e[s],e[s+1]);return function(e){var r=rw(t,e,1,i)-1;return a[r](o[r](e))}}function rA(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function rM(){return(function(){var t,e,r,i,o,a,s=rS,n=rS,l=function t(e,r){var i,o,a=typeof r;return null==r||"boolean"===a?eg(r):("number"===a?tO:"string"===a?(o=t6(r))?(r=o,ey):ex:r instanceof t6?ey:r instanceof Date?function(t,e){var r=new Date;return t*=1,e*=1,function(i){return r.setTime(t*(1-i)+e*i),r}}:!ArrayBuffer.isView(i=r)||i instanceof DataView?Array.isArray(r)?function(e,r){var i,o=r?r.length:0,a=e?Math.min(o,e.length):0,s=Array(a),n=Array(o);for(i=0;i<a;++i)s[i]=t(e[i],r[i]);for(;i<o;++i)n[i]=r[i];return function(t){for(i=0;i<a;++i)n[i]=s[i](t);return n}}:"function"!=typeof r.valueOf&&"function"!=typeof r.toString||isNaN(r)?function(e,r){var i,o={},a={};for(i in(null===e||"object"!=typeof e)&&(e={}),(null===r||"object"!=typeof r)&&(r={}),r)i in e?o[i]=t(e[i],r[i]):a[i]=r[i];return function(t){for(i in o)a[i]=o[i](t);return a}}:tO:function(t,e){e||(e=[]);var r,i=t?Math.min(e.length,t.length):0,o=e.slice();return function(a){for(r=0;r<i;++r)o[r]=t[r]*(1-a)+e[r]*a;return o}})(e,r)},h=rv;function c(){var t,e,r,l=Math.min(s.length,n.length);return h!==rv&&(t=s[0],e=s[l-1],t>e&&(r=t,t=e,e=r),h=function(r){return Math.max(t,Math.min(e,r))}),i=l>2?rL:rF,o=a=null,d}function d(e){return null==e||isNaN(e*=1)?r:(o||(o=i(s.map(t),n,l)))(t(h(e)))}return d.invert=function(r){return h(e((a||(a=i(n,s.map(t),tO)))(r)))},d.domain=function(t){return arguments.length?(s=Array.from(t,rT),c()):s.slice()},d.range=function(t){return arguments.length?(n=Array.from(t),c()):n.slice()},d.rangeRound=function(t){return n=Array.from(t),l=rB,c()},d.clamp=function(t){return arguments.length?(h=!!t||rv,c()):h!==rv},d.interpolate=function(t){return arguments.length?(l=t,c()):l},d.unknown=function(t){return arguments.length?(r=t,d):r},function(r,i){return t=r,e=i,c()}})()(rv,rv)}let r$=new Date,rE=new Date;function rK(t,e,r,i){function o(e){return t(e=0==arguments.length?new Date:new Date(+e)),e}return o.floor=e=>(t(e=new Date(+e)),e),o.ceil=r=>(t(r=new Date(r-1)),e(r,1),t(r),r),o.round=t=>{let e=o(t),r=o.ceil(t);return t-e<r-t?e:r},o.offset=(t,r)=>(e(t=new Date(+t),null==r?1:Math.floor(r)),t),o.range=(r,i,a)=>{let s,n=[];if(r=o.ceil(r),a=null==a?1:Math.floor(a),!(r<i)||!(a>0))return n;do n.push(s=new Date(+r)),e(r,a),t(r);while(s<r&&r<i)return n},o.filter=r=>rK(e=>{if(e>=e)for(;t(e),!r(e);)e.setTime(e-1)},(t,i)=>{if(t>=t)if(i<0)for(;++i<=0;)for(;e(t,-1),!r(t););else for(;--i>=0;)for(;e(t,1),!r(t););}),r&&(o.count=(e,i)=>(r$.setTime(+e),rE.setTime(+i),t(r$),t(rE),Math.floor(r(r$,rE))),o.every=t=>isFinite(t=Math.floor(t))&&t>0?t>1?o.filter(i?e=>i(e)%t==0:e=>o.count(0,e)%t==0):o:null),o}let rO=rK(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);rO.every=t=>isFinite(t=Math.floor(t))&&t>0?t>1?rK(e=>{e.setTime(Math.floor(e/t)*t)},(e,r)=>{e.setTime(+e+r*t)},(e,r)=>(r-e)/t):rO:null,rO.range;let rD=rK(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+1e3*e)},(t,e)=>(e-t)/1e3,t=>t.getUTCSeconds());rD.range;let rq=rK(t=>{t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())},(t,e)=>{t.setTime(+t+6e4*e)},(t,e)=>(e-t)/6e4,t=>t.getMinutes());rq.range;let rI=rK(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+6e4*e)},(t,e)=>(e-t)/6e4,t=>t.getUTCMinutes());rI.range;let rP=rK(t=>{t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-6e4*t.getMinutes())},(t,e)=>{t.setTime(+t+36e5*e)},(t,e)=>(e-t)/36e5,t=>t.getHours());rP.range;let rW=rK(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+36e5*e)},(t,e)=>(e-t)/36e5,t=>t.getUTCHours());rW.range;let rz=rK(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*6e4)/864e5,t=>t.getDate()-1);rz.range;let rR=rK(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>t.getUTCDate()-1);rR.range;let rj=rK(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>Math.floor(t/864e5));function rN(t){return rK(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(t,e)=>{t.setDate(t.getDate()+7*e)},(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*6e4)/6048e5)}rj.range;let rH=rN(0),rU=rN(1),rY=rN(2),rX=rN(3),rG=rN(4),rV=rN(5),rZ=rN(6);function rQ(t){return rK(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+7*e)},(t,e)=>(e-t)/6048e5)}rH.range,rU.range,rY.range,rX.range,rG.range,rV.range,rZ.range;let rJ=rQ(0),r0=rQ(1),r1=rQ(2),r2=rQ(3),r5=rQ(4),r3=rQ(5),r4=rQ(6);rJ.range,r0.range,r1.range,r2.range,r5.range,r3.range,r4.range;let r6=rK(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());r6.range;let r8=rK(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());r8.range;let r7=rK(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());r7.every=t=>isFinite(t=Math.floor(t))&&t>0?rK(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r*t)}):null,r7.range;let r9=rK(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());function it(t,e,r,i,o,a){let s=[[rD,1,1e3],[rD,5,5e3],[rD,15,15e3],[rD,30,3e4],[a,1,6e4],[a,5,3e5],[a,15,9e5],[a,30,18e5],[o,1,36e5],[o,3,108e5],[o,6,216e5],[o,12,432e5],[i,1,864e5],[i,2,1728e5],[r,1,6048e5],[e,1,2592e6],[e,3,7776e6],[t,1,31536e6]];function n(e,r,i){let o=Math.abs(r-e)/i,a=rx(([,,t])=>t).right(s,o);if(a===s.length)return t.every(ry(e/31536e6,r/31536e6,i));if(0===a)return rO.every(Math.max(ry(e,r,i),1));let[n,l]=s[o/s[a-1][2]<s[a][2]/o?a-1:a];return n.every(l)}return[function(t,e,r){let i=e<t;i&&([t,e]=[e,t]);let o=r&&"function"==typeof r.range?r:n(t,e,r),a=o?o.range(t,+e+1):[];return i?a.reverse():a},n]}r9.every=t=>isFinite(t=Math.floor(t))&&t>0?rK(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r*t)}):null,r9.range;let[ie,ir]=it(r9,r8,rJ,rj,rW,rI),[ii,io]=it(r7,r6,rH,rz,rP,rq);function ia(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function is(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function il(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}var ih={"-":"",_:" ",0:"0"},ic=/^\s*\d+/,id=/^%/,iu=/[\\^$*+?|[\]().{}]/g;function ig(t,e,r){var i=t<0?"-":"",o=(i?-t:t)+"",a=o.length;return i+(a<r?Array(r-a+1).join(e)+o:o)}function ip(t){return t.replace(iu,"\\$&")}function iy(t){return RegExp("^(?:"+t.map(ip).join("|")+")","i")}function im(t){return new Map(t.map((t,e)=>[t.toLowerCase(),e]))}function iC(t,e,r){var i=ic.exec(e.slice(r,r+1));return i?(t.w=+i[0],r+i[0].length):-1}function ix(t,e,r){var i=ic.exec(e.slice(r,r+1));return i?(t.u=+i[0],r+i[0].length):-1}function ib(t,e,r){var i=ic.exec(e.slice(r,r+2));return i?(t.U=+i[0],r+i[0].length):-1}function ik(t,e,r){var i=ic.exec(e.slice(r,r+2));return i?(t.V=+i[0],r+i[0].length):-1}function iw(t,e,r){var i=ic.exec(e.slice(r,r+2));return i?(t.W=+i[0],r+i[0].length):-1}function iB(t,e,r){var i=ic.exec(e.slice(r,r+4));return i?(t.y=+i[0],r+i[0].length):-1}function iT(t,e,r){var i=ic.exec(e.slice(r,r+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),r+i[0].length):-1}function iS(t,e,r){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),r+i[0].length):-1}function iv(t,e,r){var i=ic.exec(e.slice(r,r+1));return i?(t.q=3*i[0]-3,r+i[0].length):-1}function i_(t,e,r){var i=ic.exec(e.slice(r,r+2));return i?(t.m=i[0]-1,r+i[0].length):-1}function iF(t,e,r){var i=ic.exec(e.slice(r,r+2));return i?(t.d=+i[0],r+i[0].length):-1}function iL(t,e,r){var i=ic.exec(e.slice(r,r+3));return i?(t.m=0,t.d=+i[0],r+i[0].length):-1}function iA(t,e,r){var i=ic.exec(e.slice(r,r+2));return i?(t.H=+i[0],r+i[0].length):-1}function iM(t,e,r){var i=ic.exec(e.slice(r,r+2));return i?(t.M=+i[0],r+i[0].length):-1}function i$(t,e,r){var i=ic.exec(e.slice(r,r+2));return i?(t.S=+i[0],r+i[0].length):-1}function iE(t,e,r){var i=ic.exec(e.slice(r,r+3));return i?(t.L=+i[0],r+i[0].length):-1}function iK(t,e,r){var i=ic.exec(e.slice(r,r+6));return i?(t.L=Math.floor(i[0]/1e3),r+i[0].length):-1}function iO(t,e,r){var i=id.exec(e.slice(r,r+1));return i?r+i[0].length:-1}function iD(t,e,r){var i=ic.exec(e.slice(r));return i?(t.Q=+i[0],r+i[0].length):-1}function iq(t,e,r){var i=ic.exec(e.slice(r));return i?(t.s=+i[0],r+i[0].length):-1}function iI(t,e){return ig(t.getDate(),e,2)}function iP(t,e){return ig(t.getHours(),e,2)}function iW(t,e){return ig(t.getHours()%12||12,e,2)}function iz(t,e){return ig(1+rz.count(r7(t),t),e,3)}function iR(t,e){return ig(t.getMilliseconds(),e,3)}function ij(t,e){return iR(t,e)+"000"}function iN(t,e){return ig(t.getMonth()+1,e,2)}function iH(t,e){return ig(t.getMinutes(),e,2)}function iU(t,e){return ig(t.getSeconds(),e,2)}function iY(t){var e=t.getDay();return 0===e?7:e}function iX(t,e){return ig(rH.count(r7(t)-1,t),e,2)}function iG(t){var e=t.getDay();return e>=4||0===e?rG(t):rG.ceil(t)}function iV(t,e){return t=iG(t),ig(rG.count(r7(t),t)+(4===r7(t).getDay()),e,2)}function iZ(t){return t.getDay()}function iQ(t,e){return ig(rU.count(r7(t)-1,t),e,2)}function iJ(t,e){return ig(t.getFullYear()%100,e,2)}function i0(t,e){return ig((t=iG(t)).getFullYear()%100,e,2)}function i1(t,e){return ig(t.getFullYear()%1e4,e,4)}function i2(t,e){var r=t.getDay();return ig((t=r>=4||0===r?rG(t):rG.ceil(t)).getFullYear()%1e4,e,4)}function i5(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+ig(e/60|0,"0",2)+ig(e%60,"0",2)}function i3(t,e){return ig(t.getUTCDate(),e,2)}function i4(t,e){return ig(t.getUTCHours(),e,2)}function i6(t,e){return ig(t.getUTCHours()%12||12,e,2)}function i8(t,e){return ig(1+rR.count(r9(t),t),e,3)}function i7(t,e){return ig(t.getUTCMilliseconds(),e,3)}function i9(t,e){return i7(t,e)+"000"}function ot(t,e){return ig(t.getUTCMonth()+1,e,2)}function oe(t,e){return ig(t.getUTCMinutes(),e,2)}function or(t,e){return ig(t.getUTCSeconds(),e,2)}function oi(t){var e=t.getUTCDay();return 0===e?7:e}function oo(t,e){return ig(rJ.count(r9(t)-1,t),e,2)}function oa(t){var e=t.getUTCDay();return e>=4||0===e?r5(t):r5.ceil(t)}function os(t,e){return t=oa(t),ig(r5.count(r9(t),t)+(4===r9(t).getUTCDay()),e,2)}function on(t){return t.getUTCDay()}function ol(t,e){return ig(r0.count(r9(t)-1,t),e,2)}function oh(t,e){return ig(t.getUTCFullYear()%100,e,2)}function oc(t,e){return ig((t=oa(t)).getUTCFullYear()%100,e,2)}function od(t,e){return ig(t.getUTCFullYear()%1e4,e,4)}function ou(t,e){var r=t.getUTCDay();return ig((t=r>=4||0===r?r5(t):r5.ceil(t)).getUTCFullYear()%1e4,e,4)}function og(){return"+0000"}function op(){return"%"}function of(t){return+t}function oy(t){return Math.floor(t/1e3)}function om(t){return new Date(t)}function oC(t){return t instanceof Date?+t:+new Date(+t)}function ox(){return ra.apply((function t(e,r,i,o,a,s,n,l,h,c){var d=rM(),u=d.invert,g=d.domain,p=c(".%L"),f=c(":%S"),y=c("%I:%M"),m=c("%I %p"),C=c("%a %d"),x=c("%b %d"),b=c("%B"),k=c("%Y");function w(t){return(h(t)<t?p:l(t)<t?f:n(t)<t?y:s(t)<t?m:o(t)<t?a(t)<t?C:x:i(t)<t?b:k)(t)}return d.invert=function(t){return new Date(u(t))},d.domain=function(t){return arguments.length?g(Array.from(t,oC)):g().map(om)},d.ticks=function(t){var r=g();return e(r[0],r[r.length-1],null==t?10:t)},d.tickFormat=function(t,e){return null==e?w:c(e)},d.nice=function(t){var e,i,o,a,s,n,l,h=g();return t&&"function"==typeof t.range||(t=r(h[0],h[h.length-1],null==t?10:t)),t?g((e=h,i=t,e=e.slice(),a=0,s=e.length-1,n=e[a],(l=e[s])<n&&(o=a,a=s,s=o,o=n,n=l,l=o),e[a]=i.floor(n),e[s]=i.ceil(l),e)):d},d.copy=function(){return rA(d,t(e,r,i,o,a,s,n,l,h,c))},d})(ii,io,r7,r6,rH,rz,rP,rq,rD,tc).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}tc=(th=function(t){var e=t.dateTime,r=t.date,i=t.time,o=t.periods,a=t.days,s=t.shortDays,n=t.months,l=t.shortMonths,h=iy(o),c=im(o),d=iy(a),u=im(a),g=iy(s),p=im(s),f=iy(n),y=im(n),m=iy(l),C=im(l),x={a:function(t){return s[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return l[t.getMonth()]},B:function(t){return n[t.getMonth()]},c:null,d:iI,e:iI,f:ij,g:i0,G:i2,H:iP,I:iW,j:iz,L:iR,m:iN,M:iH,p:function(t){return o[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:of,s:oy,S:iU,u:iY,U:iX,V:iV,w:iZ,W:iQ,x:null,X:null,y:iJ,Y:i1,Z:i5,"%":op},b={a:function(t){return s[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return l[t.getUTCMonth()]},B:function(t){return n[t.getUTCMonth()]},c:null,d:i3,e:i3,f:i9,g:oc,G:ou,H:i4,I:i6,j:i8,L:i7,m:ot,M:oe,p:function(t){return o[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:of,s:oy,S:or,u:oi,U:oo,V:os,w:on,W:ol,x:null,X:null,y:oh,Y:od,Z:og,"%":op},k={a:function(t,e,r){var i=g.exec(e.slice(r));return i?(t.w=p.get(i[0].toLowerCase()),r+i[0].length):-1},A:function(t,e,r){var i=d.exec(e.slice(r));return i?(t.w=u.get(i[0].toLowerCase()),r+i[0].length):-1},b:function(t,e,r){var i=m.exec(e.slice(r));return i?(t.m=C.get(i[0].toLowerCase()),r+i[0].length):-1},B:function(t,e,r){var i=f.exec(e.slice(r));return i?(t.m=y.get(i[0].toLowerCase()),r+i[0].length):-1},c:function(t,r,i){return T(t,e,r,i)},d:iF,e:iF,f:iK,g:iT,G:iB,H:iA,I:iA,j:iL,L:iE,m:i_,M:iM,p:function(t,e,r){var i=h.exec(e.slice(r));return i?(t.p=c.get(i[0].toLowerCase()),r+i[0].length):-1},q:iv,Q:iD,s:iq,S:i$,u:ix,U:ib,V:ik,w:iC,W:iw,x:function(t,e,i){return T(t,r,e,i)},X:function(t,e,r){return T(t,i,e,r)},y:iT,Y:iB,Z:iS,"%":iO};function w(t,e){return function(r){var i,o,a,s=[],n=-1,l=0,h=t.length;for(r instanceof Date||(r=new Date(+r));++n<h;)37===t.charCodeAt(n)&&(s.push(t.slice(l,n)),null!=(o=ih[i=t.charAt(++n)])?i=t.charAt(++n):o="e"===i?" ":"0",(a=e[i])&&(i=a(r,o)),s.push(i),l=n+1);return s.push(t.slice(l,n)),s.join("")}}function B(t,e){return function(r){var i,o,a=il(1900,void 0,1);if(T(a,t,r+="",0)!=r.length)return null;if("Q"in a)return new Date(a.Q);if("s"in a)return new Date(1e3*a.s+("L"in a?a.L:0));if(!e||"Z"in a||(a.Z=0),"p"in a&&(a.H=a.H%12+12*a.p),void 0===a.m&&(a.m="q"in a?a.q:0),"V"in a){if(a.V<1||a.V>53)return null;"w"in a||(a.w=1),"Z"in a?(i=(o=(i=is(il(a.y,0,1))).getUTCDay())>4||0===o?r0.ceil(i):r0(i),i=rR.offset(i,(a.V-1)*7),a.y=i.getUTCFullYear(),a.m=i.getUTCMonth(),a.d=i.getUTCDate()+(a.w+6)%7):(i=(o=(i=ia(il(a.y,0,1))).getDay())>4||0===o?rU.ceil(i):rU(i),i=rz.offset(i,(a.V-1)*7),a.y=i.getFullYear(),a.m=i.getMonth(),a.d=i.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:+("W"in a)),o="Z"in a?is(il(a.y,0,1)).getUTCDay():ia(il(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(o+5)%7:a.w+7*a.U-(o+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,is(a)):ia(a)}}function T(t,e,r,i){for(var o,a,s=0,n=e.length,l=r.length;s<n;){if(i>=l)return -1;if(37===(o=e.charCodeAt(s++))){if(!(a=k[(o=e.charAt(s++))in ih?e.charAt(s++):o])||(i=a(t,r,i))<0)return -1}else if(o!=r.charCodeAt(i++))return -1}return i}return x.x=w(r,x),x.X=w(i,x),x.c=w(e,x),b.x=w(r,b),b.X=w(i,b),b.c=w(e,b),{format:function(t){var e=w(t+="",x);return e.toString=function(){return t},e},parse:function(t){var e=B(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=w(t+="",b);return e.toString=function(){return t},e},utcParse:function(t){var e=B(t+="",!0);return e.toString=function(){return t},e}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]})).format,th.parse,th.utcFormat,th.utcParse;var ob=function(t){for(var e=t.length/6|0,r=Array(e),i=0;i<e;)r[i]="#"+t.slice(6*i,6*++i);return r}("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function ok(t){return"string"==typeof t?new Q([[document.querySelector(t)]],[document.documentElement]):new Q([[t]],Z)}function ow(t){return function(){return t}}let oB=Math.abs,oT=Math.atan2,oS=Math.cos,ov=Math.max,o_=Math.min,oF=Math.sin,oL=Math.sqrt,oA=Math.PI,oM=oA/2,o$=2*oA;function oE(t){return t>=1?oM:t<=-1?-oM:Math.asin(t)}let oK=Math.PI,oO=2*oK,oD=oO-1e-6;function oq(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=arguments[e]+t[e]}class oI{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?oq:function(t){let e=Math.floor(t);if(!(e>=0))throw Error(`invalid digits: ${t}`);if(e>15)return oq;let r=10**e;return function(t){this._+=t[0];for(let e=1,i=t.length;e<i;++e)this._+=Math.round(arguments[e]*r)/r+t[e]}}(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,r,i){this._append`Q${+t},${+e},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,e,r,i,o,a){this._append`C${+t},${+e},${+r},${+i},${this._x1=+o},${this._y1=+a}`}arcTo(t,e,r,i,o){if(t*=1,e*=1,r*=1,i*=1,(o*=1)<0)throw Error(`negative radius: ${o}`);let a=this._x1,s=this._y1,n=r-t,l=i-e,h=a-t,c=s-e,d=h*h+c*c;if(null===this._x1)this._append`M${this._x1=t},${this._y1=e}`;else if(d>1e-6)if(Math.abs(c*n-l*h)>1e-6&&o){let u=r-a,g=i-s,p=n*n+l*l,f=Math.sqrt(p),y=Math.sqrt(d),m=o*Math.tan((oK-Math.acos((p+d-(u*u+g*g))/(2*f*y)))/2),C=m/y,x=m/f;Math.abs(C-1)>1e-6&&this._append`L${t+C*h},${e+C*c}`,this._append`A${o},${o},0,0,${+(c*u>h*g)},${this._x1=t+x*n},${this._y1=e+x*l}`}else this._append`L${this._x1=t},${this._y1=e}`}arc(t,e,r,i,o,a){if(t*=1,e*=1,r*=1,a=!!a,r<0)throw Error(`negative radius: ${r}`);let s=r*Math.cos(i),n=r*Math.sin(i),l=t+s,h=e+n,c=1^a,d=a?i-o:o-i;null===this._x1?this._append`M${l},${h}`:(Math.abs(this._x1-l)>1e-6||Math.abs(this._y1-h)>1e-6)&&this._append`L${l},${h}`,r&&(d<0&&(d=d%oO+oO),d>oD?this._append`A${r},${r},0,1,${c},${t-s},${e-n}A${r},${r},0,1,${c},${this._x1=l},${this._y1=h}`:d>1e-6&&this._append`A${r},${r},0,${+(d>=oK)},${c},${this._x1=t+r*Math.cos(o)},${this._y1=e+r*Math.sin(o)}`)}rect(t,e,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${r*=1}v${+i}h${-r}Z`}toString(){return this._}}function oP(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(null==r)e=null;else{let t=Math.floor(r);if(!(t>=0))throw RangeError(`invalid digits: ${r}`);e=t}return t},()=>new oI(e)}function oW(t){return t.innerRadius}function oz(t){return t.outerRadius}function oR(t){return t.startAngle}function oj(t){return t.endAngle}function oN(t){return t&&t.padAngle}function oH(t,e,r,i,o,a,s){var n=t-r,l=e-i,h=(s?a:-a)/oL(n*n+l*l),c=h*l,d=-h*n,u=t+c,g=e+d,p=r+c,f=i+d,y=(u+p)/2,m=(g+f)/2,C=p-u,x=f-g,b=C*C+x*x,k=o-a,w=u*f-p*g,B=(x<0?-1:1)*oL(ov(0,k*k*b-w*w)),T=(w*x-C*B)/b,S=(-w*C-x*B)/b,v=(w*x+C*B)/b,_=(-w*C+x*B)/b,F=T-y,L=S-m,A=v-y,M=_-m;return F*F+L*L>A*A+M*M&&(T=v,S=_),{cx:T,cy:S,x01:-c,y01:-d,x11:T*(o/k-1),y11:S*(o/k-1)}}function oU(){var t=oW,e=oz,r=ow(0),i=null,o=oR,a=oj,s=oN,n=null,l=oP(h);function h(){var h,c,d=+t.apply(this,arguments),u=+e.apply(this,arguments),g=o.apply(this,arguments)-oM,p=a.apply(this,arguments)-oM,f=oB(p-g),y=p>g;if(n||(n=h=l()),u<d&&(c=u,u=d,d=c),u>1e-12)if(f>o$-1e-12)n.moveTo(u*oS(g),u*oF(g)),n.arc(0,0,u,g,p,!y),d>1e-12&&(n.moveTo(d*oS(p),d*oF(p)),n.arc(0,0,d,p,g,y));else{var m,C,x=g,b=p,k=g,w=p,B=f,T=f,S=s.apply(this,arguments)/2,v=S>1e-12&&(i?+i.apply(this,arguments):oL(d*d+u*u)),_=o_(oB(u-d)/2,+r.apply(this,arguments)),F=_,L=_;if(v>1e-12){var A=oE(v/d*oF(S)),M=oE(v/u*oF(S));(B-=2*A)>1e-12?(A*=y?1:-1,k+=A,w-=A):(B=0,k=w=(g+p)/2),(T-=2*M)>1e-12?(M*=y?1:-1,x+=M,b-=M):(T=0,x=b=(g+p)/2)}var $=u*oS(x),E=u*oF(x),K=d*oS(w),O=d*oF(w);if(_>1e-12){var D,q=u*oS(b),I=u*oF(b),P=d*oS(k),W=d*oF(k);if(f<oA)if(D=function(t,e,r,i,o,a,s,n){var l=r-t,h=i-e,c=s-o,d=n-a,u=d*l-c*h;if(!(u*u<1e-12))return u=(c*(e-a)-d*(t-o))/u,[t+u*l,e+u*h]}($,E,P,W,q,I,K,O)){var z,R=$-D[0],j=E-D[1],N=q-D[0],H=I-D[1],U=1/oF(((z=(R*N+j*H)/(oL(R*R+j*j)*oL(N*N+H*H)))>1?0:z<-1?oA:Math.acos(z))/2),Y=oL(D[0]*D[0]+D[1]*D[1]);F=o_(_,(d-Y)/(U-1)),L=o_(_,(u-Y)/(U+1))}else F=L=0}T>1e-12?L>1e-12?(m=oH(P,W,$,E,u,L,y),C=oH(q,I,K,O,u,L,y),n.moveTo(m.cx+m.x01,m.cy+m.y01),L<_?n.arc(m.cx,m.cy,L,oT(m.y01,m.x01),oT(C.y01,C.x01),!y):(n.arc(m.cx,m.cy,L,oT(m.y01,m.x01),oT(m.y11,m.x11),!y),n.arc(0,0,u,oT(m.cy+m.y11,m.cx+m.x11),oT(C.cy+C.y11,C.cx+C.x11),!y),n.arc(C.cx,C.cy,L,oT(C.y11,C.x11),oT(C.y01,C.x01),!y))):(n.moveTo($,E),n.arc(0,0,u,x,b,!y)):n.moveTo($,E),d>1e-12&&B>1e-12?F>1e-12?(m=oH(K,O,q,I,d,-F,y),C=oH($,E,P,W,d,-F,y),n.lineTo(m.cx+m.x01,m.cy+m.y01),F<_?n.arc(m.cx,m.cy,F,oT(m.y01,m.x01),oT(C.y01,C.x01),!y):(n.arc(m.cx,m.cy,F,oT(m.y01,m.x01),oT(m.y11,m.x11),!y),n.arc(0,0,d,oT(m.cy+m.y11,m.cx+m.x11),oT(C.cy+C.y11,C.cx+C.x11),y),n.arc(C.cx,C.cy,F,oT(C.y11,C.x11),oT(C.y01,C.x01),!y))):n.arc(0,0,d,w,k,y):n.lineTo(K,O)}else n.moveTo(0,0);if(n.closePath(),h)return n=null,h+""||null}return h.centroid=function(){var r=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,i=(+o.apply(this,arguments)+ +a.apply(this,arguments))/2-oA/2;return[oS(i)*r,oF(i)*r]},h.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:ow(+e),h):t},h.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:ow(+t),h):e},h.cornerRadius=function(t){return arguments.length?(r="function"==typeof t?t:ow(+t),h):r},h.padRadius=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:ow(+t),h):i},h.startAngle=function(t){return arguments.length?(o="function"==typeof t?t:ow(+t),h):o},h.endAngle=function(t){return arguments.length?(a="function"==typeof t?t:ow(+t),h):a},h.padAngle=function(t){return arguments.length?(s="function"==typeof t?t:ow(+t),h):s},h.context=function(t){return arguments.length?(n=null==t?null:t,h):n},h}function oY(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function oX(t){this._context=t}function oG(t){return new oX(t)}function oV(t){return t[0]}function oZ(t){return t[1]}function oQ(t,e){var r=ow(!0),i=null,o=oG,a=null,s=oP(n);function n(n){var l,h,c,d=(n=oY(n)).length,u=!1;for(null==i&&(a=o(c=s())),l=0;l<=d;++l)!(l<d&&r(h=n[l],l,n))===u&&((u=!u)?a.lineStart():a.lineEnd()),u&&a.point(+t(h,l,n),+e(h,l,n));if(c)return a=null,c+""||null}return t="function"==typeof t?t:void 0===t?oV:ow(t),e="function"==typeof e?e:void 0===e?oZ:ow(e),n.x=function(e){return arguments.length?(t="function"==typeof e?e:ow(+e),n):t},n.y=function(t){return arguments.length?(e="function"==typeof t?t:ow(+t),n):e},n.defined=function(t){return arguments.length?(r="function"==typeof t?t:ow(!!t),n):r},n.curve=function(t){return arguments.length?(o=t,null!=i&&(a=o(i)),n):o},n.context=function(t){return arguments.length?(null==t?i=a=null:a=o(i=t),n):i},n}function oJ(t,e){return e<t?-1:e>t?1:e>=t?0:0/0}function o0(t){return t}function o1(){var t=o0,e=oJ,r=null,i=ow(0),o=ow(o$),a=ow(0);function s(s){var n,l,h,c,d,u=(s=oY(s)).length,g=0,p=Array(u),f=Array(u),y=+i.apply(this,arguments),m=Math.min(o$,Math.max(-o$,o.apply(this,arguments)-y)),C=Math.min(Math.abs(m)/u,a.apply(this,arguments)),x=C*(m<0?-1:1);for(n=0;n<u;++n)(d=f[p[n]=n]=+t(s[n],n,s))>0&&(g+=d);for(null!=e?p.sort(function(t,r){return e(f[t],f[r])}):null!=r&&p.sort(function(t,e){return r(s[t],s[e])}),n=0,h=g?(m-u*x)/g:0;n<u;++n,y=c)c=y+((d=f[l=p[n]])>0?d*h:0)+x,f[l]={data:s[l],index:n,value:d,startAngle:y,endAngle:c,padAngle:C};return f}return s.value=function(e){return arguments.length?(t="function"==typeof e?e:ow(+e),s):t},s.sortValues=function(t){return arguments.length?(e=t,r=null,s):e},s.sort=function(t){return arguments.length?(r=t,e=null,s):r},s.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:ow(+t),s):i},s.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:ow(+t),s):o},s.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:ow(+t),s):a},s}function o2(){}function o5(t,e,r){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+r)/6)}function o3(t){this._context=t}function o4(t){return new o3(t)}function o6(t){this._context=t}function o8(t){return new o6(t)}function o7(t){this._context=t}function o9(t){return new o7(t)}oI.prototype,Array.prototype.slice,oX.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=0/0},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t*=1,e*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}},o3.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=0/0},lineStart:function(){this._x0=this._x1=this._y0=this._y1=0/0,this._point=0},lineEnd:function(){switch(this._point){case 3:o5(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t*=1,e*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);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:o5(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},o6.prototype={areaStart:o2,areaEnd:o2,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=0/0,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)}},point:function(t,e){switch(t*=1,e*=1,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:o5(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},o7.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=0/0},lineStart:function(){this._x0=this._x1=this._y0=this._y1=0/0,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t*=1,e*=1,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+t)/6,i=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:o5(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};class at{constructor(t,e){this._context=t,this._x=e}areaStart(){this._line=0}areaEnd(){this._line=0/0}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,e){switch(t*=1,e*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,e,t,e):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,t,this._y0,t,e)}this._x0=t,this._y0=e}}function ae(t){return new at(t,!0)}function ar(t){return new at(t,!1)}function ai(t,e){this._basis=new o3(t),this._beta=e}ai.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,r=t.length-1;if(r>0)for(var i,o=t[0],a=e[0],s=t[r]-o,n=e[r]-a,l=-1;++l<=r;)i=l/r,this._basis.point(this._beta*t[l]+(1-this._beta)*(o+i*s),this._beta*e[l]+(1-this._beta)*(a+i*n));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var ao=function t(e){function r(t){return 1===e?new o3(t):new ai(t,e)}return r.beta=function(e){return t(+e)},r}(.85);function aa(t,e,r){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-r),t._x2,t._y2)}function as(t,e){this._context=t,this._k=(1-e)/6}as.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=0/0},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=0/0,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:aa(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t*=1,e*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:aa(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var an=function t(e){function r(t){return new as(t,e)}return r.tension=function(e){return t(+e)},r}(0);function al(t,e){this._context=t,this._k=(1-e)/6}al.prototype={areaStart:o2,areaEnd:o2,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=0/0,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)}},point:function(t,e){switch(t*=1,e*=1,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:aa(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var ah=function t(e){function r(t){return new al(t,e)}return r.tension=function(e){return t(+e)},r}(0);function ac(t,e){this._context=t,this._k=(1-e)/6}ac.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=0/0},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=0/0,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t*=1,e*=1,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:aa(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var ad=function t(e){function r(t){return new ac(t,e)}return r.tension=function(e){return t(+e)},r}(0);function au(t,e,r){var i=t._x1,o=t._y1,a=t._x2,s=t._y2;if(t._l01_a>1e-12){var n=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*n-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,o=(o*n-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>1e-12){var h=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,c=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*h+t._x1*t._l23_2a-e*t._l12_2a)/c,s=(s*h+t._y1*t._l23_2a-r*t._l12_2a)/c}t._context.bezierCurveTo(i,o,a,s,t._x2,t._y2)}function ag(t,e){this._context=t,this._alpha=e}ag.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=0/0},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=0/0,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)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t*=1,e*=1,this._point){var r=this._x2-t,i=this._y2-e;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(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:au(this,t,e)}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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var ap=function t(e){function r(t){return e?new ag(t,e):new as(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function af(t,e){this._context=t,this._alpha=e}af.prototype={areaStart:o2,areaEnd:o2,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=0/0,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)}},point:function(t,e){if(t*=1,e*=1,this._point){var r=this._x2-t,i=this._y2-e;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=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:au(this,t,e)}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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var ay=function t(e){function r(t){return e?new af(t,e):new al(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function am(t,e){this._context=t,this._alpha=e}am.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=0/0},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=0/0,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||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t*=1,e*=1,this._point){var r=this._x2-t,i=this._y2-e;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:au(this,t,e)}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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var aC=function t(e){function r(t){return e?new am(t,e):new ac(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function ax(t){this._context=t}function ab(t){return new ax(t)}function ak(t,e,r){var i=t._x1-t._x0,o=e-t._x1,a=(t._y1-t._y0)/(i||o<0&&-0),s=(r-t._y1)/(o||i<0&&-0);return((a<0?-1:1)+(s<0?-1:1))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs((a*o+s*i)/(i+o)))||0}function aw(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function aB(t,e,r){var i=t._x0,o=t._y0,a=t._x1,s=t._y1,n=(a-i)/3;t._context.bezierCurveTo(i+n,o+n*e,a-n,s-n*r,a,s)}function aT(t){this._context=t}function aS(t){this._context=new av(t)}function av(t){this._context=t}function a_(t){return new aT(t)}function aF(t){return new aS(t)}function aL(t){this._context=t}function aA(t){var e,r,i=t.length-1,o=Array(i),a=Array(i),s=Array(i);for(o[0]=0,a[0]=2,s[0]=t[0]+2*t[1],e=1;e<i-1;++e)o[e]=1,a[e]=4,s[e]=4*t[e]+2*t[e+1];for(o[i-1]=2,a[i-1]=7,s[i-1]=8*t[i-1]+t[i],e=1;e<i;++e)r=o[e]/a[e-1],a[e]-=r,s[e]-=r*s[e-1];for(o[i-1]=s[i-1]/a[i-1],e=i-2;e>=0;--e)o[e]=(s[e]-o[e+1])/a[e];for(a[i-1]=(t[i]+o[i-1])/2,e=0;e<i-1;++e)a[e]=2*t[e+1]-o[e+1];return[o,a]}function aM(t){return new aL(t)}function a$(t,e){this._context=t,this._t=e}function aE(t){return new a$(t,.5)}function aK(t){return new a$(t,0)}function aO(t){return new a$(t,1)}function aD(t,e,r){this.k=t,this.x=e,this.y=r}ax.prototype={areaStart:o2,areaEnd:o2,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t*=1,e*=1,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}},aT.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=0/0},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=0/0,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:aB(this,this._t0,aw(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var r=0/0;if(e*=1,(t*=1)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,aB(this,aw(this,r=ak(this,t,e)),r);break;default:aB(this,this._t0,r=ak(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}}},(aS.prototype=Object.create(aT.prototype)).point=function(t,e){aT.prototype.point.call(this,e,t)},av.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,r,i,o,a){this._context.bezierCurveTo(e,t,i,r,a,o)}},aL.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=0/0},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,r=t.length;if(r)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===r)this._context.lineTo(t[1],e[1]);else for(var i=aA(t),o=aA(e),a=0,s=1;s<r;++a,++s)this._context.bezierCurveTo(i[0][a],o[0][a],i[1][a],o[1][a],t[s],e[s]);(this._line||0!==this._line&&1===r)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}},a$.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=0/0},lineStart:function(){this._x=this._y=0/0,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t*=1,e*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}}this._x=t,this._y=e}},aD.prototype={constructor:aD,scale:function(t){return 1===t?this:new aD(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new aD(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};new aD(1,0,0);aD.prototype},DH(t,e,r){"use strict";function i(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}r.d(e,{b:()=>i})},VV(t,e,r){"use strict";r.d(e,{},{$V:"[object Boolean]",Av:"[object RegExp]",GX:"[object Object]",ML:"[object Float64Array]",NA:"[object Set]",OG:"[object String]",Qb:"[object Uint8Array]",R_:"[object Arguments]",Uw:"[object Array]",VP:"[object Symbol]",XZ:"[object Int8Array]",ZR:"[object Uint32Array]",_u:"[object Int32Array]",cT:"[object ArrayBuffer]",i1:"[object Int16Array]",iq:"[object DataView]",kj:"[object Number]",pj:"[object Map]",q:"[object Uint8ClampedArray]",ri:"[object Float32Array]",vC:"[object Date]",x6:"[object Uint16Array]"})},rY0(t,e,r){"use strict";var i=r("DH");function o(t){return null!==t&&"object"==typeof t&&"[object Arguments]"===(0,i.b)(t)}r.d(e,{N:()=>o})},tNQ(t,e,r){"use strict";function i(t){var e;return null!=t&&"function"!=typeof t&&Number.isSafeInteger(e=t.length)&&e>=0}r.d(e,{X:()=>i})},SPK(t,e,r){"use strict";var i=r("Oe");function o(t){return(0,i.i)(t)}r.d(e,{i:()=>o})},NM(t,e,r){"use strict";r.d(e,{P:()=>o});let i="object"==typeof globalThis&&globalThis||"object"==typeof window&&window||"object"==typeof self&&self||"object"==typeof global&&global||function(){return this}();function o(t){return void 0!==i.Buffer&&i.Buffer.isBuffer(t)}},OY(t,e,r){"use strict";function i(t){return null==t||"object"!=typeof t&&"function"!=typeof t}r.d(e,{s:()=>i})},Oe(t,e,r){"use strict";function i(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}r.d(e,{i:()=>i})},ojl(t,e,r){"use strict";r.d(e,{A:()=>s});var i=r("Wq"),o=r("SSY"),a=class{constructor(){this.type=o.Z.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=o.Z.ALL}is(t){return this.type===t}},s=new class{constructor(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new a}set(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=o.Z.ALL,this}_ensureHSL(){let t=this.data,{h:e,s:r,l:o}=t;void 0===e&&(t.h=i.A.channel.rgb2hsl(t,"h")),void 0===r&&(t.s=i.A.channel.rgb2hsl(t,"s")),void 0===o&&(t.l=i.A.channel.rgb2hsl(t,"l"))}_ensureRGB(){let t=this.data,{r:e,g:r,b:o}=t;void 0===e&&(t.r=i.A.channel.hsl2rgb(t,"r")),void 0===r&&(t.g=i.A.channel.hsl2rgb(t,"g")),void 0===o&&(t.b=i.A.channel.hsl2rgb(t,"b"))}get r(){let t=this.data,e=t.r;return this.type.is(o.Z.HSL)||void 0===e?(this._ensureHSL(),i.A.channel.hsl2rgb(t,"r")):e}get g(){let t=this.data,e=t.g;return this.type.is(o.Z.HSL)||void 0===e?(this._ensureHSL(),i.A.channel.hsl2rgb(t,"g")):e}get b(){let t=this.data,e=t.b;return this.type.is(o.Z.HSL)||void 0===e?(this._ensureHSL(),i.A.channel.hsl2rgb(t,"b")):e}get h(){let t=this.data,e=t.h;return this.type.is(o.Z.RGB)||void 0===e?(this._ensureRGB(),i.A.channel.rgb2hsl(t,"h")):e}get s(){let t=this.data,e=t.s;return this.type.is(o.Z.RGB)||void 0===e?(this._ensureRGB(),i.A.channel.rgb2hsl(t,"s")):e}get l(){let t=this.data,e=t.l;return this.type.is(o.Z.RGB)||void 0===e?(this._ensureRGB(),i.A.channel.rgb2hsl(t,"l")):e}get a(){return this.data.a}set r(t){this.type.set(o.Z.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(o.Z.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(o.Z.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(o.Z.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(o.Z.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(o.Z.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}({r:0,g:0,b:0,a:0},"transparent")},ja(t,e,r){"use strict";r.d(e,{A:()=>c});var i=r("ojl"),o=r("SSY");let a={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(35!==t.charCodeAt(0))return;let e=t.match(a.re);if(!e)return;let r=e[1],o=parseInt(r,16),s=r.length,n=s%4==0,l=s>4,h=l?1:17,c=l?8:4,d=n?0:-1,u=l?255:15;return i.A.set({r:(o>>c*(d+3)&u)*h,g:(o>>c*(d+2)&u)*h,b:(o>>c*(d+1)&u)*h,a:n?(o&u)*h/255:1},t)},stringify:t=>{let{r:e,g:r,b:i,a}=t;return a<1?`#${o.Y[Math.round(e)]}${o.Y[Math.round(r)]}${o.Y[Math.round(i)]}${o.Y[Math.round(255*a)]}`:`#${o.Y[Math.round(e)]}${o.Y[Math.round(r)]}${o.Y[Math.round(i)]}`}};var s=r("Wq");let n={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:t=>{let e=t.match(n.hueRe);if(e){let[,t,r]=e;switch(r){case"grad":return s.A.channel.clamp.h(.9*parseFloat(t));case"rad":return s.A.channel.clamp.h(180*parseFloat(t)/Math.PI);case"turn":return s.A.channel.clamp.h(360*parseFloat(t))}}return s.A.channel.clamp.h(parseFloat(t))},parse:t=>{let e=t.charCodeAt(0);if(104!==e&&72!==e)return;let r=t.match(n.re);if(!r)return;let[,o,a,l,h,c]=r;return i.A.set({h:n._hue2deg(o),s:s.A.channel.clamp.s(parseFloat(a)),l:s.A.channel.clamp.l(parseFloat(l)),a:h?s.A.channel.clamp.a(c?parseFloat(h)/100:parseFloat(h)):1},t)},stringify:t=>{let{h:e,s:r,l:i,a:o}=t;return o<1?`hsla(${s.A.lang.round(e)}, ${s.A.lang.round(r)}%, ${s.A.lang.round(i)}%, ${o})`:`hsl(${s.A.lang.round(e)}, ${s.A.lang.round(r)}%, ${s.A.lang.round(i)}%)`}},l={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:t=>{t=t.toLowerCase();let e=l.colors[t];if(e)return a.parse(e)},stringify:t=>{let e=a.stringify(t);for(let t in l.colors)if(l.colors[t]===e)return t}},h={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:t=>{let e=t.charCodeAt(0);if(114!==e&&82!==e)return;let r=t.match(h.re);if(!r)return;let[,o,a,n,l,c,d,u,g]=r;return i.A.set({r:s.A.channel.clamp.r(a?2.55*parseFloat(o):parseFloat(o)),g:s.A.channel.clamp.g(l?2.55*parseFloat(n):parseFloat(n)),b:s.A.channel.clamp.b(d?2.55*parseFloat(c):parseFloat(c)),a:u?s.A.channel.clamp.a(g?parseFloat(u)/100:parseFloat(u)):1},t)},stringify:t=>{let{r:e,g:r,b:i,a:o}=t;return o<1?`rgba(${s.A.lang.round(e)}, ${s.A.lang.round(r)}, ${s.A.lang.round(i)}, ${s.A.lang.round(o)})`:`rgb(${s.A.lang.round(e)}, ${s.A.lang.round(r)}, ${s.A.lang.round(i)})`}};var c={format:{keyword:l,hex:a,rgb:h,rgba:h,hsl:n,hsla:n},parse:t=>{if("string"!=typeof t)return t;let e=a.parse(t)||h.parse(t)||n.parse(t)||l.parse(t);if(e)return e;throw Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(o.Z.HSL)||void 0===t.data.r?n.stringify(t):!(t.a<1)&&Number.isInteger(t.r)&&Number.isInteger(t.g)&&Number.isInteger(t.b)?a.stringify(t):h.stringify(t)}},SSY(t,e,r){"use strict";var i=r("Wq");let o={};for(let t=0;t<=255;t++)o[t]=i.A.unit.dec2hex(t);r.d(e,{},{Y:o,Z:{ALL:0,RGB:1,HSL:2}})},bg(t,e,r){"use strict";var i=r("Wq"),o=r("ja");e.A=(t,e,r)=>{let a=o.A.parse(t),s=a[e],n=i.A.channel.clamp[e](s+r);return s!==n&&(a[e]=n),o.A.stringify(a)}},UI(t,e,r){"use strict";var i=r("Wq"),o=r("ja");e.A=(t,e)=>{let r=o.A.parse(t);for(let t in e)r[t]=i.A.channel.clamp[t](e[t]);return o.A.stringify(r)}},xh(t,e,r){"use strict";var i=r("bg");e.A=(t,e)=>(0,i.A)(t,"l",-e)},HAv(t,e,r){"use strict";r.d(e,{A:()=>a});var i=r("Wq"),o=r("ja"),a=t=>!((t=>{let{r:e,g:r,b:a}=o.A.parse(t),s=.2126*i.A.channel.toLinear(e)+.7152*i.A.channel.toLinear(r)+.0722*i.A.channel.toLinear(a);return i.A.lang.round(s)})(t)>=.5)},CM(t,e,r){"use strict";var i=r("bg");e.A=(t,e)=>(0,i.A)(t,"l",e)},Cv(t,e,r){"use strict";var i=r("Wq"),o=r("ojl"),a=r("ja"),s=r("UI");e.A=(t,e,r=0,n=1)=>{if("number"!=typeof t)return(0,s.A)(t,{a:e});let l=o.A.set({r:i.A.channel.clamp.r(t),g:i.A.channel.clamp.g(e),b:i.A.channel.clamp.b(r),a:i.A.channel.clamp.a(n)});return a.A.stringify(l)}},Wq(t,e,r){"use strict";r.d(e,{A:()=>o});let i={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:t=>t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{let e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6)?t+(e-t)*6*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t,hsl2rgb:({h:t,s:e,l:r},o)=>{if(!e)return 2.55*r;t/=360,e/=100;let a=(r/=100)<.5?r*(1+e):r+e-r*e,s=2*r-a;switch(o){case"r":return 255*i.hue2rgb(s,a,t+1/3);case"g":return 255*i.hue2rgb(s,a,t);case"b":return 255*i.hue2rgb(s,a,t-1/3)}},rgb2hsl:({r:t,g:e,b:r},i)=>{let o=Math.max(t/=255,e/=255,r/=255),a=Math.min(t,e,r),s=(o+a)/2;if("l"===i)return 100*s;if(o===a)return 0;let n=o-a;if("s"===i)return 100*(s>.5?n/(2-o-a):n/(o+a));switch(o){case t:return((e-r)/n+6*(e<r))*60;case e:return((r-t)/n+2)*60;case r:return((t-e)/n+4)*60;default:return -1}}};var o={channel:i,lang:{clamp:(t,e,r)=>e>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),round:t=>Math.round(1e10*t)/1e10},unit:{dec2hex:t=>{let e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}}}},bQ(t,e,r){"use strict";var i=r("Ut"),o=r("NH"),a=r("M4"),s=r("Gt"),n=(0,s.K)(({flowchart:t})=>{let e=t?.subGraphTitleMargin?.top??0,r=t?.subGraphTitleMargin?.bottom??0;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:e+r}},"getSubGraphTitleMargins"),l=new Map;async function h(t,e,r){let a,s;"rect"===e.shape&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");let n=e.shape?i.nq[e.shape]:void 0;if(!n)throw Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let i;"sandbox"===r.config.securityLevel?i="_top":e.linkTarget&&(i=e.linkTarget||"_blank"),a=t.insert("svg:a").attr("xlink:href",e.link).attr("target",i??null),s=await n(a,e,r)}else a=s=await n(t,e,r);return a.attr("data-look",(0,o.KL)(e.look)),e.tooltip&&s.attr("title",e.tooltip),l.set(e.id,a),e.haveCallback&&a.attr("class",a.attr("class")+" clickable"),a}(0,s.K)(h,"insertNode");var c=(0,s.K)((t,e)=>{l.set(e.id,t)},"setNodeElem"),d=(0,s.K)(()=>{l.clear()},"clear"),u=(0,s.K)(t=>{let e=l.get(t.id);a.R.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");let r=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r},"positionNode");r.d(e,{IU:()=>d,Oi:()=>n,U7:()=>c,U_:()=>u,on:()=>h})},MM(t,e,r){"use strict";var i=r("Yr"),o=r("Gt"),a=r("El"),s=(0,o.K)(t=>{let{securityLevel:e}=(0,i.D7)(),r=(0,a.Ltv)("body");if("sandbox"===e){let e=(0,a.Ltv)(`#i${t}`),i=e.node()?.contentDocument??document;r=(0,a.Ltv)(i.body)}return r.select(`#${t}`)},"selectSvgElement");r.d(e,{D:()=>s})},h5(t,e,r){"use strict";r.d(e,{WY:()=>S,dn:()=>T,pC:()=>w,Gc:()=>x});var i=r("Yr"),o=r("M4"),a=r("Gt");let s=(t,e)=>!!t&&!!((e&&""===t.prefix||t.prefix)&&t.name),n=Object.freeze({left:0,top:0,width:16,height:16}),l=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),h=Object.freeze({...n,...l}),c=Object.freeze({...h,body:"",hidden:!1});function d(t,e){let r,i,o=(r={},!t.hFlip!=!e.hFlip&&(r.hFlip=!0),!t.vFlip!=!e.vFlip&&(r.vFlip=!0),(i=((t.rotate||0)+(e.rotate||0))%4)&&(r.rotate=i),r);for(let r in c)r in l?r in t&&!(r in o)&&(o[r]=l[r]):r in e?o[r]=e[r]:r in t&&(o[r]=t[r]);return o}function u(t,e,r){let i=t.icons,o=t.aliases||Object.create(null),a={};function s(t){a=d(i[t]||o[t],a)}return s(e),r.forEach(s),d(t,a)}let g=Object.freeze({...Object.freeze({width:null,height:null}),...l}),p=/(-?[0-9.]*[0-9]+[0-9.]*)/g,f=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function y(t,e,r){if(1===e)return t;if(r=r||100,"number"==typeof t)return Math.ceil(t*e*r)/r;if("string"!=typeof t)return t;let i=t.split(p);if(null===i||!i.length)return t;let o=[],a=i.shift(),s=f.test(a);for(;;){if(s){let t=parseFloat(a);isNaN(t)?o.push(a):o.push(Math.ceil(t*e*r)/r)}else o.push(a);if(void 0===(a=i.shift()))return o.join("");s=!s}}let m=/\sid="(\S+)"/g,C=new Map;var x={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},b=new Map,k=new Map,w=(0,a.K)(t=>{for(let e of t){if(!e.name)throw Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(o.R.debug("Registering icon pack:",e.name),"loader"in e)k.set(e.name,e.loader);else if("icons"in e)b.set(e.name,e.icons);else throw o.R.error("Invalid icon loader:",e),Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),B=(0,a.K)(async(t,e)=>{let r=((t,e,r,i="")=>{let o=t.split(":");if("@"===t.slice(0,1)){if(o.length<2||o.length>3)return null;i=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){let t=o.pop(),r=o.pop(),a={provider:o.length>0?o[0]:i,prefix:r,name:t};return e&&!s(a)?null:a}let a=o[0],n=a.split("-");if(n.length>1){let t={provider:i,prefix:n.shift(),name:n.join("-")};return e&&!s(t)?null:t}if(r&&""===i){let t={provider:i,prefix:"",name:a};return e&&!s(t,r)?null:t}return null})(t,!0,void 0!==e);if(!r)throw Error(`Invalid icon name: ${t}`);let i=r.prefix||e;if(!i)throw Error(`Icon name must contain a prefix: ${t}`);let a=b.get(i);if(!a){let t=k.get(i);if(!t)throw Error(`Icon set not found: ${r.prefix}`);try{a={...await t(),prefix:i},b.set(i,a)}catch(t){throw o.R.error(t),Error(`Failed to load icon set: ${r.prefix}`)}}let n=function(t,e){var r;let i,o,a;if(t.icons[e])return u(t,e,[]);let s=(r=[e],i=t.icons,o=t.aliases||Object.create(null),a=Object.create(null),(r||Object.keys(i).concat(Object.keys(o))).forEach(function t(e){if(i[e])return a[e]=[];if(!(e in a)){a[e]=null;let r=o[e]&&o[e].parent,i=r&&t(r);i&&(a[e]=[r].concat(i))}return a[e]}),a)[e];return s?u(t,e,s):null}(a,r.name);if(!n)throw Error(`Icon not found: ${t}`);return n},"getRegisteredIconData"),T=(0,a.K)(async t=>{try{return await B(t),!0}catch{return!1}},"isIconAvailable"),S=(0,a.K)(async(t,e,r)=>{var a;let s,n,l,c,d,u,p,f,b,k,w,T,S,v;try{s=await B(t,e?.fallbackPrefix)}catch(t){o.R.error(t),s=x}let _=(a=s,c={...h,...a},d={...g,...e},u={left:c.left,top:c.top,width:c.width,height:c.height},p=c.body,[c,d].forEach(t=>{var e,r,i,o;let a,s,n=[],l=t.hFlip,h=t.vFlip,c=t.rotate;switch(l?h?c+=2:(n.push("translate("+(u.width+u.left).toString()+" "+(0-u.top).toString()+")"),n.push("scale(-1 1)"),u.top=u.left=0):h&&(n.push("translate("+(0-u.left).toString()+" "+(u.height+u.top).toString()+")"),n.push("scale(1 -1)"),u.top=u.left=0),c<0&&(c-=4*Math.floor(c/4)),c%=4){case 1:a=u.height/2+u.top,n.unshift("rotate(90 "+a.toString()+" "+a.toString()+")");break;case 2:n.unshift("rotate(180 "+(u.width/2+u.left).toString()+" "+(u.height/2+u.top).toString()+")");break;case 3:a=u.width/2+u.left,n.unshift("rotate(-90 "+a.toString()+" "+a.toString()+")")}c%2==1&&(u.left!==u.top&&(a=u.left,u.left=u.top,u.top=a),u.width!==u.height&&(a=u.width,u.width=u.height,u.height=a)),n.length&&(e=p,r='<g transform="'+n.join(" ")+'">',i=(s=function(t,e="defs"){let r="",i=t.indexOf("<"+e);for(;i>=0;){let o=t.indexOf(">",i),a=t.indexOf("</"+e);if(-1===o||-1===a)break;let s=t.indexOf(">",a);if(-1===s)break;r+=t.slice(o+1,a).trim(),t=t.slice(0,i).trim()+t.slice(s+1)}return{defs:r,content:t}}(e)).defs,o=r+s.content+"</g>",p=i?"<defs>"+i+"</defs>"+o:o)}),f=d.width,b=d.height,k=u.width,w=u.height,null===f?n=y(l=null===b?"1em":"auto"===b?w:b,k/w):(n="auto"===f?k:f,l=null===b?y(n,w/k):"auto"===b?w:b),T={},(S=(t,e)=>{"unset"!==e&&"undefined"!==e&&"none"!==e&&(T[t]=e.toString())})("width",n),S("height",l),T.viewBox=(v=[u.left,u.top,k,w]).join(" "),{attributes:T,viewBox:v,body:p}),F=function(t,e){let r=-1===t.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(let t in e)r+=" "+t+'="'+e[t]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+t+"</svg>"}(function(t){let e,r=[];for(;e=m.exec(t);)r.push(e[1]);if(!r.length)return t;let i="suffix"+(0x1000000*Math.random()|Date.now()).toString(16);return r.forEach(e=>{var r;let o,a=(r=(r=e).replace(/[0-9]+$/,"")||"a",o=C.get(r)||0,C.set(r,o+1),o?`${r}${o}`:r),s=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),t=t.replace(RegExp(i,"g"),"")}(_.body),{..._.attributes,...r});return(0,i.jZ)(F,(0,i.zj)())},"getIconSVG")},Ut(t,e,r){"use strict";var i=r("PF"),o=r("iV"),a=r("h5"),s=r("pK"),n=r("NH"),l=r("Yr"),h=r("M4"),c=r("Gt"),d=r("El"),u=r("nh");async function g(t){let e=t.getElementsByTagName("img");if(!e||0===e.length)return;let r=!p(t);await Promise.all([...e].map(t=>new Promise(e=>{function i(){if(t.style.display="flex",t.style.flexDirection="column",r){let e=(0,l.D7)().fontSize?(0,l.D7)().fontSize:window.getComputedStyle(document.body).fontSize,[r=l.UI.fontSize]=(0,n.I5)(e),i=5*r+"px";t.style.minWidth=i,t.style.maxWidth=i}else t.style.width="100%";e(t)}(0,c.K)(i,"setupImage"),setTimeout(()=>{t.complete&&i()}),t.addEventListener("error",i),t.addEventListener("load",i)})))}function p(t){return 3===t.nodeType?t.textContent?.trim()!=="":1===t.nodeType&&"img"!==t.tagName.toLowerCase()&&[...t.childNodes].some(p)}(0,c.K)(g,"configureLabelImages"),(0,c.K)(p,"hasTextBesidesImages");var f=(0,c.K)(async(t,e,r)=>{let i=(0,l.D7)(),a=t.insert("g").attr("class",r??"node default").attr("id",e.domId||e.id),s=a.insert("g").attr("class","label").attr("style",(0,n.KL)(e.labelStyle)),h=[{text:"string"==typeof e.label?e.label:e.label?.[0]??"",cssClass:"c4-name"},{text:e.stereotype,cssClass:"c4-type"},...(e.description??[]).map(t=>({text:t,cssClass:"c4-descr"}))].filter(t=>t.text),c=e.width?Math.max(e.width-2*(e.padding??0),32):(0,l.D7)().flowchart?.wrappingWidth??200,u=i.c4?.wrap??!0?c:1/0,g=await Promise.all(h.map(async t=>{let r=s.append("g").attr("class",t.cssClass),a=await (0,o.GZ)(r,(0,l.jZ)((0,n.Sm)(t.text??""),i),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:u,style:e.labelStyle},i);return(0,d.Ltv)(a).selectAll("tspan.text-outer-tspan").attr("text-anchor","middle"),(0,d.Ltv)(a).selectAll("tspan.text-inner-tspan").attr("font-weight",null).attr("font-style",null),{el:r,box:r.node().getBBox()}})),p=Math.max(...g.map(({box:t})=>t.width),0),f=0;for(let{el:t,box:e}of g)t.attr("transform",`translate(${p/2-e.x-e.width/2}, ${f-e.y})`),f+=e.height+3;let y=g.length>0?f-3:0;return s.insert("rect",":first-child"),s.attr("transform",`translate(${-p/2}, ${-y/2})`),{shapeSvg:a,bbox:s.node().getBBox(),halfPadding:(e.padding??0)/2,label:s}},"c4LabelHelper"),y=(0,c.K)((t,e)=>{let{x:r,y:i,width:o,height:a}=t;return o>=e?t:"left"in t?{x:r,y:i,width:e,height:a,top:i,left:r,bottom:i+a,right:r+e,toJSON:(0,c.K)(()=>({}),"toJSON")}:{x:r-(e-o)/2,y:i,width:e,height:a}},"withMinWidth"),m=(0,c.K)(async(t,e,r)=>{let i,a,s;if(void 0!==e.stereotype)return f(t,e,r);let h=e.useHtmlLabels||(0,l._3)((0,l.D7)()?.htmlLabels);i=r||"node default";let c=t.insert("g").attr("class",i).attr("id",e.domId||e.id),u=c.insert("g").attr("class","label").attr("style",(0,n.KL)(e.labelStyle));a=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0];let p=!!e.icon||!!e.img,m="markdown"===e.labelType,C=a&&!e.width?e.minWidth??0:0,x=await (0,o.GZ)(u,(0,l.jZ)((0,n.Sm)(a),(0,l.D7)()),{useHtmlLabels:h,width:e.width||e.wrappingWidth||(0,l.D7)().flowchart?.wrappingWidth,minWidth:C,classes:m?"markdown-node-label":"",style:e.labelStyle,addSvgBackground:p,markdown:m},(0,l.D7)()),b=(e?.padding??0)/2;if(h){let t=x.children[0],e=(0,d.Ltv)(x);await g(t),s=y(s=await o.lT.measure(()=>t.getBoundingClientRect()),C),e.attr("width",s.width),e.attr("height",s.height)}else s=y(s=await o.lT.measure(()=>x.getBBox()),C);return h?u.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"):u.attr("transform","translate(0, "+-s.height/2+")"),e.centerLabel&&u.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),u.insert("rect",":first-child"),{shapeSvg:c,bbox:s,halfPadding:b,label:u}},"labelHelper"),C=(0,c.K)(async(t,e,r)=>{let i,a=r.useHtmlLabels??(0,l.E)((0,l.D7)()),s=t.insert("g").attr("class","label").attr("style",r.labelStyle||""),h=await (0,o.GZ)(s,(0,l.jZ)((0,n.Sm)(e),(0,l.D7)()),{useHtmlLabels:a,width:r.width||(0,l.D7)()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),c=r.padding/2;if((0,l.E)((0,l.D7)())){let t=h.children[0],e=(0,d.Ltv)(h);i=await o.lT.measure(()=>t.getBoundingClientRect()),e.attr("width",i.width),e.attr("height",i.height)}else i=await o.lT.measure(()=>h.getBBox());return a?s.attr("transform","translate("+-i.width/2+", "+-i.height/2+")"):s.attr("transform","translate(0, "+-i.height/2+")"),r.centerLabel&&s.attr("transform","translate("+-i.width/2+", "+-i.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:t,bbox:i,halfPadding:c,label:s}},"insertLabel"),x=(0,c.K)((t,e,r)=>{if(r){t.width=r.width,t.height=r.height;return}let i=e.node().getBBox();t.width=i.width,t.height=i.height},"updateNodeBounds"),b=(0,c.K)((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");function k(t){let e=t.map((t,e)=>`${0===e?"M":"L"}${t.x},${t.y}`);return e.push("Z"),e.join(" ")}function w(t,e,r,i,o,a){let s=[],n=r-t,l=2*Math.PI/(n/a),h=e+(i-e)/2;for(let e=0;e<=50;e++){let r=t+e/50*n,i=h+o*Math.sin(l*(r-t));s.push({x:r,y:i})}return s}function B(t,e,r,i,o,a){let s=[],n=o*Math.PI/180,l=(a*Math.PI/180-n)/(i-1);for(let o=0;o<i;o++){let i=n+o*l,a=t+r*Math.cos(i),h=e+r*Math.sin(i);s.push({x:-a,y:-h})}return s}function T(t){let e=Array.from(t.childNodes).filter(t=>"path"===t.tagName),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=e.map(t=>t.getAttribute("d")).filter(t=>null!==t).join(" ");r.setAttribute("d",i);let o=e.find(t=>"none"!==t.getAttribute("fill")),a=e.find(t=>"none"!==t.getAttribute("stroke")),s=(0,c.K)((t,e)=>t?.getAttribute(e)??void 0,"getAttr");o&&Object.entries({fill:s(o,"fill"),"fill-opacity":s(o,"fill-opacity")??"1"}).forEach(([t,e])=>{e&&r.setAttribute(t,e)}),a&&Object.entries({stroke:s(a,"stroke"),"stroke-width":s(a,"stroke-width")??"1","stroke-opacity":s(a,"stroke-opacity")??"1"}).forEach(([t,e])=>{e&&r.setAttribute(t,e)});let n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.appendChild(r),n}(0,c.K)(k,"createPathFromPoints"),(0,c.K)(w,"generateFullSineWavePoints"),(0,c.K)(B,"generateCirclePoints"),(0,c.K)(T,"mergePaths");var S=(0,c.K)((t,e)=>{var r,i,o=t.x,a=t.y,s=e.x-o,n=e.y-a,l=t.width/2,h=t.height/2;return Math.abs(n)*l>Math.abs(s)*h?(n<0&&(h=-h),r=0===n?0:h*s/n,i=h):(s<0&&(l=-l),r=l,i=0===s?0:l*n/s),{x:o+r,y:a+i}},"intersectRect");function v(t,e){return t.intersect(e)}function _(t,e,r,i){var o=t.x,a=t.y,s=o-i.x,n=a-i.y,l=Math.sqrt(e*e*n*n+r*r*s*s),h=Math.abs(e*r*s/l);i.x<o&&(h=-h);var c=Math.abs(e*r*n/l);return i.y<a&&(c=-c),{x:o+h,y:a+c}}function F(t,e,r){return _(t,e,e,r)}function L(t,e,r,i){{let o=e.y-t.y,a=t.x-e.x,s=e.x*t.y-t.x*e.y,n=o*r.x+a*r.y+s,l=o*i.x+a*i.y+s;if(0!==n&&0!==l&&A(n,l))return;let h=i.y-r.y,c=r.x-i.x,d=i.x*r.y-r.x*i.y,u=h*t.x+c*t.y+d,g=h*e.x+c*e.y+d;if(1e-6>Math.abs(u)&&1e-6>Math.abs(g)&&A(u,g))return;let p=o*c-h*a;if(0===p)return;return{x:(a*d-c*s)/p,y:(h*s-o*d)/p}}}function A(t,e){return t*e>0}function M(t,e,r){let i=t.x,o=t.y,a=[],s=1/0,n=1/0;"function"==typeof e.forEach?e.forEach(function(t){s=Math.min(s,t.x),n=Math.min(n,t.y)}):(s=Math.min(s,e.x),n=Math.min(n,e.y));let l=i-t.width/2-s,h=o-t.height/2-n;for(let i=0;i<e.length;i++){let o=e[i],s=e[i<e.length-1?i+1:0],n=L(t,r,{x:l+o.x,y:h+o.y},{x:l+s.x,y:h+s.y});n&&a.push(n)}return a.length?(a.length>1&&a.sort(function(t,e){let i=t.x-r.x,o=t.y-r.y,a=Math.sqrt(i*i+o*o),s=e.x-r.x,n=e.y-r.y,l=Math.sqrt(s*s+n*n);return a<l?-1:+(a!==l)}),a[0]):t}(0,c.K)(v,"intersectNode"),(0,c.K)(_,"intersectEllipse"),(0,c.K)(F,"intersectCircle"),(0,c.K)(L,"intersectLine"),(0,c.K)(A,"sameSign"),(0,c.K)(M,"intersectPolygon");var $={node:v,circle:F,ellipse:_,polygon:M,rect:S},E=(0,c.K)((t,e,r,i,o)=>["M",t+o,e,"H",t+r-o,"A",o,o,"0 0 1",t+r,e+o,"V",e+i-o,"A",o,o,"0 0 1",t+r-o,e+i,"H",t+o,"A",o,o,"0 0 1",t,e+i-o,"V",e+o,"A",o,o,"0 0 1",t+o,e,"Z"].join(" "),"createRoundedRectPathD"),K=(0,c.K)(async(t,e,r,i=!1,a=!1)=>{let s=e||"";"object"==typeof s&&(s=s[0]);let n=(0,l.D7)(),h=(0,l.E)(n);return await (0,o.GZ)(t,s,{style:r,isTitle:i,useHtmlLabels:h,markdown:!1,isNode:a,width:1/0},n)},"createLabel");function O(t,e){let{labelStyles:r}=(0,i.GX)(e);e.labelStyle=r;let o=b(e),a=o;o||(a="anchor");let s=t.insert("g").attr("class",a).attr("id",e.domId||e.id),{cssStyles:l}=e,c=u.A.svg(s),d=(0,i.Fr)(e,{fill:"black",stroke:"none",fillStyle:"solid"});"handDrawn"!==e.look&&(d.roughness=0);let g=c.circle(0,0,2,d),p=s.insert(()=>g,":first-child");return p.attr("class","anchor").attr("style",(0,n.KL)(l)),x(e,p),e.intersect=function(t){return h.R.info("Circle intersect",e,1,t),$.circle(e,1,t)},s}function D(t,e,r,i,o,a,s){let n=Math.atan2(i-e,r-t),l=Math.sqrt(((r-t)/2/o)**2+((i-e)/2/a)**2);if(l>1)throw Error("The given radii are too small to create an arc between the points.");let h=Math.sqrt(1-l**2),c=(t+r)/2+h*a*Math.sin(n)*(s?-1:1),d=(e+i)/2-h*o*Math.cos(n)*(s?-1:1),u=Math.atan2((e-d)/a,(t-c)/o),g=Math.atan2((i-d)/a,(r-c)/o)-u;s&&g<0&&(g+=2*Math.PI),!s&&g>0&&(g-=2*Math.PI);let p=[];for(let t=0;t<20;t++){let e=u+t/19*g,r=c+o*Math.cos(e),i=d+a*Math.sin(e);p.push({x:r,y:i})}return p}function q(t,e,r){let[i,o]=[e,r].sort((t,e)=>e-t);return o*(1-Math.sqrt(1-(t/i/2)**2))}async function I(t,e){let{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;let a=e.padding??0,s="neo"===e.look?16:a,n="neo"===e.look?12:a,l=(0,c.K)(t=>t+n,"calcTotalHeight"),h=(0,c.K)(t=>{let e=t/2;return[e/(2.5+t/50),e]},"calcEllipseRadius"),{shapeSvg:d,bbox:g}=await m(t,e,b(e)),p=l(e?.height?e?.height:g.height),[f,y]=h(p),C=q(p,f,y),w=(e?.width?e?.width:g.width)+2*s+C-C,{cssStyles:B}=e,T=[{x:w/2,y:-p/2},{x:-w/2,y:-p/2},...D(-w/2,-p/2,-w/2,p/2,f,y,!1),{x:w/2,y:p/2},...D(w/2,p/2,w/2,-p/2,f,y,!0)],S=u.A.svg(d),v=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(v.roughness=0,v.fillStyle="solid");let _=k(T),F=S.path(_,v),L=d.insert(()=>F,":first-child");return L.attr("class","basic label-container outer-path"),B&&"handDrawn"!==e.look&&L.selectAll("path").attr("style",B),o&&"handDrawn"!==e.look&&L.selectAll("path").attr("style",o),L.attr("transform",`translate(${f/2}, 0)`),x(e,L),e.intersect=function(t){return $.polygon(e,T,t)},d}async function P(t,e,{config:{themeVariables:r}}){let{labelStyles:o,nodeStyles:a}=(0,i.GX)(e);e.labelStyle=o;let{shapeSvg:s,bbox:n,label:l}=await m(t,e,b(e)),h=r?.nodeBorder??r?.lineColor??"currentColor",d=e.padding??12,g=Math.max(n.width+2*d,e.width??0,80),p=Math.max(Math.min(.08*g,12),5),f=Math.max(n.height+2*d+p,e.height??0),y=-f/2+p,C=f/2,k=.72*g,w=`M${-g/2},${y} L${-k/2},${C} A${k/2},${p} 0 0 0 ${k/2},${C} L${g/2},${y} A${g/2},${p} 0 0 0 ${-g/2},${y} Z`,{cssStyles:B}=e,T=s.insert("g",":first-child").attr("class","basic label-container");if("handDrawn"===e.look){let t=u.A.svg(s).path(w,(0,i.Fr)(e,{}));T.node()?.appendChild(t),B&&T.attr("style",B)}else T.append("path").attr("d",w).attr("style",a);T.append("ellipse").attr("cx",0).attr("cy",y).attr("rx",g/2).attr("ry",p).attr("style",`fill:none;stroke:${h};stroke-width:1px`),x(e,T);let S=y+(C-y)/2;l.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${S-n.height/2-(n.y-(n.top??0))})`);let v=(0,c.K)((t,e,r)=>Array.from({length:13},(i,o)=>{let a=Math.PI-o*Math.PI/12;return{x:t*Math.cos(a),y:e+r*p*Math.sin(a)}}),"arc"),_=[...v(g/2,y,-1),...v(k/2,C,1).reverse()];return e.intersect=function(t){return $.polygon(e,_,t)},s}function W(t){let{themeVariables:e}=(0,l.D7)(),r=e.clusterBkg,i=e.clusterBorder;return"flow"===t?{rx:10,fill:"none",stroke:e.flowContainerStroke||e.secondaryBorderColor,strokeWidth:.75,cssClass:"flow-collapsed"}:{rx:8,fill:r,stroke:i,cssClass:"collapsed-group"}}async function z(t,e){let r,o=W(e.metadata?.containerType),{fill:a,stroke:h}=o,{nodeStyles:c}=(0,i.GX)(e),{shapeSvg:d,bbox:g}=await m(t,e,b(e)),{theme:p,themeVariables:f}=(0,l.D7)();(0,s.XE)(d,e.colorIndex,p,f.borderColorArray);let y=e.padding??8,C=g.height,k=Math.max(g.width+2*y,80,e?.width??0),w=Math.max(C+8+20+2*y,e?.height??0),B=-k/2,T=-w/2,S=d.select(".label");if(S&&(e.useHtmlLabels??(0,l.E)((0,l.D7)())?S.attr("transform",`translate(${-g.width/2}, ${-g.height/2+-14})`):S.attr("transform",`translate(0, ${-g.height/2+-14})`)),"handDrawn"===e.look){let t=u.A.svg(d),s=(0,i.Fr)(e,{fill:a,stroke:h,...void 0===o.strokeWidth?{}:{strokeWidth:o.strokeWidth},..."none"===a?{fillWeight:0}:{fillStyle:"solid"}}),l=t.path(E(B,T,k,w,o.rx),s);(r=d.insert(()=>l,":first-child")).attr("class","basic label-container "+o.cssClass).attr("style",(0,n.KL)(e.cssStyles))}else(r=d.insert("rect",":first-child")).attr("class","basic label-container "+o.cssClass).attr("style",c).attr("rx",o.rx).attr("ry",o.rx).attr("x",B).attr("y",T).attr("width",k).attr("height",w).attr("fill",a).attr("stroke",h),void 0!==o.strokeWidth&&r.attr("stroke-width",o.strokeWidth+"px");let v=T+y+C+8;d.append("line").attr("class","collapsed-separator").attr("x1",B+8).attr("y1",v).attr("x2",B+k-8).attr("y2",v).attr("stroke",h).attr("stroke-dasharray","3, 3");let _=v+10;for(let t=-1;t<=1;t++)d.append("circle").attr("class","collapsed-indicator").attr("cx",10*t).attr("cy",_).attr("r",2.5).attr("fill",h);return x(e,r),e.calcIntersect=function(t,e){return $.rect(t,e)},e.intersect=function(t){return $.rect(e,t)},d}function R(t,e,r,i){return t.insert("polygon",":first-child").attr("points",i.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}(0,c.K)(O,"anchor"),(0,c.K)(D,"generateArcPoints"),(0,c.K)(q,"calculateArcSagitta"),(0,c.K)(I,"bowTieRect"),(0,c.K)(P,"bucket"),(0,c.K)(W,"getCollapsedStyle"),(0,c.K)(z,"collapsedGroup"),(0,c.K)(R,"insertPolygonShape");var j=["right","left","up","down"],N="point",H=(0,c.K)(t=>{let e=new Set;for(let r of t)switch(r){case"x":e.add("right"),e.add("left");break;case"y":e.add("up"),e.add("down");break;default:e.add(r)}return e},"expandAndDeduplicateDirections"),U=(0,c.K)(t=>j.filter(e=>t.has(e)).join("|")||N,"getDirectionKey"),Y={"right|left|up|down":(0,c.K)(({height:t,midpoint:e,padding:r,width:i})=>[{x:0,y:0},{x:e,y:0},{x:i/2,y:2*r},{x:i-e,y:0},{x:i,y:0},{x:i,y:-t/3},{x:i+2*r,y:-t/2},{x:i,y:-2*t/3},{x:i,y:-t},{x:i-e,y:-t},{x:i/2,y:-t-2*r},{x:e,y:-t},{x:0,y:-t},{x:0,y:-2*t/3},{x:-2*r,y:-t/2},{x:0,y:-t/3}],"right|left|up|down"),"right|left|up":(0,c.K)(({height:t,midpoint:e,width:r})=>[{x:e,y:0},{x:r-e,y:0},{x:r,y:-t/2},{x:r-e,y:-t},{x:e,y:-t},{x:0,y:-t/2}],"right|left|up"),"right|left|down":(0,c.K)(({height:t,midpoint:e,width:r})=>[{x:0,y:0},{x:e,y:-t},{x:r-e,y:-t},{x:r,y:0}],"right|left|down"),"right|up|down":(0,c.K)(({height:t,midpoint:e,width:r})=>[{x:0,y:0},{x:r,y:-e},{x:r,y:-t+e},{x:0,y:-t}],"right|up|down"),"left|up|down":(0,c.K)(({height:t,midpoint:e,width:r})=>[{x:r,y:0},{x:0,y:-e},{x:0,y:-t+e},{x:r,y:-t}],"left|up|down"),"right|left":(0,c.K)(({height:t,midpoint:e,padding:r,width:i})=>[{x:e,y:0},{x:e,y:-r},{x:i-e,y:-r},{x:i-e,y:0},{x:i,y:-t/2},{x:i-e,y:-t},{x:i-e,y:-t+r},{x:e,y:-t+r},{x:e,y:-t},{x:0,y:-t/2}],"right|left"),"up|down":(0,c.K)(({height:t,midpoint:e,padding:r,width:i})=>[{x:i/2,y:0},{x:0,y:-r},{x:e,y:-r},{x:e,y:-t+r},{x:0,y:-t+r},{x:i/2,y:-t},{x:i,y:-t+r},{x:i-e,y:-t+r},{x:i-e,y:-r},{x:i,y:-r}],"up|down"),"right|up":(0,c.K)(({height:t,midpoint:e,width:r})=>[{x:0,y:0},{x:r,y:-e},{x:0,y:-t}],"right|up"),"right|down":(0,c.K)(({height:t,width:e})=>[{x:0,y:0},{x:e,y:0},{x:0,y:-t}],"right|down"),"left|up":(0,c.K)(({height:t,midpoint:e,width:r})=>[{x:r,y:0},{x:0,y:-e},{x:r,y:-t}],"left|up"),"left|down":(0,c.K)(({height:t,width:e})=>[{x:e,y:0},{x:0,y:0},{x:e,y:-t}],"left|down"),right:(0,c.K)(({height:t,midpoint:e,padding:r,width:i})=>[{x:e,y:-r},{x:e,y:-r},{x:i-e,y:-r},{x:i-e,y:0},{x:i,y:-t/2},{x:i-e,y:-t},{x:i-e,y:-t+r},{x:e,y:-t+r},{x:e,y:-t+r}],"right"),left:(0,c.K)(({height:t,midpoint:e,padding:r,width:i})=>[{x:e,y:0},{x:e,y:-r},{x:i-e,y:-r},{x:i-e,y:-t+r},{x:e,y:-t+r},{x:e,y:-t},{x:0,y:-t/2}],"left"),up:(0,c.K)(({height:t,midpoint:e,padding:r,width:i})=>[{x:e,y:-r},{x:e,y:-t+r},{x:0,y:-t+r},{x:i/2,y:-t},{x:i,y:-t+r},{x:i-e,y:-t+r},{x:i-e,y:-r}],"up"),down:(0,c.K)(({height:t,midpoint:e,padding:r,width:i})=>[{x:i/2,y:0},{x:0,y:-r},{x:e,y:-r},{x:e,y:-t+r},{x:i-e,y:-t+r},{x:i-e,y:-r},{x:i,y:-r}],"down"),[N]:()=>[{x:0,y:0}]},X=(0,c.K)((t,e,r,i)=>{let o=H(t),a=(r.padding??0)/2,s=e.height+4*a,n=s/2,l=i??e.width+2*n+2*a;return(Y[U(o)]??Y[N])({height:s,midpoint:n,padding:a,width:l})},"getArrowPoints");async function G(t,e){let{shapeSvg:r,bbox:i}=await m(t,e,b(e)),o=e.padding??0,a=i.height+2*o,s=a/2,n=i.width+2*s+o,l=e.width??0,h=e.positioned&&(e.widthInColumns??1)>1&&l>n?l:n,c=X(e.directions??[],i,e,h),d=R(r,h,a,c);return d.attr("style",e.style??null),x(e,d),e.intersect=function(t){return $.polygon(e,c,t)},r}async function V(t,e,{config:{themeVariables:r}}){let{labelStyles:o,nodeStyles:a}=(0,i.GX)(e);e.labelStyle=o;let{shapeSvg:s,bbox:n,label:l}=await m(t,e,b(e)),h=r?.nodeBorder??r?.lineColor??"currentColor",c=e.padding??12,d=Math.max(n.width+2*c,e.width??0,90),g=Math.max(n.height+2*c+18,e.height??0),p=-g/2,{cssStyles:f}=e,y=s.insert("g",":first-child").attr("class","basic label-container");if("handDrawn"===e.look){let t=u.A.svg(s).path(E(-d/2,p,d,g,12),(0,i.Fr)(e,{}));y.node()?.appendChild(t),f&&y.attr("style",f)}else y.append("rect").attr("x",-d/2).attr("y",p).attr("width",d).attr("height",g).attr("rx",12).attr("ry",12).attr("style",a);y.append("line").attr("x1",-d/2).attr("y1",p+18).attr("x2",d/2).attr("y2",p+18).attr("style",`stroke:${h};stroke-width:1px`);for(let t=0;t<3;t++)y.append("circle").attr("cx",-d/2+12+9*t).attr("cy",p+9).attr("r",2.5).attr("style",`fill:${h};stroke:none`);y.append("rect").attr("class","browser-address-bar").attr("x",-d/2+44).attr("y",p+4).attr("width",Math.max(d-56,10)).attr("height",10).attr("rx",3).attr("ry",3).attr("style",`fill:none;stroke:${h};stroke-width:1px;opacity:0.6`),x(e,y);let C=p+18+(g-18)/2;return l.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${C-n.height/2-(n.y-(n.top??0))})`),e.intersect=function(t){return $.rect(e,t)},s}async function Z(t,e){let r,{labelStyles:o,nodeStyles:a}=(0,i.GX)(e);e.labelStyle=o;let s=e.padding??0,n="neo"===e.look?28:s,l="neo"===e.look?24:s,{shapeSvg:h,bbox:c}=await m(t,e,b(e)),d=(e?.width??c.width)+("neo"===e.look?2*n:n+12),g=(e?.height??c.height)+("neo"===e.look?2*l:l),p=-g,f=[{x:12,y:p},{x:d,y:p},{x:d,y:0},{x:0,y:0},{x:0,y:p+12},{x:12,y:p}],{cssStyles:y}=e;if("handDrawn"===e.look){let t=u.A.svg(h),o=(0,i.Fr)(e,{}),a=k(f),s=t.path(a,o);r=h.insert(()=>s,":first-child").attr("transform",`translate(${-d/2}, ${g/2})`),y&&r.attr("style",y)}else r=R(h,d,g,f);return a&&r.attr("style",a),x(e,r),e.intersect=function(t){return $.polygon(e,f,t)},h}function Q(t,e){let{nodeStyles:r}=(0,i.GX)(e);e.label="";let o=t.insert("g").attr("class",b(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,s=Math.max(28,e.width??0),n=[{x:0,y:s/2},{x:s/2,y:0},{x:0,y:-s/2},{x:-s/2,y:0}],l=u.A.svg(o),h=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(h.roughness=0,h.fillStyle="solid");let c=k(n),d=l.path(c,h),g=o.insert(()=>d,":first-child");return a&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",a),r&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(t){return $.polygon(e,n,t)},o}async function J(t,e,r){let o,{labelStyles:a,nodeStyles:s}=(0,i.GX)(e);e.labelStyle=a;let{shapeSvg:l,bbox:c,halfPadding:d}=await m(t,e,b(e)),g=r?.padding??d,p=Math.sqrt(c.width**2+c.height**2)/2,f="neo"===e.look?p+32:p+g,{cssStyles:y}=e;if("handDrawn"===e.look){let t=u.A.svg(l),r=(0,i.Fr)(e,{}),a=t.circle(0,0,2*f,r);(o=l.insert(()=>a,":first-child")).attr("class","basic label-container").attr("style",(0,n.KL)(y))}else o=l.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",f).attr("cx",0).attr("cy",0);return x(e,o),e.calcIntersect=function(t,e){let r=t.width/2;return $.circle(t,r,e)},e.intersect=function(t){return h.R.info("Circle intersect",e,f,t),$.circle(e,f,t)},l}async function tt(t,e){let r=["node",e.cssClasses,e.class].filter(Boolean).join(" "),{shapeSvg:i,bbox:o,halfPadding:a}=await m(t,e,r),s=i.insert("rect",":first-child"),n=e.padding??0,l=e.positioned?e.width??0:o.width+n,h=e.positioned?e.height??0:o.height+n,c=e.positioned?-l/2:-o.width/2-a,d=e.positioned?-h/2:-o.height/2-a;return s.attr("class","basic cluster composite label-container").attr("style",e.style??null).attr("rx",e.rx??null).attr("ry",e.ry??null).attr("x",c).attr("y",d).attr("width",l).attr("height",h),x(e,s),e.intersect=function(t){return $.rect(e,t)},i}async function te(t,e,{config:{themeVariables:r}}){let{labelStyles:o,nodeStyles:a}=(0,i.GX)(e);e.labelStyle=o;let{shapeSvg:s,bbox:n,label:l}=await m(t,e,b(e)),h=r?.nodeBorder??r?.lineColor??"currentColor",c=e.padding??12,d=Math.max(n.width+2*c,e.width??0,90),g=Math.max(n.height+2*c+20,e.height??0),p=-g/2,{cssStyles:f}=e,y=s.insert("g",":first-child").attr("class","basic label-container");if("handDrawn"===e.look){let t=u.A.svg(s).path(E(-d/2,p,d,g,12),(0,i.Fr)(e,{}));y.node()?.appendChild(t),f&&y.attr("style",f)}else y.append("rect").attr("x",-d/2).attr("y",p).attr("width",d).attr("height",g).attr("rx",12).attr("ry",12).attr("style",a);y.append("text").attr("x",-d/2+12).attr("y",p+16).attr("class","console-glyph").attr("style",`font-family:monospace;font-weight:bold;font-size:14px;fill:${h}`).text(">_"),x(e,y);let C=p+20+(g-20)/2;return l.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${C-n.height/2-(n.y-(n.top??0))})`),e.intersect=function(t){return $.rect(e,t)},s}function tr(t){let e=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=2*t,o={x:i/2*e,y:i/2*r},a={x:-(i/2)*e,y:i/2*r},s={x:-(i/2)*e,y:-(i/2)*r},n={x:i/2*e,y:-(i/2)*r};return`M ${a.x},${a.y} L ${n.x},${n.y}
|
|
3
|
-
M ${o.x},${o.y} L ${s.x},${s.y}`}function ti(t,e){let{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r,e.label="";let a=t.insert("g").attr("class",b(e)).attr("id",e.domId??e.id),s=Math.max(30,e?.width??0),{cssStyles:n}=e,l=u.A.svg(a),c=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(c.roughness=0,c.fillStyle="solid");let d=l.circle(0,0,2*s,c),g=tr(s),p=l.path(g,c),f=a.insert(()=>d,":first-child");return f.insert(()=>p),f.attr("class","outer-path"),n&&"handDrawn"!==e.look&&f.selectAll("path").attr("style",n),o&&"handDrawn"!==e.look&&f.selectAll("path").attr("style",o),x(e,f),e.intersect=function(t){return h.R.info("crossedCircle intersect",e,{radius:s,point:t}),$.circle(e,s,t)},a}function to(t,e,r,i=100,o=0,a=180){let s=[],n=o*Math.PI/180,l=(a*Math.PI/180-n)/(i-1);for(let o=0;o<i;o++){let i=n+o*l,a=t+r*Math.cos(i),h=e+r*Math.sin(i);s.push({x:-a,y:-h})}return s}async function ta(t,e){let{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;let{shapeSvg:a,bbox:s,label:n}=await m(t,e,b(e)),l="neo"===e.look?18:e.padding??0,h="neo"===e.look?12:e.padding??0,c=s.width+l,d=s.height+h,g=Math.max(5,.1*d),{cssStyles:p}=e,f=[...to(c/2,-d/2,g,30,-90,0),{x:-c/2-g,y:g},...to(c/2+2*g,-g,g,20,-180,-270),...to(c/2+2*g,g,g,20,-90,-180),{x:-c/2-g,y:-d/2},...to(c/2,d/2,g,20,0,90)],y=[{x:c/2,y:-d/2-g},{x:-c/2,y:-d/2-g},...to(c/2,-d/2,g,20,-90,0),{x:-c/2-g,y:-g},...to(c/2+.1*c,-g,g,20,-180,-270),...to(c/2+.1*c,g,g,20,-90,-180),{x:-c/2-g,y:d/2},...to(c/2,d/2,g,20,0,90),{x:-c/2,y:d/2+g},{x:c/2,y:d/2+g}],C=u.A.svg(a),w=(0,i.Fr)(e,{fill:"none"});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let B=k(f).replace("Z",""),T=C.path(B,w),S=k(y),v=C.path(S,{...w}),_=a.insert("g",":first-child");return _.insert(()=>v,":first-child").attr("stroke-opacity",0),_.insert(()=>T,":first-child"),_.attr("class","text"),p&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",p),o&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",o),_.attr("transform",`translate(${g}, 0)`),n.attr("transform",`translate(${-c/2+g-(s.x-(s.left??0))},${-d/2+(e.padding??0)/2-(s.y-(s.top??0))})`),x(e,_),e.intersect=function(t){return $.polygon(e,y,t)},a}function ts(t,e,r,i=100,o=0,a=180){let s=[],n=o*Math.PI/180,l=(a*Math.PI/180-n)/(i-1);for(let o=0;o<i;o++){let i=n+o*l,a=t+r*Math.cos(i),h=e+r*Math.sin(i);s.push({x:a,y:h})}return s}async function tn(t,e){let{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;let{shapeSvg:a,bbox:s,label:n}=await m(t,e,b(e)),l="neo"===e.look?18:e.padding??0,h="neo"===e.look?12:e.padding??0,c=s.width+("neo"===e.look?2*l:l),d=s.height+("neo"===e.look?2*h:h),g=Math.max(5,.1*d),{cssStyles:p}=e,f=[...ts(c/2,-d/2,g,20,-90,0),{x:c/2+g,y:-g},...ts(c/2+2*g,-g,g,20,-180,-270),...ts(c/2+2*g,g,g,20,-90,-180),{x:c/2+g,y:d/2},...ts(c/2,d/2,g,20,0,90)],y=[{x:-c/2,y:-d/2-g},{x:c/2,y:-d/2-g},...ts(c/2,-d/2,g,20,-90,0),{x:c/2+g,y:-g},...ts(c/2+2*g,-g,g,20,-180,-270),...ts(c/2+2*g,g,g,20,-90,-180),{x:c/2+g,y:d/2},...ts(c/2,d/2,g,20,0,90),{x:c/2,y:d/2+g},{x:-c/2,y:d/2+g}],C=u.A.svg(a),w=(0,i.Fr)(e,{fill:"none"});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let B=k(f).replace("Z",""),T=C.path(B,w),S=k(y),v=C.path(S,{...w}),_=a.insert("g",":first-child");return _.insert(()=>v,":first-child").attr("stroke-opacity",0),_.insert(()=>T,":first-child"),_.attr("class","text"),p&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",p),o&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",o),_.attr("transform",`translate(${-g}, 0)`),n.attr("transform",`translate(${-c/2+(e.padding??0)/2-(s.x-(s.left??0))},${-d/2+(e.padding??0)/2-(s.y-(s.top??0))})`),x(e,_),e.intersect=function(t){return $.polygon(e,y,t)},a}function tl(t,e,r,i=100,o=0,a=180){let s=[],n=o*Math.PI/180,l=(a*Math.PI/180-n)/(i-1);for(let o=0;o<i;o++){let i=n+o*l,a=t+r*Math.cos(i),h=e+r*Math.sin(i);s.push({x:-a,y:-h})}return s}async function th(t,e){let{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;let{shapeSvg:a,bbox:s,label:n}=await m(t,e,b(e)),l="neo"===e.look?18:e.padding??0,h="neo"===e.look?12:e.padding??0,c=s.width+("neo"===e.look?2*l:l),d=s.height+("neo"===e.look?2*h:h),g=Math.max(5,.1*d),{cssStyles:p}=e,f=[...tl(c/2,-d/2,g,30,-90,0),{x:-c/2-g,y:g},...tl(c/2+2*g,-g,g,20,-180,-270),...tl(c/2+2*g,g,g,20,-90,-180),{x:-c/2-g,y:-d/2},...tl(c/2,d/2,g,20,0,90)],y=[...tl(-c/2+g+g/2,-d/2,g,20,-90,-180),{x:c/2-g/2,y:g},...tl(-c/2-g/2,-g,g,20,0,90),...tl(-c/2-g/2,g,g,20,-90,0),{x:c/2-g/2,y:-g},...tl(-c/2+g+g/2,d/2,g,30,-180,-270)],C=[{x:c/2,y:-d/2-g},{x:-c/2,y:-d/2-g},...tl(c/2,-d/2,g,20,-90,0),{x:-c/2-g,y:-g},...tl(c/2+2*g,-g,g,20,-180,-270),...tl(c/2+2*g,g,g,20,-90,-180),{x:-c/2-g,y:d/2},...tl(c/2,d/2,g,20,0,90),{x:-c/2,y:d/2+g},{x:c/2-g-g/2,y:d/2+g},...tl(-c/2+g+g/2,-d/2,g,20,-90,-180),{x:c/2-g/2,y:g},...tl(-c/2-g/2,-g,g,20,0,90),...tl(-c/2-g/2,g,g,20,-90,0),{x:c/2-g/2,y:-g},...tl(-c/2+g+g/2,d/2,g,30,-180,-270)],w=u.A.svg(a),B=(0,i.Fr)(e,{fill:"none"});"handDrawn"!==e.look&&(B.roughness=0,B.fillStyle="solid");let T=k(f).replace("Z",""),S=w.path(T,B),v=k(y).replace("Z",""),_=w.path(v,B),F=k(C),L=w.path(F,{...B}),A=a.insert("g",":first-child");return A.insert(()=>L,":first-child").attr("stroke-opacity",0),A.insert(()=>S,":first-child"),A.insert(()=>_,":first-child"),A.attr("class","text"),p&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",p),o&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",o),A.attr("transform",`translate(${g-g/4}, 0)`),n.attr("transform",`translate(${-c/2+(e.padding??0)/2-(s.x-(s.left??0))},${-d/2+(e.padding??0)/2-(s.y-(s.top??0))})`),x(e,A),e.intersect=function(t){return $.polygon(e,C,t)},a}async function tc(t,e){let{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;let a=e.padding??0,s="neo"===e.look?16:a,n="neo"===e.look?12:a,{shapeSvg:l,bbox:h}=await m(t,e,b(e)),c=Math.max(5,h.height+2*n,e?.height??0),d=c/2,g=Math.max(c/4,d-Math.sqrt(Math.max(0,d**2-(h.height/2)**2))),p=Math.max(20,h.width+2*s+2*g,(h.width+2*s)*1.25,e?.width??0),{cssStyles:f}=e,y=u.A.svg(l),C=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");let w=p-d,T=c/4,S=[{x:w,y:0},{x:T,y:0},{x:0,y:c/2},{x:T,y:c},{x:w,y:c},...B(-w,-c/2,d,50,270,90)],v=k(S),_=y.path(v,C),F=l.insert(()=>_,":first-child");return F.attr("class","basic label-container outer-path"),f&&"handDrawn"!==e.look&&F.selectChildren("path").attr("style",f),o&&"handDrawn"!==e.look&&F.selectChildren("path").attr("style",o),F.attr("transform",`translate(${-p/2}, ${-c/2})`),x(e,F),e.intersect=function(t){return $.polygon(e,S,t)},l}async function td(t,e){let{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;let{shapeSvg:a,bbox:s,label:n}=await m(t,e,b(e)),l=e.padding??20,h=Math.max(s.width+2*l,e.width??0,100),c=Math.min(Math.max(.23*h,16),56),d=.27*c,g=Math.max(s.height+2*l,e.height?e.height-(2*c-d):0),p=Math.min(.177*h,.45*g),f=g+2*c-d,y=-f/2,C=y+2*c-d,k=a.insert("g",":first-child").attr("class","basic label-container"),{cssStyles:w}=e;if("handDrawn"===e.look){let t=u.A.svg(a),r=(0,i.Fr)(e,{}),o=t.path(E(-h/2,C,h,g,p),r),s=t.circle(0,y+c,2*c,r);k.insert(()=>s,":first-child"),k.insert(()=>o,":first-child"),w&&k.attr("style",w)}else k.append("rect").attr("x",-h/2).attr("y",C).attr("width",h).attr("height",g).attr("rx",p).attr("ry",p).attr("style",o),k.append("circle").attr("cx",0).attr("cy",y+c).attr("r",c).attr("style",o);x(e,k);let T=C+g/2;n.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${T-s.height/2-(s.y-(s.top??0))})`);let S=y+c,v=180*Math.asin(Math.min(1,(C-S)/c))/Math.PI,_=[...B(0,-S,c,24,180+v,-v),...B(-(-h/2+p),-(C+p),p,12,90,0),...B(-(-h/2+p),-(f/2-p),p,12,360,270),...B(-(h/2-p),-(f/2-p),p,12,270,180),...B(-(h/2-p),-(C+p),p,12,180,90)];return e.intersect=function(t){return $.polygon(e,_,t)},a}(0,c.K)(G,"block_arrow"),(0,c.K)(V,"browser"),(0,c.K)(Z,"card"),(0,c.K)(Q,"choice"),(0,c.K)(J,"circle"),(0,c.K)(tt,"composite"),(0,c.K)(te,"consoleWindow"),(0,c.K)(tr,"createLine"),(0,c.K)(ti,"crossedCircle"),(0,c.K)(to,"generateCirclePoints"),(0,c.K)(ta,"curlyBraceLeft"),(0,c.K)(ts,"generateCirclePoints"),(0,c.K)(tn,"curlyBraceRight"),(0,c.K)(tl,"generateCirclePoints"),(0,c.K)(th,"curlyBraces"),(0,c.K)(tc,"curvedTrapezoid"),(0,c.K)(td,"person");var tu=(0,c.K)((t,e,r,i,o,a)=>`M${t},${e+a} a${o},${a} 0,0,0 ${r},0 a${o},${a} 0,0,0 ${-r},0 l0,${i} a${o},${a} 0,0,0 ${r},0 l0,${-i}`,"createCylinderPathD"),tg=(0,c.K)((t,e,r,i,o,a)=>`M${t},${e+a} M${t+r},${e+a} a${o},${a} 0,0,0 ${-r},0 l0,${i} a${o},${a} 0,0,0 ${r},0 l0,${-i}`,"createOuterCylinderPathD"),tp=(0,c.K)((t,e,r,i,o,a)=>`M${t-r/2},${-i/2} a${o},${a} 0,0,0 ${r},0`,"createInnerCylinderPathD");async function tf(t,e){let r,{labelStyles:o,nodeStyles:a}=(0,i.GX)(e);e.labelStyle=o;let s=e.padding??0,l="neo"===e.look?24:s,h="neo"===e.look?24:s,c=e.width??0;e.width&&(e.width=e.width-h,e.width<8&&(e.width=8)),e.height&&(e.height=e.height-l-c/2/(2.5+c/50)*3,e.height<8&&(e.height=8));let{shapeSvg:d,bbox:g,label:p}=await m(t,e,b(e)),f=Math.max(e.width??0,g.width)+h,y=f/2,C=y/(2.5+f/50),k=Math.max(e.height??0,g.height)+l+C,{cssStyles:w}=e;if("handDrawn"===e.look){let t=u.A.svg(d),o=tg(0,0,f,k,y,C),a=tp(0,C,f,k,y,C),s=(0,i.Fr)(e,{}),n=t.path(o,s),l=t.path(a,(0,i.Fr)(e,{fill:"none"}));r=d.insert(()=>l,":first-child"),(r=d.insert(()=>n,":first-child")).attr("class","basic label-container"),w&&r.attr("style",w)}else{let t=tu(0,0,f,k,y,C);r=d.insert("path",":first-child").attr("d",t).attr("class","basic label-container outer-path").attr("style",(0,n.KL)(w)).attr("style",a)}return r.attr("label-offset-y",C),r.attr("transform",`translate(${-f/2}, ${-(k/2+C)})`),x(e,r),p.attr("transform",`translate(${-(g.width/2)-(g.x-(g.left??0))}, ${-(g.height/2)+(e.padding??0)/1.5-(g.y-(g.top??0))})`),e.intersect=function(t){let r=$.rect(e,t),i=r.x-(e.x??0);if(0!=y&&(Math.abs(i)<(e.width??0)/2||Math.abs(i)==(e.width??0)/2&&Math.abs(r.y-(e.y??0))>(e.height??0)/2-C)){let o=C*C*(1-i*i/(y*y));o>0&&(o=Math.sqrt(o)),o=C-o,t.y-(e.y??0)>0&&(o=-o),r.y+=o}return r},d}async function ty(t,e,r){let o,{labelStyles:a,nodeStyles:s}=(0,i.GX)(e);e.labelStyle=a;let{shapeSvg:l,bbox:h}=await m(t,e,b(e)),c=Math.max(h.width+2*r.labelPaddingX,e?.width||0),d=Math.max(h.height+2*r.labelPaddingY,e?.height||0),g=-c/2,p=-d/2,{rx:f,ry:y}=e,{cssStyles:C}=e;if(r?.rx&&r.ry&&(f=r.rx,y=r.ry),"handDrawn"===e.look){let t=u.A.svg(l),r=(0,i.Fr)(e,{}),a=f||y?t.path(E(g,p,c,d,f||0),r):t.rectangle(g,p,c,d,r);(o=l.insert(()=>a,":first-child")).attr("class","basic label-container").attr("style",(0,n.KL)(C))}else(o=l.insert("rect",":first-child")).attr("class","basic label-container").attr("style",s).attr("rx",(0,n.KL)(f)).attr("ry",(0,n.KL)(y)).attr("x",g).attr("y",p).attr("width",c).attr("height",d);return x(e,o,"handDrawn"===e.look?void 0:{width:c,height:d}),e.calcIntersect=function(t,e){return $.rect(t,e)},e.intersect=function(t){return $.rect(e,t)},l}async function tm(t,e){let{cssClasses:r,labelPaddingX:o,labelPaddingY:a,padding:s,width:n,height:l}=e,h=await ty(t,e,{rx:0,ry:0,classes:r??"",labelPaddingX:o??(s??0)*2,labelPaddingY:a??s??0});if("handDrawn"===e.look){let t=u.A.svg(h),r=(0,i.Fr)(e,{}),o=h.select(".basic.label-container > path:nth-child(2)"),a=o.node();if(!a)return h;let s=null;return a instanceof SVGGraphicsElement&&(s=a.getBBox(),h.insert(()=>t.line(s.x,s.y,s.x+s.width,s.y,r),".basic.label-container g.label"),h.insert(()=>t.line(s.x,s.y+s.height,s.x+s.width,s.y+s.height,r),".basic.label-container g.label"),o.remove()),h}let c=h.select(".basic.label-container"),d=(Number(c.attr("width"))||n)??0,g=(Number(c.attr("height"))||l)??0;return d>0&&g>0&&c.attr("stroke-dasharray",`${d} ${g}`),h}async function tC(t,e){let{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;let a="neo"===e.look?16:e.padding??0,s="neo"===e.look?16:e.padding??0,{shapeSvg:n,bbox:l,label:h}=await m(t,e,b(e)),c=l.width+a,d=l.height+s,g=.2*d,p=-c/2,f=-d/2-g/2,{cssStyles:y}=e,C=u.A.svg(n),k=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let w=C.polygon([{x:p,y:f+g},{x:-p,y:f+g},{x:-p,y:-f},{x:p,y:-f},{x:p,y:f},{x:-p,y:f},{x:-p,y:f+g}].map(t=>[t.x,t.y]),k),B=n.insert(()=>w,":first-child");return B.attr("class","basic label-container outer-path"),y&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",y),o&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",o),h.attr("transform",`translate(${p+(e.padding??0)/2-(l.x-(l.left??0))}, ${f+g+(e.padding??0)/2-(l.y-(l.top??0))})`),x(e,B),e.intersect=function(t){return $.rect(e,t)},n}async function tx(t,e){let r,{labelStyles:o,nodeStyles:a}=(0,i.GX)(e),s="neo"===e.look?12:5;e.labelStyle=o;let l=e.padding??0,c="neo"===e.look?16:l,{shapeSvg:d,bbox:g}=await m(t,e,b(e)),p=Math.sqrt(g.width**2+g.height**2)/2,f=(e?.width?e?.width/2:p)+(c??0),y=f+s,{cssStyles:C}=e;if("handDrawn"===e.look){let t=u.A.svg(d),o=(0,i.Fr)(e,{roughness:.2,strokeWidth:2.5}),a=(0,i.Fr)(e,{roughness:.2,strokeWidth:1.5}),s=t.circle(0,0,2*y,o),l=t.circle(0,0,2*f,a);(r=d.insert("g",":first-child")).attr("class",(0,n.KL)(e.cssClasses)).attr("style",(0,n.KL)(C)),r.node()?.appendChild(s),r.node()?.appendChild(l)}else{let t=(r=d.insert("g",":first-child")).insert("circle",":first-child"),e=r.insert("circle");r.attr("class","basic label-container").attr("style",a),t.attr("class","outer-circle").attr("style",a).attr("r",y).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",a).attr("r",f).attr("cx",0).attr("cy",0)}return x(e,r),e.intersect=function(t){return h.R.info("DoubleCircle intersect",e,y,t),$.circle(e,y,t)},d}async function tb(t,e){let r,{labelStyles:o,nodeStyles:a}=(0,i.GX)(e);e.labelStyle=o;let{shapeSvg:n,bbox:h,halfPadding:c}=await m(t,e,b(e)),{theme:d,themeVariables:g}=(0,l.D7)();(0,s.XE)(n,e.colorIndex,d,g.borderColorArray);let p=c??10,f=h.width/2+2*p,y=h.height/2+2*p,{cssStyles:C}=e;if("handDrawn"===e.look){let t=u.A.svg(n),o=(0,i.Fr)(e,{}),a=t.ellipse(0,0,2*f,2*y,o);(r=n.insert(()=>a,":first-child")).attr("class","basic label-container"),C&&r.attr("style",C)}else r=n.insert("ellipse",":first-child").attr("class","basic label-container").attr("style",a).attr("rx",f).attr("ry",y).attr("cx",0).attr("cy",0);return e.width=2*f,e.height=2*y,x(e,r),e.calcIntersect=function(t,e){let r=t.width/2,i=t.height/2;return $.ellipse(t,r,i,e)},e.intersect=function(t){return $.ellipse(e,f,y,t)},n}function tk(t,e,{config:{themeVariables:r}}){let{labelStyles:o,nodeStyles:a}=(0,i.GX)(e);e.label="",e.labelStyle=o;let s=t.insert("g").attr("class",b(e)).attr("id",e.domId??e.id),{cssStyles:n}=e,l=u.A.svg(s),{nodeBorder:c}=r,d=(0,i.Fr)(e,{fillStyle:"solid"});"handDrawn"!==e.look&&(d.roughness=0);let g=l.circle(0,0,14,d),p=s.insert(()=>g,":first-child");return p.selectAll("path").attr("style",`fill: ${c} !important;`),n&&n.length>0&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",n),a&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",a),x(e,p),e.intersect=function(t){return h.R.info("filledCircle intersect",e,{radius:7,point:t}),$.circle(e,7,t)},s}async function tw(t,e){let{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;let a=e.padding??0,s="neo"===e.look?2*a:a;(e.width||e.height)&&(e.height=e?.height??0,e.height<10&&(e.height=10),e.width=(e?.width??0)-s-s/2,e.width<10&&(e.width=10));let{shapeSvg:n,bbox:l,label:c}=await m(t,e,b(e)),d=(e?.width?e?.width:l.width)+(s??0),g=e?.height?e?.height:d+l.height,p=[{x:0,y:-g},{x:g,y:-g},{x:g/2,y:0}],{cssStyles:f}=e,y=u.A.svg(n),C=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");let w=k(p),B=y.path(w,C),T=n.insert(()=>B,":first-child").attr("transform",`translate(${-g/2}, ${g/2})`).attr("class","outer-path");return f&&"handDrawn"!==e.look&&T.selectChildren("path").attr("style",f),o&&"handDrawn"!==e.look&&T.selectChildren("path").attr("style",o),e.width=d,e.height=g,x(e,T),c.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))}, ${-g/2+(e.padding??0)/2+(l.y-(l.top??0))})`),e.intersect=function(t){return h.R.info("Triangle intersect",e,p,t),$.polygon(e,p,t)},n}async function tB(t,e){let r,{labelStyles:o,nodeStyles:a}=(0,i.GX)(e);e.labelStyle=o;let{shapeSvg:s,bbox:n,label:l}=await m(t,e,b(e)),h=e.padding??12,c=Math.max(n.width+2*h,e.width??0,90),d=n.height+2*h,g=Math.max(Math.min(.16*d,14),8),p=Math.max(d+g,e.height??0),f=p-g,y=Math.max(.38*c,28),C=-p/2,k=[{x:-c/2,y:C},{x:-c/2+y,y:C},{x:-c/2+y,y:C+g},{x:c/2,y:C+g},{x:c/2,y:p/2},{x:-c/2,y:p/2}],w=[`M${k[0].x},${k[0].y}`,...k.slice(1).map(t=>`L${t.x},${t.y}`),"Z"].join(" "),{cssStyles:B}=e;if("handDrawn"===e.look){let t=u.A.svg(s).path(w,(0,i.Fr)(e,{}));r=s.insert(()=>t,":first-child").attr("class","basic label-container"),B&&r.attr("style",B)}else r=s.insert("path",":first-child").attr("d",w).attr("class","basic label-container").attr("style",a);return"handDrawn"===e.look?x(e,r):x(e,r,{width:c,height:p}),l.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${C+g+f/2-n.height/2-(n.y-(n.top??0))})`),e.intersect=function(t){return $.polygon(e,k,t)},s}function tT(t,e,{dir:r,config:{state:o,themeVariables:a}}){let{nodeStyles:s}=(0,i.GX)(e);e.label="";let n=t.insert("g").attr("class",b(e)).attr("id",e.domId??e.id),{cssStyles:l}=e,h=Math.max(70,e?.width??0),c=Math.max(10,e?.height??0);("LR"===r||"RL"===r)&&(h=Math.max(10,e?.width??0),c=Math.max(70,e?.height??0));let d=-1*h/2,g=-1*c/2,p=u.A.svg(n),f=(0,i.Fr)(e,{stroke:a.lineColor,fill:a.lineColor});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");let y=p.rectangle(d,g,h,c,f),m=n.insert(()=>y,":first-child");l&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",l),s&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",s),x(e,m);let C=o?.padding??0;return e.width&&e.height&&(e.width+=C/2||0,e.height+=C/2||0),e.intersect=function(t){return $.rect(e,t)},n}async function tS(t,e){let{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;let a="neo"===e.look?16:e.padding??0,s="neo"===e.look?12:e.padding??0;(e.width||e.height)&&(e.height=(e?.height??0)-2*s,e.height<10&&(e.height=10),e.width=(e?.width??0)-2*a,e.width<15&&(e.width=15));let{shapeSvg:n,bbox:l}=await m(t,e,b(e)),c=(e?.height?e?.height:Math.max(10,l.height))+2*s,d=c/2,g=d-Math.sqrt(Math.max(0,d**2-(l.height/2)**2)),p=(e?.width?e?.width:Math.max(15,l.width)+2*g)+2*a,{cssStyles:f}=e,y=u.A.svg(n),C=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");let w=[{x:-p/2,y:-c/2},{x:p/2-d,y:-c/2},...B(-p/2+d,0,d,50,90,270),{x:p/2-d,y:c/2},{x:-p/2,y:c/2}],T=k(w),S=y.path(T,C),v=n.insert(()=>S,":first-child");return v.attr("class","basic label-container outer-path"),f&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",f),o&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",o),x(e,v),e.intersect=function(t){return h.R.info("Pill intersect",e,{radius:d,point:t}),$.polygon(e,w,t)},n}(0,c.K)(tf,"cylinder"),(0,c.K)(ty,"drawRect"),(0,c.K)(tm,"datastore"),(0,c.K)(tC,"dividedRectangle"),(0,c.K)(tx,"doublecircle"),(0,c.K)(tb,"usecaseEllipse"),(0,c.K)(tk,"filledCircle"),(0,c.K)(tw,"flippedTriangle"),(0,c.K)(tB,"folder"),(0,c.K)(tT,"forkJoin"),(0,c.K)(tS,"halfRoundedRectangle");var tv=(0,c.K)((t,e,r,i,o)=>`M${t+o},${e} L${t+r-o},${e} L${t+r},${e-i/2} L${t+r-o},${e-i} L${t+o},${e-i} L${t},${e-i/2} Z`,"createHexagonPathD");async function t_(t,e){let r,{labelStyles:o,nodeStyles:a}=(0,i.GX)(e),s="neo"===e.look?3.5:4;e.labelStyle=o;let n=e.padding??0,l="neo"===e.look?70:n,h="neo"===e.look?32:n;if(e.width||e.height){let t=e.height??0;e.width=(e?.width??0)-t/s*2-h,e.height=(e.height??0)-l}let{shapeSvg:c,bbox:d}=await m(t,e,b(e)),g=(e?.height?e?.height:d.height)+l,p=g/s,f=(e?.width?e?.width:d.width)+2*p+h,y=[{x:p,y:0},{x:f-p,y:0},{x:f,y:-g/2},{x:f-p,y:-g},{x:p,y:-g},{x:0,y:-g/2}],{cssStyles:C}=e;if("handDrawn"===e.look){let t=u.A.svg(c),o=(0,i.Fr)(e,{}),a=tv(0,0,f,g,p),s=t.path(a,o);r=c.insert(()=>s,":first-child").attr("transform",`translate(${-f/2}, ${g/2})`),C&&r.attr("style",C)}else r=R(c,f,g,y);return a&&r.attr("style",a),e.width=f,e.height=g,x(e,r),e.intersect=function(t){return $.polygon(e,y,t)},c}async function tF(t,e){let{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.label="",e.labelStyle=r;let{shapeSvg:a}=await m(t,e,b(e)),s=Math.max(30,e?.width??0),n=Math.max(30,e?.height??0),{cssStyles:l}=e,c=u.A.svg(a),d=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(d.roughness=0,d.fillStyle="solid");let g=[{x:0,y:0},{x:s,y:0},{x:0,y:n},{x:s,y:n}],p=k(g),f=c.path(p,d),y=a.insert(()=>f,":first-child");return y.attr("class","basic label-container outer-path"),l&&"handDrawn"!==e.look&&y.selectChildren("path").attr("style",l),o&&"handDrawn"!==e.look&&y.selectChildren("path").attr("style",o),y.attr("transform",`translate(${-s/2}, ${-n/2})`),x(e,y),e.intersect=function(t){return h.R.info("Pill intersect",e,{points:g}),$.polygon(e,g,t)},a}async function tL(t,e,{config:{themeVariables:r,flowchart:o}}){let{labelStyles:s}=(0,i.GX)(e);e.labelStyle=s;let n=Math.max(e.assetHeight??48,e.assetWidth??48);e.width=Math.max(n,o?.wrappingWidth??0);let{shapeSvg:l,bbox:c,label:d}=await m(t,e,"icon-shape default"),g="t"===e.pos,{nodeBorder:p}=r,{stylesMap:f}=(0,i.WW)(e),y=-n/2,C=-n/2,b=8*!!e.label,k=u.A.svg(l),w=(0,i.Fr)(e,{stroke:"none",fill:"none"});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let B=k.rectangle(y,C,n,n,w),T=Math.max(n,c.width),S=n+c.height+b,v=k.rectangle(-T/2,-S/2,T,S,{...w,fill:"transparent",stroke:"none"}),_=l.insert(()=>B,":first-child"),F=l.insert(()=>v);if(e.icon){let t=l.append("g");t.html(`<g>${await (0,a.WY)(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);let r=t.node().getBBox(),i=r.width,o=r.height,s=r.x,h=r.y;t.attr("transform",`translate(${-i/2-s},${g?c.height/2+b/2-o/2-h:-c.height/2-b/2-o/2-h})`),t.attr("style",`color: ${f.get("stroke")??p};`)}return d.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${g?-S/2:S/2-c.height})`),_.attr("transform",`translate(0,${g?c.height/2+b/2:-c.height/2-b/2})`),x(e,F),e.intersect=function(t){if(h.R.info("iconSquare intersect",e,t),!e.label)return $.rect(e,t);let r=e.x??0,i=e.y??0,o=e.height??0,a=[];return a=g?[{x:r-c.width/2,y:i-o/2},{x:r+c.width/2,y:i-o/2},{x:r+c.width/2,y:i-o/2+c.height+b},{x:r+n/2,y:i-o/2+c.height+b},{x:r+n/2,y:i+o/2},{x:r-n/2,y:i+o/2},{x:r-n/2,y:i-o/2+c.height+b},{x:r-c.width/2,y:i-o/2+c.height+b}]:[{x:r-n/2,y:i-o/2},{x:r+n/2,y:i-o/2},{x:r+n/2,y:i-o/2+n},{x:r+c.width/2,y:i-o/2+n},{x:r+c.width/2/2,y:i+o/2},{x:r-c.width/2,y:i+o/2},{x:r-c.width/2,y:i-o/2+n},{x:r-n/2,y:i-o/2+n}],$.polygon(e,a,t)},l}async function tA(t,e,{config:{themeVariables:r,flowchart:o}}){let{labelStyles:s}=(0,i.GX)(e);e.labelStyle=s;let n=Math.max(e.assetHeight??48,e.assetWidth??48);e.width=Math.max(n,o?.wrappingWidth??0);let{shapeSvg:l,bbox:c,label:d}=await m(t,e,"icon-shape default"),g=8*!!e.label,p="t"===e.pos,{nodeBorder:f,mainBkg:y}=r,{stylesMap:C}=(0,i.WW)(e),b=u.A.svg(l),k=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid"),k.stroke=C.get("fill")??y;let w=l.append("g");e.icon&&w.html(`<g>${await (0,a.WY)(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);let B=w.node().getBBox(),T=B.width,S=B.height,v=B.x,_=B.y,F=Math.max(T,S)*Math.SQRT2+40,L=b.circle(0,0,F,k),A=Math.max(F,c.width),M=F+c.height+g,E=b.rectangle(-A/2,-M/2,A,M,{...k,fill:"transparent",stroke:"none"}),K=l.insert(()=>L,":first-child"),O=l.insert(()=>E);return w.attr("transform",`translate(${-T/2-v},${p?c.height/2+g/2-S/2-_:-c.height/2-g/2-S/2-_})`),w.attr("style",`color: ${C.get("stroke")??f};`),d.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${p?-M/2:M/2-c.height})`),K.attr("transform",`translate(0,${p?c.height/2+g/2:-c.height/2-g/2})`),x(e,O),e.intersect=function(t){return h.R.info("iconSquare intersect",e,t),$.rect(e,t)},l}async function tM(t,e,{config:{themeVariables:r,flowchart:o}}){let{labelStyles:s}=(0,i.GX)(e);e.labelStyle=s;let n=Math.max(e.assetHeight??48,e.assetWidth??48);e.width=Math.max(n,o?.wrappingWidth??0);let{shapeSvg:l,bbox:c,halfPadding:d,label:g}=await m(t,e,"icon-shape default"),p="t"===e.pos,f=n+2*d,y=n+2*d,{nodeBorder:C,mainBkg:b}=r,{stylesMap:k}=(0,i.WW)(e),w=8*!!e.label,B=u.A.svg(l),T=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid"),T.stroke=k.get("fill")??b;let S=B.path(E(-y/2,-f/2,y,f,5),T),v=Math.max(y,c.width),_=f+c.height+w,F=B.rectangle(-v/2,-_/2,v,_,{...T,fill:"transparent",stroke:"none"}),L=l.insert(()=>S,":first-child").attr("class","icon-shape2"),A=l.insert(()=>F);if(e.icon){let t=l.append("g");t.html(`<g>${await (0,a.WY)(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);let r=t.node().getBBox(),i=r.width,o=r.height,s=r.x,h=r.y;t.attr("transform",`translate(${-i/2-s},${p?c.height/2+w/2-o/2-h:-c.height/2-w/2-o/2-h})`),t.attr("style",`color: ${k.get("stroke")??C};`)}return g.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${p?-_/2:_/2-c.height})`),L.attr("transform",`translate(0,${p?c.height/2+w/2:-c.height/2-w/2})`),x(e,A),e.intersect=function(t){if(h.R.info("iconSquare intersect",e,t),!e.label)return $.rect(e,t);let r=e.x??0,i=e.y??0,o=e.height??0,a=[];return a=p?[{x:r-c.width/2,y:i-o/2},{x:r+c.width/2,y:i-o/2},{x:r+c.width/2,y:i-o/2+c.height+w},{x:r+y/2,y:i-o/2+c.height+w},{x:r+y/2,y:i+o/2},{x:r-y/2,y:i+o/2},{x:r-y/2,y:i-o/2+c.height+w},{x:r-c.width/2,y:i-o/2+c.height+w}]:[{x:r-y/2,y:i-o/2},{x:r+y/2,y:i-o/2},{x:r+y/2,y:i-o/2+f},{x:r+c.width/2,y:i-o/2+f},{x:r+c.width/2/2,y:i+o/2},{x:r-c.width/2,y:i+o/2},{x:r-c.width/2,y:i-o/2+f},{x:r-y/2,y:i-o/2+f}],$.polygon(e,a,t)},l}async function t$(t,e,{config:{themeVariables:r,flowchart:o}}){let{labelStyles:s}=(0,i.GX)(e);e.labelStyle=s;let n=Math.max(e.assetHeight??48,e.assetWidth??48);e.width=Math.max(n,o?.wrappingWidth??0);let{shapeSvg:l,bbox:c,halfPadding:d,label:g}=await m(t,e,"icon-shape default"),p="t"===e.pos,f=n+2*d,y=n+2*d,{nodeBorder:C,mainBkg:b}=r,{stylesMap:k}=(0,i.WW)(e),w=8*!!e.label,B=u.A.svg(l),T=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid"),T.stroke=k.get("fill")??b;let S=B.path(E(-y/2,-f/2,y,f,.1),T),v=Math.max(y,c.width),_=f+c.height+w,F=B.rectangle(-v/2,-_/2,v,_,{...T,fill:"transparent",stroke:"none"}),L=l.insert(()=>S,":first-child"),A=l.insert(()=>F);if(e.icon){let t=l.append("g");t.html(`<g>${await (0,a.WY)(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);let r=t.node().getBBox(),i=r.width,o=r.height,s=r.x,h=r.y;t.attr("transform",`translate(${-i/2-s},${p?c.height/2+w/2-o/2-h:-c.height/2-w/2-o/2-h})`),t.attr("style",`color: ${k.get("stroke")??C};`)}return g.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${p?-_/2:_/2-c.height})`),L.attr("transform",`translate(0,${p?c.height/2+w/2:-c.height/2-w/2})`),x(e,A),e.intersect=function(t){if(h.R.info("iconSquare intersect",e,t),!e.label)return $.rect(e,t);let r=e.x??0,i=e.y??0,o=e.height??0,a=[];return a=p?[{x:r-c.width/2,y:i-o/2},{x:r+c.width/2,y:i-o/2},{x:r+c.width/2,y:i-o/2+c.height+w},{x:r+y/2,y:i-o/2+c.height+w},{x:r+y/2,y:i+o/2},{x:r-y/2,y:i+o/2},{x:r-y/2,y:i-o/2+c.height+w},{x:r-c.width/2,y:i-o/2+c.height+w}]:[{x:r-y/2,y:i-o/2},{x:r+y/2,y:i-o/2},{x:r+y/2,y:i-o/2+f},{x:r+c.width/2,y:i-o/2+f},{x:r+c.width/2/2,y:i+o/2},{x:r-c.width/2,y:i+o/2},{x:r-c.width/2,y:i-o/2+f},{x:r-y/2,y:i-o/2+f}],$.polygon(e,a,t)},l}async function tE(t,e,{config:{flowchart:r}}){let o=new Image;o.src=e?.img??"",await o.decode();let a=Number(o.naturalWidth.toString().replace("px","")),s=Number(o.naturalHeight.toString().replace("px",""));e.imageAspectRatio=a/s;let{labelStyles:n}=(0,i.GX)(e);e.labelStyle=n;let l=r?.wrappingWidth;e.defaultWidth=r?.wrappingWidth;let c=Math.max(e.label?l??0:0,e?.assetWidth??a),d="on"===e.constraint&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:c,g="on"===e.constraint?d/e.imageAspectRatio:e?.assetHeight??s;e.width=Math.max(d,l??0);let{shapeSvg:p,bbox:f,label:y}=await m(t,e,"image-shape default"),C="t"===e.pos,b=-d/2,k=8*!!e.label,w=u.A.svg(p),B=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(B.roughness=0,B.fillStyle="solid");let T=w.rectangle(b,-g/2,d,g,B),S=Math.max(d,f.width),v=g+f.height+k,_=w.rectangle(-S/2,-v/2,S,v,{...B,fill:"none",stroke:"none"}),F=p.insert(()=>T,":first-child"),L=p.insert(()=>_);if(e.img){let t=p.append("image");t.attr("href",e.img),t.attr("width",d),t.attr("height",g),t.attr("preserveAspectRatio","none"),t.attr("transform",`translate(${-d/2},${C?v/2-g:-v/2})`)}return y.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${C?-g/2-f.height/2-k/2:g/2-f.height/2+k/2})`),F.attr("transform",`translate(0,${C?f.height/2+k/2:-f.height/2-k/2})`),x(e,L),e.intersect=function(t){if(h.R.info("iconSquare intersect",e,t),!e.label)return $.rect(e,t);let r=e.x??0,i=e.y??0,o=e.height??0,a=[];return a=C?[{x:r-f.width/2,y:i-o/2},{x:r+f.width/2,y:i-o/2},{x:r+f.width/2,y:i-o/2+f.height+k},{x:r+d/2,y:i-o/2+f.height+k},{x:r+d/2,y:i+o/2},{x:r-d/2,y:i+o/2},{x:r-d/2,y:i-o/2+f.height+k},{x:r-f.width/2,y:i-o/2+f.height+k}]:[{x:r-d/2,y:i-o/2},{x:r+d/2,y:i-o/2},{x:r+d/2,y:i-o/2+g},{x:r+f.width/2,y:i-o/2+g},{x:r+f.width/2/2,y:i+o/2},{x:r-f.width/2,y:i+o/2},{x:r-f.width/2,y:i-o/2+g},{x:r-d/2,y:i-o/2+g}],$.polygon(e,a,t)},p}async function tK(t,e){let r,{labelStyles:o,nodeStyles:a}=(0,i.GX)(e);e.labelStyle=o;let s=e.padding??0,n="neo"===e.look?2*s:s,{shapeSvg:l,bbox:h}=await m(t,e,b(e)),c=Math.max(h.height+2*s,e.height??0),d=Math.max(h.width+2*n,(e.width??0)-c),g=[{x:0,y:0},{x:d,y:0},{x:d+3*c/6,y:-c},{x:-3*c/6,y:-c}],{cssStyles:p}=e;if("handDrawn"===e.look){let t=u.A.svg(l),o=(0,i.Fr)(e,{}),a=k(g),s=t.path(a,o);r=l.insert(()=>s,":first-child").attr("transform",`translate(${-d/2}, ${c/2})`),p&&r.attr("style",p)}else r=R(l,d,c,g);return a&&r.attr("style",a),e.width=d,e.height=c,x(e,r),e.intersect=function(t){return $.polygon(e,g,t)},l}async function tO(t,e){let{shapeSvg:r,bbox:i,label:o}=await m(t,e,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),o.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),x(e,a),e.intersect=function(t){return $.rect(e,t)},r}async function tD(t,e){let r,{labelStyles:o,nodeStyles:a}=(0,i.GX)(e);e.labelStyle=o;let s=e.padding??0,n="neo"===e.look?2*s:s,{shapeSvg:l,bbox:h}=await m(t,e,b(e)),c=Math.max(h.height+s,e.height??0),d=Math.max(h.width+n,(e.width??0)-c),g=[{x:0,y:0},{x:d+3*c/6,y:0},{x:d,y:-c},{x:-(3*c)/6,y:-c}],{cssStyles:p}=e;if("handDrawn"===e.look){let t=u.A.svg(l),o=(0,i.Fr)(e,{}),a=k(g),s=t.path(a,o);r=l.insert(()=>s,":first-child").attr("transform",`translate(${-d/2}, ${c/2})`),p&&r.attr("style",p)}else r=R(l,d,c,g);return a&&r.attr("style",a),e.width=d,e.height=c,x(e,r),e.intersect=function(t){return $.polygon(e,g,t)},l}async function tq(t,e){let r,{labelStyles:o,nodeStyles:a}=(0,i.GX)(e);e.labelStyle=o;let s=e.padding??0,n="neo"===e.look?2*s:s,{shapeSvg:l,bbox:h}=await m(t,e,b(e)),c=Math.max(h.height+s,e.height??0),d=Math.max(h.width+n,(e.width??0)-c),g=[{x:-3*c/6,y:0},{x:d,y:0},{x:d+3*c/6,y:-c},{x:0,y:-c}],{cssStyles:p}=e;if("handDrawn"===e.look){let t=u.A.svg(l),o=(0,i.Fr)(e,{}),a=k(g),s=t.path(a,o);r=l.insert(()=>s,":first-child").attr("transform",`translate(${-d/2}, ${c/2})`),p&&r.attr("style",p)}else r=R(l,d,c,g);return a&&r.attr("style",a),e.width=d,e.height=c,x(e,r),e.intersect=function(t){return $.polygon(e,g,t)},l}function tI(t,e){let{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.label="",e.labelStyle=r;let a=t.insert("g").attr("class",b(e)).attr("id",e.domId??e.id),{cssStyles:s}=e,n=Math.max(35,e?.width??0),l=Math.max(35,e?.height??0),c=[{x:n,y:0},{x:0,y:l+3.5},{x:n-14,y:l+3.5},{x:0,y:2*l},{x:n,y:l-3.5},{x:14,y:l-3.5}],d=u.A.svg(a),g=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");let p=k(c),f=d.path(p,g),y=a.insert(()=>f,":first-child");return y.attr("class","outer-path"),s&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",s),o&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",o),y.attr("transform",`translate(-${n/2},${-l})`),x(e,y),e.intersect=function(t){return h.R.info("lightningBolt intersect",e,t),$.polygon(e,c,t)},a}(0,c.K)(t_,"hexagon"),(0,c.K)(tF,"hourglass"),(0,c.K)(tL,"icon"),(0,c.K)(tA,"iconCircle"),(0,c.K)(tM,"iconRounded"),(0,c.K)(t$,"iconSquare"),(0,c.K)(tE,"imageSquare"),(0,c.K)(tK,"inv_trapezoid"),(0,c.K)(tO,"labelRect"),(0,c.K)(tD,"lean_left"),(0,c.K)(tq,"lean_right"),(0,c.K)(tI,"lightningBolt");var tP=(0,c.K)((t,e,r,i,o,a,s)=>`M${t},${e+a} a${o},${a} 0,0,0 ${r},0 a${o},${a} 0,0,0 ${-r},0 l0,${i} a${o},${a} 0,0,0 ${r},0 l0,${-i} M${t},${e+a+s} a${o},${a} 0,0,0 ${r},0`,"createCylinderPathD"),tW=(0,c.K)((t,e,r,i,o,a,s)=>`M${t},${e+a} M${t+r},${e+a} a${o},${a} 0,0,0 ${-r},0 l0,${i} a${o},${a} 0,0,0 ${r},0 l0,${-i} M${t},${e+a+s} a${o},${a} 0,0,0 ${r},0`,"createOuterCylinderPathD"),tz=(0,c.K)((t,e,r,i,o,a)=>`M${t-r/2},${-i/2} a${o},${a} 0,0,0 ${r},0`,"createInnerCylinderPathD");async function tR(t,e){let r,{labelStyles:o,nodeStyles:a}=(0,i.GX)(e);e.labelStyle=o;let s=e.padding??0,l="neo"===e.look?16:s,h="neo"===e.look?24:s;if(e.width||e.height){let t=e.width??0;e.width=(e.width??0)-l,e.width<10&&(e.width=10),e.height=(e.height??0)-h-t/2/(2.5+t/50)*3,e.height<10&&(e.height=10)}let{shapeSvg:c,bbox:d,label:g}=await m(t,e,b(e)),p=(e?.width?e?.width:d.width)+2*l,f=p/2,y=f/(2.5+p/50),C=(e?.height?e?.height:d.height)+y+2*h,k=.1*C,{cssStyles:w}=e;if("handDrawn"===e.look){let t=u.A.svg(c),o=tW(0,0,p,C,f,y,k),a=tz(0,y,p,C,f,y),s=(0,i.Fr)(e,{}),n=t.path(o,s),l=t.path(a,s);c.insert(()=>l,":first-child").attr("class","line"),(r=c.insert(()=>n,":first-child")).attr("class","basic label-container"),w&&r.attr("style",w)}else{let t=tP(0,0,p,C,f,y,k);r=c.insert("path",":first-child").attr("d",t).attr("class","basic label-container outer-path").attr("style",(0,n.KL)(w)).attr("style",a)}return r.attr("label-offset-y",y),r.attr("transform",`translate(${-p/2}, ${-(C/2+y)})`),x(e,r),g.attr("transform",`translate(${-(d.width/2)-(d.x-(d.left??0))}, ${-(d.height/2)+y-(d.y-(d.top??0))})`),e.intersect=function(t){let r=$.rect(e,t),i=r.x-(e.x??0);if(0!=f&&(Math.abs(i)<(e.width??0)/2||Math.abs(i)==(e.width??0)/2&&Math.abs(r.y-(e.y??0))>(e.height??0)/2-y)){let o=y*y*(1-i*i/(f*f));o>0&&(o=Math.sqrt(o)),o=y-o,t.y-(e.y??0)>0&&(o=-o),r.y+=o}return r},c}async function tj(t,e){let{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;let a=e.padding??0,s="neo"===e.look?16:a,n="neo"===e.look?12:a;if(e.width||e.height){let t=e.width;e.width=(t??0)*10/11-2*s,e.width<10&&(e.width=10),e.height=(e?.height??0)-2*n,e.height<10&&(e.height=10)}let{shapeSvg:l,bbox:h,label:c}=await m(t,e,b(e)),d=(e?.width?e?.width:h.width)+(s??0)*2,g=(e?.height?e?.height:h.height)+(n??0)*2,p="neo"===e.look?g/4:g/8,f=g+p,{cssStyles:y}=e,C=u.A.svg(l),k=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let B=[{x:-d/2-d/2*.1,y:-f/2},{x:-d/2-d/2*.1,y:f/2},...w(-d/2-d/2*.1,f/2,d/2+d/2*.1,f/2,p,.8),{x:d/2+d/2*.1,y:-f/2},{x:-d/2-d/2*.1,y:-f/2},{x:-d/2,y:-f/2},{x:-d/2,y:f/2*1.1},{x:-d/2,y:-f/2}],T=C.polygon(B.map(t=>[t.x,t.y]),k),S=l.insert(()=>T,":first-child");return S.attr("class","basic label-container outer-path"),y&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",y),o&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",o),S.attr("transform",`translate(0,${-p/2})`),c.attr("transform",`translate(${-d/2+(e.padding??0)+d/2*.1/2-(h.x-(h.left??0))},${-g/2+(e.padding??0)-p-(h.y-(h.top??0))})`),x(e,S),e.intersect=function(t){return $.polygon(e,B,t)},l}(0,c.K)(tR,"linedCylinder"),(0,c.K)(tj,"linedWaveEdgedRect");var tN={normal:"usecase-actor-shape usecase-actor-normal",hollow:"usecase-actor-hollow",awesome:"usecase-actor-awesome",icon:"usecase-actor-icon"},tH=Math.PI/3,tU=(0,c.K)((t,e)=>{let r=.6*e,i=.8*e,o=Math.cos(tH),a=-Math.sin(tH),s=-(r*a),n=t+r*o,l=i*o,h=i*a;return`M ${s-l} ${n-h} L ${s+l} ${n+h}`},"businessMarkerPathForCircle"),tY={normal:tU(-24,12),hollow:tU(-23,9),awesome:tU(-21,13),icon:"M 12 -8 L 26 -26"},tX=(0,c.K)((t,e,r)=>{let i=(e.x??0)-(e.left??0),o=(e.y??0)-(e.top??0);t.attr("transform",`translate(${-e.width/2-i},${r-e.height/2-o})`)},"positionLabel"),tG=(0,c.K)((t,e,r,o,a=!1)=>{if("handDrawn"===e.look){let s=u.A.svg(t).path(r,(0,i.Fr)(e,a?{fill:"none"}:{}));return t.insert(()=>s,":first-child").attr("class",o)}let s=t.append("path").attr("class",o).attr("d",r);return a&&s.attr("fill","none"),s},"appendActorPath"),tV=(0,c.K)((t,e,r,o,a,s,n=!1)=>{if("handDrawn"===e.look){let l=u.A.svg(t).circle(r,o,2*a,(0,i.Fr)(e,n?{fill:"none"}:{}));return t.insert(()=>l,":first-child").attr("class",s)}let l=t.append("circle").attr("class",s).attr("cx",r).attr("cy",o).attr("r",a);return n&&l.attr("fill","none"),l},"appendActorCircle"),tZ=(0,c.K)((t,e,r)=>{e.business&&t.append("path").attr("class","usecase-business-marker usecase-actor-business-marker").attr("d",tY[r]).attr("fill","none").attr("style","stroke: inherit !important; stroke-width: inherit !important")},"appendBusinessActorMarker");async function tQ(t,e,r,o){let a,n,{labelStyles:h,nodeStyles:c}=(0,i.GX)(e);e.labelStyle=h;let d="icon"===r||void 0!==e.stereotype?{...e,icon:"icon"===r?void 0:e.icon,stereotype:void 0}:e,{shapeSvg:u,bbox:g,label:p}=await m(t,d,b(e,`usecase-actor-variant usecase-actor-${r}`)),f=e.accessibleName??e.label;f&&u.attr("role","img").attr("aria-label",f),p.attr("class","label actor-label usecase-actor-label");let{theme:y,themeVariables:k}=(0,l.D7)();if((0,s.XE)(u,e.colorIndex,y,k.borderColorArray),e.stereotype){let t=await C(u,`\xab${e.stereotype}\xbb`,{labelStyle:h,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0,width:e.wrappingWidth});a=t.label.attr("class","label usecase-stereotype"),n=t.bbox}let w=u.append("g").attr("class",`usecase-actor-glyph ${tN[r]}`).attr("style",c||null);await o(w,e),tZ(w,e,r);let B=e.padding??8,T=n?.height??0,S=80+g.height+(n?T+2:0),v=Math.max(56,g.width,n?.width??0)+2*B,_=S+2*B,F=-S/2;w.attr("transform",`translate(0,${F+36})`);let L=F+72+8;return a&&n&&(tX(a,n,L+=T/2),L+=T/2+2),tX(p,g,L+g.height/2),x(e,u.insert("rect",":first-child").attr("class","usecase-actor-outline").attr("x",-v/2).attr("y",-_/2).attr("width",v).attr("height",_).attr("opacity",0).attr("aria-hidden","true")),e.intersect=t=>$.rect(e,t),u}async function tJ(t,e){return tQ(t,e,"normal",(t,e)=>{tG(t,e,"M 0 -12 C 6.627 -12 12 -17.373 12 -24 C 12 -30.627 6.627 -36 0 -36 C -6.627 -36 -12 -30.627 -12 -24 C -12 -17.373 -6.627 -12 0 -12 Z M 0 -12 V 8 M -17 -5 H 17 M 0 8 L -15 28 M 0 8 L 15 28","usecase-actor-stick")})}async function t0(t,e){return tQ(t,e,"awesome",(t,e)=>{tG(t,e,"M 0 -34 C 7.18 -34 13 -28.18 13 -21 C 13 -13.82 7.18 -8 0 -8 C -7.18 -8 -13 -13.82 -13 -21 C -13 -28.18 -7.18 -34 0 -34 Z M -24 25 C -24 7 -14 -3 0 -3 C 14 -3 24 7 24 25 C 24 28 21 30 18 30 H -18 C -21 30 -24 28 -24 25 Z","usecase-actor-awesome-silhouette")})}async function t1(t,e){return tQ(t,e,"hollow",(t,e)=>{tV(t,e,0,-23,9,"usecase-actor-hollow-head",!0),tG(t,e,"M -22 -10 H 22 V 0 H 6 L 22 17 L 13 28 L 0 13 L -13 28 L -22 17 L -6 0 H -22 Z","usecase-actor-hollow-body",!0)})}(0,c.K)(tQ,"renderUsecaseActor"),(0,c.K)(tJ,"usecaseActor"),(0,c.K)(t0,"usecaseActorAwesome"),(0,c.K)(t1,"usecaseActorHollow");var t2=(0,c.K)(async(t,e)=>{if("handDrawn"===e.look){let r=u.A.svg(t).rectangle(-26,-28,52,52,(0,i.Fr)(e,{}));t.insert(()=>r,":first-child").attr("class","usecase-actor-icon-frame")}else t.append("rect").attr("class","usecase-actor-icon-frame").attr("x",-26).attr("y",-28).attr("width",52).attr("height",52).attr("rx",4).attr("ry",4);let r=e.icon??"",o=await (0,a.dn)(r.includes(":")?r:`fa:${r}`),s=await (0,a.WY)(r,{height:42,width:42,fallbackPrefix:"fa"}),n=t.append("g").attr("class",`usecase-actor-icon-symbol${o?"":" usecase-actor-icon-fallback"}`).attr("aria-hidden","true").html(`<g>${s}</g>`),l=n.node()?.getBBox();l&&n.attr("transform",`translate(${-l.width/2-l.x},${-2-l.height/2-l.y})`)},"drawIconActor");async function t5(t,e){return tQ(t,e,"icon",t2)}(0,c.K)(t5,"usecaseActorIcon");var t3=(0,c.K)((t,e,r)=>{let i=(e.x??0)-(e.left??0),o=(e.y??0)-(e.top??0);t.attr("transform",`translate(${-e.width/2-i},${r-e.height/2-o})`)},"positionLabel");async function t4(t,e){let r,o,a,{labelStyles:n,nodeStyles:h}=(0,i.GX)(e);e.labelStyle=n;let c=e.stereotype?{...e,stereotype:void 0}:e,{shapeSvg:d,bbox:g,halfPadding:p,label:f}=await m(t,c,b(e,"usecase-business-shape"));f.attr("class","label usecase-label");let{theme:y,themeVariables:k}=(0,l.D7)();if((0,s.XE)(d,e.colorIndex,y,k.borderColorArray),e.stereotype){let t=await C(d,`\xab${e.stereotype}\xbb`,{labelStyle:n,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0,width:e.wrappingWidth});r=t.label.attr("class","label usecase-stereotype"),o=t.bbox}let w=2*!!o,B=g.height+(o?.height??0)+w,T=Math.max(g.width,o?.width??0),S=p??10,v=T/2+2*S,_=B/2+2*S,F=Math.min(Math.max(S/5,1),S/2),L=T/2+F,A=v-F,M=L/v,E=A/v,K=_*Math.sqrt(Math.max(0,1-M*M)),O=-_*Math.sqrt(Math.max(0,1-E*E));if(r&&o&&t3(r,o,-B/2+o.height/2),t3(f,g,B/2-g.height/2),"handDrawn"===e.look){let t=u.A.svg(d).ellipse(0,0,2*v,2*_,(0,i.Fr)(e,{}));a=d.insert(()=>t,":first-child").attr("class","basic label-container usecase-business-ellipse")}else a=d.insert("ellipse",":first-child").attr("class","basic label-container usecase-business-ellipse").attr("style",h).attr("rx",v).attr("ry",_).attr("cx",0).attr("cy",0);d.append("path").attr("class","usecase-business-marker").attr("d",`M ${L} ${K} L ${A} ${O}`).attr("fill","none").attr("style",h||null);let D=e.accessibleName??e.label;return D&&d.attr("role","img").attr("aria-label",D),x(e,a),e.calcIntersect=(t,e)=>$.ellipse(t,t.width/2,t.height/2,e),e.intersect=t=>$.ellipse(e,v,_,t),d}(0,c.K)(t4,"usecaseBusiness");var t6=(0,c.K)((t,e,r,i)=>{let o=(e.x??0)-(e.left??0),a=(e.y??0)-(e.top??0);t.attr("transform",`translate(${r-e.width/2-o},${i-e.height/2-a})`)},"positionLabel"),t8=(0,c.K)(t=>{let e=Number.parseFloat(t??"");return Number.isFinite(e)&&e>=0?e:1},"numericStrokeWidth");async function t7(t,e){let{labelStyles:r,nodeStyles:o}=(0,i.GX)(e),{stylesMap:a}=(0,i.WW)(e);e.labelStyle=r;let{shapeSvg:s,bbox:n,label:l}=await m(t,e,b(e,"usecase-json-table"));s.attr("role","img"),e.accessibleName&&s.attr("aria-label",e.accessibleName),l.attr("class","label usecase-json-title");let h=s.append("g").attr("class","usecase-json-table-grid"),d=[];for(let t of e.jsonRows??[]){let i=await C(h,t.key,{labelStyle:r,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0}),o=await C(h,t.value,{labelStyle:r,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0});d.push({key:{label:i.label.attr("class","label usecase-json-key"),bbox:i.bbox},value:{label:o.label.attr("class","label usecase-json-value"),bbox:o.bbox}})}let g=Math.max(0,...d.map(({key:t})=>t.bbox.width))+16,p=Math.max(0,...d.map(({value:t})=>t.bbox.width))+16,f=Math.max(n.width+16,g+p),y=p+Math.max(0,f-g-p),k=n.height+8,w=d.map(({key:t,value:e})=>Math.max(t.bbox.height,e.bbox.height)+8),B=k+w.reduce((t,e)=>t+e,0),T=t8(a.get("stroke-width")),S=f+2*T,v=B+2*T,_=-f/2,F=-B/2,L="handDrawn"===e.look?u.A.svg(s):void 0,A=L?(0,i.Fr)(e,{}):void 0,M=(0,c.K)((t,e,r,i,a,s)=>{if(L&&A){let o=L.rectangle(r,i,a,s,A);return t.insert(()=>o,":first-child").attr("class",e)}return t.insert("rect",":first-child").attr("class",e).attr("x",r).attr("y",i).attr("width",a).attr("height",s).attr("style",o)},"insertCell"),E=M(s,"label-container usecase-json-border",-S/2,-v/2,S,v);M(h,"usecase-json-cell usecase-json-title-cell",_,F,f,k),h.node()?.append(l.node()),t6(l,n,0,F+k/2);let K=F+k;return d.forEach(({key:t,value:e},r)=>{let i=w[r],o=h.append("g").attr("class","usecase-json-row").attr("data-row-index",r).attr("transform",`translate(0,${K})`);M(o,"usecase-json-cell usecase-json-key-cell",_,0,g,i),M(o,"usecase-json-cell usecase-json-value-cell",_+g,0,y,i),o.node()?.append(t.label.node(),e.label.node()),t6(t.label,t.bbox,_+g/2,i/2),t6(e.label,e.bbox,_+g+y/2,i/2),K+=i}),x(e,E),e.intersect=t=>$.rect(e,t),s}async function t9(t,e){let{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;let a=e.padding??0,s="neo"===e.look?16:a,n="neo"===e.look?12:a,l="neo"===e.look?10:5;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*s-2*l,10),e.height=Math.max((e?.height??0)-2*n-2*l,10));let{shapeSvg:h,bbox:c,label:d}=await m(t,e,b(e)),g=(e?.width?e?.width:c.width)+2*s+2*l,p=(e?.height?e?.height:c.height)+2*n+2*l,f=g-2*l,y=p-2*l,C=-f/2,w=-y/2,{cssStyles:B}=e,S=u.A.svg(h),v=(0,i.Fr)(e,{}),_=[{x:C-l,y:w+l},{x:C-l,y:w+y+l},{x:C+f-l,y:w+y+l},{x:C+f-l,y:w+y},{x:C+f,y:w+y},{x:C+f,y:w+y-l},{x:C+f+l,y:w+y-l},{x:C+f+l,y:w-l},{x:C+l,y:w-l},{x:C+l,y:w},{x:C,y:w},{x:C,y:w+l}];"handDrawn"!==e.look&&(v.roughness=0,v.fillStyle="solid");let F=k(_),L=S.path(F,v),A=k([{x:C,y:w+l},{x:C+f-l,y:w+l},{x:C+f-l,y:w+y},{x:C+f,y:w+y},{x:C+f,y:w},{x:C,y:w}]),M=S.path(A,v);"handDrawn"!==e.look&&(L=T(L),M=T(M));let E=h.insert("g",":first-child");return E.insert(()=>L),E.insert(()=>M),E.attr("class","basic label-container outer-path"),B&&"handDrawn"!==e.look&&E.selectAll("path").attr("style",B),o&&"handDrawn"!==e.look&&E.selectAll("path").attr("style",o),d.attr("transform",`translate(${-(c.width/2)-l-(c.x-(c.left??0))}, ${-(c.height/2)+l-(c.y-(c.top??0))})`),x(e,E),e.intersect=function(t){return $.polygon(e,_,t)},h}async function et(t,e){let{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;let{shapeSvg:a,bbox:s,label:n}=await m(t,e,b(e)),l=e.padding??0,h="neo"===e.look?16:l,c="neo"===e.look?12:l,d=!0;(e.width||e.height)&&(d=!1,e.width=(e?.width??0)-2*h,e.height=(e?.height??0)-3*c);let g=Math.max(s.width,e?.width??0)+2*h,p=Math.max(s.height,e?.height??0)+3*c,f="neo"===e.look?p/4:p/8,y=p+(d?f/2:-f/2),C=-g/2,B=-y/2,{cssStyles:T}=e,S=w(C-10,B+y+10,C+g-10,B+y+10,f,.8),v=S?.[S.length-1],_=[{x:C-10,y:B+10},{x:C-10,y:B+y+10},...S,{x:C+g-10,y:v.y-10},{x:C+g,y:v.y-10},{x:C+g,y:v.y-20},{x:C+g+10,y:v.y-20},{x:C+g+10,y:B-10},{x:C+10,y:B-10},{x:C+10,y:B},{x:C,y:B},{x:C,y:B+10}],F=[{x:C,y:B+10},{x:C+g-10,y:B+10},{x:C+g-10,y:v.y-10},{x:C+g,y:v.y-10},{x:C+g,y:B},{x:C,y:B}],L=u.A.svg(a),A=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(A.roughness=0,A.fillStyle="solid");let M=k(_),E=L.path(M,A),K=k(F),O=L.path(K,A),D=a.insert(()=>E,":first-child");return D.insert(()=>O),D.attr("class","basic label-container outer-path"),T&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",T),o&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",o),D.attr("transform",`translate(0,${-f/2})`),n.attr("transform",`translate(${-(s.width/2)-10-(s.x-(s.left??0))}, ${-(s.height/2)+10-f-(s.y-(s.top??0))})`),x(e,D),e.intersect=function(t){return $.polygon(e,_,t)},a}async function ee(t,e,{config:{themeVariables:r}}){let{labelStyles:o,nodeStyles:a}=(0,i.GX)(e);e.labelStyle=o,e.useHtmlLabels||(0,l.E)((0,l.zj)())||(e.centerLabel=!0);let{shapeSvg:s,bbox:n,label:h}=await m(t,e,b(e)),c=Math.max(n.width+(e.padding??0)*2,e?.width??0),d=Math.max(n.height+(e.padding??0)*2,e?.height??0),{cssStyles:g}=e,p=u.A.svg(s),f=(0,i.Fr)(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");let y=p.rectangle(-c/2,-d/2,c,d,f),C=s.insert(()=>y,":first-child");return C.attr("class","basic label-container outer-path"),h.attr("class","label noteLabel"),g&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",g),a&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",a),h.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),x(e,C),e.intersect=function(t){return $.rect(e,t)},s}(0,c.K)(t7,"usecaseJsonTable"),(0,c.K)(t9,"multiRect"),(0,c.K)(et,"multiWaveEdgedRectangle"),(0,c.K)(ee,"note");var er=(0,c.K)((t,e,r)=>`M${t+r/2},${e} L${t+r},${e-r/2} L${t+r/2},${e-r} L${t},${e-r/2} Z`,"createDecisionBoxPathD");async function ei(t,e){let r,{labelStyles:o,nodeStyles:a}=(0,i.GX)(e);e.labelStyle=o;let{shapeSvg:s,bbox:n}=await m(t,e,b(e)),l=n.width+(e.padding??0)+(n.height+(e.padding??0)),h=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}],{cssStyles:c}=e;if("handDrawn"===e.look){let t=u.A.svg(s),o=(0,i.Fr)(e,{}),a=er(0,0,l),n=t.path(a,o);r=s.insert(()=>n,":first-child").attr("transform",`translate(${-l/2+.5}, ${l/2})`),c&&r.attr("style",c)}else(r=R(s,l,l,h)).attr("transform",`translate(${-l/2+.5}, ${l/2})`);return a&&r.attr("style",a),x(e,r),e.calcIntersect=function(t,e){let r=t.width;return $.polygon(t,[{x:r/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}],e)},e.intersect=function(t){return this.calcIntersect(e,t)},s}async function eo(t,e){let{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;let a=e.padding??0,s="neo"===e.look?21:a??0,n="neo"===e.look?12:a??0,{shapeSvg:l,bbox:h,label:c}=await m(t,e,b(e)),d=h.width+("neo"===e.look?2*s:s),g=Math.max(h.height+("neo"===e.look?2*n:n),e.height??0),p=-Math.max(d,(e.width??0)-g/4)/2,f=-g/2,y=f/2,C=[{x:p+y,y:f},{x:p,y:0},{x:p+y,y:-f},{x:-p,y:-f},{x:-p,y:f}],{cssStyles:w}=e,B=u.A.svg(l),T=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");let S=k(C),v=B.path(S,T),_=l.insert(()=>v,":first-child");return _.attr("class","basic label-container outer-path"),w&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",w),o&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",o),_.attr("transform",`translate(${-y/2},0)`),c.attr("transform",`translate(${-y/2-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),x(e,_),e.intersect=function(t){return $.polygon(e,C,t)},l}async function ea(t,e){let r,o,a,{labelStyles:s,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=s,r=e.cssClasses?"node "+e.cssClasses:"node default";let c=t.insert("g").attr("class",r).attr("id",e.domId||e.id),g=c.insert("g"),p=c.insert("g").attr("class","label").attr("style",n),f=e.description,y=e.label,m=await K(p,y,e.labelStyle,!0,!0),C={width:0,height:0};if((0,l.E)((0,l.D7)())){let t=m.children[0],e=(0,d.Ltv)(m);C=t.getBoundingClientRect(),e.attr("width",C.width),e.attr("height",C.height)}h.R.info("Text 2",f);let b=f||[],k=m.getBBox(),w=await K(p,Array.isArray(b)?b.join("<br/>"):b,e.labelStyle,!0,!0),B=w.children[0],T=(0,d.Ltv)(w);C=B.getBoundingClientRect(),T.attr("width",C.width),T.attr("height",C.height);let S=(e.padding||0)/2;(0,d.Ltv)(w).attr("transform","translate( "+(C.width>k.width?0:(k.width-C.width)/2)+", "+(k.height+S+5)+")"),(0,d.Ltv)(m).attr("transform","translate( "+(C.width<k.width?0:-(k.width-C.width)/2)+", 0)"),C=p.node().getBBox(),p.attr("transform","translate("+-C.width/2+", "+(-C.height/2-S+3)+")");let v=C.width+(e.padding||0),_=C.height+(e.padding||0),F=-C.width/2-S,L=-C.height/2-S;if("handDrawn"===e.look){let t=u.A.svg(c),r=(0,i.Fr)(e,{}),s=t.path(E(F,L,v,_,e.rx||0),r),n=t.line(-C.width/2-S,-C.height/2-S+k.height+S,C.width/2+S,-C.height/2-S+k.height+S,r);a=c.insert(()=>(h.R.debug("Rough node insert CXC",s),n),":first-child"),o=c.insert(()=>(h.R.debug("Rough node insert CXC",s),s),":first-child")}else o=g.insert("rect",":first-child"),a=g.insert("line"),o.attr("class","outer title-state").attr("style",n).attr("x",-C.width/2-S).attr("y",-C.height/2-S).attr("width",C.width+(e.padding||0)).attr("height",C.height+(e.padding||0)),a.attr("class","divider").attr("x1",-C.width/2-S).attr("x2",C.width/2+S).attr("y1",-C.height/2-S+k.height+S).attr("y2",-C.height/2-S+k.height+S);return x(e,o),e.intersect=function(t){return $.rect(e,t)},c}async function es(t,e,{config:{themeVariables:r}}){let i=r?.radius??5,o={rx:i,ry:i,classes:"",labelPaddingX:(e?.padding??0)*1,labelPaddingY:(e?.padding??0)*1};return ty(t,e,o)}async function en(t,e){let{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;let a="neo"===e.look?16:e.padding??0,s="neo"===e.look?12:e.padding??0,{shapeSvg:l,bbox:h,label:c}=await m(t,e,b(e)),d=(e?.width??h.width)+2*a+("neo"===e.look?8:16),g=(e?.height??h.height)+2*s,p=d-8,f=8-d/2,y=-g/2,{cssStyles:C}=e,k=u.A.svg(l),w=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let B=k.polygon([{x:f,y},{x:f+p,y},{x:f+p,y:y+g},{x:f-8,y:y+g},{x:f-8,y},{x:f,y},{x:f,y:y+g}].map(t=>[t.x,t.y]),w),T=l.insert(()=>B,":first-child");return T.attr("class","basic label-container outer-path").attr("style",(0,n.KL)(C)),o&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",o),C&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",o),c.attr("transform",`translate(${4-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),x(e,T),e.intersect=function(t){return $.rect(e,t)},l}async function el(t,e){let{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;let a=e.padding??0,s="neo"===e.look?16:a,n="neo"===e.look?12:a;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*s,10),e.height=Math.max((e?.height??0)/1.5-2*n,10));let{shapeSvg:l,bbox:h,label:c}=await m(t,e,b(e)),d=(e?.width?e?.width:h.width)+2*s,g=((e?.height?e?.height:h.height)+2*n)*1.5/1.5,p=-d/2,f=-g/2,{cssStyles:y}=e,C=u.A.svg(l),w=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let B=[{x:p,y:f},{x:p,y:f+g},{x:p+d,y:f+g},{x:p+d,y:f-g/2}],T=k(B),S=C.path(T,w),v=l.insert(()=>S,":first-child");return v.attr("class","basic label-container outer-path"),y&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",y),o&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",o),v.attr("transform",`translate(0, ${g/4})`),c.attr("transform",`translate(${-d/2+(e.padding??0)-(h.x-(h.left??0))}, ${-g/4+(e.padding??0)-(h.y-(h.top??0))})`),x(e,v),e.intersect=function(t){return $.polygon(e,B,t)},l}async function eh(t,e){let r=e.padding??0,i="neo"===e.look?16:2*r,o="neo"===e.look?12:r,a={rx:0,ry:0,classes:"",labelPaddingX:e.labelPaddingX??i,labelPaddingY:o},n=await ty(t,e,a);if(void 0!==e.colorIndex){let{theme:t,themeVariables:r}=(0,l.D7)();(0,s.XE)(n,e.colorIndex,t,r.borderColorArray)}return n}(0,c.K)(ei,"question"),(0,c.K)(eo,"rect_left_inv_arrow"),(0,c.K)(ea,"rectWithTitle"),(0,c.K)(es,"roundedRect"),(0,c.K)(en,"shadedProcess"),(0,c.K)(el,"slopedRect"),(0,c.K)(eh,"squareRect");var ec=(0,c.K)((t,e,r)=>{let i=t.height+r,o=i*Math.cos(Math.PI/98),a=Math.sqrt(Math.max(0,o**2-t.height**2));return{w:Math.max(t.width+i/4+e,1.5*i+(i-o),t.width+e+i-a),h:i}},"stadiumDimensions");async function ed(t,e){let{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;let a=e.padding??0,s="neo"===e.look?40:a,n="neo"===e.look?24:a,{shapeSvg:l,bbox:h}=await m(t,e,b(e)),{w:c,h:d}=ec(h,s,n),g=d/2,{cssStyles:p}=e,f=u.A.svg(l),y=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");let C=[{x:-c/2+g,y:-d/2},{x:c/2-g,y:-d/2},...B(-c/2+g,0,g,50,90,270),{x:c/2-g,y:d/2},...B(c/2-g,0,g,50,270,450)],w=k(C),T=f.path(w,y),S=l.insert(()=>T,":first-child");return S.attr("class","basic label-container outer-path"),p&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",p),o&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",o),x(e,S),e.intersect=function(t){return $.polygon(e,C,t)},l}async function eu(t,e){let r={rx:"neo"===e.look?3:5,ry:"neo"===e.look?3:5,classes:"flowchart-node"};return ty(t,e,r)}function eg(t,e,{config:{themeVariables:r}}){let{labelStyles:o,nodeStyles:a}=(0,i.GX)(e);e.labelStyle=o;let{cssStyles:s}=e,{lineColor:n,stateBorder:l,nodeBorder:h,nodeShadow:c}=r;(e.width||e.height)&&((e.width??0)<14&&(e.width=14),(e.height??0)<14&&(e.height=14)),e.width||(e.width=14),e.height||(e.height=14);let d=t.insert("g").attr("class","node default").attr("id",e.domId??e.id),g=u.A.svg(d),p=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");let f=g.circle(0,0,e.width,{...p,stroke:n,strokeWidth:2}),y=l??h,m=(e.width??0)*5/14,C=g.circle(0,0,m,{...p,fill:y,stroke:y,strokeWidth:2,fillStyle:"solid"}),b=d.insert(()=>f,":first-child");if(b.insert(()=>C),"handDrawn"!==e.look&&b.attr("class","outer-path"),s&&b.selectAll("path").attr("style",s),a&&b.selectAll("path").attr("style",a),e.width<25&&c&&"handDrawn"!==e.look){let e=t.node()?.ownerSVGElement?.id??"",r=e?`${e}-drop-shadow-small`:"drop-shadow-small";b.attr("style",`filter:url(#${r})`)}return x(e,b),e.intersect=function(t){return $.circle(e,(e.width??0)/2,t)},d}function ep(t,e,{config:{themeVariables:r}}){let o,{lineColor:a,nodeShadow:s}=r;(e.width||e.height)&&((e.width??0)<14&&(e.width=14),(e.height??0)<14&&(e.height=14)),e.width||(e.width=14),e.height||(e.height=14);let n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);if("handDrawn"===e.look){let t=u.A.svg(n).circle(0,0,e.width,(0,i.ue)(a));(o=n.insert(()=>t)).attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14)}else(o=n.insert("circle",":first-child")).attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14);if(e.width<25&&s&&"handDrawn"!==e.look){let e=t.node()?.ownerSVGElement?.id??"",r=e?`${e}-drop-shadow-small`:"drop-shadow-small";o.attr("style",`filter:url(#${r})`)}return x(e,o),e.intersect=function(t){return $.circle(e,(e.width??7)/2,t)},n}async function ef(t,e){let{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;let a=e?.padding??8,s="neo"===e.look?28:a,l="neo"===e.look?12:a,{shapeSvg:h,bbox:c}=await m(t,e,b(e)),d=Math.max(c.width+16+s,e.width??0),g=Math.max(c.height+l,e.height??0),p=d-16,f=-d/2,y=-g/2,C=[{x:0,y:0},{x:p,y:0},{x:p,y:-g},{x:0,y:-g},{x:0,y:0},{x:-8,y:0},{x:p+8,y:0},{x:p+8,y:-g},{x:-8,y:-g},{x:-8,y:0}];if("handDrawn"===e.look){let t=u.A.svg(h),r=(0,i.Fr)(e,{}),o=t.rectangle(f,y,p+16,g,r),a=t.line(f+8,y,f+8,y+g,r),s=t.line(f+8+p,y,f+8+p,y+g,r);h.insert(()=>a,":first-child"),h.insert(()=>s,":first-child");let l=h.insert(()=>o,":first-child"),{cssStyles:c}=e;l.attr("class","basic label-container").attr("style",(0,n.KL)(c)),x(e,l)}else{let t=R(h,p,g,C);o&&t.attr("style",o),x(e,t)}return e.intersect=function(t){return $.polygon(e,C,t)},h}async function ey(t,e){let{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;let a=e.padding??0,s="neo"===e.look?16:a,n="neo"===e.look?12:a;(e.width||e.height)&&(e.height=Math.max((e?.height??0)-2*n,10),e.width=Math.max((e?.width??0)-2*s-.2*(e.height+2*n),10));let{shapeSvg:l,bbox:h}=await m(t,e,b(e)),c=(e?.height?e?.height:h.height)+2*n,d=.2*c,g=(e?.width?e?.width:h.width)+2*s+d-d,p=-g/2,f=-c/2,{cssStyles:y}=e,C=u.A.svg(l),w=(0,i.Fr)(e,{}),B=[{x:p-d/2,y:f},{x:p+g+d/2,y:f},{x:p+g+d/2,y:f+c},{x:p-d/2,y:f+c}];"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let T=k(B),S=C.path(T,w),v=k([{x:p+g-d/2,y:f+c},{x:p+g+d/2,y:f+c},{x:p+g+d/2,y:f+c-.2*c}]),_=C.path(v,{...w,fillStyle:"solid"}),F=l.insert(()=>_,":first-child");return F.insert(()=>S,":first-child"),F.attr("class","basic label-container outer-path"),y&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",y),o&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",o),x(e,F),e.intersect=function(t){return $.polygon(e,B,t)},l}async function em(t,e){let{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;let{shapeSvg:a,bbox:s,label:n}=await m(t,e,b(e)),l=Math.max(s.width+(e.padding??0)*2,e?.width??0),h=Math.max(s.height+(e.padding??0)*2,e?.height??0),c=h/8,d=.2*l,g=.2*h,p=h+c,{cssStyles:f}=e,y=u.A.svg(a),C=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");let B=[{x:-l/2-l/2*.1,y:p/2},...w(-l/2-l/2*.1,p/2,l/2+l/2*.1,p/2,c,.8),{x:l/2+l/2*.1,y:-p/2},{x:-l/2-l/2*.1,y:-p/2}],T=-l/2+l/2*.1,S=-p/2-.4*g,v=[{x:T+l-d,y:(S+h)*1.3},{x:T+l,y:S+h-g},{x:T+l,y:(S+h)*.9},...w(T+l,(S+h)*1.25,T+l-d,(S+h)*1.3,-(.02*h),.5)],_=k(B),F=y.path(_,C),L=k(v),A=y.path(L,{...C,fillStyle:"solid"}),M=a.insert(()=>A,":first-child");return M.insert(()=>F,":first-child"),M.attr("class","basic label-container outer-path"),f&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",f),o&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",o),M.attr("transform",`translate(0,${-c/2})`),n.attr("transform",`translate(${-l/2+(e.padding??0)-(s.x-(s.left??0))},${-h/2+(e.padding??0)-c/2-(s.y-(s.top??0))})`),x(e,M),e.intersect=function(t){return $.polygon(e,B,t)},a}async function eC(t,e){let{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;let{shapeSvg:a,bbox:s}=await m(t,e,b(e)),n=Math.max(s.width+(e.padding??0),e?.width||0),l=Math.max(s.height+(e.padding??0),e?.height||0),h=a.insert("rect",":first-child");return h.attr("class","text").attr("style",o).attr("rx",0).attr("ry",0).attr("x",-n/2).attr("y",-l/2).attr("width",n).attr("height",l),x(e,h),e.intersect=function(t){return $.rect(e,t)},a}(0,c.K)(ed,"stadium"),(0,c.K)(eu,"state"),(0,c.K)(eg,"stateEnd"),(0,c.K)(ep,"stateStart"),(0,c.K)(ef,"subroutine"),(0,c.K)(ey,"taggedRect"),(0,c.K)(em,"taggedWaveEdgedRectangle"),(0,c.K)(eC,"text");var ex=(0,c.K)((t,e,r,i,o,a)=>`M${t},${e}
|
|
4
|
-
a${o},${a} 0,0,1 0,${-i}
|
|
5
|
-
l${r},0
|
|
6
|
-
a${o},${a} 0,0,1 0,${i}
|
|
7
|
-
M${r},${-i}
|
|
8
|
-
a${o},${a} 0,0,0 0,${i}
|
|
9
|
-
l${-r},0`,"createCylinderPathD"),eb=(0,c.K)((t,e,r,i,o,a)=>`M${t},${e} M${t+r},${e} a${o},${a} 0,0,0 0,${-i} l${-r},0 a${o},${a} 0,0,0 0,${i} l${r},0`,"createOuterCylinderPathD"),ek=(0,c.K)((t,e,r,i,o,a)=>`M${t+r/2},${-i/2} a${o},${a} 0,0,0 0,${i}`,"createInnerCylinderPathD");async function ew(t,e){let r,{labelStyles:o,nodeStyles:a}=(0,i.GX)(e);e.labelStyle=o;let s=e.padding??0,l="neo"===e.look?12:s/2,h=e.height??0;e.height&&(e.height=e.height-l,e.height<5&&(e.height=5)),e.width&&(e.width=e.width-l-h/2/(2.5+h/50)*3,e.width<10&&(e.width=10));let{shapeSvg:c,bbox:d,label:g}=await m(t,e,b(e)),p=Math.max(e.height??0,d.height)+l,f=p/2,y=f/(2.5+p/50),C=Math.max(e.width??0,d.width)+y+l,{cssStyles:k}=e;if("handDrawn"===e.look){let t=u.A.svg(c),o=eb(0,0,C,p,y,f),a=ek(0,0,C,p,y,f),s=t.path(o,(0,i.Fr)(e,{})),n=t.path(a,(0,i.Fr)(e,{fill:"none"}));r=c.insert(()=>n,":first-child"),(r=c.insert(()=>s,":first-child")).attr("class","basic label-container"),k&&r.attr("style",k)}else{let t=ex(0,0,C,p,y,f);(r=c.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,n.KL)(k)).attr("style",a)).attr("class","basic label-container outer-path"),k&&r.selectAll("path").attr("style",k),a&&r.selectAll("path").attr("style",a)}return r.attr("label-offset-x",y),r.attr("transform",`translate(${-C/2}, ${p/2} )`),g.attr("transform",`translate(${-(d.width/2)-y-(d.x-(d.left??0))}, ${-(d.height/2)-(d.y-(d.top??0))})`),x(e,r),e.intersect=function(t){let r=$.rect(e,t),i=r.y-(e.y??0);if(0!=f&&(Math.abs(i)<(e.height??0)/2||Math.abs(i)==(e.height??0)/2&&Math.abs(r.x-(e.x??0))>(e.width??0)/2-y)){let o=y*y*(1-i*i/(f*f));0!=o&&(o=Math.sqrt(Math.abs(o))),o=y-o,t.x-(e.x??0)>0&&(o=-o),r.x+=o}return r},c}async function eB(t,e){let r,{labelStyles:o,nodeStyles:a}=(0,i.GX)(e);e.labelStyle=o;let s=e.padding??0,n=(e.look,s),l="neo"===e.look?2*s:s,{shapeSvg:h,bbox:c}=await m(t,e,b(e)),d=Math.max(c.height+n,e.height??0),g=Math.max(c.width+l,(e.width??0)-d),p=[{x:-3*d/6,y:0},{x:g+3*d/6,y:0},{x:g,y:-d},{x:0,y:-d}],{cssStyles:f}=e;if("handDrawn"===e.look){let t=u.A.svg(h),o=(0,i.Fr)(e,{}),a=k(p),s=t.path(a,o);r=h.insert(()=>s,":first-child").attr("transform",`translate(${-g/2}, ${d/2})`),f&&r.attr("style",f)}else r=R(h,g,d,p);return a&&r.attr("style",a),e.width=g,e.height=d,x(e,r),e.intersect=function(t){return $.polygon(e,p,t)},h}async function eT(t,e){let{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;let a=e.padding??0,s="neo"===e.look?16:a,n="neo"===e.look?12:a;(e.width||e.height)&&(e.height=(e.height??0)-2*n,e.height<5&&(e.height=5),e.width=(e.width??0)-2*s,e.width<15&&(e.width=15));let{shapeSvg:l,bbox:h}=await m(t,e,b(e)),c=(e?.width?e?.width:h.width)+2*s,d=(e?.height?e?.height:h.height)+2*n,{cssStyles:g}=e,p=u.A.svg(l),f=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");let y=[{x:-c/2*.8,y:-d/2},{x:c/2*.8,y:-d/2},{x:c/2,y:-d/2*.6},{x:c/2,y:d/2},{x:-c/2,y:d/2},{x:-c/2,y:-d/2*.6}],C=k(y),w=p.path(C,f),B=l.insert(()=>w,":first-child");return B.attr("class","basic label-container outer-path"),g&&"handDrawn"!==e.look&&B.selectChildren("path").attr("style",g),o&&"handDrawn"!==e.look&&B.selectChildren("path").attr("style",o),x(e,B),e.intersect=function(t){return $.polygon(e,y,t)},l}async function eS(t,e){let{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;let a=e.padding??0,s="neo"===e.look?2*a:a;(e.width||e.height)&&(e.width=((e?.width??0)-s)/2,e.width<10&&(e.width=10),e.height=e?.height??0,e.height<10&&(e.height=10));let{shapeSvg:n,bbox:c,label:d}=await m(t,e,b(e)),g=(0,l._3)((0,l.D7)().flowchart?.htmlLabels),p=(e?.width?e?.width:c.width)+s,f=e?.height?e?.height:p+c.height,y=[{x:0,y:0},{x:f,y:0},{x:f/2,y:-f}],{cssStyles:C}=e,w=u.A.svg(n),B=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(B.roughness=0,B.fillStyle="solid");let T=k(y),S=w.path(T,B),v=n.insert(()=>S,":first-child").attr("transform",`translate(${-f/2}, ${f/2})`).attr("class","outer-path");return C&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",C),o&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",o),e.width=p,e.height=f,x(e,v),d.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))}, ${f/2-(c.height+(e.padding??0)/(g?2:1)-(c.y-(c.top??0)))})`),e.intersect=function(t){return h.R.info("Triangle intersect",e,y,t),$.polygon(e,y,t)},n}async function ev(t,e){let{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;let a=e.padding??0,s="neo"===e.look?16:a,n="neo"===e.look?12:a,l=!0;(e.width||e.height)&&(l=!1,e.width=(e?.width??0)-2*s,e.width<10&&(e.width=10),e.height=(e?.height??0)-2*n,e.height<10&&(e.height=10));let{shapeSvg:h,bbox:c,label:d}=await m(t,e,b(e)),g=(e?.width?e?.width:c.width)+(s??0)*2,p=(e?.height?e?.height:c.height)+(n??0)*2,f="neo"===e.look?p/4:p/8,y=p+(l?f:-f),{cssStyles:C}=e,B=14-g,T=B>0?B/2:0,S=u.A.svg(h),v=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(v.roughness=0,v.fillStyle="solid");let _=[{x:-g/2-T,y:y/2},...w(-g/2-T,y/2,g/2+T,y/2,f,.8),{x:g/2+T,y:-y/2},{x:-g/2-T,y:-y/2}],F=k(_),L=S.path(F,v),A=h.insert(()=>L,":first-child");return A.attr("class","basic label-container outer-path"),C&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",C),o&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",o),A.attr("transform",`translate(0,${-f/2})`),d.attr("transform",`translate(${-g/2+(e.padding??0)-(c.x-(c.left??0))},${-p/2+(e.padding??0)-f-(c.y-(c.top??0))})`),x(e,A),e.intersect=function(t){return $.polygon(e,_,t)},h}async function e_(t,e){let{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;let a=e.padding??0,s="neo"===e.look?16:a,n="neo"===e.look?20:a;if(e.width||e.height){e.width=e?.width??0,e.width<20&&(e.width=20),e.height=e?.height??0,e.height<10&&(e.height=10);let t=Math.min(.2*e.height,e.height/4);e.height=Math.ceil(e.height-n-20/9*t),e.width=e.width-2*s}let{shapeSvg:l,bbox:h}=await m(t,e,b(e)),c=(e?.width?e?.width:h.width)+2*s,d=(e?.height?e?.height:h.height)+n,g=d/8,p=d+2*g,{cssStyles:f}=e,y=u.A.svg(l),C=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");let B=[{x:-c/2,y:p/2},...w(-c/2,p/2,c/2,p/2,g,1),{x:c/2,y:-p/2},...w(c/2,-p/2,-c/2,-p/2,g,-1)],T=k(B),S=y.path(T,C),v=l.insert(()=>S,":first-child");return v.attr("class","basic label-container"),f&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",f),o&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",o),x(e,v),e.intersect=function(t){return $.polygon(e,B,t)},l}async function eF(t,e){let{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;let a="neo"===e.look?16:e.padding??0,s="neo"===e.look?12:e.padding??0;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*a-10,10),e.height=Math.max((e?.height??0)-2*s-10,10));let{shapeSvg:n,bbox:l,label:h}=await m(t,e,b(e)),c=(e?.width?e?.width:l.width)+2*a+10,d=(e?.height?e?.height:l.height)+2*s+10,g=c-10,p=d-10,f=-g/2,y=-p/2,{cssStyles:C}=e,k=u.A.svg(n),w=(0,i.Fr)(e,{}),B=[{x:f-10,y:y-10},{x:f-10,y:y+p},{x:f+g,y:y+p},{x:f+g,y:y-10}],T=`M${f-10},${y-10} L${f+g},${y-10} L${f+g},${y+p} L${f-10},${y+p} L${f-10},${y-10}
|
|
10
|
-
M${f-10},${y} L${f+g},${y}
|
|
11
|
-
M${f},${y-10} L${f},${y+p}`;"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let S=k.path(T,w),v=n.insert(()=>S,":first-child");return v.attr("transform","translate(5, 5)"),v.attr("class","basic label-container outer-path"),C&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",C),o&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",o),h.attr("transform",`translate(${-(l.width/2)+5-(l.x-(l.left??0))}, ${-(l.height/2)+5-(l.y-(l.top??0))})`),x(e,v),e.intersect=function(t){return $.polygon(e,B,t)},n}(0,c.K)(ew,"tiltedCylinder"),(0,c.K)(eB,"trapezoid"),(0,c.K)(eT,"trapezoidalPentagon"),(0,c.K)(eS,"triangle"),(0,c.K)(ev,"waveEdgedRectangle"),(0,c.K)(e_,"waveRectangle"),(0,c.K)(eF,"windowPane");var eL=new Set(["redux-color","redux-dark-color"]),eA=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function eM(t,e){e.alias&&(e.label=e.alias);let{theme:r,themeVariables:o}=(0,l.zj)(),{rowEven:a,rowOdd:s,nodeBorder:h,borderColorArray:c}=o;if("handDrawn"===e.look){let{themeVariables:r}=(0,l.zj)(),{background:i}=r,o={...e,id:e.id+"-background",domId:(e.domId||e.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${i}`]};await eM(t,o)}let g=(0,l.zj)();e.useHtmlLabels=g.htmlLabels;let p=g.er?.diagramPadding??10,f=g.er?.entityPadding??6,{cssStyles:y}=e,{labelStyles:m,nodeStyles:C}=(0,i.GX)(e);if(0===e.attributes.length&&e.label){let i={rx:0,ry:0,labelPaddingX:p,labelPaddingY:1.5*p,classes:""};(0,n.Un)(e.label,g)+2*i.labelPaddingX<g.er.minEntityWidth&&(e.width=g.er.minEntityWidth);let o=await ty(t,e,i);if(null!=r&&eL.has(r)){let t=e.colorIndex??0;o.attr("data-color-id",`color-${t%c.length}`)}if(!(0,l._3)(g.htmlLabels)){let t=o.select("text"),e=t.node()?.getBBox();t.attr("transform",`translate(${-e.width/2}, 0)`)}return o}g.htmlLabels||(p*=1.25,f*=1.25);let k=b(e);k||(k="node default");let w=t.insert("g").attr("class",k).attr("id",e.domId||e.id),B=await e$(w,e.label??"",g,0,0,["name"],m);B.height+=f;let T=0,S=[],v=[],_=0,F=0,L=0,A=0,M=!0,E=!0;for(let t of e.attributes){let e=await e$(w,t.type,g,0,T,["attribute-type"],m);_=Math.max(_,e.width+p);let r=await e$(w,t.name,g,0,T,["attribute-name"],m);F=Math.max(F,r.width+p);let i=await e$(w,t.keys.join(),g,0,T,["attribute-keys"],m);L=Math.max(L,i.width+p);let o=await e$(w,t.comment,g,0,T,["attribute-comment"],m);A=Math.max(A,o.width+p);let a=Math.max(e.height,r.height,i.height,o.height)+f;v.push({yOffset:T,rowHeight:a}),T+=a}let K=4;L<=p&&(M=!1,L=0,K--),A<=p&&(E=!1,A=0,K--);let O=w.node().getBBox();if(B.width+2*p-(_+F+L+A)>0){let t=B.width+2*p-(_+F+L+A);_+=t/K,F+=t/K,L>0&&(L+=t/K),A>0&&(A+=t/K)}let D=_+F+L+A,q=u.A.svg(w),I=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(I.roughness=0,I.fillStyle="solid");let P=0;v.length>0&&(P=v.reduce((t,e)=>t+(e?.rowHeight??0),0));let W=Math.max(O.width+2*p,e?.width||0,D),z=Math.max((P??0)+B.height,e?.height||0),R=-W/2,j=-z/2;if(w.selectAll("g:not(:first-child)").each((t,e,r)=>{let i=(0,d.Ltv)(r[e]),o=i.attr("transform"),a=0,s=0;if(o){let t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(o);t&&(a=parseFloat(t[1]),s=parseFloat(t[2]),i.attr("class").includes("attribute-name")?a+=_:i.attr("class").includes("attribute-keys")?a+=_+F:i.attr("class").includes("attribute-comment")&&(a+=_+F+L))}i.attr("transform",`translate(${R+p/2+a}, ${s+j+B.height+f/2})`)}),w.select(".name").attr("transform","translate("+-B.width/2+", "+(j+f/2)+")"),null!=r&&eL.has(r)){let t=e.colorIndex??0;w.attr("data-color-id",`color-${t%c.length}`)}let N=q.rectangle(R,j,W,z,I),H=w.insert(()=>N,":first-child").attr("class","outer-path").attr("style",y.join(""));for(let[t,e]of(S.push(0),v.entries())){let r=(t+1)%2==0&&0!==e.yOffset,i=q.rectangle(R,B.height+j+e?.yOffset,W,e?.rowHeight,{...I,fill:r?a:s,stroke:h});w.insert(()=>i,"g.label").attr("style",y.join("")).attr("class",`row-rect-${r?"even":"odd"}`)}let U=eE(R,B.height+j,W+R,B.height+j,1e-4),Y=q.polygon(U.map(t=>[t.x,t.y]),I);if(w.insert(()=>Y).attr("class","divider"),U=eE(_+R,B.height+j,_+R,z+j,1e-4),Y=q.polygon(U.map(t=>[t.x,t.y]),I),w.insert(()=>Y).attr("class","divider"),M){let t=_+F+R;U=eE(t,B.height+j,t,z+j,1e-4),Y=q.polygon(U.map(t=>[t.x,t.y]),I),w.insert(()=>Y).attr("class","divider")}if(E){let t=_+F+L+R;U=eE(t,B.height+j,t,z+j,1e-4),Y=q.polygon(U.map(t=>[t.x,t.y]),I),w.insert(()=>Y).attr("class","divider")}for(let t of S){let e=B.height+j+t;U=eE(R,e,W+R,e,1e-4),Y=q.polygon(U.map(t=>[t.x,t.y]),I),w.insert(()=>Y).attr("class","divider")}if(x(e,H),C&&"handDrawn"!==e.look)if(null!=r&&eA.has(r))w.selectAll("path").attr("style",C);else{let t=C.split(";"),e=t?.filter(t=>t.includes("stroke"))?.map(t=>`${t}`).join("; ");w.selectAll("path").attr("style",e??""),w.selectAll(".row-rect-even path").attr("style",C)}return e.intersect=function(t){return $.rect(e,t)},w}async function e$(t,e,r,i=0,a=0,s=[],h=""){let c=t.insert("g").attr("class",`label ${s.join(" ")}`).attr("transform",`translate(${i}, ${a})`).attr("style",h);e!==(0,l.QO)(e)&&(e=(e=(0,l.QO)(e)).replaceAll("<","<").replaceAll(">",">"));let u=c.node().appendChild(await (0,o.GZ)(c,e,{width:(0,n.Un)(e,r)+100,style:h,useHtmlLabels:r.htmlLabels},r));if(e.includes("<")||e.includes(">")){let t=u.children[0];for(t.textContent=t.textContent.replaceAll("<","<").replaceAll(">",">");t.childNodes[0];)(t=t.childNodes[0]).textContent=t.textContent.replaceAll("<","<").replaceAll(">",">")}let g=u.getBBox();if((0,l._3)(r.htmlLabels)){let t=u.children[0];t.style.textAlign="start";let e=(0,d.Ltv)(u);g=t.getBoundingClientRect(),e.attr("width",g.width),e.attr("height",g.height)}return g}function eE(t,e,r,i,o){return t===r?[{x:t-o/2,y:e},{x:t+o/2,y:e},{x:r+o/2,y:i},{x:r-o/2,y:i}]:[{x:t,y:e-o/2},{x:t,y:e+o/2},{x:r,y:i+o/2},{x:r,y:i-o/2}]}async function eK(t,e,r,i,o=r.class.padding??12){let a=3*!i,s=t.insert("g").attr("class",b(e)).attr("id",e.domId||e.id),n=null,l=null,h=null,c=null,d=0,u=0,g=0;if(n=s.insert("g").attr("class","annotation-group text"),e.annotations.length>0){let t=e.annotations[0];await eO(n,{text:`\xab${t}\xbb`},0),d=n.node().getBBox().height}l=s.insert("g").attr("class","label-group text"),await eO(l,e,0,["font-weight: bolder"]);let p=l.node().getBBox();u=p.height,h=s.insert("g").attr("class","members-group text");let f=0;for(let t of e.members){let e=await eO(h,t,f,[t.parseClassifier()]);f+=e+a}(g=h.node().getBBox().height)<=0&&(g=o/2),c=s.insert("g").attr("class","methods-group text");let y=0;for(let t of e.methods){let e=await eO(c,t,y,[t.parseClassifier()]);y+=e+a}let m=s.node().getBBox();if(null!==n){let t=n.node().getBBox();n.attr("transform",`translate(${-t.width/2})`)}return l.attr("transform",`translate(${-p.width/2}, ${d})`),m=s.node().getBBox(),h.attr("transform",`translate(0, ${d+u+2*o})`),m=s.node().getBBox(),c.attr("transform",`translate(0, ${d+u+(g?g+4*o:2*o)})`),m=s.node().getBBox(),{shapeSvg:s,bbox:m}}async function eO(t,e,r,i=[]){let a,s=t.insert("g").attr("class","label").attr("style",i.join("; ")),h=(0,l.zj)(),c="useHtmlLabels"in e?e.useHtmlLabels:(0,l._3)(h.htmlLabels)??!0,u="";u="text"in e?e.text:e.label,!c&&u.startsWith("\\")&&(u=u.substring(1)),(0,l.Wi)(u)&&(c=!0);let p=await (0,o.GZ)(s,(0,l.oB)((0,n.Sm)(u)),{width:(0,n.Un)(u,h)+50,classes:"markdown-node-label",useHtmlLabels:c},h),f=1;if(c){let t=p.children[0],e=(0,d.Ltv)(p);f=t.innerHTML.split("<br>").length,t.innerHTML.includes("</math>")&&(f+=t.innerHTML.split("<mrow>").length-1),await g(t),a=t.getBoundingClientRect(),e.attr("width",a.width),e.attr("height",a.height)}else{i.includes("font-weight: bolder")&&(0,d.Ltv)(p).selectAll("tspan").attr("font-weight",""),f=p.children.length;let t=p.children[0];(""===p.textContent||p.textContent.includes(">"))&&(t.textContent=u[0]+u.substring(1).replaceAll(">",">").replaceAll("<","<").trim()," "===u[1]&&(t.textContent=t.textContent[0]+" "+t.textContent.substring(1))),"undefined"===t.textContent&&(t.textContent=""),a=p.getBBox()}return s.attr("transform","translate(0,"+(-a.height/(2*f)+r)+")"),a.height}async function eD(t,e){let r=(0,l.D7)(),{theme:o,themeVariables:a}=r,{useGradient:n,borderColorArray:h}=a,c=r.class.padding??12,g=e.useHtmlLabels??(0,l._3)(r.htmlLabels)??!0;e.annotations=e.annotations??[],e.members=e.members??[],e.methods=e.methods??[];let{shapeSvg:p,bbox:f}=await eK(t,e,r,g,c);(0,s.XE)(p,e.colorIndex,o,h);let{labelStyles:y,nodeStyles:m}=(0,i.GX)(e);e.labelStyle=y,e.cssStyles=e.styles||"";let C=e.styles?.join(";")||m||"";e.cssStyles||(e.cssStyles=C.replaceAll("!important","").split(";"));let b=0===e.members.length&&0===e.methods.length&&!r.class?.hideEmptyMembersBox,k=u.A.svg(p),w=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let B=Math.max(e.width??0,f.width),T=Math.max(e.height??0,f.height),S=(e.height??0)>f.height;0===e.members.length&&0===e.methods.length?T+=c:e.members.length>0&&0===e.methods.length&&(T+=2*c);let v=-B/2,_=-T/2,F=b?2*c:0===e.members.length&&0===e.methods.length?-c:0;S&&(F=2*c);let L=k.rectangle(v-c,_-c-(b?c:0===e.members.length&&0===e.methods.length?-c/2:0),B+2*c,T+2*c+F,w),A=p.insert(()=>L,":first-child");A.attr("class","basic label-container outer-path");let M=A.node().getBBox(),E=p.select(".annotation-group").node().getBBox().height-(b?c/2:0)||0,K=p.select(".label-group").node().getBBox().height-(b?c/2:0)||0,O=p.select(".members-group").node().getBBox().height-(b?c/2:0)||0,D=(E+K+_+c-(_-c-(b?c:0===e.members.length&&0===e.methods.length?-c/2:0)))/2;if(p.selectAll(".text").each((t,i,o)=>{let a=(0,d.Ltv)(o[i]),s=a.attr("transform"),n=0;if(s){let t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(s);t&&(n=parseFloat(t[2]))}let l=n+_+c-(b?c:0===e.members.length&&0===e.methods.length?-c/2:0);if(a.attr("class").includes("methods-group")){let t=Math.max(O,c/2);l=S?Math.max(D,E+K+t+_+2*c+c)+2*c:E+K+t+_+4*c+c}0===e.members.length&&0===e.methods.length&&r.class?.hideEmptyMembersBox&&(l=e.annotations.length>0?n-c:n),g||(l-=4);let h=v;(a.attr("class").includes("label-group")||a.attr("class").includes("annotation-group"))&&(h=-a.node()?.getBBox().width/2||0,p.selectAll("text").each(function(t,e,r){"middle"===window.getComputedStyle(r[e]).textAnchor&&(h=0)})),a.attr("transform",`translate(${h}, ${l})`)}),e.members.length>0||e.methods.length>0||b){let t=E+K+_+c,r=k.line(M.x,t,M.x+M.width,t+.001,w);p.insert(()=>r).attr("class",`divider${"neo"===e.look&&!n?" neo-line":""}`).attr("style",C)}if(b||e.members.length>0||e.methods.length>0){let t=E+K+O+_+2*c+c,r=k.line(M.x,S?Math.max(D,t):t,M.x+M.width,(S?Math.max(D,t):t)+.001,w);p.insert(()=>r).attr("class",`divider${"neo"===e.look&&!n?" neo-line":""}`).attr("style",C)}if("handDrawn"!==e.look&&p.selectAll("path").attr("style",C),A.select(":nth-child(2)").attr("style",C),p.selectAll(".divider").select("path").attr("style",C),e.labelStyle?p.selectAll("span").attr("style",e.labelStyle):p.selectAll("span").attr("style",C),!g){let t=RegExp(/color\s*:\s*([^;]*)/),e=t.exec(C);if(e){let t=e[0].replace("color","fill");p.selectAll("tspan").attr("style",t)}else if(y){let e=t.exec(y);if(e){let t=e[0].replace("color","fill");p.selectAll("tspan").attr("style",t)}}}return x(e,A),e.intersect=function(t){return $.rect(e,t)},p}async function eq(t,e){let r,{labelStyles:o,nodeStyles:a}=(0,i.GX)(e);e.labelStyle=o;let s="verifyMethod"in e,n=b(e),h=(0,l.D7)(),{themeVariables:c}=h,{borderColorArray:g,requirementEdgeLabelBackground:p}=c,f="elk"===h.layout?"start":"center",y=t.insert("g").attr("class",n).attr("id",e.domId??e.id),m=r=s?await eI(y,`<<${e.type}>>`,0,e.labelStyle):await eI(y,"<<Element>>",0,e.labelStyle),C=await eI(y,e.name,m,e.labelStyle+"; font-weight: bold;");if(m+=C+20,s){let t=await eI(y,`${e.requirementId?`ID: ${e.requirementId}`:""}`,m,e.labelStyle,f);m+=t;let r=await eI(y,`${e.text?`Text: ${e.text}`:""}`,m,e.labelStyle,f);m+=r;let i=await eI(y,`${e.risk?`Risk: ${e.risk}`:""}`,m,e.labelStyle,f);m+=i,await eI(y,`${e.verifyMethod?`Verification: ${e.verifyMethod}`:""}`,m,e.labelStyle,f)}else{let t=await eI(y,`${e.type?`Type: ${e.type}`:""}`,m,e.labelStyle,f);m+=t,await eI(y,`${e.docRef?`Doc Ref: ${e.docRef}`:""}`,m,e.labelStyle,f)}let k=(y.node()?.getBBox().width??200)+20,w=(y.node()?.getBBox().height??200)+20,B=-k/2,T=-w/2,S=u.A.svg(y),v=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(v.roughness=0,v.fillStyle="solid");let _=S.rectangle(B,T,k,w,v),F=y.insert(()=>_,":first-child");if(F.attr("class","basic label-container outer-path").attr("style",a),g?.length){let t=e.colorIndex??0;y.attr("data-color-id",`color-${t%g.length}`)}if(y.selectAll(".label").each((t,e,r)=>{let i=(0,d.Ltv)(r[e]),o=i.attr("transform"),a=0,s=0;if(o){let t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(o);t&&(a=parseFloat(t[1]),s=parseFloat(t[2]))}let n=s-w/2,l=B+10;(0===e||1===e)&&(l=a),i.attr("transform",`translate(${l}, ${n+20})`)}),m>r+C+20){let t,i=T+r+C+20;if("neo"===e.look){let e=[[B,i],[B+k,i],[B+k,i+.001],[B,i+.001]];t=S.polygon(e,v)}else t=S.line(B,i,B+k,i,v);y.insert(()=>t).attr("class","divider")}return x(e,F),e.intersect=function(t){return $.rect(e,t)},a&&"handDrawn"!==e.look&&(p||g?.length)&&y.selectAll("path").attr("style",a),y}async function eI(t,e,r,i="",a="center"){let s;if(""===e)return 0;let h=t.insert("g").attr("class","label").attr("style",i),c=(0,l.D7)(),u=c.htmlLabels??!0,g=await (0,o.GZ)(h,(0,l.oB)((0,n.Sm)(e)),{width:(0,n.Un)(e,c)+50,classes:"markdown-node-label",useHtmlLabels:u,style:i},c);if(u){let t=g.children[0],e=(0,d.Ltv)(g);"start"===a&&(0,d.Ltv)(t).style("text-align","left"),s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}else{let t=g.children[0];for(let e of t.children)i&&e.setAttribute("style",i);if("start"===a)for(let e of(t.setAttribute("text-anchor","start"),t.children))e.setAttribute("text-anchor","start");s=g.getBBox(),s.height+=6}return h.attr("transform",`translate(${-s.width/2},${-s.height/2+r})`),s.height}(0,c.K)(eM,"erBox"),(0,c.K)(e$,"addText"),(0,c.K)(eE,"lineToPolygon"),(0,c.K)(eK,"textHelper"),(0,c.K)(eO,"addText"),(0,c.K)(eD,"classBox"),(0,c.K)(eq,"requirementBox"),(0,c.K)(eI,"addText");var eP=(0,c.K)(t=>{switch(t){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 eW(t,e,{config:r}){let o,a,s,n,{labelStyles:l,nodeStyles:h}=(0,i.GX)(e);e.labelStyle=l||"";let c=e.width;e.width=(e.width??200)-10;let{shapeSvg:d,bbox:g,label:p}=await m(t,e,b(e)),f=e.padding||10,y="";"ticket"in e&&e.ticket&&r?.kanban?.ticketBaseUrl&&(y=r?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),o=d.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",y).attr("target","_blank"));let k={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1};o?{label:a,bbox:s}=await C(o,"ticket"in e&&e.ticket||"",k):{label:a,bbox:s}=await C(d,"ticket"in e&&e.ticket||"",k);let{label:w,bbox:B}=await C(d,"assigned"in e&&e.assigned||"",k);e.width=c;let T=e?.width||0,S=Math.max(s.height,B.height)/2,v=Math.max(g.height+20,e?.height||0)+S,_=-T/2,F=-v/2;p.attr("transform","translate("+(f-T/2)+", "+(-S-g.height/2)+")"),a.attr("transform","translate("+(f-T/2)+", "+(-S+g.height/2)+")"),w.attr("transform","translate("+(f+T/2-B.width-20)+", "+(-S+g.height/2)+")");let{rx:L,ry:A}=e,{cssStyles:M}=e;if("handDrawn"===e.look){let t=u.A.svg(d),r=(0,i.Fr)(e,{}),o=L||A?t.path(E(_,F,T,v,L||0),r):t.rectangle(_,F,T,v,r);(n=d.insert(()=>o,":first-child")).attr("class","basic label-container").attr("style",M||null)}else{(n=d.insert("rect",":first-child")).attr("class","basic label-container __APA__").attr("style",h).attr("rx",L??5).attr("ry",A??5).attr("x",_).attr("y",F).attr("width",T).attr("height",v);let t="priority"in e&&e.priority;if(t){let e=d.append("line"),r=_+2,i=F+Math.floor((L??0)/2),o=F+v-Math.floor((L??0)/2);e.attr("x1",r).attr("y1",i).attr("x2",r).attr("y2",o).attr("stroke-width","4").attr("stroke",eP(t))}}return x(e,n),e.height=v,e.intersect=function(t){return $.rect(e,t)},d}async function ez(t,e){let r,{labelStyles:o,nodeStyles:a}=(0,i.GX)(e);e.labelStyle=o;let{shapeSvg:s,bbox:l,halfPadding:c,label:d}=await m(t,e,b(e)),g=l.width+10*c,p=l.height+8*c,f=.15*g,{cssStyles:y}=e,C=l.width+20,k=l.height+20,w=Math.max(g,C),B=Math.max(p,k);d.attr("transform",`translate(${-l.width/2}, ${-l.height/2})`);let T=`M0 0
|
|
12
|
-
a${f},${f} 1 0,0 ${.25*w},${-1*B*.1}
|
|
13
|
-
a${f},${f} 1 0,0 ${.25*w},0
|
|
14
|
-
a${f},${f} 1 0,0 ${.25*w},0
|
|
15
|
-
a${f},${f} 1 0,0 ${.25*w},${.1*B}
|
|
16
|
-
|
|
17
|
-
a${f},${f} 1 0,0 ${.15*w},${.33*B}
|
|
18
|
-
a${.8*f},${.8*f} 1 0,0 0,${.34*B}
|
|
19
|
-
a${f},${f} 1 0,0 ${-1*w*.15},${.33*B}
|
|
20
|
-
|
|
21
|
-
a${f},${f} 1 0,0 ${-1*w*.25},${.15*B}
|
|
22
|
-
a${f},${f} 1 0,0 ${-1*w*.25},0
|
|
23
|
-
a${f},${f} 1 0,0 ${-1*w*.25},0
|
|
24
|
-
a${f},${f} 1 0,0 ${-1*w*.25},${-1*B*.15}
|
|
25
|
-
|
|
26
|
-
a${f},${f} 1 0,0 ${-1*w*.1},${-1*B*.33}
|
|
27
|
-
a${.8*f},${.8*f} 1 0,0 0,${-1*B*.34}
|
|
28
|
-
a${f},${f} 1 0,0 ${.1*w},${-1*B*.33}
|
|
29
|
-
H0 V0 Z`;if("handDrawn"===e.look){let t=u.A.svg(s),o=(0,i.Fr)(e,{}),a=t.path(T,o);(r=s.insert(()=>a,":first-child")).attr("class","basic label-container").attr("style",(0,n.KL)(y))}else r=s.insert("path",":first-child").attr("class","basic label-container").attr("style",a).attr("d",T);return r.attr("transform",`translate(${-w/2}, ${-B/2})`),x(e,r),e.calcIntersect=function(t,e){return $.rect(t,e)},e.intersect=function(t){return h.R.info("Bang intersect",e,t),$.rect(e,t)},s}async function eR(t,e){let r,{labelStyles:o,nodeStyles:a}=(0,i.GX)(e);e.labelStyle=o;let{shapeSvg:s,bbox:l,halfPadding:c,label:d}=await m(t,e,b(e)),g=l.width+2*c,p=l.height+2*c,f=.15*g,y=.25*g,C=.35*g,k=.2*g,{cssStyles:w}=e,B=`M0 0
|
|
30
|
-
a${f},${f} 0 0,1 ${.25*g},${-1*g*.1}
|
|
31
|
-
a${C},${C} 1 0,1 ${.4*g},${-1*g*.1}
|
|
32
|
-
a${y},${y} 1 0,1 ${.35*g},${.2*g}
|
|
33
|
-
|
|
34
|
-
a${f},${f} 1 0,1 ${.15*g},${.35*p}
|
|
35
|
-
a${k},${k} 1 0,1 ${-1*g*.15},${.65*p}
|
|
36
|
-
|
|
37
|
-
a${y},${f} 1 0,1 ${-1*g*.25},${.15*g}
|
|
38
|
-
a${C},${C} 1 0,1 ${-1*g*.5},0
|
|
39
|
-
a${f},${f} 1 0,1 ${-1*g*.25},${-1*g*.15}
|
|
40
|
-
|
|
41
|
-
a${f},${f} 1 0,1 ${-1*g*.1},${-1*p*.35}
|
|
42
|
-
a${k},${k} 1 0,1 ${.1*g},${-1*p*.65}
|
|
43
|
-
H0 V0 Z`;if("handDrawn"===e.look){let t=u.A.svg(s),o=(0,i.Fr)(e,{}),a=t.path(B,o);(r=s.insert(()=>a,":first-child")).attr("class","basic label-container").attr("style",(0,n.KL)(w))}else r=s.insert("path",":first-child").attr("class","basic label-container").attr("style",a).attr("d",B);return d.attr("transform",`translate(${-l.width/2}, ${-l.height/2})`),r.attr("transform",`translate(${-g/2}, ${-p/2})`),x(e,r),e.calcIntersect=function(t,e){return $.rect(t,e)},e.intersect=function(t){return h.R.info("Cloud intersect",e,t),$.rect(e,t)},s}async function ej(t,e){let{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;let{shapeSvg:a,bbox:s,halfPadding:n,label:l}=await m(t,e,b(e)),h=s.width+8*n,c=s.height+2*n,d="neo"===e.look?`
|
|
44
|
-
M${-h/2} ${c/2-5}
|
|
45
|
-
v${-c+10}
|
|
46
|
-
q0,-5 5,-5
|
|
47
|
-
h${h-10}
|
|
48
|
-
q5,0 5,5
|
|
49
|
-
v${c-5}
|
|
50
|
-
H${-h/2}
|
|
51
|
-
Z
|
|
52
|
-
`:`
|
|
53
|
-
M${-h/2} ${c/2-5}
|
|
54
|
-
v${-c+10}
|
|
55
|
-
q0,-5 5,-5
|
|
56
|
-
h${h-10}
|
|
57
|
-
q5,0 5,5
|
|
58
|
-
v${c-10}
|
|
59
|
-
q0,5 -5,5
|
|
60
|
-
h${-(h-10)}
|
|
61
|
-
q-5,0 -5,-5
|
|
62
|
-
Z
|
|
63
|
-
`;if(!e.domId)throw Error(`defaultMindmapNode: node "${e.id}" is missing a domId — was render.ts domId prefixing skipped?`);let u=a.append("path").attr("id",e.domId).attr("class","node-bkg node-"+e.type).attr("style",o).attr("d",d);return a.append("line").attr("class","node-line-").attr("x1",-h/2).attr("y1",c/2).attr("x2",h/2).attr("y2",c/2),l.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),a.append(()=>l.node()),x(e,u),e.calcIntersect=function(t,e){return $.rect(t,e)},e.intersect=function(t){return $.rect(e,t)},a}async function eN(t,e){let r={padding:e.padding??0};return J(t,e,r)}(0,c.K)(eW,"kanbanItem"),(0,c.K)(ez,"bang"),(0,c.K)(eR,"cloud"),(0,c.K)(ej,"defaultMindmapNode"),(0,c.K)(eN,"mindmapCircle");var eH=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:eh},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:es},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:ed},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:ef},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:tf},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:tm},{semanticName:"Folder",name:"Folder",shortName:"folder",description:"Folder or directory",aliases:["directory"],handler:tB},{semanticName:"Bucket",name:"Bucket",shortName:"bucket",description:"Object storage bucket",handler:P},{semanticName:"Console",name:"Console (terminal window)",shortName:"console",description:"Terminal or console window",handler:te},{semanticName:"Browser",name:"Browser",shortName:"browser",description:"Browser window",handler:V},{semanticName:"Person",name:"Person",shortName:"person",description:"Person (circular head above a rounded body)",handler:td},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:J},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:ez},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:eR},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:ei},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:t_},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:tq},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:tD},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:eB},{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:tK},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:tx},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:eC},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Z},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:en},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:ep},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:eg},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:tT},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:tF},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:ta},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:tn},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:th},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:tI},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:ev},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:tS},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:ew},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:tR},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:tc},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:tC},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:eS},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:eF},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:tk},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:eT},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:tw},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:el},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:et},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:t9},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:I},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:ti},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:em},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:ey},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:e_},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:eo},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:tj}],eU=(0,c.K)(()=>Object.fromEntries([...Object.entries({state:eu,choice:Q,note:ee,composite:tt,rectWithTitle:ea,labelRect:tO,block_arrow:G,collapsedGroup:z,iconSquare:t$,iconCircle:tA,icon:tL,iconRounded:tM,imageSquare:tE,anchor:O,kanbanItem:eW,mindmapCircle:eN,defaultMindmapNode:ej,classBox:eD,erBox:eM,requirementBox:eq,usecaseActor:tJ,usecaseActorHollow:t1,usecaseActorAwesome:t0,usecaseActorIcon:t5,usecaseBusiness:t4,usecaseEllipse:tb,usecaseJsonTable:t7}),...eH.flatMap(t=>[t.shortName,..."aliases"in t?t.aliases:[],..."internalAliases"in t?t.internalAliases:[]].map(e=>[e,t.handler]))]),"generateShapeMap")();function eY(t){return t in eU}(0,c.K)(eY,"isValidShape"),r.d(e,{DA:()=>K,FA:()=>E,I7:()=>$,Zk:()=>m,aP:()=>eY,lC:()=>x,nM:()=>S,nq:()=>eU})},PF(t,e,r){"use strict";var i=r("Yr"),o=r("Gt"),a=(0,o.K)(t=>{let{handDrawnSeed:e}=(0,i.D7)();return{fill:t,hachureAngle:120,hachureGap:1.5,fillWeight:1.5,roughness:.7,stroke:t,seed:e}},"solidStateFill"),s=(0,o.K)(t=>Array.isArray(t)?t:t?t.split(";").map(t=>t.trim()).filter(Boolean):[],"normalizeStyleList"),n=(0,o.K)(t=>{let e=l([...t.cssCompiledStyles||[],...t.cssStyles||[],...s(t.labelStyle)]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),l=(0,o.K)(t=>{let e=new Map;return t.forEach(t=>{let[r,i]=t.split(":");e.set(r.trim(),i?.trim())}),e},"styles2Map"),h=(0,o.K)(t=>"color"===t||"font-size"===t||"font-family"===t||"font-weight"===t||"font-style"===t||"text-decoration"===t||"text-align"===t||"text-transform"===t||"line-height"===t||"letter-spacing"===t||"word-spacing"===t||"text-shadow"===t||"text-overflow"===t||"white-space"===t||"word-wrap"===t||"word-break"===t||"overflow-wrap"===t||"hyphens"===t,"isLabelStyle"),c=(0,o.K)(t=>{let{stylesArray:e}=n(t),r=[],i=[],o=[],a=[];return e.forEach(t=>{let e=t[0];h(e)?r.push(t.join(":")+" !important"):(i.push(t.join(":")+" !important"),e.includes("stroke")&&o.push(t.join(":")+" !important"),"fill"===e&&a.push(t.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:e,borderStyles:o,backgroundStyles:a}},"styles2String"),d=(0,o.K)((t,e)=>{let{themeVariables:r,handDrawnSeed:o}=(0,i.D7)(),{nodeBorder:a,mainBkg:s}=r,{stylesMap:l}=n(t);return Object.assign({roughness:.7,fill:l.get("fill")||s,fillStyle:"hachure",fillWeight:1.5,hachureGap:1.5,stroke:l.get("stroke")||a,seed:o,strokeWidth:l.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:u(l.get("stroke-dasharray"))},e)},"userNodeOverrides"),u=(0,o.K)(t=>{if(!t)return[0,0];let e=t.trim().split(/\s+/).map(Number);if(1===e.length){let t=isNaN(e[0])?0:e[0];return[t,t]}return[isNaN(e[0])?0:e[0],isNaN(e[1])?0:e[1]]},"getStrokeDashArray");r.d(e,{Fr:()=>d,GX:()=>c,KX:()=>h,WW:()=>n,ue:()=>a})},Q(t,e,r){"use strict";var i=r("Gt"),o=(0,i.K)((t,e)=>{let{theme:r,themeVariables:o}=e,{useGradient:a,gradientStart:s,gradientStop:n}=o??{},l=t.attr("id"),h=r?.includes("dark")?"#FFFFFF":"#000000",c=(0,i.K)((e,r,i)=>t.append("defs").append("filter").attr("id",e).attr("height",r).attr("width",r).append("feDropShadow").attr("dx",i).attr("dy",i).attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",h),"dropShadow");if(c(`${l}-drop-shadow`,"130%","4"),c(`${l}-drop-shadow-small`,"150%","2"),!a)return;let d=t.append("linearGradient").attr("id",`${l}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");d.append("svg:stop").attr("offset","0%").attr("stop-color",s).attr("stop-opacity",1),d.append("svg:stop").attr("offset","100%").attr("stop-color",n).attr("stop-opacity",1)},"insertLookDefs");r.d(e,{F:()=>o})},mW(t,e,r){"use strict";var i=r("Q"),o=r("ix"),a=r("LC"),s=r("bQ"),n=r("Ut"),l=r("NH"),h=r("Yr"),c=r("M4"),d=r("Gt"),u={common:h.Y2,getConfig:h.zj,insertCluster:o.U,insertEdge:a.Jo,insertEdgeLabel:a.jP,insertMarkers:a.g0,insertNode:s.on,interpolateToCurve:l.Ib,labelHelper:n.Zk,log:c.R,positionEdgeLabel:a.T_},g=["elk.stress","elk.force","elk.mrtree","elk.sporeOverlap","elk.box","elk.rectpacking"],p=Object.create(null),f=(0,d.K)(t=>{for(let e of t)p[e.name]=e},"registerLayoutLoaders"),y=(0,d.K)(()=>{let t=(0,d.K)(async()=>await Promise.all([r.e("l"),r.e("mt"),r.e("vt"),r.e("ud")]).then(r.bind(r,"Ro")),"loader");return[{name:"elk",loader:t,algorithm:"elk.layered"},...g.map(e=>({name:e,loader:t,algorithm:e}))]},"elkLayoutLoaders");(0,d.K)(()=>{f([{name:"dagre",loader:(0,d.K)(async()=>await Promise.all([r.e("l"),r.e("mt"),r.e("7g")]).then(r.bind(r,"xs")),"loader")},{name:"swimlane",loader:(0,d.K)(async()=>await Promise.all([r.e("l"),r.e("mt"),r.e("jl")]).then(r.bind(r,"th")),"loader")},{name:"cose-bilkent",loader:(0,d.K)(async()=>await Promise.all([r.e("hp"),r.e("u")]).then(r.bind(r,"Yz")),"loader")},...y()])},"registerDefaultLayoutLoaders")();var m=(0,d.K)(async(t,e)=>{if(!Object.hasOwn(p,t.layoutAlgorithm))throw Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);if(t.diagramId)for(let e of t.nodes){let r=e.domId||e.id;e.domId=`${t.diagramId}-${r}`}let r=p[t.layoutAlgorithm],o=await r.loader();return(0,i.F)(e,t.config),o.render(t,e,u,{algorithm:r.algorithm})},"render"),C="dagre",x=(0,d.K)((t="",{fallback:e=C}={})=>{if(Object.hasOwn(p,t))return t;for(let r of[e,C])if(Object.hasOwn(p,r))return c.R.warn(`Layout algorithm ${t} is not registered. Using ${r} as fallback.`),r;throw Error(`Neither layout algorithm ${t}, ${e}, nor ${C} is registered.`)},"getRegisteredLayoutAlgorithm");r.d(e,{XX:()=>m,q7:()=>x,sO:()=>f})},pK(t,e,r){"use strict";var i=r("Gt"),o=new Set(["redux-color","redux-dark-color"]),a=(0,i.K)(t=>Array.isArray(t)&&t.length>0,"hasPalette"),s=(0,i.K)((t,e)=>null!=t&&o.has(t)&&a(e),"isColorTheme"),n=/^[\w-]+$/,l=(0,i.K)(t=>{let e="string"==typeof t||"number"==typeof t?String(t):"";return n.test(e)?e:"classic"},"safeLook"),h=(0,i.K)(t=>a(t)?t.length:0,"paletteSlotCount"),c=(0,i.K)((t,e)=>a(e)?h(e):"number"==typeof t&&Number.isInteger(t)&&t>0&&t<=64?t:12,"colorSlotCount"),d=(0,i.K)((t,e,r,i)=>{if(void 0===e||!s(r,i))return;let o=e%h(i);t.attr("data-color-id",`color-${o}`)},"stampColorSlot");r.d(e,{Fx:()=>o,Hu:()=>h,Ic:()=>a,P1:()=>s,XE:()=>d,nw:()=>c,rq:()=>l})},Wf(t,e,r){"use strict";var i,o,a,s,n,l,h,c,d,u,g,p,f,y,m,C,x,b,k,w,B,T,S,v,_,F,L,A,M,$,E,K,O,D,q,I,P,W,z,R,j,N,H,U,Y,X,G=r("Gt");function V(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}(0,G.K)(V,"getDefaultExportFromCjs");var Z={},Q={},J={};function tt(){if(i)return J;function t(t){return null==t}function e(t){return"object"==typeof t&&null!==t}function r(e){return Array.isArray(e)?e:t(e)?[]:[e]}function o(t,e){if(e){let r=Object.keys(e);for(let i=0,o=r.length;i<o;i+=1){let o=r[i];t[o]=e[o]}}return t}function a(t,e){let r="";for(let i=0;i<e;i+=1)r+=t;return r}function s(t){return 0===t&&-1/0==1/t}return i=1,(0,G.K)(t,"isNothing"),(0,G.K)(e,"isObject"),(0,G.K)(r,"toArray"),(0,G.K)(o,"extend"),(0,G.K)(a,"repeat"),(0,G.K)(s,"isNegativeZero"),J.isNothing=t,J.isObject=e,J.toArray=r,J.repeat=a,J.isNegativeZero=s,J.extend=o,J}function te(){if(a)return o;function t(t,e){let r="",i=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(r+='in "'+t.mark.name+'" '),r+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(r+="\n\n"+t.mark.snippet),i+" "+r):i}function e(e,r){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=r,this.message=t(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack||""}return a=1,(0,G.K)(t,"formatError"),(0,G.K)(e,"YAMLException2"),e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e.prototype.toString=(0,G.K)(function(e){return this.name+": "+t(this,e)},"toString"),o=e}function tr(){if(n)return s;n=1;let t=tt();function e(t,e,r,i,o){let a="",s="",n=Math.floor(o/2)-1;return i-e>n&&(e=i-n+(a=" ... ").length),r-i>n&&(r=i+n-(s=" ...").length),{str:a+t.slice(e,r).replace(/\t/g,"→")+s,pos:i-e+a.length}}function r(e,r){return t.repeat(" ",r-e.length)+e}function i(i,o){let a;if(o=Object.create(o||null),!i.buffer)return null;o.maxLength||(o.maxLength=79),"number"!=typeof o.indent&&(o.indent=1),"number"!=typeof o.linesBefore&&(o.linesBefore=3),"number"!=typeof o.linesAfter&&(o.linesAfter=2);let s=/\r?\n|\r|\0/g,n=[0],l=[],h=-1;for(;a=s.exec(i.buffer);)l.push(a.index),n.push(a.index+a[0].length),i.position<=a.index&&h<0&&(h=n.length-2);h<0&&(h=n.length-1);let c="",d=Math.min(i.line+o.linesAfter,l.length).toString().length,u=o.maxLength-(o.indent+d+3);for(let a=1;a<=o.linesBefore&&!(h-a<0);a++){let s=e(i.buffer,n[h-a],l[h-a],i.position-(n[h]-n[h-a]),u);c=t.repeat(" ",o.indent)+r((i.line-a+1).toString(),d)+" | "+s.str+"\n"+c}let g=e(i.buffer,n[h],l[h],i.position,u);c+=t.repeat(" ",o.indent)+r((i.line+1).toString(),d)+" | "+g.str+"\n"+t.repeat("-",o.indent+d+3+g.pos)+"^\n";for(let a=1;a<=o.linesAfter&&!(h+a>=l.length);a++){let s=e(i.buffer,n[h+a],l[h+a],i.position-(n[h]-n[h+a]),u);c+=t.repeat(" ",o.indent)+r((i.line+a+1).toString(),d)+" | "+s.str+"\n"}return c.replace(/\n$/,"")}return(0,G.K)(e,"getLine"),(0,G.K)(r,"padStart"),(0,G.K)(i,"makeSnippet"),s=i}function ti(){if(h)return l;h=1;let t=te(),e=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],r=["scalar","sequence","mapping"];function i(t){let e={};return null!==t&&Object.keys(t).forEach(function(r){t[r].forEach(function(t){e[String(t)]=r})}),e}function o(o,a){if(Object.keys(a=a||{}).forEach(function(r){if(-1===e.indexOf(r))throw new t('Unknown option "'+r+'" is met in definition of "'+o+'" YAML type.')}),this.options=a,this.tag=o,this.kind=a.kind||null,this.resolve=a.resolve||function(){return!0},this.construct=a.construct||function(t){return t},this.instanceOf=a.instanceOf||null,this.predicate=a.predicate||null,this.represent=a.represent||null,this.representName=a.representName||null,this.defaultStyle=a.defaultStyle||null,this.multi=a.multi||!1,this.styleAliases=i(a.styleAliases||null),-1===r.indexOf(this.kind))throw new t('Unknown kind "'+this.kind+'" is specified for "'+o+'" YAML type.')}return(0,G.K)(i,"compileStyleAliases"),(0,G.K)(o,"Type2"),l=o}function to(){if(d)return c;d=1;let t=te(),e=ti();function r(t,e){let r=[];return t[e].forEach(function(t){let e=r.length;r.forEach(function(r,i){r.tag===t.tag&&r.kind===t.kind&&r.multi===t.multi&&(e=i)}),r[e]=t}),r}function i(){let t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function e(e){e.multi?(t.multi[e.kind].push(e),t.multi.fallback.push(e)):t[e.kind][e.tag]=t.fallback[e.tag]=e}(0,G.K)(e,"collectType");for(let t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(e);return t}function o(t){return this.extend(t)}return(0,G.K)(r,"compileList"),(0,G.K)(i,"compileMap"),(0,G.K)(o,"Schema2"),o.prototype.extend=(0,G.K)(function(a){let s=[],n=[];if(a instanceof e)n.push(a);else if(Array.isArray(a))n=n.concat(a);else if(a&&(Array.isArray(a.implicit)||Array.isArray(a.explicit)))a.implicit&&(s=s.concat(a.implicit)),a.explicit&&(n=n.concat(a.explicit));else throw new t("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");s.forEach(function(r){if(!(r instanceof e))throw new t("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(r.loadKind&&"scalar"!==r.loadKind)throw new t("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(r.multi)throw new t("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(r){if(!(r instanceof e))throw new t("Specified list of YAML types (or a single Type object) contains a non-Type object.")});let l=Object.create(o.prototype);return l.implicit=(this.implicit||[]).concat(s),l.explicit=(this.explicit||[]).concat(n),l.compiledImplicit=r(l,"implicit"),l.compiledExplicit=r(l,"explicit"),l.compiledTypeMap=i(l.compiledImplicit,l.compiledExplicit),l},"extend"),c=o}function ta(){return g?u:(g=1,u=new(ti())("tag:yaml.org,2002:str",{kind:"scalar",construct:(0,G.K)(function(t){return null!==t?t:""},"construct")}))}function ts(){return f?p:(f=1,p=new(ti())("tag:yaml.org,2002:seq",{kind:"sequence",construct:(0,G.K)(function(t){return null!==t?t:[]},"construct")}))}function tn(){return m?y:(m=1,y=new(ti())("tag:yaml.org,2002:map",{kind:"mapping",construct:(0,G.K)(function(t){return null!==t?t:{}},"construct")}))}function tl(){return x?C:(x=1,C=new(to())({explicit:[ta(),ts(),tn()]}))}function th(){if(k)return b;k=1;let t=ti();function e(t){if(null===t)return!0;let e=t.length;return 1===e&&"~"===t||4===e&&("null"===t||"Null"===t||"NULL"===t)}function r(){return null}function i(t){return null===t}return(0,G.K)(e,"resolveYamlNull"),(0,G.K)(r,"constructYamlNull"),(0,G.K)(i,"isNull"),b=new t("tag:yaml.org,2002:null",{kind:"scalar",resolve:e,construct:r,predicate:i,represent:{canonical:(0,G.K)(function(){return"~"},"canonical"),lowercase:(0,G.K)(function(){return"null"},"lowercase"),uppercase:(0,G.K)(function(){return"NULL"},"uppercase"),camelcase:(0,G.K)(function(){return"Null"},"camelcase"),empty:(0,G.K)(function(){return""},"empty")},defaultStyle:"lowercase"})}function tc(){if(B)return w;B=1;let t=ti();function e(t){if(null===t)return!1;let e=t.length;return 4===e&&("true"===t||"True"===t||"TRUE"===t)||5===e&&("false"===t||"False"===t||"FALSE"===t)}function r(t){return"true"===t||"True"===t||"TRUE"===t}function i(t){return"[object Boolean]"===Object.prototype.toString.call(t)}return(0,G.K)(e,"resolveYamlBoolean"),(0,G.K)(r,"constructYamlBoolean"),(0,G.K)(i,"isBoolean"),w=new t("tag:yaml.org,2002:bool",{kind:"scalar",resolve:e,construct:r,predicate:i,represent:{lowercase:(0,G.K)(function(t){return t?"true":"false"},"lowercase"),uppercase:(0,G.K)(function(t){return t?"TRUE":"FALSE"},"uppercase"),camelcase:(0,G.K)(function(t){return t?"True":"False"},"camelcase")},defaultStyle:"lowercase"})}function td(){if(S)return T;S=1;let t=tt(),e=ti();function r(t){return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function i(t){return t>=48&&t<=55}function o(t){return t>=48&&t<=57}function a(t){if(null===t)return!1;let e=t.length,a=0,n=!1;if(!e)return!1;let l=t[a];if(("-"===l||"+"===l)&&(l=t[++a]),"0"===l){if(a+1===e)return!0;if("b"===(l=t[++a])){for(a++;a<e;a++){if("0"!==(l=t[a])&&"1"!==l)return!1;n=!0}return n&&isFinite(s(t))}if("x"===l){for(a++;a<e;a++){if(!r(t.charCodeAt(a)))return!1;n=!0}return n&&isFinite(s(t))}if("o"===l){for(a++;a<e;a++){if(!i(t.charCodeAt(a)))return!1;n=!0}return n&&isFinite(s(t))}}for(;a<e;a++){if(!o(t.charCodeAt(a)))return!1;n=!0}return!!n&&isFinite(s(t))}function s(t){let e=t,r=1,i=e[0];if(("-"===i||"+"===i)&&("-"===i&&(r=-1),i=(e=e.slice(1))[0]),"0"===e)return 0;if("0"===i){if("b"===e[1])return r*parseInt(e.slice(2),2);if("x"===e[1])return r*parseInt(e.slice(2),16);if("o"===e[1])return r*parseInt(e.slice(2),8)}return r*parseInt(e,10)}function n(t){return s(t)}function l(e){return"[object Number]"===Object.prototype.toString.call(e)&&e%1==0&&!t.isNegativeZero(e)}return(0,G.K)(r,"isHexCode"),(0,G.K)(i,"isOctCode"),(0,G.K)(o,"isDecCode"),(0,G.K)(a,"resolveYamlInteger"),(0,G.K)(s,"parseYamlInteger"),(0,G.K)(n,"constructYamlInteger"),(0,G.K)(l,"isInteger"),T=new e("tag:yaml.org,2002:int",{kind:"scalar",resolve:a,construct:n,predicate:l,represent:{binary:(0,G.K)(function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},"binary"),octal:(0,G.K)(function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},"octal"),decimal:(0,G.K)(function(t){return t.toString(10)},"decimal"),hexadecimal:(0,G.K)(function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})}function tu(){if(_)return v;_=1;let t=tt(),e=ti(),r=RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),i=RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function o(t){return null!==t&&!!r.test(t)&&(!!isFinite(parseFloat(t,10))||i.test(t))}function a(t){let e=t.toLowerCase(),r="-"===e[0]?-1:1;return("+-".indexOf(e[0])>=0&&(e=e.slice(1)),".inf"===e)?1===r?1/0:-1/0:".nan"===e?0/0:r*parseFloat(e,10)}(0,G.K)(o,"resolveYamlFloat"),(0,G.K)(a,"constructYamlFloat");let s=/^[-+]?[0-9]+e/;function n(e,r){if(isNaN(e))switch(r){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(1/0===e)switch(r){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(-1/0===e)switch(r){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(t.isNegativeZero(e))return"-0.0";let i=e.toString(10);return s.test(i)?i.replace("e",".e"):i}function l(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||t.isNegativeZero(e))}return(0,G.K)(n,"representYamlFloat"),(0,G.K)(l,"isFloat"),v=new e("tag:yaml.org,2002:float",{kind:"scalar",resolve:o,construct:a,predicate:l,represent:n,defaultStyle:"lowercase"})}function tg(){return L?F:(L=1,F=tl().extend({implicit:[th(),tc(),td(),tu()]}))}function tp(){return M?A:(M=1,A=tg())}function tf(){if(E)return $;E=1;let t=ti(),e=RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),r=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 i(t){return null!==t&&(null!==e.exec(t)||null!==r.exec(t))}function o(t){let i=0,o=null,a=e.exec(t);if(null===a&&(a=r.exec(t)),null===a)throw Error("Date resolve error");let s=+a[1],n=a[2]-1,l=+a[3];if(!a[4])return new Date(Date.UTC(s,n,l));let h=+a[4],c=+a[5],d=+a[6];if(a[7]){for(i=a[7].slice(0,3);i.length<3;)i+="0";i*=1}a[9]&&(o=(60*a[10]+ +(a[11]||0))*6e4,"-"===a[9]&&(o=-o));let u=new Date(Date.UTC(s,n,l,h,c,d,i));return o&&u.setTime(u.getTime()-o),u}function a(t){return t.toISOString()}return(0,G.K)(i,"resolveYamlTimestamp"),(0,G.K)(o,"constructYamlTimestamp"),(0,G.K)(a,"representYamlTimestamp"),$=new t("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:i,construct:o,instanceOf:Date,represent:a})}function ty(){if(O)return K;O=1;let t=ti();function e(t){return"<<"===t||null===t}return(0,G.K)(e,"resolveYamlMerge"),K=new t("tag:yaml.org,2002:merge",{kind:"scalar",resolve:e})}function tm(){if(q)return D;q=1;let t=ti(),e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function r(t){if(null===t)return!1;let r=0,i=t.length;for(let o=0;o<i;o++){let i=e.indexOf(t.charAt(o));if(!(i>64)){if(i<0)return!1;r+=6}}return r%8==0}function i(t){let r=t.replace(/[\r\n=]/g,""),i=r.length,o=0,a=[];for(let t=0;t<i;t++)t%4==0&&t&&(a.push(o>>16&255),a.push(o>>8&255),a.push(255&o)),o=o<<6|e.indexOf(r.charAt(t));let s=i%4*6;return 0===s?(a.push(o>>16&255),a.push(o>>8&255),a.push(255&o)):18===s?(a.push(o>>10&255),a.push(o>>2&255)):12===s&&a.push(o>>4&255),new Uint8Array(a)}function o(t){let r="",i=0,o=t.length;for(let a=0;a<o;a++)a%3==0&&a&&(r+=e[i>>18&63],r+=e[i>>12&63],r+=e[i>>6&63],r+=e[63&i]),i=(i<<8)+t[a];let a=o%3;return 0===a?(r+=e[i>>18&63],r+=e[i>>12&63],r+=e[i>>6&63],r+=e[63&i]):2===a?(r+=e[i>>10&63],r+=e[i>>4&63],r+=e[i<<2&63],r+=e[64]):1===a&&(r+=e[i>>2&63],r+=e[i<<4&63],r+=e[64],r+=e[64]),r}function a(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}return(0,G.K)(r,"resolveYamlBinary"),(0,G.K)(i,"constructYamlBinary"),(0,G.K)(o,"representYamlBinary"),(0,G.K)(a,"isBinary"),D=new t("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r,construct:i,predicate:a,represent:o})}function tC(){if(P)return I;P=1;let t=ti(),e=Object.prototype.hasOwnProperty,r=Object.prototype.toString;function i(t){if(null===t)return!0;let i=[];for(let o=0,a=t.length;o<a;o+=1){let a,s=t[o],n=!1;if("[object Object]"!==r.call(s))return!1;for(a in s)if(e.call(s,a))if(n)return!1;else n=!0;if(!n||-1!==i.indexOf(a))return!1;i.push(a)}return!0}function o(t){return null!==t?t:[]}return(0,G.K)(i,"resolveYamlOmap"),(0,G.K)(o,"constructYamlOmap"),I=new t("tag:yaml.org,2002:omap",{kind:"sequence",resolve:i,construct:o})}function tx(){if(z)return W;z=1;let t=ti(),e=Object.prototype.toString;function r(t){if(null===t)return!0;let r=Array(t.length);for(let i=0,o=t.length;i<o;i+=1){let o=t[i];if("[object Object]"!==e.call(o))return!1;let a=Object.keys(o);if(1!==a.length)return!1;r[i]=[a[0],o[a[0]]]}return!0}function i(t){if(null===t)return[];let e=Array(t.length);for(let r=0,i=t.length;r<i;r+=1){let i=t[r],o=Object.keys(i);e[r]=[o[0],i[o[0]]]}return e}return(0,G.K)(r,"resolveYamlPairs"),(0,G.K)(i,"constructYamlPairs"),W=new t("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:r,construct:i})}function tb(){if(j)return R;j=1;let t=ti(),e=Object.prototype.hasOwnProperty;function r(t){if(null===t)return!0;for(let r in t)if(e.call(t,r)&&null!==t[r])return!1;return!0}function i(t){return null!==t?t:{}}return(0,G.K)(r,"resolveYamlSet"),(0,G.K)(i,"constructYamlSet"),R=new t("tag:yaml.org,2002:set",{kind:"mapping",resolve:r,construct:i})}function tk(){return H?N:(H=1,N=tp().extend({implicit:[tf(),ty()],explicit:[tm(),tC(),tx(),tb()]}))}function tw(){if(U)return Q;U=1;let t=tt(),e=te(),r=tr(),i=tk(),o=Object.prototype.hasOwnProperty,a=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,s=/[\x85\u2028\u2029]/,n=/[,\[\]{}]/,l=/^(?:!|!!|![0-9A-Za-z-]+!)$/,h=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function c(t){return Object.prototype.toString.call(t)}function d(t){return 10===t||13===t}function u(t){return 9===t||32===t}function g(t){return 9===t||32===t||10===t||13===t}function p(t){return 44===t||91===t||93===t||123===t||125===t}function f(t){if(t>=48&&t<=57)return t-48;let e=32|t;return e>=97&&e<=102?e-97+10:-1}function y(t){return 120===t?2:117===t?4:8*(85===t)}function m(t){return t>=48&&t<=57?t-48:-1}function C(t){switch(t){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:case 9:return" ";case 110:return"\n";case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1b";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"
";case 95:return" ";case 76:return"\u2028";case 80:return"\u2029";default:return""}}function x(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}function b(t,e,r){"__proto__"===e?Object.defineProperty(t,e,{configurable:!0,enumerable:!0,writable:!0,value:r}):t[e]=r}(0,G.K)(c,"_class"),(0,G.K)(d,"isEol"),(0,G.K)(u,"isWhiteSpace"),(0,G.K)(g,"isWsOrEol"),(0,G.K)(p,"isFlowIndicator"),(0,G.K)(f,"fromHexCode"),(0,G.K)(y,"escapedHexLen"),(0,G.K)(m,"fromDecimalCode"),(0,G.K)(C,"simpleEscapeSequence"),(0,G.K)(x,"charFromCodepoint"),(0,G.K)(b,"setProperty");let k=Array(256),w=Array(256);for(let t=0;t<256;t++)k[t]=+!!C(t),w[t]=C(t);function B(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||i,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.maxDepth="number"==typeof e.maxDepth?e.maxDepth:100,this.maxTotalMergeKeys="number"==typeof e.maxTotalMergeKeys?e.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}function T(t,i){let o={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return o.snippet=r(o),new e(i,o)}function S(t,e){throw T(t,e)}function v(t,e){t.onWarning&&t.onWarning.call(null,T(t,e))}function _(t,e,r){let i=t.anchorMapTransactions;if(0!==i.length){let r=i[i.length-1];o.call(r,e)||(r[e]={existed:o.call(t.anchorMap,e),value:t.anchorMap[e]})}t.anchorMap[e]=r}function F(t){t.anchorMapTransactions.push(Object.create(null))}function L(t){let e=t.anchorMapTransactions.pop(),r=t.anchorMapTransactions;if(0===r.length)return;let i=r[r.length-1],a=Object.keys(e);for(let t=0,r=a.length;t<r;t+=1){let r=a[t];o.call(i,r)||(i[r]=e[r])}}function A(t){let e=t.anchorMapTransactions.pop(),r=Object.keys(e);for(let i=r.length-1;i>=0;i-=1){let o=e[r[i]];o.existed?t.anchorMap[r[i]]=o.value:delete t.anchorMap[r[i]]}}function M(t){return{position:t.position,line:t.line,lineStart:t.lineStart,lineIndent:t.lineIndent,firstTabInLine:t.firstTabInLine,tag:t.tag,anchor:t.anchor,kind:t.kind,result:t.result}}function $(t,e){t.position=e.position,t.line=e.line,t.lineStart=e.lineStart,t.lineIndent=e.lineIndent,t.firstTabInLine=e.firstTabInLine,t.tag=e.tag,t.anchor=e.anchor,t.kind=e.kind,t.result=e.result}(0,G.K)(B,"State"),(0,G.K)(T,"generateError"),(0,G.K)(S,"throwError"),(0,G.K)(v,"throwWarning"),(0,G.K)(_,"storeAnchor"),(0,G.K)(F,"beginAnchorTransaction"),(0,G.K)(L,"commitAnchorTransaction"),(0,G.K)(A,"rollbackAnchorTransaction"),(0,G.K)(M,"snapshotState"),(0,G.K)($,"restoreState");let E={YAML:(0,G.K)(function(t,e,r){null!==t.version&&S(t,"duplication of %YAML directive"),1!==r.length&&S(t,"YAML directive accepts exactly one argument");let i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]);null===i&&S(t,"ill-formed argument of the YAML directive");let o=parseInt(i[1],10),a=parseInt(i[2],10);1!==o&&S(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=a<2,1!==a&&2!==a&&v(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:(0,G.K)(function(t,e,r){let i;2!==r.length&&S(t,"TAG directive accepts exactly two arguments");let a=r[0];i=r[1],l.test(a)||S(t,"ill-formed tag handle (first argument) of the TAG directive"),o.call(t.tagMap,a)&&S(t,'there is a previously declared suffix for "'+a+'" tag handle'),h.test(i)||S(t,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch(e){S(t,"tag prefix is malformed: "+i)}t.tagMap[a]=i},"handleTagDirective")};function K(t,e,r,i){if(e<r){let o=t.input.slice(e,r);if(i)for(let e=0,r=o.length;e<r;e+=1){let r=o.charCodeAt(e);9===r||r>=32&&r<=1114111||S(t,"expected valid JSON character")}else a.test(o)&&S(t,"the stream contains non-printable characters");t.result+=o}}function O(e,r,i,a){t.isObject(i)||S(e,"cannot merge mappings; the provided source object is unacceptable");let s=Object.keys(i);for(let t=0,n=s.length;t<n;t+=1){let n=s[t];-1!==e.maxTotalMergeKeys&&++e.totalMergeKeys>e.maxTotalMergeKeys&&S(e,"merge keys exceeded maxTotalMergeKeys ("+e.maxTotalMergeKeys+")"),o.call(r,n)||(b(r,n,i[n]),a[n]=!0)}}function D(t,e,r,i,a,s,n,l,h){if(Array.isArray(a)){a=Array.prototype.slice.call(a);for(let e=0,r=a.length;e<r;e+=1)Array.isArray(a[e])&&S(t,"nested arrays are not supported inside keys"),"object"==typeof a&&"[object Object]"===c(a[e])&&(a[e]="[object Object]")}if("object"==typeof a&&"[object Object]"===c(a)&&(a="[object Object]"),a=String(a),null===e&&(e={}),"tag:yaml.org,2002:merge"===i)if(Array.isArray(s))for(let i=0,o=s.length;i<o;i+=1)O(t,e,s[i],r);else O(t,e,s,r);else!t.json&&!o.call(r,a)&&o.call(e,a)&&(t.line=n||t.line,t.lineStart=l||t.lineStart,t.position=h||t.position,S(t,"duplicated mapping key")),b(e,a,s),delete r[a];return e}function q(t){let e=t.input.charCodeAt(t.position);10===e?t.position++:13===e?(t.position++,10===t.input.charCodeAt(t.position)&&t.position++):S(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function I(t,e,r){let i=0,o=t.input.charCodeAt(t.position);for(;0!==o;){for(;u(o);)9===o&&-1===t.firstTabInLine&&(t.firstTabInLine=t.position),o=t.input.charCodeAt(++t.position);if(e&&35===o)do o=t.input.charCodeAt(++t.position);while(10!==o&&13!==o&&0!==o)if(d(o))for(q(t),o=t.input.charCodeAt(t.position),i++,t.lineIndent=0;32===o;)t.lineIndent++,o=t.input.charCodeAt(++t.position);else break}return -1!==r&&0!==i&&t.lineIndent<r&&v(t,"deficient indentation"),i}function P(t){let e=t.position,r=t.input.charCodeAt(e);return!!((45===r||46===r)&&r===t.input.charCodeAt(e+1)&&r===t.input.charCodeAt(e+2)&&(e+=3,0===(r=t.input.charCodeAt(e))||g(r)))||!1}function W(e,r){1===r?e.result+=" ":r>1&&(e.result+=t.repeat("\n",r-1))}function z(t,e,r){let i,o,a,s,n,l,h=t.kind,c=t.result,f=t.input.charCodeAt(t.position);if(g(f)||p(f)||35===f||38===f||42===f||33===f||124===f||62===f||39===f||34===f||37===f||64===f||96===f)return!1;if(63===f||45===f){let e=t.input.charCodeAt(t.position+1);if(g(e)||r&&p(e))return!1}for(t.kind="scalar",t.result="",i=o=t.position,a=!1;0!==f;){if(58===f){let e=t.input.charCodeAt(t.position+1);if(g(e)||r&&p(e))break}else if(35===f){if(g(t.input.charCodeAt(t.position-1)))break}else if(t.position===t.lineStart&&P(t)||r&&p(f))break;else if(d(f)){if(s=t.line,n=t.lineStart,l=t.lineIndent,I(t,!1,-1),t.lineIndent>=e){a=!0,f=t.input.charCodeAt(t.position);continue}t.position=o,t.line=s,t.lineStart=n,t.lineIndent=l;break}a&&(K(t,i,o,!1),W(t,t.line-s),i=o=t.position,a=!1),u(f)||(o=t.position+1),f=t.input.charCodeAt(++t.position)}return K(t,i,o,!1),!!t.result||(t.kind=h,t.result=c,!1)}function R(t,e){let r,i,o=t.input.charCodeAt(t.position);if(39!==o)return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;0!==(o=t.input.charCodeAt(t.position));)if(39===o){if(K(t,r,t.position,!0),39!==(o=t.input.charCodeAt(++t.position)))return!0;r=t.position,t.position++,i=t.position}else d(o)?(K(t,r,i,!0),W(t,I(t,!1,e)),r=i=t.position):t.position===t.lineStart&&P(t)?S(t,"unexpected end of the document within a single quoted scalar"):(t.position++,u(o)||(i=t.position));S(t,"unexpected end of the stream within a single quoted scalar")}function j(t,e){let r,i,o,a=t.input.charCodeAt(t.position);if(34!==a)return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;0!==(a=t.input.charCodeAt(t.position));)if(34===a)return K(t,r,t.position,!0),t.position++,!0;else if(92===a){if(K(t,r,t.position,!0),d(a=t.input.charCodeAt(++t.position)))I(t,!1,e);else if(a<256&&k[a])t.result+=w[a],t.position++;else if((o=y(a))>0){let e=o,r=0;for(;e>0;e--)(o=f(a=t.input.charCodeAt(++t.position)))>=0?r=(r<<4)+o:S(t,"expected hexadecimal character");t.result+=x(r),t.position++}else S(t,"unknown escape sequence");r=i=t.position}else d(a)?(K(t,r,i,!0),W(t,I(t,!1,e)),r=i=t.position):t.position===t.lineStart&&P(t)?S(t,"unexpected end of the document within a double quoted scalar"):(t.position++,u(a)||(i=t.position));S(t,"unexpected end of the stream within a double quoted scalar")}function N(t,e){let r,i,o,a,s,n,l,h,c,d,u,p=!0,f=t.tag,y=t.anchor,m=Object.create(null),C=t.input.charCodeAt(t.position);if(91===C)s=93,h=!1,a=[];else{if(123!==C)return!1;s=125,h=!0,a={}}for(null!==t.anchor&&_(t,t.anchor,a),C=t.input.charCodeAt(++t.position);0!==C;){if(I(t,!0,e),(C=t.input.charCodeAt(t.position))===s)return t.position++,t.tag=f,t.anchor=y,t.kind=h?"mapping":"sequence",t.result=a,!0;p?44===C&&S(t,"expected the node content, but found ','"):S(t,"missed comma between flow collection entries"),d=c=u=null,n=l=!1,63===C&&g(t.input.charCodeAt(t.position+1))&&(n=l=!0,t.position++,I(t,!0,e)),r=t.line,i=t.lineStart,o=t.position,to(t,e,1,!1,!0),d=t.tag,c=t.result,I(t,!0,e),C=t.input.charCodeAt(t.position),(l||t.line===r)&&58===C&&(n=!0,C=t.input.charCodeAt(++t.position),I(t,!0,e),to(t,e,1,!1,!0),u=t.result),h?D(t,a,m,d,c,u,r,i,o):n?a.push(D(t,null,m,d,c,u,r,i,o)):a.push(c),I(t,!0,e),44===(C=t.input.charCodeAt(t.position))?(p=!0,C=t.input.charCodeAt(++t.position)):p=!1}S(t,"unexpected end of the stream within a flow collection")}function H(e,r){let i,o,a=1,s=!1,n=!1,l=r,h=0,c=!1,g=e.input.charCodeAt(e.position);if(124===g)i=!1;else{if(62!==g)return!1;i=!0}for(e.kind="scalar",e.result="";0!==g;)if(43===(g=e.input.charCodeAt(++e.position))||45===g)1===a?a=43===g?3:2:S(e,"repeat of a chomping mode identifier");else if((o=m(g))>=0)0===o?S(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):n?S(e,"repeat of an indentation width identifier"):(l=r+o-1,n=!0);else break;if(u(g)){do g=e.input.charCodeAt(++e.position);while(u(g))if(35===g)do g=e.input.charCodeAt(++e.position);while(!d(g)&&0!==g)}for(;0!==g;){for(q(e),e.lineIndent=0,g=e.input.charCodeAt(e.position);(!n||e.lineIndent<l)&&32===g;)e.lineIndent++,g=e.input.charCodeAt(++e.position);if(!n&&e.lineIndent>l&&(l=e.lineIndent),d(g)){h++;continue}if(n||0!==l||S(e,"missing indentation for block scalar"),e.lineIndent<l){3===a?e.result+=t.repeat("\n",s?1+h:h):1===a&&s&&(e.result+="\n");break}i?u(g)?(c=!0,e.result+=t.repeat("\n",s?1+h:h)):c?(c=!1,e.result+=t.repeat("\n",h+1)):0===h?s&&(e.result+=" "):e.result+=t.repeat("\n",h):e.result+=t.repeat("\n",s?1+h:h),s=!0,n=!0,h=0;let r=e.position;for(;!d(g)&&0!==g;)g=e.input.charCodeAt(++e.position);K(e,r,e.position,!1)}return!0}function Y(t,e){let r=t.tag,i=t.anchor,o=[],a=!1;if(-1!==t.firstTabInLine)return!1;null!==t.anchor&&_(t,t.anchor,o);let s=t.input.charCodeAt(t.position);for(;0!==s&&(-1!==t.firstTabInLine&&(t.position=t.firstTabInLine,S(t,"tab characters must not be used in indentation")),45===s&&g(t.input.charCodeAt(t.position+1)));){if(a=!0,t.position++,I(t,!0,-1)&&t.lineIndent<=e){o.push(null),s=t.input.charCodeAt(t.position);continue}let r=t.line;if(to(t,e,3,!1,!0),o.push(t.result),I(t,!0,-1),s=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&0!==s)S(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return!!a&&(t.tag=r,t.anchor=i,t.kind="sequence",t.result=o,!0)}function X(t,e,r){let i,o,a,s,n=t.tag,l=t.anchor,h={},c=Object.create(null),d=null,p=null,f=null,y=!1,m=!1;if(-1!==t.firstTabInLine)return!1;null!==t.anchor&&_(t,t.anchor,h);let C=t.input.charCodeAt(t.position);for(;0!==C;){y||-1===t.firstTabInLine||(t.position=t.firstTabInLine,S(t,"tab characters must not be used in indentation"));let x=t.input.charCodeAt(t.position+1),b=t.line;if((63===C||58===C)&&g(x))63===C?(y&&(D(t,h,c,d,p,null,o,a,s),d=p=f=null),m=!0,y=!0,i=!0):y?(y=!1,i=!0):S(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,C=x;else{if(o=t.line,a=t.lineStart,s=t.position,!to(t,r,2,!1,!0))break;if(t.line===b){for(C=t.input.charCodeAt(t.position);u(C);)C=t.input.charCodeAt(++t.position);if(58===C)g(C=t.input.charCodeAt(++t.position))||S(t,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(D(t,h,c,d,p,null,o,a,s),d=p=f=null),m=!0,y=!1,i=!1,d=t.tag,p=t.result;else{if(!m)return t.tag=n,t.anchor=l,!0;S(t,"can not read an implicit mapping pair; a colon is missed")}}else{if(!m)return t.tag=n,t.anchor=l,!0;S(t,"can not read a block mapping entry; a multiline key may not be an implicit key")}}if((t.line===b||t.lineIndent>e)&&(y&&(o=t.line,a=t.lineStart,s=t.position),to(t,e,4,!0,i)&&(y?p=t.result:f=t.result),y||(D(t,h,c,d,p,f,o,a,s),d=p=f=null),I(t,!0,-1),C=t.input.charCodeAt(t.position)),(t.line===b||t.lineIndent>e)&&0!==C)S(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return y&&D(t,h,c,d,p,null,o,a,s),m&&(t.tag=n,t.anchor=l,t.kind="mapping",t.result=h),m}function V(t){let e,r,i=!1,a=!1,s=t.input.charCodeAt(t.position);if(33!==s)return!1;null!==t.tag&&S(t,"duplication of a tag property"),60===(s=t.input.charCodeAt(++t.position))?(i=!0,s=t.input.charCodeAt(++t.position)):33===s?(a=!0,e="!!",s=t.input.charCodeAt(++t.position)):e="!";let c=t.position;if(i){do s=t.input.charCodeAt(++t.position);while(0!==s&&62!==s)t.position<t.length?(r=t.input.slice(c,t.position),s=t.input.charCodeAt(++t.position)):S(t,"unexpected end of the stream within a verbatim tag")}else{for(;0!==s&&!g(s);)33===s&&(a?S(t,"tag suffix cannot contain exclamation marks"):(e=t.input.slice(c-1,t.position+1),l.test(e)||S(t,"named tag handle cannot contain such characters"),a=!0,c=t.position+1)),s=t.input.charCodeAt(++t.position);r=t.input.slice(c,t.position),n.test(r)&&S(t,"tag suffix cannot contain flow indicator characters")}r&&!h.test(r)&&S(t,"tag name cannot contain such characters: "+r);try{r=decodeURIComponent(r)}catch(e){S(t,"tag name is malformed: "+r)}return i?t.tag=r:o.call(t.tagMap,e)?t.tag=t.tagMap[e]+r:"!"===e?t.tag="!"+r:"!!"===e?t.tag="tag:yaml.org,2002:"+r:S(t,'undeclared tag handle "'+e+'"'),!0}function Z(t){let e=t.input.charCodeAt(t.position);if(38!==e)return!1;null!==t.anchor&&S(t,"duplication of an anchor property"),e=t.input.charCodeAt(++t.position);let r=t.position;for(;0!==e&&!g(e)&&!p(e);)e=t.input.charCodeAt(++t.position);return t.position===r&&S(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(r,t.position),!0}function J(t){let e=t.input.charCodeAt(t.position);if(42!==e)return!1;e=t.input.charCodeAt(++t.position);let r=t.position;for(;0!==e&&!g(e)&&!p(e);)e=t.input.charCodeAt(++t.position);t.position===r&&S(t,"name of an alias node must contain at least one character");let i=t.input.slice(r,t.position);return o.call(t.anchorMap,i)||S(t,'unidentified alias "'+i+'"'),t.result=t.anchorMap[i],I(t,!0,-1),!0}function ti(t,e,r,i){let o=M(t);return(F(t),$(t,e),t.tag=null,t.anchor=null,t.kind=null,t.result=null,X(t,r,i)&&"mapping"===t.kind)?(L(t),!0):(A(t),$(t,o),!1)}function to(t,e,r,i,a){let s,n,l,h,c,d=1,u=!1,g=!1,p=null;t.depth>=t.maxDepth&&S(t,"nesting exceeded maxDepth ("+t.maxDepth+")"),t.depth+=1,null!==t.listener&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null;let f=s=n=4===r||3===r;if(i&&I(t,!0,-1)&&(u=!0,t.lineIndent>e?d=1:t.lineIndent===e?d=0:t.lineIndent<e&&(d=-1)),1===d)for(;;){let r=t.input.charCodeAt(t.position),i=M(t);if(u&&(33===r&&null!==t.tag||38===r&&null!==t.anchor)||!V(t)&&!Z(t))break;null===p&&(p=i),I(t,!0,-1)?(u=!0,n=f,t.lineIndent>e?d=1:t.lineIndent===e?d=0:t.lineIndent<e&&(d=-1)):n=!1}if(n&&(n=u||a),1===d||4===r)if(h=1===r||2===r?e:e+1,c=t.position-t.lineStart,1===d)if(n&&(Y(t,c)||X(t,c,h))||N(t,h))g=!0;else{let e=t.input.charCodeAt(t.position);null!==p&&f&&!n&&124!==e&&62!==e&&ti(t,p,p.position-p.lineStart,h)||s&&H(t,h)||R(t,h)||j(t,h)?g=!0:J(t)?(g=!0,(null!==t.tag||null!==t.anchor)&&S(t,"alias node should not have any properties")):z(t,h,1===r)&&(g=!0,null===t.tag&&(t.tag="?")),null!==t.anchor&&_(t,t.anchor,t.result)}else 0===d&&(g=n&&Y(t,c));if(null===t.tag)null!==t.anchor&&_(t,t.anchor,t.result);else if("?"===t.tag){null!==t.result&&"scalar"!==t.kind&&S(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"');for(let e=0,r=t.implicitTypes.length;e<r;e+=1)if((l=t.implicitTypes[e]).resolve(t.result)){t.result=l.construct(t.result),t.tag=l.tag,null!==t.anchor&&_(t,t.anchor,t.result);break}}else if("!"!==t.tag){if(o.call(t.typeMap[t.kind||"fallback"],t.tag))l=t.typeMap[t.kind||"fallback"][t.tag];else{l=null;let e=t.typeMap.multi[t.kind||"fallback"];for(let r=0,i=e.length;r<i;r+=1)if(t.tag.slice(0,e[r].tag.length)===e[r].tag){l=e[r];break}}l||S(t,"unknown tag !<"+t.tag+">"),null!==t.result&&l.kind!==t.kind&&S(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+l.kind+'", not "'+t.kind+'"'),l.resolve(t.result,t.tag)?(t.result=l.construct(t.result,t.tag),null!==t.anchor&&_(t,t.anchor,t.result)):S(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),t.depth-=1,null!==t.tag||null!==t.anchor||g}function ta(t){let e,r=t.position,i=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(e=t.input.charCodeAt(t.position))&&(I(t,!0,-1),e=t.input.charCodeAt(t.position),!(t.lineIndent>0)&&37===e);){i=!0,e=t.input.charCodeAt(++t.position);let r=t.position;for(;0!==e&&!g(e);)e=t.input.charCodeAt(++t.position);let a=t.input.slice(r,t.position),s=[];for(a.length<1&&S(t,"directive name must not be less than one character in length");0!==e;){for(;u(e);)e=t.input.charCodeAt(++t.position);if(35===e){do e=t.input.charCodeAt(++t.position);while(0!==e&&!d(e))break}if(d(e))break;for(r=t.position;0!==e&&!g(e);)e=t.input.charCodeAt(++t.position);s.push(t.input.slice(r,t.position))}0!==e&&q(t),o.call(E,a)?E[a](t,a,s):v(t,'unknown document directive "'+a+'"')}if(I(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,I(t,!0,-1)):i&&S(t,"directives end mark is expected"),to(t,t.lineIndent-1,4,!1,!0),I(t,!0,-1),t.checkLineBreaks&&s.test(t.input.slice(r,t.position))&&v(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&P(t)){46===t.input.charCodeAt(t.position)&&(t.position+=3,I(t,!0,-1));return}t.position<t.length-1&&S(t,"end of the stream or a document separator is expected")}function ts(t,e){t=String(t),e=e||{},0!==t.length&&(10!==t.charCodeAt(t.length-1)&&13!==t.charCodeAt(t.length-1)&&(t+="\n"),65279===t.charCodeAt(0)&&(t=t.slice(1)));let r=new B(t,e),i=t.indexOf("\0");for(-1!==i&&(r.position=i,S(r,"null byte is not allowed in input")),r.input+="\0";32===r.input.charCodeAt(r.position);)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)ta(r);return r.documents}function tn(t,e,r){null!==e&&"object"==typeof e&&void 0===r&&(r=e,e=null);let i=ts(t,r);if("function"!=typeof e)return i;for(let t=0,r=i.length;t<r;t+=1)e(i[t])}function tl(t,r){let i=ts(t,r);if(0!==i.length){if(1===i.length)return i[0];throw new e("expected a single document in the stream, but found more")}}return(0,G.K)(K,"captureSegment"),(0,G.K)(O,"mergeMappings"),(0,G.K)(D,"storeMappingPair"),(0,G.K)(q,"readLineBreak"),(0,G.K)(I,"skipSeparationSpace"),(0,G.K)(P,"testDocumentSeparator"),(0,G.K)(W,"writeFoldedLines"),(0,G.K)(z,"readPlainScalar"),(0,G.K)(R,"readSingleQuotedScalar"),(0,G.K)(j,"readDoubleQuotedScalar"),(0,G.K)(N,"readFlowCollection"),(0,G.K)(H,"readBlockScalar"),(0,G.K)(Y,"readBlockSequence"),(0,G.K)(X,"readBlockMapping"),(0,G.K)(V,"readTagProperty"),(0,G.K)(Z,"readAnchorProperty"),(0,G.K)(J,"readAlias"),(0,G.K)(ti,"tryReadBlockMappingFromProperty"),(0,G.K)(to,"composeNode"),(0,G.K)(ta,"readDocument"),(0,G.K)(ts,"loadDocuments"),(0,G.K)(tn,"loadAll2"),(0,G.K)(tl,"load2"),Q.loadAll=tn,Q.load=tl,Q}(0,G.K)(tt,"requireCommon"),(0,G.K)(te,"requireException"),(0,G.K)(tr,"requireSnippet"),(0,G.K)(ti,"requireType"),(0,G.K)(to,"requireSchema"),(0,G.K)(ta,"requireStr"),(0,G.K)(ts,"requireSeq"),(0,G.K)(tn,"requireMap"),(0,G.K)(tl,"requireFailsafe"),(0,G.K)(th,"require_null"),(0,G.K)(tc,"requireBool"),(0,G.K)(td,"requireInt"),(0,G.K)(tu,"requireFloat"),(0,G.K)(tg,"requireJson"),(0,G.K)(tp,"requireCore"),(0,G.K)(tf,"requireTimestamp"),(0,G.K)(ty,"requireMerge"),(0,G.K)(tm,"requireBinary"),(0,G.K)(tC,"requireOmap"),(0,G.K)(tx,"requirePairs"),(0,G.K)(tb,"requireSet"),(0,G.K)(tk,"require_default"),(0,G.K)(tw,"requireLoader");var tB={};function tT(){if(Y)return tB;Y=1;let t=tt(),e=te(),r=tk(),i=Object.prototype.toString,o=Object.prototype.hasOwnProperty,a={};a[0]="\\0",a[7]="\\a",a[8]="\\b",a[9]="\\t",a[10]="\\n",a[11]="\\v",a[12]="\\f",a[13]="\\r",a[27]="\\e",a[34]='\\"',a[92]="\\\\",a[133]="\\N",a[160]="\\_",a[8232]="\\L",a[8233]="\\P";let s=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],n=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function l(t,e){if(null===e)return{};let r={},i=Object.keys(e);for(let a=0,s=i.length;a<s;a+=1){let s=i[a],n=String(e[s]);"!!"===s.slice(0,2)&&(s="tag:yaml.org,2002:"+s.slice(2));let l=t.compiledTypeMap.fallback[s];l&&o.call(l.styleAliases,n)&&(n=l.styleAliases[n]),r[s]=n}return r}function h(r){let i,o,a=r.toString(16).toUpperCase();if(r<=255)i="x",o=2;else if(r<=65535)i="u",o=4;else if(r<=0xffffffff)i="U",o=8;else throw new e("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+i+t.repeat("0",o-a.length)+a}function c(e){this.schema=e.schema||r,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=t.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=l(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?2:1,this.forceQuotes=e.forceQuotes||!1,this.replacer="function"==typeof e.replacer?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function d(e,r){let i=t.repeat(" ",r),o=0,a="",s=e.length;for(;o<s;){let t,r=e.indexOf("\n",o);-1===r?(t=e.slice(o),o=s):(t=e.slice(o,r+1),o=r+1),t.length&&"\n"!==t&&(a+=i),a+=t}return a}function u(e,r){return"\n"+t.repeat(" ",e.indent*r)}function g(t,e){for(let r=0,i=t.implicitTypes.length;r<i;r+=1)if(t.implicitTypes[r].resolve(e))return!0;return!1}function p(t){return 32===t||9===t}function f(t){return t>=32&&t<=126||t>=161&&t<=55295&&8232!==t&&8233!==t||t>=57344&&t<=65533&&65279!==t||t>=65536&&t<=1114111}function y(t){return f(t)&&65279!==t&&13!==t&&10!==t}function m(t,e,r){let i=y(t),o=i&&!p(t);return(r?i:i&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t)&&35!==t&&!(58===e&&!o)||y(e)&&!p(e)&&35===t||58===e&&o}function C(t){return f(t)&&65279!==t&&!p(t)&&45!==t&&63!==t&&58!==t&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t&&35!==t&&38!==t&&42!==t&&33!==t&&124!==t&&61!==t&&62!==t&&39!==t&&34!==t&&37!==t&&64!==t&&96!==t}function x(t){return!p(t)&&58!==t}function b(t,e){let r,i=t.charCodeAt(e);return i>=55296&&i<=56319&&e+1<t.length&&(r=t.charCodeAt(e+1))>=56320&&r<=57343?(i-55296)*1024+r-56320+65536:i}function k(t){return/^\n* /.test(t)}function w(t,e,r,i,o,a,s,n){let l,h=0,c=null,d=!1,u=!1,g=-1!==i,p=-1,y=C(b(t,0))&&x(b(t,t.length-1));if(e||s)for(l=0;l<t.length;h>=65536?l+=2:l++){if(!f(h=b(t,l)))return 5;y=y&&m(h,c,n),c=h}else{for(l=0;l<t.length;h>=65536?l+=2:l++){if(10===(h=b(t,l)))d=!0,g&&(u=u||l-p-1>i&&" "!==t[p+1],p=l);else if(!f(h))return 5;y=y&&m(h,c,n),c=h}u=u||g&&l-p-1>i&&" "!==t[p+1]}return d||u?r>9&&k(t)?5:s?2===a?5:2:u?4:3:!y||s||o(t)?2===a?5:2:1}function B(t,r,i,o,a){t.dump=function(){if(0===r.length)return 2===t.quotingType?'""':"''";if(!t.noCompatMode&&(-1!==s.indexOf(r)||n.test(r)))return 2===t.quotingType?'"'+r+'"':"'"+r+"'";let l=t.indent*Math.max(1,i),h=-1===t.lineWidth?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-l),c=o||t.flowLevel>-1&&i>=t.flowLevel;function u(e){return g(t,e)}switch((0,G.K)(u,"testAmbiguity"),w(r,c,t.indent,h,u,t.quotingType,t.forceQuotes&&!o,a)){case 1:return r;case 2:return"'"+r.replace(/'/g,"''")+"'";case 3:return"|"+T(r,t.indent)+S(d(r,l));case 4:return">"+T(r,t.indent)+S(d(v(r,h),l));case 5:return'"'+F(r)+'"';default:throw new e("impossible error: invalid scalar style")}}()}function T(t,e){let r=k(t)?String(e):"",i="\n"===t[t.length-1];return r+(i&&("\n"===t[t.length-2]||"\n"===t)?"+":i?"":"-")+"\n"}function S(t){return"\n"===t[t.length-1]?t.slice(0,-1):t}function v(t,e){let r,i,o,a=/(\n+)([^\n]*)/g,s=(a.lastIndex=o=-1!==(o=t.indexOf("\n"))?o:t.length,_(t.slice(0,o),e)),n="\n"===t[0]||" "===t[0];for(;i=a.exec(t);){let t=i[1],o=i[2];r=" "===o[0],s+=t+(n||r||""===o?"":"\n")+_(o,e),n=r}return s}function _(t,e){let r,i;if(""===t||" "===t[0])return t;let o=/ [^ ]/g,a=0,s=0,n=0,l="";for(;r=o.exec(t);)(n=r.index)-a>e&&(i=s>a?s:n,l+="\n"+t.slice(a,i),a=i+1),s=n;return l+="\n",t.length-a>e&&s>a?l+=t.slice(a,s)+"\n"+t.slice(s+1):l+=t.slice(a),l.slice(1)}function F(t){let e="",r=0;for(let i=0;i<t.length;r>=65536?i+=2:i++){let o=a[r=b(t,i)];!o&&f(r)?(e+=t[i],r>=65536&&(e+=t[i+1])):e+=o||h(r)}return e}function L(t,e,r){let i="",o=t.tag;for(let o=0,a=r.length;o<a;o+=1){let a=r[o];t.replacer&&(a=t.replacer.call(r,String(o),a)),(K(t,e,a,!1,!1)||void 0===a&&K(t,e,null,!1,!1))&&(""!==i&&(i+=","+(t.condenseFlow?"":" ")),i+=t.dump)}t.tag=o,t.dump="["+i+"]"}function A(t,e,r,i){let o="",a=t.tag;for(let a=0,s=r.length;a<s;a+=1){let s=r[a];t.replacer&&(s=t.replacer.call(r,String(a),s)),(K(t,e+1,s,!0,!0,!1,!0)||void 0===s&&K(t,e+1,null,!0,!0,!1,!0))&&(i&&""===o||(o+=u(t,e)),t.dump&&10===t.dump.charCodeAt(0)?o+="-":o+="- ",o+=t.dump)}t.tag=a,t.dump=o||"[]"}function M(t,e,r){let i="",o=t.tag,a=Object.keys(r);for(let o=0,s=a.length;o<s;o+=1){let s="";""!==i&&(s+=", "),t.condenseFlow&&(s+='"');let n=a[o],l=r[n];t.replacer&&(l=t.replacer.call(r,n,l)),K(t,e,n,!1,!1)&&(t.dump.length>1024&&(s+="? "),s+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),K(t,e,l,!1,!1)&&(s+=t.dump,i+=s))}t.tag=o,t.dump="{"+i+"}"}function $(t,r,i,o){let a="",s=t.tag,n=Object.keys(i);if(!0===t.sortKeys)n.sort();else if("function"==typeof t.sortKeys)n.sort(t.sortKeys);else if(t.sortKeys)throw new e("sortKeys must be a boolean or a function");for(let e=0,s=n.length;e<s;e+=1){let s="";o&&""===a||(s+=u(t,r));let l=n[e],h=i[l];if(t.replacer&&(h=t.replacer.call(i,l,h)),!K(t,r+1,l,!0,!0,!0))continue;let c=null!==t.tag&&"?"!==t.tag||t.dump&&t.dump.length>1024;c&&(t.dump&&10===t.dump.charCodeAt(0)?s+="?":s+="? "),s+=t.dump,c&&(s+=u(t,r)),K(t,r+1,h,!0,c)&&(t.dump&&10===t.dump.charCodeAt(0)?s+=":":s+=": ",s+=t.dump,a+=s)}t.tag=s,t.dump=a||"{}"}function E(t,r,a){let s=a?t.explicitTypes:t.implicitTypes;for(let n=0,l=s.length;n<l;n+=1){let l=s[n];if((l.instanceOf||l.predicate)&&(!l.instanceOf||"object"==typeof r&&r instanceof l.instanceOf)&&(!l.predicate||l.predicate(r))){if(a?l.multi&&l.representName?t.tag=l.representName(r):t.tag=l.tag:t.tag="?",l.represent){let a,s=t.styleMap[l.tag]||l.defaultStyle;if("[object Function]"===i.call(l.represent))a=l.represent(r,s);else if(o.call(l.represent,s))a=l.represent[s](r,s);else throw new e("!<"+l.tag+'> tag resolver accepts not "'+s+'" style');t.dump=a}return!0}}return!1}function K(t,r,o,a,s,n,l){let h,c;t.tag=null,t.dump=o,E(t,o,!1)||E(t,o,!0);let d=i.call(t.dump),u=a;a&&(a=t.flowLevel<0||t.flowLevel>r);let g="[object Object]"===d||"[object Array]"===d;if(g&&(c=-1!==(h=t.duplicates.indexOf(o))),(null!==t.tag&&"?"!==t.tag||c||2!==t.indent&&r>0)&&(s=!1),c&&t.usedDuplicates[h])t.dump="*ref_"+h;else{if(g&&c&&!t.usedDuplicates[h]&&(t.usedDuplicates[h]=!0),"[object Object]"===d)a&&0!==Object.keys(t.dump).length?($(t,r,t.dump,s),c&&(t.dump="&ref_"+h+t.dump)):(M(t,r,t.dump),c&&(t.dump="&ref_"+h+" "+t.dump));else if("[object Array]"===d)a&&0!==t.dump.length?(t.noArrayIndent&&!l&&r>0?A(t,r-1,t.dump,s):A(t,r,t.dump,s),c&&(t.dump="&ref_"+h+t.dump)):(L(t,r,t.dump),c&&(t.dump="&ref_"+h+" "+t.dump));else if("[object String]"===d)"?"!==t.tag&&B(t,t.dump,r,n,u);else{if("[object Undefined]"===d||t.skipInvalid)return!1;throw new e("unacceptable kind of an object to dump "+d)}if(null!==t.tag&&"?"!==t.tag){let e=encodeURI("!"===t.tag[0]?t.tag.slice(1):t.tag).replace(/!/g,"%21");e="!"===t.tag[0]?"!"+e:"tag:yaml.org,2002:"===e.slice(0,18)?"!!"+e.slice(18):"!<"+e+">",t.dump=e+" "+t.dump}}return!0}function O(t,e){let r=[],i=[];D(t,r,i);let o=i.length;for(let t=0;t<o;t+=1)e.duplicates.push(r[i[t]]);e.usedDuplicates=Array(o)}function D(t,e,r){if(null!==t&&"object"==typeof t){let i=e.indexOf(t);if(-1!==i)-1===r.indexOf(i)&&r.push(i);else if(e.push(t),Array.isArray(t))for(let i=0,o=t.length;i<o;i+=1)D(t[i],e,r);else{let i=Object.keys(t);for(let o=0,a=i.length;o<a;o+=1)D(t[i[o]],e,r)}}}function q(t,e){let r=new c(e=e||{});r.noRefs||O(t,r);let i=t;return(r.replacer&&(i=r.replacer.call({"":i},"",i)),K(r,0,i,!0,!0))?r.dump+"\n":""}return(0,G.K)(l,"compileStyleMap"),(0,G.K)(h,"encodeHex"),(0,G.K)(c,"State"),(0,G.K)(d,"indentString"),(0,G.K)(u,"generateNextLine"),(0,G.K)(g,"testImplicitResolving"),(0,G.K)(p,"isWhitespace"),(0,G.K)(f,"isPrintable"),(0,G.K)(y,"isNsCharOrWhitespace"),(0,G.K)(m,"isPlainSafe"),(0,G.K)(C,"isPlainSafeFirst"),(0,G.K)(x,"isPlainSafeLast"),(0,G.K)(b,"codePointAt"),(0,G.K)(k,"needIndentIndicator"),(0,G.K)(w,"chooseScalarStyle"),(0,G.K)(B,"writeScalar"),(0,G.K)(T,"blockHeader"),(0,G.K)(S,"dropEndingNewline"),(0,G.K)(v,"foldString"),(0,G.K)(_,"foldLine"),(0,G.K)(F,"escapeString"),(0,G.K)(L,"writeFlowSequence"),(0,G.K)(A,"writeBlockSequence"),(0,G.K)(M,"writeFlowMapping"),(0,G.K)($,"writeBlockMapping"),(0,G.K)(E,"detectType"),(0,G.K)(K,"writeNode"),(0,G.K)(O,"getDuplicateReferences"),(0,G.K)(D,"inspectNode"),(0,G.K)(q,"dump2"),tB.dump=q,tB}function tS(){if(X)return Z;X=1;let t=tw(),e=tT();function r(t,e){return function(){throw Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}}return(0,G.K)(r,"renamed"),Z.Type=ti(),Z.Schema=to(),Z.FAILSAFE_SCHEMA=tl(),Z.JSON_SCHEMA=tg(),Z.CORE_SCHEMA=tp(),Z.DEFAULT_SCHEMA=tk(),Z.load=t.load,Z.loadAll=t.loadAll,Z.dump=e.dump,Z.YAMLException=te(),Z.types={binary:tm(),float:tu(),map:tn(),null:th(),pairs:tx(),set:tb(),timestamp:tf(),bool:tc(),int:td(),merge:ty(),omap:tC(),seq:ts(),str:ta()},Z.safeLoad=r("safeLoad","load"),Z.safeLoadAll=r("safeLoadAll","loadAll"),Z.safeDump=r("safeDump","dump"),Z}(0,G.K)(tT,"requireDumper"),(0,G.K)(tS,"requireJsYaml");var{JSON_SCHEMA:tv,load:t_}=V(tS());r.d(e,{H:()=>t_,r:()=>tv})},iV(t,e,r){"use strict";var i=r("h5"),o=r("NH"),a=r("Yr"),s=r("M4"),n=r("Gt"),l=r("Vp"),h=r("pk"),c=r("El"),d="u">typeof performance&&"function"==typeof performance.now,u=(0,n.K)(()=>d?performance.now():0,"now"),g="🧜 ",p={parse:"tertiary",prepare:"secondary",measure:"primary",layout:"primary-dark",layoutCore:"error",draw:"primary-light",paint:"secondary-dark",serialize:"tertiary-dark",render:"primary-light"};function f(t,{markdownAutoWrap:e}){let r=t.replace(/<br\/>/g,"\n").replace(/\n{2,}/g,"\n");return(0,h.T)(r)}function y(t){return t.split(/\\n|\n|<br\s*\/?>/gi).map(t=>t.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(t=>({content:t,type:"normal"}))??[])}function m(t,e={}){let r=f(t,e),i=l.xI.lexer(r),o=[[]],a=0;function s(t,e="normal"){"text"===t.type?t.text.split("\n").forEach((t,r)=>{0!==r&&(a++,o.push([])),t.split(" ").forEach(t=>{(t=t.replace(/'/g,"'"))&&o[a].push({content:t,type:e})})}):"strong"===t.type||"em"===t.type?t.tokens.forEach(e=>{s(e,t.type)}):"html"===t.type&&o[a].push({content:t.text,type:"normal"})}return(0,n.K)(s,"processNode"),i.forEach(t=>{"paragraph"===t.type?t.tokens?.forEach(t=>{s(t)}):"html"===t.type?o[a].push({content:t.text,type:"normal"}):o[a].push({content:t.raw,type:"normal"})}),o}function C(t){return t?`<p>${t.replace(/\\n|\n/g,"<br />")}</p>`:""}function x(t,{markdownAutoWrap:e}={}){let r=l.xI.lexer(t);function i(t){if("text"===t.type)return!1===e?t.text.replace(/\n */g,"<br/>").replace(/ /g," "):t.text.replace(/\n */g,"<br/>");if("strong"===t.type)return`<strong>${t.tokens?.map(i).join("")}</strong>`;if("em"===t.type)return`<em>${t.tokens?.map(i).join("")}</em>`;if("paragraph"===t.type)return`<p>${t.tokens?.map(i).join("")}</p>`;if("space"===t.type)return"";else if("html"===t.type)return`${t.text}`;else if("escape"===t.type)return t.text;return s.R.warn(`Unsupported markdown: ${t.type}`),t.raw}return(0,n.K)(i,"output"),r.map(i).join("")}(class{constructor(){this.enabled=!1,this.autoPrint=!0,this.records=[],this.maxRecords=200,this.roots=[],this.stack=[],this.buckets={}}static{(0,n.K)(this,"Profiler")}enable(){return this.enabled=!0,this}disable(){return this.enabled=!1,this}start(t){this.enabled&&(this.roots=[],this.stack=[],this.buckets={},this.begin(t))}tickSync(t,e){if(!this.enabled)return e();let r=u();try{return e()}finally{this.buckets[t]=(this.buckets[t]??0)+(u()-r)}}async tick(t,e){if(!this.enabled)return e();let r=u();try{return await e()}finally{this.buckets[t]=(this.buckets[t]??0)+(u()-r)}}stop(){if(!this.enabled)return;for(;this.stack.length>0;)this.end();let t=this.roots.at(-1),e=this.runLabel??t?.name;return t&&(this.records.push({label:e??t.name,tree:t,buckets:{...this.buckets}}),this.records.length>this.maxRecords&&this.records.splice(0,this.records.length-this.maxRecords),this.autoPrint&&this.printSummary(t,e)),this.runLabel=void 0,t}begin(t){if(!this.enabled)return;let e={name:t,start:u(),duration:-1,children:[]},r=this.stack.at(-1);if(r?r.children.push(e):this.roots.push(e),this.stack.push(e),d&&"function"==typeof performance.mark)try{performance.mark(`${g}${t} ▶`)}catch{}}end(){if(!this.enabled)return;let t=this.stack.pop();if(!t)return;let e=u();if(t.duration=e-t.start,d&&"function"==typeof performance.measure)try{performance.measure(`${g}${t.name}`,{start:t.start,end:e,detail:{devtools:{dataType:"track-entry",track:"Mermaid render",trackGroup:"Mermaid",color:p[t.name]??"primary",tooltipText:`${t.name} — ${t.duration.toFixed(1)} ms`}}})}catch{}}async span(t,e){if(!this.enabled)return e();this.begin(t);try{return await e()}finally{this.end()}}report(){return this.records.at(-1)?.tree??this.roots.at(-1)}clear(){this.records.length=0,this.roots=[],this.stack=[],this.runLabel=void 0}reset(){this.roots=[],this.stack=[]}printSummary(t=this.report(),e){if(!t)return;let r=t.duration,i=e&&e!==t.name?`${t.name} [${e}]`:t.name,o=["ms % phase"],a=(0,n.K)((t,e)=>{let i=" ".repeat(e),s=t.duration.toFixed(1).padStart(8),n=r>0?`${(t.duration/r*100).toFixed(0).padStart(3)}%`:" -";for(let r of(o.push(`${s} ${n} ${i}${t.name}`),t.children))a(r,e+1);if(t.children.length>0){let e=t.children.reduce((t,e)=>t+e.duration,0),r=t.duration-e;if(r>.5){let t=r.toFixed(1).padStart(8);o.push(`${t} ${i} (self)`)}}},"walk");a(t,0);let s=Object.keys(this.buckets);if(s.length>0)for(let t of(o.push("—— buckets (summed) ——"),s))o.push(`${this.buckets[t].toFixed(1).padStart(8)} ${t}`);console.log(`${g}mermaid render profile \xb7 ${i}
|
|
64
|
-
${o.join("\n")}`)}}),globalThis.injected??={includeLargeFeatures:!0,profiling:!1,version:"0.0.0"},(0,n.K)(f,"preprocessMarkdown"),(0,n.K)(y,"nonMarkdownToLines"),(0,n.K)(m,"markdownToLines"),(0,n.K)(C,"nonMarkdownToHTML"),(0,n.K)(x,"markdownToHTML");var b=function(t){var e=function(){},r=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.msRequestAnimationFrame||function(t){return setTimeout(t,16)};function i(){this.reads=[],this.writes=[],this.raf=r.bind(t),e()}function o(t){t.scheduled||(t.scheduled=!0,t.raf(a.bind(null,t)),e())}function a(t){e();var r,i=t.writes,a=t.reads;try{e(a.length),t.runTasks(a),e(i.length),t.runTasks(i)}catch(t){r=t}if(t.scheduled=!1,(a.length||i.length)&&o(t),r)if(e(r.message),t.catch)t.catch(r);else throw r}function s(t,e){var r=t.indexOf(e);return!!~r&&!!t.splice(r,1)}function l(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])}return(0,n.K)(i,"FastDom"),i.prototype={constructor:i,runTasks:(0,n.K)(function(t){var r;for(e();r=t.shift();)r()},"runTasks"),measure:(0,n.K)(function(t,r){e();var i=r?t.bind(r):t;return this.reads.push(i),o(this),i},"measure"),mutate:(0,n.K)(function(t,r){e();var i=r?t.bind(r):t;return this.writes.push(i),o(this),i},"mutate"),clear:(0,n.K)(function(t){return e(),s(this.reads,t)||s(this.writes,t)},"clear"),extend:(0,n.K)(function(t){if(e(),"object"!=typeof t)throw Error("expected object");var r=Object.create(this);return l(r,t),r.fastdom=this,r.initialize&&r.initialize(),r},"extend"),catch:null},(0,n.K)(o,"scheduleFlush"),(0,n.K)(a,"flush"),(0,n.K)(s,"remove"),(0,n.K)(l,"mixin"),t.fastdom=t.fastdom||new i}("u">typeof window?window:globalThis),k={initialize:(0,n.K)(function(){this._tasks=new Map},"initialize"),mutate:(0,n.K)(function(t,e){return w(this,"mutate",t,e)},"mutate"),measure:(0,n.K)(function(t,e){return w(this,"measure",t,e)},"measure"),clear:(0,n.K)(function(t){var e=this._tasks,r=e.get(t);this.fastdom.clear(r),e.delete(t)},"clear")};function w(t,e,r,i){var o,a=t._tasks,s=t.fastdom,n=new Promise(function(t,l){o=s[e](function(){a.delete(n);try{t(i?r.call(i):r())}catch(t){l(t)}},i)});return a.set(n,o),n}(0,n.K)(w,"create");var{initialize:B,mutate:T,measure:S,clear:v}=k,_=b.extend({raf(t){"function"==typeof queueMicrotask?queueMicrotask(t):setTimeout(t,0)}}).extend(k);function F(t){return Intl.Segmenter?[...new Intl.Segmenter().segment(t)].map(t=>t.segment):[...t]}function L(t,e){return A(t,[],F(e.content),e.type)}function A(t,e,r,i){if(0===r.length)return[{content:e.join(""),type:i},{content:"",type:i}];let[o,...a]=r,s=[...e,o];return t([{content:s.join(""),type:i}])?A(t,s,a,i):(0===e.length&&o&&(e.push(o),r.shift()),[{content:e.join(""),type:i},{content:r.join(""),type:i}])}function M(t,e){if(t.some(({content:t})=>t.includes("\n")))throw Error("splitLineToFitWidth does not support newlines in the line");return $(t,e)}function $(t,e,r=[],i=[]){if(0===t.length)return i.length>0&&r.push(i),r.length>0?r:[];let o="";" "===t[0].content&&(o=" ",t.shift());let a=t.shift()??{content:" ",type:"normal"},s=[...i];if(""!==o&&s.push({content:o,type:"normal"}),s.push(a),e(s))return $(t,e,r,s);if(i.length>0)r.push(i),t.unshift(a);else if(a.content){let[i,o]=L(e,a);r.push([i]),o.content&&t.unshift(o)}return $(t,e,r)}function E(t,e){e&&t.attr("style",e)}async function K(t,e,r,i,o=!1,s=(0,a.zj)(),n=0){let l=t.append("foreignObject");l.attr("width",`${Math.min(10*r,16384)}px`),l.attr("height",`${Math.min(10*r,16384)}px`);let h=l.append("xhtml:div"),c=(0,a.Wi)(e.label)?await (0,a.dj)(e.label.replace(a.Y2.lineBreakRegex,"\n"),s):(0,a.jZ)(e.label,s),d=e.isNode?"nodeLabel":"edgeLabel",u=h.append("span");u.html(c),E(u,e.labelStyle),u.attr("class",`${d} ${i}`),E(h,e.labelStyle),h.style("display","table-cell"),h.style("white-space","nowrap"),h.style("line-height","1.5"),1/0!==r&&(h.style("max-width",r+"px"),h.style("text-align","center")),h.attr("xmlns","http://www.w3.org/1999/xhtml"),o&&h.attr("class","labelBkg");let g=await _.measure(()=>h.node().getBoundingClientRect());return g.width===r?(h.style("display","table"),h.style("white-space","break-spaces"),h.style("width",r+"px")):g.width<n&&(h.style("display","table"),h.style("width",n+"px"),h.style("text-align","center")),l.node()}function O(t,e,r,i=!1){let o=t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em");return i&&o.attr("text-anchor","middle"),o}function D(t,e,r){let i=t.append("text"),o=O(i,1,e);W(o,r);let a=o.node().getComputedTextLength();return i.remove(),a}function q(t,e,r){let i=t.append("text"),o=O(i,1,e);W(o,[{content:r,type:"normal"}]);let a=o.node()?.getBoundingClientRect();return a&&i.remove(),a}function I(t,e,r,i=!1,o=!1){let a=e.append("g"),s=a.insert("rect").attr("class","background").attr("style","stroke: none"),l=a.append("text").attr("y","-10.1");o&&l.attr("text-anchor","middle");let h=0;for(let e of r){let r=(0,n.K)(e=>D(a,1.1,e)<=t,"checkWidth");for(let t of r(e)?[e]:M(e,r))W(O(l,h,1.1,o),t),h++}if(!i)return l.node();{let t=l.node().getBBox();return s.attr("x",t.x-2).attr("y",t.y-2).attr("width",t.width+4).attr("height",t.height+4),a.node()}}function P(t){return t.replace(/&(amp|lt|gt);/g,(t,e)=>{switch(e){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return t}})}function W(t,e){t.text(""),e.forEach((e,r)=>{let i=t.append("tspan").attr("font-style","em"===e.type?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight","strong"===e.type?"bold":"normal");0===r?i.text(P(e.content)):i.text(" "+P(e.content))})}async function z(t,e={}){let r=[];t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(t,o,s)=>(r.push((async()=>{let r=`${o}:${s}`;return await (0,i.dn)(r)?await (0,i.WY)(r,void 0,{class:"label-icon"}):`<i class='${(0,a.jZ)(t,e).replace(":"," ")}'></i>`})()),t));let o=await Promise.all(r);return t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>o.shift()??"")}(0,n.K)(F,"splitTextToChars"),(0,n.K)(L,"splitWordToFitWidth"),(0,n.K)(A,"splitWordToFitWidthRecursion"),(0,n.K)(M,"splitLineToFitWidth"),(0,n.K)($,"splitLineToFitWidthRecursion"),(0,n.K)(E,"applyStyle"),(0,n.K)(K,"addHtmlSpan"),(0,n.K)(O,"createTspan"),(0,n.K)(D,"computeWidthOfText"),(0,n.K)(q,"computeDimensionOfText"),(0,n.K)(I,"createFormattedText"),(0,n.K)(P,"decodeHTMLEntities"),(0,n.K)(W,"updateTextContentAndStyles"),(0,n.K)(z,"replaceIconSubstring");var R=(0,n.K)(async(t,e="",{style:r="",isTitle:i=!1,classes:n="",useHtmlLabels:l=!0,markdown:h=!0,isNode:d=!0,width:u=200,minWidth:g=0,addSvgBackground:p=!1}={},f)=>{if(s.R.debug("XYZ createText",e,r,i,n,l,d,"addSvgBackground: ",p),l){let i=h?x(e,f):C(e),s=await z((0,o.Sm)(i),f),l=e.replace(/\\\\/g,"\\"),c={isNode:d,label:(0,a.Wi)(e)?l:s,labelStyle:r.replace("fill:","color:")};return await K(t,c,u,n,p,f,g)}{let a=(0,o.Sm)(e.replace(/<br\s*\/?>/g,"<br/>")),s=I(u,t,h?m(a.replace("<br>","<br/>"),f):y(a),!!e&&p,!d);if(d){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));let t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");(0,c.Ltv)(s).attr("style",t)}else{let t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");(0,c.Ltv)(s).select("rect").attr("style",t.replace(/background:/g,"fill:"));let e=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");(0,c.Ltv)(s).select("text").attr("style",e)}return i?(0,c.Ltv)(s).selectAll("tspan.text-outer-tspan").classed("title-row",!0):(0,c.Ltv)(s).selectAll("tspan.text-outer-tspan").classed("row",!0),s}},"createText");r.d(e,{GZ:()=>R,O6:()=>m,W6:()=>q,lT:()=>_})},Yr(t,e,r){"use strict";let i;r.d(e,{C0:()=>k,xA:()=>tM,hH:()=>F,Dl:()=>t7,IU:()=>ey,Wt:()=>ed,Y2:()=>ee,a$:()=>eo,KG:()=>en,sb:()=>td,ME:()=>e_,UI:()=>to,Ch:()=>B,mW:()=>w,DB:()=>C,_3:()=>ty,EJ:()=>m,m7:()=>eb,iN:()=>eC,zj:()=>tL,D7:()=>eS,Gs:()=>eE,J$:()=>v,ab:()=>ew,E:()=>tI,Q2:()=>t_,P$:()=>q,ID:()=>tQ,TM:()=>tq,Wi:()=>t8,H1:()=>tP,QO:()=>t1,Js:()=>e$,Xd:()=>T,dj:()=>et,cL:()=>t$,Df:()=>tc,$i:()=>th,jZ:()=>tU,oB:()=>eF,wZ:()=>tS,EI:()=>ex,SV:()=>em,Nk:()=>tF,XV:()=>ev,yj:()=>tB,ke:()=>ek,UU:()=>tT,ot:()=>ea,mj:()=>eL,tM:()=>ec,H$:()=>J,B6:()=>tv});var o,a,s=r("M4"),n=r("Gt"),l=r("ja"),h=r("UI"),c=(t,e)=>{let r=l.A.parse(t),i={};for(let t in e)e[t]&&(i[t]=r[t]+e[t]);return(0,h.A)(t,i)},d=r("Cv"),u=(t,e=100)=>{let r=l.A.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,((t,e,r=50)=>{let{r:i,g:o,b:a,a:s}=l.A.parse(t),{r:n,g:h,b:c,a:u}=l.A.parse(e),g=r/100,p=2*g-1,f=s-u,y=((p*f==-1?p:(p+f)/(1+p*f))+1)/2,m=1-y;return(0,d.A)(i*y+n*m,o*y+h*m,a*y+c*m,s*g+u*(1-g))})(r,t,e)},g=r("xh"),p=r("CM"),f=r("HAv"),y=r("Lu"),m=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,C=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,x=/\s/,b=(0,n.K)(t=>{let e="",r=0,i=0;for(;i<t.length;){let o=t.indexOf("%%",i);if(-1===o)break;let a=t.indexOf("\n",o);if(-1===a)break;let s=o;for(;s>r&&x.test(t[s-1]);)s--;e+=t.slice(r,s)+"\n",i=r=a+1}return e+t.slice(r)},"stripAnyComments"),k=class extends Error{static{(0,n.K)(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}},w={},B=(0,n.K)(function(t,e){for(let[r,{detector:i}]of(t=b(t.replace(m,"").replace(C,"")),Object.entries(w)))if(i(t,e))return r;throw new k(`No diagram type detected matching given configuration for text: ${t}`)},"detectType"),T=(0,n.K)((...t)=>{for(let{id:e,detector:r,loader:i}of t)S(e,r,i)},"registerLazyLoadedDiagrams"),S=(0,n.K)((t,e,r)=>{w[t]&&s.R.warn(`Detector with key ${t} already exists. Overwriting.`),w[t]={detector:e,loader:r},s.R.debug(`Detector with key ${t} added${r?" with loader":""}`)},"addDetector"),v=(0,n.K)(t=>w[t].loader,"getDiagramLoader"),_=(0,n.K)((t,e,{depth:r=2}={})=>{let i={depth:r};if(Array.isArray(e)&&!Array.isArray(t))return e.forEach(e=>_(t,e,i)),t;if(Array.isArray(e)&&Array.isArray(t))return e.forEach(e=>{t.includes(e)||t.push(e)}),t;if(null==t||r<=0)if(null!=t&&"object"==typeof t&&"object"==typeof e)return Object.assign(t,e);else return e;return null!=e&&"object"==typeof t&&"object"==typeof e&&Object.entries(e).forEach(([e,i])=>{"object"==typeof i?null!==i&&(Object.hasOwn(t,e)||Object.defineProperty(t,e,{value:void 0,writable:!0,enumerable:!0,configurable:!0}),void 0===t[e]&&(t[e]=Array.isArray(i)?[]:{}),"object"==typeof t[e]&&(t[e]=_(t[e],i,{depth:r-1}))):"object"!=typeof t[e]&&(Object.hasOwn(t,e)?t[e]=i:Object.defineProperty(t,e,{value:i,writable:!0,enumerable:!0,configurable:!0}))}),t},"assignWithDepth"),F=_,L="#ffffff",A="#f2f2f2",M=(0,n.K)((t,e)=>e?c(t,{s:-40,l:10}):c(t,{s:-40,l:-10}),"mkBorder"),$=class{static{(0,n.K)(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||c(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||c(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||M(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||M(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||M(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||M(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||u(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||u(this.tertiaryColor),this.lineColor=this.lineColor||u(this.background),this.arrowheadColor=this.arrowheadColor||u(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?(0,g.A)(this.secondaryColor,30):this.secondaryColor),this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||(0,g.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||u(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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||(0,p.A)(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.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||(0,g.A)(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||(0,g.A)(this.mainBkg,10)):(this.rowOdd=this.rowOdd||(0,p.A)(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||(0,p.A)(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||c(this.primaryColor,{h:30}),this.cScale4=this.cScale4||c(this.primaryColor,{h:60}),this.cScale5=this.cScale5||c(this.primaryColor,{h:90}),this.cScale6=this.cScale6||c(this.primaryColor,{h:120}),this.cScale7=this.cScale7||c(this.primaryColor,{h:150}),this.cScale8=this.cScale8||c(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||c(this.primaryColor,{h:270}),this.cScale10=this.cScale10||c(this.primaryColor,{h:300}),this.cScale11=this.cScale11||c(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,g.A)(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,g.A)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||u(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||(0,p.A)(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||(0,g.A)(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;let t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||c(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||c(this.mainBkg,{h:180,s:-15,l:t*(8+3*e)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||c(this.primaryColor,{h:64}),this.fillType3=this.fillType3||c(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||c(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||c(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||c(this.primaryColor,{h:128}),this.fillType7=this.fillType7||c(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||c(this.primaryColor,{l:-10}),this.pie5=this.pie5||c(this.secondaryColor,{l:-10}),this.pie6=this.pie6||c(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||c(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||c(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||c(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||c(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||c(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||c(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.venn1=this.venn1??c(this.primaryColor,{l:-30}),this.venn2=this.venn2??c(this.secondaryColor,{l:-30}),this.venn3=this.venn3??c(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??c(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??c(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??c(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??c(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??c(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||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.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},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||c(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||c(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||c(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||c(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||c(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||c(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,f.A)(this.quadrant1Fill)?(0,p.A)(this.quadrant1Fill):(0,g.A)(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,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||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?(0,g.A)(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||c(this.primaryColor,{h:-30}),this.git4=this.git4||c(this.primaryColor,{h:-60}),this.git5=this.git5||c(this.primaryColor,{h:-90}),this.git6=this.git6||c(this.primaryColor,{h:60}),this.git7=this.git7||c(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,p.A)(this.git0,25),this.git1=(0,p.A)(this.git1,25),this.git2=(0,p.A)(this.git2,25),this.git3=(0,p.A)(this.git3,25),this.git4=(0,p.A)(this.git4,25),this.git5=(0,p.A)(this.git5,25),this.git6=(0,p.A)(this.git6,25),this.git7=(0,p.A)(this.git7,25)):(this.git0=(0,g.A)(this.git0,25),this.git1=(0,g.A)(this.git1,25),this.git2=(0,g.A)(this.git2,25),this.git3=(0,g.A)(this.git3,25),this.git4=(0,g.A)(this.git4,25),this.git5=(0,g.A)(this.git5,25),this.git6=(0,g.A)(this.git6,25),this.git7=(0,g.A)(this.git7,25)),this.gitInv0=this.gitInv0||u(this.git0),this.gitInv1=this.gitInv1||u(this.git1),this.gitInv2=this.gitInv2||u(this.git2),this.gitInv3=this.gitInv3||u(this.git3),this.gitInv4=this.gitInv4||u(this.git4),this.gitInv5=this.gitInv5||u(this.git5),this.gitInv6=this.gitInv6||u(this.git6),this.gitInv7=this.gitInv7||u(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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||L,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||A,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(t){if("object"!=typeof t)return void this.updateColors();let e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]}),Object.hasOwn(t,"nodeBorder")&&!Object.hasOwn(t,"useGradient")&&(this.useGradient=!1)}},E=(0,n.K)(t=>{let e=new $;return e.calculate(t),e},"getThemeVariables"),K=class{static{(0,n.K)(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,p.A)(this.primaryColor,16),this.tertiaryColor=c(this.primaryColor,{h:-160}),this.primaryBorderColor=u(this.background),this.secondaryBorderColor=M(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=M(this.tertiaryColor,this.darkMode),this.primaryTextColor=u(this.primaryColor),this.secondaryTextColor=u(this.secondaryColor),this.tertiaryTextColor=u(this.tertiaryColor),this.lineColor=u(this.background),this.textColor=u(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,p.A)(u("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=(0,d.A)(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.radius=5,this.strokeWidth=1,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.clusterBkg="#302F3D",this.sectionBkgColor=(0,g.A)("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=(0,g.A)(this.sectionBkgColor,10),this.taskBorderColor=(0,d.A)(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=(0,d.A)(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||(0,p.A)(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||(0,g.A)(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){this.secondBkg=(0,p.A)(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=(0,p.A)(this.labelBackground,25),this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=(0,p.A)(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=u(this.doneTaskBkgColor),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=c(this.primaryColor,{h:64}),this.fillType3=c(this.secondaryColor,{h:64}),this.fillType4=c(this.primaryColor,{h:-64}),this.fillType5=c(this.secondaryColor,{h:-64}),this.fillType6=c(this.primaryColor,{h:128}),this.fillType7=c(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||c(this.primaryColor,{h:30}),this.cScale4=this.cScale4||c(this.primaryColor,{h:60}),this.cScale5=this.cScale5||c(this.primaryColor,{h:90}),this.cScale6=this.cScale6||c(this.primaryColor,{h:120}),this.cScale7=this.cScale7||c(this.primaryColor,{h:150}),this.cScale8=this.cScale8||c(this.primaryColor,{h:210}),this.cScale9=this.cScale9||c(this.primaryColor,{h:270}),this.cScale10=this.cScale10||c(this.primaryColor,{h:300}),this.cScale11=this.cScale11||c(this.primaryColor,{h:330});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||u(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScalePeer"+t]=this["cScalePeer"+t]||(0,p.A)(this["cScale"+t],10);for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||c(this.mainBkg,{h:30,s:-30,l:-(-10+4*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||c(this.mainBkg,{h:30,s:-30,l:-(-7+4*t)});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.mainContrastColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.mainContrastColor,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";for(let t=0;t<8;t++)this["venn"+(t+1)]=this["venn"+(t+1)]??(0,p.A)(this["cScale"+t],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#FF6B6B",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#1B5E20",complicatedBg:this.cynefin?.complicatedBg||"#0D47A1",chaoticBg:this.cynefin?.chaoticBg||"#BF360C",clearBg:this.cynefin?.clearBg||"#F57F17",confusionBg:this.cynefin?.confusionBg||"#4A148C",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||c(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||c(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||c(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||c(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||c(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||c(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,f.A)(this.quadrant1Fill)?(0,p.A)(this.quadrant1Fill):(0,g.A)(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,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||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.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.mainBkg,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.mainBkg},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?(0,g.A)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=(0,p.A)(this.secondaryColor,20),this.git1=(0,p.A)(this.pie2||this.secondaryColor,20),this.git2=(0,p.A)(this.pie3||this.tertiaryColor,20),this.git3=(0,p.A)(this.pie4||c(this.primaryColor,{h:-30}),20),this.git4=(0,p.A)(this.pie5||c(this.primaryColor,{h:-60}),20),this.git5=(0,p.A)(this.pie6||c(this.primaryColor,{h:-90}),10),this.git6=(0,p.A)(this.pie7||c(this.primaryColor,{h:60}),10),this.git7=(0,p.A)(this.pie8||c(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||u(this.git0),this.gitInv1=this.gitInv1||u(this.git1),this.gitInv2=this.gitInv2||u(this.git2),this.gitInv3=this.gitInv3||u(this.git3),this.gitInv4=this.gitInv4||u(this.git4),this.gitInv5=this.gitInv5||u(this.git5),this.gitInv6=this.gitInv6||u(this.git6),this.gitInv7=this.gitInv7||u(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||u(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||u(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.emUiFill=this.emUiFill||"#2d2d2d",this.emUiStroke=this.emUiStroke||"#555",this.emProcessorFill=this.emProcessorFill||(0,p.A)("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||(0,p.A)("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||(0,p.A)("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||(0,p.A)("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||(0,p.A)(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||(0,p.A)(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||(0,p.A)(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||(0,p.A)(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if("object"!=typeof t)return void this.updateColors();let e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},O=(0,n.K)(t=>{let e=new K;return e.calculate(t),e},"getThemeVariables"),D=class{static{(0,n.K)(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=c(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=c(this.primaryColor,{h:-160}),this.primaryBorderColor=M(this.primaryColor,this.darkMode),this.secondaryBorderColor=M(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=M(this.tertiaryColor,this.darkMode),this.primaryTextColor=u(this.primaryColor),this.secondaryTextColor=u(this.secondaryColor),this.tertiaryTextColor=u(this.tertiaryColor),this.lineColor=u(this.background),this.textColor=u(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=M(this.primaryColor,this.darkMode),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.radius=5,this.strokeWidth=1,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.clusterBkg="#FBFBFF",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=(0,d.A)(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.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",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.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",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||c(this.primaryColor,{h:30}),this.cScale4=this.cScale4||c(this.primaryColor,{h:60}),this.cScale5=this.cScale5||c(this.primaryColor,{h:90}),this.cScale6=this.cScale6||c(this.primaryColor,{h:120}),this.cScale7=this.cScale7||c(this.primaryColor,{h:150}),this.cScale8=this.cScale8||c(this.primaryColor,{h:210}),this.cScale9=this.cScale9||c(this.primaryColor,{h:270}),this.cScale10=this.cScale10||c(this.primaryColor,{h:300}),this.cScale11=this.cScale11||c(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,g.A)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,g.A)(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,g.A)(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||(0,g.A)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||c(this["cScale"+t],{h:180});for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||c(this.mainBkg,{h:30,l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||c(this.mainBkg,{h:30,l:-(7+5*t)});if(this.scaleLabelColor="calculated"!==this.scaleLabelColor&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,"calculated"!==this.labelTextColor){this.cScaleLabel0=this.cScaleLabel0||u(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||u(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.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder=this.border1,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.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||(0,p.A)(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||(0,p.A)(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=c(this.primaryColor,{h:64}),this.fillType3=c(this.secondaryColor,{h:64}),this.fillType4=c(this.primaryColor,{h:-64}),this.fillType5=c(this.secondaryColor,{h:-64}),this.fillType6=c(this.primaryColor,{h:128}),this.fillType7=c(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||c(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||c(this.primaryColor,{l:-10}),this.pie5=this.pie5||c(this.secondaryColor,{l:-30}),this.pie6=this.pie6||c(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||c(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||c(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||c(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||c(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||c(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||c(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.venn1=this.venn1??c(this.primaryColor,{l:-30}),this.venn2=this.venn2??c(this.secondaryColor,{l:-30}),this.venn3=this.venn3??c(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??c(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??c(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??c(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??c(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??c(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||c(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||c(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||c(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||c(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||c(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||c(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,f.A)(this.quadrant1Fill)?(0,p.A)(this.quadrant1Fill):(0,g.A)(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.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||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||c(this.primaryColor,{h:-30}),this.git4=this.git4||c(this.primaryColor,{h:-60}),this.git5=this.git5||c(this.primaryColor,{h:-90}),this.git6=this.git6||c(this.primaryColor,{h:60}),this.git7=this.git7||c(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,p.A)(this.git0,25),this.git1=(0,p.A)(this.git1,25),this.git2=(0,p.A)(this.git2,25),this.git3=(0,p.A)(this.git3,25),this.git4=(0,p.A)(this.git4,25),this.git5=(0,p.A)(this.git5,25),this.git6=(0,p.A)(this.git6,25),this.git7=(0,p.A)(this.git7,25)):(this.git0=(0,g.A)(this.git0,25),this.git1=(0,g.A)(this.git1,25),this.git2=(0,g.A)(this.git2,25),this.git3=(0,g.A)(this.git3,25),this.git4=(0,g.A)(this.git4,25),this.git5=(0,g.A)(this.git5,25),this.git6=(0,g.A)(this.git6,25),this.git7=(0,g.A)(this.git7,25)),this.gitInv0=this.gitInv0||(0,g.A)(u(this.git0),25),this.gitInv1=this.gitInv1||u(this.git1),this.gitInv2=this.gitInv2||u(this.git2),this.gitInv3=this.gitInv3||u(this.git3),this.gitInv4=this.gitInv4||u(this.git4),this.gitInv5=this.gitInv5||u(this.git5),this.gitInv6=this.gitInv6||u(this.git6),this.gitInv7=this.gitInv7||u(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||u(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||u(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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||L,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||A}calculate(t){if(Object.keys(this).forEach(t=>{"calculated"===this[t]&&(this[t]=void 0)}),"object"!=typeof t)return void this.updateColors();let e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},q=(0,n.K)(t=>{let e=new D;return e.calculate(t),e},"getThemeVariables"),I=class{static{(0,n.K)(this,"Theme")}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=(0,p.A)("#cde498",10),this.primaryBorderColor=M(this.primaryColor,this.darkMode),this.secondaryBorderColor=M(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=M(this.tertiaryColor,this.darkMode),this.primaryTextColor=u(this.primaryColor),this.secondaryTextColor=u(this.secondaryColor),this.tertiaryTextColor=u(this.primaryColor),this.lineColor=u(this.background),this.textColor=u(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,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.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){this.actorBorder=(0,g.A)(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.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||c(this.primaryColor,{h:30}),this.cScale4=this.cScale4||c(this.primaryColor,{h:60}),this.cScale5=this.cScale5||c(this.primaryColor,{h:90}),this.cScale6=this.cScale6||c(this.primaryColor,{h:120}),this.cScale7=this.cScale7||c(this.primaryColor,{h:150}),this.cScale8=this.cScale8||c(this.primaryColor,{h:210}),this.cScale9=this.cScale9||c(this.primaryColor,{h:270}),this.cScale10=this.cScale10||c(this.primaryColor,{h:300}),this.cScale11=this.cScale11||c(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,g.A)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,g.A)(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,g.A)(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||(0,g.A)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||c(this["cScale"+t],{h:180});this.scaleLabelColor="calculated"!==this.scaleLabelColor&&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]||c(this.mainBkg,{h:30,s:-30,l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||c(this.mainBkg,{h:30,s:-30,l:-(8+5*t)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||(0,p.A)(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||(0,p.A)(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=c(this.primaryColor,{h:64}),this.fillType3=c(this.secondaryColor,{h:64}),this.fillType4=c(this.primaryColor,{h:-64}),this.fillType5=c(this.secondaryColor,{h:-64}),this.fillType6=c(this.primaryColor,{h:128}),this.fillType7=c(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||c(this.primaryColor,{l:-30}),this.pie5=this.pie5||c(this.secondaryColor,{l:-30}),this.pie6=this.pie6||c(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||c(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||c(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||c(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||c(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||c(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||c(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.venn1=this.venn1??c(this.primaryColor,{l:-30}),this.venn2=this.venn2??c(this.secondaryColor,{l:-30}),this.venn3=this.venn3??c(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??c(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??c(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??c(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??c(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??c(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B4513",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#C8E6C9",complicatedBg:this.cynefin?.complicatedBg||"#DCEDC8",chaoticBg:this.cynefin?.chaoticBg||"#FFE0B2",clearBg:this.cynefin?.clearBg||"#FFF9C4",confusionBg:this.cynefin?.confusionBg||"#D7CCC8",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||c(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||c(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||c(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||c(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||c(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||c(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,f.A)(this.quadrant1Fill)?(0,p.A)(this.quadrant1Fill):(0,g.A)(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.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||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||c(this.primaryColor,{h:-30}),this.git4=this.git4||c(this.primaryColor,{h:-60}),this.git5=this.git5||c(this.primaryColor,{h:-90}),this.git6=this.git6||c(this.primaryColor,{h:60}),this.git7=this.git7||c(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,p.A)(this.git0,25),this.git1=(0,p.A)(this.git1,25),this.git2=(0,p.A)(this.git2,25),this.git3=(0,p.A)(this.git3,25),this.git4=(0,p.A)(this.git4,25),this.git5=(0,p.A)(this.git5,25),this.git6=(0,p.A)(this.git6,25),this.git7=(0,p.A)(this.git7,25)):(this.git0=(0,g.A)(this.git0,25),this.git1=(0,g.A)(this.git1,25),this.git2=(0,g.A)(this.git2,25),this.git3=(0,g.A)(this.git3,25),this.git4=(0,g.A)(this.git4,25),this.git5=(0,g.A)(this.git5,25),this.git6=(0,g.A)(this.git6,25),this.git7=(0,g.A)(this.git7,25)),this.gitInv0=this.gitInv0||u(this.git0),this.gitInv1=this.gitInv1||u(this.git1),this.gitInv2=this.gitInv2||u(this.git2),this.gitInv3=this.gitInv3||u(this.git3),this.gitInv4=this.gitInv4||u(this.git4),this.gitInv5=this.gitInv5||u(this.git5),this.gitInv6=this.gitInv6||u(this.git6),this.gitInv7=this.gitInv7||u(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||u(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||u(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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||L,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||A}calculate(t){if("object"!=typeof t)return void this.updateColors();let e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},P=(0,n.K)(t=>{let e=new I;return e.calculate(t),e},"getThemeVariables"),W=class{static{(0,n.K)(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=(0,p.A)(this.contrast,55),this.background="#ffffff",this.tertiaryColor=c(this.primaryColor,{h:-160}),this.primaryBorderColor=M(this.primaryColor,this.darkMode),this.secondaryBorderColor=M(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=M(this.tertiaryColor,this.darkMode),this.primaryTextColor=u(this.primaryColor),this.secondaryTextColor=u(this.secondaryColor),this.tertiaryTextColor=u(this.tertiaryColor),this.lineColor=u(this.background),this.textColor=u(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.radius=5,this.strokeWidth=1,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.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||(0,p.A)(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){this.secondBkg=(0,p.A)(this.contrast,55),this.border2=this.contrast,this.actorBorder=(0,p.A)(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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]||u(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||(0,p.A)(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||(0,g.A)(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]||c(this.mainBkg,{l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||c(this.mainBkg,{l:-(8+5*t)});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.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.sectionBkgColor=(0,p.A)(this.contrast,30),this.sectionBkgColor2=(0,p.A)(this.contrast,30),this.taskBorderColor=(0,g.A)(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=(0,p.A)(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=(0,g.A)(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=c(this.primaryColor,{h:64}),this.fillType3=c(this.secondaryColor,{h:64}),this.fillType4=c(this.primaryColor,{h:-64}),this.fillType5=c(this.secondaryColor,{h:-64}),this.fillType6=c(this.primaryColor,{h:128}),this.fillType7=c(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";for(let t=0;t<8;t++)this["venn"+(t+1)]=this["venn"+(t+1)]??this["cScale"+t];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||c(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||c(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||c(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||c(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||c(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||c(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,f.A)(this.quadrant1Fill)?(0,p.A)(this.quadrant1Fill):(0,g.A)(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,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||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.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},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=(0,g.A)(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||c(this.primaryColor,{h:-30}),this.git4=this.pie5||c(this.primaryColor,{h:-60}),this.git5=this.pie6||c(this.primaryColor,{h:-90}),this.git6=this.pie7||c(this.primaryColor,{h:60}),this.git7=this.pie8||c(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||u(this.git0),this.gitInv1=this.gitInv1||u(this.git1),this.gitInv2=this.gitInv2||u(this.git2),this.gitInv3=this.gitInv3||u(this.git3),this.gitInv4=this.gitInv4||u(this.git4),this.gitInv5=this.gitInv5||u(this.git5),this.gitInv6=this.gitInv6||u(this.git6),this.gitInv7=this.gitInv7||u(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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||L,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||A}calculate(t){if("object"!=typeof t)return void this.updateColors();let e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},z=(0,n.K)(t=>{let e=new W;return e.calculate(t),e},"getThemeVariables"),R=class{static{(0,n.K)(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=M(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||c(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||c(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||M(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||M(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||M(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||M(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||u(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||u(this.tertiaryColor),this.lineColor=this.lineColor||u(this.background),this.arrowheadColor=this.arrowheadColor||u(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?(0,g.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||(0,g.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||u(this.lineColor),this.rectBkgColor=this.rectBkgColor||((0,f.A)(this.background)?(0,p.A)(this.background,4):(0,g.A)(this.background,4));let t="#ECECFE",e="#E9E9F1",r=c(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,p.A)(t,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.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,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.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||t,this.cScale1=this.cScale1||e,this.cScale2=this.cScale2||r,this.cScale3=this.cScale3||c(t,{h:30}),this.cScale4=this.cScale4||c(t,{h:60}),this.cScale5=this.cScale5||c(t,{h:90}),this.cScale6=this.cScale6||c(t,{h:120}),this.cScale7=this.cScale7||c(t,{h:150}),this.cScale8=this.cScale8||c(t,{h:210,l:150}),this.cScale9=this.cScale9||c(t,{h:270}),this.cScale10=this.cScale10||c(t,{h:300}),this.cScale11=this.cScale11||c(t,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,g.A)(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,g.A)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||u(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||(0,p.A)(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||(0,g.A)(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;let i=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||c(this.mainBkg,{h:180,s:-15,l:i*(5+3*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||c(this.mainBkg,{h:180,s:-15,l:i*(8+3*t)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||e,this.fillType2=this.fillType2||c(t,{h:64}),this.fillType3=this.fillType3||c(e,{h:64}),this.fillType4=this.fillType4||c(t,{h:-64}),this.fillType5=this.fillType5||c(e,{h:-64}),this.fillType6=this.fillType6||c(t,{h:128}),this.fillType7=this.fillType7||c(e,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||e,this.pie3=this.pie3||r,this.pie4=this.pie4||c(t,{l:-10}),this.pie5=this.pie5||c(e,{l:-10}),this.pie6=this.pie6||c(r,{l:-10}),this.pie7=this.pie7||c(t,{h:60,l:-10}),this.pie8=this.pie8||c(t,{h:-60,l:-10}),this.pie9=this.pie9||c(t,{h:120,l:0}),this.pie10=this.pie10||c(t,{h:60,l:-20}),this.pie11=this.pie11||c(t,{h:-60,l:-20}),this.pie12=this.pie12||c(t,{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.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||c(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||c(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||c(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||c(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||c(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||c(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,f.A)(this.quadrant1Fill)?(0,p.A)(this.quadrant1Fill):(0,g.A)(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,legendTextColor:this.xyChart?.legendTextColor||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||t,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?(0,g.A)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||e,this.git2=this.git2||r,this.git3=this.git3||c(t,{h:-30}),this.git4=this.git4||c(t,{h:-60}),this.git5=this.git5||c(t,{h:-90}),this.git6=this.git6||c(t,{h:60}),this.git7=this.git7||c(t,{h:120}),this.darkMode?(this.git0=(0,p.A)(this.git0,25),this.git1=(0,p.A)(this.git1,25),this.git2=(0,p.A)(this.git2,25),this.git3=(0,p.A)(this.git3,25),this.git4=(0,p.A)(this.git4,25),this.git5=(0,p.A)(this.git5,25),this.git6=(0,p.A)(this.git6,25),this.git7=(0,p.A)(this.git7,25)):(this.git0=(0,g.A)(this.git0,25),this.git1=(0,g.A)(this.git1,25),this.git2=(0,g.A)(this.git2,25),this.git3=(0,g.A)(this.git3,25),this.git4=(0,g.A)(this.git4,25),this.git5=(0,g.A)(this.git5,25),this.git6=(0,g.A)(this.git6,25),this.git7=(0,g.A)(this.git7,25)),this.gitInv0=this.gitInv0||u(this.git0),this.gitInv1=this.gitInv1||u(this.git1),this.gitInv2=this.gitInv2||u(this.git2),this.gitInv3=this.gitInv3||u(this.git3),this.gitInv4=this.gitInv4||u(this.git4),this.gitInv5=this.gitInv5||u(this.git5),this.gitInv6=this.gitInv6||u(this.git6),this.gitInv7=this.gitInv7||u(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||L,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||A}calculate(t){if("object"!=typeof t)return void this.updateColors();let e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},j=(0,n.K)(t=>{let e=new R;return e.calculate(t),e},"getThemeVariables"),N=class{static{(0,n.K)(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,p.A)(this.primaryColor,16),this.tertiaryColor=c(this.primaryColor,{h:-160}),this.primaryBorderColor=u(this.background),this.secondaryBorderColor=M(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=M(this.tertiaryColor,this.darkMode),this.primaryTextColor=u(this.primaryColor),this.secondaryTextColor=u(this.secondaryColor),this.tertiaryTextColor=u(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,p.A)(u("#323D47"),10),this.border1="#ccc",this.border2=(0,d.A)(255,255,255,.25),this.arrowheadColor=u(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||c(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||c(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||M(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||M(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||M(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||M(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||u(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||u(this.tertiaryColor),this.lineColor=this.lineColor||u(this.background),this.arrowheadColor=this.arrowheadColor||u(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.secondBkg="calculated"===this.secondBkg?(0,p.A)(this.mainBkg,16):this.secondBkg,this.nodeBorder=this.nodeBorder||this.border1,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?(0,g.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||(0,g.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||u(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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||(0,p.A)(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,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.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||c(this.primaryColor,{h:30}),this.cScale4=this.cScale4||c(this.primaryColor,{h:60}),this.cScale5=this.cScale5||c(this.primaryColor,{h:90}),this.cScale6=this.cScale6||c(this.primaryColor,{h:120}),this.cScale7=this.cScale7||c(this.primaryColor,{h:150}),this.cScale8=this.cScale8||c(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||c(this.primaryColor,{h:270}),this.cScale10=this.cScale10||c(this.primaryColor,{h:300}),this.cScale11=this.cScale11||c(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,g.A)(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,g.A)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||u(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||(0,p.A)(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||(0,g.A)(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;let t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||c(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||c(this.mainBkg,{h:180,s:-15,l:t*(8+3*e)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||c(this.primaryColor,{h:64}),this.fillType3=this.fillType3||c(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||c(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||c(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||c(this.primaryColor,{h:128}),this.fillType7=this.fillType7||c(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||c(this.primaryColor,{l:-10}),this.pie5=this.pie5||c(this.secondaryColor,{l:-10}),this.pie6=this.pie6||c(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||c(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||c(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||c(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||c(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||c(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||c(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.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||c(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||c(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||c(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||c(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||c(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||c(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,f.A)(this.quadrant1Fill)?(0,p.A)(this.quadrant1Fill):(0,g.A)(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,legendTextColor:this.xyChart?.legendTextColor||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?(0,g.A)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||"#0b0000",this.git1=this.git1||"#4d1037",this.git2=this.git2||"#3f5258",this.git3=this.git3||"#4f2f1b",this.git4=this.git4||"#6e0a0a",this.git5=this.git5||"#3b0048",this.git6=this.git6||"#995a01",this.git7=this.git7||"#154706",this.gitDarkMode=!0,this.gitDarkMode?(this.git0=(0,p.A)(this.git0,25),this.git1=(0,p.A)(this.git1,25),this.git2=(0,p.A)(this.git2,25),this.git3=(0,p.A)(this.git3,25),this.git4=(0,p.A)(this.git4,25),this.git5=(0,p.A)(this.git5,25),this.git6=(0,p.A)(this.git6,25),this.git7=(0,p.A)(this.git7,25)):(this.git0=(0,g.A)(this.git0,25),this.git1=(0,g.A)(this.git1,25),this.git2=(0,g.A)(this.git2,25),this.git3=(0,g.A)(this.git3,25),this.git4=(0,g.A)(this.git4,25),this.git5=(0,g.A)(this.git5,25),this.git6=(0,g.A)(this.git6,25),this.git7=(0,g.A)(this.git7,25)),this.gitInv0=this.gitInv0||u(this.git0),this.gitInv1=this.gitInv1||u(this.git1),this.gitInv2=this.gitInv2||u(this.git2),this.gitInv3=this.gitInv3||u(this.git3),this.gitInv4=this.gitInv4||u(this.git4),this.gitInv5=this.gitInv5||u(this.git5),this.gitInv6=this.gitInv6||u(this.git6),this.gitInv7=this.gitInv7||u(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||L,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||A}calculate(t){if("object"!=typeof t)return void this.updateColors();let e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},H=(0,n.K)(t=>{let e=new N;return e.calculate(t),e},"getThemeVariables"),U=class{static{(0,n.K)(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=M("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||c(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||c(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||M(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||M(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||M(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||M(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||u(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||u(this.tertiaryColor),this.lineColor=this.lineColor||u(this.background),this.arrowheadColor=this.arrowheadColor||u(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?(0,g.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.noteFontWeight=600,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||(0,g.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||u(this.lineColor),this.rectBkgColor=this.rectBkgColor||((0,f.A)(this.background)?(0,p.A)(this.background,4):(0,g.A)(this.background,4));let t="#ECECFE",e="#E9E9F1",r=c(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,p.A)(t,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.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,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.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=this.mainBkg;if(this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,g.A)(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,g.A)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||u(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||(0,p.A)(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||(0,g.A)(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;let i=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||c(this.mainBkg,{h:180,s:-15,l:i*(5+3*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||c(this.mainBkg,{h:180,s:-15,l:i*(8+3*t)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||e,this.fillType2=this.fillType2||c(t,{h:64}),this.fillType3=this.fillType3||c(e,{h:64}),this.fillType4=this.fillType4||c(t,{h:-64}),this.fillType5=this.fillType5||c(e,{h:-64}),this.fillType6=this.fillType6||c(t,{h:128}),this.fillType7=this.fillType7||c(e,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||e,this.pie3=this.pie3||r,this.pie4=this.pie4||c(t,{l:-10}),this.pie5=this.pie5||c(e,{l:-10}),this.pie6=this.pie6||c(r,{l:-10}),this.pie7=this.pie7||c(t,{h:60,l:-10}),this.pie8=this.pie8||c(t,{h:-60,l:-10}),this.pie9=this.pie9||c(t,{h:120,l:0}),this.pie10=this.pie10||c(t,{h:60,l:-20}),this.pie11=this.pie11||c(t,{h:-60,l:-20}),this.pie12=this.pie12||c(t,{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.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||c(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||c(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||c(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||c(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||c(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||c(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,f.A)(this.quadrant1Fill)?(0,p.A)(this.quadrant1Fill):(0,g.A)(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,legendTextColor:this.xyChart?.legendTextColor||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||t,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?(0,g.A)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||t,this.git1=this.git1||e,this.git2=this.git2||r,this.git3=this.git3||c(t,{h:-30}),this.git4=this.git4||c(t,{h:-60}),this.git5=this.git5||c(t,{h:-90}),this.git6=this.git6||c(t,{h:60}),this.git7=this.git7||c(t,{h:120}),this.darkMode?(this.git0=(0,p.A)(this.git0,25),this.git1=(0,p.A)(this.git1,25),this.git2=(0,p.A)(this.git2,25),this.git3=(0,p.A)(this.git3,25),this.git4=(0,p.A)(this.git4,25),this.git5=(0,p.A)(this.git5,25),this.git6=(0,p.A)(this.git6,25),this.git7=(0,p.A)(this.git7,25)):(this.git0=(0,g.A)(this.git0,25),this.git1=(0,g.A)(this.git1,25),this.git2=(0,g.A)(this.git2,25),this.git3=(0,g.A)(this.git3,25),this.git4=(0,g.A)(this.git4,25),this.git5=(0,g.A)(this.git5,25),this.git6=(0,g.A)(this.git6,25),this.git7=(0,g.A)(this.git7,25)),this.gitInv0=this.gitInv0||u(this.git0),this.gitInv1=this.gitInv1||u(this.git1),this.gitInv2=this.gitInv2||u(this.git2),this.gitInv3=this.gitInv3||u(this.git3),this.gitInv4=this.gitInv4||u(this.git4),this.gitInv5=this.gitInv5||u(this.git5),this.gitInv6=this.gitInv6||u(this.git6),this.gitInv7=this.gitInv7||u(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.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||L,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||A}calculate(t){if("object"!=typeof t)return void this.updateColors();let e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},Y=(0,n.K)(t=>{let e=new U;return e.calculate(t),e},"getThemeVariables"),X=class{static{(0,n.K)(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,p.A)(this.primaryColor,16),this.tertiaryColor=c(this.primaryColor,{h:-160}),this.primaryBorderColor=u(this.background),this.secondaryBorderColor=M(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=M(this.tertiaryColor,this.darkMode),this.primaryTextColor=u(this.primaryColor),this.secondaryTextColor=u(this.secondaryColor),this.tertiaryTextColor=u(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,p.A)(u("#323D47"),10),this.border1="#ccc",this.border2=(0,d.A)(255,255,255,.25),this.arrowheadColor=u(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||c(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||c(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||M(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||M(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||M(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||M(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||u(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||u(this.tertiaryColor),this.lineColor=this.lineColor||u(this.background),this.arrowheadColor=this.arrowheadColor||u(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.secondBkg="calculated"===this.secondBkg?(0,p.A)(this.mainBkg,16):this.secondBkg,this.nodeBorder=this.nodeBorder||this.border1,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?(0,g.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",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||(0,g.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||u(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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||(0,p.A)(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,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.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||c(this.primaryColor,{h:30}),this.cScale4=this.cScale4||c(this.primaryColor,{h:60}),this.cScale5=this.cScale5||c(this.primaryColor,{h:90}),this.cScale6=this.cScale6||c(this.primaryColor,{h:120}),this.cScale7=this.cScale7||c(this.primaryColor,{h:150}),this.cScale8=this.cScale8||c(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||c(this.primaryColor,{h:270}),this.cScale10=this.cScale10||c(this.primaryColor,{h:300}),this.cScale11=this.cScale11||c(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,g.A)(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,g.A)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||u(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||(0,p.A)(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||(0,g.A)(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;let t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||c(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||c(this.mainBkg,{h:180,s:-15,l:t*(8+3*e)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||c(this.primaryColor,{h:64}),this.fillType3=this.fillType3||c(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||c(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||c(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||c(this.primaryColor,{h:128}),this.fillType7=this.fillType7||c(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||c(this.primaryColor,{l:-10}),this.pie5=this.pie5||c(this.secondaryColor,{l:-10}),this.pie6=this.pie6||c(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||c(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||c(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||c(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||c(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||c(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||c(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.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||c(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||c(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||c(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||c(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||c(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||c(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,f.A)(this.quadrant1Fill)?(0,p.A)(this.quadrant1Fill):(0,g.A)(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,legendTextColor:this.xyChart?.legendTextColor||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?(0,g.A)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||c(this.primaryColor,{h:-30}),this.git4=this.git4||c(this.primaryColor,{h:-60}),this.git5=this.git5||c(this.primaryColor,{h:-90}),this.git6=this.git6||c(this.primaryColor,{h:60}),this.git7=this.git7||c(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,p.A)(this.git0,25),this.git1=(0,p.A)(this.git1,25),this.git2=(0,p.A)(this.git2,25),this.git3=(0,p.A)(this.git3,25),this.git4=(0,p.A)(this.git4,25),this.git5=(0,p.A)(this.git5,25),this.git6=(0,p.A)(this.git6,25),this.git7=(0,p.A)(this.git7,25)):(this.git0=(0,g.A)(this.git0,25),this.git1=(0,g.A)(this.git1,25),this.git2=(0,g.A)(this.git2,25),this.git3=(0,g.A)(this.git3,25),this.git4=(0,g.A)(this.git4,25),this.git5=(0,g.A)(this.git5,25),this.git6=(0,g.A)(this.git6,25),this.git7=(0,g.A)(this.git7,25)),this.gitInv0=this.gitInv0||u(this.git0),this.gitInv1=this.gitInv1||u(this.git1),this.gitInv2=this.gitInv2||u(this.git2),this.gitInv3=this.gitInv3||u(this.git3),this.gitInv4=this.gitInv4||u(this.git4),this.gitInv5=this.gitInv5||u(this.git5),this.gitInv6=this.gitInv6||u(this.git6),this.gitInv7=this.gitInv7||u(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.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||L,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||A}calculate(t){if("object"!=typeof t)return void this.updateColors();let e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},G=(0,n.K)(t=>{let e=new X;return e.calculate(t),e},"getThemeVariables"),V=class{static{(0,n.K)(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=M("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.usecaseActorBorder="#A78BFA",this.usecaseActorBkg="#F5F3FF",this.usecaseBorder="#2DD4BF",this.usecaseBkg="#F0FDFA",this.usecaseBoundaryBorder="#BDBCCC",this.usecaseBoundaryBkg="#FAFAFC",this.usecaseIncludeLine="#38BDF8",this.usecaseExtendLine="#FB923C",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||c(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||c(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||M(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||M(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||M(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||M(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||u(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||u(this.tertiaryColor),this.lineColor=this.lineColor||u(this.background),this.arrowheadColor=this.arrowheadColor||u(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?(0,g.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||(0,g.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||u(this.lineColor),this.rectBkgColor=this.rectBkgColor||((0,f.A)(this.background)?(0,p.A)(this.background,4):(0,g.A)(this.background,4));let t="#ECECFE",e=c(t,{h:180,l:5});this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,p.A)(t,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.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateEdgeLabelBackground=this.stateEdgeLabelBackground||"#FFFFFF",this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#F9F9FB",this.compositeTitleBackground=this.compositeTitleBackground||"#F9F9FB",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||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad",this.sectionBkgColor=this.sectionBkgColor||this.cScale0,this.sectionBkgColor2=this.sectionBkgColor2||this.cScale1,this.altSectionBkgColor=this.altSectionBkgColor||"white";for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||u(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||(0,p.A)(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||(0,g.A)(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;let r=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||c(this.mainBkg,{h:180,s:-15,l:r*(5+3*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||c(this.mainBkg,{h:180,s:-15,l:r*(8+3*t)});this.classText=this.classText||this.textColor;for(let t=0;t<8;t++)this["fillType"+t]=this["fillType"+t]||this.bkgColorArray[t];for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+(t+1)]=this["pie"+(t+1)]||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";for(let t=0;t<8;t++)this["venn"+(t+1)]=this["venn"+(t+1)]??this.borderColorArray[t%this.borderColorArray.length];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||c(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||c(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||c(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||c(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||c(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||c(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,f.A)(this.quadrant1Fill)?(0,p.A)(this.quadrant1Fill):(0,g.A)(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,legendTextColor:this.xyChart?.legendTextColor||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||t,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?(0,g.A)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||t,this.git1=this.git1||"#E9E9F1",this.git2=this.git2||e,this.git3=this.git3||c(t,{h:-30}),this.git4=this.git4||c(t,{h:-60}),this.git5=this.git5||c(t,{h:-90}),this.git6=this.git6||c(t,{h:60}),this.git7=this.git7||c(t,{h:120}),this.darkMode?(this.git0=(0,p.A)(this.git0,25),this.git1=(0,p.A)(this.git1,25),this.git2=(0,p.A)(this.git2,25),this.git3=(0,p.A)(this.git3,25),this.git4=(0,p.A)(this.git4,25),this.git5=(0,p.A)(this.git5,25),this.git6=(0,p.A)(this.git6,25),this.git7=(0,p.A)(this.git7,25)):(this.git0=(0,g.A)(this.git0,25),this.git1=(0,g.A)(this.git1,25),this.git2=(0,g.A)(this.git2,25),this.git3=(0,g.A)(this.git3,25),this.git4=(0,g.A)(this.git4,25),this.git5=(0,g.A)(this.git5,25),this.git6=(0,g.A)(this.git6,25),this.git7=(0,g.A)(this.git7,25)),this.gitInv0=this.gitInv0||u(this.git0),this.gitInv1=this.gitInv1||u(this.git1),this.gitInv2=this.gitInv2||u(this.git2),this.gitInv3=this.gitInv3||u(this.git3),this.gitInv4=this.gitInv4||u(this.git4),this.gitInv5=this.gitInv5||u(this.git5),this.gitInv6=this.gitInv6||u(this.git6),this.gitInv7=this.gitInv7||u(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.commitLineColor=this.commitLineColor??"#BDBCCC",this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.fontWeight=600,this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||L,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||A}calculate(t){if("object"!=typeof t)return void this.updateColors();let e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},Z=(0,n.K)(t=>{let e=new V;return e.calculate(t),e},"getThemeVariables"),Q=class{static{(0,n.K)(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,p.A)(this.primaryColor,16),this.tertiaryColor=c(this.primaryColor,{h:-160}),this.primaryBorderColor=u(this.background),this.secondaryBorderColor=M(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=M(this.tertiaryColor,this.darkMode),this.primaryTextColor=u(this.primaryColor),this.secondaryTextColor=u(this.secondaryColor),this.tertiaryTextColor=u(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,p.A)(u("#323D47"),10),this.border1="#ccc",this.border2=(0,d.A)(255,255,255,.25),this.arrowheadColor=u(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.usecaseActorBorder="#A78BFA",this.usecaseBorder="#2DD4BF",this.usecaseBoundaryBorder="#BDBCCC",this.usecaseIncludeLine="#38BDF8",this.usecaseExtendLine="#FB923C",this.filterColor="#FFFFFF"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||c(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||c(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||M(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||M(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||M(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||M(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||u(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||u(this.tertiaryColor),this.lineColor=this.lineColor||u(this.background),this.arrowheadColor=this.arrowheadColor||u(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.secondBkg="calculated"===this.secondBkg?(0,p.A)(this.mainBkg,16):this.secondBkg,this.nodeBorder=this.nodeBorder||this.border1,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?(0,g.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",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||(0,g.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||u(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor="#FFFFFF",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||(0,p.A)(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateEdgeLabelBackground=this.stateEdgeLabelBackground||"#16141F",this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||"#16141F",this.altBackground=this.altBackground||"#16141F",this.compositeTitleBackground=this.compositeTitleBackground||"#16141F",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||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad",this.sectionBkgColor=this.sectionBkgColor||this.cScale0,this.sectionBkgColor2=this.sectionBkgColor2||this.cScale1,this.altSectionBkgColor=this.altSectionBkgColor||this.background;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||u(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||(0,p.A)(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||(0,g.A)(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=(0,g.A)(this["cScale"+t],75);let t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||c(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||c(this.mainBkg,{h:180,s:-15,l:t*(8+3*e)});this.classText=this.classText||this.textColor,["#701a75","#134e4a","#7c2d12","#581c87","#14532d","#4c1d95","#7f1d1d","#713f12"].forEach((t,e)=>{this["fillType"+e]=this["fillType"+e]||t});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+(t+1)]=this["pie"+(t+1)]||this["cScale"+t];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||"#28253D",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";for(let t=0;t<8;t++)this["venn"+(t+1)]=this["venn"+(t+1)]??this.borderColorArray[t%this.borderColorArray.length];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||c(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||c(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||c(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||c(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||c(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||c(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,f.A)(this.quadrant1Fill)?(0,p.A)(this.quadrant1Fill):(0,g.A)(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,legendTextColor:this.xyChart?.legendTextColor||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?(0,g.A)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||c(this.primaryColor,{h:-30}),this.git4=this.git4||c(this.primaryColor,{h:-60}),this.git5=this.git5||c(this.primaryColor,{h:-90}),this.git6=this.git6||c(this.primaryColor,{h:60}),this.git7=this.git7||c(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,p.A)(this.git0,25),this.git1=(0,p.A)(this.git1,25),this.git2=(0,p.A)(this.git2,25),this.git3=(0,p.A)(this.git3,25),this.git4=(0,p.A)(this.git4,25),this.git5=(0,p.A)(this.git5,25),this.git6=(0,p.A)(this.git6,25),this.git7=(0,p.A)(this.git7,25)):(this.git0=(0,g.A)(this.git0,25),this.git1=(0,g.A)(this.git1,25),this.git2=(0,g.A)(this.git2,25),this.git3=(0,g.A)(this.git3,25),this.git4=(0,g.A)(this.git4,25),this.git5=(0,g.A)(this.git5,25),this.git6=(0,g.A)(this.git6,25),this.git7=(0,g.A)(this.git7,25)),this.gitInv0=this.gitInv0||u(this.git0),this.gitInv1=this.gitInv1||u(this.git1),this.gitInv2=this.gitInv2||u(this.git2),this.gitInv3=this.gitInv3||u(this.git3),this.gitInv4=this.gitInv4||u(this.git4),this.gitInv5=this.gitInv5||u(this.git5),this.gitInv6=this.gitInv6||u(this.git6),this.gitInv7=this.gitInv7||u(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.commitLineColor=this.commitLineColor??"#BDBCCC",this.fontWeight=600,this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||L,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||A}calculate(t){if("object"!=typeof t)return void this.updateColors();let e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},J={base:{getThemeVariables:E},dark:{getThemeVariables:O},default:{getThemeVariables:q},forest:{getThemeVariables:P},neutral:{getThemeVariables:z},neo:{getThemeVariables:j},"neo-dark":{getThemeVariables:H},redux:{getThemeVariables:Y},"redux-dark":{getThemeVariables:G},"redux-color":{getThemeVariables:Z},"redux-dark-color":{getThemeVariables:(0,n.K)(t=>{let e=new Q;return e.calculate(t),e},"getThemeVariables")}},tt={flowchart:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,wrappingWidth:120,minNodeWidth:120,inheritDir:!1},swimlane:{useMaxWidth:!0,theme:"redux-color",look:"neo",layout:"swimlane",lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},agentflow:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,diagramPadding:8,nodeSpacing:50,rankSpacing:50,wrappingWidth:120,minNodeWidth:120},sequence:{useMaxWidth:!0,theme:"redux-color",look:"neo",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,theme:"redux-color",look:"neo",titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,theme:"redux-color",look:"neo",layout:"elk",wrappingWidth:120,minNodeWidth:120,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},er:{useMaxWidth:!0,theme:"redux-color",look:"neo",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,donutHole:0,legendPosition:"right",highlightSlice:""},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,showDataLabelOutsideBar:!1,showTitle:!0,showLegend:!0,legendFontSize:14,legendPadding:10,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,labelRotation:0},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,labelRotation:0},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,theme:"redux-color",look:"neo",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"},ishikawa:{useMaxWidth:!0,diagramPadding:20},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:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1,showIcons:!1,defaultIconPack:"",filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500,seed:1},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},usecase:{useMaxWidth:!0,theme:"redux-color",look:"neo",wrappingWidth:120,minNodeWidth:120,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:"normal",usecaseFontSize:12,usecaseFontFamily:'"Open Sans", sans-serif',usecaseFontWeight:"normal",nodeSpacing:50,rankSpacing:50,diagramPadding:20,colorScheme:"role"},venn:{useMaxWidth:!0,theme:"redux-color",look:"neo",width:800,height:450,padding:8,useDebugLayout:!1},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},theme:"default",look:"classic",handDrawnSeed:0,layout:"elk",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},te={...tt,deterministicIDSeed:void 0,elk:{mergeEdges:!1,straightenEdges:!0,lineHops:!0,preset:"default",nodePlacementStrategy:void 0,layeringStrategy:void 0,cycleBreakingStrategy:void 0,layeringLayerBound:4,nodePlacementAlignment:void 0,forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES",keepEntryNodeOnTop:!1},themeCSS:void 0,themeVariables:J.default.getThemeVariables(),sequence:{...tt.sequence,messageFont:(0,n.K)(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:(0,n.K)(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:(0,n.K)(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{theme:tt.class?.theme,look:tt.class?.look,layout:tt.class?.layout,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...tt.gantt,tickInterval:void 0,useWidth:void 0},c4:{...tt.c4,useWidth:void 0,personFont:(0,n.K)(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...tt.flowchart,inheritDir:!1},external_personFont:(0,n.K)(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:(0,n.K)(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:(0,n.K)(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:(0,n.K)(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:(0,n.K)(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:(0,n.K)(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:(0,n.K)(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:(0,n.K)(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:(0,n.K)(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:(0,n.K)(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:(0,n.K)(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:(0,n.K)(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:(0,n.K)(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:(0,n.K)(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:(0,n.K)(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:(0,n.K)(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:(0,n.K)(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:(0,n.K)(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:(0,n.K)(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:(0,n.K)(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:(0,n.K)(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...tt.pie,useWidth:984},xyChart:{...tt.xyChart,useWidth:void 0},requirement:{...tt.requirement,useWidth:void 0},packet:{...tt.packet},eventmodeling:{...tt.eventmodeling},treeView:{...tt.treeView,useWidth:void 0},radar:{...tt.radar},usecase:{...tt.usecase},railroad:{...tt.railroad,fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0},ishikawa:{...tt.ishikawa},sankey:{...tt.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...tt.venn},cynefin:{...tt.cynefin}},tr=(0,n.K)((t,e="")=>Object.keys(t).reduce((r,i)=>Array.isArray(t[i])?r:"object"==typeof t[i]&&null!==t[i]?[...r,e+i,...tr(t[i],"")]:[...r,e+i],[]),"keyify"),ti=new Set(tr(te,"")),to=te,ta={"flowchart-v2":"flowchart","flowchart-elk":"flowchart",classDiagram:"class",stateDiagram:"state",xychart:"xyChart",railroadAbnf:"railroad",railroadEbnf:"railroad",railroadPeg:"railroad"},ts=(0,n.K)(t=>ta[t]??t,"getDiagramConfigKey"),tn={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},tl=(0,n.K)((t,e)=>{for(let r of Object.keys(t)){let i=t[r];(r.startsWith("__")||r.includes("proto")||r.includes("constr")||"string"!=typeof i||!e.test(i))&&(s.R.debug("sanitize deleting dictionary entry:",r,i),delete t[r])}},"sanitizeDictionaryConfig"),th=(0,n.K)(t=>{if(s.R.debug("sanitizeDirective called with",t),"object"==typeof t&&null!=t){if(Array.isArray(t))return void t.forEach(t=>th(t));for(let e of Object.keys(t)){if(s.R.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!ti.has(e)||null==t[e]){s.R.debug("sanitize deleting key: ",e),delete t[e];continue}if("object"==typeof t[e]){let r=tn[e];r?tl(t[e],r):(s.R.debug("sanitizing object",e),th(t[e]));continue}for(let r of["themeCSS","fontFamily","altFontFamily"])e.includes(r)&&(s.R.debug("sanitizing css option",e),t[e]=tc(t[e]))}if(t.themeVariables)for(let e of Object.keys(t.themeVariables)){let r=t.themeVariables[e];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}s.R.debug("After sanitization",t)}},"sanitizeDirective"),tc=(0,n.K)(t=>{let e=0,r=0;for(let i of t){if(e<r)return"{ /* ERROR: Unbalanced CSS */ }";"{"===i?e++:"}"===i&&r++}return e!==r?"{ /* ERROR: Unbalanced CSS */ }":t},"sanitizeCss"),td=Object.freeze(to),tu=["theme","look","layout"],tg=new Set(["classic","handDrawn","neo"]),tp=(0,n.K)((t,e)=>"theme"===t?"null"===e||Object.hasOwn(J,e):"look"!==t||tg.has(e),"isUsableAppearance"),tf=(0,n.K)((t,e,r)=>{if(!t)return;let i=t[e];return[i?.[r],t[r]].find(t=>void 0!==t&&tp(r,t))},"readAppearance"),ty=(0,n.K)(t=>!(!1===t||["false","null","0"].includes(String(t).trim().toLowerCase())),"evaluate"),tm=F({},td),tC={},tx=[],tb=F({},td),tk=(0,n.K)((t,e)=>{if(!a)return;let r=[e,...[...tx].reverse(),tC,td],i=t[a];for(let e of tu)for(let o of r){let r=tf(o,a,e);if(void 0!==r){t[e]=r,i?.[e]!==void 0&&(i[e]=r);break}}},"resolveAppearance"),tw=(0,n.K)((t,e)=>{let r=F({},t),i={};for(let t of e)tA(t),i=F(i,t);if(tk(r=F(r,i),i),(i.theme||r.theme!==t.theme)&&r.theme&&Object.hasOwn(J,r.theme)){let t=F({},o),e=F(t.themeVariables||{},i.themeVariables);r.themeVariables=J[r.theme].getThemeVariables(e)}return tD(tb=r),tb},"updateCurrentConfig"),tB=(0,n.K)(t=>{a=void 0===t?void 0:ts(t),tw(tm,tx)},"setDiagramConfigScope"),tT=(0,n.K)(t=>(tm=F({},td),tm=F(tm,t),tC=F({},t),t.theme&&Object.hasOwn(J,t.theme)&&(tm.themeVariables=J[t.theme].getThemeVariables(t.themeVariables)),tw(tm,tx),tm),"setSiteConfig"),tS=(0,n.K)(t=>{o=F({},t)},"saveConfigFromInitialize"),tv=(0,n.K)(t=>(tm=F(tm,t),tC=F(tC,t),tw(tm,tx),tm),"updateSiteConfig"),t_=(0,n.K)(()=>F({},tm),"getSiteConfig"),tF=(0,n.K)(t=>(tw(tb,[t]),tL()),"setConfig"),tL=(0,n.K)(()=>F({},tb),"getConfig"),tA=(0,n.K)(t=>{t&&(["secure",...tm.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(s.R.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])}),Object.keys(t).forEach(e=>{e.startsWith("__")&&delete t[e]}),Object.keys(t).forEach(e=>{"string"==typeof t[e]&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],"object"==typeof t[e]&&tA(t[e])}))},"sanitize"),tM=(0,n.K)(t=>{th(t),t.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),tx.push(t),tw(tm,tx)},"addDirective"),t$=(0,n.K)((t=tm)=>{a=void 0,tw(t,tx=[])},"reset"),tE={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},tK={},tO=(0,n.K)(t=>{tK[t]||(s.R.warn(tE[t]),tK[t]=!0)},"issueWarning"),tD=(0,n.K)(t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&tO("LAZY_LOAD_DEPRECATED")},"checkConfig"),tq=(0,n.K)(()=>{let t={};for(let e of(o&&(t=F(t,o)),tx))t=F(t,e);return t},"getUserDefinedConfig"),tI=(0,n.K)(t=>(t.flowchart?.htmlLabels!=void 0&&tO("FLOWCHART_HTML_LABELS_DEPRECATED"),ty(t.htmlLabels??t.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels"),tP=/<\/?br\s*\/?>/gi,tW=RegExp(tP.source,"i"),tz=(0,n.K)(t=>t?tZ(t).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),tR=(i=!1,()=>{i||(tj(),i=!0)});function tj(){let t="data-temp-href-target";y.A.addHook("beforeSanitizeAttributes",e=>{"A"===e.tagName&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")}),y.A.addHook("afterSanitizeAttributes",e=>{"A"===e.tagName&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)??""),e.removeAttribute(t),"_blank"===e.getAttribute("target")&&e.setAttribute("rel","noopener"))})}(0,n.K)(tj,"setupDompurifyHooks");var tN=(0,n.K)(t=>(tR(),y.A.sanitize(t)),"removeScript"),tH=(0,n.K)((t,e)=>{if(tI(e)){let r=e.securityLevel;"antiscript"===r||"strict"===r||"sandbox"===r?t=tN(t):"loose"!==r&&(t=tV(t=(t=(t=tZ(t)).replace(/</g,"<").replace(/>/g,">")).replace(/=/g,"=")))}return t},"sanitizeMore"),tU=(0,n.K)((t,e)=>t?t=e.dompurifyConfig?y.A.sanitize(tH(t,e),e.dompurifyConfig).toString():y.A.sanitize(tH(t,e),{FORBID_TAGS:["style"]}).toString():t,"sanitizeText"),tY=(0,n.K)((t,e)=>"string"==typeof t?tU(t,e):t.flat().map(t=>tU(t,e)),"sanitizeTextOrArray"),tX=(0,n.K)(t=>tW.test(t),"hasBreaks"),tG=(0,n.K)(t=>t.split(tP),"splitBreaks"),tV=(0,n.K)(t=>t.replace(/#br#/g,"<br/>"),"placeholderToBreak"),tZ=(0,n.K)(t=>t.replace(tP,"#br#"),"breakToPlaceholder"),tQ=(0,n.K)(t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e)),e},"getUrl"),tJ=(0,n.K)(function(...t){return Math.max(...t.filter(t=>!isNaN(t)))},"getMax"),t0=(0,n.K)(function(...t){return Math.min(...t.filter(t=>!isNaN(t)))},"getMin"),t1=(0,n.K)(function(t){let e=t.split(/(,)/),r=[];for(let t=0;t<e.length;t++){let i=e[t];if(","===i&&t>0&&t+1<e.length){let o=e[t-1],a=e[t+1];t5(o,a)&&(i=o+","+a,t++,r.pop())}r.push(t3(i))}return r.join("")},"parseGenericTypes"),t2=(0,n.K)((t,e)=>Math.max(0,t.split(e).length-1),"countOccurrence"),t5=(0,n.K)((t,e)=>{let r=t2(t,"~"),i=t2(e,"~");return 1===r&&1===i},"shouldCombineSets"),t3=(0,n.K)(t=>{let e=t2(t,"~"),r=!1;if(e<=1)return t;e%2!=0&&t.startsWith("~")&&(t=t.substring(1),r=!0);let i=[...t],o=i.indexOf("~"),a=i.lastIndexOf("~");for(;-1!==o&&-1!==a&&o!==a;)i[o]="<",i[a]=">",o=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),t4=(0,n.K)(()=>void 0!==window.MathMLElement,"isMathMLSupported"),t6=/\$\$(.*?)\$\$/g,t8=(0,n.K)(t=>(t.match(t6)?.length??0)>0,"hasKatex"),t7=(0,n.K)(async(t,e)=>{let r=document.createElement("div");r.innerHTML=await et(t,e),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";let i=document.querySelector("body");i?.insertAdjacentElement("beforeend",r);let o={width:r.clientWidth,height:r.clientHeight};return r.remove(),o},"calculateMathMLDimensions"),t9=(0,n.K)(async(t,e)=>{if(!t8(t))return t;if(!(t4()||e.legacyMathML||e.forceLegacyMathML))return t.replace(t6,"MathML is unsupported in this environment.");{let{default:i}=await r.e(121).then(r.bind(r,"d0")),o=e.forceLegacyMathML||!t4()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(tP).map(t=>t8(t)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${t}</div>`:`<div>${t}</div>`).join("").replace(t6,(t,e)=>i.renderToString(e,{throwOnError:!0,displayMode:!0,output:o}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),et=(0,n.K)(async(t,e)=>tU(await t9(t,e),e),"renderKatexSanitized"),ee={getRows:tz,sanitizeText:tU,sanitizeTextOrArray:tY,hasBreaks:tX,splitBreaks:tG,lineBreakRegex:tP,removeScript:tN,getUrl:tQ,evaluate:ty,getMax:tJ,getMin:t0},er=(0,n.K)(function(t,e){for(let r of e)t.attr(r[0],r[1])},"d3Attrs"),ei=(0,n.K)(function(t,e,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${e}px;`)):(i.set("height",t),i.set("width",e)),i},"calculateSvgSizeAttrs"),eo=(0,n.K)(function(t,e,r,i){er(t,ei(e,r,i))},"configureSvgSize"),ea=(0,n.K)(function(t,e,r,i){let o=e.node().getBBox(),a=o.width,n=o.height;s.R.info(`SVG bounds: ${a}x${n}`,o);let l=0,h=0;s.R.info(`Graph bounds: ${l}x${h}`,t),l=a+2*r,h=n+2*r,s.R.info(`Calculated bounds: ${l}x${h}`),eo(e,h,l,i);let c=`${o.x-r} ${o.y-r} ${o.width+2*r} ${o.height+2*r}`;e.attr("viewBox",c)},"setupGraphViewbox"),es={};function en(t){return[...t.cssRules].map(t=>t.cssText).join("\n")}(0,n.K)(en,"cssStyleSheetToString");var el=(0,n.K)((t,e,r,i)=>{let o="";return t in es&&es[t]?o=es[t]({...r,svgId:i}):s.R.warn(`No theme found for ${t}`),`& {
|
|
65
|
-
font-family: ${r.fontFamily};
|
|
66
|
-
font-size: ${r.fontSize};
|
|
67
|
-
fill: ${r.textColor}
|
|
68
|
-
}
|
|
69
|
-
@keyframes edge-animation-frame {
|
|
70
|
-
from {
|
|
71
|
-
stroke-dashoffset: 0;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
@keyframes dash {
|
|
75
|
-
to {
|
|
76
|
-
stroke-dashoffset: 0;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
& .edge-animation-slow {
|
|
80
|
-
stroke-dasharray: 9,5 !important;
|
|
81
|
-
stroke-dashoffset: 900;
|
|
82
|
-
animation: dash 50s linear infinite;
|
|
83
|
-
stroke-linecap: round;
|
|
84
|
-
}
|
|
85
|
-
& .edge-animation-fast {
|
|
86
|
-
stroke-dasharray: 9,5 !important;
|
|
87
|
-
stroke-dashoffset: 900;
|
|
88
|
-
animation: dash 20s linear infinite;
|
|
89
|
-
stroke-linecap: round;
|
|
90
|
-
}
|
|
91
|
-
/* Classes common for multiple diagrams */
|
|
92
|
-
|
|
93
|
-
& .error-icon {
|
|
94
|
-
fill: ${r.errorBkgColor};
|
|
95
|
-
}
|
|
96
|
-
& .error-text {
|
|
97
|
-
fill: ${r.errorTextColor};
|
|
98
|
-
stroke: ${r.errorTextColor};
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
& .edge-thickness-normal {
|
|
102
|
-
stroke-width: ${r.strokeWidth??1}px;
|
|
103
|
-
}
|
|
104
|
-
& .edge-thickness-thick {
|
|
105
|
-
stroke-width: 3.5px
|
|
106
|
-
}
|
|
107
|
-
& .edge-pattern-solid {
|
|
108
|
-
stroke-dasharray: 0;
|
|
109
|
-
}
|
|
110
|
-
& .edge-thickness-invisible {
|
|
111
|
-
stroke-width: 0;
|
|
112
|
-
fill: none;
|
|
113
|
-
}
|
|
114
|
-
& .edge-pattern-dashed{
|
|
115
|
-
stroke-dasharray: 3;
|
|
116
|
-
}
|
|
117
|
-
.edge-pattern-dotted {
|
|
118
|
-
stroke-dasharray: 2;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
& .marker {
|
|
122
|
-
fill: ${r.lineColor};
|
|
123
|
-
stroke: ${r.lineColor};
|
|
124
|
-
}
|
|
125
|
-
& .marker.cross {
|
|
126
|
-
stroke: ${r.lineColor};
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
& svg {
|
|
130
|
-
font-family: ${r.fontFamily};
|
|
131
|
-
font-size: ${r.fontSize};
|
|
132
|
-
}
|
|
133
|
-
& p {
|
|
134
|
-
margin: 0
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
${o}
|
|
138
|
-
.node .neo-node {
|
|
139
|
-
stroke: ${r.nodeBorder};
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
[data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
|
|
143
|
-
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
144
|
-
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
145
|
-
}
|
|
146
|
-
[data-look="neo"].swimlane.cluster rect {
|
|
147
|
-
filter: none;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
[data-look="neo"].node path {
|
|
152
|
-
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
153
|
-
stroke-width: ${r.strokeWidth??1}px;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
[data-look="neo"].node .outer-path {
|
|
157
|
-
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
[data-look="neo"].node .neo-line path {
|
|
161
|
-
stroke: ${r.nodeBorder};
|
|
162
|
-
filter: none;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
[data-look="neo"].node circle{
|
|
166
|
-
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
167
|
-
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
[data-look="neo"].node circle .state-start{
|
|
171
|
-
fill: #000000;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
[data-look="neo"].icon-shape .icon {
|
|
175
|
-
fill: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
176
|
-
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
[data-look="neo"].icon-shape .icon-neo path {
|
|
180
|
-
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
181
|
-
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
${e}
|
|
185
|
-
`},"getStyles"),eh=(0,n.K)((t,e)=>{void 0!==e&&(es[t]=e)},"addStylesForDiagram"),ec=el,ed={};(0,n.V)(ed,{clear:()=>ey,getAccDescription:()=>eb,getAccTitle:()=>eC,getDiagramTitle:()=>ew,setAccDescription:()=>ex,setAccTitle:()=>em,setDiagramTitle:()=>ek});var eu="",eg="",ep="",ef=(0,n.K)(t=>tU(t,tL()),"sanitizeText"),ey=(0,n.K)(()=>{eu="",ep="",eg=""},"clear"),em=(0,n.K)(t=>{eu=ef(t).replace(/^\s+/g,"")},"setAccTitle"),eC=(0,n.K)(()=>eu,"getAccTitle"),ex=(0,n.K)(t=>{ep=ef(t).replace(/\n\s+/g,"\n")},"setAccDescription"),eb=(0,n.K)(()=>ep,"getAccDescription"),ek=(0,n.K)(t=>{eg=ef(t)},"setDiagramTitle"),ew=(0,n.K)(()=>eg,"getDiagramTitle"),eB=s.R,eT=s.H,eS=tL,ev=tF,e_=td,eF=(0,n.K)(t=>tU(t,eS()),"sanitizeText"),eL=ea,eA=(0,n.K)(()=>ed,"getCommonDb"),eM={},e$=(0,n.K)((t,e,r)=>{eM[t]&&eB.warn(`Diagram with id ${t} already registered. Overwriting.`),eM[t]=e,r&&S(t,r),eh(t,e.styles),e.injectUtils?.(eB,eT,eS,eF,eL,eA(),()=>{})},"registerDiagram"),eE=(0,n.K)(t=>{if(t in eM)return eM[t];throw new eK(t)},"getDiagram"),eK=class extends Error{static{(0,n.K)(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}}},ix(t,e,r){"use strict";var i=r("bQ"),o=r("Ut"),a=r("PF"),s=r("iV"),n=r("pK"),l=r("Yr"),h=r("M4"),c=r("Gt"),d=r("El"),u=r("nh"),g=(0,c.K)(async(t,e)=>{let r,i,c=(0,l.D7)(),{theme:g,themeVariables:p,handDrawnSeed:f}=c,{clusterBkg:y,clusterBorder:m,borderColorArray:C}=p,{labelStyles:x,nodeStyles:b,borderStyles:k,backgroundStyles:w}=(0,a.GX)(e),B=t.insert("g").attr("class","cluster swimlane "+(e.cssClasses||"")).attr("id",e.id).attr("data-id",e.id).attr("data-et","cluster").attr("data-look",e.look);(0,n.XE)(B,e.colorIndex,g,C);let T=(0,l._3)(c.flowchart.htmlLabels),S="LR"===e.direction,v=B.insert("g").attr("class","cluster-label swimlane-label"),_=await (0,s.GZ)(v,e.label,{style:e.labelStyle,useHtmlLabels:T,isNode:!0,width:e.width}),F=_.getBBox();if(T){let t=_.children[0],e=(0,d.Ltv)(_);F=t.getBoundingClientRect(),e.attr("width",F.width),e.attr("height",F.height)}let L=e.padding??0,A=e.width<=F.width+L?F.width+L:e.width;e.width<=F.width+L?e.diff=(A-e.width)/2-L:e.diff=-L;let M=e.height,$=e.y-M/2,E=e.y+M/2,K=e.x-A/2,O=void 0!==e.swimlaneContentTop?e.swimlaneContentTop:$+M/3,D=4*!!S,q=F.height+2*D;if(S){let t=Math.max(q,F.height+2*D),o=K+t,s=Math.max(0,A-t);if("handDrawn"===e.look){let n=u.A.svg(B),l=(0,a.Fr)(e,{roughness:.7,fill:y,stroke:m,seed:f}),h=(0,a.Fr)(e,{roughness:.7,fill:"none",stroke:m,seed:f}),c=n.rectangle(K,$,t,M,l);r=B.insert(()=>c,":first-child").attr("class","swimlane-title");let d=n.rectangle(o,$,s,M,h);i=B.insert(()=>d,":first-child").attr("class","swimlane-body"),r.select("path:nth-child(2)").attr("style",k.join(";")),r.select("path").attr("style",w.join(";").replace("fill","stroke"))}else r=B.insert("rect",":first-child"),i=B.insert("rect",":first-child"),r.attr("class","swimlane-title").attr("style",b).attr("x",K).attr("y",$).attr("width",t).attr("height",M).attr("fill",y).attr("stroke",m),i.attr("class","swimlane-body").attr("style",b).attr("x",o).attr("y",$).attr("width",s).attr("height",M).attr("fill","none").attr("stroke",m);let n=K+t/2,l=e.y;v.attr("transform",`translate(${n}, ${l}) rotate(-90) translate(${-F.width/2}, ${-F.height/2})`)}else{let t=Math.min(q,Math.max(0,O-$)),o=$+t,s=Math.max(0,E-o),n=e.x-A/2;if("handDrawn"===e.look){let l=u.A.svg(B),h=(0,a.Fr)(e,{roughness:.7,fill:y,stroke:m,fillWeight:3,seed:f}),c=(0,a.Fr)(e,{roughness:.7,fill:"none",stroke:m,seed:f}),d=l.rectangle(n,$,A,t,h);r=B.insert(()=>d,":first-child").attr("class","swimlane-title");let g=l.rectangle(n,o,A,s,c);i=B.insert(()=>g,":first-child").attr("class","swimlane-body"),r.select("path:nth-child(2)").attr("style",k.join(";")),r.select("path").attr("style",w.join(";").replace("fill","stroke"))}else r=B.insert("rect",":first-child"),i=B.insert("rect",":first-child"),r.attr("class","swimlane-title").attr("style",b).attr("x",n).attr("y",$).attr("width",A).attr("height",t).attr("fill",y).attr("stroke",m),i.attr("class","swimlane-body").attr("style",b).attr("x",n).attr("y",o).attr("width",A).attr("height",s).attr("fill","none").attr("stroke",m);let l=e.x-F.width/2,h=$+(t-F.height)/2;v.attr("transform",`translate(${l}, ${h})`)}if(h.R.trace("Swimlane data ",e,JSON.stringify(e)),x){let t=v.select("span");t&&t.attr("style",x)}return e.offsetX=0,e.width=A,e.height=M,e.offsetY=F.height-L/2,e.intersect=function(t){return(0,o.nM)(e,t)},{cluster:B,labelBBox:F}},"swimlane"),p=(0,c.K)(async(t,e)=>{let r,c;h.R.info("Creating subgraph rect for ",e.id,e);let g=(0,l.D7)(),{theme:p,themeVariables:f,handDrawnSeed:y}=g,{clusterBkg:m,clusterBorder:C,borderColorArray:x}=f,{labelStyles:b,nodeStyles:k,borderStyles:w,backgroundStyles:B}=(0,a.GX)(e),T=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look);(0,n.XE)(T,e.colorIndex,p,x);let S=(0,l.E)(g),v=T.insert("g").attr("class","cluster-label "),_=(r="markdown"===e.labelType?await (0,s.GZ)(v,e.label,{style:e.labelStyle,useHtmlLabels:S,isNode:!0,width:e.width}):await (0,o.DA)(v,e.label,e.labelStyle||"",!1,!0)).getBBox();if((0,l.E)(g)){let t=r.children[0],e=(0,d.Ltv)(r);_=t.getBoundingClientRect(),e.attr("width",_.width),e.attr("height",_.height)}let F=e.width<=_.width+e.padding?_.width+e.padding:e.width;e.width<=_.width+e.padding?e.diff=(F-e.width)/2-e.padding:e.diff=-e.padding;let L=e.height,A=e.x-F/2,M=e.y-L/2;if(h.R.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){let t=u.A.svg(T),r=(0,a.Fr)(e,{roughness:.7,fill:m,stroke:C,fillWeight:3,seed:y}),i=t.path((0,o.FA)(A,M,F,L,0),r);(c=T.insert(()=>(h.R.debug("Rough node insert CXC",i),i),":first-child")).select("path:nth-child(2)").attr("style",w.join(";")),c.select("path").attr("style",B.join(";").replace("fill","stroke"))}else(c=T.insert("rect",":first-child")).attr("style",k).attr("rx",e.rx).attr("ry",e.ry).attr("x",A).attr("y",M).attr("width",F).attr("height",L);let{subGraphTitleTopMargin:$}=(0,i.Oi)(g);if(v.attr("transform",`translate(${e.x-_.width/2}, ${e.y-e.height/2+$})`),b){let t=v.select("span");t&&t.attr("style",b)}let E=c.node().getBBox();return e.offsetX=0,e.width=E.width,e.height=E.height,e.offsetY=_.height-e.padding/2,e.intersect=function(t){return(0,o.nM)(e,t)},{cluster:T,labelBBox:_}},"rect"),f=(0,c.K)((t,e)=>{let r=t.insert("g").attr("class","note-cluster").attr("id",e.domId),i=r.insert("rect",":first-child"),a=0*e.padding,s=a/2;i.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-s).attr("y",e.y-e.height/2-s).attr("width",e.width+a).attr("height",e.height+a).attr("fill","none");let n=i.node().getBBox();return e.width=n.width,e.height=n.height,e.intersect=function(t){return(0,o.nM)(e,t)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),y=(0,c.K)(async(t,e)=>{let r,i=(0,l.D7)(),{theme:a,themeVariables:s,handDrawnSeed:h}=i,{altBackground:c,borderColorArray:g,compositeBackground:p,compositeTitleBackground:f,nodeBorder:y}=s,m=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-id",e.id).attr("data-look",e.look);(0,n.XE)(m,e.colorIndex,a,g);let C=m.insert("g",":first-child"),x=m.insert("g").attr("class","cluster-label"),b=m.append("rect"),k=await (0,o.DA)(x,e.label,e.labelStyle,void 0,!0),w=k.getBBox();if((0,l.E)(i)){let t=k.children[0],e=(0,d.Ltv)(k);w=t.getBoundingClientRect(),e.attr("width",w.width),e.attr("height",w.height)}let B=0*e.padding,T=(e.width<=w.width+e.padding?w.width+e.padding:e.width)+B;e.width<=w.width+e.padding?e.diff=(T-e.width)/2-e.padding:e.diff=-e.padding;let S=e.height+B,v=e.height+B-w.height-6,_=e.x-T/2,F=e.y-S/2;e.width=T;let L=e.y-e.height/2-B/2+w.height+2;if("handDrawn"===e.look){let t=e.cssClasses.includes("statediagram-cluster-alt"),i=u.A.svg(m),a=e.rx||e.ry?i.path((0,o.FA)(_,F,T,S,10),{roughness:.7,fill:f,fillStyle:"solid",stroke:y,seed:h}):i.rectangle(_,F,T,S,{seed:h});r=m.insert(()=>a,":first-child");let s=i.rectangle(_,L,T,v,{fill:t?c:p,fillStyle:t?"hachure":"solid",stroke:y,seed:h});r=m.insert(()=>a,":first-child"),b=m.insert(()=>s),r.attr("class","outer"),b.attr("class","inner")}else(r=C.insert("rect",":first-child")).attr("class","outer").attr("x",_).attr("y",F).attr("width",T).attr("height",S).attr("data-look",e.look),b.attr("class","inner").attr("x",_).attr("y",L).attr("width",T).attr("height",v);return x.attr("transform",`translate(${e.x-w.width/2}, ${F+1-3*!(0,l.E)(i)})`),e.height=r.node().getBBox().height,e.offsetX=0,e.offsetY=w.height-e.padding/2,e.labelBBox=w,e.intersect=function(t){return(0,o.nM)(e,t)},{cluster:m,labelBBox:w}},"roundedWithTitle"),m=(0,c.K)(async(t,e)=>{let r;h.R.info("Creating subgraph rect for ",e.id,e);let n=(0,l.D7)(),{themeVariables:c,handDrawnSeed:g}=n,{clusterBkg:p,clusterBorder:f}=c,{labelStyles:y,nodeStyles:m,borderStyles:C,backgroundStyles:x}=(0,a.GX)(e),b=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),k=(0,l.E)(n),w=b.insert("g").attr("class","cluster-label "),B=await (0,s.GZ)(w,e.label,{style:e.labelStyle,useHtmlLabels:k,isNode:!0,width:e.width}),T=B.getBBox();if((0,l.E)(n)){let t=B.children[0],e=(0,d.Ltv)(B);T=t.getBoundingClientRect(),e.attr("width",T.width),e.attr("height",T.height)}let S=e.width<=T.width+e.padding?T.width+e.padding:e.width;e.width<=T.width+e.padding?e.diff=(S-e.width)/2-e.padding:e.diff=-e.padding;let v=e.height,_=e.x-S/2,F=e.y-v/2;if(h.R.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){let t=u.A.svg(b),i=(0,a.Fr)(e,{roughness:.7,fill:p,stroke:f,fillWeight:4,seed:g}),s=t.path((0,o.FA)(_,F,S,v,e.rx),i);(r=b.insert(()=>(h.R.debug("Rough node insert CXC",s),s),":first-child")).select("path:nth-child(2)").attr("style",C.join(";")),r.select("path").attr("style",x.join(";").replace("fill","stroke"))}else(r=b.insert("rect",":first-child")).attr("style",m).attr("rx",e.rx).attr("ry",e.ry).attr("x",_).attr("y",F).attr("width",S).attr("height",v);let{subGraphTitleTopMargin:L}=(0,i.Oi)(n);if(w.attr("transform",`translate(${e.x-T.width/2}, ${e.y-e.height/2+L})`),y){let t=w.select("span");t&&t.attr("style",y)}let A=r.node().getBBox();return e.offsetX=0,e.width=A.width,e.height=A.height,e.offsetY=T.height-e.padding/2,e.intersect=function(t){return(0,o.nM)(e,t)},{cluster:b,labelBBox:T}},"kanbanSection"),C=(0,c.K)((t,e)=>{let r,{theme:i,themeVariables:a,handDrawnSeed:s}=(0,l.D7)(),{altBackground:h,nodeBorder:c,borderColorArray:d}=a,g=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-look",e.look);(0,n.XE)(g,e.colorIndex,i,d);let p=g.insert("g",":first-child"),f=0*e.padding,y=e.width+f;e.diff=-e.padding;let m=e.height+f,C=e.x-y/2,x=e.y-m/2;if(e.width=y,"handDrawn"===e.look){let t=u.A.svg(g).rectangle(C,x,y,m,{fill:h??"#efefef",fillStyle:"solid",roughness:.5,strokeLineDash:[5],stroke:c,seed:s});r=g.insert(()=>t,":first-child").attr("class","divider")}else{r=p.insert("rect",":first-child");let t="outer";e.look,t="divider",r.attr("class",t).attr("x",C).attr("y",x).attr("width",y).attr("height",m).attr("data-look",e.look)}return e.height=r.node().getBBox().height,e.offsetX=0,e.offsetY=0,e.intersect=function(t){return(0,o.nM)(e,t)},{cluster:g,labelBBox:{}}},"divider"),x=(0,c.K)(async(t,e,r)=>{let c;h.R.info(`Creating ${r.cssClass} for `,e.id,e);let g=(0,l.D7)(),{theme:p,themeVariables:f,handDrawnSeed:y}=g,{borderColorArray:m}=f,{labelStyles:C,borderStyles:x}=(0,a.GX)(e),b=t.insert("g").attr("class","cluster "+r.cssClass+" "+e.cssClasses).attr("id",e.domId??e.id).attr("data-look",e.look);(0,n.XE)(b,e.colorIndex,p,m);let k=(0,l.E)(g),w=b.insert("g").attr("class","cluster-label"),B={width:0,height:0},T=e.label?.trim();if(T){let t;if(B=(t="markdown"===e.labelType?await (0,s.GZ)(w,e.label,{style:e.labelStyle,useHtmlLabels:k,isNode:!0,width:e.width}):await (0,o.DA)(w,e.label,e.labelStyle||"",!1,!0)).getBBox(),k){let e=t.children[0],r=(0,d.Ltv)(t);B=e.getBoundingClientRect(),r.attr("width",B.width),r.attr("height",B.height)}}let S=e.width<=B.width+e.padding?B.width+e.padding:e.width;e.width<=B.width+e.padding?e.diff=(S-e.width)/2-e.padding:e.diff=-e.padding;let v=e.height,_=e.x-S/2,F=e.y-v/2;if("handDrawn"===e.look){let t=u.A.svg(b),i=(0,a.Fr)(e,{roughness:r.roughness,fill:r.fill,stroke:r.stroke,strokeWidth:r.strokeWidth,seed:y,..."none"===r.fill?{fillWeight:0}:{fillStyle:"solid"},...r.strokeDash?{strokeLineDash:r.strokeDash}:{}}),s=t.path((0,o.FA)(_,F,S,v,r.rx),i);(c=b.insert(()=>s,":first-child")).select("path:nth-child(2)").attr("style",x.join(";"))}else(c=b.insert("rect",":first-child")).attr("rx",r.rx).attr("ry",r.rx).attr("x",_).attr("y",F).attr("width",S).attr("height",v).attr("fill",r.fill).attr("stroke",r.stroke).attr("stroke-width",r.strokeWidth+"px"),r.strokeDash&&c.attr("stroke-dasharray",r.strokeDash.join(", "));if(T){let{subGraphTitleTopMargin:t}=(0,i.Oi)(g);if(w.attr("transform",`translate(${e.x-B.width/2}, ${e.y-e.height/2+t})`),C){let t=w.select("span");t&&t.attr("style",C)}}let L=c.node().getBBox();return e.offsetX=0,e.width=L.width,e.height=L.height,e.offsetY=B.height-e.padding/2,e.intersect=function(t){return(0,o.nM)(e,t)},{cluster:b,labelBBox:B}},"createContainerGroup"),b=(0,c.K)(async(t,e)=>{let{themeVariables:r}=(0,l.D7)();return x(t,e,{cssClass:"flow-cluster",rx:10,fill:"none",stroke:r.flowContainerStroke||r.secondaryBorderColor,strokeWidth:.75,roughness:.7})},"flowGroup"),k=(0,c.K)((t,e)=>{let r=t.boundaryType||"rect",i="package"===r?20:t.padding,o="package"===r?e.height+10:0,a=Math.max(t.width,e.width+i),s="package"===r?Math.max(t.height,o+2*t.padding):t.height,n=t.x-a/2,l=t.y-s/2;return{boundaryType:r,width:a,height:s,x:n,y:l,bodyY:l+o,bodyHeight:s-o,tabHeight:o,tabWidth:"package"===r?Math.min(a,Math.max(80,e.width+20)):0}},"getUsecaseSystemBoundaryGeometry"),w={rect:p,squareRect:p,roundedWithTitle:y,noteGroup:f,divider:C,kanbanSection:m,flowGroup:b,usecaseSystemBoundary:(0,c.K)(async(t,e)=>{h.R.info("Creating usecase system boundary for ",e.id,e);let r=(0,l.D7)(),{theme:c,themeVariables:g,handDrawnSeed:p}=r,{clusterBkg:f,clusterBorder:y,borderColorArray:m}=g,{labelStyles:C,nodeStyles:x}=(0,a.GX)(e),{stylesMap:b}=(0,a.WW)(e),w=e.boundaryType||"rect",B=t.insert("g").attr("class",`cluster usecase-system-boundary usecase-system-boundary-${w} ${e.cssClasses}`).attr("id","string"==typeof e.domId?e.domId:e.id).attr("data-boundary-type",w).attr("data-look",e.look);(0,n.XE)(B,e.colorIndex,c,m);let T=(0,l.E)(r),S=B.insert("g").attr("class","cluster-label system-boundary-title"),v=await (0,s.GZ)(S,e.label,{style:C,useHtmlLabels:T,isNode:!0}),_=v.getBBox();if(T){let t=v.children[0],e=(0,d.Ltv)(v);_=t.getBoundingClientRect(),e.attr("width",_.width),e.attr("height",_.height)}let{width:F,height:L,x:A,y:M,bodyY:$,bodyHeight:E,tabHeight:K,tabWidth:O}=k(e,_);e.diff=e.width<=_.width+e.padding?(F-e.width)/2-e.padding:-e.padding;let D=(0,a.Fr)(e,{fill:b.get("fill")||f,stroke:b.get("stroke")||y,strokeWidth:b.get("stroke-width")?.replace("px","")||1,seed:p});if("handDrawn"===e.look){let t=u.A.svg(B),e=t.rectangle(A,$,F,E,D);if(B.insert(()=>e,":first-child").attr("class","boundary-body label-container"),"package"===w){let e=t.rectangle(A,M,O,K,D);B.insert(()=>e,":first-child").attr("class","boundary-tab system-boundary-package-tab label-container")}}else B.insert("rect",":first-child").attr("class","boundary-body label-container").attr("style",x).attr("x",A).attr("y",$).attr("width",F).attr("height",E),"package"===w&&B.insert("rect",":first-child").attr("class","boundary-tab system-boundary-package-tab label-container").attr("style",x).attr("x",A).attr("y",M).attr("width",O).attr("height",K);let{subGraphTitleTopMargin:q}=(0,i.Oi)(r);return"package"===w?S.attr("transform",`translate(${A+(O-_.width)/2}, ${M+(K-_.height)/2})`):S.attr("transform",`translate(${e.x-_.width/2}, ${M+q})`),C&&(S.attr("style",C),S.select("span").attr("style",C)),e.offsetX=0,e.width=F,e.height=L,e.offsetY=_.height-e.padding/2,e.labelBBox=_,e.intersect=function(t){return(0,o.nM)(e,t)},{cluster:B,labelBBox:_}},"usecaseSystemBoundary"),swimlane:g},B=new Set(["noteGroup","divider"]),T=(0,c.K)(t=>!B.has(t??"rect"),"clusterPaintsTitle"),S=new Map,v=(0,c.K)(async(t,e)=>{let r=e.shape||"rect",i=await w[r](t,e);return S.set(e.id,i),i},"insertCluster"),_=(0,c.K)(()=>{S=new Map},"clear");r.d(e,{IU:()=>_,U:()=>v,qV:()=>T})},M4(t,e,r){"use strict";var i=r("Gt"),o=r("h0"),a={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},s={trace:(0,i.K)((...t)=>{},"trace"),debug:(0,i.K)((...t)=>{},"debug"),info:(0,i.K)((...t)=>{},"info"),warn:(0,i.K)((...t)=>{},"warn"),error:(0,i.K)((...t)=>{},"error"),fatal:(0,i.K)((...t)=>{},"fatal")},n=(0,i.K)(function(t="fatal"){let e=a.fatal;"string"==typeof t?t.toLowerCase()in a&&(e=a[t]):"number"==typeof t&&(e=t),s.trace=()=>{},s.debug=()=>{},s.info=()=>{},s.warn=()=>{},s.error=()=>{},s.fatal=()=>{},e<=a.fatal&&(s.fatal=console.error?console.error.bind(console,l("FATAL"),"color: orange"):console.log.bind(console,"\x1b[35m",l("FATAL"))),e<=a.error&&(s.error=console.error?console.error.bind(console,l("ERROR"),"color: orange"):console.log.bind(console,"\x1b[31m",l("ERROR"))),e<=a.warn&&(s.warn=console.warn?console.warn.bind(console,l("WARN"),"color: orange"):console.log.bind(console,"\x1b[33m",l("WARN"))),e<=a.info&&(s.info=console.info?console.info.bind(console,l("INFO"),"color: lightblue"):console.log.bind(console,"\x1b[34m",l("INFO"))),e<=a.debug&&(s.debug=console.debug?console.debug.bind(console,l("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1b[32m",l("DEBUG"))),e<=a.trace&&(s.trace=console.debug?console.debug.bind(console,l("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1b[32m",l("TRACE")))},"setLogLevel"),l=(0,i.K)(t=>{let e=o().format("ss.SSS");return`%c${e} : ${t} : `},"format");r.d(e,{H:()=>n,R:()=>s})},Gt(t,e,r){"use strict";var i=Object.defineProperty,o=(t,e)=>i(t,"name",{value:e,configurable:!0}),a=(t,e)=>{for(var r in e)i(t,r,{get:e[r],enumerable:!0})};r.d(e,{K:()=>o,V:()=>a})},LC(t,e,r){"use strict";var i=r("bQ"),o=r("Ut"),a=r("PF"),s=r("iV"),n=r("NH"),l=r("Yr"),h=r("M4"),c=r("Gt"),d=r("El"),u=r("nh"),g=(0,c.K)((t,e)=>{if(e)return"translate("+-t.width/2+", "+-t.height/2+")";let r=t.x??0,i=t.y??0;return"translate("+-(r+t.width/2)+", "+-(i+t.height/2)+")"},"computeLabelTransform"),p={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},f={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function y(t,e){if(void 0===t||void 0===e)return{angle:0,deltaX:0,deltaY:0};t=m(t),e=m(e);let[r,i]=[t.x,t.y],[o,a]=[e.x,e.y],s=o-r,n=a-i;return{angle:Math.atan(n/s),deltaX:s,deltaY:n}}(0,c.K)(y,"calculateDeltaAndAngle");var m=(0,c.K)(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),C=(0,c.K)(t=>({x:(0,c.K)(function(e,r,i){let o=0,a=m(i[0]).x<m(i[i.length-1]).x?"left":"right";if(0===r&&Object.hasOwn(p,t.arrowTypeStart)){let{angle:e,deltaX:r}=y(i[0],i[1]);o=p[t.arrowTypeStart]*Math.cos(e)*(r>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(p,t.arrowTypeEnd)){let{angle:e,deltaX:r}=y(i[i.length-1],i[i.length-2]);o=p[t.arrowTypeEnd]*Math.cos(e)*(r>=0?1:-1)}let s=Math.abs(m(e).x-m(i[i.length-1]).x),n=Math.abs(m(e).y-m(i[i.length-1]).y),l=Math.abs(m(e).x-m(i[0]).x),h=Math.abs(m(e).y-m(i[0]).y),c=p[t.arrowTypeStart],d=p[t.arrowTypeEnd];if(s<d&&s>0&&n<d){let t=d+1-s;t*="right"===a?-1:1,o-=t}if(l<c&&l>0&&h<c){let t=c+1-l;t*="right"===a?-1:1,o+=t}return m(e).x+o},"x"),y:(0,c.K)(function(e,r,i){let o=0,a=m(i[0]).y<m(i[i.length-1]).y?"down":"up";if(0===r&&Object.hasOwn(p,t.arrowTypeStart)){let{angle:e,deltaY:r}=y(i[0],i[1]);o=p[t.arrowTypeStart]*Math.abs(Math.sin(e))*(r>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(p,t.arrowTypeEnd)){let{angle:e,deltaY:r}=y(i[i.length-1],i[i.length-2]);o=p[t.arrowTypeEnd]*Math.abs(Math.sin(e))*(r>=0?1:-1)}let s=Math.abs(m(e).y-m(i[i.length-1]).y),n=Math.abs(m(e).x-m(i[i.length-1]).x),l=Math.abs(m(e).y-m(i[0]).y),h=Math.abs(m(e).x-m(i[0]).x),c=p[t.arrowTypeStart],d=p[t.arrowTypeEnd];if(s<d&&s>0&&n<d){let t=d+1-s;t*="up"===a?-1:1,o-=t}if(l<c&&l>0&&h<c){let t=c+1-l;t*="up"===a?-1:1,o+=t}return m(e).y+o},"y")}),"getLineFunctionsWithOffset"),x=(0,c.K)((t,e,r,i,o,a=!1,s)=>{e.arrowTypeStart&&w(t,"start",e.arrowTypeStart,r,i,o,a,s),e.arrowTypeEnd&&w(t,"end",e.arrowTypeEnd,r,i,o,a,s)},"addEdgeMarkers"),b={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},arrow_hierarchy:{type:"hierarchy",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}},k=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],w=(0,c.K)((t,e,r,i,o,a,s=!1,n)=>{if(!r||"none"===r)return;let l=b[r],c=l&&k.includes(l.type);if(!l)return void h.R.warn(`Unknown arrow type: ${r}`);let d=l.type,u=`${o}_${a}-${d}${"start"===e?"Start":"End"}${s&&c?"-margin":""}`;if(n&&""!==n.trim()){let r=n.replace(/[^\dA-Za-z]/g,"_"),o=`${u}_${r}`;if(!document.getElementById(o)){let t=document.getElementById(u);if(t){let e=t.cloneNode(!0);e.id=o,e.querySelectorAll("path, circle, line").forEach(t=>{t.setAttribute("stroke",n),l.fill&&t.setAttribute("fill",n)}),t.parentNode?.appendChild(e)}}t.attr(`marker-${e}`,`url(${i}#${o})`)}else t.attr(`marker-${e}`,`url(${i}#${u})`)},"addEdgeMarker"),B=(0,c.K)(t=>"string"==typeof t?t:(0,l.D7)()?.flowchart?.curve,"resolveEdgeCurveType"),T=new Map,S=new Map,v=(0,c.K)(()=>{T.clear(),S.clear()},"clear"),_=(0,c.K)(t=>!!(t.label||t.startLabelLeft||t.startLabelRight||t.endLabelLeft||t.endLabelRight),"hasEdgeLabel"),F=(0,c.K)(t=>t?"string"==typeof t?t:t.reduce((t,e)=>t+";"+e,""):"","getLabelStyles"),L=(0,c.K)(async(t,e)=>{let r,i,n,c=(0,l.D7)(),u=(0,l.E)(c),{labelStyles:p}=(0,a.GX)(e);e.labelStyle=p;let f=t.insert("g").attr("class","edgeLabel"),y=f.insert("g").attr("class","label").attr("data-id",e.id),m="markdown"===e.labelType,C=await (0,s.GZ)(t,e.label,{style:F(e.labelStyle),useHtmlLabels:u,addSvgBackground:!0,isNode:!1,markdown:m,width:void 0},c);if(y.node().appendChild(C),h.R.info("abc82",e,e.labelType),u){let t=C.children[0],e=(0,d.Ltv)(C);i=r=await s.lT.measure(()=>t.getBoundingClientRect()),e.attr("width",r.width),e.attr("height",r.height)}else{let t=(0,d.Ltv)(C).select("text").node();await s.lT.measure(()=>{r=C.getBBox(),i=t&&"function"==typeof t.getBBox?t.getBBox():r})}if(y.attr("transform",g(i,u)),T.set(e.id,f),e.width=r.width,e.height=r.height,e.startLabelLeft){let r=t.insert("g").attr("class","edgeTerminals"),i=r.insert("g").attr("class","inner"),a=await (0,o.DA)(i,e.startLabelLeft,F(e.labelStyle)||"",!1,!1);n=a;let s=a.getBBox();if(u){let t=a.children[0],e=(0,d.Ltv)(a);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}i.attr("transform",g(s,u)),S.get(e.id)||S.set(e.id,{}),S.get(e.id).startLeft=r,A(n,e.startLabelLeft)}if(e.startLabelRight){let r=t.insert("g").attr("class","edgeTerminals"),i=r.insert("g").attr("class","inner"),a=await (0,o.DA)(i,e.startLabelRight,F(e.labelStyle)||"",!1,!1);n=a;let s=a.getBBox();if(u){let t=a.children[0],e=(0,d.Ltv)(a);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}i.attr("transform",g(s,u)),S.get(e.id)||S.set(e.id,{}),S.get(e.id).startRight=r,A(n,e.startLabelRight)}if(e.endLabelLeft){let r=t.insert("g").attr("class","edgeTerminals"),i=r.insert("g").attr("class","inner"),a=await (0,o.DA)(r,e.endLabelLeft,F(e.labelStyle)||"",!1,!1);n=a;let s=a.getBBox();if(u){let t=a.children[0],e=(0,d.Ltv)(a);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}i.attr("transform",g(s,u)),S.get(e.id)||S.set(e.id,{}),S.get(e.id).endLeft=r,A(n,e.endLabelLeft)}if(e.endLabelRight){let r=t.insert("g").attr("class","edgeTerminals"),i=r.insert("g").attr("class","inner"),a=await (0,o.DA)(r,e.endLabelRight,F(e.labelStyle)||"",!1,!1);n=a;let s=a.getBBox();if(u){let t=a.children[0],e=(0,d.Ltv)(a);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}i.attr("transform",g(s,u)),S.get(e.id)||S.set(e.id,{}),S.get(e.id).endRight=r,A(n,e.endLabelRight)}return C},"insertEdgeLabel");function A(t,e){(0,l.E)((0,l.D7)())&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}(0,c.K)(A,"setTerminalWidth");var M=(0,c.K)((t,e)=>{h.R.debug("Moving label abc88 ",t.id,t.label,T.get(t.id),e);let r=e.updatedPath?e.updatedPath:e.originalPath,o=(0,l.D7)(),{subGraphTitleTotalMargin:a}=(0,i.Oi)(o);if(t.label){let i=T.get(t.id),o=t.x,s=t.y;if(r){let i=n._K.calcLabelPosition(r);h.R.debug("Moving label "+t.label+" from (",o,",",s,") to (",i.x,",",i.y,") abc88"),e.updatedPath&&(o=i.x,s=i.y)}i.attr("transform",`translate(${o}, ${s+a/2})`)}if(t.startLabelLeft){let e=S.get(t.id).startLeft,i=t.x,o=t.y;if(r){let e=n._K.calcTerminalLabelPosition(10*!!t.arrowTypeStart,"start_left",r);i=e.x,o=e.y}e.attr("transform",`translate(${i}, ${o})`)}if(t.startLabelRight){let e=S.get(t.id).startRight,i=t.x,o=t.y;if(r){let e=n._K.calcTerminalLabelPosition(10*!!t.arrowTypeStart,"start_right",r);i=e.x,o=e.y}e.attr("transform",`translate(${i}, ${o})`)}if(t.endLabelLeft){let e=S.get(t.id).endLeft,i=t.x,o=t.y;if(r){let e=n._K.calcTerminalLabelPosition(10*!!t.arrowTypeEnd,"end_left",r);i=e.x,o=e.y}e.attr("transform",`translate(${i}, ${o})`)}if(t.endLabelRight){let e=S.get(t.id).endRight,i=t.x,o=t.y;if(r){let e=n._K.calcTerminalLabelPosition(10*!!t.arrowTypeEnd,"end_right",r);i=e.x,o=e.y}e.attr("transform",`translate(${i}, ${o})`)}},"positionEdgeLabel"),$=(0,c.K)((t,e)=>{if(!t?.isLabelEdge||!t?.id?.endsWith("-to-label")||!Array.isArray(e)||2!==e.length)return e;let[r,i]=e,o=Math.abs(i.x-r.x),a=Math.abs(i.y-r.y);return o<.001||a<.001?e:a>=o?[r,{x:r.x,y:i.y},i]:[r,{x:i.x,y:r.y},i]},"orthogonalizeToLabelClippedPoints"),E=(0,c.K)((t,e)=>{let r=t.x,i=t.y,o=Math.abs(e.x-r),a=Math.abs(e.y-i),s=t.width/2,n=t.height/2;return o>=s||a>=n},"outsideNode"),K=(0,c.K)((t,e,r)=>{h.R.debug(`intersection calc abc89:
|
|
186
|
-
outsidePoint: ${JSON.stringify(e)}
|
|
187
|
-
insidePoint : ${JSON.stringify(r)}
|
|
188
|
-
node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);let i=t.x,o=t.y,a=Math.abs(i-r.x),s=t.width/2,n=r.x<e.x?s-a:s+a,l=t.height/2,c=Math.abs(e.y-r.y),d=Math.abs(e.x-r.x);if(Math.abs(o-e.y)*s>Math.abs(i-e.x)*l){let t=r.y<e.y?e.y-l-o:o-l-e.y;n=d*t/c;let i={x:r.x<e.x?r.x+n:r.x-d+n,y:r.y<e.y?r.y+c-t:r.y-c+t};return 0===n&&(i.x=e.x,i.y=e.y),0===d&&(i.x=e.x),0===c&&(i.y=e.y),h.R.debug(`abc89 top/bottom calc, Q ${c}, q ${t}, R ${d}, r ${n}`,i),i}{let t=c*(n=r.x<e.x?e.x-s-i:i-s-e.x)/d,o=r.x<e.x?r.x+d-n:r.x-d+n,a=r.y<e.y?r.y+t:r.y-t;return h.R.debug(`sides calc abc89, Q ${c}, q ${t}, R ${d}, r ${n}`,{_x:o,_y:a}),0===n&&(o=e.x,a=e.y),0===d&&(o=e.x),0===c&&(a=e.y),{x:o,y:a}}},"intersection"),O=(0,c.K)((t,e)=>{h.R.warn("abc88 cutPathAtIntersect",t,e);let r=[],i=t[0],o=!1;return t.forEach(t=>{if(h.R.info("abc88 checking point",t,e),E(e,t)||o)h.R.warn("abc88 outside",t,i),i=t,o||r.push(t);else{let a=K(e,i,t);h.R.debug("abc88 inside",t,i,a),h.R.debug("abc88 intersection",a,e);let s=!1;r.forEach(t=>{s=s||t.x===a.x&&t.y===a.y}),r.some(t=>t.x===a.x&&t.y===a.y)?h.R.warn("abc88 no intersect",a,r):r.push(a),o=!0}}),h.R.debug("returning points",r),r},"cutPathAtIntersect");function D(t){let e=[],r=[];for(let i=1;i<t.length-1;i++){let o=t[i-1],a=t[i],s=t[i+1];o.x===a.x&&a.y===s.y&&Math.abs(a.x-s.x)>5&&Math.abs(a.y-o.y)>5?(e.push(a),r.push(i)):o.y===a.y&&a.x===s.x&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-s.y)>5&&(e.push(a),r.push(i))}return{cornerPoints:e,cornerPointPositions:r}}(0,c.K)(D,"extractCornerPoints");var q=(0,c.K)(function(t,e,r){let i=e.x-t.x,o=e.y-t.y,a=r/Math.sqrt(i*i+o*o);return{x:e.x-a*i,y:e.y-a*o}},"findAdjacentPoint"),I=(0,c.K)(function(t){let{cornerPointPositions:e}=D(t),r=[];for(let i=0;i<t.length;i++)if(e.includes(i)){let e=t[i-1],o=t[i+1],a=t[i],s=q(e,a,5),n=q(o,a,5),l=n.x-s.x,c=n.y-s.y;r.push(s);let d=2*Math.sqrt(2),u={x:a.x,y:a.y};Math.abs(o.x-e.x)>10&&Math.abs(o.y-e.y)>=10?(h.R.debug("Corner point fixing",Math.abs(o.x-e.x),Math.abs(o.y-e.y)),u=a.x===s.x?{x:l<0?s.x-5+d:s.x+5-d,y:c<0?s.y-d:s.y+d}:{x:l<0?s.x-d:s.x+d,y:c<0?s.y-5+d:s.y+5-d}):h.R.debug("Corner point skipping fixing",Math.abs(o.x-e.x),Math.abs(o.y-e.y)),r.push(u,n)}else r.push(t[i]);return r},"fixCorners"),P=(0,c.K)((t,e,r)=>{let i=Math.floor((t-e-r)/4),o=Array(Number.isFinite(i)?Math.max(0,i):0).fill("2 2").join(" ");return`0 ${e} ${o} ${r}`},"generateDashArray"),W=(0,c.K)(function(t,e,r,i,o,s,c,g=!1){let p,y;if(!c)throw Error(`insertEdge: missing diagramId for edge "${e.id}" — edge IDs require a diagram prefix for uniqueness`);let{handDrawnSeed:m,layout:b}=(0,l.D7)(),k=e.points,w=!1,T=[];for(let t in e.cssCompiledStyles)(0,a.KX)(t)||T.push(e.cssCompiledStyles[t]);if("swimlane"===b){if(s.intersect&&o.intersect&&Array.isArray(k)&&k.length>=2)if(2===k.length)k=[o.intersect(k[0]),s.intersect(k[1])];else{let t=k.slice(1,-1),e=t[0],r=t[t.length-1],i=.5>Math.abs(k[k.length-1].x-r.x)&&.5>Math.abs(k[k.length-1].y-r.y),a=o.intersect(e),n=i?r:s.intersect(r),l=.5>Math.abs(n.x-r.x)&&.5>Math.abs(n.y-r.y);k=[....5>Math.abs(a.x-e.x)&&.5>Math.abs(a.y-e.y)?[]:[a],...t,...l?[]:[n]]}k=$(e,k)}else s.intersect&&o.intersect&&!g&&((k=k.slice(1,e.points.length-1)).unshift(o.intersect(k[0])),k.push(s.intersect(k[k.length-1])));let S=btoa(JSON.stringify(k));e.toCluster&&(h.R.info("to cluster abc88",r.get(e.toCluster)),k=O(e.points,r.get(e.toCluster).node),w=!0),e.fromCluster&&(h.R.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(k,null,2)),k=O(k.reverse(),r.get(e.fromCluster).node).reverse(),w=!0);let v=k.filter(t=>!Number.isNaN(t.y)),_=B(e.curve);"rounded"!==_&&(v=I(v));let F=d.lUB;switch(_){case"linear":case"rounded":F=d.lUB;break;case"basis":default:F=d.qrM;break;case"cardinal":F=d.y8u;break;case"bumpX":F=d.Wi0;break;case"bumpY":F=d.PGM;break;case"catmullRom":F=d.oDi;break;case"monotoneX":F=d.nVG;break;case"monotoneY":F=d.uxU;break;case"natural":F=d.Xf2;break;case"step":F=d.GZz;break;case"stepAfter":F=d.UPb;break;case"stepBefore":F=d.dyv}let{x:L,y:A}=C(e),M=(0,d.n8j)().x(L).y(A).curve(F);switch(e.thickness){case"normal":default:p="edge-thickness-normal";break;case"thick":p="edge-thickness-thick";break;case"invisible":p="edge-thickness-invisible"}switch(e.pattern){case"solid":default:p+=" edge-pattern-solid";break;case"dotted":p+=" edge-pattern-dotted";break;case"dashed":p+=" edge-pattern-dashed"}let E="rounded"===_?z(j(v,e),5):M(v),K=Array.isArray(e.style)?e.style:[e.style],D=K.find(t=>t?.startsWith("stroke:")),q="";e.animate&&(q="edge-animation-fast"),e.animation&&(q="edge-animation-"+e.animation);let W=!1;if("handDrawn"===e.look){let r=u.A.svg(t);Object.assign([],v);let i=r.path(E,{roughness:.3,seed:m});p+=" transition";let o=(y=(0,d.Ltv)(i).select("path").attr("id",`${c}-${e.id}`).attr("class"," "+p+(e.classes?" "+e.classes:"")+(q?" "+q:"")).attr("style",K?K.reduce((t,e)=>t+";"+e,""):"")).attr("d");y.attr("d",o),t.node().appendChild(y.node())}else{let r=T.join(";"),i=K?K.reduce((t,e)=>t+e+";",""):"",o=(r?r+";"+i+";":i)+";"+(K?K.reduce((t,e)=>t+";"+e,""):"");y=t.append("path").attr("d",E).attr("id",`${c}-${e.id}`).attr("class"," "+p+(e.classes?" "+e.classes:"")+(q?" "+q:"")).attr("style",o),D=o.match(/stroke:([^;]+)/)?.[1],W=!0===e.animate||!!e.animation||r.includes("animation");let a=y.node(),s="function"==typeof a.getTotalLength?a.getTotalLength():0,n=f[e.arrowTypeStart]||0,l=f[e.arrowTypeEnd]||0;if("neo"===e.look&&!W){let t="dotted"===e.pattern||"dashed"===e.pattern?P(s,n,l):`0 ${n} ${s-n-l} ${l}`,r=`stroke-dasharray: ${t}; stroke-dashoffset: 0;`;y.attr("style",r+y.attr("style"))}}y.attr("data-edge",!0),y.attr("data-et","edge"),y.attr("data-id",e.id),y.attr("data-points",S),y.attr("data-look",(0,n.KL)(e.look)),e.showPoints&&v.forEach(e=>{t.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",e.x).attr("cy",e.y)});let R="";((0,l.D7)().flowchart.arrowMarkerAbsolute||(0,l.D7)().state.arrowMarkerAbsolute)&&(R=(R=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(").replace(/\)/g,"\\)")),h.R.info("arrowTypeStart",e.arrowTypeStart),h.R.info("arrowTypeEnd",e.arrowTypeEnd);let N=!W&&e?.look==="neo";x(y,e,R,c,i,N,D);let H=Math.floor(k.length/2),U=k[H];n._K.isLabelCoordinateInPath(U,y.attr("d"))||(w=!0);let Y={};return w&&(Y.updatedPath=k),Y.originalPath=e.points,Y},"insertEdge");function z(t,e){if(t.length<2)return"";let r="",i=t.length;for(let o=0;o<i;o++){let a=t[o],s=t[o-1],n=t[o+1];if(0===o)r+=`M${a.x},${a.y}`;else if(o===i-1)r+=`L${a.x},${a.y}`;else{let t=a.x-s.x,i=a.y-s.y,o=n.x-a.x,l=n.y-a.y,h=Math.hypot(t,i),c=Math.hypot(o,l);if(h<1e-5||c<1e-5){r+=`L${a.x},${a.y}`;continue}let d=t/h,u=i/h,g=o/c,p=l/c,f=Math.acos(Math.max(-1,Math.min(1,d*g+u*p)));if(f<1e-5||1e-5>Math.abs(Math.PI-f)){r+=`L${a.x},${a.y}`;continue}let y=Math.min(e/Math.sin(f/2),h/2,c/2),m=a.x-d*y,C=a.y-u*y,x=a.x+g*y,b=a.y+p*y;r+=`L${m},${C}Q${a.x},${a.y} ${x},${b}`}}return r}function R(t,e){if(!t||!e)return{angle:0,deltaX:0,deltaY:0};let r=e.x-t.x,i=e.y-t.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}function j(t,e){let r=t.map(t=>({...t}));if(t.length>=2&&p[e.arrowTypeStart]){let i=p[e.arrowTypeStart],o=t[0],{angle:a}=R(o,t[1]),s=i*Math.cos(a),n=i*Math.sin(a);r[0].x=o.x+s,r[0].y=o.y+n}let i=t.length;if(i>=2&&p[e.arrowTypeEnd]){let o=p[e.arrowTypeEnd],a=t[i-1],{angle:s}=R(t[i-2],a),n=o*Math.cos(s),l=o*Math.sin(s);r[i-1].x=a.x-n,r[i-1].y=a.y-l}return r}(0,c.K)(z,"generateRoundedPath"),(0,c.K)(R,"calculateDeltaAndAngle"),(0,c.K)(j,"applyMarkerOffsetsToPoints");var N=(0,c.K)((t,e,r,i)=>{e.forEach(e=>{tg[e](t,r,i)})},"insertMarkers"),H=(0,c.K)((t,e,r)=>{h.R.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,1 V 13 L18,7 Z"),t.append("marker").attr("id",r+"_"+e+"-extensionStart-margin").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd-margin").attr("class","marker extension "+e).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),U=(0,c.K)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart-margin").attr("class","marker composition "+e).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd-margin").attr("class","marker composition "+e).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),Y=(0,c.K)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart-margin").attr("class","marker aggregation "+e).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd-margin").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),X=(0,c.K)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart-margin").attr("class","marker dependency "+e).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd-margin").attr("class","marker dependency "+e).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),G=(0,c.K)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart-margin").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd-margin").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),V=(0,c.K)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).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"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).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"),t.append("marker").attr("id",r+"_"+e+"-pointEnd-margin").attr("class","marker "+e).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart-margin").attr("class","marker "+e).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),Z=(0,c.K)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).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"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).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"),t.append("marker").attr("id",r+"_"+e+"-circleEnd-margin").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart-margin").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),Q=(0,c.K)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).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"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).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"),t.append("marker").attr("id",r+"_"+e+"-crossEnd-margin").attr("class","marker cross "+e).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),t.append("marker").attr("id",r+"_"+e+"-crossStart-margin").attr("class","marker cross "+e).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),J=(0,c.K)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-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"),tt=(0,c.K)((t,e,r)=>{let{themeVariables:i}=(0,l.zj)(),{transitionColor:o}=i;t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${o}`)},"barbNeo"),te=(0,c.K)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).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"),tr=(0,c.K)((t,e,r)=>{let i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).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");let o=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),o.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),ti=(0,c.K)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).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"),to=(0,c.K)((t,e,r)=>{let i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).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");let o=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),o.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),ta=(0,c.K)((t,e,r)=>{let{themeVariables:i}=(0,l.zj)(),{strokeWidth:o}=i;t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${o}`),t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${o}`)},"only_one_neo"),ts=(0,c.K)((t,e,r)=>{let{themeVariables:i}=(0,l.zj)(),{strokeWidth:o,mainBkg:a}=i,s=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");s.append("circle").attr("fill",a??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${o}`).attr("r",6),s.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${o}`);let n=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");n.append("circle").attr("fill",a??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${o}`).attr("r",6),n.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${o}`)},"zero_or_one_neo"),tn=(0,c.K)((t,e,r)=>{let{themeVariables:i}=(0,l.zj)(),{strokeWidth:o}=i;t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${o}`),t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${o}`)},"one_or_more_neo"),tl=(0,c.K)((t,e,r)=>{let{themeVariables:i}=(0,l.zj)(),{strokeWidth:o,mainBkg:a}=i,s=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");s.append("circle").attr("fill",a??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${o}`),s.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${o}`);let n=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");n.append("circle").attr("fill",a??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${o}`),n.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${o}`)},"zero_or_more_neo"),th=(0,c.K)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
|
|
189
|
-
L20,10
|
|
190
|
-
M20,10
|
|
191
|
-
L0,20`)},"requirement_arrow"),tc=(0,c.K)((t,e,r)=>{let{themeVariables:i}=(0,l.zj)(),{strokeWidth:o}=i;t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${o}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
|
|
192
|
-
L20,10
|
|
193
|
-
M20,10
|
|
194
|
-
L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),td=(0,c.K)((t,e,r)=>{let i=t.append("defs").append("marker").attr("id",r+"_"+e+"-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"),tu=(0,c.K)((t,e,r)=>{let{themeVariables:i}=(0,l.zj)(),{strokeWidth:o}=i,a=t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");a.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),a.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),a.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),a.selectAll("*").attr("stroke-width",`${o}`)},"requirement_contains_neo"),tg={extension:H,composition:U,aggregation:Y,dependency:X,lollipop:G,point:V,circle:Z,cross:Q,barb:J,barbNeo:tt,hierarchy:(0,c.K)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-hierarchyEnd").attr("class","marker hierarchy "+e).attr("viewBox","0 0 12 10").attr("refX",10).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",10).attr("orient","auto").append("path").attr("d","M 0 0 L 6 5 L 0 10 M 4 0 L 10 5 L 4 10").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0").style("fill","none"),t.append("marker").attr("id",r+"_"+e+"-hierarchyStart").attr("class","marker hierarchy "+e).attr("viewBox","0 0 12 10").attr("refX",2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",10).attr("orient","auto").append("path").attr("d","M 12 0 L 6 5 L 12 10 M 8 0 L 2 5 L 8 10").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0").style("fill","none")},"hierarchy"),only_one:te,zero_or_one:tr,one_or_more:ti,zero_or_more:to,only_one_neo:ta,zero_or_one_neo:ts,one_or_more_neo:tn,zero_or_more_neo:tl,requirement_arrow:th,requirement_contains:td,requirement_arrow_neo:tc,requirement_contains_neo:tu};r.d(e,{IU:()=>v,Jo:()=>W,Nq:()=>f,T_:()=>M,UQ:()=>S,a6:()=>_,g0:()=>N,hq:()=>p,jP:()=>L,lP:()=>T})},NH(t,e,r){"use strict";r.d(e,{pe:()=>S,PX:()=>J,ru:()=>Z,Un:()=>Q,$t:()=>ta,Sm:()=>tl,C4:()=>tn,$C:()=>N,rY:()=>th,sM:()=>R,KL:()=>tc,Ib:()=>$,dq:()=>tr,I5:()=>to,yT:()=>U,vU:()=>A,_K:()=>ts,bH:()=>G});var i,o=r("Yr"),a=r("M4"),s=r("Gt"),n=r("tP"),l=r("El");function h(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw TypeError("Expected a function");let r=function(...i){let o=e?e.apply(this,i):i[0],a=r.cache;if(a.has(o))return a.get(o);let s=t.apply(this,i);return r.cache=a.set(o,s)||a,s};return r.cache=new(h.Cache||Map),r}function c(){}h.Cache=Map;var d=r("OY"),u=r("Oe");function g(t){return Object.getOwnPropertySymbols(t).filter(e=>Object.prototype.propertyIsEnumerable.call(t,e))}var p=r("NM");function f(t){if("object"!=typeof t||null==t)return!1;if(null===Object.getPrototypeOf(t))return!0;if("[object Object]"!==Object.prototype.toString.call(t)){let e=t[Symbol.toStringTag];return null!=e&&!!Object.getOwnPropertyDescriptor(t,Symbol.toStringTag)?.writable&&t.toString()===`[object ${e}]`}let e=t;for(;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}var y=r("DH"),m=r("VV");function C(t,e,r,i=new Map,o){let a=o?.(t,e,r,i);if(void 0!==a)return a;if((0,d.s)(t))return t;if(i.has(t))return i.get(t);if(Array.isArray(t)){let e=Array(t.length);i.set(t,e);for(let a=0;a<t.length;a++)e[a]=C(t[a],a,r,i,o);return Object.hasOwn(t,"index")&&(e.index=t.index),Object.hasOwn(t,"input")&&(e.input=t.input),e}if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){let e=new RegExp(t.source,t.flags);return e.lastIndex=t.lastIndex,e}if(t instanceof Map){let e=new Map;for(let[a,s]of(i.set(t,e),t))e.set(a,C(s,a,r,i,o));return e}if(t instanceof Set){let e=new Set;for(let a of(i.set(t,e),t))e.add(C(a,void 0,r,i,o));return e}if((0,p.P)(t))return t.subarray();if((0,u.i)(t)){let e=new(Object.getPrototypeOf(t)).constructor(t.length);i.set(t,e);for(let a=0;a<t.length;a++)e[a]=C(t[a],a,r,i,o);return e}if(t instanceof ArrayBuffer||"u">typeof SharedArrayBuffer&&t instanceof SharedArrayBuffer)return t.slice(0);if(t instanceof DataView){let e=new DataView(t.buffer.slice(0),t.byteOffset,t.byteLength);return i.set(t,e),x(e,t,r,i,o),e}if("u">typeof File&&t instanceof File){let e=new File([t],t.name,{type:t.type});return i.set(t,e),x(e,t,r,i,o),e}if("u">typeof Blob&&t instanceof Blob){let e=new Blob([t],{type:t.type});return i.set(t,e),x(e,t,r,i,o),e}if(t instanceof Error){let e=structuredClone(t);return i.set(t,e),e.message=t.message,e.name=t.name,e.stack=t.stack,e.cause=t.cause,e.constructor=t.constructor,x(e,t,r,i,o),e}if(t instanceof Boolean){let e=new Boolean(t.valueOf());return i.set(t,e),x(e,t,r,i,o),e}if(t instanceof Number){let e=new Number(t.valueOf());return i.set(t,e),x(e,t,r,i,o),e}if(t instanceof String){let e=new String(t.valueOf());return i.set(t,e),x(e,t,r,i,o),e}if("object"==typeof t&&function(t){switch((0,y.b)(t)){case m.R_:case m.Uw:case m.cT:case m.iq:case m.$V:case m.vC:case m.ri:case m.ML:case m.XZ:case m.i1:case m._u:case m.pj:case m.kj:case m.GX:case m.Av:case m.NA:case m.OG:case m.VP:case m.Qb:case m.q:case m.x6:case m.ZR:return!0;default:return!1}}(t)){let e=Object.create(Object.getPrototypeOf(t));return i.set(t,e),x(e,t,r,i,o),e}return t}function x(t,e,r=t,i,o){let a=[...Object.keys(e),...g(e)];for(let s=0;s<a.length;s++){let n=a[s],l=Object.getOwnPropertyDescriptor(t,n);(null==l||l.writable)&&(t[n]=C(e[n],n,r,i,o))}}function b(t){var e;return e=(e,r,i,o)=>{let a;if(void 0!==a)return a;if("object"==typeof t){if("[object Object]"===(0,y.b)(t)&&"function"!=typeof t.constructor){let e={};return o.set(t,e),x(e,t,i,o),e}switch(Object.prototype.toString.call(t)){case m.kj:case m.OG:case m.$V:{let e=new t.constructor(t?.valueOf());return x(e,t),e}case m.R_:{let e={};return x(e,t),e.length=t.length,e[Symbol.iterator]=t[Symbol.iterator],e}default:return}}},C(t,void 0,t,new Map,e)}var k=r("rY0");function w(t){return"object"==typeof t&&null!==t}var B=r("tNQ"),T=r("SPK"),S="",v={curveBasis:l.qrM,curveBasisClosed:l.Yu4,curveBasisOpen:l.IA3,curveBumpX:l.Wi0,curveBumpY:l.PGM,curveBundle:l.OEq,curveCardinalClosed:l.olC,curveCardinalOpen:l.IrU,curveCardinal:l.y8u,curveCatmullRomClosed:l.Q7f,curveCatmullRomOpen:l.cVp,curveCatmullRom:l.oDi,curveLinear:l.lUB,curveLinearClosed:l.Lx9,curveMonotoneX:l.nVG,curveMonotoneY:l.uxU,curveNatural:l.Xf2,curveStep:l.GZz,curveStepAfter:l.UPb,curveStepBefore:l.dyv},_=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,F=(0,s.K)(function(t,e){let r=L(t,/(?:init\b)|(?:initialize\b)/),i={};if(Array.isArray(r)){let t=r.map(t=>t.args);(0,o.$i)(t),i=(0,o.hH)(i,[...t])}else i=r.args;if(!i)return;let a=(0,o.Ch)(t,e),s="config";return void 0!==i[s]&&("flowchart-v2"===a&&(a="flowchart"),i[a]=i[s],delete i[s]),i},"detectInit"),L=(0,s.K)(function(t,e=null){try{let r,i=RegExp(`[%]{2}(?![{]${_.source})(?=[}][%]{2}).*
|
|
195
|
-
`,"ig");t=t.trim().replace(i,"").replace(/'/gm,'"'),a.R.debug(`Detecting diagram directive${null!==e?" type:"+e:""} based on the text:${t}`);let s=[];for(;null!==(r=o.DB.exec(t));)if(r.index===o.DB.lastIndex&&o.DB.lastIndex++,r&&!e||e&&r[1]?.match(e)||e&&r[2]?.match(e)){let t=r[1]?r[1]:r[2],e=r[3]?r[3].trim():r[4]?JSON.parse(r[4].trim()):null;s.push({type:t,args:e})}if(0===s.length)return{type:t,args:null};return 1===s.length?s[0]:s}catch(r){return a.R.error(`ERROR: ${r.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},"detectDirective"),A=(0,s.K)(function(t){return t.replace(o.DB,"")},"removeDirectives"),M=(0,s.K)(function(t,e){for(let[r,i]of e.entries())if(i.match(t))return r;return -1},"isSubstringInArray");function $(t,e){return t?v[`curve${t.charAt(0).toUpperCase()+t.slice(1)}`]??e:e}function E(t,e){let r=t.trim();if(r)return"loose"!==e.securityLevel?(0,n.J)(r):r}(0,s.K)($,"interpolateToCurve"),(0,s.K)(E,"formatUrl");var K=(0,s.K)((t,...e)=>{let r=t.split("."),i=r.length-1,o=r[i],s=window;for(let e=0;e<i;e++)if(!(s=s[r[e]]))return void a.R.error(`Function name: ${t} not found in window`);s[o](...e)},"runFunc");function O(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0}function D(t){let e,r=0;return t.forEach(t=>{r+=O(t,e),e=t}),P(t,r/2)}function q(t){return 1===t.length?t[0]:D(t)}(0,s.K)(O,"distance"),(0,s.K)(D,"traverseEdge"),(0,s.K)(q,"calcLabelPosition");var I=(0,s.K)((t,e=2)=>{let r=Math.pow(10,e);return Math.round(t*r)/r},"roundNumber"),P=(0,s.K)((t,e)=>{let r,i=e;for(let e of t){if(r){let t=O(e,r);if(0===t)return r;if(t<i)i-=t;else{let o=i/t;if(o<=0)return r;if(o>=1)return{x:e.x,y:e.y};if(o>0&&o<1)return{x:I((1-o)*r.x+o*e.x,5),y:I((1-o)*r.y+o*e.y,5)}}}r=e}throw Error("Could not find a suitable point for the given distance")},"calculatePoint"),W=(0,s.K)((t,e,r)=>{a.R.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());let i=P(e,25),o=t?10:5,s=Math.atan2(e[0].y-i.y,e[0].x-i.x),n={x:0,y:0};return n.x=Math.sin(s)*o+(e[0].x+i.x)/2,n.y=-Math.cos(s)*o+(e[0].y+i.y)/2,n},"calcCardinalityPosition");function z(t,e,r){let i=structuredClone(r);a.R.info("our points",i),"start_left"!==e&&"start_right"!==e&&i.reverse();let o=P(i,25+t),s=10+.5*t,n=Math.atan2(i[0].y-o.y,i[0].x-o.x),l={x:0,y:0};return"start_left"===e?(l.x=Math.sin(n+Math.PI)*s+(i[0].x+o.x)/2,l.y=-Math.cos(n+Math.PI)*s+(i[0].y+o.y)/2):"end_right"===e?(l.x=Math.sin(n-Math.PI)*s+(i[0].x+o.x)/2-5,l.y=-Math.cos(n-Math.PI)*s+(i[0].y+o.y)/2-5):"end_left"===e?(l.x=Math.sin(n)*s+(i[0].x+o.x)/2-5,l.y=-Math.cos(n)*s+(i[0].y+o.y)/2-5):(l.x=Math.sin(n)*s+(i[0].x+o.x)/2,l.y=-Math.cos(n)*s+(i[0].y+o.y)/2),l}function R(t){let e="",r="";for(let i of t)void 0!==i&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":e=e+i+";");return{style:e,labelStyle:r}}(0,s.K)(z,"calcTerminalLabelPosition"),(0,s.K)(R,"getStylesFromArray");var j=0,N=(0,s.K)(()=>(j++,"id-"+Math.random().toString(36).substr(2,12)+"-"+j),"generateId");function H(t){let e="",r="0123456789abcdef",i=r.length;for(let o=0;o<t;o++)e+=r.charAt(Math.floor(Math.random()*i));return e}(0,s.K)(H,"makeRandomHex");var U=(0,s.K)(t=>H(t.length),"random"),Y=(0,s.K)(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"),X=(0,s.K)(function(t,e){let r=e.text.replace(o.Y2.lineBreakRegex," "),[,i]=to(e.fontSize),a=t.append("text");a.attr("x",e.x),a.attr("y",e.y),a.style("text-anchor",e.anchor),a.style("font-family",e.fontFamily),a.style("font-size",i),a.style("font-weight",e.fontWeight),a.attr("fill",e.fill),void 0!==e.class&&a.attr("class",e.class);let s=a.append("tspan");return s.attr("x",e.x+2*e.textMargin),s.attr("fill",e.fill),s.text(r),a},"drawSimpleText"),G=h((t,e,r)=>{if(!t||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),o.Y2.hasBreaks(t)))return t;let i=t.split(" ").filter(Boolean),a=[],s="";return i.forEach((t,o)=>{let n=Q(`${t} `,r),l=Q(s,r);if(n>e){let{hyphenatedStrings:i,remainingWord:o}=V(t,e,"-",r);a.push(s,...i),s=o}else l+n>=e?(a.push(s),s=t):s=[s,t].filter(Boolean).join(" ");o+1===i.length&&a.push(s)}),a.filter(t=>""!==t).join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),V=h((t,e,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);let o=[...t],a=[],s="";return o.forEach((t,n)=>{let l=`${s}${t}`;if(Q(l,i)>=e){let t=o.length===n+1,e=`${l}${r}`;a.push(t?l:e),s=""}else s=l}),{hyphenatedStrings:a,remainingWord:s}},(t,e,r="-",i)=>`${t}${e}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function Z(t,e){return J(t,e).height}function Q(t,e){return J(t,e).width}(0,s.K)(Z,"calculateTextHeight"),(0,s.K)(Q,"calculateTextWidth");var J=h((t,e)=>{let{fontSize:r=12,fontFamily:i="Arial",fontWeight:a=400}=e;if(!t)return{width:0,height:0};let[,s]=to(r),n=t.split(o.Y2.lineBreakRegex),h=[],c=(0,l.Ltv)("body");if(!c.remove)return{width:0,height:0,lineHeight:0};let d=c.append("svg");for(let t of["sans-serif",i]){let e=0,r={width:0,height:0,lineHeight:0};for(let i of n){let o=Y();o.text=i||S;let n=X(d,o).style("font-size",s).style("font-weight",a).style("font-family",t),l=(n._groups||n)[0][0].getBBox();if(0===l.width&&0===l.height)throw Error("svg element not in render tree");r.width=Math.round(Math.max(r.width,l.width)),e=Math.round(l.height),r.height+=e,r.lineHeight=Math.round(Math.max(r.lineHeight,e))}h.push(r)}d.remove();let u=isNaN(h[1].height)||isNaN(h[1].width)||isNaN(h[1].lineHeight)||h[0].height>h[1].height&&h[0].width>h[1].width&&h[0].lineHeight>h[1].lineHeight?0:1;return h[u]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),tt=class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}static{(0,s.K)(this,"InitIDGenerator")}},te=(0,s.K)(function(t){return i=i||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),i.innerHTML=t,unescape(i.textContent)},"entityDecode");function tr(t){return"str"in t}(0,s.K)(tr,"isDetailedError");var ti=(0,s.K)((t,e,r,i)=>{if(!i)return;let o=t.node()?.getBBox();o&&t.append("text").text(i).attr("text-anchor","middle").attr("x",o.x+o.width/2).attr("y",-r).attr("class",e)},"insertTitle"),to=(0,s.K)(t=>{if("number"==typeof t)return[t,t+"px"];let e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]},"parseFontSize");function ta(t,e){return function(t,...e){return function(t,...e){let r=e.slice(0,-1),i=e[e.length-1],o=t;for(let t=0;t<r.length;t++)o=function t(e,r,i,o){if((0,d.s)(e)&&(e=Object(e)),null==r||"object"!=typeof r)return e;if(o.has(r))return function(t){if((0,d.s)(t))return t;if(Array.isArray(t)||(0,u.i)(t)||t instanceof ArrayBuffer||"u">typeof SharedArrayBuffer&&t instanceof SharedArrayBuffer)return t.slice(0);let e=Object.getPrototypeOf(t);if(null==e)return Object.assign(Object.create(e),t);let r=e.constructor;if(t instanceof Date||t instanceof Map||t instanceof Set)return new r(t);if(t instanceof RegExp){let e=new r(t);return e.lastIndex=t.lastIndex,e}if(t instanceof DataView)return new r(t.buffer.slice(0));if(t instanceof Error){let e;return(e=t instanceof AggregateError?new r(t.errors,t.message,{cause:t.cause}):new r(t.message,{cause:t.cause})).stack=t.stack,Object.assign(e,t),e}return"u">typeof File&&t instanceof File?new r([t],t.name,{type:t.type,lastModified:t.lastModified}):"object"==typeof t?Object.assign(Object.create(e),t):t}(o.get(r));if(o.set(r,e),Array.isArray(r)){r=r.slice();for(let t=0;t<r.length;t++)t in r||(r[t]=void 0)}let a=[...Object.keys(r),...g(r)];for(let n=0;n<a.length;n++){let l=a[n];if("__proto__"===l)continue;let h=r[l],c=e[l];if((0,k.N)(h)&&(h={...h}),(0,k.N)(c)&&(c={...c}),(0,p.P)(h)&&(h=b(h)),Array.isArray(h))if(Array.isArray(c)){let t=[],e=Reflect.ownKeys(c);for(let r=0;r<e.length;r++){let i=e[r];t[i]=c[i]}c=t}else{var s;if(w(s=c)&&(0,B.X)(s)){let t=[];for(let e=0;e<c.length;e++)t[e]=c[e];c=t}else c=[]}let d=i(c,h,l,e,r,o);void 0!==d?e[l]=d:Array.isArray(h)||w(c)&&w(h)&&(f(c)||f(h)||(0,T.i)(c)||(0,T.i)(h))?e[l]=t(c,h,i,o):null==c&&f(h)?e[l]=t({},h,i,o):null==c&&(0,T.i)(h)?e[l]=b(h):(void 0===c||void 0!==h)&&(e[l]=h)}return e}(o,r[t],i,new Map);return o}(t,...e,c)}({},t,e)}(0,s.K)(ta,"cleanAndMerge");var ts={assignWithDepth:o.hH,wrapLabel:G,calculateTextHeight:Z,calculateTextWidth:Q,calculateTextDimensions:J,cleanAndMerge:ta,detectInit:F,detectDirective:L,isSubstringInArray:M,interpolateToCurve:$,calcLabelPosition:q,calcCardinalityPosition:W,calcTerminalLabelPosition:z,formatUrl:E,getStylesFromArray:R,generateId:N,random:U,runFunc:K,entityDecode:te,insertTitle:ti,isLabelCoordinateInPath:td,parseFontSize:to,InitIDGenerator:tt},tn=(0,s.K)(function(t){let e=t;return(e=(e=e.replace(/style.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)})).replace(/classDef.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)})).replace(/#\w+;/g,function(t){let e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?"fl°°"+e+"¶ß":"fl°"+e+"¶ß"})},"encodeEntities"),tl=(0,s.K)(function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),th=(0,s.K)((t,e,{counter:r=0,prefix:i,suffix:o},a)=>a||`${i?`${i}_`:""}${t}_${e}_${r}${o?`_${o}`:""}`,"getEdgeId");function tc(t){return t??null}function td(t,e){let r=Math.round(t.x),i=Math.round(t.y),o=e.replace(/(\d+\.\d+)/g,t=>Math.round(parseFloat(t)).toString());return o.includes(r.toString())||o.includes(i.toString())}(0,s.K)(tc,"handleUndefinedAttr"),(0,s.K)(td,"isLabelCoordinateInPath")},Fl(t,e,r){"use strict";r.d(e,{default:()=>r0});var i=r("MM"),o=r("Wf"),a=r("mW");r("Q"),r("ix"),r("LC"),r("bQ"),r("Ut"),r("PF"),r("iV");var s=r("h5");r("pK");var n=r("NH"),l=r("Yr"),h=r("M4"),c=r("Gt"),d=r("pk"),u=r("El"),g="comm",p="rule",f="decl",y="@keyframes",m="@layer",C=Math.abs,x=String.fromCharCode;function b(t,e,r){return t.replace(e,r)}function k(t,e){return 0|t.charCodeAt(e)}function w(t,e,r){return t.slice(e,r)}function B(t){return t.length}function T(t,e){return e.push(t),t}function S(t,e){for(var r="",i=0;i<t.length;i++)r+=e(t[i],i,t,e)||"";return r}function v(t,e,r,i){switch(t.type){case m:if(t.children.length)break;case"@import":case"@namespace":case f:return t.return=t.return||t.value;case g:return"";case y:return t.return=t.value+"{"+S(t.children,i)+"}";case p:if(!B(t.value=t.props.join(",")))return""}return B(r=S(t.children,i))?t.return=t.value+"{"+r+"}":""}var _=1,F=1,L=0,A=0,M=0,$="";function E(t,e,r,i,o,a,s,n){return{value:t,root:e,parent:r,type:i,props:o,children:a,line:_,column:F,length:s,return:"",siblings:n}}function K(){return M=A<L?k($,A++):0,F++,10===M&&(F=1,_++),M}function O(){return k($,A)}function D(t){switch(t){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 q(t){var e,r;return(e=A-1,r=function t(e){for(;K();)switch(M){case e:return A;case 34:case 39:34!==e&&39!==e&&t(M);break;case 40:41===e&&t(e);break;case 92:K()}return A}(91===t?t+2:40===t?t+1:t),w($,e,r)).trim()}function I(t,e,r,i,o,a,s,n,l,h,c,d){for(var u=o-1,g=0===o?a:[""],f=g.length,y=0,m=0,x=0;y<i;++y)for(var k=0,B=w(t,u+1,u=C(m=s[y])),T=t;k<f;++k)(T=(m>0?g[k]+" "+B:b(B,/&\f/g,g[k])).trim())&&(l[x++]=T);return E(t,e,r,0===o?p:n,l,h,c,d)}function P(t,e,r,i,o){return E(t,e,r,f,w(t,0,i),w(t,i+1,-1),i,o)}var W=r("Lu"),z=r("NM"),R=r("tNQ"),j=r("rY0"),N=r("SPK");function H(t){if(null==t)return!0;if((0,R.X)(t))return("function"==typeof t.splice||"string"==typeof t||!!(0,z.P)(t)||!!(0,N.i)(t)||!!(0,j.N)(t))&&0===t.length;if("object"==typeof t||"function"==typeof t){let e;if(t instanceof Map||t instanceof Set)return 0===t.size;let r=Object.keys(t);return(e=t?.constructor,t===("function"==typeof e?e.prototype:Object.prototype))?0===r.filter(t=>"constructor"!==t).length:0===r.length}return!0}var U={id:"c4",detector:(0,c.K)(t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),loader:(0,c.K)(async()=>{let{diagram:t}=await r.e("up").then(r.bind(r,"Yq"));return{id:"c4",diagram:t}},"loader")},Y="flowchart-v2",X=(0,c.K)(t=>/^\s*(graph|flowchart)/.test(t),"detector"),G=(0,c.K)(async()=>{let{diagram:t}=await Promise.all([r.e("k"),r.e("h1")]).then(r.bind(r,"PZ"));return{id:Y,diagram:t}},"loader"),V={id:Y,detector:X,loader:G},Z="agentflow",Q=(0,c.K)(t=>/^\s*agentflow-beta\b/.test(t),"detector"),J=(0,c.K)(async()=>{let{diagram:t}=await r.e("og").then(r.bind(r,"WU"));return{id:Z,diagram:t}},"loader"),tt={id:Z,detector:Q,loader:J},te="swimlane",tr=(0,c.K)(t=>/^\s*swimlane-beta\b/.test(t),"detector"),ti=(0,c.K)(async()=>{let{diagram:t}=await Promise.all([r.e("k"),r.e("oc")]).then(r.bind(r,"WK"));return{id:te,diagram:t}},"loader"),to={id:te,detector:tr,loader:ti},ta={id:"er",detector:(0,c.K)(t=>/^\s*erDiagram/.test(t),"detector"),loader:(0,c.K)(async()=>{let{diagram:t}=await r.e("s").then(r.bind(r,"aT"));return{id:"er",diagram:t}},"loader")},ts="gitGraph",tn=(0,c.K)(t=>/^\s*gitGraph/.test(t),"detector"),tl=(0,c.K)(async()=>{let{diagram:t}=await Promise.all([r.e("l9"),r.e("ls")]).then(r.bind(r,"Xd"));return{id:ts,diagram:t}},"loader"),th={id:ts,detector:tn,loader:tl},tc="gantt",td=(0,c.K)(t=>/^\s*gantt/.test(t),"detector"),tu=(0,c.K)(async()=>{let{diagram:t}=await r.e("5j").then(r.bind(r,"TT"));return{id:tc,diagram:t}},"loader"),tg={id:tc,detector:td,loader:tu},tp="info",tf=(0,c.K)(t=>/^\s*info/.test(t),"detector"),ty=(0,c.K)(async()=>{let{diagram:t}=await Promise.all([r.e("l9"),r.e("5b")]).then(r.bind(r,"fL"));return{id:tp,diagram:t}},"loader"),tm={id:tp,detector:tf,loader:ty},tC={id:"pie",detector:(0,c.K)(t=>/^\s*pie/.test(t),"detector"),loader:(0,c.K)(async()=>{let{diagram:t}=await Promise.all([r.e("l9"),r.e("ys")]).then(r.bind(r,"Qe"));return{id:"pie",diagram:t}},"loader")},tx="quadrantChart",tb=(0,c.K)(t=>/^\s*quadrantChart/.test(t),"detector"),tk=(0,c.K)(async()=>{let{diagram:t}=await r.e("id").then(r.bind(r,"gO"));return{id:tx,diagram:t}},"loader"),tw={id:tx,detector:tb,loader:tk},tB="xychart",tT=(0,c.K)(t=>/^\s*xychart(-beta)?/.test(t),"detector"),tS=(0,c.K)(async()=>{let{diagram:t}=await r.e("6o").then(r.bind(r,"QT"));return{id:tB,diagram:t}},"loader"),tv={id:tB,detector:tT,loader:tS},t_="requirement",tF=(0,c.K)(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),tL=(0,c.K)(async()=>{let{diagram:t}=await r.e("e").then(r.bind(r,"cw"));return{id:t_,diagram:t}},"loader"),tA={id:t_,detector:tF,loader:tL},tM="sequence",t$=(0,c.K)(t=>/^\s*sequenceDiagram/.test(t),"detector"),tE=(0,c.K)(async()=>{let{diagram:t}=await r.e(19).then(r.bind(r,"HN"));return{id:tM,diagram:t}},"loader"),tK={id:tM,detector:t$,loader:tE},tO="classDiagram",tD=(0,c.K)(t=>/^\s*classDiagram/.test(t),"detector"),tq=(0,c.K)(async()=>{let{diagram:t}=await r.e("cx").then(r.bind(r,"qw9"));return{id:tO,diagram:t}},"loader"),tI={id:tO,detector:tD,loader:tq},tP="stateDiagram",tW=(0,c.K)(t=>/^\s*stateDiagram/.test(t),"detector"),tz=(0,c.K)(async()=>{let{diagram:t}=await r.e("q5").then(r.bind(r,"QP"));return{id:tP,diagram:t}},"loader"),tR={id:tP,detector:tW,loader:tz},tj="journey",tN=(0,c.K)(t=>/^\s*journey/.test(t),"detector"),tH=(0,c.K)(async()=>{let{diagram:t}=await r.e("h3").then(r.bind(r,"jx3"));return{id:tj,diagram:t}},"loader"),tU={id:tj,detector:tN,loader:tH},tY={draw:(0,c.K)((t,e,r)=>{h.R.debug("rendering svg for syntax error\n");let o=(0,i.D)(e),a=o.append("g");o.attr("viewBox","0 0 2412 512"),(0,l.a$)(o,100,512,!0),a.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"),a.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"),a.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"),a.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"),a.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"),a.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"),a.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"),a.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")},tX={db:{},renderer:tY,parser:{parse:(0,c.K)(()=>{},"parse")}},tG="flowchart-elk",tV=(0,c.K)((t,e={})=>!!/^\s*flowchart-elk/.test(t)&&(e.layout="elk",!0),"detector"),tZ=(0,c.K)(async()=>{let{diagram:t}=await Promise.all([r.e("k"),r.e("h1")]).then(r.bind(r,"PZ"));return{id:tG,diagram:t}},"loader"),tQ={id:tG,detector:tV,loader:tZ},tJ="timeline",t0=(0,c.K)(t=>/^\s*timeline/.test(t),"detector"),t1=(0,c.K)(async()=>{let{diagram:t}=await r.e("ka").then(r.bind(r,"mC"));return{id:tJ,diagram:t}},"loader"),t2={id:tJ,detector:t0,loader:t1},t5="mindmap",t3=(0,c.K)(t=>/^\s*mindmap/.test(t),"detector"),t4=(0,c.K)(async()=>{let{diagram:t}=await r.e("x1").then(r.bind(r,"Px"));return{id:t5,diagram:t}},"loader"),t6={id:t5,detector:t3,loader:t4},t8="kanban",t7=(0,c.K)(t=>/^\s*kanban/.test(t),"detector"),t9=(0,c.K)(async()=>{let{diagram:t}=await r.e(66).then(r.bind(r,"Mu"));return{id:t8,diagram:t}},"loader"),et={id:t8,detector:t7,loader:t9},ee="sankey",er=(0,c.K)(t=>/^\s*sankey(-beta)?/.test(t),"detector"),ei=(0,c.K)(async()=>{let{diagram:t}=await r.e("v").then(r.bind(r,"dF"));return{id:ee,diagram:t}},"loader"),eo={id:ee,detector:er,loader:ei},ea="packet",es=(0,c.K)(t=>/^\s*packet(-beta)?/.test(t),"detector"),en=(0,c.K)(async()=>{let{diagram:t}=await Promise.all([r.e("l9"),r.e("zi")]).then(r.bind(r,"Ji"));return{id:ea,diagram:t}},"loader"),el={id:ea,detector:es,loader:en},eh="radar",ec=(0,c.K)(t=>/^\s*radar-beta/.test(t),"detector"),ed=(0,c.K)(async()=>{let{diagram:t}=await Promise.all([r.e("l9"),r.e("hs")]).then(r.bind(r,"XY"));return{id:eh,diagram:t}},"loader"),eu={id:eh,detector:ec,loader:ed},eg="block",ep=(0,c.K)(t=>/^\s*block(-beta)?/.test(t),"detector"),ef=(0,c.K)(async()=>{let{diagram:t}=await Promise.all([r.e("l"),r.e("yg")]).then(r.bind(r,"AY"));return{id:eg,diagram:t}},"loader"),ey={id:eg,detector:ep,loader:ef},em="treeView",eC=(0,c.K)(t=>/^\s*treeView-beta/.test(t),"detector"),ex=(0,c.K)(async()=>{let{diagram:t}=await Promise.all([r.e("l9"),r.e("h")]).then(r.bind(r,"fLH"));return{id:em,diagram:t}},"loader"),eb={id:em,detector:eC,loader:ex},ek="architecture",ew=(0,c.K)(t=>/^\s*architecture/.test(t),"detector"),eB=(0,c.K)(async()=>{let{diagram:t}=await Promise.all([r.e("l9"),r.e("hp"),r.e(5)]).then(r.bind(r,"r5"));return{id:ek,diagram:t}},"loader"),eT={id:ek,detector:ew,loader:eB},eS="eventmodeling",ev=(0,c.K)(t=>/^\s*eventmodeling/.test(t),"detector"),e_=(0,c.K)(async()=>{let{diagram:t}=await Promise.all([r.e("l9"),r.e("na")]).then(r.bind(r,"Jz"));return{id:eS,diagram:t}},"loader"),eF={id:eS,detector:ev,loader:e_},eL="ishikawa",eA=(0,c.K)(t=>/^\s*ishikawa(-beta)?\b/i.test(t),"detector"),eM=(0,c.K)(async()=>{let{diagram:t}=await r.e("3r").then(r.bind(r,"Bf"));return{id:eL,diagram:t}},"loader"),e$={id:eL,detector:eA,loader:eM},eE="venn",eK=(0,c.K)(t=>/^\s*venn-beta/.test(t),"detector"),eO=(0,c.K)(async()=>{let{diagram:t}=await r.e("me").then(r.bind(r,"sV"));return{id:eE,diagram:t}},"loader"),eD={id:eE,detector:eK,loader:eO},eq="treemap",eI=(0,c.K)(t=>/^\s*treemap/.test(t),"detector"),eP=(0,c.K)(async()=>{let{diagram:t}=await Promise.all([r.e("l9"),r.e("c0")]).then(r.bind(r,"m2"));return{id:eq,diagram:t}},"loader"),eW={id:eq,detector:eI,loader:eP},ez="usecase",eR=(0,c.K)(t=>/^\s*usecase-beta(?:\s|$)/.test(t),"detector"),ej=(0,c.K)(async()=>{let{diagram:t}=await r.e("tr").then(r.bind(r,"Hk"));return{id:ez,diagram:t}},"loader"),eN={id:ez,detector:eR,loader:ej},eH="wardley",eU=(0,c.K)(t=>/^\s*wardley-beta/i.test(t),"detector"),eY=(0,c.K)(async()=>{let{diagram:t}=await Promise.all([r.e("l9"),r.e("jz")]).then(r.bind(r,"Zv"));return{id:eH,diagram:t}},"loader"),eX={id:eH,detector:eU,loader:eY},eG="cynefin",eV=(0,c.K)(t=>/^\s*cynefin-beta(?:[\s:]|$)/.test(t),"detector"),eZ=(0,c.K)(async()=>{let{diagram:t}=await Promise.all([r.e("l9"),r.e("5o")]).then(r.bind(r,"DG"));return{id:eG,diagram:t}},"loader"),eQ={id:eG,detector:eV,loader:eZ},eJ="railroad",e0=(0,c.K)(t=>/^\s*railroad-beta/i.test(t),"detector"),e1=(0,c.K)(async()=>{let{diagram:t}=await Promise.all([r.e("l9"),r.e("jg"),r.e("hn")]).then(r.bind(r,"Ti"));return{id:eJ,diagram:t}},"loader"),e2={id:eJ,detector:e0,loader:e1},e5="railroadEbnf",e3=(0,c.K)(t=>/^\s*railroad-ebnf-beta/i.test(t),"detector"),e4=(0,c.K)(async()=>{let{diagram:t}=await Promise.all([r.e("l9"),r.e("jg"),r.e(73)]).then(r.bind(r,"tc"));return{id:e5,diagram:t}},"loader"),e6={id:e5,detector:e3,loader:e4},e8="railroadAbnf",e7=(0,c.K)(t=>/^\s*railroad-abnf-beta/i.test(t),"detector"),e9=(0,c.K)(async()=>{let{diagram:t}=await Promise.all([r.e("l9"),r.e("jg"),r.e("t")]).then(r.bind(r,"Te"));return{id:e8,diagram:t}},"loader"),rt={id:e8,detector:e7,loader:e9},re="railroadPeg",rr=(0,c.K)(t=>/^\s*railroad-peg-beta/i.test(t),"detector"),ri=(0,c.K)(async()=>{let{diagram:t}=await Promise.all([r.e("l9"),r.e("jg"),r.e("nk")]).then(r.bind(r,"d7"));return{id:re,diagram:t}},"loader"),ro={id:re,detector:rr,loader:ri},ra=!1,rs=(0,c.K)(()=>{ra||(ra=!0,(0,l.Js)("error",tX,t=>"error"===t.toLowerCase().trim()),(0,l.Js)("---",{db:{clear:(0,c.K)(()=>{},"clear")},styles:{},renderer:{draw:(0,c.K)(()=>{},"draw")},parser:{parse:(0,c.K)(()=>{throw 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:(0,c.K)(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),(0,l.Xd)(tQ,t6,eT),(0,l.Xd)(tt,U,et,tI,ta,tg,tm,tC,tA,tK,to,V,t2,th,tR,tU,tw,eo,el,tv,ey,eF,eb,eu,e$,eW,e2,e6,rt,ro,eD,eX,eQ,eN))},"addDiagrams"),rn=(0,c.K)(async()=>{h.R.debug("Loading registered diagrams");let t=(await Promise.allSettled(Object.entries(l.mW).map(async([t,{detector:e,loader:r}])=>{if(r)try{(0,l.Gs)(t)}catch{try{let{diagram:t,id:i}=await r();(0,l.Js)(i,t,e)}catch(e){throw h.R.error(`Failed to load external diagram with key ${t}. Removing from detectors.`),delete l.mW[t],e}}}))).filter(t=>"rejected"===t.status);if(t.length>0){for(let e of(h.R.error(`Failed to load ${t.length} external diagrams`),t))h.R.error(e);throw Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams");function rl(t,e){t.attr("role","graphics-document document"),""!==e&&t.attr("aria-roledescription",e)}function rh(t,e,r,i){if(void 0!==t.insert){if(r){let e=`chart-desc-${i}`;t.attr("aria-describedby",e),t.insert("desc",":first-child").attr("id",e).text(r)}if(e){let r=`chart-title-${i}`;t.attr("aria-labelledby",r),t.insert("title",":first-child").attr("id",r).text(e)}}}(0,c.K)(rl,"setA11yDiagramInfo"),(0,c.K)(rh,"addSVGa11yTitleDescription");var rc=class t{constructor(t,e,r,i,o){this.type=t,this.text=e,this.db=r,this.parser=i,this.renderer=o}static{(0,c.K)(this,"Diagram")}static async fromText(e,r={}){let i="string"==typeof e?{raw:e,cleaned:e}:e,o=(0,l.zj)(),a=(0,l.Ch)(i.cleaned,o);try{(0,l.Gs)(a)}catch{let t=(0,l.J$)(a);if(!t)throw new l.C0(`Diagram ${a} not found.`);let{id:e,diagram:r}=await t();(0,l.Js)(e,r)}let{db:s,parser:c,renderer:d,init:u}=(0,l.Gs)(a);c.parser&&(c.parser.yy=s),s.clear?.(),u?.(o),r.title&&s.setDiagramTitle?.(r.title);let g=i.cleaned;if(s.preserveCommentsWhenParsing&&i.withComments){let t=o.maxTextSize??l.UI.maxTextSize;i.withComments.length>t?h.R.warn(`Comment-preserving source exceeds maxTextSize (${i.withComments.length} > ${t}); parsing the comment-stripped text instead. Reported source positions will not account for comment lines.`):g=i.withComments}let p=(0,n.C4)(g)+"\n";return i.frontmatterLineOffset&&s.setFrontmatterLineOffset?.(i.frontmatterLineOffset),await c.parse(p),new t(a,p,s,c,d)}async render(t,e){await this.renderer.draw(this.text,t,e,this)}getParser(){return this.parser}getType(){return this.type}},rd=[],ru=(0,c.K)(()=>{rd.forEach(t=>{t()}),rd=[]},"attachFunctions"),rg=(0,c.K)(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function rp(t){let e=t.match(l.EJ);if(!e)return{text:t,metadata:{}};let r=e[1],i=r?e[2].split("\n").map(t=>t.startsWith(r)?t.slice(r.length):t).join("\n"):e[2],a=(0,o.H)(i,{schema:o.r})??{};a="object"!=typeof a||Array.isArray(a)?{}:a;let s={};return a.displayMode&&(s.displayMode=a.displayMode.toString()),a.title&&(s.title=a.title.toString()),a.config&&(s.config=a.config),{text:t.slice(e[0].length),metadata:s}}(0,c.K)(rp,"extractFrontMatter");var rf=(0,c.K)(t=>t.replace(/\r\n?/g,"\n").replace(/<(\w+)([^>]*)>/g,(t,e,r)=>"<"+e+r.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),ry=(0,c.K)(t=>{let{text:e,metadata:r}=rp(t),{displayMode:i,title:o,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:o,config:a,text:e}},"processFrontmatter"),rm=(0,c.K)(t=>{let e=n._K.detectInit(t)??{},r=n._K.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:t})=>"wrap"===t):r?.type==="wrap"&&(e.wrap=!0),{text:(0,n.vU)(t),directive:e}},"processDirectives");function rC(t){let e=rf(t),r=ry(e),i=rm(r.text),o=(0,n.$t)(r.config,i.directive),a=i.text;return{code:{raw:t,cleaned:rg(a),withComments:a,frontmatterLineOffset:e.length>r.text.length?(e.substring(0,e.length-r.text.length).match(/\n/g)??[]).length:0},title:r.title,config:o}}function rx(t){return btoa(Array.from(new TextEncoder().encode(t),t=>String.fromCodePoint(t)).join(""))}(0,c.K)(rC,"preprocessDiagram"),(0,c.K)(rx,"toBase64");var rb=["foreignobject"],rk=["dominant-baseline"];function rw(t){let e,r=rC(t);(0,l.cL)();try{e=(0,l.Ch)(r.code.cleaned,(0,l.zj)())}catch{e=void 0}return(0,l.yj)(e),(0,l.xA)(r.config??{}),r}async function rB(t,e){rs();try{let{code:e,config:r}=rw(t);return{diagramType:(await rc.fromText(e)).type,config:r}}catch(t){if(e?.suppressErrors)return!1;throw t}finally{(0,l.yj)(void 0)}}(0,c.K)(rw,"processAndSetConfigs"),(0,c.K)(rB,"parse");var rT=(0,c.K)((t,e,r=[])=>{let i=(0,l.Df)(`{ ${r.join(" !important; ")} !important; }`);return`.${t} ${e} ${i}`},"cssImportantStyles"),rS=(0,c.K)((t,e=new Map)=>{let r=new CSSStyleSheet;if(void 0!==t.fontFamily&&r.insertRule(`:root { --mermaid-font-family: ${t.fontFamily}}`,r.cssRules.length),void 0!==t.altFontFamily&&r.insertRule(`:root { --mermaid-alt-font-family: ${t.altFontFamily}}`,r.cssRules.length),e instanceof Map){let i=(0,l.E)(t)?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(t=>{H(t.styles)||i.forEach(e=>{r.insertRule(rT(t.id,e,t.styles),r.cssRules.length)}),H(t.textStyles)||r.insertRule(rT(t.id,"tspan",(t?.textStyles||[]).map(t=>t.replace("color","fill"))),r.cssRules.length)})}let i="";if(void 0!==t.themeCSS)if("function"==typeof r.replaceSync){let e=new CSSStyleSheet;e.replaceSync(t.themeCSS),i=(0,l.KG)(e)+"\n"}else i+=`${t.themeCSS}
|
|
196
|
-
`;return i+(0,l.KG)(r)},"createCssStyles"),rv=(0,c.K)((t,e)=>{var r,i,o,a,s;return S((o=function t(e,r,i,o,a,s,n,l,h){for(var c,d,u,p,f=0,y=0,m=n,C=0,S=0,v=0,L=1,W=1,z=1,R=0,j=0,N="",H=a,U=s,Y=o,X=N;W;)switch(v=j,j=K()){case 40:108!=v&&58==k(X,m-1)?(R++,X+="("):X+=q(j);break;case 41:R--,X+=")";break;case 34:case 39:case 91:X+=q(j);break;case 9:case 10:case 13:case 32:if(R>0){X+=x(j);break}X+=function(t){for(;M=O();)if(M<33)K();else break;return D(t)>2||D(M)>3?"":" "}(v);break;case 92:X+=function(t,e){for(var r;--e&&K()&&!(M<48)&&!(M>102)&&(!(M>57)||!(M<65))&&(!(M>70)||!(M<97)););return r=A+(e<6&&32==O()&&32==K()),w($,t,r)}(A-1,7);continue;case 47:switch(O()){case 42:case 47:T((c=function(t,e){for(;K();)if(t+M===57)break;else if(t+M===84&&47===O())break;return"/*"+w($,e,A-1)+"*"+x(47===t?t:K())}(K(),A),d=r,u=i,p=h,E(c,d,u,g,x(M),w(c,2,-2),0,p)),h),(5==D(v||1)||5==D(O()||1))&&B(X)&&" "!==w(X,-1,void 0)&&(X+=" ");break;default:X+="/"}break;case 123*L:l[f++]=B(X)*z;case 125*L:case 59:case 0:if(R>0&&j){X+=x(j);break}switch(j){case 0:case 125:W=0;case 59+y:-1==z&&(X=b(X,/\f/g,"")),S>0&&(B(X)-m||0===L)&&T(S>32?P(X+";",o,i,m-1,h):P(b(X," ","")+";",o,i,m-2,h),h);break;case 59:X+=";";default:if(T(Y=I(X,r,i,f,y,a,l,N,H=[],U=[],m,s),s),123===j)if(0===y)t(X,r,Y,Y,H,s,m,l,U);else{switch(C){case 99:if(110===k(X,3))break;case 108:if(97===k(X,2))break;default:y=0;case 100:case 109:case 115:}y?t(e,Y,Y,o&&T(I(e,Y,Y,0,0,a,l,N,a,H=[],m,U),U),a,U,m,l,o?H:U):t(X,Y,Y,Y,[""],U,0,l,U)}}f=y=S=0,L=z=1,N=X="",m=n;break;case 58:m=1+B(X),S=v;default:if(L<1){if(123==j)--L;else if(125==j&&0==L++&&125==(M=A>0?k($,--A):0,F--,10===M&&(F=1,_--),M))continue}switch(X+=x(j),j*L){case 38:z=y>0?1:(X+="\f",-1);break;case 44:if(R>0)break;l[f++]=(B(X)-1)*z,z=1;break;case 64:45===O()&&(X+=q(K())),C=O(),y=m=B(N=X+=function(t){for(;!D(O());)K();return w($,t,A)}(A)),j++;break;case 45:45===v&&2==B(X)&&(L=0)}}return s}("",null,null,null,[""],(i=r=`${t}{${e}}`,_=F=1,L=B($=i),A=0,r=[]),0,[0],r),$="",o),(s=(a=[(0,c.K)(function(e,r,i,o){"rule"===e.type&&Array.isArray(e.props)?e.parent&&e.parent.type===y||(e.props=e.props.map(r=>r===t&&Array.isArray(e.children)&&e.children.every(t=>"decl"===t.type&&(new Set(["font-family","font-size","fill"])).has(t.props))||(r.startsWith(`${t} `)||r.startsWith(`${t}>`))&&!r.startsWith(`${t} ||`)?r:`${t} ${r}`)):e.type.startsWith("@")&&(["@media","@supports",m,"@scope","@container","@starting-style",y].includes(e.type)||(h.R.warn(`Removing unsupported at-rule ${e.type} from CSS`),e.type=g))},"addNamespace"),v]).length,function(t,e,r,i){for(var o="",n=0;n<s;n++)o+=a[n](t,e,r,i)||"";return o}))},"compileCSS"),r_=(0,c.K)((t,e,r,i)=>{let o=rS(t,r),a=(0,l.tM)(e,o,{...t.themeVariables,theme:t.theme,look:t.look},i);return rv(i,a)},"createUserStyles"),rF=(0,c.K)((t="",e,r)=>{let i=t;return r||e||(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=(i=(0,n.Sm)(i)).replace(/<br>/g,"<br/>")},"cleanUpSvgCode"),rL=(0,c.K)((t="",e)=>{let r=e?.viewBox?.baseVal?.height?e.viewBox.baseVal.height+"px":"100%",i=rx(`<body style="margin:0">${t}</body>`);return`<iframe style="width:100%;height:${r};border:0;margin:0;" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="allow-top-navigation-by-user-activation allow-popups">
|
|
197
|
-
The "iframe" tag is not supported by your browser.
|
|
198
|
-
</iframe>`},"putIntoIFrame"),rA=(0,c.K)((t,e,r,i,o)=>{let a=t.append("div");a.attr("id",r),i&&a.attr("style",i);let s=a.append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg");return o&&s.attr("xmlns:xlink",o),s.append("g"),t},"appendDivSvgG");function rM(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}(0,c.K)(rM,"sandboxedIframe");var r$=(0,c.K)((t,e,r,i)=>{t.getElementById(e)?.remove(),t.getElementById(r)?.remove(),t.getElementById(i)?.remove()},"removeExistingElements"),rE=(0,c.K)(async function(t,e,r){let i,o;rs();let a=rw(e),s=a.code;e=s.cleaned;let n=(0,l.zj)();h.R.debug(n),e.length>(n?.maxTextSize??5e4)&&(s={raw:e="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",cleaned:e});let d=`#${t}`,g="i"+t,p="#"+g,f="d"+t,y="#"+f,m=(0,c.K)(()=>{let t=x?p:y,e=(0,u.Ltv)(t).node();e&&"remove"in e&&e.remove()},"removeTempElements"),C=(0,u.Ltv)(document.body),x="sandbox"===n.securityLevel,b="loose"===n.securityLevel,k=n.fontFamily;if(void 0!==r){if(r&&(r.innerHTML=""),x){let t=rM((0,u.Ltv)(r),g);(C=(0,u.Ltv)(t.nodes()[0].contentDocument.body)).node().style.margin="0"}else C=(0,u.Ltv)(r);rA(C,t,f,`font-family: ${k}`,"http://www.w3.org/1999/xlink")}else{if(r$(document,t,f,g),x){let t=rM((0,u.Ltv)(document.body),g);(C=(0,u.Ltv)(t.nodes()[0].contentDocument.body)).node().style.margin="0"}else C=(0,u.Ltv)("body");rA(C,t,f)}try{i=await rc.fromText(s,{title:a.title})}catch(t){if(n.suppressErrorRendering)throw m(),t;i=await rc.fromText("error"),o=t}let w=C.select(y).node(),B=i.type,T=w.firstChild,S=T.firstChild,v=r_(n,B,i.renderer.getClasses?.(e,i),d),_=document.createElement("style");_.innerHTML=v,T.insertBefore(_,S);try{await i.renderer.draw(e,t,"12.0.0",i)}catch(r){throw n.suppressErrorRendering?m():tY.draw(e,t,"12.0.0"),r}rq(B,C.select(`${y} svg`),i.db.getAccTitle?.(),i.db.getAccDescription?.());let F=(0,c.K)(()=>{C.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let e=C.select(y).node().innerHTML;return h.R.debug("config.arrowMarkerAbsolute",n.arrowMarkerAbsolute),e=rF(e,x,(0,l._3)(n.arrowMarkerAbsolute)),x?e=rL(e,C.select(y+" svg").node()):b||(e=W.A.sanitize(e,{ADD_TAGS:rb,ADD_ATTR:rk,HTML_INTEGRATION_POINTS:{foreignobject:!0}})),ru(),e},"serializeSvg")();if(o)throw o;return m(),{diagramType:B,svg:F,bindFunctions:i.db.bindFunctions}},"renderDiagram"),rK=(0,c.K)(async function(t,e,r){try{return await rE(t,e,r)}finally{(0,l.yj)(void 0)}},"render");function rO(t={}){let e=(0,l.hH)({},t);e?.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),(0,l.wZ)(e);let r=l.sb.theme;e?.theme&&Object.hasOwn(l.H$,e.theme)?e.themeVariables=l.H$[e.theme].getThemeVariables(e.themeVariables):e&&(null!=e.theme&&"null"!==e.theme&&(e.theme=r),e.themeVariables=l.H$[r].getThemeVariables(e.themeVariables));let i="object"==typeof e?(0,l.UU)(e):(0,l.Q2)();(0,h.H)(i.logLevel),rs()}(0,c.K)(rO,"initialize");var rD=(0,c.K)((t,e={})=>{let{code:r}=rC(t);return rc.fromText(r,e)},"getDiagramFromText");function rq(t,e,r,i){rl(e,t),rh(e,r,i,e.attr("id"))}(0,c.K)(rq,"addA11yInfo");var rI=Object.freeze({render:rK,parse:rB,getDiagramFromText:rD,initialize:rO,getConfig:l.zj,setConfig:l.Nk,getSiteConfig:l.Q2,updateSiteConfig:l.B6,reset:(0,c.K)(()=>{(0,l.cL)()},"reset"),globalReset:(0,c.K)(()=>{(0,l.cL)(l.sb)},"globalReset"),defaultConfig:l.sb});(0,h.H)((0,l.zj)().logLevel),(0,l.cL)((0,l.zj)());var rP=(0,c.K)((t,e,r)=>{h.R.warn(t),(0,n.dq)(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},"handleError"),rW=(0,c.K)(async function(t={querySelector:".mermaid"}){try{await rz(t)}catch(e){if((0,n.dq)(e)&&h.R.error(e.str),rJ.parseError&&rJ.parseError(e),!t.suppressErrors)throw h.R.error("Use the suppressErrors option to suppress these errors"),e}},"run"),rz=(0,c.K)(async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){let i,o,a=rI.getConfig();if(h.R.debug(`${!t?"No ":""}Callback function found`),r)i=r;else if(e)i=document.querySelectorAll(e);else throw Error("Nodes and querySelector are both undefined");h.R.debug(`Found ${i.length} diagrams`),a?.startOnLoad!==void 0&&(h.R.debug("Start On Load: "+a?.startOnLoad),rI.updateSiteConfig({startOnLoad:a?.startOnLoad}));let s=new n._K.InitIDGenerator(a.deterministicIds,a.deterministicIDSeed),l=[];for(let e of Array.from(i)){if(h.R.info("Rendering diagram: "+e.id),e.getAttribute("data-processed"))continue;e.setAttribute("data-processed","true");let r=`mermaid-${s.next()}`;o=e.innerHTML,o=(0,d.T)(n._K.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");let i=n._K.detectInit(o);i&&h.R.debug("Detected early reinit: ",i);try{let{svg:i,bindFunctions:a}=await rZ(r,o,e);e.innerHTML=i,t&&await t(r),a&&a(e)}catch(t){rP(t,l,rJ.parseError)}}if(l.length>0)throw l[0]},"runThrowsErrors"),rR=(0,c.K)(function(t){rI.initialize(t)},"initialize"),rj=(0,c.K)(async function(t,e,r){h.R.warn("mermaid.init is deprecated. Please use run instead."),t&&rR(t);let i={postRenderCallback:r,querySelector:".mermaid"};"string"==typeof e?i.querySelector=e:e&&(e instanceof HTMLElement?i.nodes=[e]:i.nodes=e),await rW(i)},"init"),rN=(0,c.K)(async(t,{lazyLoad:e=!0}={})=>{rs(),(0,l.Xd)(...t),!1===e&&await rn()},"registerExternalDiagrams"),rH=(0,c.K)(function(){if(rJ.startOnLoad){let{startOnLoad:t}=rI.getConfig();t&&rJ.run().catch(t=>h.R.error("Mermaid failed to initialize",t))}},"contentLoaded");"u">typeof document&&window.addEventListener("load",rH,!1);var rU=(0,c.K)(function(t){rJ.parseError=t},"setParseErrorHandler"),rY=[],rX=!1,rG=(0,c.K)(async()=>{if(!rX){for(rX=!0;rY.length>0;){let t=rY.shift();if(t)try{await t()}catch(t){h.R.error("Error executing queue",t)}}rX=!1}},"executeQueue"),rV=(0,c.K)(async(t,e)=>new Promise((r,i)=>{let o=(0,c.K)(()=>new Promise((o,a)=>{rI.parse(t,e).then(t=>{o(t),r(t)},t=>{h.R.error("Error parsing",t),rJ.parseError?.(t),a(t),i(t)})}),"performCall");rY.push(o),rG().catch(i)}),"parse"),rZ=(0,c.K)((t,e,r)=>new Promise((i,o)=>{let a=(0,c.K)(()=>new Promise((a,s)=>{rI.render(t,e,r).then(t=>{a(t),i(t)},t=>{h.R.error("Error parsing",t),rJ.parseError?.(t),s(t),o(t)})}),"performCall");rY.push(a),rG().catch(o)}),"render"),rQ=(0,c.K)(()=>Object.keys(l.mW).map(t=>({id:t})),"getRegisteredDiagramsMetadata"),rJ={startOnLoad:!0,mermaidAPI:rI,parse:rV,render:rZ,init:rj,run:rW,registerExternalDiagrams:rN,registerLayoutLoaders:a.sO,initialize:rR,parseError:void 0,contentLoaded:rH,setParseErrorHandler:rU,detectType:l.Ch,registerIconPacks:s.pC,getRegisteredDiagramsMetadata:rQ},r0=rJ},pk(t,e,r){"use strict";function i(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var i=Array.from("string"==typeof t?[t]:t);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var o=i.reduce(function(t,e){var r=e.match(/\n([\t ]+|(?!\s).)/g);return r?t.concat(r.map(function(t){var e,r;return null!=(r=null==(e=t.match(/[\t ]/g))?void 0:e.length)?r:0})):t},[]);if(o.length){var a=RegExp("\n[ ]{".concat(Math.min.apply(Math,o),"}"),"g");i=i.map(function(t){return t.replace(a,"\n")})}i[0]=i[0].replace(/^\r?\n/,"");var s=i[0];return e.forEach(function(t,e){var r=s.match(/(?:^|\n)( *)$/),o=r?r[1]:"",a=t;"string"==typeof t&&t.includes("\n")&&(a=String(t).split("\n").map(function(t,e){return 0===e?t:"".concat(o).concat(t)}).join("\n")),s+=a+i[e+1]}),s}r.d(e,{T:()=>i})}}]);
|