@marimo-team/frontend 0.15.5 → 0.16.0-dev96986
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/ConnectedDataExplorerComponent-CNLoZkWr.js +19 -0
- package/dist/assets/{ImageComparisonComponent-CEXMKKA4.js → ImageComparisonComponent-SX7fDaTK.js} +1 -1
- package/dist/assets/{VegaLite-Bt14Ds9k.js → VegaLite-MJUW3b7C.js} +6 -6
- package/dist/assets/_baseEach-9_logFrf.js +1 -0
- package/dist/assets/_baseMap-NzEbKt5c.js +1 -0
- package/dist/assets/_baseUniq-C5LFcyNC.js +1 -0
- package/dist/assets/_createAggregator-ZRm2b6Zm.js +1 -0
- package/dist/assets/agent-panel-BBd11wNX.js +287 -0
- package/dist/assets/agent-panel-D92Mfy1i.css +1 -0
- package/dist/assets/{any-language-editor-DiwNT6zp.js → any-language-editor-DwAaEQfS.js} +1 -1
- package/dist/assets/architectureDiagram-W76B3OCA-BJmVXUoW.js +36 -0
- package/dist/assets/{between-horizontal-start-FyewyCGn.js → between-horizontal-start-KiwU-a3C.js} +1 -1
- package/dist/assets/{blockDiagram-QIGZ2CNN-BrOkAf_c.js → blockDiagram-QIGZ2CNN-DzxZjE7B.js} +1 -1
- package/dist/assets/{c4Diagram-FPNF74CW-BHPzDxE2.js → c4Diagram-FPNF74CW-DjmldG_J.js} +5 -5
- package/dist/assets/channel-DHcKBVM4.js +1 -0
- package/dist/assets/chat-panel-DgJZr0eS.js +3 -0
- package/dist/assets/{chunk-4BX2VUAB-DLxaCNYh.js → chunk-4BX2VUAB-EUTQThiZ.js} +1 -1
- package/dist/assets/{chunk-55IACEB6-DdzvO3HR.js → chunk-55IACEB6-DZAiDJxy.js} +1 -1
- package/dist/assets/{chunk-FMBD7UC4-R5o-nSiG.js → chunk-FMBD7UC4-Bd0Czs-J.js} +1 -1
- package/dist/assets/{chunk-K7UQS3LO-DxaMrGgG.js → chunk-K7UQS3LO-DEKMIknX.js} +1 -1
- package/dist/assets/{chunk-QN33PNHL-DqS9-FYm.js → chunk-QN33PNHL-E0jwHU_n.js} +1 -1
- package/dist/assets/{chunk-QZHKN3VN-BZ-TzajS.js → chunk-QZHKN3VN-BzaIHJbq.js} +1 -1
- package/dist/assets/{chunk-TVAH2DTR-BsgP2dyv.js → chunk-TVAH2DTR-CZFYvqnm.js} +1 -1
- package/dist/assets/{chunk-TZMSLE5B-D-h3ahXI.js → chunk-TZMSLE5B-BNqnFjtv.js} +1 -1
- package/dist/assets/{circle-play-CQtRZ-rT.js → circle-play-D3J_mYrF.js} +1 -1
- package/dist/assets/classDiagram-KNZD7YFC-D-xwLnlX.js +1 -0
- package/dist/assets/classDiagram-v2-RKCZMP56-D-xwLnlX.js +1 -0
- package/dist/assets/{clear-button-BY6Z_ViL.js → clear-button-ifzRuAR3.js} +1 -1
- package/dist/assets/clone-CSxIll62.js +1 -0
- package/dist/assets/command-palette-D2fdVSET.js +1 -0
- package/dist/assets/common-Ku-cF_2J.js +1 -0
- package/dist/assets/{compile-Ct_jzdKr.js → compile-BgZlHW1c.js} +1 -1
- package/dist/assets/cose-bilkent-S5V4N54A-CVM83SqK.js +1 -0
- package/dist/assets/dagre-5GWH7T2D-ouQPkxT3.js +4 -0
- package/dist/assets/{data-grid-overlay-editor-BN_wulc3.js → data-grid-overlay-editor-B47j5GJJ.js} +1 -1
- package/dist/assets/datasources-panel-Bt41Zir-.js +1 -0
- package/dist/assets/{dependency-graph-panel-BOmSCZf7.js → dependency-graph-panel-CZC_B7pK.js} +4 -4
- package/dist/assets/diagram-N5W7TBWH-CQ817ZdR.js +24 -0
- package/dist/assets/diagram-QEK2KX5R-DOK_psUO.js +43 -0
- package/dist/assets/diagram-S2PKOQOG-CVljmOW8.js +24 -0
- package/dist/assets/{documentation-panel-BxjJO_Gw.js → documentation-panel-C7yIvGg1.js} +1 -1
- package/dist/assets/edit-page-CyTMQV2u.js +129 -0
- package/dist/assets/{ellipsis-vertical-UHbmjI2n.js → ellipsis-vertical-C7FjlUsY.js} +1 -1
- package/dist/assets/{empty-state-BIBXzY_0.js → empty-state-DIOGM_CU.js} +1 -1
- package/dist/assets/{erDiagram-AWTI2OKA-E84mAle_.js → erDiagram-AWTI2OKA-DYu8cEdc.js} +1 -1
- package/dist/assets/{error-panel-MEvQ6K7h.js → error-panel-Ddb8RkFG.js} +1 -1
- package/dist/assets/file-explorer-panel-Oy9DbyFP.js +1 -0
- package/dist/assets/{flowDiagram-PVAE7QVJ-DfbIRSAW.js → flowDiagram-PVAE7QVJ-CmvW5iTb.js} +1 -1
- package/dist/assets/{ganttDiagram-OWAHRB6G-DR4HZ1z_.js → ganttDiagram-OWAHRB6G-BaKQlCaT.js} +4 -4
- package/dist/assets/gitGraphDiagram-NY62KEGX-CWO24eP6.js +65 -0
- package/dist/assets/{glide-data-editor-nNmo1lPq.js → glide-data-editor-CNDLEJ9a.js} +11 -11
- package/dist/assets/graph-BZKTtxsc.js +1 -0
- package/dist/assets/home-page-Bvwppn9N.js +9 -0
- package/dist/assets/{index-VPWqq2Pg.js → index-0XOUPdwT.js} +1 -1
- package/dist/assets/{index-uacyUula.js → index-BH7f3aiU.js} +1 -1
- package/dist/assets/{index-Dt9UWeWn.js → index-BJVyzkx5.js} +1 -1
- package/dist/assets/{index-BAH034Ue.js → index-B_d_JZGI.js} +1 -1
- package/dist/assets/{index-CB2pnVQG.js → index-BgXbBA39.js} +1 -1
- package/dist/assets/{index-B8llrTSo.js → index-Brf2DwUM.js} +1 -1
- package/dist/assets/{index-BLu5CX6z.js → index-CXrWwFX6.js} +1 -1
- package/dist/assets/{index-DyLSuOH1.js → index-CZaurnA9.js} +1 -1
- package/dist/assets/{index-BFSnz7iM.js → index-CerjupfZ.js} +1 -1
- package/dist/assets/{index-B7yXbrLa.js → index-D-tZfElD.js} +1 -1
- package/dist/assets/{index-c6If577Q.js → index-D3PqGupX.js} +1 -1
- package/dist/assets/{index-CSgxTUzD.js → index-DCkzth56.js} +1 -1
- package/dist/assets/{index-DWOaniGT.js → index-DFrGFNW1.js} +1 -1
- package/dist/assets/{index-CPN7TRA1.js → index-DZhOPkOB.js} +1 -1
- package/dist/assets/index-DadI618h.css +1 -0
- package/dist/assets/{index-DqzMPAC8.js → index-DkntzpX4.js} +2 -2
- package/dist/assets/{index-B1_GXGaP.js → index-DmgwT3sx.js} +1 -1
- package/dist/assets/index-PmY0x4Zd.js +578 -0
- package/dist/assets/{index-Bq516OmX.js → index-WXJFkQHg.js} +1 -1
- package/dist/assets/{index-DSU75csX.js → index-qE8lHQ-N.js} +1 -1
- package/dist/assets/{index-DMomwMcN.js → index-zrSUQXha.js} +1 -1
- package/dist/assets/infoDiagram-STP46IZ2-CAuVVehw.js +2 -0
- package/dist/assets/isEmpty-D1t7Gran.js +1 -0
- package/dist/assets/{journeyDiagram-BIP6EPQ6-BBiFyygf.js → journeyDiagram-BIP6EPQ6-D4Rp6H_h.js} +1 -1
- package/dist/assets/{kanban-definition-6OIFK2YF-DhgA6Nt6.js → kanban-definition-6OIFK2YF-DFt9DftA.js} +4 -4
- package/dist/assets/layout-D8WXi2_g.js +1 -0
- package/dist/assets/linear-BwY8e5hA.js +1 -0
- package/dist/assets/links-4B6ldZ5P.js +7 -0
- package/dist/assets/{logs-panel-B9SmTZAW.js → logs-panel-Dxiyt7dO.js} +1 -1
- package/dist/assets/{agent-panel-DpQ6muj-.css → markdown-renderer-ClyzDMmG.css} +1 -1
- package/dist/assets/markdown-renderer-VDu-NBKB.js +263 -0
- package/dist/assets/mermaid-B-O-Puyi.js +1 -0
- package/dist/assets/{mermaid.core-4nVOEVX3.js → mermaid.core-BFFCqfOn.js} +41 -41
- package/dist/assets/min-DtVSfYKl.js +1 -0
- package/dist/assets/{mindmap-definition-Q6HEUPPD-CVLQNn1q.js → mindmap-definition-Q6HEUPPD-kyvIY8Dg.js} +2 -2
- package/dist/assets/{number-overlay-editor-CzRzXLcd.js → number-overlay-editor-GjLB2UK4.js} +1 -1
- package/dist/assets/outline-panel-CMJjOoN7.js +1 -0
- package/dist/assets/packages-panel-nfXB-bKW.js +1 -0
- package/dist/assets/{pieDiagram-ADFJNKIX-C5IQ5DBZ.js → pieDiagram-ADFJNKIX-D8JFQcWR.js} +3 -3
- package/dist/assets/{quadrantDiagram-LMRXKWRM-CFXFnQxx.js → quadrantDiagram-LMRXKWRM-Nf8GzxXG.js} +1 -1
- package/dist/assets/{react-plotly-mzdv02_Y.js → react-plotly-CnW9p7ZA.js} +1 -1
- package/dist/assets/{requirementDiagram-4UW4RH46-D9bPC89T.js → requirementDiagram-4UW4RH46-CCUxF8BZ.js} +1 -1
- package/dist/assets/run-page-Bl4p3AbZ.js +1 -0
- package/dist/assets/sankeyDiagram-GR3RE2ED-Sr8kDwP1.js +10 -0
- package/dist/assets/scratchpad-panel-Ja1Mu-W3.js +1 -0
- package/dist/assets/secrets-panel-B-3fcSyP.js +1 -0
- package/dist/assets/{sequenceDiagram-C3RYC4MD-6N7_hY4k.js → sequenceDiagram-C3RYC4MD-CBJ152Q3.js} +4 -4
- package/dist/assets/{slides-component-DMjQomc3.css → slides-component-C-LoGC1U.css} +1 -1
- package/dist/assets/{slides-component-EcjC8sDK.js → slides-component-DGtsVP5o.js} +1 -1
- package/dist/assets/snippets-panel-ClNnwKBM.js +1 -0
- package/dist/assets/sortBy-D47H6Vyl.js +1 -0
- package/dist/assets/state-B_RCHTH5.js +1 -0
- package/dist/assets/stateDiagram-KXAO66HF-BlBFSAZr.js +1 -0
- package/dist/assets/stateDiagram-v2-UMBNRL4Z-DbA-iToo.js +1 -0
- package/dist/assets/storage-BNcWOH3-.js +26 -0
- package/dist/assets/terminal-CATzv5Hd.js +10 -0
- package/dist/assets/time-CsYqILfB.js +1 -0
- package/dist/assets/{timeline-definition-XQNQX7LJ-BEaynAiY.js → timeline-definition-XQNQX7LJ-CGrhjuAs.js} +1 -1
- package/dist/assets/tracing-DUbJtOyq.js +2 -0
- package/dist/assets/{tracing-panel-BmuHLPrY.js → tracing-panel-DmzqPUtc.js} +2 -2
- package/dist/assets/{trash-UBqfK4mR.js → trash-rxdjLzkf.js} +1 -1
- package/dist/assets/{tree-XiEycetl.js → tree-C2Ul1h1C.js} +1 -1
- package/dist/assets/{treemap-75Q7IDZK-CnuVFbBG.js → treemap-75Q7IDZK-N9hyUpyj.js} +20 -20
- package/dist/assets/{ts-tags-CloPe9IY.js → ts-tags-DxCDHihD.js} +1 -1
- package/dist/assets/variable-panel-BbgupOdG.js +1 -0
- package/dist/assets/{vega-component-DsTH4tuX.js → vega-component-CR_MHOBT.js} +1 -1
- package/dist/assets/worker-fHbtoWvT.js +1 -0
- package/dist/assets/{xychartDiagram-6GGTOJPD-Dcz3O-A3.js → xychartDiagram-6GGTOJPD-jdLZsMb2.js} +1 -1
- package/dist/index.html +2 -2
- package/package.json +10 -5
- package/src/__tests__/mocks.ts +43 -0
- package/src/components/app-config/user-config-form.tsx +78 -1
- package/src/components/chat/acp/__tests__/__snapshots__/prompt.test.ts.snap +116 -65
- package/src/components/chat/acp/__tests__/atoms.test.ts +1 -1
- package/src/components/chat/acp/__tests__/context-utils.test.ts +222 -0
- package/src/components/chat/acp/__tests__/prompt.test.ts +1 -1
- package/src/components/chat/acp/__tests__/state.test.ts +38 -42
- package/src/components/chat/acp/agent-docs.tsx +33 -6
- package/src/components/chat/acp/agent-panel.css +0 -18
- package/src/components/chat/acp/agent-panel.tsx +394 -72
- package/src/components/chat/acp/agent-selector.tsx +7 -1
- package/src/components/chat/acp/blocks.tsx +40 -10
- package/src/components/chat/acp/common.tsx +10 -2
- package/src/components/chat/acp/context-utils.ts +127 -0
- package/src/components/chat/acp/prompt.ts +96 -53
- package/src/components/chat/acp/state.ts +1 -1
- package/src/components/chat/acp/types.ts +8 -0
- package/src/components/chat/chat-panel.tsx +28 -89
- package/src/components/chat/chat-utils.ts +127 -1
- package/src/components/chat/markdown-renderer.css +39 -0
- package/src/components/chat/markdown-renderer.tsx +12 -47
- package/src/components/chat/tool-call-accordion.tsx +148 -26
- package/src/components/data-table/SearchBar.tsx +8 -7
- package/src/components/data-table/__tests__/column_formatting.test.ts +50 -35
- package/src/components/data-table/__tests__/data-table.test.tsx +39 -1
- package/src/components/data-table/cell-hover-template/feature.ts +14 -0
- package/src/components/data-table/cell-hover-template/types.ts +11 -0
- package/src/components/data-table/charts/components/form-fields.tsx +41 -37
- package/src/components/data-table/charts/forms/common-chart.tsx +2 -2
- package/src/components/data-table/column-explorer-panel/column-explorer.tsx +5 -2
- package/src/components/data-table/column-formatting/feature.ts +62 -29
- package/src/components/data-table/column-formatting/types.ts +1 -0
- package/src/components/data-table/column-header.tsx +3 -1
- package/src/components/data-table/column-summary/chart-spec-model.tsx +24 -7
- package/src/components/data-table/column-summary/column-summary.tsx +18 -9
- package/src/components/data-table/columns.tsx +42 -18
- package/src/components/data-table/data-table.tsx +10 -2
- package/src/components/data-table/date-popover.tsx +85 -75
- package/src/components/data-table/filter-pills.tsx +14 -9
- package/src/components/data-table/header-items.tsx +5 -1
- package/src/components/data-table/pagination.tsx +20 -13
- package/src/components/data-table/renderers.tsx +28 -0
- package/src/components/data-table/row-viewer-panel/row-viewer.tsx +10 -8
- package/src/components/datasources/column-preview.tsx +6 -2
- package/src/components/datasources/datasources.tsx +8 -12
- package/src/components/editor/Cell.tsx +6 -0
- package/src/components/editor/actions/name-cell-input.tsx +6 -1
- package/src/components/editor/actions/useCellActionButton.tsx +3 -1
- package/src/components/editor/ai/__tests__/completion-utils.test.ts +178 -1
- package/src/components/editor/ai/add-cell-with-ai.tsx +68 -66
- package/src/components/editor/ai/ai-completion-editor.tsx +29 -26
- package/src/components/editor/ai/completion-handlers.tsx +44 -6
- package/src/components/editor/ai/completion-utils.ts +92 -0
- package/src/components/editor/ai/transport/chat-transport.tsx +39 -0
- package/src/components/editor/cell/CellStatus.tsx +23 -20
- package/src/components/editor/cell/CreateCellButton.tsx +3 -4
- package/src/components/editor/cell/StagedAICell.tsx +51 -0
- package/src/components/editor/cell/cell-actions.tsx +2 -1
- package/src/components/editor/cell/code/language-toggle.tsx +3 -4
- package/src/components/editor/chrome/wrapper/footer-items/machine-stats.tsx +39 -28
- package/src/components/editor/controls/notebook-menu-dropdown.tsx +4 -2
- package/src/components/editor/file-tree/requesting-tree.tsx +14 -8
- package/src/components/editor/renderers/CellArray.tsx +3 -4
- package/src/components/editor/renderers/slides-layout/slides-layout.tsx +3 -3
- package/src/components/editor/renderers/slides-layout/types.ts +1 -0
- package/src/components/pages/home-page.tsx +4 -1
- package/src/components/slides/slides-component.tsx +1 -1
- package/src/components/slides/slides.css +6 -0
- package/src/components/terminal/__tests__/state.test.ts +207 -0
- package/src/components/terminal/hooks.ts +41 -0
- package/src/components/terminal/state.ts +75 -0
- package/src/components/terminal/terminal.tsx +334 -13
- package/src/components/terminal/theme.tsx +57 -0
- package/src/components/tracing/tracing-spec.ts +5 -4
- package/src/components/ui/range-slider.tsx +4 -2
- package/src/components/ui/slider.tsx +3 -1
- package/src/components/variables/variables-table.tsx +3 -0
- package/src/core/MarimoApp.tsx +9 -6
- package/src/core/ai/__tests__/staged-cells.test.ts +356 -0
- package/src/core/ai/context/__tests__/registry.test.ts +6 -4
- package/src/core/ai/context/providers/cell-output.ts +3 -2
- package/src/core/ai/context/providers/error.ts +3 -1
- package/src/core/ai/context/providers/file.ts +7 -2
- package/src/core/ai/context/providers/tables.ts +3 -2
- package/src/core/ai/context/providers/variable.ts +6 -4
- package/src/core/ai/staged-cells.ts +208 -0
- package/src/core/cells/cells.ts +1 -1
- package/src/core/cells/logs.ts +1 -1
- package/src/core/codemirror/find-replace/search-highlight.ts +3 -1
- package/src/core/codemirror/language/LanguageAdapters.ts +9 -3
- package/src/core/codemirror/lsp/federated-lsp.ts +1 -1
- package/src/core/codemirror/lsp/notebook-lsp.ts +8 -2
- package/src/core/codemirror/readonly/__tests__/extension.test.ts +1 -1
- package/src/core/codemirror/rtc/loro/awareness.ts +52 -17
- package/src/core/codemirror/rtc/loro/sync.ts +12 -4
- package/src/core/config/config-schema.ts +1 -0
- package/src/core/config/config.ts +4 -0
- package/src/core/hotkeys/hotkeys.ts +8 -4
- package/src/core/i18n/__tests__/locale-provider.test.tsx +176 -0
- package/src/core/i18n/locale-provider.tsx +35 -0
- package/src/core/i18n/with-locale.tsx +12 -0
- package/src/core/islands/components/web-components.tsx +13 -10
- package/src/core/islands/main.ts +2 -2
- package/src/core/kernel/RuntimeState.ts +4 -1
- package/src/core/kernel/messages.ts +8 -12
- package/src/core/network/DeferredRequestRegistry.ts +16 -4
- package/src/core/runtime/runtime.ts +5 -4
- package/src/core/saving/__tests__/filename.test.ts +37 -0
- package/src/core/static/__tests__/download-html.test.ts +43 -1
- package/src/core/wasm/bridge.ts +5 -1
- package/src/core/wasm/store.ts +4 -1
- package/src/core/wasm/worker/message-buffer.ts +3 -2
- package/src/core/websocket/types.ts +22 -16
- package/src/core/websocket/useMarimoWebSocket.tsx +2 -2
- package/src/css/app/Cell.css +11 -0
- package/src/hooks/useFormatting.ts +97 -0
- package/src/hooks/useTimer.ts +8 -5
- package/src/plugins/core/RenderHTML.tsx +36 -2
- package/src/plugins/core/__test__/RenderHTML.test.ts +72 -0
- package/src/plugins/core/registerReactComponent.tsx +44 -10
- package/src/plugins/impl/DataTablePlugin.tsx +4 -0
- package/src/plugins/impl/FileBrowserPlugin.tsx +8 -2
- package/src/plugins/impl/RangeSliderPlugin.tsx +5 -3
- package/src/plugins/impl/SliderPlugin.tsx +3 -1
- package/src/plugins/impl/anywidget/model.ts +16 -5
- package/src/plugins/impl/data-editor/types.ts +7 -5
- package/src/plugins/impl/data-explorer/components/column-summary.tsx +20 -13
- package/src/plugins/impl/panel/utils.ts +6 -4
- package/src/plugins/layout/OutlinePlugin.tsx +69 -0
- package/src/plugins/layout/StatPlugin.tsx +4 -1
- package/src/plugins/plugins.ts +2 -0
- package/src/stories/cell.stories.tsx +1 -1
- package/src/stories/layout/vertical/one-column.stories.tsx +1 -1
- package/src/utils/__tests__/cell-urls.test.ts +29 -0
- package/src/utils/__tests__/dates.test.ts +45 -24
- package/src/utils/__tests__/filenames.test.ts +18 -0
- package/src/utils/__tests__/numbers.test.ts +42 -30
- package/src/utils/__tests__/once.test.ts +187 -0
- package/src/utils/__tests__/path.test.ts +38 -0
- package/src/utils/__tests__/urls.test.ts +56 -1
- package/src/utils/dates.ts +15 -10
- package/src/utils/edit-distance.ts +8 -6
- package/src/utils/errors.ts +9 -0
- package/src/utils/id-tree.tsx +21 -10
- package/src/utils/localStorage.ts +13 -4
- package/src/utils/numbers.ts +11 -11
- package/src/utils/once.ts +32 -0
- package/src/utils/paths.ts +4 -1
- package/src/utils/pluralize.ts +12 -5
- package/src/utils/python-poet/poet.ts +30 -15
- package/src/utils/time.ts +5 -1
- package/dist/assets/ConnectedDataExplorerComponent-Cn5-l2X1.js +0 -19
- package/dist/assets/_baseEach-C1FLm7WW.js +0 -1
- package/dist/assets/_baseMap-DBVArUYD.js +0 -1
- package/dist/assets/_baseUniq-Dk7ZPJ3N.js +0 -1
- package/dist/assets/_createAggregator-Bn38fDd3.js +0 -1
- package/dist/assets/agent-panel-COUYnuIK.js +0 -475
- package/dist/assets/architectureDiagram-W76B3OCA-DBzWQKKu.js +0 -36
- package/dist/assets/channel-CjhbjOv4.js +0 -1
- package/dist/assets/chat-panel-BPXKoTnZ.js +0 -7
- package/dist/assets/chat-panel-Brrs_eeH.css +0 -1
- package/dist/assets/classDiagram-KNZD7YFC-DHs5cFzy.js +0 -1
- package/dist/assets/classDiagram-v2-RKCZMP56-DHs5cFzy.js +0 -1
- package/dist/assets/clone-DM1YNjEn.js +0 -1
- package/dist/assets/command-palette-S0bzQp7v.js +0 -1
- package/dist/assets/common-B8U9k2Ly.js +0 -1
- package/dist/assets/cose-bilkent-S5V4N54A-wz1Sfx7j.js +0 -1
- package/dist/assets/dagre-5GWH7T2D-BfpcVBgq.js +0 -4
- package/dist/assets/datasources-panel-DfuURLJw.js +0 -1
- package/dist/assets/diagram-N5W7TBWH-Bf0oqqQh.js +0 -24
- package/dist/assets/diagram-QEK2KX5R-ZTc3qikh.js +0 -43
- package/dist/assets/diagram-S2PKOQOG-tLScBy7Z.js +0 -24
- package/dist/assets/edit-page-DJ8kJZ9w.js +0 -129
- package/dist/assets/file-explorer-panel-CzNUJ63G.js +0 -1
- package/dist/assets/gitGraphDiagram-NY62KEGX-C1t6QtVa.js +0 -65
- package/dist/assets/graph-CssCVWIq.js +0 -1
- package/dist/assets/home-page-9eW6qida.js +0 -9
- package/dist/assets/index-CknhX2Vy.css +0 -1
- package/dist/assets/index-DcCIe7np.js +0 -28
- package/dist/assets/index-OC46250R.js +0 -570
- package/dist/assets/infoDiagram-STP46IZ2-CwiAoz9f.js +0 -2
- package/dist/assets/layout-DpQrxGW-.js +0 -1
- package/dist/assets/linear-NsreOeBF.js +0 -1
- package/dist/assets/links-CbvGxbsJ.js +0 -7
- package/dist/assets/mermaid-DSt0r6IQ.js +0 -1
- package/dist/assets/min-D259kI3t.js +0 -1
- package/dist/assets/outline-panel-uvsS-YEQ.js +0 -1
- package/dist/assets/packages-panel-xMz9W2hW.js +0 -1
- package/dist/assets/run-page-Bb68qdhQ.js +0 -1
- package/dist/assets/sankeyDiagram-GR3RE2ED-BSJOau8E.js +0 -10
- package/dist/assets/scratchpad-panel-BF4BO-U4.js +0 -1
- package/dist/assets/secrets-panel-CdIX44dQ.js +0 -1
- package/dist/assets/snippets-panel-Dco9h0rb.js +0 -1
- package/dist/assets/sortBy-aLGA-PGK.js +0 -1
- package/dist/assets/stateDiagram-KXAO66HF-Bd68WT3b.js +0 -1
- package/dist/assets/stateDiagram-v2-UMBNRL4Z-BXz_GSwb.js +0 -1
- package/dist/assets/storage-CGlP4lCF.js +0 -26
- package/dist/assets/terminal-CxkHubcu.js +0 -9
- package/dist/assets/time-D2nr1UgQ.js +0 -1
- package/dist/assets/tracing-kTqHxa7q.js +0 -2
- package/dist/assets/variable-panel-noTnH-AQ.js +0 -1
- package/dist/assets/worker-X5rxzQGQ.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as X,l as H}from"./mermaid.core-BFFCqfOn.js";import{c as V}from"./cytoscape.esm-UcEO6FGL.js";import{ai as ht}from"./index-PmY0x4Zd.js";import{s as lt}from"./transform-D9VCJYws.js";import"./step-BwsUM5iJ.js";import"./isEmpty-D1t7Gran.js";import"./timer-Bqd5yn_a.js";var j,q={exports:{}},z={exports:{}},Z={exports:{}};function gt(){return j?Z.exports:(j=1,R=function(){return(function(m){var _={};function u(e){if(_[e])return _[e].exports;var t=_[e]={i:e,l:!1,exports:{}};return m[e].call(t.exports,t,t.exports,u),t.l=!0,t.exports}return u.m=m,u.c=_,u.i=function(e){return e},u.d=function(e,t,o){u.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:o})},u.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return u.d(t,"a",t),t},u.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},u.p="",u(u.s=26)})([function(m,_,u){function e(){}e.QUALITY=1,e.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,e.DEFAULT_INCREMENTAL=!1,e.DEFAULT_ANIMATION_ON_LAYOUT=!0,e.DEFAULT_ANIMATION_DURING_LAYOUT=!1,e.DEFAULT_ANIMATION_PERIOD=50,e.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,e.DEFAULT_GRAPH_MARGIN=15,e.NODE_DIMENSIONS_INCLUDE_LABELS=!1,e.SIMPLE_NODE_SIZE=40,e.SIMPLE_NODE_HALF_SIZE=e.SIMPLE_NODE_SIZE/2,e.EMPTY_COMPOUND_NODE_SIZE=40,e.MIN_EDGE_LENGTH=1,e.WORLD_BOUNDARY=1e6,e.INITIAL_WORLD_BOUNDARY=e.WORLD_BOUNDARY/1e3,e.WORLD_CENTER_X=1200,e.WORLD_CENTER_Y=900,m.exports=e},function(m,_,u){var e=u(2),t=u(8),o=u(9);function r(i,h,a){e.call(this,a),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=a,this.bendpoints=[],this.source=i,this.target=h}for(var n in r.prototype=Object.create(e.prototype),e)r[n]=e[n];r.prototype.getSource=function(){return this.source},r.prototype.getTarget=function(){return this.target},r.prototype.isInterGraph=function(){return this.isInterGraph},r.prototype.getLength=function(){return this.length},r.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},r.prototype.getBendpoints=function(){return this.bendpoints},r.prototype.getLca=function(){return this.lca},r.prototype.getSourceInLca=function(){return this.sourceInLca},r.prototype.getTargetInLca=function(){return this.targetInLca},r.prototype.getOtherEnd=function(i){if(this.source===i)return this.target;if(this.target===i)return this.source;throw"Node is not incident with this edge"},r.prototype.getOtherEndInGraph=function(i,h){for(var a=this.getOtherEnd(i),g=h.getGraphManager().getRoot();;){if(a.getOwner()==h)return a;if(a.getOwner()==g)break;a=a.getOwner().getParent()}return null},r.prototype.updateLength=function(){var i=new Array(4);this.isOverlapingSourceAndTarget=t.getIntersection(this.target.getRect(),this.source.getRect(),i),this.isOverlapingSourceAndTarget||(this.lengthX=i[0]-i[2],this.lengthY=i[1]-i[3],Math.abs(this.lengthX)<1&&(this.lengthX=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},r.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},m.exports=r},function(m,_,u){m.exports=function(e){this.vGraphObject=e}},function(m,_,u){var e=u(2),t=u(10),o=u(13),r=u(0),n=u(16),i=u(4);function h(g,p,l,f){l==null&&f==null&&(f=p),e.call(this,f),g.graphManager!=null&&(g=g.graphManager),this.estimatedSize=t.MIN_VALUE,this.inclusionTreeDepth=t.MAX_VALUE,this.vGraphObject=f,this.edges=[],this.graphManager=g,this.rect=l!=null&&p!=null?new o(p.x,p.y,l.width,l.height):new o}for(var a in h.prototype=Object.create(e.prototype),e)h[a]=e[a];h.prototype.getEdges=function(){return this.edges},h.prototype.getChild=function(){return this.child},h.prototype.getOwner=function(){return this.owner},h.prototype.getWidth=function(){return this.rect.width},h.prototype.setWidth=function(g){this.rect.width=g},h.prototype.getHeight=function(){return this.rect.height},h.prototype.setHeight=function(g){this.rect.height=g},h.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},h.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},h.prototype.getCenter=function(){return new i(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},h.prototype.getLocation=function(){return new i(this.rect.x,this.rect.y)},h.prototype.getRect=function(){return this.rect},h.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},h.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},h.prototype.setRect=function(g,p){this.rect.x=g.x,this.rect.y=g.y,this.rect.width=p.width,this.rect.height=p.height},h.prototype.setCenter=function(g,p){this.rect.x=g-this.rect.width/2,this.rect.y=p-this.rect.height/2},h.prototype.setLocation=function(g,p){this.rect.x=g,this.rect.y=p},h.prototype.moveBy=function(g,p){this.rect.x+=g,this.rect.y+=p},h.prototype.getEdgeListToNode=function(g){var p=[],l=this;return l.edges.forEach(function(f){if(f.target==g){if(f.source!=l)throw"Incorrect edge source!";p.push(f)}}),p},h.prototype.getEdgesBetween=function(g){var p=[],l=this;return l.edges.forEach(function(f){if(f.source!=l&&f.target!=l)throw"Incorrect edge source and/or target";f.target!=g&&f.source!=g||p.push(f)}),p},h.prototype.getNeighborsList=function(){var g=new Set,p=this;return p.edges.forEach(function(l){if(l.source==p)g.add(l.target);else{if(l.target!=p)throw"Incorrect incidency!";g.add(l.source)}}),g},h.prototype.withChildren=function(){var g=new Set;if(g.add(this),this.child!=null)for(var p=this.child.getNodes(),l=0;l<p.length;l++)p[l].withChildren().forEach(function(f){g.add(f)});return g},h.prototype.getNoOfChildren=function(){var g=0;if(this.child==null)g=1;else for(var p=this.child.getNodes(),l=0;l<p.length;l++)g+=p[l].getNoOfChildren();return g==0&&(g=1),g},h.prototype.getEstimatedSize=function(){if(this.estimatedSize==t.MIN_VALUE)throw"assert failed";return this.estimatedSize},h.prototype.calcEstimatedSize=function(){return this.child==null?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},h.prototype.scatter=function(){var g,p,l=-r.INITIAL_WORLD_BOUNDARY,f=r.INITIAL_WORLD_BOUNDARY;g=r.WORLD_CENTER_X+n.nextDouble()*(f-l)+l;var A=-r.INITIAL_WORLD_BOUNDARY,T=r.INITIAL_WORLD_BOUNDARY;p=r.WORLD_CENTER_Y+n.nextDouble()*(T-A)+A,this.rect.x=g,this.rect.y=p},h.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var g=this.getChild();if(g.updateBounds(!0),this.rect.x=g.getLeft(),this.rect.y=g.getTop(),this.setWidth(g.getRight()-g.getLeft()),this.setHeight(g.getBottom()-g.getTop()),r.NODE_DIMENSIONS_INCLUDE_LABELS){var p=g.getRight()-g.getLeft(),l=g.getBottom()-g.getTop();this.labelWidth>p&&(this.rect.x-=(this.labelWidth-p)/2,this.setWidth(this.labelWidth)),this.labelHeight>l&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-l)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-l),this.setHeight(this.labelHeight))}}},h.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==t.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},h.prototype.transform=function(g){var p=this.rect.x;p>r.WORLD_BOUNDARY?p=r.WORLD_BOUNDARY:p<-r.WORLD_BOUNDARY&&(p=-r.WORLD_BOUNDARY);var l=this.rect.y;l>r.WORLD_BOUNDARY?l=r.WORLD_BOUNDARY:l<-r.WORLD_BOUNDARY&&(l=-r.WORLD_BOUNDARY);var f=new i(p,l),A=g.inverseTransformPoint(f);this.setLocation(A.x,A.y)},h.prototype.getLeft=function(){return this.rect.x},h.prototype.getRight=function(){return this.rect.x+this.rect.width},h.prototype.getTop=function(){return this.rect.y},h.prototype.getBottom=function(){return this.rect.y+this.rect.height},h.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},m.exports=h},function(m,_,u){function e(t,o){t==null&&o==null?(this.x=0,this.y=0):(this.x=t,this.y=o)}e.prototype.getX=function(){return this.x},e.prototype.getY=function(){return this.y},e.prototype.setX=function(t){this.x=t},e.prototype.setY=function(t){this.y=t},e.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},e.prototype.getCopy=function(){return new e(this.x,this.y)},e.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},m.exports=e},function(m,_,u){var e=u(2),t=u(10),o=u(0),r=u(6),n=u(3),i=u(1),h=u(13),a=u(12),g=u(11);function p(f,A,T){e.call(this,T),this.estimatedSize=t.MIN_VALUE,this.margin=o.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=f,A!=null&&A instanceof r?this.graphManager=A:A!=null&&A instanceof Layout&&(this.graphManager=A.graphManager)}for(var l in p.prototype=Object.create(e.prototype),e)p[l]=e[l];p.prototype.getNodes=function(){return this.nodes},p.prototype.getEdges=function(){return this.edges},p.prototype.getGraphManager=function(){return this.graphManager},p.prototype.getParent=function(){return this.parent},p.prototype.getLeft=function(){return this.left},p.prototype.getRight=function(){return this.right},p.prototype.getTop=function(){return this.top},p.prototype.getBottom=function(){return this.bottom},p.prototype.isConnected=function(){return this.isConnected},p.prototype.add=function(f,A,T){if(A==null&&T==null){var v=f;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(v)>-1)throw"Node already in graph!";return v.owner=this,this.getNodes().push(v),v}var y=f;if(!(this.getNodes().indexOf(A)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(A.owner!=T.owner||A.owner!=this)throw"Both owners must be this graph!";return A.owner!=T.owner?null:(y.source=A,y.target=T,y.isInterGraph=!1,this.getEdges().push(y),A.edges.push(y),T!=A&&T.edges.push(y),y)},p.prototype.remove=function(f){var A=f;if(f instanceof n){if(A==null)throw"Node is null!";if(A.owner==null||A.owner!=this)throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=A.edges.slice(),v=T.length,y=0;y<v;y++)(N=T[y]).isInterGraph?this.graphManager.remove(N):N.source.owner.remove(N);if((s=this.nodes.indexOf(A))==-1)throw"Node not in owner node list!";this.nodes.splice(s,1)}else if(f instanceof i){var N;if((N=f)==null)throw"Edge is null!";if(N.source==null||N.target==null)throw"Source and/or target is null!";if(N.source.owner==null||N.target.owner==null||N.source.owner!=this||N.target.owner!=this)throw"Source and/or target owner is invalid!";var s,d=N.source.edges.indexOf(N),c=N.target.edges.indexOf(N);if(!(d>-1&&c>-1))throw"Source and/or target doesn't know this edge!";if(N.source.edges.splice(d,1),N.target!=N.source&&N.target.edges.splice(c,1),(s=N.source.owner.getEdges().indexOf(N))==-1)throw"Not in owner's edge list!";N.source.owner.getEdges().splice(s,1)}},p.prototype.updateLeftTop=function(){for(var f,A,T,v=t.MAX_VALUE,y=t.MAX_VALUE,N=this.getNodes(),s=N.length,d=0;d<s;d++){var c=N[d];v>(f=c.getTop())&&(v=f),y>(A=c.getLeft())&&(y=A)}return v==t.MAX_VALUE?null:(T=N[0].getParent().paddingLeft!=null?N[0].getParent().paddingLeft:this.margin,this.left=y-T,this.top=v-T,new a(this.left,this.top))},p.prototype.updateBounds=function(f){for(var A,T,v,y,N,s=t.MAX_VALUE,d=-t.MAX_VALUE,c=t.MAX_VALUE,E=-t.MAX_VALUE,L=this.nodes,O=L.length,I=0;I<O;I++){var w=L[I];f&&w.child!=null&&w.updateBounds(),s>(A=w.getLeft())&&(s=A),d<(T=w.getRight())&&(d=T),c>(v=w.getTop())&&(c=v),E<(y=w.getBottom())&&(E=y)}var D=new h(s,c,d-s,E-c);s==t.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),N=L[0].getParent().paddingLeft!=null?L[0].getParent().paddingLeft:this.margin,this.left=D.x-N,this.right=D.x+D.width+N,this.top=D.y-N,this.bottom=D.y+D.height+N},p.calculateBounds=function(f){for(var A,T,v,y,N=t.MAX_VALUE,s=-t.MAX_VALUE,d=t.MAX_VALUE,c=-t.MAX_VALUE,E=f.length,L=0;L<E;L++){var O=f[L];N>(A=O.getLeft())&&(N=A),s<(T=O.getRight())&&(s=T),d>(v=O.getTop())&&(d=v),c<(y=O.getBottom())&&(c=y)}return new h(N,d,s-N,c-d)},p.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},p.prototype.getEstimatedSize=function(){if(this.estimatedSize==t.MIN_VALUE)throw"assert failed";return this.estimatedSize},p.prototype.calcEstimatedSize=function(){for(var f=0,A=this.nodes,T=A.length,v=0;v<T;v++)f+=A[v].calcEstimatedSize();return this.estimatedSize=f==0?o.EMPTY_COMPOUND_NODE_SIZE:f/Math.sqrt(this.nodes.length),this.estimatedSize},p.prototype.updateConnected=function(){var f=this;if(this.nodes.length!=0){var A,T,v=new g,y=new Set,N=this.nodes[0];for(N.withChildren().forEach(function(E){v.push(E),y.add(E)});v.length!==0;)for(var s=(A=(N=v.shift()).getEdges()).length,d=0;d<s;d++)(T=A[d].getOtherEndInGraph(N,this))==null||y.has(T)||T.withChildren().forEach(function(E){v.push(E),y.add(E)});if(this.isConnected=!1,y.size>=this.nodes.length){var c=0;y.forEach(function(E){E.owner==f&&c++}),c==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},m.exports=p},function(m,_,u){var e,t=u(1);function o(r){e=u(5),this.layout=r,this.graphs=[],this.edges=[]}o.prototype.addRoot=function(){var r=this.layout.newGraph(),n=this.layout.newNode(null),i=this.add(r,n);return this.setRootGraph(i),this.rootGraph},o.prototype.add=function(r,n,i,h,a){if(i==null&&h==null&&a==null){if(r==null)throw"Graph is null!";if(n==null)throw"Parent node is null!";if(this.graphs.indexOf(r)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(r),r.parent!=null)throw"Already has a parent!";if(n.child!=null)throw"Already has a child!";return r.parent=n,n.child=r,r}a=i,i=r;var g=(h=n).getOwner(),p=a.getOwner();if(g==null||g.getGraphManager()!=this)throw"Source not in this graph mgr!";if(p==null||p.getGraphManager()!=this)throw"Target not in this graph mgr!";if(g==p)return i.isInterGraph=!1,g.add(i,h,a);if(i.isInterGraph=!0,i.source=h,i.target=a,this.edges.indexOf(i)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(i),i.source==null||i.target==null)throw"Edge source and/or target is null!";if(i.source.edges.indexOf(i)!=-1||i.target.edges.indexOf(i)!=-1)throw"Edge already in source and/or target incidency list!";return i.source.edges.push(i),i.target.edges.push(i),i},o.prototype.remove=function(r){if(r instanceof e){var n=r;if(n.getGraphManager()!=this)throw"Graph not in this graph mgr";if(n!=this.rootGraph&&(n.parent==null||n.parent.graphManager!=this))throw"Invalid parent node!";for(var i,h=[],a=(h=h.concat(n.getEdges())).length,g=0;g<a;g++)i=h[g],n.remove(i);var p,l=[];for(a=(l=l.concat(n.getNodes())).length,g=0;g<a;g++)p=l[g],n.remove(p);n==this.rootGraph&&this.setRootGraph(null);var f=this.graphs.indexOf(n);this.graphs.splice(f,1),n.parent=null}else if(r instanceof t){if((i=r)==null)throw"Edge is null!";if(!i.isInterGraph)throw"Not an inter-graph edge!";if(i.source==null||i.target==null)throw"Source and/or target is null!";if(i.source.edges.indexOf(i)==-1||i.target.edges.indexOf(i)==-1)throw"Source and/or target doesn't know this edge!";if(f=i.source.edges.indexOf(i),i.source.edges.splice(f,1),f=i.target.edges.indexOf(i),i.target.edges.splice(f,1),i.source.owner==null||i.source.owner.getGraphManager()==null)throw"Edge owner graph or owner graph manager is null!";if(i.source.owner.getGraphManager().edges.indexOf(i)==-1)throw"Not in owner graph manager's edge list!";f=i.source.owner.getGraphManager().edges.indexOf(i),i.source.owner.getGraphManager().edges.splice(f,1)}},o.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},o.prototype.getGraphs=function(){return this.graphs},o.prototype.getAllNodes=function(){if(this.allNodes==null){for(var r=[],n=this.getGraphs(),i=n.length,h=0;h<i;h++)r=r.concat(n[h].getNodes());this.allNodes=r}return this.allNodes},o.prototype.resetAllNodes=function(){this.allNodes=null},o.prototype.resetAllEdges=function(){this.allEdges=null},o.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},o.prototype.getAllEdges=function(){if(this.allEdges==null){var r=[],n=this.getGraphs();n.length;for(var i=0;i<n.length;i++)r=r.concat(n[i].getEdges());r=r.concat(this.edges),this.allEdges=r}return this.allEdges},o.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},o.prototype.setAllNodesToApplyGravitation=function(r){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=r},o.prototype.getRoot=function(){return this.rootGraph},o.prototype.setRootGraph=function(r){if(r.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=r,r.parent==null&&(r.parent=this.layout.newNode("Root node"))},o.prototype.getLayout=function(){return this.layout},o.prototype.isOneAncestorOfOther=function(r,n){if(r==null||n==null)throw"assert failed";if(r==n)return!0;for(var i,h=r.getOwner();(i=h.getParent())!=null;){if(i==n)return!0;if((h=i.getOwner())==null)break}for(h=n.getOwner();(i=h.getParent())!=null;){if(i==r)return!0;if((h=i.getOwner())==null)break}return!1},o.prototype.calcLowestCommonAncestors=function(){for(var r,n,i,h,a,g=this.getAllEdges(),p=g.length,l=0;l<p;l++)if(n=(r=g[l]).source,i=r.target,r.lca=null,r.sourceInLca=n,r.targetInLca=i,n!=i){for(h=n.getOwner();r.lca==null;){for(r.targetInLca=i,a=i.getOwner();r.lca==null;){if(a==h){r.lca=a;break}if(a==this.rootGraph)break;if(r.lca!=null)throw"assert failed";r.targetInLca=a.getParent(),a=r.targetInLca.getOwner()}if(h==this.rootGraph)break;r.lca==null&&(r.sourceInLca=h.getParent(),h=r.sourceInLca.getOwner())}if(r.lca==null)throw"assert failed"}else r.lca=n.getOwner()},o.prototype.calcLowestCommonAncestor=function(r,n){if(r==n)return r.getOwner();for(var i=r.getOwner();i!=null;){for(var h=n.getOwner();h!=null;){if(h==i)return h;h=h.getParent().getOwner()}i=i.getParent().getOwner()}return i},o.prototype.calcInclusionTreeDepths=function(r,n){var i;r==null&&n==null&&(r=this.rootGraph,n=1);for(var h=r.getNodes(),a=h.length,g=0;g<a;g++)(i=h[g]).inclusionTreeDepth=n,i.child!=null&&this.calcInclusionTreeDepths(i.child,n+1)},o.prototype.includesInvalidEdge=function(){for(var r,n=this.edges.length,i=0;i<n;i++)if(r=this.edges[i],this.isOneAncestorOfOther(r.source,r.target))return!0;return!1},m.exports=o},function(m,_,u){var e=u(0);function t(){}for(var o in e)t[o]=e[o];t.MAX_ITERATIONS=2500,t.DEFAULT_EDGE_LENGTH=50,t.DEFAULT_SPRING_STRENGTH=.45,t.DEFAULT_REPULSION_STRENGTH=4500,t.DEFAULT_GRAVITY_STRENGTH=.4,t.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,t.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,t.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,t.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,t.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,t.COOLING_ADAPTATION_FACTOR=.33,t.ADAPTATION_LOWER_NODE_LIMIT=1e3,t.ADAPTATION_UPPER_NODE_LIMIT=5e3,t.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,t.MAX_NODE_DISPLACEMENT=3*t.MAX_NODE_DISPLACEMENT_INCREMENTAL,t.MIN_REPULSION_DIST=t.DEFAULT_EDGE_LENGTH/10,t.CONVERGENCE_CHECK_PERIOD=100,t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,t.MIN_EDGE_LENGTH=1,t.GRID_CALCULATION_CHECK_PERIOD=10,m.exports=t},function(m,_,u){var e=u(12);function t(){}t.calcSeparationAmount=function(o,r,n,i){if(!o.intersects(r))throw"assert failed";var h=new Array(2);this.decideDirectionsForOverlappingNodes(o,r,h),n[0]=Math.min(o.getRight(),r.getRight())-Math.max(o.x,r.x),n[1]=Math.min(o.getBottom(),r.getBottom())-Math.max(o.y,r.y),o.getX()<=r.getX()&&o.getRight()>=r.getRight()?n[0]+=Math.min(r.getX()-o.getX(),o.getRight()-r.getRight()):r.getX()<=o.getX()&&r.getRight()>=o.getRight()&&(n[0]+=Math.min(o.getX()-r.getX(),r.getRight()-o.getRight())),o.getY()<=r.getY()&&o.getBottom()>=r.getBottom()?n[1]+=Math.min(r.getY()-o.getY(),o.getBottom()-r.getBottom()):r.getY()<=o.getY()&&r.getBottom()>=o.getBottom()&&(n[1]+=Math.min(o.getY()-r.getY(),r.getBottom()-o.getBottom()));var a=Math.abs((r.getCenterY()-o.getCenterY())/(r.getCenterX()-o.getCenterX()));r.getCenterY()===o.getCenterY()&&r.getCenterX()===o.getCenterX()&&(a=1);var g=a*n[0],p=n[1]/a;n[0]<p?p=n[0]:g=n[1],n[0]=-1*h[0]*(p/2+i),n[1]=-1*h[1]*(g/2+i)},t.decideDirectionsForOverlappingNodes=function(o,r,n){o.getCenterX()<r.getCenterX()?n[0]=-1:n[0]=1,o.getCenterY()<r.getCenterY()?n[1]=-1:n[1]=1},t.getIntersection2=function(o,r,n){var i=o.getCenterX(),h=o.getCenterY(),a=r.getCenterX(),g=r.getCenterY();if(o.intersects(r))return n[0]=i,n[1]=h,n[2]=a,n[3]=g,!0;var p=o.getX(),l=o.getY(),f=o.getRight(),A=o.getX(),T=o.getBottom(),v=o.getRight(),y=o.getWidthHalf(),N=o.getHeightHalf(),s=r.getX(),d=r.getY(),c=r.getRight(),E=r.getX(),L=r.getBottom(),O=r.getRight(),I=r.getWidthHalf(),w=r.getHeightHalf(),D=!1,C=!1;if(i===a){if(h>g)return n[0]=i,n[1]=l,n[2]=a,n[3]=L,!1;if(h<g)return n[0]=i,n[1]=T,n[2]=a,n[3]=d,!1}else if(h===g){if(i>a)return n[0]=p,n[1]=h,n[2]=c,n[3]=g,!1;if(i<a)return n[0]=f,n[1]=h,n[2]=s,n[3]=g,!1}else{var M=o.height/o.width,F=r.height/r.width,G=(g-h)/(a-i),x=void 0,P=void 0,S=void 0,b=void 0,U=void 0,Y=void 0;if(-M===G?i>a?(n[0]=A,n[1]=T,D=!0):(n[0]=f,n[1]=l,D=!0):M===G&&(i>a?(n[0]=p,n[1]=l,D=!0):(n[0]=v,n[1]=T,D=!0)),-F===G?a>i?(n[2]=E,n[3]=L,C=!0):(n[2]=c,n[3]=d,C=!0):F===G&&(a>i?(n[2]=s,n[3]=d,C=!0):(n[2]=O,n[3]=L,C=!0)),D&&C)return!1;if(i>a?h>g?(x=this.getCardinalDirection(M,G,4),P=this.getCardinalDirection(F,G,2)):(x=this.getCardinalDirection(-M,G,3),P=this.getCardinalDirection(-F,G,1)):h>g?(x=this.getCardinalDirection(-M,G,1),P=this.getCardinalDirection(-F,G,3)):(x=this.getCardinalDirection(M,G,2),P=this.getCardinalDirection(F,G,4)),!D)switch(x){case 1:b=l,S=i+-N/G,n[0]=S,n[1]=b;break;case 2:S=v,b=h+y*G,n[0]=S,n[1]=b;break;case 3:b=T,S=i+N/G,n[0]=S,n[1]=b;break;case 4:S=A,b=h+-y*G,n[0]=S,n[1]=b}if(!C)switch(P){case 1:Y=d,U=a+-w/G,n[2]=U,n[3]=Y;break;case 2:U=O,Y=g+I*G,n[2]=U,n[3]=Y;break;case 3:Y=L,U=a+w/G,n[2]=U,n[3]=Y;break;case 4:U=E,Y=g+-I*G,n[2]=U,n[3]=Y}}return!1},t.getCardinalDirection=function(o,r,n){return o>r?n:1+n%4},t.getIntersection=function(o,r,n,i){if(i==null)return this.getIntersection2(o,r,n);var h,a,g,p,l,f,A,T=o.x,v=o.y,y=r.x,N=r.y,s=n.x,d=n.y,c=i.x,E=i.y;return(A=(h=N-v)*(p=s-c)-(a=E-d)*(g=T-y))===0?null:new e((g*(f=c*d-s*E)-p*(l=y*v-T*N))/A,(a*l-h*f)/A)},t.angleOfVector=function(o,r,n,i){var h=void 0;return o!==n?(h=Math.atan((i-r)/(n-o)),n<o?h+=Math.PI:i<r&&(h+=this.TWO_PI)):h=i<r?this.ONE_AND_HALF_PI:this.HALF_PI,h},t.doIntersect=function(o,r,n,i){var h=o.x,a=o.y,g=r.x,p=r.y,l=n.x,f=n.y,A=i.x,T=i.y,v=(g-h)*(T-f)-(A-l)*(p-a);if(v===0)return!1;var y=((T-f)*(A-h)+(l-A)*(T-a))/v,N=((a-p)*(A-h)+(g-h)*(T-a))/v;return 0<y&&y<1&&0<N&&N<1},t.HALF_PI=.5*Math.PI,t.ONE_AND_HALF_PI=1.5*Math.PI,t.TWO_PI=2*Math.PI,t.THREE_PI=3*Math.PI,m.exports=t},function(m,_,u){function e(){}e.sign=function(t){return t>0?1:t<0?-1:0},e.floor=function(t){return t<0?Math.ceil(t):Math.floor(t)},e.ceil=function(t){return t<0?Math.floor(t):Math.ceil(t)},m.exports=e},function(m,_,u){function e(){}e.MAX_VALUE=2147483647,e.MIN_VALUE=-2147483648,m.exports=e},function(m,_,u){var e=(function(){function i(h,a){for(var g=0;g<a.length;g++){var p=a[g];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(h,p.key,p)}}return function(h,a,g){return a&&i(h.prototype,a),g&&i(h,g),h}})(),t=function(i){return{value:i,next:null,prev:null}},o=function(i,h,a,g){return i!==null?i.next=h:g.head=h,a!==null?a.prev=h:g.tail=h,h.prev=i,h.next=a,g.length++,h},r=function(i,h){var a=i.prev,g=i.next;return a!==null?a.next=g:h.head=g,g!==null?g.prev=a:h.tail=a,i.prev=i.next=null,h.length--,i},n=(function(){function i(h){var a=this;(function(g,p){if(!(g instanceof p))throw new TypeError("Cannot call a class as a function")})(this,i),this.length=0,this.head=null,this.tail=null,h!=null&&h.forEach(function(g){return a.push(g)})}return e(i,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(h,a){return o(a.prev,t(h),a,this)}},{key:"insertAfter",value:function(h,a){return o(a,t(h),a.next,this)}},{key:"insertNodeBefore",value:function(h,a){return o(a.prev,h,a,this)}},{key:"insertNodeAfter",value:function(h,a){return o(a,h,a.next,this)}},{key:"push",value:function(h){return o(this.tail,t(h),null,this)}},{key:"unshift",value:function(h){return o(null,t(h),this.head,this)}},{key:"remove",value:function(h){return r(h,this)}},{key:"pop",value:function(){return r(this.tail,this).value}},{key:"popNode",value:function(){return r(this.tail,this)}},{key:"shift",value:function(){return r(this.head,this).value}},{key:"shiftNode",value:function(){return r(this.head,this)}},{key:"get_object_at",value:function(h){if(h<=this.length()){for(var a=1,g=this.head;a<h;)g=g.next,a++;return g.value}}},{key:"set_object_at",value:function(h,a){if(h<=this.length()){for(var g=1,p=this.head;g<h;)p=p.next,g++;p.value=a}}}]),i})();m.exports=n},function(m,_,u){function e(t,o,r){this.x=null,this.y=null,t==null&&o==null&&r==null?(this.x=0,this.y=0):typeof t=="number"&&typeof o=="number"&&r==null?(this.x=t,this.y=o):t.constructor.name=="Point"&&o==null&&r==null&&(r=t,this.x=r.x,this.y=r.y)}e.prototype.getX=function(){return this.x},e.prototype.getY=function(){return this.y},e.prototype.getLocation=function(){return new e(this.x,this.y)},e.prototype.setLocation=function(t,o,r){t.constructor.name=="Point"&&o==null&&r==null?(r=t,this.setLocation(r.x,r.y)):typeof t=="number"&&typeof o=="number"&&r==null&&(parseInt(t)==t&&parseInt(o)==o?this.move(t,o):(this.x=Math.floor(t+.5),this.y=Math.floor(o+.5)))},e.prototype.move=function(t,o){this.x=t,this.y=o},e.prototype.translate=function(t,o){this.x+=t,this.y+=o},e.prototype.equals=function(t){if(t.constructor.name=="Point"){var o=t;return this.x==o.x&&this.y==o.y}return this==t},e.prototype.toString=function(){return new e().constructor.name+"[x="+this.x+",y="+this.y+"]"},m.exports=e},function(m,_,u){function e(t,o,r,n){this.x=0,this.y=0,this.width=0,this.height=0,t!=null&&o!=null&&r!=null&&n!=null&&(this.x=t,this.y=o,this.width=r,this.height=n)}e.prototype.getX=function(){return this.x},e.prototype.setX=function(t){this.x=t},e.prototype.getY=function(){return this.y},e.prototype.setY=function(t){this.y=t},e.prototype.getWidth=function(){return this.width},e.prototype.setWidth=function(t){this.width=t},e.prototype.getHeight=function(){return this.height},e.prototype.setHeight=function(t){this.height=t},e.prototype.getRight=function(){return this.x+this.width},e.prototype.getBottom=function(){return this.y+this.height},e.prototype.intersects=function(t){return!(this.getRight()<t.x||this.getBottom()<t.y||t.getRight()<this.x||t.getBottom()<this.y)},e.prototype.getCenterX=function(){return this.x+this.width/2},e.prototype.getMinX=function(){return this.getX()},e.prototype.getMaxX=function(){return this.getX()+this.width},e.prototype.getCenterY=function(){return this.y+this.height/2},e.prototype.getMinY=function(){return this.getY()},e.prototype.getMaxY=function(){return this.getY()+this.height},e.prototype.getWidthHalf=function(){return this.width/2},e.prototype.getHeightHalf=function(){return this.height/2},m.exports=e},function(m,_,u){var e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o};function t(){}t.lastID=0,t.createID=function(o){return t.isPrimitive(o)?o:(o.uniqueID!=null||(o.uniqueID=t.getString(),t.lastID++),o.uniqueID)},t.getString=function(o){return o==null&&(o=t.lastID),"Object#"+o},t.isPrimitive=function(o){var r=o===void 0?"undefined":e(o);return o==null||r!="object"&&r!="function"},m.exports=t},function(m,_,u){function e(l){if(Array.isArray(l)){for(var f=0,A=Array(l.length);f<l.length;f++)A[f]=l[f];return A}return Array.from(l)}var t=u(0),o=u(6),r=u(3),n=u(1),i=u(5),h=u(4),a=u(17),g=u(27);function p(l){g.call(this),this.layoutQuality=t.QUALITY,this.createBendsAsNeeded=t.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=t.DEFAULT_INCREMENTAL,this.animationOnLayout=t.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=t.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=t.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=t.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new o(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,l!=null&&(this.isRemoteUse=l)}p.RANDOM_SEED=1,p.prototype=Object.create(g.prototype),p.prototype.getGraphManager=function(){return this.graphManager},p.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},p.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},p.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},p.prototype.newGraphManager=function(){var l=new o(this);return this.graphManager=l,l},p.prototype.newGraph=function(l){return new i(null,this.graphManager,l)},p.prototype.newNode=function(l){return new r(this.graphManager,l)},p.prototype.newEdge=function(l){return new n(null,null,l)},p.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},p.prototype.runLayout=function(){var l;return this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters(),l=!this.checkLayoutSuccess()&&this.layout(),t.ANIMATE!=="during"&&(l&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,l)},p.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},p.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var l=this.graphManager.getAllEdges(),f=0;f<l.length;f++)l[f];var A=this.graphManager.getRoot().getNodes();for(f=0;f<A.length;f++)A[f];this.update(this.graphManager.getRoot())}},p.prototype.update=function(l){if(l==null)this.update2();else if(l instanceof r){var f=l;if(f.getChild()!=null)for(var A=f.getChild().getNodes(),T=0;T<A.length;T++)update(A[T]);f.vGraphObject!=null&&f.vGraphObject.update(f)}else if(l instanceof n){var v=l;v.vGraphObject!=null&&v.vGraphObject.update(v)}else if(l instanceof i){var y=l;y.vGraphObject!=null&&y.vGraphObject.update(y)}},p.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=t.QUALITY,this.animationDuringLayout=t.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=t.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=t.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=t.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=t.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=t.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},p.prototype.transform=function(l){if(l==null)this.transform(new h(0,0));else{var f=new a,A=this.graphManager.getRoot().updateLeftTop();if(A!=null){f.setWorldOrgX(l.x),f.setWorldOrgY(l.y),f.setDeviceOrgX(A.x),f.setDeviceOrgY(A.y);for(var T=this.getAllNodes(),v=0;v<T.length;v++)T[v].transform(f)}}},p.prototype.positionNodesRandomly=function(l){if(l==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var f,A,T=l.getNodes(),v=0;v<T.length;v++)(A=(f=T[v]).getChild())==null||A.getNodes().length==0?f.scatter():(this.positionNodesRandomly(A),f.updateBounds())},p.prototype.getFlatForest=function(){for(var l=[],f=!0,A=this.graphManager.getRoot().getNodes(),T=!0,v=0;v<A.length;v++)A[v].getChild()!=null&&(T=!1);if(!T)return l;var y=new Set,N=[],s=new Map,d=[];for(d=d.concat(A);d.length>0&&f;){for(N.push(d[0]);N.length>0&&f;){var c=N[0];N.splice(0,1),y.add(c);var E=c.getEdges();for(v=0;v<E.length;v++){var L=E[v].getOtherEnd(c);if(s.get(c)!=L){if(y.has(L)){f=!1;break}N.push(L),s.set(L,c)}}}if(f){var O=[].concat(e(y));for(l.push(O),v=0;v<O.length;v++){var I=O[v],w=d.indexOf(I);w>-1&&d.splice(w,1)}y=new Set,s=new Map}else l=[]}return l},p.prototype.createDummyNodesForBendpoints=function(l){for(var f=[],A=l.source,T=this.graphManager.calcLowestCommonAncestor(l.source,l.target),v=0;v<l.bendpoints.length;v++){var y=this.newNode(null);y.setRect(new Point(0,0),new Dimension(1,1)),T.add(y);var N=this.newEdge(null);this.graphManager.add(N,A,y),f.add(y),A=y}return N=this.newEdge(null),this.graphManager.add(N,A,l.target),this.edgeToDummyNodes.set(l,f),l.isInterGraph()?this.graphManager.remove(l):T.remove(l),f},p.prototype.createBendpointsFromDummyNodes=function(){var l=[];l=l.concat(this.graphManager.getAllEdges()),l=[].concat(e(this.edgeToDummyNodes.keys())).concat(l);for(var f=0;f<l.length;f++){var A=l[f];if(A.bendpoints.length>0){for(var T=this.edgeToDummyNodes.get(A),v=0;v<T.length;v++){var y=T[v],N=new h(y.getCenterX(),y.getCenterY()),s=A.bendpoints.get(v);s.x=N.x,s.y=N.y,y.getOwner().remove(y)}this.graphManager.add(A,A.source,A.target)}}},p.transform=function(l,f,A,T){if(A!=null&&T!=null){var v=f;return l<=50?v-=(f-f/A)/50*(50-l):v+=(f*T-f)/50*(l-50),v}var y,N;return l<=50?(y=9*f/500,N=f/10):(y=9*f/50,N=-8*f),y*l+N},p.findCenterOfTree=function(l){var f=[];f=f.concat(l);var A=[],T=new Map,v=!1,y=null;f.length!=1&&f.length!=2||(v=!0,y=f[0]);for(var N=0;N<f.length;N++){var s=(E=f[N]).getNeighborsList().size;T.set(E,E.getNeighborsList().size),s==1&&A.push(E)}var d=[];for(d=d.concat(A);!v;){var c=[];for(c=c.concat(d),d=[],N=0;N<f.length;N++){var E=f[N],L=f.indexOf(E);L>=0&&f.splice(L,1),E.getNeighborsList().forEach(function(O){if(A.indexOf(O)<0){var I=T.get(O)-1;I==1&&d.push(O),T.set(O,I)}})}A=A.concat(d),f.length!=1&&f.length!=2||(v=!0,y=f[0])}return y},p.prototype.setGraphManager=function(l){this.graphManager=l},m.exports=p},function(m,_,u){function e(){}e.seed=1,e.x=0,e.nextDouble=function(){return e.x=1e4*Math.sin(e.seed++),e.x-Math.floor(e.x)},m.exports=e},function(m,_,u){var e=u(4);function t(o,r){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}t.prototype.getWorldOrgX=function(){return this.lworldOrgX},t.prototype.setWorldOrgX=function(o){this.lworldOrgX=o},t.prototype.getWorldOrgY=function(){return this.lworldOrgY},t.prototype.setWorldOrgY=function(o){this.lworldOrgY=o},t.prototype.getWorldExtX=function(){return this.lworldExtX},t.prototype.setWorldExtX=function(o){this.lworldExtX=o},t.prototype.getWorldExtY=function(){return this.lworldExtY},t.prototype.setWorldExtY=function(o){this.lworldExtY=o},t.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},t.prototype.setDeviceOrgX=function(o){this.ldeviceOrgX=o},t.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},t.prototype.setDeviceOrgY=function(o){this.ldeviceOrgY=o},t.prototype.getDeviceExtX=function(){return this.ldeviceExtX},t.prototype.setDeviceExtX=function(o){this.ldeviceExtX=o},t.prototype.getDeviceExtY=function(){return this.ldeviceExtY},t.prototype.setDeviceExtY=function(o){this.ldeviceExtY=o},t.prototype.transformX=function(o){var r=0,n=this.lworldExtX;return n!=0&&(r=this.ldeviceOrgX+(o-this.lworldOrgX)*this.ldeviceExtX/n),r},t.prototype.transformY=function(o){var r=0,n=this.lworldExtY;return n!=0&&(r=this.ldeviceOrgY+(o-this.lworldOrgY)*this.ldeviceExtY/n),r},t.prototype.inverseTransformX=function(o){var r=0,n=this.ldeviceExtX;return n!=0&&(r=this.lworldOrgX+(o-this.ldeviceOrgX)*this.lworldExtX/n),r},t.prototype.inverseTransformY=function(o){var r=0,n=this.ldeviceExtY;return n!=0&&(r=this.lworldOrgY+(o-this.ldeviceOrgY)*this.lworldExtY/n),r},t.prototype.inverseTransformPoint=function(o){return new e(this.inverseTransformX(o.x),this.inverseTransformY(o.y))},m.exports=t},function(m,_,u){var e=u(15),t=u(7),o=u(0),r=u(8),n=u(9);function i(){e.call(this),this.useSmartIdealEdgeLengthCalculation=t.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=t.DEFAULT_EDGE_LENGTH,this.springConstant=t.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=t.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=t.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=t.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*t.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=t.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=t.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=t.MAX_ITERATIONS}for(var h in i.prototype=Object.create(e.prototype),e)i[h]=e[h];i.prototype.initParameters=function(){e.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=t.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},i.prototype.calcIdealEdgeLengths=function(){for(var a,g,p,l,f,A,T=this.getGraphManager().getAllEdges(),v=0;v<T.length;v++)(a=T[v]).idealLength=this.idealEdgeLength,a.isInterGraph&&(p=a.getSource(),l=a.getTarget(),f=a.getSourceInLca().getEstimatedSize(),A=a.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(a.idealLength+=f+A-2*o.SIMPLE_NODE_SIZE),g=a.getLca().getInclusionTreeDepth(),a.idealLength+=t.DEFAULT_EDGE_LENGTH*t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(p.getInclusionTreeDepth()+l.getInclusionTreeDepth()-2*g))},i.prototype.initSpringEmbedder=function(){var a=this.getAllNodes().length;this.incremental?(a>t.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*t.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(a-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-t.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT_INCREMENTAL):(a>t.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(t.COOLING_ADAPTATION_FACTOR,1-(a-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*(1-t.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},i.prototype.calcSpringForces=function(){for(var a,g=this.getAllEdges(),p=0;p<g.length;p++)a=g[p],this.calcSpringForce(a,a.idealLength)},i.prototype.calcRepulsionForces=function(){var a,g,p,l,f,A=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],T=arguments.length>1&&arguments[1]!==void 0&&arguments[1],v=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&A&&this.updateGrid(),f=new Set,a=0;a<v.length;a++)p=v[a],this.calculateRepulsionForceOfANode(p,f,A,T),f.add(p);else for(a=0;a<v.length;a++)for(p=v[a],g=a+1;g<v.length;g++)l=v[g],p.getOwner()==l.getOwner()&&this.calcRepulsionForce(p,l)},i.prototype.calcGravitationalForces=function(){for(var a,g=this.getAllNodesToApplyGravitation(),p=0;p<g.length;p++)a=g[p],this.calcGravitationalForce(a)},i.prototype.moveNodes=function(){for(var a=this.getAllNodes(),g=0;g<a.length;g++)a[g].move()},i.prototype.calcSpringForce=function(a,g){var p,l,f,A,T=a.getSource(),v=a.getTarget();if(this.uniformLeafNodeSizes&&T.getChild()==null&&v.getChild()==null)a.updateLengthSimple();else if(a.updateLength(),a.isOverlapingSourceAndTarget)return;(p=a.getLength())!=0&&(f=(l=this.springConstant*(p-g))*(a.lengthX/p),A=l*(a.lengthY/p),T.springForceX+=f,T.springForceY+=A,v.springForceX-=f,v.springForceY-=A)},i.prototype.calcRepulsionForce=function(a,g){var p,l,f,A,T,v,y,N=a.getRect(),s=g.getRect(),d=new Array(2),c=new Array(4);if(N.intersects(s)){r.calcSeparationAmount(N,s,d,t.DEFAULT_EDGE_LENGTH/2),v=2*d[0],y=2*d[1];var E=a.noOfChildren*g.noOfChildren/(a.noOfChildren+g.noOfChildren);a.repulsionForceX-=E*v,a.repulsionForceY-=E*y,g.repulsionForceX+=E*v,g.repulsionForceY+=E*y}else this.uniformLeafNodeSizes&&a.getChild()==null&&g.getChild()==null?(p=s.getCenterX()-N.getCenterX(),l=s.getCenterY()-N.getCenterY()):(r.getIntersection(N,s,c),p=c[2]-c[0],l=c[3]-c[1]),Math.abs(p)<t.MIN_REPULSION_DIST&&(p=n.sign(p)*t.MIN_REPULSION_DIST),Math.abs(l)<t.MIN_REPULSION_DIST&&(l=n.sign(l)*t.MIN_REPULSION_DIST),f=p*p+l*l,A=Math.sqrt(f),v=(T=this.repulsionConstant*a.noOfChildren*g.noOfChildren/f)*p/A,y=T*l/A,a.repulsionForceX-=v,a.repulsionForceY-=y,g.repulsionForceX+=v,g.repulsionForceY+=y},i.prototype.calcGravitationalForce=function(a){var g,p,l,f,A,T,v,y;p=((g=a.getOwner()).getRight()+g.getLeft())/2,l=(g.getTop()+g.getBottom())/2,f=a.getCenterX()-p,A=a.getCenterY()-l,T=Math.abs(f)+a.getWidth()/2,v=Math.abs(A)+a.getHeight()/2,a.getOwner()==this.graphManager.getRoot()?(T>(y=g.getEstimatedSize()*this.gravityRangeFactor)||v>y)&&(a.gravitationForceX=-this.gravityConstant*f,a.gravitationForceY=-this.gravityConstant*A):(T>(y=g.getEstimatedSize()*this.compoundGravityRangeFactor)||v>y)&&(a.gravitationForceX=-this.gravityConstant*f*this.compoundGravityConstant,a.gravitationForceY=-this.gravityConstant*A*this.compoundGravityConstant)},i.prototype.isConverged=function(){var a,g=!1;return this.totalIterations>this.maxIterations/3&&(g=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),a=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,a||g},i.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},i.prototype.calcNoOfChildrenForAllNodes=function(){for(var a,g=this.graphManager.getAllNodes(),p=0;p<g.length;p++)(a=g[p]).noOfChildren=a.getNoOfChildren()},i.prototype.calcGrid=function(a){var g,p;g=parseInt(Math.ceil((a.getRight()-a.getLeft())/this.repulsionRange)),p=parseInt(Math.ceil((a.getBottom()-a.getTop())/this.repulsionRange));for(var l=new Array(g),f=0;f<g;f++)l[f]=new Array(p);for(f=0;f<g;f++)for(var A=0;A<p;A++)l[f][A]=new Array;return l},i.prototype.addNodeToGrid=function(a,g,p){var l,f,A,T;l=parseInt(Math.floor((a.getRect().x-g)/this.repulsionRange)),f=parseInt(Math.floor((a.getRect().width+a.getRect().x-g)/this.repulsionRange)),A=parseInt(Math.floor((a.getRect().y-p)/this.repulsionRange)),T=parseInt(Math.floor((a.getRect().height+a.getRect().y-p)/this.repulsionRange));for(var v=l;v<=f;v++)for(var y=A;y<=T;y++)this.grid[v][y].push(a),a.setGridCoordinates(l,f,A,T)},i.prototype.updateGrid=function(){var a,g,p=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),a=0;a<p.length;a++)g=p[a],this.addNodeToGrid(g,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},i.prototype.calculateRepulsionForceOfANode=function(a,g,p,l){if(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&p||l){var f,A=new Set;a.surrounding=new Array;for(var T=this.grid,v=a.startX-1;v<a.finishX+2;v++)for(var y=a.startY-1;y<a.finishY+2;y++)if(!(v<0||y<0||v>=T.length||y>=T[0].length)){for(var N=0;N<T[v][y].length;N++)if(f=T[v][y][N],a.getOwner()==f.getOwner()&&a!=f&&!g.has(f)&&!A.has(f)){var s=Math.abs(a.getCenterX()-f.getCenterX())-(a.getWidth()/2+f.getWidth()/2),d=Math.abs(a.getCenterY()-f.getCenterY())-(a.getHeight()/2+f.getHeight()/2);s<=this.repulsionRange&&d<=this.repulsionRange&&A.add(f)}}a.surrounding=[].concat((function(c){if(Array.isArray(c)){for(var E=0,L=Array(c.length);E<c.length;E++)L[E]=c[E];return L}return Array.from(c)})(A))}for(v=0;v<a.surrounding.length;v++)this.calcRepulsionForce(a,a.surrounding[v])},i.prototype.calcRepulsionRange=function(){return 0},m.exports=i},function(m,_,u){var e=u(1),t=u(7);function o(n,i,h){e.call(this,n,i,h),this.idealLength=t.DEFAULT_EDGE_LENGTH}for(var r in o.prototype=Object.create(e.prototype),e)o[r]=e[r];m.exports=o},function(m,_,u){var e=u(3);function t(r,n,i,h){e.call(this,r,n,i,h),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}for(var o in t.prototype=Object.create(e.prototype),e)t[o]=e[o];t.prototype.setGridCoordinates=function(r,n,i,h){this.startX=r,this.finishX=n,this.startY=i,this.finishY=h},m.exports=t},function(m,_,u){function e(t,o){this.width=0,this.height=0,t!==null&&o!==null&&(this.height=o,this.width=t)}e.prototype.getWidth=function(){return this.width},e.prototype.setWidth=function(t){this.width=t},e.prototype.getHeight=function(){return this.height},e.prototype.setHeight=function(t){this.height=t},m.exports=e},function(m,_,u){var e=u(14);function t(){this.map={},this.keys=[]}t.prototype.put=function(o,r){var n=e.createID(o);this.contains(n)||(this.map[n]=r,this.keys.push(o))},t.prototype.contains=function(o){return e.createID(o),this.map[o]!=null},t.prototype.get=function(o){var r=e.createID(o);return this.map[r]},t.prototype.keySet=function(){return this.keys},m.exports=t},function(m,_,u){var e=u(14);function t(){this.set={}}t.prototype.add=function(o){var r=e.createID(o);this.contains(r)||(this.set[r]=o)},t.prototype.remove=function(o){delete this.set[e.createID(o)]},t.prototype.clear=function(){this.set={}},t.prototype.contains=function(o){return this.set[e.createID(o)]==o},t.prototype.isEmpty=function(){return this.size()===0},t.prototype.size=function(){return Object.keys(this.set).length},t.prototype.addAllTo=function(o){for(var r=Object.keys(this.set),n=r.length,i=0;i<n;i++)o.push(this.set[r[i]])},t.prototype.size=function(){return Object.keys(this.set).length},t.prototype.addAll=function(o){for(var r=o.length,n=0;n<r;n++){var i=o[n];this.add(i)}},m.exports=t},function(m,_,u){var e=(function(){function r(n,i){for(var h=0;h<i.length;h++){var a=i[h];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(n,a.key,a)}}return function(n,i,h){return i&&r(n.prototype,i),h&&r(n,h),n}})(),t=u(11),o=(function(){function r(n,i){(function(a,g){if(!(a instanceof g))throw new TypeError("Cannot call a class as a function")})(this,r),i===null&&i===void 0||(this.compareFunction=this._defaultCompareFunction);var h=void 0;h=n instanceof t?n.size():n.length,this._quicksort(n,0,h-1)}return e(r,[{key:"_quicksort",value:function(n,i,h){if(i<h){var a=this._partition(n,i,h);this._quicksort(n,i,a),this._quicksort(n,a+1,h)}}},{key:"_partition",value:function(n,i,h){for(var a=this._get(n,i),g=i,p=h;;){for(;this.compareFunction(a,this._get(n,p));)p--;for(;this.compareFunction(this._get(n,g),a);)g++;if(!(g<p))return p;this._swap(n,g,p),g++,p--}}},{key:"_get",value:function(n,i){return n instanceof t?n.get_object_at(i):n[i]}},{key:"_set",value:function(n,i,h){n instanceof t?n.set_object_at(i,h):n[i]=h}},{key:"_swap",value:function(n,i,h){var a=this._get(n,i);this._set(n,i,this._get(n,h)),this._set(n,h,a)}},{key:"_defaultCompareFunction",value:function(n,i){return i>n}}]),r})();m.exports=o},function(m,_,u){var e=(function(){function o(r,n){for(var i=0;i<n.length;i++){var h=n[i];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(r,h.key,h)}}return function(r,n,i){return n&&o(r.prototype,n),i&&o(r,i),r}})(),t=(function(){function o(r,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;(function(A,T){if(!(A instanceof T))throw new TypeError("Cannot call a class as a function")})(this,o),this.sequence1=r,this.sequence2=n,this.match_score=i,this.mismatch_penalty=h,this.gap_penalty=a,this.iMax=r.length+1,this.jMax=n.length+1,this.grid=new Array(this.iMax);for(var g=0;g<this.iMax;g++){this.grid[g]=new Array(this.jMax);for(var p=0;p<this.jMax;p++)this.grid[g][p]=0}this.tracebackGrid=new Array(this.iMax);for(var l=0;l<this.iMax;l++){this.tracebackGrid[l]=new Array(this.jMax);for(var f=0;f<this.jMax;f++)this.tracebackGrid[l][f]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return e(o,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var r=1;r<this.jMax;r++)this.grid[0][r]=this.grid[0][r-1]+this.gap_penalty,this.tracebackGrid[0][r]=[!1,!1,!0];for(var n=1;n<this.iMax;n++)this.grid[n][0]=this.grid[n-1][0]+this.gap_penalty,this.tracebackGrid[n][0]=[!1,!0,!1];for(var i=1;i<this.iMax;i++)for(var h=1;h<this.jMax;h++){var a=[this.sequence1[i-1]===this.sequence2[h-1]?this.grid[i-1][h-1]+this.match_score:this.grid[i-1][h-1]+this.mismatch_penalty,this.grid[i-1][h]+this.gap_penalty,this.grid[i][h-1]+this.gap_penalty],g=this.arrayAllMaxIndexes(a);this.grid[i][h]=a[g[0]],this.tracebackGrid[i][h]=[g.includes(0),g.includes(1),g.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var r=[];for(r.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});r[0];){var n=r[0],i=this.tracebackGrid[n.pos[0]][n.pos[1]];i[0]&&r.push({pos:[n.pos[0]-1,n.pos[1]-1],seq1:this.sequence1[n.pos[0]-1]+n.seq1,seq2:this.sequence2[n.pos[1]-1]+n.seq2}),i[1]&&r.push({pos:[n.pos[0]-1,n.pos[1]],seq1:this.sequence1[n.pos[0]-1]+n.seq1,seq2:"-"+n.seq2}),i[2]&&r.push({pos:[n.pos[0],n.pos[1]-1],seq1:"-"+n.seq1,seq2:this.sequence2[n.pos[1]-1]+n.seq2}),n.pos[0]===0&&n.pos[1]===0&&this.alignments.push({sequence1:n.seq1,sequence2:n.seq2}),r.shift()}return this.alignments}},{key:"getAllIndexes",value:function(r,n){for(var i=[],h=-1;(h=r.indexOf(n,h+1))!==-1;)i.push(h);return i}},{key:"arrayAllMaxIndexes",value:function(r){return this.getAllIndexes(r,Math.max.apply(null,r))}}]),o})();m.exports=t},function(m,_,u){var e=function(){};e.FDLayout=u(18),e.FDLayoutConstants=u(7),e.FDLayoutEdge=u(19),e.FDLayoutNode=u(20),e.DimensionD=u(21),e.HashMap=u(22),e.HashSet=u(23),e.IGeometry=u(8),e.IMath=u(9),e.Integer=u(10),e.Point=u(12),e.PointD=u(4),e.RandomSeed=u(16),e.RectangleD=u(13),e.Transform=u(17),e.UniqueIDGeneretor=u(14),e.Quicksort=u(24),e.LinkedList=u(11),e.LGraphObject=u(2),e.LGraph=u(5),e.LEdge=u(1),e.LGraphManager=u(6),e.LNode=u(3),e.Layout=u(15),e.LayoutConstants=u(0),e.NeedlemanWunsch=u(25),m.exports=e},function(m,_,u){function e(){this.listeners=[]}var t=e.prototype;t.addListener=function(o,r){this.listeners.push({event:o,callback:r})},t.removeListener=function(o,r){for(var n=this.listeners.length;n>=0;n--){var i=this.listeners[n];i.event===o&&i.callback===r&&this.listeners.splice(n,1)}},t.emit=function(o,r){for(var n=0;n<this.listeners.length;n++){var i=this.listeners[n];o===i.event&&i.callback(r)}},m.exports=e}])},Z.exports=R());var R}var Q,$,K,J,ut=($||($=1,q.exports=(K=Q?z.exports:(Q=1,J=function(R){return(function(m){var _={};function u(e){if(_[e])return _[e].exports;var t=_[e]={i:e,l:!1,exports:{}};return m[e].call(t.exports,t,t.exports,u),t.l=!0,t.exports}return u.m=m,u.c=_,u.i=function(e){return e},u.d=function(e,t,o){u.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:o})},u.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return u.d(t,"a",t),t},u.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},u.p="",u(u.s=7)})([function(m,_){m.exports=R},function(m,_,u){var e=u(0).FDLayoutConstants;function t(){}for(var o in e)t[o]=e[o];t.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,t.DEFAULT_RADIAL_SEPARATION=e.DEFAULT_EDGE_LENGTH,t.DEFAULT_COMPONENT_SEPERATION=60,t.TILE=!0,t.TILING_PADDING_VERTICAL=10,t.TILING_PADDING_HORIZONTAL=10,t.TREE_REDUCTION_ON_INCREMENTAL=!1,m.exports=t},function(m,_,u){var e=u(0).FDLayoutEdge;function t(r,n,i){e.call(this,r,n,i)}for(var o in t.prototype=Object.create(e.prototype),e)t[o]=e[o];m.exports=t},function(m,_,u){var e=u(0).LGraph;function t(r,n,i){e.call(this,r,n,i)}for(var o in t.prototype=Object.create(e.prototype),e)t[o]=e[o];m.exports=t},function(m,_,u){var e=u(0).LGraphManager;function t(r){e.call(this,r)}for(var o in t.prototype=Object.create(e.prototype),e)t[o]=e[o];m.exports=t},function(m,_,u){var e=u(0).FDLayoutNode,t=u(0).IMath;function o(n,i,h,a){e.call(this,n,i,h,a)}for(var r in o.prototype=Object.create(e.prototype),e)o[r]=e[r];o.prototype.move=function(){var n=this.graphManager.getLayout();this.displacementX=n.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=n.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>n.coolingFactor*n.maxNodeDisplacement&&(this.displacementX=n.coolingFactor*n.maxNodeDisplacement*t.sign(this.displacementX)),Math.abs(this.displacementY)>n.coolingFactor*n.maxNodeDisplacement&&(this.displacementY=n.coolingFactor*n.maxNodeDisplacement*t.sign(this.displacementY)),this.child==null||this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),n.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},o.prototype.propogateDisplacementToChildren=function(n,i){for(var h,a=this.getChild().getNodes(),g=0;g<a.length;g++)(h=a[g]).getChild()==null?(h.moveBy(n,i),h.displacementX+=n,h.displacementY+=i):h.propogateDisplacementToChildren(n,i)},o.prototype.setPred1=function(n){this.pred1=n},o.prototype.getPred1=function(){return pred1},o.prototype.getPred2=function(){return pred2},o.prototype.setNext=function(n){this.next=n},o.prototype.getNext=function(){return next},o.prototype.setProcessed=function(n){this.processed=n},o.prototype.isProcessed=function(){return processed},m.exports=o},function(m,_,u){var e=u(0).FDLayout,t=u(4),o=u(3),r=u(5),n=u(2),i=u(1),h=u(0).FDLayoutConstants,a=u(0).LayoutConstants,g=u(0).Point,p=u(0).PointD,l=u(0).Layout,f=u(0).Integer,A=u(0).IGeometry,T=u(0).LGraph,v=u(0).Transform;function y(){e.call(this),this.toBeTiled={}}for(var N in y.prototype=Object.create(e.prototype),e)y[N]=e[N];y.prototype.newGraphManager=function(){var s=new t(this);return this.graphManager=s,s},y.prototype.newGraph=function(s){return new o(null,this.graphManager,s)},y.prototype.newNode=function(s){return new r(this.graphManager,s)},y.prototype.newEdge=function(s){return new n(null,null,s)},y.prototype.initParameters=function(){e.prototype.initParameters.call(this,arguments),this.isSubLayout||(i.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=i.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=h.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=h.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=h.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=h.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=h.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/h.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=h.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},y.prototype.layout=function(){return a.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},y.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental)i.TREE_REDUCTION_ON_INCREMENTAL&&(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),d=new Set(this.getAllNodes()),c=this.nodesWithGravity.filter(function(E){return d.has(E)}),this.graphManager.setAllNodesToApplyGravitation(c));else{var s=this.getFlatForest();if(s.length>0)this.positionNodesRadially(s);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var d=new Set(this.getAllNodes()),c=this.nodesWithGravity.filter(function(E){return d.has(E)});this.graphManager.setAllNodesToApplyGravitation(c),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},y.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}if(this.totalIterations%h.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var s=new Set(this.getAllNodes()),d=this.nodesWithGravity.filter(function(L){return s.has(L)});this.graphManager.setAllNodesToApplyGravitation(d),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var c=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(c,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},y.prototype.getPositionsData=function(){for(var s=this.graphManager.getAllNodes(),d={},c=0;c<s.length;c++){var E=s[c].rect,L=s[c].id;d[L]={id:L,x:E.getCenterX(),y:E.getCenterY(),w:E.width,h:E.height}}return d},y.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var s=!1;if(h.ANIMATE==="during")this.emit("layoutstarted");else{for(;!s;)s=this.tick();this.graphManager.updateBounds()}},y.prototype.calculateNodesToApplyGravitationTo=function(){var s,d,c=[],E=this.graphManager.getGraphs(),L=E.length;for(d=0;d<L;d++)(s=E[d]).updateConnected(),s.isConnected||(c=c.concat(s.getNodes()));return c},y.prototype.createBendpoints=function(){var s=[];s=s.concat(this.graphManager.getAllEdges());var d,c=new Set;for(d=0;d<s.length;d++){var E=s[d];if(!c.has(E)){var L=E.getSource(),O=E.getTarget();if(L==O)E.getBendpoints().push(new p),E.getBendpoints().push(new p),this.createDummyNodesForBendpoints(E),c.add(E);else{var I=[];if(I=(I=I.concat(L.getEdgeListToNode(O))).concat(O.getEdgeListToNode(L)),!c.has(I[0])){var w;if(I.length>1)for(w=0;w<I.length;w++){var D=I[w];D.getBendpoints().push(new p),this.createDummyNodesForBendpoints(D)}I.forEach(function(C){c.add(C)})}}}if(c.size==s.length)break}},y.prototype.positionNodesRadially=function(s){for(var d=new g(0,0),c=Math.ceil(Math.sqrt(s.length)),E=0,L=0,O=0,I=new p(0,0),w=0;w<s.length;w++){w%c==0&&(O=0,L=E,w!=0&&(L+=i.DEFAULT_COMPONENT_SEPERATION),E=0);var D=s[w],C=l.findCenterOfTree(D);d.x=O,d.y=L,(I=y.radialLayout(D,C,d)).y>E&&(E=Math.floor(I.y)),O=Math.floor(I.x+i.DEFAULT_COMPONENT_SEPERATION)}this.transform(new p(a.WORLD_CENTER_X-I.x/2,a.WORLD_CENTER_Y-I.y/2))},y.radialLayout=function(s,d,c){var E=Math.max(this.maxDiagonalInTree(s),i.DEFAULT_RADIAL_SEPARATION);y.branchRadialLayout(d,null,0,359,0,E);var L=T.calculateBounds(s),O=new v;O.setDeviceOrgX(L.getMinX()),O.setDeviceOrgY(L.getMinY()),O.setWorldOrgX(c.x),O.setWorldOrgY(c.y);for(var I=0;I<s.length;I++)s[I].transform(O);var w=new p(L.getMaxX(),L.getMaxY());return O.inverseTransformPoint(w)},y.branchRadialLayout=function(s,d,c,E,L,O){var I=(E-c+1)/2;I<0&&(I+=180);var w=(I+c)%360*A.TWO_PI/360,D=L*Math.cos(w),C=L*Math.sin(w);s.setCenter(D,C);var M=[],F=(M=M.concat(s.getEdges())).length;d!=null&&F--;for(var G,x=0,P=M.length,S=s.getEdgesBetween(d);S.length>1;){var b=S[0];S.splice(0,1);var U=M.indexOf(b);U>=0&&M.splice(U,1),P--,F--}G=d!=null?(M.indexOf(S[0])+1)%P:0;for(var Y=Math.abs(E-c)/F,B=G;x!=F;B=++B%P){var k=M[B].getOtherEnd(s);if(k!=d){var W=(c+x*Y)%360,at=(W+Y)%360;y.branchRadialLayout(k,s,W,at,L+O,O),x++}}},y.maxDiagonalInTree=function(s){for(var d=f.MIN_VALUE,c=0;c<s.length;c++){var E=s[c].getDiagonal();E>d&&(d=E)}return d},y.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},y.prototype.groupZeroDegreeMembers=function(){var s=this,d={};this.memberGroups={},this.idToDummyNode={};for(var c=[],E=this.graphManager.getAllNodes(),L=0;L<E.length;L++){var O=(I=E[L]).getParent();this.getNodeDegreeWithChildren(I)!==0||O.id!=null&&this.getToBeTiled(O)||c.push(I)}for(L=0;L<c.length;L++){var I,w=(I=c[L]).getParent().id;d[w]===void 0&&(d[w]=[]),d[w]=d[w].concat(I)}Object.keys(d).forEach(function(D){if(d[D].length>1){var C="DummyCompound_"+D;s.memberGroups[C]=d[D];var M=d[D][0].getParent(),F=new r(s.graphManager);F.id=C,F.paddingLeft=M.paddingLeft||0,F.paddingRight=M.paddingRight||0,F.paddingBottom=M.paddingBottom||0,F.paddingTop=M.paddingTop||0,s.idToDummyNode[C]=F;var G=s.getGraphManager().add(s.newGraph(),F),x=M.getChild();x.add(F);for(var P=0;P<d[D].length;P++){var S=d[D][P];x.remove(S),G.add(S)}}})},y.prototype.clearCompounds=function(){var s={},d={};this.performDFSOnCompounds();for(var c=0;c<this.compoundOrder.length;c++)d[this.compoundOrder[c].id]=this.compoundOrder[c],s[this.compoundOrder[c].id]=[].concat(this.compoundOrder[c].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[c].getChild()),this.compoundOrder[c].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(s,d)},y.prototype.clearZeroDegreeMembers=function(){var s=this,d=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(c){var E=s.idToDummyNode[c];d[c]=s.tileNodes(s.memberGroups[c],E.paddingLeft+E.paddingRight),E.rect.width=d[c].width,E.rect.height=d[c].height})},y.prototype.repopulateCompounds=function(){for(var s=this.compoundOrder.length-1;s>=0;s--){var d=this.compoundOrder[s],c=d.id,E=d.paddingLeft,L=d.paddingTop;this.adjustLocations(this.tiledMemberPack[c],d.rect.x,d.rect.y,E,L)}},y.prototype.repopulateZeroDegreeMembers=function(){var s=this,d=this.tiledZeroDegreePack;Object.keys(d).forEach(function(c){var E=s.idToDummyNode[c],L=E.paddingLeft,O=E.paddingTop;s.adjustLocations(d[c],E.rect.x,E.rect.y,L,O)})},y.prototype.getToBeTiled=function(s){var d=s.id;if(this.toBeTiled[d]!=null)return this.toBeTiled[d];var c=s.getChild();if(c==null)return this.toBeTiled[d]=!1,!1;for(var E=c.getNodes(),L=0;L<E.length;L++){var O=E[L];if(this.getNodeDegree(O)>0)return this.toBeTiled[d]=!1,!1;if(O.getChild()!=null){if(!this.getToBeTiled(O))return this.toBeTiled[d]=!1,!1}else this.toBeTiled[O.id]=!1}return this.toBeTiled[d]=!0,!0},y.prototype.getNodeDegree=function(s){s.id;for(var d=s.getEdges(),c=0,E=0;E<d.length;E++){var L=d[E];L.getSource().id!==L.getTarget().id&&(c+=1)}return c},y.prototype.getNodeDegreeWithChildren=function(s){var d=this.getNodeDegree(s);if(s.getChild()==null)return d;for(var c=s.getChild().getNodes(),E=0;E<c.length;E++){var L=c[E];d+=this.getNodeDegreeWithChildren(L)}return d},y.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},y.prototype.fillCompexOrderByDFS=function(s){for(var d=0;d<s.length;d++){var c=s[d];c.getChild()!=null&&this.fillCompexOrderByDFS(c.getChild().getNodes()),this.getToBeTiled(c)&&this.compoundOrder.push(c)}},y.prototype.adjustLocations=function(s,d,c,E,L){c+=L;for(var O=d+=E,I=0;I<s.rows.length;I++){var w=s.rows[I];d=O;for(var D=0,C=0;C<w.length;C++){var M=w[C];M.rect.x=d,M.rect.y=c,d+=M.rect.width+s.horizontalPadding,M.rect.height>D&&(D=M.rect.height)}c+=D+s.verticalPadding}},y.prototype.tileCompoundMembers=function(s,d){var c=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(E){var L=d[E];c.tiledMemberPack[E]=c.tileNodes(s[E],L.paddingLeft+L.paddingRight),L.rect.width=c.tiledMemberPack[E].width,L.rect.height=c.tiledMemberPack[E].height})},y.prototype.tileNodes=function(s,d){var c={rows:[],rowWidth:[],rowHeight:[],width:0,height:d,verticalPadding:i.TILING_PADDING_VERTICAL,horizontalPadding:i.TILING_PADDING_HORIZONTAL};s.sort(function(O,I){return O.rect.width*O.rect.height>I.rect.width*I.rect.height?-1:O.rect.width*O.rect.height<I.rect.width*I.rect.height?1:0});for(var E=0;E<s.length;E++){var L=s[E];c.rows.length==0?this.insertNodeToRow(c,L,0,d):this.canAddHorizontal(c,L.rect.width,L.rect.height)?this.insertNodeToRow(c,L,this.getShortestRowIndex(c),d):this.insertNodeToRow(c,L,c.rows.length,d),this.shiftToLastRow(c)}return c},y.prototype.insertNodeToRow=function(s,d,c,E){var L=E;c==s.rows.length&&(s.rows.push([]),s.rowWidth.push(L),s.rowHeight.push(0));var O=s.rowWidth[c]+d.rect.width;s.rows[c].length>0&&(O+=s.horizontalPadding),s.rowWidth[c]=O,s.width<O&&(s.width=O);var I=d.rect.height;c>0&&(I+=s.verticalPadding);var w=0;I>s.rowHeight[c]&&(w=s.rowHeight[c],s.rowHeight[c]=I,w=s.rowHeight[c]-w),s.height+=w,s.rows[c].push(d)},y.prototype.getShortestRowIndex=function(s){for(var d=-1,c=Number.MAX_VALUE,E=0;E<s.rows.length;E++)s.rowWidth[E]<c&&(d=E,c=s.rowWidth[E]);return d},y.prototype.getLongestRowIndex=function(s){for(var d=-1,c=Number.MIN_VALUE,E=0;E<s.rows.length;E++)s.rowWidth[E]>c&&(d=E,c=s.rowWidth[E]);return d},y.prototype.canAddHorizontal=function(s,d,c){var E=this.getShortestRowIndex(s);if(E<0)return!0;var L=s.rowWidth[E];if(L+s.horizontalPadding+d<=s.width)return!0;var O,I,w=0;return s.rowHeight[E]<c&&E>0&&(w=c+s.verticalPadding-s.rowHeight[E]),O=s.width-L>=d+s.horizontalPadding?(s.height+w)/(L+d+s.horizontalPadding):(s.height+w)/s.width,w=c+s.verticalPadding,(I=s.width<d?(s.height+w)/d:(s.height+w)/s.width)<1&&(I=1/I),O<1&&(O=1/O),O<I},y.prototype.shiftToLastRow=function(s){var d=this.getLongestRowIndex(s),c=s.rowWidth.length-1,E=s.rows[d],L=E[E.length-1],O=L.width+s.horizontalPadding;if(s.width-s.rowWidth[c]>O&&d!=c){E.splice(-1,1),s.rows[c].push(L),s.rowWidth[d]=s.rowWidth[d]-O,s.rowWidth[c]=s.rowWidth[c]+O,s.width=s.rowWidth[instance.getLongestRowIndex(s)];for(var I=Number.MIN_VALUE,w=0;w<E.length;w++)E[w].height>I&&(I=E[w].height);d>0&&(I+=s.verticalPadding);var D=s.rowHeight[d]+s.rowHeight[c];s.rowHeight[d]=I,s.rowHeight[c]<L.height+s.verticalPadding&&(s.rowHeight[c]=L.height+s.verticalPadding);var C=s.rowHeight[d]+s.rowHeight[c];s.height+=C-D,this.shiftToLastRow(s)}},y.prototype.tilingPreLayout=function(){i.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},y.prototype.tilingPostLayout=function(){i.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},y.prototype.reduceTrees=function(){for(var s,d=[],c=!0;c;){var E=this.graphManager.getAllNodes(),L=[];c=!1;for(var O=0;O<E.length;O++)(s=E[O]).getEdges().length!=1||s.getEdges()[0].isInterGraph||s.getChild()!=null||(L.push([s,s.getEdges()[0],s.getOwner()]),c=!0);if(c==1){for(var I=[],w=0;w<L.length;w++)L[w][0].getEdges().length==1&&(I.push(L[w]),L[w][0].getOwner().remove(L[w][0]));d.push(I),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=d},y.prototype.growTree=function(s){for(var d,c=s[s.length-1],E=0;E<c.length;E++)d=c[E],this.findPlaceforPrunedNode(d),d[2].add(d[0]),d[2].add(d[1],d[1].source,d[1].target);s.splice(s.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},y.prototype.findPlaceforPrunedNode=function(s){var d,c,E=s[0],L=(c=E==s[1].source?s[1].target:s[1].source).startX,O=c.finishX,I=c.startY,w=c.finishY,D=[0,0,0,0];if(I>0)for(var C=L;C<=O;C++)D[0]+=this.grid[C][I-1].length+this.grid[C][I].length-1;if(O<this.grid.length-1)for(C=I;C<=w;C++)D[1]+=this.grid[O+1][C].length+this.grid[O][C].length-1;if(w<this.grid[0].length-1)for(C=L;C<=O;C++)D[2]+=this.grid[C][w+1].length+this.grid[C][w].length-1;if(L>0)for(C=I;C<=w;C++)D[3]+=this.grid[L-1][C].length+this.grid[L][C].length-1;for(var M,F,G=f.MAX_VALUE,x=0;x<D.length;x++)D[x]<G?(G=D[x],M=1,F=x):D[x]==G&&M++;if(M==3&&G==0)D[0]==0&&D[1]==0&&D[2]==0?d=1:D[0]==0&&D[1]==0&&D[3]==0?d=0:D[0]==0&&D[2]==0&&D[3]==0?d=3:D[1]==0&&D[2]==0&&D[3]==0&&(d=2);else if(M==2&&G==0){var P=Math.floor(2*Math.random());d=D[0]==0&&D[1]==0?P==0?0:1:D[0]==0&&D[2]==0?P==0?0:2:D[0]==0&&D[3]==0?P==0?0:3:D[1]==0&&D[2]==0?P==0?1:2:D[1]==0&&D[3]==0?P==0?1:3:P==0?2:3}else d=M==4&&G==0?P=Math.floor(4*Math.random()):F;d==0?E.setCenter(c.getCenterX(),c.getCenterY()-c.getHeight()/2-h.DEFAULT_EDGE_LENGTH-E.getHeight()/2):d==1?E.setCenter(c.getCenterX()+c.getWidth()/2+h.DEFAULT_EDGE_LENGTH+E.getWidth()/2,c.getCenterY()):d==2?E.setCenter(c.getCenterX(),c.getCenterY()+c.getHeight()/2+h.DEFAULT_EDGE_LENGTH+E.getHeight()/2):E.setCenter(c.getCenterX()-c.getWidth()/2-h.DEFAULT_EDGE_LENGTH-E.getWidth()/2,c.getCenterY())},m.exports=y},function(m,_,u){var e={};e.layoutBase=u(0),e.CoSEConstants=u(1),e.CoSEEdge=u(2),e.CoSEGraph=u(3),e.CoSEGraphManager=u(4),e.CoSELayout=u(6),e.CoSENode=u(5),m.exports=e}])},z.exports=J(gt())),(function(R){var m={};function _(u){if(m[u])return m[u].exports;var e=m[u]={i:u,l:!1,exports:{}};return R[u].call(e.exports,e,e.exports,_),e.l=!0,e.exports}return _.m=R,_.c=m,_.i=function(u){return u},_.d=function(u,e,t){_.o(u,e)||Object.defineProperty(u,e,{configurable:!1,enumerable:!0,get:t})},_.n=function(u){var e=u&&u.__esModule?function(){return u.default}:function(){return u};return _.d(e,"a",e),e},_.o=function(u,e){return Object.prototype.hasOwnProperty.call(u,e)},_.p="",_(_.s=1)})([function(R,m){R.exports=K},function(R,m,_){var u=_(0).layoutBase.LayoutConstants,e=_(0).layoutBase.FDLayoutConstants,t=_(0).CoSEConstants,o=_(0).CoSELayout,r=_(0).CoSENode,n=_(0).layoutBase.PointD,i=_(0).layoutBase.DimensionD,h={ready:function(){},stop:function(){},quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function a(l){this.options=(function(f,A){var T={};for(var v in f)T[v]=f[v];for(var v in A)T[v]=A[v];return T})(h,l),g(this.options)}var g=function(l){l.nodeRepulsion!=null&&(t.DEFAULT_REPULSION_STRENGTH=e.DEFAULT_REPULSION_STRENGTH=l.nodeRepulsion),l.idealEdgeLength!=null&&(t.DEFAULT_EDGE_LENGTH=e.DEFAULT_EDGE_LENGTH=l.idealEdgeLength),l.edgeElasticity!=null&&(t.DEFAULT_SPRING_STRENGTH=e.DEFAULT_SPRING_STRENGTH=l.edgeElasticity),l.nestingFactor!=null&&(t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=e.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=l.nestingFactor),l.gravity!=null&&(t.DEFAULT_GRAVITY_STRENGTH=e.DEFAULT_GRAVITY_STRENGTH=l.gravity),l.numIter!=null&&(t.MAX_ITERATIONS=e.MAX_ITERATIONS=l.numIter),l.gravityRange!=null&&(t.DEFAULT_GRAVITY_RANGE_FACTOR=e.DEFAULT_GRAVITY_RANGE_FACTOR=l.gravityRange),l.gravityCompound!=null&&(t.DEFAULT_COMPOUND_GRAVITY_STRENGTH=e.DEFAULT_COMPOUND_GRAVITY_STRENGTH=l.gravityCompound),l.gravityRangeCompound!=null&&(t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=e.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=l.gravityRangeCompound),l.initialEnergyOnIncremental!=null&&(t.DEFAULT_COOLING_FACTOR_INCREMENTAL=e.DEFAULT_COOLING_FACTOR_INCREMENTAL=l.initialEnergyOnIncremental),l.quality=="draft"?u.QUALITY=0:l.quality=="proof"?u.QUALITY=2:u.QUALITY=1,t.NODE_DIMENSIONS_INCLUDE_LABELS=e.NODE_DIMENSIONS_INCLUDE_LABELS=u.NODE_DIMENSIONS_INCLUDE_LABELS=l.nodeDimensionsIncludeLabels,t.DEFAULT_INCREMENTAL=e.DEFAULT_INCREMENTAL=u.DEFAULT_INCREMENTAL=!l.randomize,t.ANIMATE=e.ANIMATE=u.ANIMATE=l.animate,t.TILE=l.tile,t.TILING_PADDING_VERTICAL=typeof l.tilingPaddingVertical=="function"?l.tilingPaddingVertical.call():l.tilingPaddingVertical,t.TILING_PADDING_HORIZONTAL=typeof l.tilingPaddingHorizontal=="function"?l.tilingPaddingHorizontal.call():l.tilingPaddingHorizontal};a.prototype.run=function(){var l,f,A=this.options;this.idToLNode={};var T=this.layout=new o,v=this;v.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var y=T.newGraphManager();this.gm=y;var N=this.options.eles.nodes(),s=this.options.eles.edges();this.root=y.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(N),T);for(var d=0;d<s.length;d++){var c=s[d],E=this.idToLNode[c.data("source")],L=this.idToLNode[c.data("target")];E!==L&&E.getEdgesBetween(L).length==0&&(y.add(T.newEdge(),E,L).id=c.id())}var O=function(w,D){typeof w=="number"&&(w=D);var C=w.data("id"),M=v.idToLNode[C];return{x:M.getRect().getCenterX(),y:M.getRect().getCenterY()}},I=function w(){for(var D,C=function(){A.fit&&A.cy.fit(A.eles,A.padding),l||(l=!0,v.cy.one("layoutready",A.ready),v.cy.trigger({type:"layoutready",layout:v}))},M=v.options.refresh,F=0;F<M&&!D;F++)D=v.stopped||v.layout.tick();if(D)return T.checkLayoutSuccess()&&!T.isSubLayout&&T.doPostLayout(),T.tilingPostLayout&&T.tilingPostLayout(),T.isLayoutFinished=!0,v.options.eles.nodes().positions(O),C(),v.cy.one("layoutstop",v.options.stop),v.cy.trigger({type:"layoutstop",layout:v}),f&&cancelAnimationFrame(f),void(l=!1);var G=v.layout.getPositionsData();A.eles.nodes().positions(function(x,P){if(typeof x=="number"&&(x=P),!x.isParent()){for(var S=x.id(),b=G[S],U=x;b==null&&(b=G[U.data("parent")]||G["DummyCompound_"+U.data("parent")],G[S]=b,(U=U.parent()[0])!=null););return b!=null?{x:b.x,y:b.y}:{x:x.position("x"),y:x.position("y")}}}),C(),f=requestAnimationFrame(w)};return T.addListener("layoutstarted",function(){v.options.animate==="during"&&(f=requestAnimationFrame(I))}),T.runLayout(),this.options.animate!=="during"&&(v.options.eles.nodes().not(":parent").layoutPositions(v,v.options,O),l=!1),this},a.prototype.getTopMostNodes=function(l){for(var f={},A=0;A<l.length;A++)f[l[A].id()]=!0;var T=l.filter(function(v,y){typeof v=="number"&&(v=y);for(var N=v.parent()[0];N!=null;){if(f[N.id()])return!1;N=N.parent()[0]}return!0});return T},a.prototype.processChildrenList=function(l,f,A){for(var T=f.length,v=0;v<T;v++){var y,N,s=f[v],d=s.children(),c=s.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if((y=s.outerWidth()!=null&&s.outerHeight()!=null?l.add(new r(A.graphManager,new n(s.position("x")-c.w/2,s.position("y")-c.h/2),new i(parseFloat(c.w),parseFloat(c.h)))):l.add(new r(this.graphManager))).id=s.data("id"),y.paddingLeft=parseInt(s.css("padding")),y.paddingTop=parseInt(s.css("padding")),y.paddingRight=parseInt(s.css("padding")),y.paddingBottom=parseInt(s.css("padding")),this.options.nodeDimensionsIncludeLabels&&s.isParent()){var E=s.boundingBox({includeLabels:!0,includeNodes:!1}).w,L=s.boundingBox({includeLabels:!0,includeNodes:!1}).h,O=s.css("text-halign");y.labelWidth=E,y.labelHeight=L,y.labelPos=O}this.idToLNode[s.data("id")]=y,isNaN(y.rect.x)&&(y.rect.x=0),isNaN(y.rect.y)&&(y.rect.y=0),d!=null&&d.length>0&&(N=A.getGraphManager().add(A.newGraph(),y),this.processChildrenList(N,d,A))}},a.prototype.stop=function(){return this.stopped=!0,this};var p=function(l){l("layout","cose-bilkent",a)};typeof cytoscape<"u"&&p(cytoscape),R.exports=p}]))),q.exports);const ct=ht(ut);function tt(R,m){R.forEach(_=>{const u={id:_.id,labelText:_.label,height:_.height,width:_.width,padding:_.padding??0};Object.keys(_).forEach(e=>{["id","label","height","width","padding","x","y"].includes(e)||(u[e]=_[e])}),m.add({group:"nodes",data:u,position:{x:_.x??0,y:_.y??0}})})}function et(R,m){R.forEach(_=>{const u={id:_.id,source:_.start,target:_.end};Object.keys(_).forEach(e=>{["id","start","end"].includes(e)||(u[e]=_[e])}),m.add({group:"edges",data:u})})}function nt(R){return new Promise(m=>{const _=lt("body").append("div").attr("id","cy").attr("style","display:none"),u=V({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});_.remove(),tt(R.nodes,u),et(R.edges,u),u.nodes().forEach(function(e){e.layoutDimensions=()=>{const t=e.data();return{w:t.width,h:t.height}}}),u.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),u.ready(e=>{H.info("Cytoscape ready",e),m(u)})})}function rt(R){return R.nodes().map(m=>{const _=m.data(),u=m.position(),e={id:_.id,x:u.x,y:u.y};return Object.keys(_).forEach(t=>{t!=="id"&&(e[t]=_[t])}),e})}function it(R){return R.edges().map(m=>{const _=m.data(),u=m._private.rscratch,e={id:_.id,source:_.source,target:_.target,startX:u.startX,startY:u.startY,midX:u.midX,midY:u.midY,endX:u.endX,endY:u.endY};return Object.keys(_).forEach(t=>{["id","source","target"].includes(t)||(e[t]=_[t])}),e})}async function ot(R,m){H.debug("Starting cose-bilkent layout algorithm");try{st(R);const _=await nt(R),u=rt(_),e=it(_);return H.debug(`Layout completed: ${u.length} nodes, ${e.length} edges`),{nodes:u,edges:e}}catch(_){throw H.error("Error in cose-bilkent layout algorithm:",_),_}}function st(R){if(!R)throw new Error("Layout data is required");if(!R.config)throw new Error("Configuration is required in layout data");if(!R.rootNode)throw new Error("Root node is required");if(!R.nodes||!Array.isArray(R.nodes))throw new Error("No nodes found in layout data");if(!Array.isArray(R.edges))throw new Error("Edges array is required in layout data");return!0}V.use(ct),X(tt,"addNodes"),X(et,"addEdges"),X(nt,"createCytoscapeInstance"),X(rt,"extractPositionedNodes"),X(it,"extractPositionedEdges"),X(ot,"executeCoseBilkentLayout"),X(st,"validateLayoutData");var dt=X(async(R,m,{insertCluster:_,insertEdge:u,insertEdgeLabel:e,insertMarkers:t,insertNode:o,log:r,positionEdgeLabel:n},{algorithm:i})=>{const h={},a={},g=m.select("g");t(g,R.markers,R.type,R.diagramId);const p=g.insert("g").attr("class","subgraphs"),l=g.insert("g").attr("class","edgePaths"),f=g.insert("g").attr("class","edgeLabels"),A=g.insert("g").attr("class","nodes");r.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(R.nodes.map(async y=>{if(y.isGroup){const N={...y};a[y.id]=N,h[y.id]=N,await _(p,y)}else{const N={...y};h[y.id]=N;const s=await o(A,y,{config:R.config,dir:R.direction||"TB"}),d=s.node().getBBox();N.width=d.width,N.height=d.height,N.domId=s,r.debug(`Node ${y.id} dimensions: ${d.width}x${d.height}`)}})),r.debug("Running cose-bilkent layout algorithm");const T={...R,nodes:R.nodes.map(y=>{const N=h[y.id];return{...y,width:N.width,height:N.height}})},v=await ot(T,R.config);r.debug("Positioning nodes based on layout results"),v.nodes.forEach(y=>{const N=h[y.id];N!=null&&N.domId&&(N.domId.attr("transform",`translate(${y.x}, ${y.y})`),N.x=y.x,N.y=y.y,r.debug(`Positioned node ${N.id} at center (${y.x}, ${y.y})`))}),v.edges.forEach(y=>{const N=R.edges.find(s=>s.id===y.id);N&&(N.points=[{x:y.startX,y:y.startY},{x:y.midX,y:y.midY},{x:y.endX,y:y.endY}])}),r.debug("Inserting and positioning edges"),await Promise.all(R.edges.map(async y=>{await e(f,y);const N=h[y.start??""],s=h[y.end??""];if(N&&s){const d=v.edges.find(c=>c.id===y.id);if(d){r.debug("APA01 positionedEdge",d);const c={...y},E=u(l,c,a,R.type,N,s,R.diagramId);n(c,E)}else{const c={...y,points:[{x:N.x||0,y:N.y||0},{x:s.x||0,y:s.y||0}]},E=u(l,c,a,R.type,N,s,R.diagramId);n(c,E)}}})),r.debug("Cose-bilkent rendering completed")},"render");export{dt as render};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{_ as m,ad as M,ae as j,af as L,ag as Y,l as i,c as H,ah as _,ai as q,a1 as z,a6 as K,a2 as O,a0 as Q,aj as U,ak as V,al as W}from"./mermaid.core-BFFCqfOn.js";import{G as k}from"./graph-BZKTtxsc.js";import{l as Z}from"./layout-D8WXi2_g.js";import{i as x}from"./_baseUniq-C5LFcyNC.js";import{c as $}from"./clone-CSxIll62.js";import{m as G}from"./min-DtVSfYKl.js";import"./index-PmY0x4Zd.js";import"./transform-D9VCJYws.js";import"./timer-Bqd5yn_a.js";import"./step-BwsUM5iJ.js";import"./isEmpty-D1t7Gran.js";import"./_baseEach-9_logFrf.js";import"./sortBy-D47H6Vyl.js";import"./_baseMap-NzEbKt5c.js";function X(e){var r={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:ee(e),edges:te(e)};return x(e.graph())||(r.value=$(e.graph())),r}function ee(e){return G(e.nodes(),function(r){var t=e.node(r),o=e.parent(r),d={v:r};return x(t)||(d.value=t),x(o)||(d.parent=o),d})}function te(e){return G(e.edges(),function(r){var t=e.edge(r),o={v:r.v,w:r.w};return x(r.name)||(o.name=r.name),x(t)||(o.value=t),o})}var l=new Map,b=new Map,P=new Map,re=m(()=>{b.clear(),P.clear(),l.clear()},"clear"),D=m((e,r)=>{const t=b.get(r)||[];return i.trace("In isDescendant",r," ",e," = ",t.includes(e)),t.includes(e)},"isDescendant"),ne=m((e,r)=>{const t=b.get(r)||[];return i.info("Descendants of ",r," is ",t),i.info("Edge is ",e),e.v!==r&&e.w!==r&&(t?t.includes(e.v)||D(e.v,r)||D(e.w,r)||t.includes(e.w):(i.debug("Tilt, ",r,",not in descendants"),!1))},"edgeInCluster"),B=m((e,r,t,o)=>{i.warn("Copying children of ",e,"root",o,"data",r.node(e),o);const d=r.children(e)||[];e!==o&&d.push(e),i.warn("Copying (nodes) clusterId",e,"nodes",d),d.forEach(s=>{if(r.children(s).length>0)B(s,r,t,o);else{const a=r.node(s);i.info("cp ",s," to ",o," with parent ",e),t.setNode(s,a),o!==r.parent(s)&&(i.warn("Setting parent",s,r.parent(s)),t.setParent(s,r.parent(s))),e!==o&&s!==e?(i.debug("Setting parent",s,e),t.setParent(s,e)):(i.info("In copy ",e,"root",o,"data",r.node(e),o),i.debug("Not Setting parent for node=",s,"cluster!==rootId",e!==o,"node!==clusterId",s!==e));const c=r.edges(s);i.debug("Copying Edges",c),c.forEach(f=>{i.info("Edge",f);const E=r.edge(f.v,f.w,f.name);i.info("Edge data",E,o);try{ne(f,o)?(i.info("Copying as ",f.v,f.w,E,f.name),t.setEdge(f.v,f.w,E,f.name),i.info("newGraph edges ",t.edges(),t.edge(t.edges()[0]))):i.info("Skipping copy of edge ",f.v,"-->",f.w," rootId: ",o," clusterId:",e)}catch(C){i.error(C)}})}i.debug("Removing node",s),r.removeNode(s)})},"copy"),J=m((e,r)=>{const t=r.children(e);let o=[...t];for(const d of t)P.set(d,e),o=[...o,...J(d,r)];return o},"extractDescendants"),ie=m((e,r,t)=>{const o=e.edges().filter(c=>c.v===r||c.w===r),d=e.edges().filter(c=>c.v===t||c.w===t),s=o.map(c=>({v:c.v===r?t:c.v,w:c.w===r?r:c.w})),a=d.map(c=>({v:c.v,w:c.w}));return s.filter(c=>a.some(f=>c.v===f.v&&c.w===f.w))},"findCommonEdges"),I=m((e,r,t)=>{const o=r.children(e);if(i.trace("Searching children of id ",e,o),o.length<1)return e;let d;for(const s of o){const a=I(s,r,t),c=ie(r,t,a);if(a){if(!(c.length>0))return a;d=a}}return d},"findNonClusterChild"),A=m(e=>l.has(e)&&l.get(e).externalConnections&&l.has(e)?l.get(e).id:e,"getAnchorId"),ae=m((e,r)=>{if(!e||r>10)i.debug("Opting out, no graph ");else{i.debug("Opting in, graph "),e.nodes().forEach(function(t){e.children(t).length>0&&(i.warn("Cluster identified",t," Replacement id in edges: ",I(t,e,t)),b.set(t,J(t,e)),l.set(t,{id:I(t,e,t),clusterData:e.node(t)}))}),e.nodes().forEach(function(t){const o=e.children(t),d=e.edges();o.length>0?(i.debug("Cluster identified",t,b),d.forEach(s=>{D(s.v,t)^D(s.w,t)&&(i.warn("Edge: ",s," leaves cluster ",t),i.warn("Descendants of XXX ",t,": ",b.get(t)),l.get(t).externalConnections=!0)})):i.debug("Not a cluster ",t,b)});for(let t of l.keys()){const o=l.get(t).id,d=e.parent(o);d!==t&&l.has(d)&&!l.get(d).externalConnections&&(l.get(t).id=d)}e.edges().forEach(function(t){const o=e.edge(t);i.warn("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),i.warn("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(e.edge(t)));let d=t.v,s=t.w;if(i.warn("Fix XXX",l,"ids:",t.v,t.w,"Translating: ",l.get(t.v)," --- ",l.get(t.w)),l.get(t.v)||l.get(t.w)){if(i.warn("Fixing and trying - removing XXX",t.v,t.w,t.name),d=A(t.v),s=A(t.w),e.removeEdge(t.v,t.w,t.name),d!==t.v){const a=e.parent(d);l.get(a).externalConnections=!0,o.fromCluster=t.v}if(s!==t.w){const a=e.parent(s);l.get(a).externalConnections=!0,o.toCluster=t.w}i.warn("Fix Replacing with XXX",d,s,t.name),e.setEdge(d,s,o,t.name)}}),i.warn("Adjusted Graph",X(e)),T(e,0),i.trace(l)}},"adjustClustersAndEdges"),T=m((e,r)=>{var d,s;if(i.warn("extractor - ",r,X(e),e.children("D")),r>10)return void i.error("Bailing out");let t=e.nodes(),o=!1;for(const a of t){const c=e.children(a);o=o||c.length>0}if(o){i.debug("Nodes = ",t,r);for(const a of t)if(i.debug("Extracting node",a,l,l.has(a)&&!l.get(a).externalConnections,!e.parent(a),e.node(a),e.children("D")," Depth ",r),l.has(a))if(!l.get(a).externalConnections&&e.children(a)&&e.children(a).length>0){i.warn("Cluster without external connections, without a parent and with children",a,r);let c=e.graph().rankdir==="TB"?"LR":"TB";(s=(d=l.get(a))==null?void 0:d.clusterData)!=null&&s.dir&&(c=l.get(a).clusterData.dir,i.warn("Fixing dir",l.get(a).clusterData.dir,c));const f=new k({multigraph:!0,compound:!0}).setGraph({rankdir:c,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});i.warn("Old graph before copy",X(e)),B(a,e,f,a),e.setNode(a,{clusterNode:!0,id:a,clusterData:l.get(a).clusterData,label:l.get(a).label,graph:f}),i.warn("New graph after copy node: (",a,")",X(f)),i.debug("Old graph after copy",X(e))}else i.warn("Cluster ** ",a," **not meeting the criteria !externalConnections:",!l.get(a).externalConnections," no parent: ",!e.parent(a)," children ",e.children(a)&&e.children(a).length>0,e.children("D"),r),i.debug(l);else i.debug("Not a cluster",a,r);t=e.nodes(),i.warn("New list of nodes",t);for(const a of t){const c=e.node(a);i.warn(" Now next level",a,c),c!=null&&c.clusterNode&&T(c.graph,r+1)}}else i.debug("Done, no node has children",e.nodes())},"extractor"),R=m((e,r)=>{if(r.length===0)return[];let t=Object.assign([],r);return r.forEach(o=>{const d=e.children(o),s=R(e,d);t=[...t,...s]}),t},"sorter"),oe=m(e=>R(e,e.children()),"sortNodesByHierarchy"),F=m(async(e,r,t,o,d,s)=>{i.warn("Graph in recursive render:XAX",X(r),d);const a=r.graph().rankdir;i.trace("Dir in recursive render - dir:",a);const c=e.insert("g").attr("class","root");r.nodes()?i.info("Recursive render XXX",r.nodes()):i.info("No nodes found for",r),r.edges().length>0&&i.info("Recursive edges",r.edge(r.edges()[0]));const f=c.insert("g").attr("class","clusters"),E=c.insert("g").attr("class","edgePaths"),C=c.insert("g").attr("class","edgeLabels"),p=c.insert("g").attr("class","nodes");await Promise.all(r.nodes().map(async function(g){const n=r.node(g);if(d!==void 0){const h=JSON.parse(JSON.stringify(d.clusterData));i.trace(`Setting data for parent cluster XXX
|
|
2
|
+
Node.id = `,g,`
|
|
3
|
+
data=`,h.height,`
|
|
4
|
+
Parent cluster`,d.height),r.setNode(d.id,h),r.parent(g)||(i.trace("Setting parent",g,d.id),r.setParent(g,d.id,h))}if(i.info("(Insert) Node XXX"+g+": "+JSON.stringify(r.node(g))),n==null?void 0:n.clusterNode){i.info("Cluster identified XBX",g,n.width,r.node(g));const{ranksep:h,nodesep:u}=r.graph();n.graph.setGraph({...n.graph.graph(),ranksep:h+25,nodesep:u});const N=await F(p,n.graph,t,o,r.node(g),s),S=N.elem;_(n,S),n.diff=N.diff||0,i.info("New compound node after recursive render XAX",g,"width",n.width,"height",n.height),q(S,n)}else r.children(g).length>0?(i.trace("Cluster - the non recursive path XBX",g,n.id,n,n.width,"Graph:",r),i.trace(I(n.id,r)),l.set(n.id,{id:I(n.id,r),node:n})):(i.trace("Node - the non recursive path XAX",g,p,r.node(g),a),await z(p,r.node(g),{config:s,dir:a}))})),await m(async()=>{const g=r.edges().map(async function(n){const h=r.edge(n.v,n.w,n.name);i.info("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),i.info("Edge "+n.v+" -> "+n.w+": ",n," ",JSON.stringify(r.edge(n))),i.info("Fix",l,"ids:",n.v,n.w,"Translating: ",l.get(n.v),l.get(n.w)),await W(C,h)});await Promise.all(g)},"processEdges")(),i.info("Graph before layout:",JSON.stringify(X(r))),i.info("############################################# XXX"),i.info("### Layout ### XXX"),i.info("############################################# XXX"),Z(r),i.info("Graph after layout:",JSON.stringify(X(r)));let y=0,{subGraphTitleTotalMargin:v}=K(s);return await Promise.all(oe(r).map(async function(g){var h;const n=r.node(g);if(i.info("Position XBX => "+g+": ("+n.x,","+n.y,") width: ",n.width," height: ",n.height),n==null?void 0:n.clusterNode)n.y+=v,i.info("A tainted cluster node XBX1",g,n.id,n.width,n.height,n.x,n.y,r.parent(g)),l.get(n.id).node=n,O(n);else if(r.children(g).length>0){i.info("A pure cluster node XBX1",g,n.id,n.x,n.y,n.width,n.height,r.parent(g)),n.height+=v,r.node(n.parentId);const u=(n==null?void 0:n.padding)/2||0,N=((h=n==null?void 0:n.labelBBox)==null?void 0:h.height)||0,S=N-u||0;i.debug("OffsetY",S,"labelHeight",N,"halfPadding",u),await Q(f,n),l.get(n.id).node=n}else{const u=r.node(n.parentId);n.y+=v/2,i.info("A regular node XBX1 - using the padding",n.id,"parent",n.parentId,n.width,n.height,n.x,n.y,"offsetY",n.offsetY,"parent",u,u==null?void 0:u.offsetY,n),O(n)}})),r.edges().forEach(function(g){const n=r.edge(g);i.info("Edge "+g.v+" -> "+g.w+": "+JSON.stringify(n),n),n.points.forEach(S=>S.y+=v/2);const h=r.node(g.v);var u=r.node(g.w);const N=U(E,n,l,t,h,u,o);V(n,N)}),r.nodes().forEach(function(g){const n=r.node(g);i.info(g,n.type,n.diff),n.isGroup&&(y=n.diff)}),i.warn("Returning from recursive render XAX",c,y),{elem:c,diff:y}},"recursiveRender"),se=m(async(e,r)=>{var s,a,c,f,E,C;const t=new k({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:((s=e.config)==null?void 0:s.nodeSpacing)||((c=(a=e.config)==null?void 0:a.flowchart)==null?void 0:c.nodeSpacing)||e.nodeSpacing,ranksep:((f=e.config)==null?void 0:f.rankSpacing)||((C=(E=e.config)==null?void 0:E.flowchart)==null?void 0:C.rankSpacing)||e.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),o=r.select("g");M(o,e.markers,e.type,e.diagramId),j(),L(),Y(),re(),e.nodes.forEach(p=>{t.setNode(p.id,{...p}),p.parentId&&t.setParent(p.id,p.parentId)}),i.debug("Edges:",e.edges),e.edges.forEach(p=>{if(p.start===p.end){const w=p.start,y=w+"---"+w+"---1",v=w+"---"+w+"---2",g=t.node(w);t.setNode(y,{domId:y,id:y,parentId:g.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),t.setParent(y,g.parentId),t.setNode(v,{domId:v,id:v,parentId:g.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),t.setParent(v,g.parentId);const n=structuredClone(p),h=structuredClone(p),u=structuredClone(p);n.label="",n.arrowTypeEnd="none",n.id=w+"-cyclic-special-1",h.arrowTypeStart="none",h.arrowTypeEnd="none",h.id=w+"-cyclic-special-mid",u.label="",g.isGroup&&(n.fromCluster=w,u.toCluster=w),u.id=w+"-cyclic-special-2",u.arrowTypeStart="none",t.setEdge(w,y,n,w+"-cyclic-special-0"),t.setEdge(y,v,h,w+"-cyclic-special-1"),t.setEdge(v,w,u,w+"-cyc<lic-special-2")}else t.setEdge(p.start,p.end,{...p},p.id)}),i.warn("Graph at first:",JSON.stringify(X(t))),ae(t),i.warn("Graph after XAX:",JSON.stringify(X(t)));const d=H();await F(o,t,e.type,e.diagramId,void 0,d)},"render");export{se as render};
|
package/dist/assets/{data-grid-overlay-editor-BN_wulc3.js → data-grid-overlay-editor-B47j5GJJ.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,
|
|
1
|
+
import{r as t,c4 as Q}from"./index-PmY0x4Zd.js";import{s as U,i as N,a as Z,b as _,T as ee,C as te,m as re}from"./glide-data-editor-CNDLEJ9a.js";import"./trash-rxdjLzkf.js";const ie=U("div")({name:"DataGridOverlayEditorStyle",class:"gdg-d19meir1",propsAsIs:!1,vars:{"d19meir1-0":[r=>r.targetY,"px"],"d19meir1-1":[r=>r.targetX,"px"],"d19meir1-2":[r=>r.targetWidth,"px"],"d19meir1-3":[r=>r.targetHeight,"px"],"d19meir1-4":[r=>r.targetY+10,"px"],"d19meir1-5":[r=>Math.max(0,(r.targetHeight-28)/2),"px"]}});function ne(){const[r,s]=(function(){const[a,o]=t.useState();return[a??void 0,o]})(),[n,p]=t.useState(0),[v,k]=t.useState(!0);return t.useLayoutEffect(()=>{if(r===void 0||!("IntersectionObserver"in window))return;const a=new IntersectionObserver(o=>{o.length!==0&&k(o[0].isIntersecting)},{threshold:1});return a.observe(r),()=>a.disconnect()},[r]),t.useEffect(()=>{if(v||r===void 0)return;let a;const o=()=>{const{right:O}=r.getBoundingClientRect();p(x=>Math.min(x+window.innerWidth-O-10,0)),a=requestAnimationFrame(o)};return a=requestAnimationFrame(o),()=>{a!==void 0&&cancelAnimationFrame(a)}},[r,v]),{ref:s,style:t.useMemo(()=>({transform:`translateX(${n}px)`}),[n])}}const ae=r=>{const{target:s,content:n,onFinishEditing:p,forceEditMode:v,initialValue:k,imageEditorOverride:a,markdownDivCreateNode:o,highlight:O,className:x,theme:S,id:W,cell:f,bloom:u,validateCell:d,getCellRenderer:R,provideEditor:h,isOutsideClick:X,customEventTarget:Y}=r,[l,q]=t.useState(v?n:void 0),w=t.useRef(l??n);w.current=l??n;const[y,P]=t.useState(()=>d===void 0||!(N(n)&&(d==null?void 0:d(f,n,w.current))===!1)),g=t.useCallback((e,i)=>{p(y?e:void 0,i)},[y,p]),B=t.useCallback(e=>{if(d!==void 0&&e!==void 0&&N(e)){const i=d(f,e,w.current);i===!1?P(!1):(typeof i=="object"&&(e=i),P(!0))}q(e)},[f,d]),E=t.useRef(!1),m=t.useRef(void 0),G=t.useCallback(()=>{g(l,[0,0]),E.current=!0},[l,g]),j=t.useCallback((e,i)=>{g(e,i??m.current??[0,0]),E.current=!0},[g]),L=t.useCallback(async e=>{let i=!1;e.key==="Escape"?(e.stopPropagation(),e.preventDefault(),m.current=[0,0]):e.key!=="Enter"||e.shiftKey?e.key==="Tab"&&(e.stopPropagation(),e.preventDefault(),m.current=[e.shiftKey?-1:1,0],i=!0):(e.stopPropagation(),e.preventDefault(),m.current=[0,1],i=!0),window.setTimeout(()=>{E.current||m.current===void 0||(g(i?l:void 0,m.current),E.current=!0)},0)},[g,l]),D=l??n,[c,$]=t.useMemo(()=>{var C,V;if(Z(n))return[];const e={...n,location:f},i=h==null?void 0:h(e);return i!==void 0?[i,!1]:[(V=(C=R(n))==null?void 0:C.provideEditor)==null?void 0:V.call(C,e),!1]},[f,n,R,h]),{ref:z,style:J}=ne();let F,b,I=!0,T=!0;if(c!==void 0){I=c.disablePadding!==!0,T=c.disableStyling!==!0;const e=_(c);e&&(b=c.styleOverride);const i=e?c.editor:c;F=t.createElement(i,{isHighlighted:O,onChange:B,value:D,initialValue:k,onFinishedEditing:j,validatedSelection:N(D)?D.selectionRange:void 0,forceEditMode:v,target:s,imageEditorOverride:a,markdownDivCreateNode:o,isValid:y,theme:S})}b={...b,...J};const A=document.getElementById("portal");if(A===null)return console.error('Cannot open Data Grid overlay editor, because portal not found. Please add `<div id="portal" />` as the last child of your `<body>`.'),null;let M=T?"gdg-style":"gdg-unstyle";y||(M+=" gdg-invalid"),I&&(M+=" gdg-pad");const H=(u==null?void 0:u[0])??1,K=(u==null?void 0:u[1])??1;return Q.createPortal(t.createElement(ee.Provider,{value:S},t.createElement(te,{style:re(S),className:x,onClickOutside:G,isOutsideClick:X,customEventTarget:Y},t.createElement(ie,{ref:z,id:W,className:M,style:b,as:$===!0?"label":void 0,targetX:s.x-H,targetY:s.y-K,targetWidth:s.width+2*H,targetHeight:s.height+2*K},t.createElement("div",{className:"gdg-clip-region",onKeyDown:L},F)))),A)};export{ae as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as V,T as M,b8 as Pe,b9 as De,j as n,ba as Le,bb as ae,av as se,bc as Ae,bd as ze,be as Ee,bf as ne,bg as Ve,d as F,ay as re,bh as oe,K as X,bi as le,bj as Be,bk as me,b as ce,bl as ie,a_ as Y,a2 as de,bm as Ke,bn as Me,bo as Oe,bp as Ge,bq as He,ax as Je,br as Re,bs as Ue,aB as Z,bt as We,bu as pe,bv as ue,bw as Q,bx as Xe,by as Ye,S as Ze,bz as he,bA as be,bB as xe,bC as ee,bD as Qe,bE as et,bF as tt,aI as at,bG as st,bH as fe,bI as nt,bJ as rt,bK as ot,bL as lt,C as mt,bM as ct,bN as it,bO as dt,__tla as pt}from"./index-PmY0x4Zd.js";import{b as ut,d as ht,__tla as bt}from"./storage-BNcWOH3-.js";import{P as xt}from"./empty-state-DIOGM_CU.js";import{A as ge,__tla as ft}from"./edit-page-CyTMQV2u.js";import{s as je}from"./sortBy-D47H6Vyl.js";import"./index-BJVyzkx5.js";import"./index-B_d_JZGI.js";import"./index-DkntzpX4.js";import"./index-qE8lHQ-N.js";import"./index-DCkzth56.js";import"./index-CXrWwFX6.js";import"./index-Brf2DwUM.js";import"./index-DZhOPkOB.js";import"./index-CerjupfZ.js";import"./index-WXJFkQHg.js";import"./index-BgXbBA39.js";import"./index-DFrGFNW1.js";import"./index-D3PqGupX.js";import"./apl-CXdQSnD-.js";import"./asciiarmor-D5V0T9Cu.js";import"./asn1-DWPaVWf6.js";import"./brainfuck-CtZaYBKt.js";import"./cobol-stawOqaz.js";import"./clike-BgBwzOhw.js";import"./clojure-DiuoqK-z.js";import"./css-ZjFoif2m.js";import"./cmake-DXn5xaP-.js";import"./coffeescript-BTDxI-eT.js";import"./commonlisp-vq6DHwts.js";import"./cypher-gJDei3ni.js";import"./python-DD-Q2bae.js";import"./crystal-CRzZ78HM.js";import"./d-BShv7fp-.js";import"./diff-UJJ5BM9S.js";import"./dtd-DI9Herc-.js";import"./dylan-DkEP81N9.js";import"./ecl-DPFc0Uaf.js";import"./eiffel-DR5c0IrL.js";import"./elm-DompmV0j.js";import"./erlang-BuqgqA5h.js";import"./factor-CFXhaUWb.js";import"./simple-mode-C3vEBAcb.js";import"./forth-POgR1ypr.js";import"./fortran-DL7KluxX.js";import"./mllike-3c2dg9RT.js";import"./gas-bV0CklSb.js";import"./gherkin-B6X1vGSW.js";import"./groovy-DnIzCrpZ.js";import"./haskell-CLQs6EAM.js";import"./haxe-D25e-2l-.js";import"./idl-pcmmZuaN.js";import"./javascript-BpzJj0-u.js";import"./jinja2-DhgKlfW7.js";import"./julia-DjdwvFuI.js";import"./livescript-HO6ttBFx.js";import"./lua-8DXOpKDz.js";import"./mirc-DkvFAiy5.js";import"./mathematica-IIbmv7SK.js";import"./modelica-DSrSSXCg.js";import"./mumps-zvxmGV4l.js";import"./mbox-z_N2Mo3d.js";import"./nsis-BvKfQ9lQ.js";import"./ntriples-BSwWqoLa.js";import"./octave-C4hdQ5Hf.js";import"./oz-qQq7irPq.js";import"./pascal-CafrKXZF.js";import"./perl-tdMlh9QA.js";import"./pig-CwGJVRC4.js";import"./powershell-D1ly3AHC.js";import"./properties-_nPj978X.js";import"./protobuf-B4y9do6W.js";import"./pug-BTvK5tSS.js";import"./puppet-Bc-yJKzi.js";import"./q-B0kTJ4cI.js";import"./r-BA4EbLKE.js";import"./rpm-DI_rRufH.js";import"./ruby-CR-u2WLS.js";import"./sas-Bqaci40L.js";import"./scheme-qjP0V5Ag.js";import"./shell-BLav31RL.js";import"./sieve-r025o_jW.js";import"./smalltalk-C7J3IyEP.js";import"./sparql-BRLJFz69.js";import"./stylus-Bdo_Aemu.js";import"./swift-B_XXVlXX.js";import"./verilog-B4LBqg_1.js";import"./tcl-B2fODqDH.js";import"./textile-BuVhTOzU.js";import"./toml-wcPdHu67.js";import"./troff-Ce85hlLp.js";import"./ttcn-BxnYHtq8.js";import"./ttcn-cfg-CKJxb-l2.js";import"./turtle-BkSuIpt-.js";import"./webidl-CGwyPRYs.js";import"./vb-BHgjm0DN.js";import"./vbscript-Dawdd5GZ.js";import"./velocity-BdD_26Jv.js";import"./vhdl-CWWH2SUo.js";import"./xquery-CVDBqZPY.js";import"./yacas-I8QjZlxf.js";import"./z80-D8p3gKXp.js";import"./mscgen-B2igx18G.js";import"./index-zrSUQXha.js";import"./trash-rxdjLzkf.js";import"./links-4B6ldZ5P.js";import"./_createAggregator-ZRm2b6Zm.js";import"./_baseEach-9_logFrf.js";import{__tla as gt}from"./loro_wasm_bg-C1ks32Vm.js";import"./_baseMap-NzEbKt5c.js";let Ne,jt=Promise.all([(()=>{try{return pt}catch{}})(),(()=>{try{return bt}catch{}})(),(()=>{try{return ft}catch{}})(),(()=>{try{return gt}catch{}})()]).then(async()=>{const _e=s=>{const e=V.c(8),{variableName:t,className:a}=s;let o;e[0]!==t?(o=()=>{const u=(function(f){const i=Le.get(ae)[f];if(i)return i.declaredBy[0]})(t);if(!u)return;const N=Pe(u);N&&De(N,t)},e[0]=t,e[1]=o):o=e[1];const c=o;let r,j;return e[2]!==a?(r=M("text-link opacity-80 hover:opacity-100 hover:underline",a),e[2]=a,e[3]=r):r=e[3],e[4]!==c||e[5]!==r||e[6]!==t?(j=n.jsx("button",{type:"button",onClick:c,className:r,children:t}),e[4]=c,e[5]=r,e[6]=t,e[7]=j):j=e[7],j},ye=se(s=>{const e=s(Ae),t=s(ae),a=s(ze);return je(e,o=>{if(!o.variable_name)return-1;const c=Object.values(t).find(j=>j.name===o.variable_name);if(!c)return 0;const r=a.inOrderIds.indexOf(c.declaredBy[0]);return r===-1?0:r})}),we=se(s=>{const e=new Map(s(Ee));for(const t of ne){const a=e.get(t);a&&(a.databases.length===0&&e.delete(t),a.databases.length===1&&a.databases[0].name===Ve&&a.databases[0].schemas.length===0&&e.delete(t))}return je([...e.values()],t=>ne.has(t.name)?1:0)}),ve=()=>{const s=V.c(32),[e,t]=F.useState(""),a=re(oe),o=X(ye),c=X(we);if(o.length===0&&c.length===0){let d;return s[0]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(xt,{title:"No tables found",description:"Any datasets/dataframes in the global scope will be shown here.",action:n.jsx(ge,{children:n.jsxs(Y,{variant:"outline",size:"sm",children:["Add database or catalog",n.jsx(de,{className:"h-4 w-4 ml-2"})]})}),icon:n.jsx(ie,{})}),s[0]=d):d=s[0],d}const r=!!e.trim();let j,u,N,f,i,b,x,m,g,l;if(s[1]!==a?(j=d=>{a(d.length>0),t(d)},s[1]=a,s[2]=j):j=s[2],s[3]!==e||s[4]!==j?(u=n.jsx(Ke,{placeholder:"Search tables...",className:"h-6 m-1",value:e,onValueChange:j,rootClassName:"flex-1 border-r"}),s[3]=e,s[4]=j,s[5]=u):u=s[5],s[6]!==r?(N=r&&n.jsx("button",{type:"button",className:"float-right border-b px-2 m-0 h-full hover:bg-accent hover:text-accent-foreground",onClick:()=>t(""),children:n.jsx(Me,{className:"h-4 w-4"})}),s[6]=r,s[7]=N):N=s[7],s[8]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx(ge,{children:n.jsx("button",{type:"button",className:"float-right border-b px-2 m-0 h-full hover:bg-accent hover:text-accent-foreground",children:n.jsx(de,{className:"h-4 w-4"})})}),s[8]=f):f=s[8],s[9]!==u||s[10]!==N?(i=n.jsxs("div",{className:"flex items-center w-full",children:[u,N,f]}),s[9]=u,s[10]=N,s[11]=i):i=s[11],s[12]!==c||s[13]!==r||s[14]!==e){let d;s[16]!==r||s[17]!==e?(d=h=>n.jsx(Se,{connection:h,hasChildren:h.databases.length>0,children:h.databases.map(p=>n.jsx(Ce,{engineName:h.name,database:p,hasSearch:r,children:n.jsx($e,{schemas:p.schemas,defaultSchema:h.default_schema,defaultDatabase:h.default_database,engineName:h.name,databaseName:p.name,hasSearch:r,searchValue:e})},p.name))},h.name),s[16]=r,s[17]=e,s[18]=d):d=s[18],b=c.map(d),s[12]=c,s[13]=r,s[14]=e,s[15]=b}else b=s[15];return s[19]!==c.length||s[20]!==o.length?(x=c.length>0&&o.length>0&&n.jsxs(le,{children:[n.jsx(Be,{className:"h-4 w-4 text-muted-foreground"}),n.jsx("span",{className:"text-xs",children:"Python"})]}),s[19]=c.length,s[20]=o.length,s[21]=x):x=s[21],s[22]!==e||s[23]!==o?(m=o.length>0&&n.jsx(te,{tables:o,searchValue:e}),s[22]=e,s[23]=o,s[24]=m):m=s[24],s[25]!==b||s[26]!==x||s[27]!==m?(g=n.jsxs(Oe,{className:"flex flex-col",children:[b,x,m]}),s[25]=b,s[26]=x,s[27]=m,s[28]=g):g=s[28],s[29]!==i||s[30]!==g?(l=n.jsxs(Ge,{className:"border-b bg-background rounded-none h-full pb-10 overflow-auto outline-hidden",shouldFilter:!1,children:[i,g]}),s[29]=i,s[30]=g,s[31]=l):l=s[31],l},Se=s=>{const e=V.c(26),{connection:t,children:a,hasChildren:o}=s,c=t.name===He,r=c?"In-Memory":t.name,{previewDataSourceConnection:j}=Je(),[u,N]=F.useState(!1);let f;e[0]!==t.name||e[1]!==j?(f=async()=>{N(!0),await j({engine:t.name}),setTimeout(()=>N(!1),500)},e[0]=t.name,e[1]=j,e[2]=f):f=e[2];const i=f;let b,x,m;e[3]!==t.dialect?(b=n.jsx(Re,{className:"h-4 w-4 text-muted-foreground",name:t.dialect}),e[3]=t.dialect,e[4]=b):b=e[4],e[5]!==t.dialect?(x=Ue(t.dialect),e[5]=t.dialect,e[6]=x):x=e[6],e[7]!==x?(m=n.jsx("span",{className:"text-xs",children:x}),e[7]=x,e[8]=m):m=e[8];const g=r;let l,d,h,p,_;return e[9]!==g?(l=n.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",n.jsx(_e,{variableName:g}),")"]}),e[9]=g,e[10]=l):l=e[10],e[11]!==i||e[12]!==c||e[13]!==u?(d=!c&&n.jsx(Z,{content:"Refresh connection",children:n.jsx(Y,{variant:"ghost",size:"icon",className:"ml-auto hover:bg-transparent hover:shadow-none",onClick:i,children:n.jsx(We,{className:M("h-4 w-4 text-muted-foreground hover:text-foreground",u&&"animate-[spin_0.5s]")})})}),e[11]=i,e[12]=c,e[13]=u,e[14]=d):d=e[14],e[15]!==b||e[16]!==m||e[17]!==l||e[18]!==d?(h=n.jsxs(le,{children:[b,m,l,d]}),e[15]=b,e[16]=m,e[17]=l,e[18]=d,e[19]=h):h=e[19],e[20]!==a||e[21]!==o?(p=o?a:n.jsx(Q,{content:"No databases available",className:"pl-2"}),e[20]=a,e[21]=o,e[22]=p):p=e[22],e[23]!==h||e[24]!==p?(_=n.jsxs(n.Fragment,{children:[h,p]}),e[23]=h,e[24]=p,e[25]=_):_=e[25],_},Ce=s=>{const e=V.c(25),{hasSearch:t,engineName:a,database:o,children:c}=s,[r,j]=F.useState(!1),[u,N]=F.useState(!1),[f,i]=F.useState(t);let b;f!==t&&(i(t),j(t)),e[0]!==r||e[1]!==u?(b=()=>{j(!r),N(!u)},e[0]=r,e[1]=u,e[2]=b):b=e[2];const x=`${a}:${o.name}`;let m;e[3]!==r?(m=n.jsx(xe,{isExpanded:r}),e[3]=r,e[4]=m):m=e[4];const g=u&&r?"text-foreground":"text-muted-foreground";let l,d;e[5]!==g?(l=M("h-4 w-4",g),e[5]=g,e[6]=l):l=e[6],e[7]!==l?(d=n.jsx(ie,{className:l}),e[7]=l,e[8]=d):d=e[8];const h=u&&r&&"font-semibold";let p,_,y,w;e[9]!==h?(p=M(h),e[9]=h,e[10]=p):p=e[10],e[11]!==o.name?(_=o.name===""?n.jsx("i",{children:"Not connected"}):o.name,e[11]=o.name,e[12]=_):_=e[12],e[13]!==p||e[14]!==_?(y=n.jsx("span",{className:p,children:_}),e[13]=p,e[14]=_,e[15]=y):y=e[15],e[16]!==b||e[17]!==y||e[18]!==x||e[19]!==m||e[20]!==d?(w=n.jsxs(ee,{className:"text-sm flex flex-row gap-1 items-center cursor-pointer rounded-none",onSelect:b,value:x,children:[m,d,y]}),e[16]=b,e[17]=y,e[18]=x,e[19]=m,e[20]=d,e[21]=w):w=e[21];const v=r&&c;let S;return e[22]!==w||e[23]!==v?(S=n.jsxs(n.Fragment,{children:[w,v]}),e[22]=w,e[23]=v,e[24]=S):S=e[24],S},$e=s=>{const e=V.c(20),{schemas:t,defaultSchema:a,defaultDatabase:o,engineName:c,databaseName:r,hasSearch:j,searchValue:u}=s;if(t.length===0){let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(Q,{content:"No schemas available",className:"pl-6"}),e[0]=i):i=e[0],i}let N,f;if(e[1]!==r||e[2]!==o||e[3]!==a||e[4]!==c||e[5]!==j||e[6]!==t||e[7]!==u){let i;e[9]!==u?(i=m=>!u||m.tables.some(g=>g.name.toLowerCase().includes(u.toLowerCase())),e[9]=u,e[10]=i):i=e[10];const b=t.filter(i);let x;e[11]!==r||e[12]!==o||e[13]!==a||e[14]!==c||e[15]!==j||e[16]!==u?(x=m=>n.jsx(ke,{databaseName:r,schema:m,hasSearch:j,children:n.jsx(te,{tables:m.tables,searchValue:u,sqlTableContext:{engine:c,database:r,schema:m.name,defaultSchema:a,defaultDatabase:o}})},m.name),e[11]=r,e[12]=o,e[13]=a,e[14]=c,e[15]=j,e[16]=u,e[17]=x):x=e[17],N=b.map(x),e[1]=r,e[2]=o,e[3]=a,e[4]=c,e[5]=j,e[6]=t,e[7]=u,e[8]=N}else N=e[8];return e[18]!==N?(f=n.jsx(n.Fragment,{children:N}),e[18]=N,e[19]=f):f=e[19],f},ke=s=>{const e=V.c(23),{databaseName:t,schema:a,children:o,hasSearch:c}=s,[r,j]=F.useState(c),[u,N]=F.useState(!1),f=`${t}:${a.name}`;if(be(a.name))return o;let i,b;e[0]!==r||e[1]!==u?(i=()=>{j(!r),N(!u)},e[0]=r,e[1]=u,e[2]=i):i=e[2],e[3]!==r?(b=n.jsx(xe,{isExpanded:r}),e[3]=r,e[4]=b):b=e[4];const x=u&&r&&"text-foreground";let m,g;e[5]!==x?(m=M("h-4 w-4 text-muted-foreground",x),e[5]=x,e[6]=m):m=e[6],e[7]!==m?(g=n.jsx(dt,{className:m}),e[7]=m,e[8]=g):g=e[8];const l=u&&r&&"font-semibold";let d,h,p;e[9]!==l?(d=M(l),e[9]=l,e[10]=d):d=e[10],e[11]!==a.name||e[12]!==d?(h=n.jsx("span",{className:d,children:a.name}),e[11]=a.name,e[12]=d,e[13]=h):h=e[13],e[14]!==i||e[15]!==b||e[16]!==g||e[17]!==h||e[18]!==f?(p=n.jsxs(ee,{className:"text-sm flex flex-row gap-1 items-center pl-5 cursor-pointer rounded-none",onSelect:i,value:f,children:[b,g,h]}),e[14]=i,e[15]=b,e[16]=g,e[17]=h,e[18]=f,e[19]=p):p=e[19];const _=r&&o;let y;return e[20]!==_||e[21]!==p?(y=n.jsxs(n.Fragment,{children:[p,_]}),e[20]=_,e[21]=p,e[22]=y):y=e[22],y},te=s=>{const e=V.c(24),{tables:t,sqlTableContext:a,searchValue:o}=s,{addTableList:c}=me(),[r,j]=F.useState(!1),[u,N]=F.useState(!1);let f,i;e[0]!==c||e[1]!==a||e[2]!==t.length||e[3]!==r?(f=async()=>{if(t.length===0&&a&&!r){j(!0),N(!0);const{engine:l,database:d,schema:h}=a,p=await ut.request({engine:l,database:d,schema:h});if(!(p!=null&&p.tables))throw N(!1),new Error("No tables available");c({tables:p.tables,sqlTableContext:a}),N(!1)}},e[0]=c,e[1]=a,e[2]=t.length,e[3]=r,e[4]=f):f=e[4],e[5]!==a||e[6]!==t.length||e[7]!==r?(i=[t.length,a,r],e[5]=a,e[6]=t.length,e[7]=r,e[8]=i):i=e[8];const{isPending:b,error:x}=ce(f,i);if(b||u){let l;return e[9]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(pe,{message:"Loading tables...",className:"pl-12"}),e[9]=l):l=e[9],l}if(x){let l;return e[10]!==x?(l=n.jsx(ue,{error:x,className:"pl-12"}),e[10]=x,e[11]=l):l=e[11],l}if(t.length===0){let l;return e[12]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Q,{content:"No tables found",className:"pl-9"}),e[12]=l):l=e[12],l}let m,g;if(e[13]!==o||e[14]!==a||e[15]!==t){let l;e[17]!==o?(l=p=>!o||p.name.toLowerCase().includes(o.toLowerCase()),e[17]=o,e[18]=l):l=e[18];const d=t.filter(l);let h;e[19]!==o||e[20]!==a?(h=p=>n.jsx(Te,{table:p,sqlTableContext:a,isSearching:!!o},p.name),e[19]=o,e[20]=a,e[21]=h):h=e[21],m=d.map(h),e[13]=o,e[14]=a,e[15]=t,e[16]=m}else m=e[16];return e[22]!==m?(g=n.jsx(n.Fragment,{children:m}),e[22]=m,e[23]=g):g=e[23],g},Te=s=>{const e=V.c(64),{table:t,sqlTableContext:a,isSearching:o}=s,{addTable:c}=me(),[r,j]=F.useState(!1),[u,N]=F.useState(!1),f=t.columns.length>0;let i,b;e[0]!==c||e[1]!==r||e[2]!==a||e[3]!==t.name||e[4]!==f||e[5]!==u?(i=async()=>{if(r&&!f&&a&&!u){N(!0);const{engine:q,database:U,schema:Ie}=a,W=await ht.request({engine:q,database:U,schema:Ie,tableName:t.name});if(!(W!=null&&W.table))throw new Error("No table details available");c({table:W.table,sqlTableContext:a})}},e[0]=c,e[1]=r,e[2]=a,e[3]=t.name,e[4]=f,e[5]=u,e[6]=i):i=e[6],e[7]!==r||e[8]!==f?(b=[r,f],e[7]=r,e[8]=f,e[9]=b):b=e[9];const{isFetching:x,isPending:m,error:g}=ce(i,b),l=X(Xe),d=Ye(),{createNewCell:h}=Ze(),p=he();let _;e[10]!==p||e[11]!==l||e[12]!==h||e[13]!==d||e[14]!==a||e[15]!==t?(_=()=>{Qe({autoInstantiate:l,createNewCell:h,fromCellId:d}),p((()=>{if(t.source_type==="catalog"){const q=a!=null&&a.database?`${a.database}.${t.name}`:t.name;return`${t.engine}.load_table("${q}")`}if(a)return fe({table:t,columnName:"*",sqlTableContext:a});switch(t.source_type){case"local":return`mo.ui.table(${t.name})`;case"duckdb":case"connection":return fe({table:t,columnName:"*",sqlTableContext:a});default:return nt(t.source_type),""}})())},e[10]=p,e[11]=l,e[12]=h,e[13]=d,e[14]=a,e[15]=t,e[16]=_):_=e[16];const y=_;let w;e[17]!==t.num_columns||e[18]!==t.num_rows?(w=()=>{const q=[];return t.num_rows!=null&&q.push(`${t.num_rows} rows`),t.num_columns!=null&&q.push(`${t.num_columns} columns`),q.length===0?null:n.jsx("div",{className:"flex flex-row gap-2 items-center pl-6 group-hover:hidden",children:n.jsx("span",{className:"text-xs text-muted-foreground",children:q.join(", ")})})},e[17]=t.num_columns,e[18]=t.num_rows,e[19]=w):w=e[19];const v=w;let S;e[20]!==g||e[21]!==x||e[22]!==m||e[23]!==a||e[24]!==t?(S=()=>{if(m||x)return n.jsx(pe,{message:"Loading columns...",className:"pl-12"});if(g)return n.jsx(ue,{error:g,className:"pl-12"});const q=t.columns;return q.length===0?n.jsx(Q,{content:"No columns found",className:"pl-12"}):q.map(U=>n.jsx(qe,{table:t,column:U,sqlTableContext:a},U.name))},e[20]=g,e[21]=x,e[22]=m,e[23]=a,e[24]=t,e[25]=S):S=e[25];const D=S;let I;e[26]!==r||e[27]!==o||e[28]!==t.source_type||e[29]!==t.type?(I=()=>{if(t.source_type==="local")return;const q=t.type==="table"?et:tt;return n.jsx(q,{className:"h-3 w-3",strokeWidth:r||o?2.5:void 0})},e[26]=r,e[27]=o,e[28]=t.source_type,e[29]=t.type,e[30]=I):I=e[30];const L=I,A=a?`${a.database}.${a.schema}.${t.name}`:t.name,z=a&&(be(a.schema)?"pl-9":"pl-12"),E=(r||o)&&"font-semibold";let C,$,k,P,B,K,T,J,O,G,H,R;return e[31]!==z||e[32]!==E?(C=M("rounded-none group h-8 cursor-pointer",z,E),e[31]=z,e[32]=E,e[33]=C):C=e[33],e[34]!==r?($=()=>j(!r),e[34]=r,e[35]=$):$=e[35],e[36]!==L?(k=L(),e[36]=L,e[37]=k):k=e[37],e[38]!==t.name?(P=n.jsx("span",{className:"text-sm",children:t.name}),e[38]=t.name,e[39]=P):P=e[39],e[40]!==k||e[41]!==P?(B=n.jsxs("div",{className:"flex gap-2 items-center flex-1",children:[k,P]}),e[40]=k,e[41]=P,e[42]=B):B=e[42],e[43]!==v?(K=v(),e[43]=v,e[44]=K):K=e[44],e[45]!==y?(T=at.stopPropagation(()=>y()),e[45]=y,e[46]=T):T=e[46],e[47]===Symbol.for("react.memo_cache_sentinel")?(J=n.jsx(st,{className:"h-3 w-3"}),e[47]=J):J=e[47],e[48]!==T?(O=n.jsx(Z,{content:"Add table to notebook",delayDuration:400,children:n.jsx(Y,{className:"group-hover:inline-flex hidden",variant:"text",size:"icon",onClick:T,children:J})}),e[48]=T,e[49]=O):O=e[49],e[50]!==r||e[51]!==$||e[52]!==B||e[53]!==K||e[54]!==O||e[55]!==C||e[56]!==A?(G=n.jsxs(ee,{className:C,value:A,"aria-selected":r,forceMount:!0,onSelect:$,children:[B,K,O]}),e[50]=r,e[51]=$,e[52]=B,e[53]=K,e[54]=O,e[55]=C,e[56]=A,e[57]=G):G=e[57],e[58]!==r||e[59]!==D?(H=r&&D(),e[58]=r,e[59]=D,e[60]=H):H=e[60],e[61]!==G||e[62]!==H?(R=n.jsxs(n.Fragment,{children:[G,H]}),e[61]=G,e[62]=H,e[63]=R):R=e[63],R},qe=s=>{var B,K;const e=V.c(48),{table:t,column:a,sqlTableContext:o}=s,[c,r]=F.useState(!1),j=X(oe),u=re(rt);j&&c&&r(!1),u(c?T=>new Set([...T,`${t.name}:${a.name}`]):T=>(T.delete(`${t.name}:${a.name}`),new Set(T)));const N=he(),{columnsPreviews:f}=ot();let i;e[0]!==a.name||e[1]!==t.primary_keys?(i=((B=t.primary_keys)==null?void 0:B.includes(a.name))||!1,e[0]=a.name,e[1]=t.primary_keys,e[2]=i):i=e[2];const b=i;let x;e[3]!==a.name||e[4]!==t.indexes?(x=((K=t.indexes)==null?void 0:K.includes(a.name))||!1,e[3]=a.name,e[4]=t.indexes,e[5]=x):x=e[5];const m=x;let g;e[6]!==N?(g=T=>{N(T)},e[6]=N,e[7]=g):g=e[7];const l=g,d=Fe,h=c?"font-semibold":"";let p;e[8]!==a.name||e[9]!==h?(p=n.jsx("span",{className:h,children:a.name}),e[8]=a.name,e[9]=h,e[10]=p):p=e[10];const _=p,y=`${t.name}.${a.name}`,w=`${t.name}.${a.name}`;let v;e[11]!==c?(v=()=>r(!c),e[11]=c,e[12]=v):v=e[12];const S=o?"pl-14":"pl-7";let D,I,L,A,z,E,C,$,k,P;return e[13]!==S?(D=M("flex flex-row gap-2 items-center flex-1",S),e[13]=S,e[14]=D):D=e[14],e[15]!==a.type||e[16]!==_?(I=n.jsx(lt,{columnName:_,dataType:a.type}),e[15]=a.type,e[16]=_,e[17]=I):I=e[17],e[18]!==b?(L=b&&d({tooltipContent:"Primary key",content:"PK"}),e[18]=b,e[19]=L):L=e[19],e[20]!==m?(A=m&&d({tooltipContent:"Indexed",content:"IDX"}),e[20]=m,e[21]=A):A=e[21],e[22]!==D||e[23]!==I||e[24]!==L||e[25]!==A?(z=n.jsxs("div",{className:D,children:[I,L,A]}),e[22]=D,e[23]=I,e[24]=L,e[25]=A,e[26]=z):z=e[26],e[27]!==a.name?(E=n.jsx(Z,{content:"Copy column name",delayDuration:400,children:n.jsx(Y,{variant:"text",size:"icon",className:"group-hover:opacity-100 opacity-0 hover:bg-muted text-muted-foreground hover:text-foreground",children:n.jsx(mt,{tooltip:!1,value:a.name,className:"h-3 w-3"})})}),e[27]=a.name,e[28]=E):E=e[28],e[29]!==a.external_type?(C=n.jsx("span",{className:"text-xs text-muted-foreground",children:a.external_type}),e[29]=a.external_type,e[30]=C):C=e[30],e[31]!==z||e[32]!==E||e[33]!==C||e[34]!==y||e[35]!==w||e[36]!==v?($=n.jsxs(ee,{className:"rounded-none py-1 group cursor-pointer",value:w,onSelect:v,children:[z,E,C]},y),e[31]=z,e[32]=E,e[33]=C,e[34]=y,e[35]=w,e[36]=v,e[37]=$):$=e[37],e[38]!==a||e[39]!==f||e[40]!==l||e[41]!==c||e[42]!==o||e[43]!==t?(k=c&&n.jsx("div",{className:"pl-10 pr-2 py-2 bg-(--slate-1) shadow-inner border-b",children:n.jsx(ct,{children:n.jsx(it,{table:t,column:a,onAddColumnChart:l,preview:f.get(o?`${o.database}.${o.schema}.${t.name}:${a.name}`:`${t.name}:${a.name}`),sqlTableContext:o})})}),e[38]=a,e[39]=f,e[40]=l,e[41]=c,e[42]=o,e[43]=t,e[44]=k):k=e[44],e[45]!==$||e[46]!==k?(P=n.jsxs(n.Fragment,{children:[$,k]}),e[45]=$,e[46]=k,e[47]=P):P=e[47],P};function Fe(s){const{tooltipContent:e,content:t}=s;return n.jsx(Z,{content:e,delayDuration:100,children:n.jsx("span",{className:"text-xs text-black bg-gray-100 dark:invert rounded px-1",children:t})})}Ne=()=>{const s=V.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(ve,{}),s[0]=e):e=s[0],e}});export{jt as __tla,Ne as default};
|