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,286 +0,0 @@
|
|
|
1
|
-
"use strict";(self.rspackChunkompchamber=self.rspackChunkompchamber||[]).push([["q5"],{v0(t,e,s){var i=s("Yr"),r=s("Gt"),a=s("tP"),n=s("El"),o=(0,r.K)((t,e)=>{let s=t.append("rect");if(s.attr("x",e.x),s.attr("y",e.y),s.attr("fill",e.fill),s.attr("stroke",e.stroke),s.attr("width",e.width),s.attr("height",e.height),e.name&&s.attr("name",e.name),e.rx&&s.attr("rx",e.rx),e.ry&&s.attr("ry",e.ry),void 0!==e.attrs)for(let t in e.attrs)s.attr(t,e.attrs[t]);return e.class&&s.attr("class",e.class),s},"drawRect"),l=(0,r.K)((t,e)=>{o(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"}).lower()},"drawBackgroundRect"),c=(0,r.K)((t,e)=>{let s=e.text.replace(i.H1," "),r=t.append("text");r.attr("x",e.x),r.attr("y",e.y),r.attr("class","legend"),r.style("text-anchor",e.anchor),e.class&&r.attr("class",e.class);let a=r.append("tspan");return a.attr("x",e.x+2*e.textMargin),a.text(s),r},"drawText"),h=(0,r.K)((t,e,s,i)=>{let r=t.append("image");r.attr("x",e),r.attr("y",s);let n=(0,a.J)(i);r.attr("xlink:href",n)},"drawImage"),d=(0,r.K)((t,e,s,i)=>{let r=t.append("use");r.attr("x",e),r.attr("y",s);let n=(0,a.J)(i);r.attr("xlink:href",`#${n}`)},"drawEmbeddedImage"),u=(0,r.K)(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),p=(0,r.K)(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),y=(0,r.K)(()=>{let t=(0,n.Ltv)(".mermaidTooltip");return t.empty()&&(t=(0,n.Ltv)("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),t},"createTooltip");s.d(e,{CP:()=>d,Ck:()=>y,HT:()=>p,PB:()=>u,aC:()=>h,lC:()=>l,m:()=>c,tk:()=>o})},WJ(t,e,s){var i=s("Yr"),r=s("M4"),a=s("Gt"),n=(0,a.K)((t,e,s,a)=>{t.attr("class",s);let{width:n,height:c,x:h,y:d}=o(t,e);(0,i.a$)(t,c,n,a);let u=l(h,d,n,c,e);t.attr("viewBox",u),r.R.debug(`viewBox configured: ${u} with padding: ${e}`)},"setupViewPortForSVG"),o=(0,a.K)((t,e)=>{let s=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:s.width+2*e,height:s.height+2*e,x:s.x,y:s.y}},"calculateDimensionsWithPadding"),l=(0,a.K)((t,e,s,i,r)=>`${t-r} ${e-r} ${s} ${i}`,"createViewBox");s.d(e,{P:()=>n})},OT(t,e,s){var i=s("Gt"),r=s("El"),a=(0,i.K)((t,e)=>{let s;return"sandbox"===e&&(s=(0,r.Ltv)("#i"+t)),("sandbox"===e?(0,r.Ltv)(s.nodes()[0].contentDocument.body):(0,r.Ltv)("body")).select(`[id="${t}"]`)},"getDiagramElement");s.d(e,{A:()=>a})},QP(t,e,s){var i=s("OT"),r=s("WJ"),a=s("mW");s("Q");var n=s("v0");s("ix"),s("LC"),s("bQ"),s("Ut"),s("PF"),s("iV"),s("h5");var o=s("pK"),l=s("NH"),c=s("Yr"),h=s("M4"),d=s("Gt"),u=s("El"),p=s("Lu"),y=function(){var t=(0,d.K)(function(t,e,s,i){for(s=s||{},i=t.length;i--;s[t[i]]=e);return s},"o"),e=[1,2],s=[1,3],i=[1,4],r=[2,4],a=[1,9],n=[1,11],o=[1,16],l=[1,17],c=[1,18],h=[1,19],u=[1,33],p=[1,20],y=[1,21],g=[1,22],f=[1,23],m=[1,24],S=[1,26],k=[1,27],b=[1,28],T=[1,29],_=[1,30],x=[1,31],E=[1,32],$=[1,35],D=[1,36],v=[1,37],C=[1,38],w=[1,34],I=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],A=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],L=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],R={trace:(0,d.K)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"--\x3e":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"--\x3e",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:(0,d.K)(function(t,e,s,i,r,a,n){var o=a.length-1;switch(r){case 3:return i.setRootDoc(a[o]),a[o];case 4:this.$=[];break;case 5:"nl"!=a[o]&&(a[o-1].push(a[o]),this.$=a[o-1]);break;case 6:case 7:case 12:this.$=a[o];break;case 8:this.$="nl";break;case 13:let l=a[o-1];l.description=i.trimColon(a[o]),this.$=l;break;case 14:this.$={stmt:"relation",state1:a[o-2],state2:a[o]};break;case 15:let c=i.trimColon(a[o]);this.$={stmt:"relation",state1:a[o-3],state2:a[o-1],description:c};break;case 19:this.$={stmt:"state",id:a[o-3],type:"default",description:"",doc:a[o-1]};break;case 20:var h=a[o],d=a[o-2].trim();if(a[o].match(":")){var u=a[o].split(":");h=u[0],d=[d,u[1]]}this.$={stmt:"state",id:h,type:"default",description:d};break;case 21:this.$={stmt:"state",id:a[o-3],type:"default",description:a[o-5],doc:a[o-1]};break;case 22:this.$={stmt:"state",id:a[o],type:"fork"};break;case 23:this.$={stmt:"state",id:a[o],type:"join"};break;case 24:this.$={stmt:"state",id:a[o],type:"choice"};break;case 25:this.$={stmt:"state",id:i.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:a[o-1].trim(),note:{position:a[o-2].trim(),text:a[o].trim()}};break;case 29:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 30:case 31:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:a[o-3],url:a[o-2],tooltip:a[o-1]};break;case 33:this.$={stmt:"click",id:a[o-3],url:a[o-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:a[o-1].trim(),classes:a[o].trim()};break;case 36:this.$={stmt:"style",id:a[o-1].trim(),styleClass:a[o].trim()};break;case 37:this.$={stmt:"applyClass",id:a[o-1].trim(),styleClass:a[o].trim()};break;case 38:i.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:i.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:i.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:i.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:a[o].trim(),type:"default",description:""};break;case 46:case 47:this.$={stmt:"state",id:a[o-2].trim(),classes:[a[o].trim()],type:"default",description:""}}},"anonymous"),table:[{3:1,4:e,5:s,6:i},{1:[3]},{3:5,4:e,5:s,6:i},{3:6,4:e,5:s,6:i},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:a,5:n,8:8,9:10,10:12,11:13,12:14,13:15,16:o,17:l,19:c,22:h,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:k,37:b,38:T,41:_,45:x,48:E,51:$,52:D,53:v,54:C,57:w},t(I,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:o,17:l,19:c,22:h,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:k,37:b,38:T,41:_,45:x,48:E,51:$,52:D,53:v,54:C,57:w},t(I,[2,7]),t(I,[2,8]),t(I,[2,9]),t(I,[2,10]),t(I,[2,11]),t(I,[2,12],{14:[1,40],15:[1,41]}),t(I,[2,16]),{18:[1,42]},t(I,[2,18],{20:[1,43]}),{23:[1,44]},t(I,[2,22]),t(I,[2,23]),t(I,[2,24]),t(I,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(I,[2,28]),{34:[1,49]},{36:[1,50]},t(I,[2,31]),{13:51,24:u,57:w},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(A,[2,44],{58:[1,56]}),t(A,[2,45],{58:[1,57]}),t(I,[2,38]),t(I,[2,39]),t(I,[2,40]),t(I,[2,41]),t(I,[2,6]),t(I,[2,13]),{13:58,24:u,57:w},t(I,[2,17]),t(L,r,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(I,[2,29]),t(I,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(I,[2,14],{14:[1,71]}),{4:a,5:n,8:8,9:10,10:12,11:13,12:14,13:15,16:o,17:l,19:c,21:[1,72],22:h,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:k,37:b,38:T,41:_,45:x,48:E,51:$,52:D,53:v,54:C,57:w},t(I,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(I,[2,34]),t(I,[2,35]),t(I,[2,36]),t(I,[2,37]),t(A,[2,46]),t(A,[2,47]),t(I,[2,15]),t(I,[2,19]),t(L,r,{7:78}),t(I,[2,26]),t(I,[2,27]),{5:[1,79]},{5:[1,80]},{4:a,5:n,8:8,9:10,10:12,11:13,12:14,13:15,16:o,17:l,19:c,21:[1,81],22:h,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:k,37:b,38:T,41:_,45:x,48:E,51:$,52:D,53:v,54:C,57:w},t(I,[2,32]),t(I,[2,33]),t(I,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:(0,d.K)(function(t,e){if(e.recoverable)this.trace(t);else{var s=Error(t);throw s.hash=e,s}},"parseError"),parse:(0,d.K)(function(t){var e=this,s=[0],i=[],r=[null],a=[],n=this.table,o="",l=0,c=0,h=0,u=a.slice.call(arguments,1),p=Object.create(this.lexer),y={};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y[g]=this.yy[g]);p.setInput(t,y),y.lexer=p,y.parser=this,void 0===p.yylloc&&(p.yylloc={});var f=p.yylloc;a.push(f);var m=p.options&&p.options.ranges;function S(){var t;return"number"!=typeof(t=i.pop()||p.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.parseError?this.parseError=y.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,d.K)(function(t){s.length=s.length-2*t,r.length=r.length-t,a.length=a.length-t},"popStack"),(0,d.K)(S,"lex");for(var k,b,T,_,x,E,$,D,v,C={};;){if(T=s[s.length-1],this.defaultActions[T]?_=this.defaultActions[T]:(null==k&&(k=S()),_=n[T]&&n[T][k]),void 0===_||!_.length||!_[0]){var w="";for(E in v=[],n[T])this.terminals_[E]&&E>2&&v.push("'"+this.terminals_[E]+"'");w=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[k]||k)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==k?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(w,{text:p.match,token:this.terminals_[k]||k,line:p.yylineno,loc:f,expected:v})}if(_[0]instanceof Array&&_.length>1)throw Error("Parse Error: multiple actions possible at state: "+T+", token: "+k);switch(_[0]){case 1:s.push(k),r.push(p.yytext),a.push(p.yylloc),s.push(_[1]),k=null,b?(k=b,b=null):(c=p.yyleng,o=p.yytext,l=p.yylineno,f=p.yylloc,h>0&&h--);break;case 2:if($=this.productions_[_[1]][1],C.$=r[r.length-$],C._$={first_line:a[a.length-($||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-($||1)].first_column,last_column:a[a.length-1].last_column},m&&(C._$.range=[a[a.length-($||1)].range[0],a[a.length-1].range[1]]),void 0!==(x=this.performAction.apply(C,[o,c,l,y,_[1],r,a].concat(u))))return x;$&&(s=s.slice(0,-1*$*2),r=r.slice(0,-1*$),a=a.slice(0,-1*$)),s.push(this.productions_[_[1]][0]),r.push(C.$),a.push(C._$),D=n[s[s.length-2]][s[s.length-1]],s.push(D);break;case 3:return!0}}return!0},"parse")};function N(){this.yy={}}return R.lexer={EOF:1,parseError:(0,d.K)(function(t,e){if(this.yy.parser)this.yy.parser.parseError(t,e);else throw Error(t)},"parseError"),setInput:(0,d.K)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,d.K)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,d.K)(function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,d.K)(function(){return this._more=!0,this},"more"),reject:(0,d.K)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,d.K)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,d.K)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,d.K)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,d.K)(function(){var t=this.pastInput(),e=Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,d.K)(function(t,e){var s,i,r;if(this.options.backtrack_lexer&&(r={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack)for(var a in r)this[a]=r[a];return!1},"test_match"),next:(0,d.K)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,s,i,r=this._currentRules(),a=0;a<r.length;a++)if((s=this._input.match(this.rules[r[a]]))&&(!e||s[0].length>e[0].length)){if(e=s,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,r[a])))return t;if(!this._backtrack)return!1;e=!1;continue}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,d.K)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,d.K)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,d.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,d.K)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,d.K)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,d.K)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,d.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,d.K)(function(t,e,s,i){function r(){let s=e.yytext.indexOf("%%");if(0===s)return!1;if(s>0){let i=e.yytext.slice(0,s),r=e.yytext.slice(s);r&&t.lexer.unput(r),e.yytext=i}return!0}switch((0,d.K)(r,"processId"),s){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:case 43:return 51;case 5:case 44:return 52;case 6:case 45:return 53;case 7:case 46:return 54;case 8:case 78:return 5;case 9:case 10:case 11:case 12:case 57:case 63:break;case 13:case 33:return this.pushState("SCALE"),17;case 14:case 34:return 18;case 15:case 21:case 35:case 50:case 54:this.popState();break;case 16:return this.begin("acc_title"),33;case 17:return this.popState(),"acc_title_value";case 18:return this.begin("acc_descr"),35;case 19:return this.popState(),"acc_descr_value";case 20:this.begin("acc_descr_multiline");break;case 22:return"acc_descr_multiline_value";case 23:return this.pushState("CLASSDEF"),41;case 24:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 25:return this.popState(),this.pushState("CLASSDEFID"),42;case 26:return this.popState(),43;case 27:return this.pushState("CLASS"),48;case 28:return this.popState(),this.pushState("CLASS_STYLE"),49;case 29:return this.popState(),50;case 30:return this.pushState("STYLE"),45;case 31:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;case 32:return this.popState(),47;case 36:this.pushState("STATE");break;case 37:case 40:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),25;case 38:case 41:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),26;case 39:case 42:return this.popState(),e.yytext=e.yytext.slice(0,-10).trim(),27;case 47:this.pushState("STATE_STRING");break;case 48:return this.pushState("STATE_ID"),"AS";case 49:case 65:if(!r())return;return this.popState(),"ID";case 51:return"STATE_DESCR";case 52:throw Error('Error: State name must be a single word. Found: "'+e.yytext.trim()+'"');case 53:return 19;case 55:return this.popState(),this.pushState("struct"),20;case 56:return this.popState(),21;case 58:return this.begin("NOTE"),29;case 59:return this.popState(),this.pushState("NOTE_ID"),59;case 60:return this.popState(),this.pushState("NOTE_ID"),60;case 61:this.popState(),this.pushState("FLOATING_NOTE");break;case 62:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 64:return"NOTE_TEXT";case 66:if(!r())return;return this.popState(),this.pushState("NOTE_TEXT"),24;case 67:return this.popState(),e.yytext=e.yytext.substr(2).trim(),31;case 68:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),31;case 69:case 70:return 6;case 71:return 16;case 72:return 57;case 73:if(!r())return;return 24;case 74:return e.yytext=e.yytext.trim(),14;case 75:return 15;case 76:return 28;case 77:return 58;case 79:return"INVALID"}},"anonymous"),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\w+\s+\w+.*?\{)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?\n\s*end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[10,11,12],inclusive:!1},struct:{rules:[10,11,12,23,27,30,36,43,44,45,46,56,57,58,72,73,74,75,76,77],inclusive:!1},FLOATING_NOTE_ID:{rules:[65],inclusive:!1},FLOATING_NOTE:{rules:[62,63,64],inclusive:!1},NOTE_TEXT:{rules:[67,68],inclusive:!1},NOTE_ID:{rules:[66],inclusive:!1},NOTE:{rules:[59,60,61],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[32],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[31],inclusive:!1},CLASS_STYLE:{rules:[29],inclusive:!1},CLASS:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[26],inclusive:!1},CLASSDEF:{rules:[24,25],inclusive:!1},acc_descr_multiline:{rules:[21,22],inclusive:!1},acc_descr:{rules:[19],inclusive:!1},acc_title:{rules:[17],inclusive:!1},SCALE:{rules:[14,15,34,35],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[49],inclusive:!1},STATE_STRING:{rules:[50,51],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[10,11,12,37,38,39,40,41,42,47,48,52,53,54,55],inclusive:!1},ID:{rules:[10,11,12],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,12,13,16,18,20,23,27,30,33,36,55,58,69,70,71,72,73,74,75,77,78,79],inclusive:!0}}},(0,d.K)(N,"Parser"),N.prototype=R,R.Parser=N,new N}();y.parser=y;var g="TB",f="state",m="root",S="relation",k="default",b="divider",T="fill:none",_="fill: #333",x="markdown",E="normal",$="rect",D="rectWithTitle",v="divider",C="roundedWithTitle",w="statediagram",I=`${w}-state`,A="transition",L=`${A} note-edge`,R=`${w}-note`,N=`${w}-cluster`,K=`${w}-cluster-alt`,O="parent",B="note",F="----",P=`${F}${B}`,Y=`${F}${O}`,G=new Map,j=0,W=0,M=new Map,z=(0,d.K)((t,e,s,i)=>{if(t===v&&s?.id!==void 0&&M.has(s.id)){let t=M.get(s.id);return M.set(e,t),t}let r=W++,a=i?void 0:r;return M.set(e,a),a},"colorSlotFor");function U(t="",e=0,s="",i=F){let r=null!==s&&s.length>0?`${i}${s}`:"";return`state-${t}${r}-${e}`}(0,d.K)(U,"stateDomId");var H=(0,d.K)((t,e,s,i,r,a,n,o)=>{h.R.trace("items",e),e.forEach(e=>{switch(e.stmt){case f:case k:Q(t,e,s,i,r,a,n,o);break;case S:{Q(t,e.state1,s,i,r,a,n,o),Q(t,e.state2,s,i,r,a,n,o);let l="neo"===n,h={id:"edge"+j,start:e.state1.id,end:e.state2.id,arrowhead:"normal",arrowTypeEnd:l?"arrow_barb_neo":"arrow_barb",style:T,labelStyle:"",label:c.Y2.sanitizeText(e.description??"",(0,c.D7)()),arrowheadStyle:_,labelpos:"c",labelType:x,thickness:E,classes:A,look:n};r.push(h),j++}}})},"setupDoc"),V=(0,d.K)((t,e=g)=>{let s=e;if(t.doc)for(let e of t.doc)"dir"===e.stmt&&(s=e.value);return s},"getDir");function X(t,e,s){if(!e.id||"</join></fork>"===e.id||"</choice>"===e.id)return;e.cssClasses&&(Array.isArray(e.cssCompiledStyles)||(e.cssCompiledStyles=[]),e.cssClasses.split(" ").forEach(t=>{let i=s.get(t);i&&(e.cssCompiledStyles=[...e.cssCompiledStyles??[],...i.styles])}));let i=t.find(t=>t.id===e.id);i?Object.assign(i,e):t.push(e)}function J(t){return t?.classes?.join(" ")??""}function q(t){return t?.styles??[]}(0,d.K)(X,"insertOrUpdateNode"),(0,d.K)(J,"getClassesFromDbInfo"),(0,d.K)(q,"getStylesFromDbInfo");var Q=(0,d.K)((t,e,s,i,r,a,n,o)=>{let l=e.id,d=s.get(l),u=J(d),p=q(d),y=(0,c.D7)(),g=""!==u.trim()||p.length>0;if(h.R.info("dataFetcher parsedItem",e,d,p),"root"!==l){let s=$;!0===e.start?s="stateStart":!1===e.start&&(s="stateEnd"),e.type!==k&&(s=e.type),G.get(l)||G.set(l,{id:l,shape:s,description:c.Y2.sanitizeText(l,y),cssClasses:`${u} ${I}`,cssStyles:p});let d=G.get(l);e.description&&(Array.isArray(d.description)?(d.shape=D,d.description.push(e.description)):d.description?.length&&d.description.length>0?(d.shape=D,d.description===l?d.description=[e.description]:d.description=[d.description,e.description]):(d.shape=$,d.description=e.description),d.description=c.Y2.sanitizeTextOrArray(d.description,y)),d.description?.length===1&&d.shape===D&&("group"===d.type?d.shape=C:d.shape=$),!d.type&&e.doc&&(h.R.info("Setting cluster for XCX",l,V(e)),d.type="group",d.isGroup=!0,d.dir=V(e),d.shape=e.type===b?v:C,d.colorIndex=z(d.shape,l,t,g),d.cssClasses=`${d.cssClasses} ${N} ${a?K:""}`);let f={labelStyle:"",shape:d.shape,label:d.description,cssClasses:d.cssClasses,cssCompiledStyles:[],cssStyles:d.cssStyles,id:l,dir:d.dir,domId:U(l,j),type:d.type,isGroup:"group"===d.type,colorIndex:d.colorIndex,padding:8,rx:10,ry:10,look:n,labelType:"markdown"};if(f.shape===v&&(f.label=""),t&&"root"!==t.id&&(h.R.trace("Setting node ",l," to be child of its parent ",t.id),f.parentId=t.id),f.centerLabel=!0,e.note){let t={labelStyle:"",shape:"note",label:e.note.text,labelType:"markdown",cssClasses:R,cssStyles:[],cssCompiledStyles:[],id:l+P+"-"+j,domId:U(l,j,B),type:"node",isGroup:!1,padding:y.flowchart?.padding,look:n,position:e.note.position},s=l+Y,a={labelStyle:"",shape:"noteGroup",label:e.note.text,cssClasses:d.cssClasses,cssStyles:[],id:l+Y,domId:U(l,j,O),type:"group",isGroup:!0,padding:16,look:n,position:e.note.position};j++,a.id=s,t.parentId=s,X(i,a,o),X(i,t,o),X(i,f,o);let c=l,h=t.id;"left of"===e.note.position&&(c=t.id,h=l),r.push({id:c+"-"+h,start:c,end:h,arrowhead:"none",arrowTypeEnd:"",style:T,labelStyle:"",classes:L,pattern:"dashed",arrowheadStyle:_,labelpos:"c",labelType:x,thickness:E,look:n})}else X(i,f,o)}e.doc&&(h.R.trace("Adding nodes children "),H(e,e.doc,s,i,r,!a,n,o))},"dataFetcher"),Z=(0,d.K)(()=>{G.clear(),j=0,W=0,M.clear()},"reset"),tt=(0,d.K)((t,e=g)=>{if(!t.doc)return e;let s=e;for(let e of t.doc)"dir"===e.stmt&&(s=e.value);return s},"getDir"),te=(0,d.K)(function(t,e){return e.db.getClasses()},"getClasses"),ts=(0,d.K)(async function(t,e,s,n){h.R.info("REF0:"),h.R.info("Drawing state diagram (v2)",e);let{securityLevel:o,state:d,layout:u}=(0,c.D7)();n.db.extract(n.db.getRootDocV2());let p=n.db.getData(),y=(0,i.A)(e,o);p.type=n.type,p.layoutAlgorithm=(0,a.q7)(u),p.nodeSpacing=d?.nodeSpacing||50,p.rankSpacing=d?.rankSpacing||50,"neo"===(0,c.D7)().look?p.markers=["barbNeo"]:p.markers=["barb"],p.diagramId=e,await (0,a.XX)(p,y);try{("function"==typeof n.db.getLinks?n.db.getLinks():new Map).forEach((t,e)=>{let s,i="string"==typeof e?e:"string"==typeof e?.id?e.id:"",r=p.nodes.find(t=>t.id===i);if(!i)return void h.R.warn("⚠️ Invalid or missing stateId from key:",JSON.stringify(e));let a=y.node()?.querySelectorAll("g.node, g.rough-node");if(a?.forEach(t=>{let e=t.textContent?.trim();(t.id===r?.domId||e===i)&&(s=t)}),!s)return void h.R.warn("⚠️ Could not find node matching text:",i);let n=s.parentNode;if(!n)return void h.R.warn("⚠️ Node has no parent, cannot wrap:",i);let o=document.createElementNS("http://www.w3.org/2000/svg","a"),l=t.url.replace(/^"+|"+$/g,"");if(o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l),o.setAttribute("target","_blank"),t.tooltip){let e=t.tooltip.replace(/^"+|"+$/g,"");o.setAttribute("title",e),s.setAttribute("title",e)}n.replaceChild(o,s),o.appendChild(s),h.R.info("🔗 Wrapped node in <a> tag for:",i,t.url)})}catch(t){h.R.error("❌ Error injecting clickable links:",t)}l._K.insertTitle(y,"statediagramTitleText",d?.titleTopMargin??25,n.db.getDiagramTitle()),(0,r.P)(y,8,w,d?.useMaxWidth??!0)},"draw"),ti="start",tr="color",ta="fill",tn=(0,d.K)(()=>new Map,"newClassesList"),to=(0,d.K)(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),tl=(0,d.K)(t=>JSON.parse(JSON.stringify(t)),"clone"),tc=class{constructor(t){this.version=t,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=tn(),this.documents={root:to()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.funs=[],this.getAccTitle=c.iN,this.setAccTitle=c.SV,this.getAccDescription=c.m7,this.setAccDescription=c.EI,this.setDiagramTitle=c.ke,this.getDiagramTitle=c.ab,this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this),this.bindFunctions=this.bindFunctions.bind(this)}static{(0,d.K)(this,"StateDB")}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(t){for(let e of(this.clear(!0),Array.isArray(t)?t:t.doc))switch(e.stmt){case f:this.addState(e.id.trim(),e.type,e.doc,e.description,e.note);break;case S:this.addRelation(e.state1,e.state2,e.description);break;case"classDef":this.addStyleClass(e.id.trim(),e.classes);break;case"style":this.handleStyleDef(e);break;case"applyClass":this.setCssClass(e.id.trim(),e.styleClass);break;case"click":this.addLink(e.id,e.url,e.tooltip)}let e=this.getStates(),s=(0,c.D7)();for(let t of(Z(),Q(void 0,this.getRootDocV2(),e,this.nodes,this.edges,!0,s.look,this.classes),this.nodes))if(Array.isArray(t.label)){if(t.description=t.label.slice(1),t.isGroup&&t.description.length>0)throw Error(`Group nodes can only have label. Remove the additional description for node [${t.id}]`);t.label=t.label[0]}}handleStyleDef(t){let e=t.id.trim().split(","),s=t.styleClass.split(",");for(let t of e){let e=this.getState(t);if(!e){let s=t.trim();this.addState(s),e=this.getState(s)}e&&(e.styles=s.map(t=>t.replace(/;/g,"")?.trim()))}}setRootDoc(t){h.R.info("Setting root doc",t),this.rootDoc=t,1===this.version?this.extract(t):this.extract(this.getRootDocV2())}docTranslator(t,e,s){if(e.stmt===S){this.docTranslator(t,e.state1,!0),this.docTranslator(t,e.state2,!1);return}if(e.stmt===f&&("[*]"===e.id?(e.id=t.id+(s?"_start":"_end"),e.start=s):e.id=e.id.trim()),e.stmt!==m&&e.stmt!==f||!e.doc)return;let i=[],r=[];for(let t of e.doc)if(t.type===b){let e=tl(t);e.doc=tl(r),i.push(e),r=[]}else r.push(t);if(i.length>0&&r.length>0){let t={stmt:f,id:(0,l.$C)(),type:"divider",doc:tl(r)};i.push(tl(t)),e.doc=i}e.doc.forEach(t=>this.docTranslator(e,t,!0))}getRootDocV2(){return this.docTranslator({id:m,stmt:m},{id:m,stmt:m,doc:this.rootDoc},!0),{id:m,doc:this.rootDoc}}addState(t,e=k,s,i,r,a,n,o){let l=t?.trim();if(this.currentDocument.states.has(l)){let t=this.currentDocument.states.get(l);if(!t)throw Error(`State not found: ${l}`);t.doc||(t.doc=s),t.type||(t.type=e)}else h.R.info("Adding state ",l,i),this.currentDocument.states.set(l,{stmt:f,id:l,descriptions:[],type:e,doc:s,note:r,classes:[],styles:[],textStyles:[]});if(i&&(h.R.info("Setting state description",l,i),(Array.isArray(i)?i:[i]).forEach(t=>this.addDescription(l,t.trim()))),r){let t=this.currentDocument.states.get(l);if(!t)throw Error(`State not found: ${l}`);t.note=r,t.note.text=c.Y2.sanitizeText(t.note.text,(0,c.D7)())}a&&(h.R.info("Setting state classes",l,a),(Array.isArray(a)?a:[a]).forEach(t=>this.setCssClass(l,t.trim()))),n&&(h.R.info("Setting state styles",l,n),(Array.isArray(n)?n:[n]).forEach(t=>this.setStyle(l,t.trim()))),o&&(h.R.info("Setting state styles",l,n),(Array.isArray(o)?o:[o]).forEach(t=>this.setTextStyle(l,t.trim())))}clear(t){this.nodes=[],this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.documents={root:to()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=tn(),t||(this.links=new Map,(0,c.IU)())}getState(t){return this.currentDocument.states.get(t)}getStates(){return this.currentDocument.states}logDocuments(){h.R.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(t,e,s){this.links.set(t,{url:e,tooltip:s}),h.R.warn("Adding link",t,e,s)}getLinks(){return this.links}startIdIfNeeded(t=""){return"[*]"===t?(this.startEndCount++,`${ti}${this.startEndCount}`):t}startTypeIfNeeded(t="",e=k){return"[*]"===t?ti:e}endIdIfNeeded(t=""){return"[*]"===t?(this.startEndCount++,`end${this.startEndCount}`):t}endTypeIfNeeded(t="",e=k){return"[*]"===t?"end":e}addRelationObjs(t,e,s=""){let i=this.startIdIfNeeded(t.id.trim()),r=this.startTypeIfNeeded(t.id.trim(),t.type),a=this.startIdIfNeeded(e.id.trim()),n=this.startTypeIfNeeded(e.id.trim(),e.type);this.addState(i,r,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.addState(a,n,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.currentDocument.relations.push({id1:i,id2:a,relationTitle:c.Y2.sanitizeText(s,(0,c.D7)())})}addRelation(t,e,s){if("object"==typeof t&&"object"==typeof e)this.addRelationObjs(t,e,s);else if("string"==typeof t&&"string"==typeof e){let i=this.startIdIfNeeded(t.trim()),r=this.startTypeIfNeeded(t),a=this.endIdIfNeeded(e.trim()),n=this.endTypeIfNeeded(e);this.addState(i,r),this.addState(a,n),this.currentDocument.relations.push({id1:i,id2:a,relationTitle:s?c.Y2.sanitizeText(s,(0,c.D7)()):void 0})}}addDescription(t,e){let s=this.currentDocument.states.get(t),i=e.startsWith(":")?e.replace(":","").trim():e;s?.descriptions?.push(c.Y2.sanitizeText(i,(0,c.D7)()))}cleanupLabel(t){return t.startsWith(":")?t.slice(2).trim():t.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(t,e=""){this.classes.has(t)||this.classes.set(t,{id:t,styles:[],textStyles:[]});let s=this.classes.get(t);e&&s&&e.split(",").forEach(t=>{let e=t.replace(/([^;]*);/,"$1").trim();if(RegExp(tr).exec(t)){let t=e.replace(ta,"bgFill").replace(tr,ta);s.textStyles.push(t)}s.styles.push(e)})}getClasses(){return this.classes}setupToolTips(t){let e=(0,n.Ck)();(0,u.Ltv)(t).select("svg").selectAll("g.node, g.rough-node").on("mouseover",t=>{let s=(0,u.Ltv)(t.currentTarget),i=s.attr("title");if(null===i)return;let r=t.currentTarget?.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.style("left",window.scrollX+r.left+(r.right-r.left)/2+"px").style("top",window.scrollY+r.bottom+"px"),e.html(p.A.sanitize(i)),s.classed("hover",!0)}).on("mouseout",t=>{e.transition().duration(500).style("opacity",0),(0,u.Ltv)(t.currentTarget).classed("hover",!1)})}setCssClass(t,e){t.split(",").forEach(t=>{let s=this.getState(t);if(!s){let e=t.trim();this.addState(e),s=this.getState(e)}s?.classes?.push(e)})}setStyle(t,e){this.getState(t)?.styles?.push(e)}setTextStyle(t,e){this.getState(t)?.textStyles?.push(e)}bindFunctions(t){this.funs.forEach(e=>{e(t)})}getDirectionStatement(){return this.rootDoc.find(t=>"dir"===t.stmt)}getDirection(){return this.getDirectionStatement()?.value??"TB"}setDirection(t){let e=this.getDirectionStatement();e?e.value=t:this.rootDoc.unshift({stmt:"dir",value:t})}trimColon(t){return t.startsWith(":")?t.slice(1).trim():t.trim()}getData(){let t=(0,c.D7)();for(let e of this.nodes)e.wrappingWidth??=t.state?.wrappingWidth,e.isGroup||(e.minWidth??=t.state?.minNodeWidth);return{nodes:this.nodes,edges:this.edges,other:{},config:t,direction:tt(this.getRootDocV2())}}getConfig(){return(0,c.D7)().state}},th=(0,d.K)(t=>{let{theme:e,bkgColorArray:s,borderColorArray:i}=t;if(!(0,o.P1)(e,i))return"";let r=(0,o.rq)(t.look),a=(0,o.Ic)(s),n="";for(let t=0;t<(0,o.Hu)(i);t++){let e=i[t],o=a?`fill: ${s[t%s.length]};`:"",l=`[data-look="${r}"][data-color-id="color-${t}"]`;n+=`
|
|
2
|
-
|
|
3
|
-
/* The title strip: \`rect.outer\` spans the whole composite and \`rect.inner\` covers
|
|
4
|
-
the body, so what stays visible of \`outer\` is the band behind the label. */
|
|
5
|
-
${l}.statediagram-cluster rect.outer {
|
|
6
|
-
stroke: ${e};
|
|
7
|
-
${o}
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
${l}.statediagram-cluster rect.inner {
|
|
11
|
-
stroke: ${e};
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
/* Concurrency regions. Siblings of one composite share a slot, so a divided composite
|
|
15
|
-
reads as one thing split into parts rather than as several composites. */
|
|
16
|
-
${l}.statediagram-cluster rect.divider {
|
|
17
|
-
stroke: ${e};
|
|
18
|
-
${o}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/* handDrawn draws the same container as roughjs shapes rather than plain rects, so it
|
|
22
|
-
needs its own rules. \`roundedWithTitle\` and \`divider\` name those groups \`outer\`,
|
|
23
|
-
\`inner\` and \`divider\` to match the classic branch, which is what lets these
|
|
24
|
-
discriminate -- a bare \`.statediagram-cluster path\` rule reached the body as well and
|
|
25
|
-
tinted the whole composite, losing \`compositeBackground\` and diverging from what
|
|
26
|
-
classic and neo do.
|
|
27
|
-
|
|
28
|
-
roughjs emits two paths per shape and marks them: the filled shape carries
|
|
29
|
-
\`stroke="none"\` and the sketched outline carries \`fill="none"\`. Splitting on that is
|
|
30
|
-
what keeps \`fill\` off the outline -- a rough outline is open squiggles, not a closed
|
|
31
|
-
region, so filling it produces smears -- and keeps \`stroke\` off the fill shape, which
|
|
32
|
-
would otherwise gain an edge it was drawn without. */
|
|
33
|
-
${l}.statediagram-cluster .outer path[stroke='none'] {
|
|
34
|
-
${o}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
${l}.statediagram-cluster .outer path[fill='none'] {
|
|
38
|
-
stroke: ${e};
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/* No \`.inner\` rule on purpose. The body shape is left entirely alone under handDrawn,
|
|
42
|
-
where a rect's \`inner\` counterpart cannot be recoloured safely: roughjs draws a
|
|
43
|
-
hachure fill as *stroked* lines, so its fill paths carry \`fill="none"\` exactly like
|
|
44
|
-
the outline and no selector separates them. An \`.inner\` stroke rule therefore
|
|
45
|
-
repainted the hatching of every alt composite in the palette colour instead of
|
|
46
|
-
leaving it on \`altBackground\`. The container still reads as palette-coloured: the
|
|
47
|
-
\`outer\` shape spans the whole composite, so its outline already frames the body. */
|
|
48
|
-
|
|
49
|
-
/* Regions split the same way, which is why \`divider\` fills solid rather than taking
|
|
50
|
-
roughjs's default hachure -- see the note on that call. Hatched, both of its paths
|
|
51
|
-
carried \`fill="none"\` and these two rules degenerated: the tint matched nothing and
|
|
52
|
-
the border rule repainted the hatching. */
|
|
53
|
-
${l}.statediagram-cluster .divider path[stroke='none'] {
|
|
54
|
-
${o}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
${l}.statediagram-cluster .divider path[fill='none'] {
|
|
58
|
-
stroke: ${e};
|
|
59
|
-
}
|
|
60
|
-
`}return n},"genColor"),td={parser:y,get db(){return new tc(2)},renderer:{getClasses:te,draw:ts,getDir:tt},styles:(0,d.K)(t=>`
|
|
61
|
-
${th(t)}
|
|
62
|
-
defs [id$="-barbEnd"] {
|
|
63
|
-
fill: ${t.transitionColor};
|
|
64
|
-
stroke: ${t.transitionColor};
|
|
65
|
-
}
|
|
66
|
-
g.stateGroup text {
|
|
67
|
-
fill: ${t.nodeBorder};
|
|
68
|
-
stroke: none;
|
|
69
|
-
font-size: 10px;
|
|
70
|
-
}
|
|
71
|
-
g.stateGroup text {
|
|
72
|
-
fill: ${t.textColor};
|
|
73
|
-
stroke: none;
|
|
74
|
-
font-size: 10px;
|
|
75
|
-
|
|
76
|
-
}
|
|
77
|
-
g.stateGroup .state-title {
|
|
78
|
-
font-weight: bolder;
|
|
79
|
-
fill: ${t.stateLabelColor};
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
g.stateGroup rect {
|
|
83
|
-
fill: ${t.mainBkg};
|
|
84
|
-
stroke: ${t.nodeBorder};
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
g.stateGroup line {
|
|
88
|
-
stroke: ${t.lineColor};
|
|
89
|
-
stroke-width: ${t.strokeWidth||1};
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.transition {
|
|
93
|
-
stroke: ${t.transitionColor};
|
|
94
|
-
stroke-width: ${t.strokeWidth||1};
|
|
95
|
-
fill: none;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.stateGroup .composit {
|
|
99
|
-
fill: ${t.background};
|
|
100
|
-
border-bottom: 1px
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.stateGroup .alt-composit {
|
|
104
|
-
fill: #e0e0e0;
|
|
105
|
-
border-bottom: 1px
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.state-note {
|
|
109
|
-
stroke: ${t.noteBorderColor};
|
|
110
|
-
fill: ${t.noteBkgColor};
|
|
111
|
-
|
|
112
|
-
text {
|
|
113
|
-
fill: ${t.noteTextColor};
|
|
114
|
-
stroke: none;
|
|
115
|
-
font-size: 10px;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.stateLabel .box {
|
|
120
|
-
stroke: none;
|
|
121
|
-
stroke-width: 0;
|
|
122
|
-
fill: ${t.mainBkg};
|
|
123
|
-
opacity: 0.5;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
.edgeLabel .label rect {
|
|
127
|
-
fill: ${t.labelBackgroundColor};
|
|
128
|
-
opacity: 0.5;
|
|
129
|
-
}
|
|
130
|
-
.edgeLabel {
|
|
131
|
-
background-color: ${t.edgeLabelBackground};
|
|
132
|
-
p {
|
|
133
|
-
background-color: ${t.edgeLabelBackground};
|
|
134
|
-
}
|
|
135
|
-
rect {
|
|
136
|
-
opacity: 0.5;
|
|
137
|
-
background-color: ${t.edgeLabelBackground};
|
|
138
|
-
fill: ${t.edgeLabelBackground};
|
|
139
|
-
}
|
|
140
|
-
text-align: center;
|
|
141
|
-
}
|
|
142
|
-
.edgeLabel .label text {
|
|
143
|
-
fill: ${t.transitionLabelColor||t.tertiaryTextColor};
|
|
144
|
-
}
|
|
145
|
-
.label div .edgeLabel {
|
|
146
|
-
color: ${t.transitionLabelColor||t.tertiaryTextColor};
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.stateLabel text {
|
|
150
|
-
fill: ${t.stateLabelColor};
|
|
151
|
-
font-size: 10px;
|
|
152
|
-
font-weight: bold;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
.node circle.state-start {
|
|
156
|
-
fill: ${t.specialStateColor};
|
|
157
|
-
stroke: ${t.specialStateColor};
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
.node .fork-join {
|
|
161
|
-
fill: ${t.specialStateColor};
|
|
162
|
-
stroke: ${t.specialStateColor};
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
.node circle.state-end {
|
|
166
|
-
fill: ${t.innerEndBackground};
|
|
167
|
-
stroke: ${t.background};
|
|
168
|
-
stroke-width: 1.5
|
|
169
|
-
}
|
|
170
|
-
.end-state-inner {
|
|
171
|
-
fill: ${t.compositeBackground||t.background};
|
|
172
|
-
// stroke: ${t.background};
|
|
173
|
-
stroke-width: 1.5
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
.node rect {
|
|
177
|
-
fill: ${t.stateBkg||t.mainBkg};
|
|
178
|
-
stroke: ${t.stateBorder||t.nodeBorder};
|
|
179
|
-
stroke-width: ${t.strokeWidth||1}px;
|
|
180
|
-
}
|
|
181
|
-
.node polygon {
|
|
182
|
-
fill: ${t.mainBkg};
|
|
183
|
-
stroke: ${t.stateBorder||t.nodeBorder};;
|
|
184
|
-
stroke-width: ${t.strokeWidth||1}px;
|
|
185
|
-
}
|
|
186
|
-
[id$="-barbEnd"] {
|
|
187
|
-
fill: ${t.lineColor};
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
.statediagram-cluster rect {
|
|
191
|
-
fill: ${t.compositeTitleBackground};
|
|
192
|
-
stroke: ${t.stateBorder||t.nodeBorder};
|
|
193
|
-
stroke-width: ${t.strokeWidth||1}px;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
.cluster-label, .nodeLabel {
|
|
197
|
-
color: ${t.stateLabelColor};
|
|
198
|
-
// line-height: 1;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
.statediagram-cluster rect.outer {
|
|
202
|
-
rx: 5px;
|
|
203
|
-
ry: 5px;
|
|
204
|
-
}
|
|
205
|
-
.statediagram-state .divider {
|
|
206
|
-
stroke: ${t.stateBorder||t.nodeBorder};
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
.statediagram-state .title-state {
|
|
210
|
-
rx: 5px;
|
|
211
|
-
ry: 5px;
|
|
212
|
-
}
|
|
213
|
-
.statediagram-cluster.statediagram-cluster .inner {
|
|
214
|
-
fill: ${t.compositeBackground||t.background};
|
|
215
|
-
}
|
|
216
|
-
.statediagram-cluster.statediagram-cluster-alt .inner {
|
|
217
|
-
fill: ${t.altBackground?t.altBackground:"#efefef"};
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
.statediagram-cluster .inner {
|
|
221
|
-
rx:0;
|
|
222
|
-
ry:0;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
.statediagram-state rect.basic {
|
|
226
|
-
rx: 5px;
|
|
227
|
-
ry: 5px;
|
|
228
|
-
}
|
|
229
|
-
.statediagram-state rect.divider {
|
|
230
|
-
stroke-dasharray: 10,10;
|
|
231
|
-
fill: ${t.altBackground?t.altBackground:"#efefef"};
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
.note-edge {
|
|
235
|
-
stroke-dasharray: 5;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
.statediagram-note rect {
|
|
239
|
-
fill: ${t.noteBkgColor};
|
|
240
|
-
stroke: ${t.noteBorderColor};
|
|
241
|
-
stroke-width: 1px;
|
|
242
|
-
rx: 0;
|
|
243
|
-
ry: 0;
|
|
244
|
-
}
|
|
245
|
-
.statediagram-note rect {
|
|
246
|
-
fill: ${t.noteBkgColor};
|
|
247
|
-
stroke: ${t.noteBorderColor};
|
|
248
|
-
stroke-width: 1px;
|
|
249
|
-
rx: 0;
|
|
250
|
-
ry: 0;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
.statediagram-note text {
|
|
254
|
-
fill: ${t.noteTextColor};
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
.statediagram-note .nodeLabel {
|
|
258
|
-
color: ${t.noteTextColor};
|
|
259
|
-
}
|
|
260
|
-
.statediagram .edgeLabel {
|
|
261
|
-
color: red; // ${t.noteTextColor};
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
[id$="-dependencyStart"], [id$="-dependencyEnd"] {
|
|
265
|
-
fill: ${t.lineColor};
|
|
266
|
-
stroke: ${t.lineColor};
|
|
267
|
-
stroke-width: ${t.strokeWidth||1};
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
.statediagramTitleText {
|
|
271
|
-
text-anchor: middle;
|
|
272
|
-
font-size: 18px;
|
|
273
|
-
fill: ${t.textColor};
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
[data-look="neo"].statediagram-cluster rect {
|
|
277
|
-
fill: ${t.mainBkg};
|
|
278
|
-
stroke: ${t.useGradient?"url("+t.svgId+"-gradient)":t.stateBorder||t.nodeBorder};
|
|
279
|
-
stroke-width: ${t.strokeWidth??1};
|
|
280
|
-
}
|
|
281
|
-
[data-look="neo"].statediagram-cluster rect.outer {
|
|
282
|
-
rx: ${t.radius}px;
|
|
283
|
-
ry: ${t.radius}px;
|
|
284
|
-
filter: ${t.dropShadow?t.dropShadow.replace("url(#drop-shadow)",`url(${t.svgId}-drop-shadow)`):"none"}
|
|
285
|
-
}
|
|
286
|
-
`,"getStyles"),init:(0,d.K)(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};s.d(e,{diagram:()=>td})}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.rspackChunkompchamber=self.rspackChunkompchamber||[]).push([["qs"],{op(e,r,s){var c=s("cI");s("br"),s.d(r,{createTreemapServices:()=>c.d})}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.rspackChunkompchamber=self.rspackChunkompchamber||[]).push([["r"],{le(e,t,a){a.r(t),t.default=[Object.freeze(JSON.parse('{"displayName":"SQL","name":"sql","patterns":[{"match":"((?<!@)@)\\\\b(\\\\w+)\\\\b","name":"text.variable"},{"match":"(\\\\[)[^]]*(])","name":"text.bracketed"},{"include":"#comments"},{"captures":{"1":{"name":"keyword.other.create.sql"},"2":{"name":"keyword.other.sql"},"5":{"name":"entity.name.function.sql"}},"match":"(?i:^\\\\s*(create(?:\\\\s+or\\\\s+replace)?)\\\\s+(aggregate|conversion|database|domain|function|group|(unique\\\\s+)?index|language|operator class|operator|rule|schema|sequence|table|tablespace|trigger|type|user|view)\\\\s+)([\\"\'`]?)(\\\\w+)\\\\4","name":"meta.create.sql"},{"captures":{"1":{"name":"keyword.other.create.sql"},"2":{"name":"keyword.other.sql"}},"match":"(?i:^\\\\s*(drop)\\\\s+(aggregate|conversion|database|domain|function|group|index|language|operator class|operator|rule|schema|sequence|table|tablespace|trigger|type|user|view))","name":"meta.drop.sql"},{"captures":{"1":{"name":"keyword.other.create.sql"},"2":{"name":"keyword.other.table.sql"},"3":{"name":"entity.name.function.sql"},"4":{"name":"keyword.other.cascade.sql"}},"match":"(?i:\\\\s*(drop)\\\\s+(table)\\\\s+(\\\\w+)(\\\\s+cascade)?\\\\b)","name":"meta.drop.sql"},{"captures":{"1":{"name":"keyword.other.create.sql"},"2":{"name":"keyword.other.table.sql"}},"match":"(?i:^\\\\s*(alter)\\\\s+(aggregate|conversion|database|domain|function|group|index|language|operator class|operator|proc(edure)?|rule|schema|sequence|table|tablespace|trigger|type|user|view)\\\\s+)","name":"meta.alter.sql"},{"captures":{"1":{"name":"storage.type.sql"},"2":{"name":"storage.type.sql"},"3":{"name":"constant.numeric.sql"},"4":{"name":"storage.type.sql"},"5":{"name":"constant.numeric.sql"},"6":{"name":"storage.type.sql"},"7":{"name":"constant.numeric.sql"},"8":{"name":"constant.numeric.sql"},"9":{"name":"storage.type.sql"},"10":{"name":"constant.numeric.sql"},"11":{"name":"storage.type.sql"},"12":{"name":"storage.type.sql"},"13":{"name":"storage.type.sql"},"14":{"name":"constant.numeric.sql"},"15":{"name":"storage.type.sql"}},"match":"(?i)\\\\b(bigint|bigserial|bit|boolean|box|bytea|cidr|circle|date|double\\\\sprecision|inet|int|integer|line|lseg|macaddr|money|oid|path|point|polygon|real|serial|smallint|sysdate|text)\\\\b|\\\\b(bit\\\\svarying|character\\\\s(?:varying)?|tinyint|var\\\\schar|float|interval)\\\\((\\\\d+)\\\\)|\\\\b(char|number|varchar\\\\d?)\\\\b(?:\\\\((\\\\d+)\\\\))?|\\\\b(numeric|decimal)\\\\b(?:\\\\((\\\\d+),(\\\\d+)\\\\))?|\\\\b(times?)\\\\b(?:\\\\((\\\\d+)\\\\))?(\\\\swith(?:out)?\\\\stime\\\\szone\\\\b)?|\\\\b(timestamp)(s|tz)?\\\\b(?:\\\\((\\\\d+)\\\\))?(\\\\s(with(?:|out))\\\\stime\\\\szone\\\\b)?"},{"match":"(?i:\\\\b((?:primary|foreign)\\\\s+key|references|on\\\\s+(delete|update)(\\\\s+cascade)?|nocheck|check|constraint|collate|default)\\\\b)","name":"storage.modifier.sql"},{"match":"\\\\b\\\\d+\\\\b","name":"constant.numeric.sql"},{"match":"(?i:\\\\b(select(\\\\s+(all|distinct))?|insert\\\\s+(ignore\\\\s+)?into|update|delete|from|set|where|group\\\\s+by|or|like|and|union(\\\\s+all)?|having|order\\\\s+by|limit|cross\\\\s+join|join|straight_join|(inner|(left|right|full)(\\\\s+outer)?)\\\\s+join|natural(\\\\s+(inner|(left|right|full)(\\\\s+outer)?))?\\\\s+join)\\\\b)","name":"keyword.other.DML.sql"},{"match":"(?i:\\\\b(on|off|((is\\\\s+)?not\\\\s+)?null)\\\\b)","name":"keyword.other.DDL.create.II.sql"},{"match":"(?i:\\\\bvalues\\\\b)","name":"keyword.other.DML.II.sql"},{"match":"(?i:\\\\b(begin(\\\\s+work)?|start\\\\s+transaction|commit(\\\\s+work)?|rollback(\\\\s+work)?)\\\\b)","name":"keyword.other.LUW.sql"},{"match":"(?i:\\\\b(grant(\\\\swith\\\\sgrant\\\\soption)?|revoke)\\\\b)","name":"keyword.other.authorization.sql"},{"match":"(?i:\\\\bin\\\\b)","name":"keyword.other.data-integrity.sql"},{"match":"(?i:^\\\\s*(comment\\\\s+on\\\\s+(table|column|aggregate|constraint|database|domain|function|index|operator|rule|schema|sequence|trigger|type|view))\\\\s+)","name":"keyword.other.object-comments.sql"},{"match":"(?i)\\\\bAS\\\\b","name":"keyword.other.alias.sql"},{"match":"(?i)\\\\b(DESC|ASC)\\\\b","name":"keyword.other.order.sql"},{"match":"\\\\*","name":"keyword.operator.star.sql"},{"match":"[!<>]?=|<>|[<>]","name":"keyword.operator.comparison.sql"},{"match":"[-+/]","name":"keyword.operator.math.sql"},{"match":"\\\\|\\\\|","name":"keyword.operator.concatenator.sql"},{"captures":{"1":{"name":"support.function.aggregate.sql"}},"match":"(?i)\\\\b(approx_count_distinct|approx_percentile_cont|approx_percentile_disc|avg|checksum_agg|count|count_big|group|grouping|grouping_id|max|min|sum|stdevp??|varp??)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.analytic.sql"}},"match":"(?i)\\\\b(cume_dist|first_value|lag|last_value|lead|percent_rank|percentile_cont|percentile_disc)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.bitmanipulation.sql"}},"match":"(?i)\\\\b((?:bit_coun|get_bi|left_shif|right_shif|set_bi)t)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.conversion.sql"}},"match":"(?i)\\\\b(cast|convert|parse|try_cast|try_convert|try_parse)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.collation.sql"}},"match":"(?i)\\\\b(collationproperty|tertiary_weights)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.cryptographic.sql"}},"match":"(?i)\\\\b(asymkey_id|asymkeyproperty|certproperty|cert_id|crypt_gen_random|decryptbyasymkey|decryptbycert|decryptbykey|decryptbykeyautoasymkey|decryptbykeyautocert|decryptbypassphrase|encryptbyasymkey|encryptbycert|encryptbykey|encryptbypassphrase|hashbytes|is_objectsigned|key_guid|key_id|key_name|signbyasymkey|signbycert|symkeyproperty|verifysignedbycert|verifysignedbyasymkey)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.cursor.sql"}},"match":"(?i)\\\\b(cursor_status)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.datetime.sql"}},"match":"(?i)\\\\b(sysdatetime|sysdatetimeoffset|sysutcdatetime|current_time(stamp)?|getdate|getutcdate|datename|datepart|day|month|year|datefromparts|datetime2fromparts|datetimefromparts|datetimeoffsetfromparts|smalldatetimefromparts|timefromparts|datediff|dateadd|datetrunc|eomonth|switchoffset|todatetimeoffset|isdate|date_bucket)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.datatype.sql"}},"match":"(?i)\\\\b(datalength|ident_current|ident_incr|ident_seed|identity|sql_variant_property)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.expression.sql"}},"match":"(?i)\\\\b(coalesce|nullif)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.globalvar.sql"}},"match":"(?<!@)@@(?i)\\\\b(cursor_rows|connections|cpu_busy|datefirst|dbts|error|fetch_status|identity|idle|io_busy|langid|language|lock_timeout|max_connections|max_precision|nestlevel|options|packet_errors|pack_received|pack_sent|procid|remserver|rowcount|servername|servicename|spid|textsize|timeticks|total_errors|total_read|total_write|trancount|version)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.json.sql"}},"match":"(?i)\\\\b(json|isjson|json_object|json_array|json_value|json_query|json_modify|json_path_exists)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.logical.sql"}},"match":"(?i)\\\\b(choose|iif|greatest|least)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.mathematical.sql"}},"match":"(?i)\\\\b(abs|acos|asin|atan|atn2|ceiling|cos|cot|degrees|exp|floor|log|log10|pi|power|radians|rand|round|sign|sin|sqrt|square|tan)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.metadata.sql"}},"match":"(?i)\\\\b(app_name|applock_mode|applock_test|assemblyproperty|col_length|col_name|columnproperty|database_principal_id|databasepropertyex|db_id|db_name|file_id|file_idex|file_name|filegroup_id|filegroup_name|filegroupproperty|fileproperty|fulltextcatalogproperty|fulltextserviceproperty|index_col|indexkey_property|indexproperty|object_definition|object_id|object_name|object_schema_name|objectproperty|objectpropertyex|original_db_name|parsename|schema_id|schema_name|scope_identity|serverproperty|stats_date|type_id|type_name|typeproperty)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.ranking.sql"}},"match":"(?i)\\\\b(rank|dense_rank|ntile|row_number)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.rowset.sql"}},"match":"(?i)\\\\b(generate_series|opendatasource|openjson|openrowset|openquery|openxml|predict|string_split)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.security.sql"}},"match":"(?i)\\\\b(certencoded|certprivatekey|current_user|database_principal_id|has_perms_by_name|is_member|is_rolemember|is_srvrolemember|original_login|permissions|pwdcompare|pwdencrypt|schema_id|schema_name|session_user|suser_id|suser_sid|suser_sname|system_user|suser_name|user_id|user_name)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.string.sql"}},"match":"(?i)\\\\b(ascii|char|charindex|concat|difference|format|left|len|lower|ltrim|nchar|nodes|patindex|quotename|replace|replicate|reverse|right|rtrim|soundex|space|str|string_agg|string_escape|string_split|stuff|substring|translate|trim|unicode|upper)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.system.sql"}},"match":"(?i)\\\\b(binary_checksum|checksum|compress|connectionproperty|context_info|current_request_id|current_transaction_id|decompress|error_line|error_message|error_number|error_procedure|error_severity|error_state|formatmessage|get_filestream_transaction_context|getansinull|host_id|host_name|isnull|isnumeric|min_active_rowversion|newid|newsequentialid|rowcount_big|session_context|session_id|xact_state)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.textimage.sql"}},"match":"(?i)\\\\b(patindex|textptr|textvalid)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.vector.sql"}},"match":"(?i)\\\\b(vector_(?:distance|norm|normalize))\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"constant.other.database-name.sql"},"2":{"name":"constant.other.table-name.sql"}},"match":"(\\\\w+?)\\\\.(\\\\w+)"},{"include":"#strings"},{"include":"#regexps"},{"match":"\\\\b(?i)(abort|abort_after_wait|absent|absolute|accent_sensitivity|acceptable_cursopt|acp|action|activation|add|address|admin|aes_128|aes_192|aes_256|affinity|after|aggregate|algorithm|all_constraints|all_errormsgs|all_indexes|all_levels|all_results|allow_connections|allow_dup_row|allow_encrypted_value_modifications|allow_page_locks|allow_row_locks|allow_snapshot_isolation|alter|altercolumn|always|anonymous|ansi_defaults|ansi_null_default|ansi_null_dflt_off|ansi_null_dflt_on|ansi_nulls|ansi_padding|ansi_warnings|appdomain|append|application|apply|arithabort|arithignore|array|assembly|asymmetric|asynchronous_commit|at|atan2|atomic|attach|attach_force_rebuild_log|attach_rebuild_log|audit|auth_realm|authentication|auto|auto_cleanup|auto_close|auto_create_statistics|auto_drop|auto_shrink|auto_update_statistics|auto_update_statistics_async|automated_backup_preference|automatic|autopilot|availability|availability_mode|backup|backup_priority|base64|basic|batches|batchsize|before|between|bigint|binary|binding|bit|block|blockers|blocksize|bmk|both|break|broker|broker_instance|bucket_count|buffer|buffercount|bulk_logged|by|call|caller|card|case|catalog|catch|cert|certificate|change_retention|change_tracking|change_tracking_context|changes|char|character|character_set|check_expiration|check_policy|checkconstraints|checkindex|checkpoint|checksum|cleanup_policy|clear|clear_port|close|clustered|codepage|collection|column_encryption_key|column_master_key|columnstore|columnstore_archive|colv_80_to_100|colv_100_to_80|commit_differential_base|committed|compatibility_level|compress_all_row_groups|compression|compression_delay|concat_null_yields_null|concatenate|configuration|connect|connection|containment|continue|continue_after_error|contract|contract_name|control|conversation|conversation_group_id|conversation_handle|copy|copy_only|count_rows|counter|create(\\\\\\\\s+or\\\\\\\\s+alter)?|credential|cross|cryptographic|cryptographic_provider|cube|cursor|cursor_close_on_commit|cursor_default|data|data_compression|data_flush_interval_seconds|data_mirroring|data_purity|data_source|database|database_name|database_snapshot|datafiletype|date_correlation_optimization|date|datefirst|dateformat|date_format|datetime2??|datetimeoffset|day(s)?|db_chaining|dbid|dbidexec|dbo_only|deadlock_priority|deallocate|dec|decimal|declare|decrypt|decrypt_a|decryption|default_database|default_fulltext_language|default_language|default_logon_domain|default_schema|definition|delay|delayed_durability|delimitedtext|density_vector|dependent|des|description|desired_state|desx|differential|digest|disable|disable_broker|disable_def_cnst_chk|disabled|disk|distinct|distributed|distribution|drop|drop_existing|dts_buffers|dump|durability|dynamic|edition|elements|else|emergency|empty|enable|enable_broker|enabled|encoding|encrypted|encrypted_value|encryption|encryption_type|end|endpoint|endpoint_url|enhancedintegrity|entry|error_broker_conversations|errorfile|estimateonly|event|except|exec|executable|execute|exists|expand|expiredate|expiry_date|explicit|external|external_access|failover|failover_mode|failure_condition_level|fast|fast_forward|fastfirstrow|federated_service_account|fetch|field_terminator|fieldterminator|file|filelistonly|filegroup|filegrowth|filename|filestream|filestream_log|filestream_on|filetable|file_format|filter|first_row|fips_flagger|fire_triggers|first|firstrow|float|flush_interval_seconds|fmtonly|following|for|force|force_failover_allow_data_loss|force_service_allow_data_loss|forced|forceplan|formatfile|format_options|format_type|formsof|forward_only|free_cursors|free_exec_context|fullscan|fulltext|fulltextall|fulltextkey|function|generated|get|geography|geometry|global|go|goto|governor|guid|hadoop|hardening|hash|hashed|header_limit|headeronly|health_check_timeout|hidden|hierarchyid|histogram|histogram_steps|hits_cursors|hits_exec_context|hour(s)?|http|identity|identity_value|if|ifnull|ignore|ignore_constraints|ignore_dup_key|ignore_dup_row|ignore_triggers|image|immediate|implicit_transactions|include|include_null_values|incremental|index|inflectional|init|initiator|insensitive|insert|instead|int|integer|integrated|intersect|intermediate|interval_length_minutes|into|inuse_cursors|inuse_exec_context|io|is|isabout|iso_week|isolation|job_tracker_location|json|keep|keep_nulls|keep_replication|keepdefaults|keepfixed|keepidentity|keepnulls|kerberos|key|key_path|key_source|key_store_provider_name|keyset|kill|kilobytes_per_batch|labelonly|langid|language|last|lastrow|leading|legacy_cardinality_estimation|length|level|lifetime|lineage_80_to_100|lineage_100_to_80|listener_ip|listener_port|load|loadhistory|lob_compaction|local|local_service_name|locate|location|lock_escalation|lock_timeout|lockres|log|login|login_type|loop|manual|mark_in_use_for_removal|masked|master|match|matched|max_queue_readers|max_duration|max_outstanding_io_per_volume|maxdop|maxerrors|maxlength|maxtransfersize|max_plans_per_query|max_storage_size_mb|mediadescription|medianame|mediapassword|memogroup|memory_optimized|merge|message|message_forward_size|message_forwarding|microsecond|millisecond|minute(s)?|mirror_address|misses_cursors|misses_exec_context|mixed|modify|money|month|move|multi_user|must_change|name|namespace|nanosecond|native|native_compilation|nchar|ncharacter|nested_triggers|never|new_account|new_broker|newname|next|no|no_browsetable|no_checksum|no_compression|no_infomsgs|no_triggers|no_truncate|nocount|noexec|noexpand|noformat|noinit|nolock|nonatomic|nonclustered|nondurable|none|norecompute|norecovery|noreset|norewind|noskip|not|notification|nounload|now|nowait|ntext|ntlm|nulls|numeric|numeric_roundabort|nvarchar|object|objid|oem|offline|old_account|online|operation_mode|open|openjson|optimistic|option|orc|out|outer|output|over|override|owner|ownership|pad_index|page|page_checksum|page_verify|pagecount|paglock|param|parameter_sniffing|parameter_type_expansion|parameterization|parquet|parseonly|partial|partition|partner|password|path|pause|percentage|permission_set|persisted|period|physical_only|plan_forcing_mode|policy|pool|population|ports|preceding|precision|predicate|presume_abort|primary|primary_role|print|prior|priority |priority_level|private|proc(edure)?|procedure_name|profile|provider|quarter|query_capture_mode|query_governor_cost_limit|query_optimizer_hotfixes|query_store|queue|quoted_identifier|raiserror|range|raw|rcfile|rc2|rc4|rc4_128|rdbms|read_committed_snapshot|read|read_only|read_write|readcommitted|readcommittedlock|readonly|readpast|readuncommitted|readwrite|real|rebuild|receive|recmodel_70backcomp|recompile|reconfigure|recovery|recursive|recursive_triggers|redo_queue|reject_sample_value|reject_type|reject_value|relative|remote|remote_data_archive|remote_proc_transactions|remote_service_name|remove|removed_cursors|removed_exec_context|reorganize|repeat|repeatable|repeatableread|replace|replica|replicated|replnick_100_to_80|replnickarray_80_to_100|replnickarray_100_to_80|required|required_cursopt|resample|reset|resource|resource_manager_location|respect|restart|restore|restricted_user|resume|retaindays|retention|return|revert|rewind|rewindonly|returns|robust|role|rollup|root|round_robin|route|row|rowdump|rowguidcol|rowlock|row_terminator|rows|rows_per_batch|rowsets_only|rowterminator|rowversion|rsa_1024|rsa_2048|rsa_3072|rsa_4096|rsa_512|safe|safety|sample|save|scalar|schema|schemabinding|scoped|scroll|scroll_locks|sddl|second|secexpr|seconds|secondary|secondary_only|secondary_role|secret|security|securityaudit|selective|self|send|sent|sequence|serde_method|serializable|server|service|service_broker|service_name|service_objective|session_timeout|sessions??|seterror|setopts|sets|shard_map_manager|shard_map_name|sharded|shared_memory|shortest_path|show_statistics|showplan_all|showplan_text|showplan_xml|showplan_xml_with_recompile|shrinkdb|shutdown|sid|signature|simple|single_blob|single_clob|single_nclob|single_user|singleton|site|size|size_based_cleanup_mode|skip|smalldatetime|smallint|smallmoney|snapshot|snapshot_import|snapshotrestorephase|soap|softnuma|sort_in_tempdb|sorted_data|sorted_data_reorg|spatial|sql|sql_bigint|sql_binary|sql_bit|sql_char|sql_date|sql_decimal|sql_double|sql_float|sql_guid|sql_handle|sql_longvarbinary|sql_longvarchar|sql_numeric|sql_real|sql_smallint|sql_time|sql_timestamp|sql_tinyint|sql_tsi_day|sql_tsi_frac_second|sql_tsi_hour|sql_tsi_minute|sql_tsi_month|sql_tsi_quarter|sql_tsi_second|sql_tsi_week|sql_tsi_year|sql_type_date|sql_type_time|sql_type_timestamp|sql_varbinary|sql_varchar|sql_variant|sql_wchar|sql_wlongvarchar|ssl|ssl_port|standard|standby|start|start_date|started|stat_header|state|statement|static|statistics|statistics_incremental|statistics_norecompute|statistics_only|statman|stats|stats_stream|status|stop|stop_on_error|stopat|stopatmark|stopbeforemark|stoplist|stopped|string_delimiter|subject|supplemental_logging|supported|suspend|symmetric|synchronous_commit|synonym|sysname|system|system_time|system_versioning|table|tableresults|tablockx??|take|tape|target|target_index|target_partition|target_recovery_time|tcp|temporal_history_retention|text|textimage_on|then|thesaurus|throw|time|timeout|timestamp|tinyint|top??|torn_page_detection|track_columns_updated|trailing|tran|transaction|transfer|transform_noise_words|triple_des|triple_des_3key|truncate|trustworthy|try|tsql|two_digit_year_cutoff|type|type_desc|type_warning|tzoffset|uid|unbounded|uncommitted|unique|uniqueidentifier|unlimited|unload|unlock|unsafe|updlock|url|use|useplan|useroptions|use_type_default|using|utcdatetime|valid_xml|validation|values??|varbinary|varchar|vector|verbose|verifyonly|version|view_metadata|virtual_device|visiblity|wait_at_low_priority|waitfor|webmethod|week|weekday|weight|well_formed_xml|when|while|widechar|widechar_ansi|widenative|windows??|with|within|within group|witness|without|without_array_wrapper|workload|wsdl|xact_abort|xlock|xml|xmlschema|xquery|xsinil|year|zone)\\\\b","name":"keyword.other.sql"},{"captures":{"1":{"name":"punctuation.section.scope.begin.sql"},"2":{"name":"punctuation.section.scope.end.sql"}},"match":"(\\\\()(\\\\))","name":"meta.block.sql"}],"repository":{"comment-block":{"begin":"/\\\\*","captures":{"0":{"name":"punctuation.definition.comment.sql"}},"end":"\\\\*/","name":"comment.block","patterns":[{"include":"#comment-block"}]},"comments":{"patterns":[{"begin":"(^[\\\\t ]+)?(?=--)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.sql"}},"end":"(?!\\\\G)","patterns":[{"begin":"--","beginCaptures":{"0":{"name":"punctuation.definition.comment.sql"}},"end":"\\\\n","name":"comment.line.double-dash.sql"}]},{"begin":"(^[\\\\t ]+)?(?=#)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.sql"}},"end":"(?!\\\\G)","patterns":[]},{"include":"#comment-block"}]},"regexps":{"patterns":[{"begin":"/(?=\\\\S.*/)","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.sql"}},"end":"/","endCaptures":{"0":{"name":"punctuation.definition.string.end.sql"}},"name":"string.regexp.sql","patterns":[{"include":"#string_interpolation"},{"match":"\\\\\\\\/","name":"constant.character.escape.slash.sql"}]},{"begin":"%r\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.sql"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.string.end.sql"}},"name":"string.regexp.modr.sql","patterns":[{"include":"#string_interpolation"}]}]},"string_escape":{"match":"\\\\\\\\.","name":"constant.character.escape.sql"},"string_interpolation":{"captures":{"1":{"name":"punctuation.definition.string.begin.sql"},"3":{"name":"punctuation.definition.string.end.sql"}},"match":"(#\\\\{)([^}]*)(})","name":"string.interpolated.sql"},"strings":{"patterns":[{"captures":{"2":{"name":"punctuation.definition.string.begin.sql"},"3":{"name":"punctuation.definition.string.end.sql"}},"match":"(?:(?<![0-9A-Z_a-z])(N))?(\')[^\']*(\')","name":"string.quoted.single.sql"},{"begin":"\'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.sql"}},"end":"\'","endCaptures":{"0":{"name":"punctuation.definition.string.end.sql"}},"name":"string.quoted.single.sql","patterns":[{"include":"#string_escape"}]},{"captures":{"1":{"name":"punctuation.definition.string.begin.sql"},"2":{"name":"punctuation.definition.string.end.sql"}},"match":"(`)[^\\\\\\\\`]*(`)","name":"string.quoted.other.backtick.sql"},{"begin":"`","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.sql"}},"end":"`","endCaptures":{"0":{"name":"punctuation.definition.string.end.sql"}},"name":"string.quoted.other.backtick.sql","patterns":[{"include":"#string_escape"}]},{"captures":{"1":{"name":"punctuation.definition.string.begin.sql"},"2":{"name":"punctuation.definition.string.end.sql"}},"match":"(\\")[^\\"#]*(\\")","name":"string.quoted.double.sql"},{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.sql"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.sql"}},"name":"string.quoted.double.sql","patterns":[{"include":"#string_interpolation"}]},{"begin":"%\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.sql"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.string.end.sql"}},"name":"string.other.quoted.brackets.sql","patterns":[{"include":"#string_interpolation"}]}]}},"scopeName":"source.sql"}'))]}}]);
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! LICENSE: rd.cb6bf495bb.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.rspackChunkompchamber=self.rspackChunkompchamber||[]).push([["rd"],{NU(e,t,n){n.d(t,{UserBrowserPanel:()=>k});var a=n("j"),r=n("H"),l=n("Kv"),o=n("qw"),i=n("n"),s=n("Oj"),d=n("bu");let c={idle:"Kosong",loading:"Memuat",ready:"Siap"},u="p-1 rounded hover:bg-ink/5 disabled:opacity-25 disabled:hover:bg-transparent text-ink/70 hover:text-ink cursor-pointer disabled:cursor-not-allowed transition-colors";function m(e){let{url:t,input:n,loading:m,error:b,canGoBack:p,canGoForward:h,viewportMode:f,zoomLevel:x,onInputChange:k,onSubmit:v,onBack:g,onForward:w,onReload:N,onOpenExternal:y,onIncludeInChat:Y,onChangeViewport:z,onZoomIn:L,onZoomOut:B,onResetZoom:C,onSetZoom:F}=e,M=(0,r.li)(void 0);(0,r.vJ)(()=>{M.current!==t&&(M.current=t,t&&k(t))},[t,k]);let A=t?m?"loading":"ready":"idle",D=(0,a.FD)("div",{className:"flex items-center bg-canvas border border-ink/10 rounded-md p-0.5 space-x-0.5 flex-shrink-0",children:[(0,a.Y)("button",{type:"button",onClick:g,disabled:!p,"aria-label":"Kembali",title:"Kembali",className:u,children:(0,a.Y)(l.A,{size:12})}),(0,a.Y)("button",{type:"button",onClick:w,disabled:!h,"aria-label":"Maju",title:"Maju",className:u,children:(0,a.Y)(o.A,{size:12})}),(0,a.Y)("button",{type:"button",onClick:N,disabled:!t,"aria-label":"Muat ulang",title:"Muat ulang",className:u,children:(0,a.Y)(i.A,{size:12,className:m?"animate-spin":void 0})})]});return(0,a.Y)(d.K,{url:t,statusDotClass:"ready"===A?"bg-success animate-pulse":"loading"===A?"bg-ink/40 animate-pulse":"bg-ink/25",statusLabel:c[A],viewportMode:f,zoomLevel:x,onChangeViewport:z,onZoomIn:L,onZoomOut:B,onResetZoom:C,onSetZoom:F,onIncludeInChat:Y,onOpenExternal:y,openExternalLabel:"Buka di tab baru",openExternalTitle:"Buka di tab baru (untuk situs yang menolak iframe)",children:(0,a.FD)("div",{className:"flex items-center flex-1 min-w-0 space-x-1.5",children:[D,(0,a.FD)("form",{className:`flex-1 min-w-0 flex items-center bg-canvas border rounded-md px-2 py-0.5 space-x-1 focus-within:border-ink/40 ${b?"border-error":"border-ink/15"}`,onSubmit:e=>{e.preventDefault(),v(n)},children:[(0,a.Y)(s.A,{size:12,className:"text-ink/40 flex-shrink-0"}),(0,a.Y)("input",{type:"text",value:n,onChange:e=>k(e.currentTarget.value),placeholder:"Ketik alamat (mis. localhost:5173) lalu Enter…","aria-label":"Alamat browser pengguna","aria-invalid":null!=b,title:b??void 0,spellcheck:!1,autoComplete:"off",className:`w-full min-w-0 bg-transparent outline-none font-mono text-[11px] placeholder:text-ink/30 ${b?"text-error":"text-ink/90"}`})]})]})})}var b=n("t"),p=n("nTz");function h(e){let{url:t,frameKey:n,loading:r,viewportMode:l,zoomLevel:o,onLoad:i,active:d=!0}=e;return d?t?(0,a.FD)("div",{className:"flex-1 min-h-0 relative flex items-center justify-center p-2 overflow-auto bg-canvas/60",children:[r?(0,a.Y)("div",{className:"absolute inset-0 z-10 flex items-center justify-center pointer-events-none",children:(0,a.FD)("div",{className:"flex items-center space-x-2 px-3 py-1.5 rounded-md bg-paper border border-ink/15",children:[(0,a.Y)(b.A,{size:13,className:"animate-spin text-ink/50"}),(0,a.Y)("span",{className:"text-[11px] font-mono text-ink/60",children:"Memuat…"})]})}):null,(0,a.Y)("div",{className:`relative flex flex-col bg-white ${p.I[l]} transition-all duration-200`,style:{zoom:100!==o?`${o}%`:void 0,transformOrigin:"top center"},children:(0,a.Y)("iframe",{src:t,title:"Browser pengguna",onLoad:i,referrerPolicy:"no-referrer",allow:"clipboard-read; clipboard-write; fullscreen",className:"w-full h-full bg-white border-0"},n)})]}):(0,a.FD)("div",{className:"flex-1 flex flex-col items-center justify-center p-6 text-center select-none",children:[(0,a.Y)("div",{className:"w-12 h-12 rounded-xl bg-ink/5 border border-ink/10 flex items-center justify-center text-ink/40 mb-3",children:(0,a.Y)(s.A,{size:22})}),(0,a.Y)("h3",{className:"text-sm font-semibold text-ink mb-1",children:"Browser Anda"}),(0,a.Y)("p",{className:"text-xs text-ink/60 max-w-sm",children:"Ketik alamat di atas lalu Enter. Halaman dimuat langsung di panel ini."}),(0,a.Y)("p",{className:"text-[11px] text-ink/45 max-w-sm mt-2",children:"Sebagian situs (Google, GitHub) menolak ditampilkan dalam iframe — pakai tombol buka di tab baru."})]}):null}var f=n("FL"),x=n("Fb");function k(e){let{className:t="",active:n=!0}=e,[l,o]=(0,f.bL)("userBrowser.viewportMode","responsive"),[i,s]=(0,f.bL)("userBrowser.zoomLevel",100),{url:d,input:c,setInput:u,frameKey:b,loading:p,error:k,canGoBack:v,canGoForward:g,submit:w,goBack:N,goForward:y,reload:Y,markLoaded:z}=function(){let[e,t]=(0,f.bL)("userBrowser.history",[]),[n,a]=(0,f.bL)("userBrowser.historyIndex",-1),[l,o]=(0,f.bL)("userBrowser.inputUrl",""),[i,s]=(0,r.J0)(0),[d,c]=(0,r.J0)(!1),[u,m]=(0,r.J0)(void 0),b=n>=0&&n<e.length?e[n]??"":"",p=(0,r.hb)(r=>{let l,i=r.trim();if(!i)return;try{l=function(e){let t=e.trim();if(!t)return t;let n=new URL(/^[a-z][a-z0-9+.-]*:/i.test(t)?t:`https://${t}`);if("http:"!==n.protocol&&"https:"!==n.protocol)throw Error("Only http and https URLs are allowed");return n.toString()}(i)}catch(e){m(e instanceof Error?e.message:"Alamat tidak valid");return}m(void 0),c(!0);let d=[...e.slice(0,n+1),l];t(d),a(d.length-1),o(l),s(e=>e+1)},[e,n,t,a,o]),h=(0,r.hb)(()=>{n<=0||(c(!0),a(n-1))},[n,a]),x=(0,r.hb)(()=>{n>=e.length-1||(c(!0),a(n+1))},[e.length,n,a]),k=(0,r.hb)(()=>{b&&(c(!0),s(e=>e+1))},[b]),v=(0,r.hb)(()=>{c(!1)},[]);return{url:b,input:l,setInput:o,frameKey:i,loading:d,error:u,canGoBack:n>0,canGoForward:n>=0&&n<e.length-1,submit:p,goBack:h,goForward:x,reload:k,markLoaded:v}}(),L=(0,r.hb)(()=>{d&&window.open(d,"_blank","noopener,noreferrer")},[d]),B=(0,r.hb)(()=>{d&&(0,x.q)({url:d})},[d]);return(0,a.FD)("div",{className:`flex flex-col h-full w-full bg-paper text-ink overflow-hidden ${t}`,children:[(0,a.Y)(m,{url:d,input:c,loading:p,error:k,canGoBack:v,canGoForward:g,viewportMode:l,zoomLevel:i,onInputChange:u,onSubmit:w,onBack:N,onForward:y,onReload:Y,onOpenExternal:L,onIncludeInChat:B,onChangeViewport:o,onZoomIn:()=>s(e=>Math.min(200,e+10)),onZoomOut:()=>s(e=>Math.max(50,e-10)),onResetZoom:()=>s(100),onSetZoom:s}),(0,a.Y)(h,{url:d,frameKey:b,loading:p,viewportMode:l,zoomLevel:i,onLoad:z,active:n})]})}}}]);
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
"use strict";(self.rspackChunkompchamber=self.rspackChunkompchamber||[]).push([["s"],{gj(t,e,s){var i=s("Wq"),r=s("ja");e.A=(t,e)=>i.A.lang.round(r.A.parse(t)[e])},WJ(t,e,s){var i=s("Yr"),r=s("M4"),a=s("Gt"),n=(0,a.K)((t,e,s,a)=>{t.attr("class",s);let{width:n,height:c,x:h,y:u}=l(t,e);(0,i.a$)(t,c,n,a);let d=o(h,u,n,c,e);t.attr("viewBox",d),r.R.debug(`viewBox configured: ${d} with padding: ${e}`)},"setupViewPortForSVG"),l=(0,a.K)((t,e)=>{let s=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:s.width+2*e,height:s.height+2*e,x:s.x,y:s.y}},"calculateDimensionsWithPadding"),o=(0,a.K)((t,e,s,i,r)=>`${t-r} ${e-r} ${s} ${i}`,"createViewBox");s.d(e,{P:()=>n})},OT(t,e,s){var i=s("Gt"),r=s("El"),a=(0,i.K)((t,e)=>{let s;return"sandbox"===e&&(s=(0,r.Ltv)("#i"+t)),("sandbox"===e?(0,r.Ltv)(s.nodes()[0].contentDocument.body):(0,r.Ltv)("body")).select(`[id="${t}"]`)},"getDiagramElement");s.d(e,{A:()=>a})},aT(t,e,s){var i=s("OT"),r=s("WJ"),a=s("mW");s("Q"),s("ix"),s("LC"),s("bQ"),s("Ut"),s("PF"),s("iV"),s("h5");var n=s("pK"),l=s("NH"),o=s("Yr"),c=s("M4"),h=s("Gt"),u=s("El"),d=s("gj"),y=s("Cv"),p=function(){var t=(0,h.K)(function(t,e,s,i){for(s=s||{},i=t.length;i--;s[t[i]]=e);return s},"o"),e=[6,9,21,23,25,27,34,37,38,39,40,41,43,46,47,51,53,54,55],s=[2,2],i=[1,7],r=[1,9],a=[1,10],n=[1,11],l=[1,12],o=[1,30],c=[1,23],u=[1,24],d=[1,25],y=[1,26],p=[1,27],b=[1,19],g=[1,28],_=[1,29],f=[1,20],m=[1,18],k=[1,21],E=[1,22],S=[2,6],T=[6,9,21,23,25,27,33,34,37,38,39,40,41,43,46,47,51,53,54,55],$=[1,36],O=[1,37],N=[1,38],x=[1,39],C=[1,40],A=[6,9,12,14,16,19,20,21,23,25,27,33,34,37,38,39,40,41,43,46,47,50,51,53,54,55,69,70,71,72,73],R=[1,46],I=[1,47],D=[1,57],v=[43,51,53,54,55,74,75],L=[1,70],w=[1,68],K=[1,65],M=[1,69],B=[1,71],G=[6,9,12,16,21,23,25,27,33,34,37,38,39,40,41,43,44,45,46,47,51,52,53,54,55,69,70,71,72,73],F=[1,78],Y=[1,77],P=[1,76],z=[69,70,71,72,73],U=[1,91],Z=[6,9,45,50],j=[6,9,12,44,45,50,51,52],W=[1,101],q=[1,100],Q=[1,99],V=[18,61],X=[1,110],H=[1,109],J=[20,43,51,53,54,55],tt=[18,61,64,66],te={trace:(0,h.K)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,statement:8,NEWLINE:9,entityName:10,relSpec:11,COLON:12,role:13,STYLE_SEPARATOR:14,idList:15,BLOCK_START:16,attributes:17,BLOCK_STOP:18,SQS:19,SQE:20,title:21,title_value:22,acc_title:23,acc_title_value:24,acc_descr:25,acc_descr_value:26,acc_descr_multiline_value:27,direction:28,classDefStatement:29,classStatement:30,styleStatement:31,subgraphHeader:32,END:33,SUBGRAPH:34,separator:35,subgraphTitle:36,direction_tb:37,direction_bt:38,direction_rl:39,direction_lr:40,CLASSDEF:41,stylesOpt:42,UNICODE_TEXT:43,STYLE_TEXT:44,COMMA:45,CLASS:46,STYLE:47,style:48,styleComponent:49,SEMI:50,NUM:51,BRKT:52,ENTITY_NAME:53,DECIMAL_NUM:54,ENTITY_ONE:55,attribute:56,attributeType:57,attributeName:58,attributeKeyTypeList:59,attributeComment:60,ATTRIBUTE_WORD:61,"?":62,attributeKeyType:63,",":64,ATTRIBUTE_KEY:65,COMMENT:66,cardinality:67,relType:68,ZERO_OR_ONE:69,ZERO_OR_MORE:70,ONE_OR_MORE:71,ONLY_ONE:72,MD_PARENT:73,NON_IDENTIFYING:74,IDENTIFYING:75,WORD:76,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"NEWLINE",12:"COLON",14:"STYLE_SEPARATOR",16:"BLOCK_START",18:"BLOCK_STOP",19:"SQS",20:"SQE",21:"title",22:"title_value",23:"acc_title",24:"acc_title_value",25:"acc_descr",26:"acc_descr_value",27:"acc_descr_multiline_value",33:"END",34:"SUBGRAPH",37:"direction_tb",38:"direction_bt",39:"direction_rl",40:"direction_lr",41:"CLASSDEF",43:"UNICODE_TEXT",44:"STYLE_TEXT",45:"COMMA",46:"CLASS",47:"STYLE",50:"SEMI",51:"NUM",52:"BRKT",53:"ENTITY_NAME",54:"DECIMAL_NUM",55:"ENTITY_ONE",61:"ATTRIBUTE_WORD",62:"?",64:",",65:"ATTRIBUTE_KEY",66:"COMMENT",69:"ZERO_OR_ONE",70:"ZERO_OR_MORE",71:"ONE_OR_MORE",72:"ONLY_ONE",73:"MD_PARENT",74:"NON_IDENTIFYING",75:"IDENTIFYING",76:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[7,1],[8,5],[8,9],[8,7],[8,7],[8,4],[8,6],[8,3],[8,5],[8,1],[8,3],[8,7],[8,9],[8,6],[8,8],[8,4],[8,6],[8,2],[8,2],[8,2],[8,1],[8,1],[8,1],[8,1],[8,1],[8,3],[32,3],[32,6],[36,1],[36,2],[28,1],[28,1],[28,1],[28,1],[29,4],[15,1],[15,1],[15,3],[15,3],[30,3],[31,4],[42,1],[42,3],[48,1],[48,2],[35,1],[35,1],[35,1],[49,1],[49,1],[49,1],[49,1],[10,1],[10,1],[10,1],[10,1],[10,1],[17,1],[17,2],[56,2],[56,3],[56,3],[56,4],[57,1],[57,2],[58,1],[59,1],[59,3],[63,1],[60,1],[11,3],[67,1],[67,1],[67,1],[67,1],[67,1],[68,1],[68,1],[13,1],[13,1],[13,1]],performAction:(0,h.K)(function(t,e,s,i,r,a,n){var l=a.length-1;switch(r){case 1:break;case 2:case 5:case 6:this.$=[];break;case 3:this.$=a[l-1].concat(a[l]);break;case 4:case 34:case 59:case 60:case 61:case 62:case 86:case 69:case 71:case 74:this.$=a[l];break;case 7:i.addEntity(a[l-4]),i.addEntity(a[l-2]),i.addRelationship(a[l-4],a[l],a[l-2],a[l-3]),this.$=[a[l-4],a[l-2]];break;case 8:i.addEntity(a[l-8]),i.addEntity(a[l-4]),i.addRelationship(a[l-8],a[l],a[l-4],a[l-5]),i.setClass([a[l-8]],a[l-6]),i.setClass([a[l-4]],a[l-2]),this.$=[a[l-8],a[l-4]];break;case 9:i.addEntity(a[l-6]),i.addEntity(a[l-2]),i.addRelationship(a[l-6],a[l],a[l-2],a[l-3]),i.setClass([a[l-6]],a[l-4]),this.$=[a[l-6],a[l-2]];break;case 10:i.addEntity(a[l-6]),i.addEntity(a[l-4]),i.addRelationship(a[l-6],a[l],a[l-4],a[l-5]),i.setClass([a[l-4]],a[l-2]),this.$=[a[l-6],a[l-4]];break;case 11:i.addEntity(a[l-3]),i.addAttributes(a[l-3],a[l-1]),this.$=[a[l-3]];break;case 12:i.addEntity(a[l-5]),i.addAttributes(a[l-5],a[l-1]),i.setClass([a[l-5]],a[l-3]),this.$=[a[l-5]];break;case 13:i.addEntity(a[l-2]),this.$=[a[l-2]];break;case 14:i.addEntity(a[l-4]),i.setClass([a[l-4]],a[l-2]),this.$=[a[l-4]];break;case 15:i.addEntity(a[l]),this.$=[a[l]];break;case 16:i.addEntity(a[l-2]),i.setClass([a[l-2]],a[l]),this.$=[a[l-2]];break;case 17:i.addEntity(a[l-6],a[l-4]),i.addAttributes(a[l-6],a[l-1]),this.$=[a[l-6]];break;case 18:i.addEntity(a[l-8],a[l-6]),i.addAttributes(a[l-8],a[l-1]),i.setClass([a[l-8]],a[l-3]),this.$=[a[l-8]];break;case 19:i.addEntity(a[l-5],a[l-3]),this.$=[a[l-5]];break;case 20:i.addEntity(a[l-7],a[l-5]),i.setClass([a[l-7]],a[l-2]),this.$=[a[l-7]];break;case 21:i.addEntity(a[l-3],a[l-1]);break;case 22:i.addEntity(a[l-5],a[l-3]),i.setClass([a[l-5]],a[l]);break;case 23:case 24:this.$=a[l].trim(),i.setAccTitle(this.$);break;case 25:case 26:this.$=a[l].trim(),i.setAccDescription(this.$);break;case 27:i.subgraphDepth?this.$=a[l]:(i.setDirection(a[l].value),this.$=[]);break;case 31:i.subgraphDepth=(i.subgraphDepth||1)-1,this.$=i.addSubGraph({text:a[l-2].id},a[l-1],{text:a[l-2].text});break;case 32:i.subgraphDepth=(i.subgraphDepth||0)+1,this.$={id:a[l-1],text:a[l-1]};break;case 33:i.subgraphDepth=(i.subgraphDepth||0)+1,this.$={id:a[l-4],text:a[l-2]};break;case 35:this.$=a[l-1]+" "+a[l];break;case 36:this.$={stmt:"dir",value:"TB"};break;case 37:this.$={stmt:"dir",value:"BT"};break;case 38:this.$={stmt:"dir",value:"RL"};break;case 39:this.$={stmt:"dir",value:"LR"};break;case 40:this.$=a[l-3],i.addClass(a[l-2],a[l-1]);break;case 41:case 42:case 63:case 72:case 47:this.$=[a[l]];break;case 43:case 44:this.$=a[l-2].concat([a[l]]);break;case 45:this.$=a[l-2],i.setClass(a[l-1],a[l]);break;case 46:this.$=a[l-3],i.addCssStyles(a[l-2],a[l-1]);break;case 48:case 73:a[l-2].push(a[l]),this.$=a[l-2];break;case 50:case 70:this.$=a[l-1]+a[l];break;case 58:case 84:case 85:case 75:this.$=a[l].replace(/"/g,"");break;case 64:a[l].push(a[l-1]),this.$=a[l];break;case 65:this.$={type:a[l-1],name:a[l]};break;case 66:this.$={type:a[l-2],name:a[l-1],keys:a[l]};break;case 67:this.$={type:a[l-2],name:a[l-1],comment:a[l]};break;case 68:this.$={type:a[l-3],name:a[l-2],keys:a[l-1],comment:a[l]};break;case 76:this.$={cardA:a[l],relType:a[l-1],cardB:a[l-2]};break;case 77:this.$=i.Cardinality.ZERO_OR_ONE;break;case 78:this.$=i.Cardinality.ZERO_OR_MORE;break;case 79:this.$=i.Cardinality.ONE_OR_MORE;break;case 80:this.$=i.Cardinality.ONLY_ONE;break;case 81:this.$=i.Cardinality.MD_PARENT;break;case 82:this.$=i.Identification.NON_IDENTIFYING;break;case 83:this.$=i.Identification.IDENTIFYING}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,s,{5:3}),{6:[1,4],7:5,8:6,9:i,10:8,21:r,23:a,25:n,27:l,28:13,29:14,30:15,31:16,32:17,34:o,37:c,38:u,39:d,40:y,41:p,43:b,46:g,47:_,51:f,53:m,54:k,55:E},t(e,S,{1:[2,1]}),t(T,[2,3]),t(T,[2,4]),t(T,[2,5]),t(T,[2,15],{11:31,67:35,14:[1,32],16:[1,33],19:[1,34],69:$,70:O,71:N,72:x,73:C}),{22:[1,41]},{24:[1,42]},{26:[1,43]},t(T,[2,26]),t(T,[2,27]),t(T,[2,28]),t(T,[2,29]),t(T,[2,30]),t(T,s,{5:44}),t(A,[2,58]),t(A,[2,59]),t(A,[2,60]),t(A,[2,61]),t(A,[2,62]),t(T,[2,36]),t(T,[2,37]),t(T,[2,38]),t(T,[2,39]),{15:45,43:R,44:I},{15:48,43:R,44:I},{15:49,43:R,44:I},{10:50,43:b,51:f,53:m,54:k,55:E},{10:51,43:b,51:f,53:m,54:k,55:E},{15:52,43:R,44:I},{17:53,18:[1,54],56:55,57:56,61:D},{10:58,43:b,51:f,53:m,54:k,55:E},{68:59,74:[1,60],75:[1,61]},t(v,[2,77]),t(v,[2,78]),t(v,[2,79]),t(v,[2,80]),t(v,[2,81]),t(T,[2,23]),t(T,[2,24]),t(T,[2,25]),{6:[1,63],7:5,8:6,9:i,10:8,21:r,23:a,25:n,27:l,28:13,29:14,30:15,31:16,32:17,33:[1,62],34:o,37:c,38:u,39:d,40:y,41:p,43:b,46:g,47:_,51:f,53:m,54:k,55:E},{12:L,42:64,44:w,45:K,48:66,49:67,51:M,52:B},t(G,[2,41]),t(G,[2,42]),{15:72,43:R,44:I,45:K},{12:L,42:73,44:w,45:K,48:66,49:67,51:M,52:B},{6:F,9:Y,19:[1,75],35:74,50:P},{12:[1,79],14:[1,80]},t(T,[2,16],{67:35,11:81,16:[1,82],45:K,69:$,70:O,71:N,72:x,73:C}),{18:[1,83]},t(T,[2,13]),{17:84,18:[2,63],56:55,57:56,61:D},{58:85,61:[1,86]},{61:[2,69],62:[1,87]},{20:[1,88]},{67:89,69:$,70:O,71:N,72:x,73:C},t(z,[2,82]),t(z,[2,83]),t(T,[2,31]),t(T,S),{6:F,9:Y,35:90,45:U,50:P},{43:[1,92],44:[1,93]},t(Z,[2,47],{49:94,12:L,44:w,51:M,52:B}),t(j,[2,49]),t(j,[2,54]),t(j,[2,55]),t(j,[2,56]),t(j,[2,57]),t(T,[2,45],{45:K}),{6:F,9:Y,35:95,45:U,50:P},t(T,[2,32]),{10:97,36:96,43:b,51:f,53:m,54:k,55:E},t(T,[2,51]),t(T,[2,52]),t(T,[2,53]),{13:98,43:W,53:q,76:Q},{15:102,43:R,44:I},{10:103,43:b,51:f,53:m,54:k,55:E},{17:104,18:[1,105],56:55,57:56,61:D},t(T,[2,11]),{18:[2,64]},t(V,[2,65],{59:106,60:107,63:108,65:X,66:H}),t([18,61,65,66],[2,71]),{61:[2,70]},t(T,[2,21],{14:[1,112],16:[1,111]}),t([43,51,53,54,55],[2,76]),t(T,[2,40]),{12:L,44:w,48:113,49:67,51:M,52:B},t(G,[2,43]),t(G,[2,44]),t(j,[2,50]),t(T,[2,46]),{10:115,20:[1,114],43:b,51:f,53:m,54:k,55:E},t(J,[2,34]),t(T,[2,7]),t(T,[2,84]),t(T,[2,85]),t(T,[2,86]),{12:[1,116],45:K},{12:[1,118],14:[1,117]},{18:[1,119]},t(T,[2,14]),t(V,[2,66],{60:120,64:[1,121],66:H}),t(V,[2,67]),t(tt,[2,72]),t(V,[2,75]),t(tt,[2,74]),{17:122,18:[1,123],56:55,57:56,61:D},{15:124,43:R,44:I},t(Z,[2,48],{49:94,12:L,44:w,51:M,52:B}),{6:F,9:Y,35:125,50:P},t(J,[2,35]),{13:126,43:W,53:q,76:Q},{15:127,43:R,44:I},{13:128,43:W,53:q,76:Q},t(T,[2,12]),t(V,[2,68]),{63:129,65:X},{18:[1,130]},t(T,[2,19]),t(T,[2,22],{16:[1,131],45:K}),t(T,[2,33]),t(T,[2,10]),{12:[1,132],45:K},t(T,[2,9]),t(tt,[2,73]),t(T,[2,17]),{17:133,18:[1,134],56:55,57:56,61:D},{13:135,43:W,53:q,76:Q},{18:[1,136]},t(T,[2,20]),t(T,[2,8]),t(T,[2,18])],defaultActions:{84:[2,64],87:[2,70]},parseError:(0,h.K)(function(t,e){if(e.recoverable)this.trace(t);else{var s=Error(t);throw s.hash=e,s}},"parseError"),parse:(0,h.K)(function(t){var e=this,s=[0],i=[],r=[null],a=[],n=this.table,l="",o=0,c=0,u=0,d=a.slice.call(arguments,1),y=Object.create(this.lexer),p={};for(var b in this.yy)Object.prototype.hasOwnProperty.call(this.yy,b)&&(p[b]=this.yy[b]);y.setInput(t,p),p.lexer=y,p.parser=this,void 0===y.yylloc&&(y.yylloc={});var g=y.yylloc;a.push(g);var _=y.options&&y.options.ranges;function f(){var t;return"number"!=typeof(t=i.pop()||y.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.parseError?this.parseError=p.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,h.K)(function(t){s.length=s.length-2*t,r.length=r.length-t,a.length=a.length-t},"popStack"),(0,h.K)(f,"lex");for(var m,k,E,S,T,$,O,N,x,C={};;){if(E=s[s.length-1],this.defaultActions[E]?S=this.defaultActions[E]:(null==m&&(m=f()),S=n[E]&&n[E][m]),void 0===S||!S.length||!S[0]){var A="";for($ in x=[],n[E])this.terminals_[$]&&$>2&&x.push("'"+this.terminals_[$]+"'");A=y.showPosition?"Parse error on line "+(o+1)+":\n"+y.showPosition()+"\nExpecting "+x.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(A,{text:y.match,token:this.terminals_[m]||m,line:y.yylineno,loc:g,expected:x})}if(S[0]instanceof Array&&S.length>1)throw Error("Parse Error: multiple actions possible at state: "+E+", token: "+m);switch(S[0]){case 1:s.push(m),r.push(y.yytext),a.push(y.yylloc),s.push(S[1]),m=null,k?(m=k,k=null):(c=y.yyleng,l=y.yytext,o=y.yylineno,g=y.yylloc,u>0&&u--);break;case 2:if(O=this.productions_[S[1]][1],C.$=r[r.length-O],C._$={first_line:a[a.length-(O||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(O||1)].first_column,last_column:a[a.length-1].last_column},_&&(C._$.range=[a[a.length-(O||1)].range[0],a[a.length-1].range[1]]),void 0!==(T=this.performAction.apply(C,[l,c,o,p,S[1],r,a].concat(d))))return T;O&&(s=s.slice(0,-1*O*2),r=r.slice(0,-1*O),a=a.slice(0,-1*O)),s.push(this.productions_[S[1]][0]),r.push(C.$),a.push(C._$),N=n[s[s.length-2]][s[s.length-1]],s.push(N);break;case 3:return!0}}return!0},"parse")};function ts(){this.yy={}}return te.lexer={EOF:1,parseError:(0,h.K)(function(t,e){if(this.yy.parser)this.yy.parser.parseError(t,e);else throw Error(t)},"parseError"),setInput:(0,h.K)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,h.K)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,h.K)(function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,h.K)(function(){return this._more=!0,this},"more"),reject:(0,h.K)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,h.K)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,h.K)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,h.K)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,h.K)(function(){var t=this.pastInput(),e=Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,h.K)(function(t,e){var s,i,r;if(this.options.backtrack_lexer&&(r={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack)for(var a in r)this[a]=r[a];return!1},"test_match"),next:(0,h.K)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,s,i,r=this._currentRules(),a=0;a<r.length;a++)if((s=this._input.match(this.rules[r[a]]))&&(!e||s[0].length>e[0].length)){if(e=s,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,r[a])))return t;if(!this._backtrack)return!1;e=!1;continue}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,h.K)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,h.K)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,h.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,h.K)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,h.K)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,h.K)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,h.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,h.K)(function(t,e,s,i){switch(s){case 0:return this.begin("acc_title"),23;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),25;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:case 28:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 37;case 8:return 38;case 9:return 39;case 10:return 40;case 11:case 22:case 30:case 37:break;case 12:return 9;case 13:return 53;case 14:return 76;case 15:return 4;case 16:return this.begin("block"),16;case 17:case 18:case 40:return 52;case 19:case 39:return 45;case 20:return 14;case 21:case 38:return 12;case 23:return 65;case 24:case 25:case 27:return 61;case 26:this.begin("block_bq");break;case 29:return 66;case 31:return this.popState(),18;case 32:case 81:return e.yytext[0];case 33:return 19;case 34:return 20;case 35:return this.begin("style"),47;case 36:return this.popState(),9;case 41:return this.begin("style"),41;case 42:return 46;case 43:return 34;case 44:return 33;case 45:case 49:case 50:case 68:return 69;case 46:case 47:case 48:case 56:case 58:case 70:return 71;case 51:case 52:case 53:case 54:case 55:case 57:case 69:return 70;case 59:case 60:case 62:case 63:case 64:case 67:return 72;case 61:return 54;case 65:return 55;case 66:return 51;case 71:return 73;case 72:case 75:case 76:case 77:return 74;case 73:case 74:return 75;case 78:return 44;case 79:return 50;case 80:return 43;case 82:return 6}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[ \t\r]+)/i,/^(?:[\n]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:#)/i,/^(?:#)/i,/^(?:,)/i,/^(?::::)/i,/^(?::)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:([^\s]*)[~].*[~]([^\s]*))/i,/^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\.,\u00C0-\uFFFF\*]*))/i,/^(?:[`])/i,/^(?:[^`]+)/i,/^(?:[`])/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:style\b)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?::)/i,/^(?:,)/i,/^(?:#)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:subgraph\b)/i,/^(?:end\b\s*)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:[0-9]+\.[0-9]+)/i,/^(?:1(?=\s+[A-Za-z_"']))/i,/^(?:1(?=\s+[0-9]))/i,/^(?:1(?=(--|\.\.|\.-|-\.)))/i,/^(?:1\b)/i,/^(?:[0-9]+)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:u(?=[\.\-\|]))/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*|\.)+)/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[36,37,38,39,40,78,79],inclusive:!1},acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block_bq:{rules:[27,28],inclusive:!1},block:{rules:[22,23,24,25,26,29,30,31,32],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,33,34,35,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,80,81,82],inclusive:!0}}},(0,h.K)(ts,"Parser"),ts.prototype=te,te.Parser=ts,new ts}();p.parser=p;var b=class{constructor(){this.entities=new Map,this.relationships=[],this.classes=new Map,this.subgraphDepth=0,this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.direction="TB",this.Cardinality={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},this.Identification={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},this.setAccTitle=o.SV,this.getAccTitle=o.iN,this.setAccDescription=o.EI,this.getAccDescription=o.m7,this.setDiagramTitle=o.ke,this.getDiagramTitle=o.ab,this.getConfig=(0,h.K)(()=>(0,o.D7)().er,"getConfig"),this.clear(),this.addEntity=this.addEntity.bind(this),this.addAttributes=this.addAttributes.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setDirection=this.setDirection.bind(this),this.addCssStyles=this.addCssStyles.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this),this.addSubGraph=this.addSubGraph.bind(this)}static{(0,h.K)(this,"ErDB")}addEntity(t,e=""){return this.entities.has(t)?!this.entities.get(t)?.alias&&e&&(this.entities.get(t).alias=e,c.R.info(`Add alias '${e}' to entity '${t}'`)):(this.entities.set(t,{id:`entity-${t}-${this.entities.size}`,label:t,attributes:[],alias:e,shape:"erBox",look:(0,o.D7)().look??"default",cssClasses:"default",cssStyles:[],labelType:"markdown"}),c.R.info("Added new entity :",t)),this.entities.get(t)}getEntity(t){return this.entities.get(t)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(t,e){let s,i=this.addEntity(t);for(s=e.length-1;s>=0;s--)e[s].keys||(e[s].keys=[]),e[s].comment||(e[s].comment=""),i.attributes.push(e[s]),c.R.debug("Added attribute ",e[s].name)}addRelationship(t,e,s,i){let r,a;if(this.subGraphLookup.has(t))r=t;else{let e=this.addEntity(t);if(!e)return;r=e.id}if(this.subGraphLookup.has(s))a=s;else{let t=this.addEntity(s);if(!t)return;a=t.id}let n={entityA:r,roleA:e,entityB:a,relSpec:i};this.relationships.push(n),c.R.debug("Added new relationship :",n)}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(t){this.direction=t}getCompiledStyles(t){let e=[];for(let s of t){let t=this.classes.get(s);t?.styles&&(e=[...e,...t.styles??[]].map(t=>t.trim())),t?.textStyles&&(e=[...e,...t.textStyles??[]].map(t=>t.trim()))}return e}addCssStyles(t,e){for(let s of t){let t=this.entities.get(s),i=this.subGraphLookup.get(s);if(e){if(t)for(let s of e)t.cssStyles.push(s);if(i)for(let t of(i.cssStyles||(i.cssStyles=[]),e))i.cssStyles.push(t)}}}addClass(t,e){t.forEach(t=>{let s=this.classes.get(t);void 0===s&&(s={id:t,styles:[],textStyles:[]},this.classes.set(t,s)),e&&e.forEach(function(t){if(/color/.exec(t)){let e=t.replace("fill","bgFill");s.textStyles.push(e)}s.styles.push(t)})})}addSubGraph(t,e,s){let i=t.text.trim(),r=s.text,a=(0,h.K)(t=>{let e,s=new Set;return{nodeList:t.filter(t=>{if(t?.stmt)return"dir"===t.stmt&&(e=t.value),!1;if("string"!=typeof t)return!1;let i=t.trim();return!(!i||s.has(i))&&(s.add(i),!0)}),dir:e}},"uniq")(e.flat()),n=a.nodeList,l=a.dir;i=i??"subGraph"+this.subCount,r=r||"",r=this.sanitizeText(r),this.subCount=this.subCount+1;let o={id:i,nodes:n,title:r.trim(),classes:[],cssStyles:[],dir:l,labelType:this.sanitizeNodeLabelType(s?.type)};return c.R.info("Adding",o.id,o.nodes,o.dir),o.nodes=this.makeUniq(o,this.subGraphs).nodes,this.subGraphs.push(o),this.subGraphLookup.set(i,o),i}getSubGraphs(){return this.subGraphs}setClass(t,e){for(let s of t){let t=this.entities.get(s);if(t)for(let s of e)t.cssClasses+=" "+s;let i=this.subGraphLookup.get(s);if(i)for(let t of e)i.classes.push(t)}}subgraphNodeCache(t){let e=new Set;for(let s of t)for(let t of s.nodes)e.add(t);return e}makeUniq(t,e){let s=this.subgraphNodeCache(e),i=[];return t.nodes.forEach((e,r)=>{s.has(e)?c.R.warn(`Entity '${e}' already belongs to another subgraph and will be ignored`):i.push(t.nodes[r])}),{nodes:i}}sanitizeText(t){return o.Y2.sanitizeText(t,(0,o.D7)())}sanitizeNodeLabelType(t){switch(t){case"markdown":case"string":case"text":return t;default:return"markdown"}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.subgraphDepth=0,(0,o.IU)()}getData(){let t=[],e=[],s=(0,o.D7)(),i=this.getSubGraphs(),r=new Map,a=new Map;for(let t=i.length-1;t>=0;t--){let e=i[t];for(let t of(e.nodes.length>0&&a.set(e.id,!0),e.nodes))r.set(t,e.id)}for(let e=i.length-1;e>=0;e--){let a=i[e];t.push({id:a.id,label:a.title,labelStyle:"",labelType:a.labelType,parentId:r.get(a.id),padding:8,cssCompiledStyles:this.getCompiledStyles(a.classes),cssStyles:a.cssStyles,cssClasses:a.classes.join(" "),shape:"rect",dir:a.dir,isGroup:!0,look:s.look})}let n=new Set(i.map(t=>t.id)),c=0;for(let e of this.entities.keys()){if(n.has(e))continue;let s=this.entities.get(e);s&&(s.cssCompiledStyles=this.getCompiledStyles(s.cssClasses.split(" ")),s.colorIndex=c++,t.push({...s,parentId:r.get(e),isGroup:!1}))}let h=0;for(let t of this.relationships){let i={id:(0,l.rY)(t.entityA,t.entityB,{prefix:"id",counter:h++}),type:"normal",curve:"basis",start:t.entityA,end:t.entityB,label:t.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:t.relSpec.cardB.toLowerCase(),arrowTypeEnd:t.relSpec.cardA.toLowerCase(),pattern:"IDENTIFYING"==t.relSpec.relType?"solid":"dashed",look:s.look,labelType:"markdown"};e.push(i)}return{nodes:t,edges:e,other:{},config:s,direction:this.direction}}},g={};(0,h.V)(g,{draw:()=>_});var _=(0,h.K)(async function(t,e,s,n){c.R.info("REF0:"),c.R.info("Drawing er diagram (unified)",e);let{securityLevel:h,er:d,layout:y}=(0,o.D7)(),p=n.db.getData(),b=(0,i.A)(e,h);p.type=n.type,p.layoutAlgorithm=(0,a.q7)(y),p.config.flowchart.nodeSpacing=d?.nodeSpacing||140,p.config.flowchart.rankSpacing=d?.rankSpacing||80,p.direction=n.db.getDirection();let{config:g}=p,{look:_}=g;"neo"===_?p.markers=["only_one_neo","zero_or_one_neo","one_or_more_neo","zero_or_more_neo"]:p.markers=["only_one","zero_or_one","one_or_more","zero_or_more"],p.diagramId=e,await (0,a.XX)(p,b);let f=b.selectAll('[id*="-background"]');Array.from(f).length>0&&f.each(function(){let t=(0,u.Ltv)(this),e=t.attr("id").replace("-background",""),s=b.select(`#${CSS.escape(e)}`);if(!s.empty()){let e=s.attr("transform");t.attr("transform",e)}}),l._K.insertTitle(b,"erDiagramTitleText",d?.titleTopMargin??25,n.db.getDiagramTitle()),(0,r.P)(b,8,"erDiagram",d?.useMaxWidth??!0)},"draw"),f=(0,h.K)((t,e)=>{let s=d.A,i=s(t,"r"),r=s(t,"g"),a=s(t,"b");return y.A(i,r,a,e)},"fade"),m=(0,h.K)(t=>{let{theme:e,bkgColorArray:s,borderColorArray:i}=t;if(!(0,n.P1)(e,i))return"";let r=(0,n.rq)(t.look),a=(0,n.Ic)(s),l="";for(let t=0;t<(0,n.Hu)(i);t++){let e=i[t],n=a?`fill: ${s[t%s.length]};`:"";l+=`
|
|
2
|
-
|
|
3
|
-
[data-look="${r}"][data-color-id="color-${t}"].node path {
|
|
4
|
-
stroke: ${e};
|
|
5
|
-
${n}
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
[data-look="${r}"][data-color-id="color-${t}"].node rect {
|
|
9
|
-
stroke: ${e};
|
|
10
|
-
${n}
|
|
11
|
-
}
|
|
12
|
-
`}return l},"genColor"),k={parser:p,get db(){return new b},renderer:g,styles:(0,h.K)(t=>{let{look:e,theme:s,erEdgeLabelBackground:i,strokeWidth:r}=t;return`
|
|
13
|
-
${m(t)}
|
|
14
|
-
.entityBox {
|
|
15
|
-
fill: ${t.mainBkg};
|
|
16
|
-
stroke: ${t.nodeBorder};
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.relationshipLabelBox {
|
|
20
|
-
fill: ${t.tertiaryColor};
|
|
21
|
-
opacity: 0.7;
|
|
22
|
-
background-color: ${t.tertiaryColor};
|
|
23
|
-
rect {
|
|
24
|
-
opacity: 0.5;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.labelBkg {
|
|
29
|
-
background-color: ${n.Fx.has(s)&&i?i:f(t.tertiaryColor,.5)};
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.edgeLabel {
|
|
33
|
-
background-color: ${n.Fx.has(s)&&i?i:t.edgeLabelBackground};
|
|
34
|
-
}
|
|
35
|
-
.edgeLabel .label rect {
|
|
36
|
-
fill: ${n.Fx.has(s)&&i?i:t.edgeLabelBackground};
|
|
37
|
-
}
|
|
38
|
-
.edgeLabel .label text {
|
|
39
|
-
fill: ${t.textColor};
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.edgeLabel .label {
|
|
43
|
-
fill: ${t.nodeBorder};
|
|
44
|
-
font-size: 14px;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.label {
|
|
48
|
-
font-family: ${t.fontFamily};
|
|
49
|
-
color: ${t.nodeTextColor||t.textColor};
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.edge-pattern-dashed {
|
|
53
|
-
stroke-dasharray: 8,8;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.node rect,
|
|
57
|
-
.node circle,
|
|
58
|
-
.node ellipse,
|
|
59
|
-
.node polygon
|
|
60
|
-
{
|
|
61
|
-
fill: ${t.mainBkg};
|
|
62
|
-
stroke: ${t.nodeBorder};
|
|
63
|
-
stroke-width: ${"neo"===e?r:"1px"};
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.relationshipLine {
|
|
67
|
-
stroke: ${t.lineColor};
|
|
68
|
-
stroke-width: ${"neo"===e?r:"1px"};
|
|
69
|
-
fill: none;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.marker {
|
|
73
|
-
fill: none !important;
|
|
74
|
-
stroke: ${t.lineColor} !important;
|
|
75
|
-
stroke-width: 1;
|
|
76
|
-
}
|
|
77
|
-
[data-look=neo].labelBkg {
|
|
78
|
-
background-color: ${f(t.tertiaryColor,.5)};
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.cluster rect {
|
|
82
|
-
fill: ${t.clusterBkg??t.mainBkg};
|
|
83
|
-
stroke: ${t.clusterBorder??t.nodeBorder};
|
|
84
|
-
stroke-width: 1px;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.cluster text {
|
|
88
|
-
fill: ${t.titleColor??t.textColor};
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.cluster-label text {
|
|
92
|
-
fill: ${t.titleColor??t.textColor};
|
|
93
|
-
}
|
|
94
|
-
`},"getStyles")};s.d(e,{diagram:()=>k})}}]);
|