@marimo-team/frontend 0.14.18-dev9 → 0.15.1-dev10
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-B6NVG7Fy.js → ConnectedDataExplorerComponent-BvA88co5.js} +1 -1
- package/dist/assets/{ImageComparisonComponent-3KcZa9Ym.js → ImageComparisonComponent-DMstqRhm.js} +1 -1
- package/dist/assets/{VegaLite-CtkqxS0X.js → VegaLite-Mesl0wXW.js} +1 -1
- package/dist/assets/{_baseEach-CjvI0y7T.js → _baseEach-4LREA2xJ.js} +1 -1
- package/dist/assets/_baseMap-C6LNFWWn.js +1 -0
- package/dist/assets/{_baseUniq-Ds9S94xv.js → _baseUniq-C4wq7Gz_.js} +1 -1
- package/dist/assets/{_createAggregator-Bqe-A14O.js → _createAggregator-Di1sij95.js} +1 -1
- package/dist/assets/{any-language-editor-CGmtjfJH.js → any-language-editor-CNdroSlJ.js} +1 -1
- package/dist/assets/architectureDiagram-KFL7JDKH-BxXZfRHj.js +36 -0
- package/dist/assets/blockDiagram-ZYB65J3Q-8mg_ND0j.js +122 -0
- package/dist/assets/{c4Diagram-6F6E4RAY-CvGMgd-R.js → c4Diagram-AAMF2YG6-BH1zFYgt.js} +1 -1
- package/dist/assets/channel-B3CCoyYy.js +1 -0
- package/dist/assets/{chunk-353BL4L5-BJhgRHK-.js → chunk-ANTBXLJU-wUIE1C6t.js} +1 -1
- package/dist/assets/{chunk-AACKK3MU-tA3KIhd1.js → chunk-FHKO5MBM-BnGig1B_.js} +1 -1
- package/dist/assets/{chunk-E2GYISFI-uWIZ1Jhx.js → chunk-GLLZNHP4-BeuHRwGr.js} +1 -1
- package/dist/assets/{chunk-SZ463SBG-DHkdo7UI.js → chunk-JBRWN2VN-BEuqVuwn.js} +4 -4
- package/dist/assets/{chunk-OW32GOEJ-B-QB95S1.js → chunk-LXBSTHXV-DIaccDrz.js} +6 -6
- package/dist/assets/{chunk-SKB7J2MH-DPsXY34k.js → chunk-NRVI72HA-I0EqNhLo.js} +1 -1
- package/dist/assets/{chunk-67H74DCK-BWX3D-qq.js → chunk-OMD6QJNC-DBDKfLns.js} +1 -1
- package/dist/assets/{chunk-BFAMUDN2-CY30V5X_.js → chunk-WVR4S24B-D9vksrD4.js} +1 -1
- package/dist/assets/{circle-play-DvNUYBOa.js → circle-play-Xdbicaqg.js} +1 -1
- package/dist/assets/classDiagram-3BZAVTQC-CLXskjCP.js +1 -0
- package/dist/assets/classDiagram-v2-QTMF73CY-CLXskjCP.js +1 -0
- package/dist/assets/clone-BCc-guNO.js +1 -0
- package/dist/assets/common-keywords-Dg3Y2cJS.js +1 -0
- package/dist/assets/{compile-yfBBBvDb.js → compile-D-SKgFzl.js} +1 -1
- package/dist/assets/cytoscape.esm-UcEO6FGL.js +325 -0
- package/dist/assets/{dagre-JOIXM2OF-CGKrq8GI.js → dagre-2BBEFEWP-Dj4VJDXi.js} +1 -1
- package/dist/assets/{data-grid-overlay-editor-BeUIwx4E.js → data-grid-overlay-editor-BHUr5Xhc.js} +1 -1
- package/dist/assets/{diagram-VMROVX33-BAO1guE0.js → diagram-4IRLE6MV-9wayoyRN.js} +1 -1
- package/dist/assets/diagram-GUPCWM2R-5NhVlGLr.js +24 -0
- package/dist/assets/{diagram-ZTM2IBQH-B4LQUmZH.js → diagram-RP2FKANI-CNBOj37W.js} +1 -1
- package/dist/assets/duckdb-keywords-CFYiiNsB.js +1 -0
- package/dist/assets/edit-page-D8Xj7wsn.js +163 -0
- package/dist/assets/{erDiagram-3M52JZNH-D3kcrriI.js → erDiagram-HZWUO2LU-KEjz95KS.js} +1 -1
- package/dist/assets/flowDiagram-THRYKUMA-9PtbKpm0.js +162 -0
- package/dist/assets/ganttDiagram-WV7ZQ7D5-CFXRYmNt.js +267 -0
- package/dist/assets/{gitGraphDiagram-GW3U2K7C-Q9Tu2K8y.js → gitGraphDiagram-OJR772UL-hFrAcG26.js} +1 -1
- package/dist/assets/{glide-data-editor-ceB8jin-.js → glide-data-editor-HLSiEHg4.js} +11 -11
- package/dist/assets/{graph-mQaQlEC0.js → graph-iTnwmAye.js} +1 -1
- package/dist/assets/{home-page-DfH28tMw.js → home-page-DzRg-dzP.js} +2 -2
- package/dist/assets/{index-Cs6LYSt0.js → index-B3l0i9L2.js} +1 -1
- package/dist/assets/{index-Cd25JFtC.js → index-BA1eBtgJ.js} +1 -1
- package/dist/assets/{index-DZeLh41D.js → index-BMCpi_hV.js} +1 -1
- package/dist/assets/index-BRPMSgmu.css +1 -0
- package/dist/assets/index-Bj_MIGqG.js +68 -0
- package/dist/assets/{index-Bbz-vY_t.js → index-BlHS2xQv.js} +1 -1
- package/dist/assets/{index-j8KhNyAD.js → index-BzQQnlIk.js} +1 -1
- package/dist/assets/{index-Bl0C1eEM.js → index-BzZRHBMs.js} +1 -1
- package/dist/assets/{index-BS0ZXaCb.js → index-CEoUSuyW.js} +1 -1
- package/dist/assets/{index-DF_6z97_.js → index-CJRYE40I.js} +1 -1
- package/dist/assets/{index-CbFuBnKK.js → index-CQ7rf4K7.js} +1 -1
- package/dist/assets/{index-BbKaEGro.js → index-Cl5g0z7j.js} +1 -1
- package/dist/assets/{index-6r7UeFlf.js → index-Cni7Zj6s.js} +1 -1
- package/dist/assets/{index-D1qx1y0C.js → index-CrltF-5r.js} +1 -1
- package/dist/assets/{index-ynTLoSgO.js → index-CswmrBaY.js} +1 -1
- package/dist/assets/{index-Cz8VHSaF.js → index-D1rqBcHl.js} +1 -1
- package/dist/assets/{index-Bh4jjeua.js → index-DApZsb--.js} +1 -1
- package/dist/assets/{index-DdiulcY3.js → index-DNVhZM1y.js} +1 -1
- package/dist/assets/{index-CoLaKlH0.js → index-DWJwqJmD.js} +1 -1
- package/dist/assets/{index-CKe-VV4U.js → index-DmunXcbP.js} +1 -1
- package/dist/assets/index-WZpn7zIz.js +528 -0
- package/dist/assets/infoDiagram-6WOFNB3A-BvitCnlF.js +2 -0
- package/dist/assets/{journeyDiagram-EWQZEKCU-DHnUk6vv.js → journeyDiagram-FFXJYRFH-BEiF2rN9.js} +4 -4
- package/dist/assets/{kanban-definition-ZSS6B67P-G4X25rf5.js → kanban-definition-KOZQBZVT-BZZVRqX0.js} +1 -1
- package/dist/assets/{layout-Ovgg_XTL.js → layout-2hUFrdoK.js} +1 -1
- package/dist/assets/{linear-DT2F5lCA.js → linear-DM7ygpKu.js} +1 -1
- package/dist/assets/links-BJFGdYRd.js +17 -0
- package/dist/assets/mermaid-CxGPSzDz.js +211 -0
- package/dist/assets/min-DS87IVOa.js +1 -0
- package/dist/assets/{mindmap-definition-6CBA2TL7-DNdqOjtw.js → mindmap-definition-LNHGMQRG-C7yfXmRD.js} +1 -1
- package/dist/assets/{number-overlay-editor-BNl24tu6.js → number-overlay-editor-qOf48nx-.js} +2 -2
- package/dist/assets/pieDiagram-DBDJKBY4-CRluUHH0.js +30 -0
- package/dist/assets/{quadrantDiagram-2OG54O6I--dNkbIMK.js → quadrantDiagram-YPSRARAO-FZO2_Kyx.js} +1 -1
- package/dist/assets/{react-plotly-bwK_a_t1.js → react-plotly-BV6Vu1ZC.js} +1 -1
- package/dist/assets/{requirementDiagram-QOLK2EJ7-28ZDvOK8.js → requirementDiagram-EGVEC5DT-CFEV56bq.js} +1 -1
- package/dist/assets/{run-page-CJW1v8wr.js → run-page-BiiAHZuC.js} +1 -1
- package/dist/assets/{sankeyDiagram-4UZDY2LN-XAKiDU7c.js → sankeyDiagram-HRAUVNP4-cf6xzlF-.js} +2 -2
- package/dist/assets/{sequenceDiagram-SKLFT4DO-DDCNXI_B.js → sequenceDiagram-WFGC7UMF-CEIC5fba.js} +6 -6
- package/dist/assets/{slides-component-2aF-KcfL.js → slides-component-BXl359nW.js} +1 -1
- package/dist/assets/sortBy-Dv7jjKnm.js +1 -0
- package/dist/assets/{stateDiagram-MI5ZYTHO-D1_v1n0T.js → stateDiagram-UUKSUZ4H-DLvG9b91.js} +1 -1
- package/dist/assets/stateDiagram-v2-EYPG3UTE-Z_xESMay.js +1 -0
- package/dist/assets/storage-B47VVzw1.js +26 -0
- package/dist/assets/{terminal-BmZY9sKi.js → terminal-2p_4lGQJ.js} +1 -1
- package/dist/assets/time-OI-T4MiC.js +1 -0
- package/dist/assets/{timeline-definition-MYPXXCX6-BLXFJK2J.js → timeline-definition-3HZDQTIS-Da1Ro9aI.js} +1 -1
- package/dist/assets/{tracing-DAOqNENE.js → tracing-CRxB69vv.js} +2 -2
- package/dist/assets/{trash-DJ39k3RZ.js → trash-DM7Eop-E.js} +1 -1
- package/dist/assets/{treemap-75Q7IDZK-CRVQqKgI.js → treemap-75Q7IDZK-DaZTYidc.js} +1 -1
- package/dist/assets/{vega-component-C-duuyA7.js → vega-component-D1rpMJYI.js} +1 -1
- package/dist/assets/xychartDiagram-FDP5SA34-COsO2s8u.js +7 -0
- package/dist/index.html +2 -2
- package/package.json +11 -6
- package/src/README.md +18 -0
- package/src/__mocks__/common.ts +160 -0
- package/src/__mocks__/notebook.ts +76 -0
- package/src/__mocks__/requests.ts +72 -0
- package/src/__mocks__/tracebacks.ts +32 -0
- package/src/__tests__/CellStatus.test.tsx +263 -0
- package/src/__tests__/__snapshots__/CellStatus.test.tsx.snap +523 -0
- package/src/__tests__/chat-utils.test.ts +234 -0
- package/src/__tests__/lru.test.ts +74 -0
- package/src/__tests__/main.test.tsx +174 -0
- package/src/__tests__/setup.ts +17 -0
- package/src/__tests__/test-helpers.ts +24 -0
- package/src/assets/circle-check.ico +0 -0
- package/src/assets/circle-play.ico +0 -0
- package/src/assets/circle-x.ico +0 -0
- package/src/assets/gradient.png +0 -0
- package/src/assets/icon-16x16.png +0 -0
- package/src/assets/icon-32x32.png +0 -0
- package/src/assets/noise.png +0 -0
- package/src/components/ai/ai-model-dropdown.tsx +405 -0
- package/src/components/ai/ai-provider-icon.tsx +54 -0
- package/src/components/app-config/ai-config.tsx +855 -0
- package/src/components/app-config/app-config-button.tsx +100 -0
- package/src/components/app-config/app-config-form.tsx +307 -0
- package/src/components/app-config/common.tsx +48 -0
- package/src/components/app-config/constants.ts +13 -0
- package/src/components/app-config/incorrect-model-id.tsx +43 -0
- package/src/components/app-config/is-overridden.tsx +119 -0
- package/src/components/app-config/optional-features.tsx +251 -0
- package/src/components/app-config/state.ts +18 -0
- package/src/components/app-config/user-config-form.tsx +1361 -0
- package/src/components/audio/audio-recorder.tsx +63 -0
- package/src/components/buttons/clear-button.tsx +23 -0
- package/src/components/buttons/undo-button.tsx +35 -0
- package/src/components/chat/chat-panel.tsx +720 -0
- package/src/components/chat/markdown-renderer.tsx +217 -0
- package/src/components/chat/reasoning-accordion.tsx +50 -0
- package/src/components/chat/tool-call-accordion.tsx +118 -0
- package/src/components/data-table/SearchBar.tsx +66 -0
- package/src/components/data-table/TableActions.tsx +183 -0
- package/src/components/data-table/__tests__/__snapshots__/chart-spec-model.test.ts.snap +1079 -0
- package/src/components/data-table/__tests__/chart-spec-model.test.ts +707 -0
- package/src/components/data-table/__tests__/column_formatting.test.ts +115 -0
- package/src/components/data-table/__tests__/columns.test.tsx +341 -0
- package/src/components/data-table/__tests__/data-table.test.tsx +60 -0
- package/src/components/data-table/__tests__/pagination.test.tsx +152 -0
- package/src/components/data-table/__tests__/types.test.ts +44 -0
- package/src/components/data-table/__tests__/url-detector.test.tsx +169 -0
- package/src/components/data-table/__tests__/useColumnPinning.test.ts +76 -0
- package/src/components/data-table/cell-selection/__tests__/feature.test.ts +187 -0
- package/src/components/data-table/cell-selection/feature.ts +123 -0
- package/src/components/data-table/cell-selection/types.ts +49 -0
- package/src/components/data-table/cell-styling/feature.ts +40 -0
- package/src/components/data-table/cell-styling/types.ts +26 -0
- package/src/components/data-table/charts/README.md +65 -0
- package/src/components/data-table/charts/__tests__/__snapshots__/spec-snapshot.test.ts.snap +47 -0
- package/src/components/data-table/charts/__tests__/altair-generator.test.ts +425 -0
- package/src/components/data-table/charts/__tests__/renderer.test.ts +20 -0
- package/src/components/data-table/charts/__tests__/spec-snapshot.test.ts +83 -0
- package/src/components/data-table/charts/__tests__/spec.test.ts +997 -0
- package/src/components/data-table/charts/__tests__/storage.test.ts +103 -0
- package/src/components/data-table/charts/chart-spec/altair-generator.ts +162 -0
- package/src/components/data-table/charts/chart-spec/encodings.ts +173 -0
- package/src/components/data-table/charts/chart-spec/spec.ts +345 -0
- package/src/components/data-table/charts/chart-spec/tooltips.ts +168 -0
- package/src/components/data-table/charts/chart-spec/types.ts +77 -0
- package/src/components/data-table/charts/charts.tsx +492 -0
- package/src/components/data-table/charts/components/chart-items.tsx +369 -0
- package/src/components/data-table/charts/components/chart-states.tsx +37 -0
- package/src/components/data-table/charts/components/form-fields.tsx +872 -0
- package/src/components/data-table/charts/components/layouts.tsx +118 -0
- package/src/components/data-table/charts/constants.ts +159 -0
- package/src/components/data-table/charts/context.ts +20 -0
- package/src/components/data-table/charts/forms/common-chart.tsx +202 -0
- package/src/components/data-table/charts/forms/heatmap.tsx +44 -0
- package/src/components/data-table/charts/forms/pie.tsx +70 -0
- package/src/components/data-table/charts/lazy-chart.tsx +56 -0
- package/src/components/data-table/charts/schemas.ts +140 -0
- package/src/components/data-table/charts/storage.ts +88 -0
- package/src/components/data-table/charts/types.ts +124 -0
- package/src/components/data-table/column-explorer-panel/column-explorer.tsx +227 -0
- package/src/components/data-table/column-formatting/feature.ts +247 -0
- package/src/components/data-table/column-formatting/types.ts +54 -0
- package/src/components/data-table/column-header.tsx +672 -0
- package/src/components/data-table/column-summary/chart-skeleton.tsx +57 -0
- package/src/components/data-table/column-summary/chart-spec-model.tsx +916 -0
- package/src/components/data-table/column-summary/column-summary.tsx +166 -0
- package/src/components/data-table/column-summary/legacy-chart-spec.ts +242 -0
- package/src/components/data-table/column-summary/utils.ts +142 -0
- package/src/components/data-table/column-wrapping/feature.ts +62 -0
- package/src/components/data-table/column-wrapping/types.ts +29 -0
- package/src/components/data-table/columns.tsx +528 -0
- package/src/components/data-table/copy-column/feature.ts +27 -0
- package/src/components/data-table/copy-column/types.ts +19 -0
- package/src/components/data-table/data-table.tsx +298 -0
- package/src/components/data-table/date-popover.tsx +146 -0
- package/src/components/data-table/download-actions.tsx +186 -0
- package/src/components/data-table/filter-pills.tsx +120 -0
- package/src/components/data-table/filters.ts +202 -0
- package/src/components/data-table/focus-row/feature.ts +41 -0
- package/src/components/data-table/focus-row/types.ts +32 -0
- package/src/components/data-table/header-items.tsx +295 -0
- package/src/components/data-table/hooks/use-column-pinning.ts +51 -0
- package/src/components/data-table/hooks/use-panel-ownership.ts +98 -0
- package/src/components/data-table/loading-table.tsx +56 -0
- package/src/components/data-table/mime-cell.tsx +68 -0
- package/src/components/data-table/pagination.tsx +329 -0
- package/src/components/data-table/range-focus/__tests__/atoms.test.ts +907 -0
- package/src/components/data-table/range-focus/__tests__/utils.test.ts +316 -0
- package/src/components/data-table/range-focus/atoms.ts +380 -0
- package/src/components/data-table/range-focus/cell-selection-indicator.tsx +37 -0
- package/src/components/data-table/range-focus/provider.tsx +13 -0
- package/src/components/data-table/range-focus/use-cell-range-selection.ts +119 -0
- package/src/components/data-table/range-focus/use-scroll-into-view.ts +46 -0
- package/src/components/data-table/range-focus/utils.ts +105 -0
- package/src/components/data-table/renderers.tsx +247 -0
- package/src/components/data-table/row-viewer-panel/__tests__/filter-rows.test.ts +82 -0
- package/src/components/data-table/row-viewer-panel/__tests__/row-viewer.test.tsx +58 -0
- package/src/components/data-table/row-viewer-panel/row-viewer.tsx +371 -0
- package/src/components/data-table/types.ts +81 -0
- package/src/components/data-table/uniformSample.tsx +19 -0
- package/src/components/data-table/url-detector.tsx +111 -0
- package/src/components/data-table/utils.ts +46 -0
- package/src/components/databases/display.tsx +66 -0
- package/src/components/databases/engine-variable.tsx +51 -0
- package/src/components/databases/icon.tsx +91 -0
- package/src/components/databases/icons/clickhouse.svg +1 -0
- package/src/components/databases/icons/databricks.svg +1 -0
- package/src/components/databases/icons/datafusion.png +0 -0
- package/src/components/databases/icons/duckdb.svg +1 -0
- package/src/components/databases/icons/googlebigquery.svg +1 -0
- package/src/components/databases/icons/iceberg.png +0 -0
- package/src/components/databases/icons/motherduck.svg +9 -0
- package/src/components/databases/icons/mysql.svg +1 -0
- package/src/components/databases/icons/postgresql.svg +1 -0
- package/src/components/databases/icons/redshift.svg +1 -0
- package/src/components/databases/icons/snowflake.svg +1 -0
- package/src/components/databases/icons/spark.svg +1 -0
- package/src/components/databases/icons/sqlalchemy.svg +1 -0
- package/src/components/databases/icons/sqlite.svg +1 -0
- package/src/components/databases/icons/timeplus.svg +17 -0
- package/src/components/databases/icons/trino.svg +1 -0
- package/src/components/datasets/icons.tsx +55 -0
- package/src/components/datasources/__tests__/install-package-button.test.tsx +85 -0
- package/src/components/datasources/__tests__/utils.test.ts +171 -0
- package/src/components/datasources/column-preview.tsx +269 -0
- package/src/components/datasources/components.tsx +100 -0
- package/src/components/datasources/datasources.tsx +799 -0
- package/src/components/datasources/install-package-button.tsx +46 -0
- package/src/components/datasources/utils.ts +62 -0
- package/src/components/debug/indicator.tsx +19 -0
- package/src/components/debugger/debugger-code.css +3 -0
- package/src/components/debugger/debugger-code.tsx +222 -0
- package/src/components/dependency-graph/custom-node.tsx +89 -0
- package/src/components/dependency-graph/dependency-graph-minimap.tsx +197 -0
- package/src/components/dependency-graph/dependency-graph-tree.tsx +181 -0
- package/src/components/dependency-graph/dependency-graph.css +17 -0
- package/src/components/dependency-graph/dependency-graph.tsx +66 -0
- package/src/components/dependency-graph/elements.ts +185 -0
- package/src/components/dependency-graph/panels.tsx +279 -0
- package/src/components/dependency-graph/types.ts +21 -0
- package/src/components/dependency-graph/utils/changes.ts +54 -0
- package/src/components/dependency-graph/utils/layout.ts +45 -0
- package/src/components/dependency-graph/utils/useFitToViewOnDimensionChange.ts +25 -0
- package/src/components/editor/Cell.tsx +1175 -0
- package/src/components/editor/Disconnected.tsx +72 -0
- package/src/components/editor/Output.tsx +462 -0
- package/src/components/editor/RecoveryButton.tsx +161 -0
- package/src/components/editor/SortableCell.tsx +161 -0
- package/src/components/editor/__tests__/data-attributes.test.tsx +173 -0
- package/src/components/editor/__tests__/dynamic-favicon.test.tsx +183 -0
- package/src/components/editor/actions/name-cell-input.tsx +137 -0
- package/src/components/editor/actions/types.ts +53 -0
- package/src/components/editor/actions/useCellActionButton.tsx +422 -0
- package/src/components/editor/actions/useConfigActions.tsx +182 -0
- package/src/components/editor/actions/useCopyNotebook.tsx +41 -0
- package/src/components/editor/actions/useHideAllMarkdownCode.ts +53 -0
- package/src/components/editor/actions/useNotebookActions.tsx +556 -0
- package/src/components/editor/actions/useRestartKernel.tsx +36 -0
- package/src/components/editor/ai/__tests__/completion-utils.test.ts +379 -0
- package/src/components/editor/ai/add-cell-with-ai.tsx +428 -0
- package/src/components/editor/ai/ai-completion-editor.tsx +261 -0
- package/src/components/editor/ai/completion-handlers.tsx +91 -0
- package/src/components/editor/ai/completion-utils.ts +95 -0
- package/src/components/editor/ai/merge-editor.css +9 -0
- package/src/components/editor/alerts/connecting-alert.tsx +46 -0
- package/src/components/editor/alerts/floating-alert.tsx +47 -0
- package/src/components/editor/alerts/stdin-blocking-alert.tsx +61 -0
- package/src/components/editor/app-container.tsx +53 -0
- package/src/components/editor/boundary/ErrorBoundary.tsx +41 -0
- package/src/components/editor/cell/CellStatus.tsx +371 -0
- package/src/components/editor/cell/CreateCellButton.tsx +132 -0
- package/src/components/editor/cell/DeleteButton.tsx +58 -0
- package/src/components/editor/cell/PendingDeleteConfirmation.tsx +126 -0
- package/src/components/editor/cell/RunButton.tsx +109 -0
- package/src/components/editor/cell/StopButton.tsx +36 -0
- package/src/components/editor/cell/TinyCode.css +10 -0
- package/src/components/editor/cell/TinyCode.tsx +53 -0
- package/src/components/editor/cell/cell-actions.tsx +185 -0
- package/src/components/editor/cell/cell-context-menu.tsx +243 -0
- package/src/components/editor/cell/cell-status.css +21 -0
- package/src/components/editor/cell/code/cell-editor.tsx +546 -0
- package/src/components/editor/cell/code/icons.tsx +31 -0
- package/src/components/editor/cell/code/language-toggle.tsx +140 -0
- package/src/components/editor/cell/collapse.tsx +100 -0
- package/src/components/editor/cell/toolbar.tsx +89 -0
- package/src/components/editor/cell/useAddCell.ts +29 -0
- package/src/components/editor/cell/useDeleteCell.tsx +89 -0
- package/src/components/editor/cell/useRunCells.ts +86 -0
- package/src/components/editor/cell/useShouldShowInterrupt.ts +26 -0
- package/src/components/editor/cell/useSplitCell.tsx +41 -0
- package/src/components/editor/chrome/components/contribute-snippet-button.tsx +138 -0
- package/src/components/editor/chrome/components/feedback-button.tsx +105 -0
- package/src/components/editor/chrome/panels/__tests__/write-secret-modal.test.ts +43 -0
- package/src/components/editor/chrome/panels/constants.ts +2 -0
- package/src/components/editor/chrome/panels/context-aware-panel/atoms.ts +28 -0
- package/src/components/editor/chrome/panels/context-aware-panel/context-aware-panel.tsx +167 -0
- package/src/components/editor/chrome/panels/datasources-panel.tsx +6 -0
- package/src/components/editor/chrome/panels/dependency-graph-panel.tsx +23 -0
- package/src/components/editor/chrome/panels/documentation-panel.tsx +29 -0
- package/src/components/editor/chrome/panels/empty-state.tsx +28 -0
- package/src/components/editor/chrome/panels/error-panel.tsx +35 -0
- package/src/components/editor/chrome/panels/file-explorer-panel.tsx +33 -0
- package/src/components/editor/chrome/panels/logs-panel.tsx +97 -0
- package/src/components/editor/chrome/panels/outline/floating-outline.tsx +129 -0
- package/src/components/editor/chrome/panels/outline/useActiveOutline.tsx +172 -0
- package/src/components/editor/chrome/panels/outline-panel.css +6 -0
- package/src/components/editor/chrome/panels/outline-panel.tsx +39 -0
- package/src/components/editor/chrome/panels/packages-panel.tsx +635 -0
- package/src/components/editor/chrome/panels/packages-state.ts +5 -0
- package/src/components/editor/chrome/panels/scratchpad-panel.tsx +8 -0
- package/src/components/editor/chrome/panels/secrets-panel.tsx +155 -0
- package/src/components/editor/chrome/panels/snippets-panel.css +11 -0
- package/src/components/editor/chrome/panels/snippets-panel.tsx +230 -0
- package/src/components/editor/chrome/panels/tracing-panel.tsx +28 -0
- package/src/components/editor/chrome/panels/variable-panel.tsx +31 -0
- package/src/components/editor/chrome/panels/write-secret-modal.tsx +190 -0
- package/src/components/editor/chrome/state.ts +102 -0
- package/src/components/editor/chrome/types.ts +133 -0
- package/src/components/editor/chrome/wrapper/__tests__/minimap-state.test.ts +209 -0
- package/src/components/editor/chrome/wrapper/__tests__/storage.test.ts +41 -0
- package/src/components/editor/chrome/wrapper/app-chrome.css +22 -0
- package/src/components/editor/chrome/wrapper/app-chrome.tsx +256 -0
- package/src/components/editor/chrome/wrapper/footer-item.tsx +43 -0
- package/src/components/editor/chrome/wrapper/footer-items/ai-status.tsx +47 -0
- package/src/components/editor/chrome/wrapper/footer-items/backend-status.tsx +111 -0
- package/src/components/editor/chrome/wrapper/footer-items/copilot-status.tsx +125 -0
- package/src/components/editor/chrome/wrapper/footer-items/machine-stats.tsx +185 -0
- package/src/components/editor/chrome/wrapper/footer-items/minimap-status.tsx +21 -0
- package/src/components/editor/chrome/wrapper/footer-items/rtc-status.tsx +65 -0
- package/src/components/editor/chrome/wrapper/footer-items/runtime-settings.tsx +370 -0
- package/src/components/editor/chrome/wrapper/footer.tsx +90 -0
- package/src/components/editor/chrome/wrapper/minimap-state.ts +164 -0
- package/src/components/editor/chrome/wrapper/minimap.tsx +443 -0
- package/src/components/editor/chrome/wrapper/panels.tsx +10 -0
- package/src/components/editor/chrome/wrapper/sidebar.tsx +100 -0
- package/src/components/editor/chrome/wrapper/storage.ts +56 -0
- package/src/components/editor/chrome/wrapper/utils.ts +8 -0
- package/src/components/editor/code/readonly-python-code.tsx +160 -0
- package/src/components/editor/columns/__tests__/storage.test.ts +104 -0
- package/src/components/editor/columns/cell-column.tsx +105 -0
- package/src/components/editor/columns/sortable-column.tsx +175 -0
- package/src/components/editor/columns/storage.ts +56 -0
- package/src/components/editor/common.ts +20 -0
- package/src/components/editor/controls/Controls.tsx +225 -0
- package/src/components/editor/controls/command-palette-button.tsx +27 -0
- package/src/components/editor/controls/command-palette.tsx +210 -0
- package/src/components/editor/controls/keyboard-shortcuts.tsx +309 -0
- package/src/components/editor/controls/notebook-menu-dropdown.tsx +157 -0
- package/src/components/editor/controls/shutdown-button.tsx +70 -0
- package/src/components/editor/database/__tests__/__snapshots__/as-code.test.ts.snap +659 -0
- package/src/components/editor/database/__tests__/as-code.test.ts +598 -0
- package/src/components/editor/database/__tests__/secrets.test.ts +38 -0
- package/src/components/editor/database/add-database-form.tsx +395 -0
- package/src/components/editor/database/as-code.ts +786 -0
- package/src/components/editor/database/form-renderers.tsx +211 -0
- package/src/components/editor/database/schemas.ts +485 -0
- package/src/components/editor/database/secrets.ts +25 -0
- package/src/components/editor/documentation.css +139 -0
- package/src/components/editor/dynamic-favicon.tsx +126 -0
- package/src/components/editor/errors/auto-fix.tsx +61 -0
- package/src/components/editor/file-tree/__tests__/requesting-tree.test.ts +321 -0
- package/src/components/editor/file-tree/file-explorer.tsx +679 -0
- package/src/components/editor/file-tree/file-viewer.tsx +283 -0
- package/src/components/editor/file-tree/renderers.tsx +83 -0
- package/src/components/editor/file-tree/requesting-tree.tsx +228 -0
- package/src/components/editor/file-tree/state.tsx +26 -0
- package/src/components/editor/file-tree/types.ts +118 -0
- package/src/components/editor/file-tree/upload.tsx +101 -0
- package/src/components/editor/header/app-header.tsx +28 -0
- package/src/components/editor/header/filename-form.tsx +27 -0
- package/src/components/editor/header/filename-input.css +21 -0
- package/src/components/editor/header/filename-input.tsx +244 -0
- package/src/components/editor/header/status.tsx +72 -0
- package/src/components/editor/inputs/Inputs.css +118 -0
- package/src/components/editor/inputs/Inputs.styles.ts +66 -0
- package/src/components/editor/inputs/Inputs.tsx +34 -0
- package/src/components/editor/kiosk-mode.tsx +25 -0
- package/src/components/editor/links/cell-link-list.tsx +74 -0
- package/src/components/editor/links/cell-link.tsx +128 -0
- package/src/components/editor/navigation/__tests__/clipboard.test.ts +466 -0
- package/src/components/editor/navigation/__tests__/navigation.test.ts +1771 -0
- package/src/components/editor/navigation/__tests__/selection.test.ts +194 -0
- package/src/components/editor/navigation/clipboard.ts +205 -0
- package/src/components/editor/navigation/focus-utils.ts +48 -0
- package/src/components/editor/navigation/multi-cell-action-toolbar.tsx +499 -0
- package/src/components/editor/navigation/navigation.ts +704 -0
- package/src/components/editor/navigation/selection.ts +114 -0
- package/src/components/editor/navigation/state.ts +5 -0
- package/src/components/editor/navigation/vim-bindings.test.ts +109 -0
- package/src/components/editor/navigation/vim-bindings.ts +90 -0
- package/src/components/editor/notebook-banner.tsx +75 -0
- package/src/components/editor/output/CalloutOutput.styles.ts +22 -0
- package/src/components/editor/output/CalloutOutput.tsx +19 -0
- package/src/components/editor/output/ConsoleOutput.tsx +276 -0
- package/src/components/editor/output/EmotionCacheProvider.tsx +32 -0
- package/src/components/editor/output/HtmlOutput.tsx +25 -0
- package/src/components/editor/output/ImageOutput.tsx +25 -0
- package/src/components/editor/output/JsonOutput.tsx +424 -0
- package/src/components/editor/output/MarimoErrorOutput.tsx +511 -0
- package/src/components/editor/output/MarimoTracebackOutput.tsx +233 -0
- package/src/components/editor/output/Outputs.css +102 -0
- package/src/components/editor/output/TextOutput.tsx +42 -0
- package/src/components/editor/output/VideoOutput.tsx +11 -0
- package/src/components/editor/output/__tests__/ansi.test.ts +39 -0
- package/src/components/editor/output/__tests__/json-output.test.ts +269 -0
- package/src/components/editor/output/__tests__/traceback.test.tsx +105 -0
- package/src/components/editor/output/useWrapText.ts +14 -0
- package/src/components/editor/package-alert.tsx +596 -0
- package/src/components/editor/renderMimeIcon.tsx +38 -0
- package/src/components/editor/renderers/CellArray.tsx +352 -0
- package/src/components/editor/renderers/cells-renderer.tsx +96 -0
- package/src/components/editor/renderers/grid-layout/grid-layout.tsx +650 -0
- package/src/components/editor/renderers/grid-layout/plugin.tsx +146 -0
- package/src/components/editor/renderers/grid-layout/styles.css +31 -0
- package/src/components/editor/renderers/grid-layout/types.ts +89 -0
- package/src/components/editor/renderers/layout-select.tsx +86 -0
- package/src/components/editor/renderers/plugins.ts +31 -0
- package/src/components/editor/renderers/slides-layout/plugin.tsx +31 -0
- package/src/components/editor/renderers/slides-layout/slides-layout.tsx +74 -0
- package/src/components/editor/renderers/slides-layout/types.ts +12 -0
- package/src/components/editor/renderers/types.ts +75 -0
- package/src/components/editor/renderers/vertical-layout/__tests__/useDelayVisibility.test.ts +87 -0
- package/src/components/editor/renderers/vertical-layout/__tests__/useFocusFirstEditor.test.ts +123 -0
- package/src/components/editor/renderers/vertical-layout/__tests__/vertical-layout.test.ts +173 -0
- package/src/components/editor/renderers/vertical-layout/sidebar/__tests__/sidebar.test.tsx +56 -0
- package/src/components/editor/renderers/vertical-layout/sidebar/sheet-sidebar.tsx +32 -0
- package/src/components/editor/renderers/vertical-layout/sidebar/sidebar-slot.tsx +10 -0
- package/src/components/editor/renderers/vertical-layout/sidebar/sidebar.css +20 -0
- package/src/components/editor/renderers/vertical-layout/sidebar/sidebar.tsx +30 -0
- package/src/components/editor/renderers/vertical-layout/sidebar/state.ts +46 -0
- package/src/components/editor/renderers/vertical-layout/sidebar/toggle.tsx +25 -0
- package/src/components/editor/renderers/vertical-layout/sidebar/wrapped-with-sidebar.tsx +38 -0
- package/src/components/editor/renderers/vertical-layout/useDelayVisibility.ts +32 -0
- package/src/components/editor/renderers/vertical-layout/useFocusFirstEditor.ts +107 -0
- package/src/components/editor/renderers/vertical-layout/vertical-layout-wrapper.tsx +46 -0
- package/src/components/editor/renderers/vertical-layout/vertical-layout.tsx +451 -0
- package/src/components/editor/stdin-blocking-alert.tsx +83 -0
- package/src/components/export/export-output-button.tsx +14 -0
- package/src/components/find-replace/find-replace.tsx +293 -0
- package/src/components/forms/__tests__/form-utils.test.ts +104 -0
- package/src/components/forms/form-utils.ts +90 -0
- package/src/components/forms/form.tsx +817 -0
- package/src/components/forms/options.ts +59 -0
- package/src/components/forms/switchable-multi-select.tsx +134 -0
- package/src/components/home/components.tsx +189 -0
- package/src/components/home/state.ts +30 -0
- package/src/components/icons/copy-icon.tsx +59 -0
- package/src/components/icons/github-copilot.tsx +17 -0
- package/src/components/icons/large-spinner.tsx +39 -0
- package/src/components/icons/loading-ellipsis.tsx +46 -0
- package/src/components/icons/multi-icon.css +9 -0
- package/src/components/icons/multi-icon.tsx +30 -0
- package/src/components/icons/spinner.tsx +38 -0
- package/src/components/layout/toolbar.tsx +26 -0
- package/src/components/modal/ImperativeModal.tsx +187 -0
- package/src/components/pages/edit-page.tsx +37 -0
- package/src/components/pages/home-page.tsx +514 -0
- package/src/components/pages/run-page.tsx +55 -0
- package/src/components/scratchpad/scratchpad-history.ts +28 -0
- package/src/components/scratchpad/scratchpad.tsx +280 -0
- package/src/components/shortcuts/renderShortcut.tsx +208 -0
- package/src/components/slides/slides-component.tsx +132 -0
- package/src/components/slides/slides.css +100 -0
- package/src/components/sort/SortableCellsProvider.tsx +242 -0
- package/src/components/static-html/share-modal.tsx +181 -0
- package/src/components/static-html/static-banner.tsx +164 -0
- package/src/components/terminal/terminal.tsx +110 -0
- package/src/components/terminal/xterm.css +3 -0
- package/src/components/tracing/tracing-spec.ts +118 -0
- package/src/components/tracing/tracing.test.tsx +66 -0
- package/src/components/tracing/tracing.tsx +410 -0
- package/src/components/ui/accordion.tsx +70 -0
- package/src/components/ui/alert-dialog.tsx +176 -0
- package/src/components/ui/alert.tsx +64 -0
- package/src/components/ui/aria-popover.tsx +43 -0
- package/src/components/ui/badge.tsx +41 -0
- package/src/components/ui/button.tsx +156 -0
- package/src/components/ui/calendar.tsx +231 -0
- package/src/components/ui/card.tsx +83 -0
- package/src/components/ui/checkbox.tsx +33 -0
- package/src/components/ui/combobox.tsx +278 -0
- package/src/components/ui/command.tsx +165 -0
- package/src/components/ui/context-menu.tsx +193 -0
- package/src/components/ui/date-input.tsx +127 -0
- package/src/components/ui/date-picker.tsx +188 -0
- package/src/components/ui/dialog.tsx +155 -0
- package/src/components/ui/draggable-popover.tsx +68 -0
- package/src/components/ui/dropdown-menu.tsx +190 -0
- package/src/components/ui/field.tsx +90 -0
- package/src/components/ui/form.tsx +224 -0
- package/src/components/ui/fullscreen.tsx +38 -0
- package/src/components/ui/input.tsx +208 -0
- package/src/components/ui/kbd.tsx +22 -0
- package/src/components/ui/label.tsx +26 -0
- package/src/components/ui/links.tsx +23 -0
- package/src/components/ui/menu-items.tsx +101 -0
- package/src/components/ui/native-select.tsx +39 -0
- package/src/components/ui/navigation.tsx +154 -0
- package/src/components/ui/number-field.tsx +99 -0
- package/src/components/ui/popover.tsx +63 -0
- package/src/components/ui/progress.tsx +28 -0
- package/src/components/ui/radio-group.tsx +44 -0
- package/src/components/ui/range-slider.tsx +102 -0
- package/src/components/ui/scroll-area.tsx +47 -0
- package/src/components/ui/select.tsx +167 -0
- package/src/components/ui/sheet.tsx +143 -0
- package/src/components/ui/skeleton.tsx +16 -0
- package/src/components/ui/slider.tsx +80 -0
- package/src/components/ui/switch.tsx +54 -0
- package/src/components/ui/table.tsx +122 -0
- package/src/components/ui/tabs.tsx +55 -0
- package/src/components/ui/textarea.tsx +104 -0
- package/src/components/ui/toast.tsx +133 -0
- package/src/components/ui/toaster.tsx +30 -0
- package/src/components/ui/toggle.tsx +49 -0
- package/src/components/ui/tooltip.tsx +87 -0
- package/src/components/ui/typography.tsx +207 -0
- package/src/components/ui/use-restore-focus.ts +28 -0
- package/src/components/ui/use-toast.ts +224 -0
- package/src/components/utils/delay-mount.tsx +81 -0
- package/src/components/utils/lazy-mount.tsx +24 -0
- package/src/components/variables/common.tsx +37 -0
- package/src/components/variables/variables-table.tsx +335 -0
- package/src/core/MarimoApp.tsx +103 -0
- package/src/core/ai/__tests__/model-registry.test.ts +357 -0
- package/src/core/ai/chat-utils.ts +71 -0
- package/src/core/ai/config.ts +76 -0
- package/src/core/ai/context/__tests__/registry.test.ts +516 -0
- package/src/core/ai/context/context.ts +16 -0
- package/src/core/ai/context/providers/__tests__/__snapshots__/tables.test.ts.snap +291 -0
- package/src/core/ai/context/providers/__tests__/__snapshots__/variable.test.ts.snap +378 -0
- package/src/core/ai/context/providers/__tests__/tables.test.ts +271 -0
- package/src/core/ai/context/providers/__tests__/variable.test.ts +312 -0
- package/src/core/ai/context/providers/common.ts +7 -0
- package/src/core/ai/context/providers/tables.ts +208 -0
- package/src/core/ai/context/providers/variable.ts +72 -0
- package/src/core/ai/context/registry.ts +180 -0
- package/src/core/ai/ids/__tests__/ids.test.ts +193 -0
- package/src/core/ai/ids/ids.ts +71 -0
- package/src/core/ai/model-registry.ts +158 -0
- package/src/core/ai/state.ts +58 -0
- package/src/core/alerts/state.ts +75 -0
- package/src/core/cells/__tests__/__snapshots__/cells.test.ts.snap +1312 -0
- package/src/core/cells/__tests__/add-missing-import.test.ts +78 -0
- package/src/core/cells/__tests__/cell.test.ts +193 -0
- package/src/core/cells/__tests__/cells.test.ts +2664 -0
- package/src/core/cells/__tests__/collapseConsoleOutputs.test.ts +239 -0
- package/src/core/cells/__tests__/focus.test.ts +271 -0
- package/src/core/cells/__tests__/ids.test.ts +90 -0
- package/src/core/cells/__tests__/names.test.ts +62 -0
- package/src/core/cells/__tests__/pending-delete-service.test.tsx +202 -0
- package/src/core/cells/__tests__/runs.test.ts +453 -0
- package/src/core/cells/__tests__/session.test.ts +757 -0
- package/src/core/cells/__tests__/utils.test.ts +428 -0
- package/src/core/cells/actions.ts +21 -0
- package/src/core/cells/add-missing-import.ts +114 -0
- package/src/core/cells/cell.ts +243 -0
- package/src/core/cells/cells.ts +1751 -0
- package/src/core/cells/collapseConsoleOutputs.tsx +133 -0
- package/src/core/cells/effects.ts +42 -0
- package/src/core/cells/focus.ts +128 -0
- package/src/core/cells/ids.ts +124 -0
- package/src/core/cells/logs.ts +114 -0
- package/src/core/cells/names.ts +107 -0
- package/src/core/cells/outline.ts +30 -0
- package/src/core/cells/outputs.ts +34 -0
- package/src/core/cells/pending-delete-service.ts +183 -0
- package/src/core/cells/runs.ts +196 -0
- package/src/core/cells/scrollCellIntoView.ts +133 -0
- package/src/core/cells/session.ts +281 -0
- package/src/core/cells/types.ts +128 -0
- package/src/core/cells/utils.ts +141 -0
- package/src/core/codemirror/__tests__/__snapshots__/setup.test.ts.snap +216 -0
- package/src/core/codemirror/__tests__/extensions.test.ts +117 -0
- package/src/core/codemirror/__tests__/format.test.ts +227 -0
- package/src/core/codemirror/__tests__/setup.test.ts +178 -0
- package/src/core/codemirror/ai/request.ts +72 -0
- package/src/core/codemirror/ai/resources.ts +90 -0
- package/src/core/codemirror/cells/extensions.ts +387 -0
- package/src/core/codemirror/cells/state.ts +32 -0
- package/src/core/codemirror/cells/traceback-decorations.ts +111 -0
- package/src/core/codemirror/cm.ts +272 -0
- package/src/core/codemirror/compat/__tests__/jupyter.test.ts +136 -0
- package/src/core/codemirror/compat/jupyter.tsx +244 -0
- package/src/core/codemirror/completion/Autocompleter.ts +172 -0
- package/src/core/codemirror/completion/__tests__/hints.test.ts +84 -0
- package/src/core/codemirror/completion/__tests__/keymap.test.ts +44 -0
- package/src/core/codemirror/completion/completer.ts +58 -0
- package/src/core/codemirror/completion/hints.ts +143 -0
- package/src/core/codemirror/completion/keymap.ts +70 -0
- package/src/core/codemirror/completion/utils.ts +18 -0
- package/src/core/codemirror/completion/variable-completions.ts +100 -0
- package/src/core/codemirror/config/extension.ts +63 -0
- package/src/core/codemirror/config/types.ts +10 -0
- package/src/core/codemirror/copilot/__tests__/copilot.test.ts +260 -0
- package/src/core/codemirror/copilot/__tests__/getCodes.test.ts +209 -0
- package/src/core/codemirror/copilot/__tests__/trim-utils.test.ts +291 -0
- package/src/core/codemirror/copilot/client.ts +123 -0
- package/src/core/codemirror/copilot/copilot-config.tsx +285 -0
- package/src/core/codemirror/copilot/extension.ts +285 -0
- package/src/core/codemirror/copilot/getCodes.ts +130 -0
- package/src/core/codemirror/copilot/language-server.ts +255 -0
- package/src/core/codemirror/copilot/state.ts +66 -0
- package/src/core/codemirror/copilot/trim-utils.ts +33 -0
- package/src/core/codemirror/copilot/types.ts +41 -0
- package/src/core/codemirror/editing/__tests__/commands.test.ts +106 -0
- package/src/core/codemirror/editing/__tests__/debugging.test.ts +193 -0
- package/src/core/codemirror/editing/commands.ts +25 -0
- package/src/core/codemirror/editing/debugging.ts +58 -0
- package/src/core/codemirror/editing/extensions.ts +4 -0
- package/src/core/codemirror/extensions.ts +95 -0
- package/src/core/codemirror/facet.ts +19 -0
- package/src/core/codemirror/find-replace/__tests__/navigate.test.ts +695 -0
- package/src/core/codemirror/find-replace/extension.ts +41 -0
- package/src/core/codemirror/find-replace/navigate.ts +221 -0
- package/src/core/codemirror/find-replace/query.ts +31 -0
- package/src/core/codemirror/find-replace/search-highlight.ts +148 -0
- package/src/core/codemirror/find-replace/state.ts +167 -0
- package/src/core/codemirror/format.ts +120 -0
- package/src/core/codemirror/go-to-definition/__tests__/commands.test.ts +205 -0
- package/src/core/codemirror/go-to-definition/commands.ts +80 -0
- package/src/core/codemirror/go-to-definition/extension.ts +23 -0
- package/src/core/codemirror/go-to-definition/underline.ts +223 -0
- package/src/core/codemirror/go-to-definition/utils.ts +126 -0
- package/src/core/codemirror/keymaps/__tests__/keymaps.test.ts +43 -0
- package/src/core/codemirror/keymaps/__tests__/vimrc.test.ts +121 -0
- package/src/core/codemirror/keymaps/keymaps.ts +163 -0
- package/src/core/codemirror/keymaps/vim.ts +360 -0
- package/src/core/codemirror/keymaps/vimrc.ts +149 -0
- package/src/core/codemirror/language/LanguageAdapters.ts +23 -0
- package/src/core/codemirror/language/__tests__/ast.test.ts +124 -0
- package/src/core/codemirror/language/__tests__/extension.test.ts +260 -0
- package/src/core/codemirror/language/__tests__/indentOneTab.test.ts +31 -0
- package/src/core/codemirror/language/__tests__/markdown.test.ts +495 -0
- package/src/core/codemirror/language/__tests__/sql.test.ts +1640 -0
- package/src/core/codemirror/language/__tests__/utils.test.ts +166 -0
- package/src/core/codemirror/language/commands.ts +59 -0
- package/src/core/codemirror/language/embedded/__tests__/embedded-python.test.ts +163 -0
- package/src/core/codemirror/language/embedded/embedded-python.ts +131 -0
- package/src/core/codemirror/language/embedded/latex.ts +257 -0
- package/src/core/codemirror/language/extension.ts +322 -0
- package/src/core/codemirror/language/languages/markdown.ts +261 -0
- package/src/core/codemirror/language/languages/python.ts +329 -0
- package/src/core/codemirror/language/languages/sql/completion-sources.tsx +99 -0
- package/src/core/codemirror/language/languages/sql/completion-store.ts +191 -0
- package/src/core/codemirror/language/languages/sql/sql.ts +545 -0
- package/src/core/codemirror/language/languages/sql/utils.ts +42 -0
- package/src/core/codemirror/language/metadata.ts +71 -0
- package/src/core/codemirror/language/panel/markdown.tsx +63 -0
- package/src/core/codemirror/language/panel/panel.tsx +197 -0
- package/src/core/codemirror/language/panel/sql.tsx +132 -0
- package/src/core/codemirror/language/types.ts +41 -0
- package/src/core/codemirror/language/utils/ast.ts +84 -0
- package/src/core/codemirror/language/utils/indentOneTab.ts +9 -0
- package/src/core/codemirror/language/utils/quotes.ts +18 -0
- package/src/core/codemirror/language/utils.ts +78 -0
- package/src/core/codemirror/lsp/__tests__/notebook-lsp.test.ts +860 -0
- package/src/core/codemirror/lsp/federated-lsp.ts +235 -0
- package/src/core/codemirror/lsp/lens.ts +130 -0
- package/src/core/codemirror/lsp/notebook-lsp.ts +604 -0
- package/src/core/codemirror/lsp/transports.ts +31 -0
- package/src/core/codemirror/lsp/types.ts +55 -0
- package/src/core/codemirror/lsp/utils.ts +11 -0
- package/src/core/codemirror/markdown/__tests__/commands.test.ts +522 -0
- package/src/core/codemirror/markdown/commands.ts +478 -0
- package/src/core/codemirror/markdown/completions.ts +273 -0
- package/src/core/codemirror/markdown/extension.ts +106 -0
- package/src/core/codemirror/misc/__tests__/dnd.test.ts +111 -0
- package/src/core/codemirror/misc/__tests__/paste.test.ts +239 -0
- package/src/core/codemirror/misc/dnd.ts +48 -0
- package/src/core/codemirror/misc/paste.ts +181 -0
- package/src/core/codemirror/placeholder/__tests__/extensions.test.ts +132 -0
- package/src/core/codemirror/placeholder/extensions.ts +99 -0
- package/src/core/codemirror/react-dom/createPanel.tsx +39 -0
- package/src/core/codemirror/reactive-references/__tests__/analyzer.test.ts +1222 -0
- package/src/core/codemirror/reactive-references/analyzer.ts +608 -0
- package/src/core/codemirror/reactive-references/extension.ts +154 -0
- package/src/core/codemirror/readonly/__tests__/extension.test.ts +55 -0
- package/src/core/codemirror/readonly/extension.ts +187 -0
- package/src/core/codemirror/rtc/extension.ts +450 -0
- package/src/core/codemirror/rtc/loro/awareness.ts +496 -0
- package/src/core/codemirror/rtc/loro/colors.ts +38 -0
- package/src/core/codemirror/rtc/loro/sync.ts +159 -0
- package/src/core/codemirror/theme/__tests__/light.test.ts +136 -0
- package/src/core/codemirror/theme/dark.ts +50 -0
- package/src/core/codemirror/theme/light.ts +58 -0
- package/src/core/codemirror/types.ts +5 -0
- package/src/core/codemirror/utils.ts +103 -0
- package/src/core/codemirror/vim/cursor-visibility.ts +58 -0
- package/src/core/config/__tests__/config-schema.test.ts +232 -0
- package/src/core/config/capabilities.ts +15 -0
- package/src/core/config/config-schema.ts +296 -0
- package/src/core/config/config.ts +113 -0
- package/src/core/config/feature-flag.tsx +58 -0
- package/src/core/config/if-capability.tsx +19 -0
- package/src/core/config/widths.ts +5 -0
- package/src/core/constants.ts +52 -0
- package/src/core/datasets/__tests__/all-tables.test.ts +466 -0
- package/src/core/datasets/__tests__/data-source.test.ts +461 -0
- package/src/core/datasets/data-source-connections.ts +334 -0
- package/src/core/datasets/engines.ts +11 -0
- package/src/core/datasets/request-registry.ts +34 -0
- package/src/core/datasets/state.ts +143 -0
- package/src/core/datasets/types.ts +38 -0
- package/src/core/debugger/state.ts +10 -0
- package/src/core/documentation/state.ts +13 -0
- package/src/core/dom/__tests__/htmlUtils.test.ts +22 -0
- package/src/core/dom/__tests__/outline.test.ts +370 -0
- package/src/core/dom/defineCustomElement.ts +23 -0
- package/src/core/dom/events.ts +94 -0
- package/src/core/dom/htmlUtils.ts +75 -0
- package/src/core/dom/outline.ts +123 -0
- package/src/core/dom/ui-element.css +8 -0
- package/src/core/dom/ui-element.ts +249 -0
- package/src/core/dom/uiregistry.ts +209 -0
- package/src/core/edit-app.tsx +189 -0
- package/src/core/errors/__tests__/errors.test.ts +62 -0
- package/src/core/errors/__tests__/utils.test.ts +108 -0
- package/src/core/errors/errors.ts +96 -0
- package/src/core/errors/state.ts +44 -0
- package/src/core/errors/utils.ts +67 -0
- package/src/core/export/hooks.ts +60 -0
- package/src/core/functions/FunctionRegistry.ts +18 -0
- package/src/core/hotkeys/__tests__/hotkeys.test.ts +74 -0
- package/src/core/hotkeys/__tests__/shortcuts.test.ts +166 -0
- package/src/core/hotkeys/actions.ts +38 -0
- package/src/core/hotkeys/hotkeys.ts +523 -0
- package/src/core/hotkeys/shortcuts.ts +146 -0
- package/src/core/islands/__tests__/parse.test.ts +89 -0
- package/src/core/islands/bridge.ts +196 -0
- package/src/core/islands/components/output-wrapper.tsx +154 -0
- package/src/core/islands/components/web-components.tsx +120 -0
- package/src/core/islands/islands.css +14 -0
- package/src/core/islands/main.ts +200 -0
- package/src/core/islands/parse.ts +161 -0
- package/src/core/islands/state.ts +30 -0
- package/src/core/islands/toast.ts +41 -0
- package/src/core/islands/utils.ts +5 -0
- package/src/core/islands/worker/controller.ts +52 -0
- package/src/core/islands/worker/worker.tsx +178 -0
- package/src/core/kernel/RuntimeState.ts +94 -0
- package/src/core/kernel/__tests__/RuntimeState.test.ts +57 -0
- package/src/core/kernel/__tests__/handlers.test.ts +61 -0
- package/src/core/kernel/__tests__/session.test.ts +10 -0
- package/src/core/kernel/handlers.ts +159 -0
- package/src/core/kernel/messages.ts +54 -0
- package/src/core/kernel/queryParamHandlers.ts +39 -0
- package/src/core/kernel/session.ts +50 -0
- package/src/core/layout/layout.ts +99 -0
- package/src/core/layout/useTogglePresenting.ts +50 -0
- package/src/core/meta/globals.ts +25 -0
- package/src/core/meta/state.ts +25 -0
- package/src/core/mime.ts +9 -0
- package/src/core/mode.ts +80 -0
- package/src/core/network/DeferredRequestRegistry.ts +71 -0
- package/src/core/network/__tests__/DeferredRequestRegistry.test.ts +37 -0
- package/src/core/network/__tests__/api.test.ts +80 -0
- package/src/core/network/api.ts +145 -0
- package/src/core/network/auth.ts +13 -0
- package/src/core/network/connection.ts +33 -0
- package/src/core/network/requests-network.ts +398 -0
- package/src/core/network/requests-static.ts +88 -0
- package/src/core/network/requests-toasting.ts +91 -0
- package/src/core/network/requests.ts +24 -0
- package/src/core/network/resolve.ts +17 -0
- package/src/core/network/types.ts +188 -0
- package/src/core/packages/toast-components.tsx +88 -0
- package/src/core/packages/useInstallPackage.ts +46 -0
- package/src/core/rtc/state.ts +20 -0
- package/src/core/run-app.tsx +69 -0
- package/src/core/runtime/__tests__/config.test.ts +173 -0
- package/src/core/runtime/__tests__/createWsUrl.test.ts +61 -0
- package/src/core/runtime/__tests__/runtime.test.ts +603 -0
- package/src/core/runtime/config.ts +49 -0
- package/src/core/runtime/runtime.ts +277 -0
- package/src/core/runtime/types.ts +7 -0
- package/src/core/runtime/utils.ts +9 -0
- package/src/core/saving/file-state.ts +15 -0
- package/src/core/saving/filename.ts +55 -0
- package/src/core/saving/save-component.tsx +274 -0
- package/src/core/saving/state.ts +51 -0
- package/src/core/saving/useAutoSave.ts +68 -0
- package/src/core/secrets/request-registry.ts +16 -0
- package/src/core/slots/slots.ts +9 -0
- package/src/core/state/__tests__/jotai.test.ts +25 -0
- package/src/core/state/jotai.ts +69 -0
- package/src/core/state/observable.ts +23 -0
- package/src/core/static/__tests__/download-html.test.ts +41 -0
- package/src/core/static/__tests__/files.test.ts +494 -0
- package/src/core/static/__tests__/virtual-file-tracker.test.ts +92 -0
- package/src/core/static/download-html.ts +59 -0
- package/src/core/static/files.ts +150 -0
- package/src/core/static/static-state.ts +19 -0
- package/src/core/static/types.ts +8 -0
- package/src/core/static/virtual-file-tracker.ts +83 -0
- package/src/core/variables/__tests__/state.test.ts +148 -0
- package/src/core/variables/state.ts +81 -0
- package/src/core/variables/types.ts +22 -0
- package/src/core/vscode/vscode-bindings.ts +176 -0
- package/src/core/wasm/PyodideLoader.tsx +72 -0
- package/src/core/wasm/__tests__/router.test.ts +57 -0
- package/src/core/wasm/__tests__/share.test.ts +35 -0
- package/src/core/wasm/__tests__/state.test.ts +124 -0
- package/src/core/wasm/__tests__/store.test.ts +55 -0
- package/src/core/wasm/bridge.ts +622 -0
- package/src/core/wasm/router.ts +39 -0
- package/src/core/wasm/rpc.ts +32 -0
- package/src/core/wasm/share.ts +15 -0
- package/src/core/wasm/state.ts +21 -0
- package/src/core/wasm/store.ts +122 -0
- package/src/core/wasm/utils.ts +12 -0
- package/src/core/wasm/worker/bootstrap.ts +223 -0
- package/src/core/wasm/worker/constants.ts +2 -0
- package/src/core/wasm/worker/fs.ts +90 -0
- package/src/core/wasm/worker/getController.ts +16 -0
- package/src/core/wasm/worker/getFS.ts +9 -0
- package/src/core/wasm/worker/getMarimoWheel.ts +15 -0
- package/src/core/wasm/worker/getPyodideVersion.ts +10 -0
- package/src/core/wasm/worker/message-buffer.ts +32 -0
- package/src/core/wasm/worker/save-worker.ts +107 -0
- package/src/core/wasm/worker/tracer.ts +7 -0
- package/src/core/wasm/worker/types.ts +97 -0
- package/src/core/wasm/worker/worker.ts +375 -0
- package/src/core/websocket/StaticWebsocket.ts +61 -0
- package/src/core/websocket/connection-utils.ts +59 -0
- package/src/core/websocket/types.ts +43 -0
- package/src/core/websocket/useMarimoWebSocket.tsx +386 -0
- package/src/core/websocket/useWebSocket.tsx +88 -0
- package/src/css/admonition.css +127 -0
- package/src/css/app/App.css +77 -0
- package/src/css/app/Cell.css +433 -0
- package/src/css/app/Header.css +25 -0
- package/src/css/app/codemirror-completions.css +308 -0
- package/src/css/app/codemirror.css +136 -0
- package/src/css/app/fonts.css +50 -0
- package/src/css/app/print.css +86 -0
- package/src/css/app/reset.css +18 -0
- package/src/css/codehilite.css +354 -0
- package/src/css/common.css +45 -0
- package/src/css/globals.css +176 -0
- package/src/css/index.css +10 -0
- package/src/css/katex-fonts.css +214 -0
- package/src/css/katex.min.css +1183 -0
- package/src/css/md-tooltip.css +52 -0
- package/src/css/md.css +365 -0
- package/src/css/progress.css +93 -0
- package/src/css/table.css +45 -0
- package/src/custom.d.ts +24 -0
- package/src/fonts/Fira_Mono/FiraMono-Bold.ttf +0 -0
- package/src/fonts/Fira_Mono/FiraMono-Medium.ttf +0 -0
- package/src/fonts/Fira_Mono/FiraMono-Regular.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_AMS-Regular.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_AMS-Regular.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_AMS-Regular.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Caligraphic-Bold.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Caligraphic-Bold.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Caligraphic-Bold.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Caligraphic-Regular.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Caligraphic-Regular.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Caligraphic-Regular.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Fraktur-Bold.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Fraktur-Bold.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Fraktur-Bold.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Fraktur-Regular.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Fraktur-Regular.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Fraktur-Regular.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Main-Bold.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Main-Bold.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Main-Bold.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Main-BoldItalic.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Main-BoldItalic.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Main-BoldItalic.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Main-Italic.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Main-Italic.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Main-Italic.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Main-Regular.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Main-Regular.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Main-Regular.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Math-BoldItalic.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Math-BoldItalic.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Math-BoldItalic.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Math-Italic.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Math-Italic.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Math-Italic.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_SansSerif-Bold.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_SansSerif-Bold.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_SansSerif-Bold.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_SansSerif-Italic.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_SansSerif-Italic.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_SansSerif-Italic.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_SansSerif-Regular.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_SansSerif-Regular.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_SansSerif-Regular.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Script-Regular.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Script-Regular.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Script-Regular.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Size1-Regular.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Size1-Regular.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Size1-Regular.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Size2-Regular.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Size2-Regular.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Size2-Regular.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Size3-Regular.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Size3-Regular.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Size3-Regular.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Size4-Regular.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Size4-Regular.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Size4-Regular.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Typewriter-Regular.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Typewriter-Regular.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Typewriter-Regular.woff2 +0 -0
- package/src/fonts/Lora/Lora-Italic-VariableFont_wght.ttf +0 -0
- package/src/fonts/Lora/Lora-VariableFont_wght.ttf +0 -0
- package/src/fonts/Lora/static/Lora-Bold.ttf +0 -0
- package/src/fonts/Lora/static/Lora-BoldItalic.ttf +0 -0
- package/src/fonts/Lora/static/Lora-Italic.ttf +0 -0
- package/src/fonts/Lora/static/Lora-Medium.ttf +0 -0
- package/src/fonts/Lora/static/Lora-MediumItalic.ttf +0 -0
- package/src/fonts/Lora/static/Lora-Regular.ttf +0 -0
- package/src/fonts/Lora/static/Lora-SemiBold.ttf +0 -0
- package/src/fonts/Lora/static/Lora-SemiBoldItalic.ttf +0 -0
- package/src/fonts/PT_Sans/PTSans-Bold.ttf +0 -0
- package/src/fonts/PT_Sans/PTSans-BoldItalic.ttf +0 -0
- package/src/fonts/PT_Sans/PTSans-Italic.ttf +0 -0
- package/src/fonts/PT_Sans/PTSans-Regular.ttf +0 -0
- package/src/hooks/__tests__/useBoolean.test.tsx +33 -0
- package/src/hooks/__tests__/useDebounce.test.tsx +182 -0
- package/src/hooks/__tests__/useEffectSkipFirstRender.test.tsx +42 -0
- package/src/hooks/__tests__/useEventListener.test.tsx +148 -0
- package/src/hooks/__tests__/useInternalStateWithSync.test.tsx +76 -0
- package/src/hooks/__tests__/useInterval.test.tsx +70 -0
- package/src/hooks/__tests__/usePackageMetadata.test.tsx +219 -0
- package/src/hooks/__tests__/useResizeHandle.test.tsx +240 -0
- package/src/hooks/__tests__/useResizeObserver.test.tsx +86 -0
- package/src/hooks/__tests__/useTimer.test.tsx +62 -0
- package/src/hooks/debug.ts +116 -0
- package/src/hooks/useAsyncData.ts +392 -0
- package/src/hooks/useAudioRecorder.ts +89 -0
- package/src/hooks/useAutoGrowInputProps.ts +56 -0
- package/src/hooks/useBoolean.ts +26 -0
- package/src/hooks/useCellRenderCount.ts +15 -0
- package/src/hooks/useDebounce.ts +95 -0
- package/src/hooks/useDeepCompareMemoize.ts +22 -0
- package/src/hooks/useEffectSkipFirstRender.ts +24 -0
- package/src/hooks/useElapsedTime.ts +25 -0
- package/src/hooks/useEvent.ts +2 -0
- package/src/hooks/useEventListener.ts +68 -0
- package/src/hooks/useHotkey.ts +77 -0
- package/src/hooks/useInternalStateWithSync.ts +26 -0
- package/src/hooks/useInterval.ts +49 -0
- package/src/hooks/useIsDragging.tsx +39 -0
- package/src/hooks/useLifecycle.ts +20 -0
- package/src/hooks/useLocalStorage.ts +22 -0
- package/src/hooks/useNonce.ts +9 -0
- package/src/hooks/usePackageMetadata.ts +52 -0
- package/src/hooks/useRecentCommands.ts +25 -0
- package/src/hooks/useResizeHandle.ts +110 -0
- package/src/hooks/useResizeObserver.ts +101 -0
- package/src/hooks/useScript.ts +90 -0
- package/src/hooks/useSelectAllContent.ts +42 -0
- package/src/hooks/useTimer.ts +48 -0
- package/src/main.tsx +20 -0
- package/src/mount.tsx +331 -0
- package/src/plugins/core/BadPlugin.tsx +72 -0
- package/src/plugins/core/RenderHTML.tsx +136 -0
- package/src/plugins/core/__test__/RenderHTML.test.ts +146 -0
- package/src/plugins/core/builder.ts +59 -0
- package/src/plugins/core/registerReactComponent.tsx +535 -0
- package/src/plugins/core/rpc.ts +55 -0
- package/src/plugins/core/sidebar-element.tsx +104 -0
- package/src/plugins/impl/ButtonPlugin.tsx +95 -0
- package/src/plugins/impl/CheckboxPlugin.tsx +56 -0
- package/src/plugins/impl/CodeEditorPlugin.tsx +119 -0
- package/src/plugins/impl/DataEditorPlugin.tsx +181 -0
- package/src/plugins/impl/DataTablePlugin.tsx +948 -0
- package/src/plugins/impl/DatePickerPlugin.tsx +74 -0
- package/src/plugins/impl/DateRangePlugin.tsx +82 -0
- package/src/plugins/impl/DateTimePickerPlugin.tsx +76 -0
- package/src/plugins/impl/DictPlugin.tsx +80 -0
- package/src/plugins/impl/DropdownPlugin.tsx +102 -0
- package/src/plugins/impl/FileBrowserPlugin.tsx +500 -0
- package/src/plugins/impl/FileUploadPlugin.tsx +302 -0
- package/src/plugins/impl/FormPlugin.tsx +294 -0
- package/src/plugins/impl/MicrophonePlugin.tsx +58 -0
- package/src/plugins/impl/MultiselectPlugin.tsx +207 -0
- package/src/plugins/impl/NumberPlugin.tsx +84 -0
- package/src/plugins/impl/RadioPlugin.tsx +77 -0
- package/src/plugins/impl/RangeSliderPlugin.tsx +163 -0
- package/src/plugins/impl/RefreshPlugin.tsx +158 -0
- package/src/plugins/impl/SearchableSelect.tsx +122 -0
- package/src/plugins/impl/SliderPlugin.tsx +166 -0
- package/src/plugins/impl/SwitchPlugin.tsx +48 -0
- package/src/plugins/impl/TabsPlugin.tsx +83 -0
- package/src/plugins/impl/TextAreaPlugin.tsx +131 -0
- package/src/plugins/impl/TextInputPlugin.tsx +169 -0
- package/src/plugins/impl/__tests__/DateTimePickerPlugin.test.tsx +45 -0
- package/src/plugins/impl/__tests__/DropdownPlugin.test.tsx +178 -0
- package/src/plugins/impl/__tests__/MultiSelectPlugin.test.ts +41 -0
- package/src/plugins/impl/__tests__/NumberPlugin.test.tsx +144 -0
- package/src/plugins/impl/anywidget/AnyWidgetPlugin.tsx +269 -0
- package/src/plugins/impl/anywidget/__tests__/AnyWidgetPlugin.test.tsx +181 -0
- package/src/plugins/impl/anywidget/__tests__/model.test.ts +370 -0
- package/src/plugins/impl/anywidget/model.ts +314 -0
- package/src/plugins/impl/chat/ChatPlugin.tsx +98 -0
- package/src/plugins/impl/chat/chat-ui.tsx +713 -0
- package/src/plugins/impl/chat/types.ts +39 -0
- package/src/plugins/impl/code/LazyAnyLanguageCodeMirror.tsx +6 -0
- package/src/plugins/impl/code/any-language-editor.tsx +68 -0
- package/src/plugins/impl/common/error-banner.tsx +111 -0
- package/src/plugins/impl/common/intent.ts +18 -0
- package/src/plugins/impl/common/labeled.tsx +69 -0
- package/src/plugins/impl/data-editor/__tests__/data-utils.test.ts +876 -0
- package/src/plugins/impl/data-editor/__tests__/glide-utils.test.ts +452 -0
- package/src/plugins/impl/data-editor/components.tsx +179 -0
- package/src/plugins/impl/data-editor/data-utils.ts +123 -0
- package/src/plugins/impl/data-editor/glide-data-editor.tsx +651 -0
- package/src/plugins/impl/data-editor/glide-utils.ts +200 -0
- package/src/plugins/impl/data-editor/themes.ts +49 -0
- package/src/plugins/impl/data-editor/types.ts +44 -0
- package/src/plugins/impl/data-explorer/ConnectedDataExplorerComponent.tsx +268 -0
- package/src/plugins/impl/data-explorer/DataExplorerPlugin.tsx +31 -0
- package/src/plugins/impl/data-explorer/components/column-summary.tsx +174 -0
- package/src/plugins/impl/data-explorer/components/icons.tsx +30 -0
- package/src/plugins/impl/data-explorer/components/query-form.tsx +296 -0
- package/src/plugins/impl/data-explorer/encoding.ts +107 -0
- package/src/plugins/impl/data-explorer/functions/function.ts +83 -0
- package/src/plugins/impl/data-explorer/functions/types.ts +32 -0
- package/src/plugins/impl/data-explorer/marks.ts +21 -0
- package/src/plugins/impl/data-explorer/queries/field-suggestion.ts +65 -0
- package/src/plugins/impl/data-explorer/queries/histograms.ts +41 -0
- package/src/plugins/impl/data-explorer/queries/queries.ts +204 -0
- package/src/plugins/impl/data-explorer/queries/removeUndefined.ts +11 -0
- package/src/plugins/impl/data-explorer/queries/types.ts +54 -0
- package/src/plugins/impl/data-explorer/queries/utils.ts +85 -0
- package/src/plugins/impl/data-explorer/spec.ts +28 -0
- package/src/plugins/impl/data-explorer/state/reducer.ts +92 -0
- package/src/plugins/impl/data-explorer/state/types.ts +28 -0
- package/src/plugins/impl/data-frames/DataFramePlugin.tsx +303 -0
- package/src/plugins/impl/data-frames/forms/__tests__/__snapshots__/form.test.tsx.snap +1600 -0
- package/src/plugins/impl/data-frames/forms/__tests__/form.test.tsx +67 -0
- package/src/plugins/impl/data-frames/forms/context.ts +13 -0
- package/src/plugins/impl/data-frames/forms/datatype-icon.tsx +43 -0
- package/src/plugins/impl/data-frames/forms/renderers.tsx +518 -0
- package/src/plugins/impl/data-frames/panel.tsx +308 -0
- package/src/plugins/impl/data-frames/schema.ts +211 -0
- package/src/plugins/impl/data-frames/types.ts +91 -0
- package/src/plugins/impl/data-frames/utils/__tests__/getUpdatedColumnTypes.test.ts +191 -0
- package/src/plugins/impl/data-frames/utils/__tests__/operators.test.ts +116 -0
- package/src/plugins/impl/data-frames/utils/getUpdatedColumnTypes.ts +67 -0
- package/src/plugins/impl/data-frames/utils/operators.ts +202 -0
- package/src/plugins/impl/image-comparison/ImageComparisonComponent.tsx +39 -0
- package/src/plugins/impl/multiselectFilterFn.tsx +22 -0
- package/src/plugins/impl/panel/PanelPlugin.tsx +266 -0
- package/src/plugins/impl/panel/__tests__/utils.test.ts +119 -0
- package/src/plugins/impl/panel/utils.ts +104 -0
- package/src/plugins/impl/plotly/PlotlyPlugin.tsx +300 -0
- package/src/plugins/impl/plotly/__tests__/parse-from-template.test.ts +73 -0
- package/src/plugins/impl/plotly/mapbox.css +359 -0
- package/src/plugins/impl/plotly/parse-from-template.ts +58 -0
- package/src/plugins/impl/plotly/plotly.css +280 -0
- package/src/plugins/impl/vega/VegaPlugin.tsx +40 -0
- package/src/plugins/impl/vega/__tests__/__snapshots__/make-selectable.test.ts.snap +1210 -0
- package/src/plugins/impl/vega/__tests__/encodings.test.ts +172 -0
- package/src/plugins/impl/vega/__tests__/loader.test.ts +73 -0
- package/src/plugins/impl/vega/__tests__/make-selectable.test.ts +575 -0
- package/src/plugins/impl/vega/__tests__/params.test.ts +52 -0
- package/src/plugins/impl/vega/__tests__/resolve-data.test.ts +236 -0
- package/src/plugins/impl/vega/__tests__/vega.test.ts +603 -0
- package/src/plugins/impl/vega/batched.ts +41 -0
- package/src/plugins/impl/vega/encodings.ts +111 -0
- package/src/plugins/impl/vega/fix-relative-url.ts +15 -0
- package/src/plugins/impl/vega/formats.ts +25 -0
- package/src/plugins/impl/vega/loader.ts +320 -0
- package/src/plugins/impl/vega/make-selectable.ts +248 -0
- package/src/plugins/impl/vega/marks.ts +36 -0
- package/src/plugins/impl/vega/params.ts +192 -0
- package/src/plugins/impl/vega/resolve-data.ts +101 -0
- package/src/plugins/impl/vega/types.ts +32 -0
- package/src/plugins/impl/vega/utils.ts +46 -0
- package/src/plugins/impl/vega/vega-component.tsx +271 -0
- package/src/plugins/impl/vega/vega-loader.ts +53 -0
- package/src/plugins/impl/vega/vega.css +31 -0
- package/src/plugins/layout/AccordionPlugin.tsx +63 -0
- package/src/plugins/layout/CalloutPlugin.tsx +34 -0
- package/src/plugins/layout/DownloadPlugin.tsx +136 -0
- package/src/plugins/layout/ImageComparisonPlugin.tsx +35 -0
- package/src/plugins/layout/JsonOutputPlugin.tsx +47 -0
- package/src/plugins/layout/LazyPlugin.tsx +98 -0
- package/src/plugins/layout/MimeRenderPlugin.tsx +45 -0
- package/src/plugins/layout/NavigationMenuPlugin.tsx +219 -0
- package/src/plugins/layout/ProgressPlugin.tsx +175 -0
- package/src/plugins/layout/RoutesPlugin.tsx +81 -0
- package/src/plugins/layout/StatPlugin.tsx +100 -0
- package/src/plugins/layout/TexPlugin.tsx +102 -0
- package/src/plugins/layout/__test__/ProgressPlugin.test.ts +26 -0
- package/src/plugins/layout/carousel/CarouselPlugin.tsx +48 -0
- package/src/plugins/layout/mermaid/MermaidPlugin.tsx +26 -0
- package/src/plugins/layout/mermaid/mermaid.tsx +94 -0
- package/src/plugins/layout/navigation-menu.css +37 -0
- package/src/plugins/plugins.ts +116 -0
- package/src/plugins/stateless-plugin.ts +29 -0
- package/src/plugins/types.ts +82 -0
- package/src/stories/__fixtures__/vega.ts +225 -0
- package/src/stories/accordion.stories.tsx +100 -0
- package/src/stories/alert-dialog.mdx +42 -0
- package/src/stories/app-chrome.stories.tsx +26 -0
- package/src/stories/button.stories.tsx +90 -0
- package/src/stories/callout.stories.tsx +73 -0
- package/src/stories/cell-status.stories.tsx +145 -0
- package/src/stories/cell.stories.tsx +336 -0
- package/src/stories/checkbox.stories.tsx +44 -0
- package/src/stories/colors.stories.tsx +156 -0
- package/src/stories/combobox.stories.tsx +133 -0
- package/src/stories/context-menu.mdx +23 -0
- package/src/stories/data-explorer.stories.tsx +30 -0
- package/src/stories/data-table.stories.tsx +130 -0
- package/src/stories/dataframe.stories.tsx +46 -0
- package/src/stories/debugger.stories.tsx +34 -0
- package/src/stories/dialog.stories.tsx +80 -0
- package/src/stories/dropdown-menu.mdx +159 -0
- package/src/stories/editor-inputs.stories.tsx +47 -0
- package/src/stories/editor.stories.tsx +91 -0
- package/src/stories/file-upload.stories.tsx +103 -0
- package/src/stories/form-wrapper.stories.tsx +147 -0
- package/src/stories/input.stories.tsx +56 -0
- package/src/stories/label.mdx +9 -0
- package/src/stories/log-viewer.stories.tsx +74 -0
- package/src/stories/number-field.mdx +17 -0
- package/src/stories/number-field.stories.tsx +41 -0
- package/src/stories/progress-component.stories.tsx +74 -0
- package/src/stories/progress.stories.tsx +33 -0
- package/src/stories/radio-group.mdx +54 -0
- package/src/stories/select-native.stories.tsx +49 -0
- package/src/stories/select.stories.tsx +92 -0
- package/src/stories/slider.stories.tsx +27 -0
- package/src/stories/stat.stories.tsx +123 -0
- package/src/stories/switch.mdx +20 -0
- package/src/stories/switchable-multi-select.stories.tsx +31 -0
- package/src/stories/tabs.mdx +59 -0
- package/src/stories/textarea.stories.tsx +58 -0
- package/src/stories/theme.stories.tsx +111 -0
- package/src/stories/tooltip.mdx +32 -0
- package/src/stories/typography.stories.tsx +80 -0
- package/src/stories/variables.stories.tsx +58 -0
- package/src/stories/vega.stories.tsx +57 -0
- package/src/theme/ThemeProvider.tsx +32 -0
- package/src/theme/namespace.tsx +23 -0
- package/src/theme/useTheme.ts +89 -0
- package/src/utils/Deferred.ts +20 -0
- package/src/utils/Logger.ts +91 -0
- package/src/utils/__tests__/Deferred.test.ts +38 -0
- package/src/utils/__tests__/arrays.test.ts +130 -0
- package/src/utils/__tests__/batch-requests.test.ts +60 -0
- package/src/utils/__tests__/blob.test.ts +52 -0
- package/src/utils/__tests__/cell-urls.test.ts +92 -0
- package/src/utils/__tests__/createReducer.test.ts +184 -0
- package/src/utils/__tests__/data-views.test.ts +112 -0
- package/src/utils/__tests__/dates.test.ts +188 -0
- package/src/utils/__tests__/edit-distance.test.ts +302 -0
- package/src/utils/__tests__/errors.test.ts +54 -0
- package/src/utils/__tests__/filenames.test.ts +30 -0
- package/src/utils/__tests__/id-tree.test.ts +1994 -0
- package/src/utils/__tests__/json-parser.test.ts +79 -0
- package/src/utils/__tests__/local-storage.test.ts +77 -0
- package/src/utils/__tests__/lru.test.ts +74 -0
- package/src/utils/__tests__/maps.test.ts +91 -0
- package/src/utils/__tests__/math.test.ts +29 -0
- package/src/utils/__tests__/multi-map.test.ts +295 -0
- package/src/utils/__tests__/numbers.test.ts +76 -0
- package/src/utils/__tests__/path.test.ts +170 -0
- package/src/utils/__tests__/pluralize.test.ts +47 -0
- package/src/utils/__tests__/routes.test.ts +134 -0
- package/src/utils/__tests__/sets.test.ts +41 -0
- package/src/utils/__tests__/shallow-compare.test.ts +55 -0
- package/src/utils/__tests__/strings.test.ts +68 -0
- package/src/utils/__tests__/time.test.ts +61 -0
- package/src/utils/__tests__/timed-cache.test.ts +142 -0
- package/src/utils/__tests__/timeout.test.ts +153 -0
- package/src/utils/__tests__/traceback.test.ts +34 -0
- package/src/utils/__tests__/url.test.ts +100 -0
- package/src/utils/__tests__/urls.test.ts +10 -0
- package/src/utils/__tests__/versions.test.ts +63 -0
- package/src/utils/__tests__/waitForWs.test.ts +76 -0
- package/src/utils/arrays.ts +75 -0
- package/src/utils/assertExists.ts +12 -0
- package/src/utils/assertNever.ts +20 -0
- package/src/utils/batch-requests.ts +28 -0
- package/src/utils/blob.ts +45 -0
- package/src/utils/cell-urls.ts +31 -0
- package/src/utils/cn.ts +8 -0
- package/src/utils/copy.ts +17 -0
- package/src/utils/createReducer.ts +137 -0
- package/src/utils/data-views.ts +54 -0
- package/src/utils/dates.ts +145 -0
- package/src/utils/dereference.ts +10 -0
- package/src/utils/download.ts +47 -0
- package/src/utils/edit-distance.ts +141 -0
- package/src/utils/errors.ts +63 -0
- package/src/utils/events.ts +85 -0
- package/src/utils/fileToBase64.ts +30 -0
- package/src/utils/filenames.ts +29 -0
- package/src/utils/functions.ts +24 -0
- package/src/utils/id-tree.tsx +1032 -0
- package/src/utils/idle.ts +19 -0
- package/src/utils/invariant.ts +37 -0
- package/src/utils/json/__tests__/base64.test.ts +100 -0
- package/src/utils/json/base64.ts +51 -0
- package/src/utils/json/json-parser.ts +65 -0
- package/src/utils/lazy.ts +30 -0
- package/src/utils/links.ts +11 -0
- package/src/utils/localStorage.ts +132 -0
- package/src/utils/lru.ts +68 -0
- package/src/utils/maps.ts +65 -0
- package/src/utils/math.ts +6 -0
- package/src/utils/mergeRefs.ts +14 -0
- package/src/utils/multi-map.ts +71 -0
- package/src/utils/numbers.ts +124 -0
- package/src/utils/objects.ts +105 -0
- package/src/utils/once.ts +17 -0
- package/src/utils/pathUtils.test.ts +113 -0
- package/src/utils/pathUtils.ts +76 -0
- package/src/utils/paths.ts +67 -0
- package/src/utils/pluralize.ts +35 -0
- package/src/utils/python-poet/__tests__/poet.test.ts +286 -0
- package/src/utils/python-poet/poet.ts +196 -0
- package/src/utils/reload-safe.ts +15 -0
- package/src/utils/repl.ts +23 -0
- package/src/utils/routes.ts +36 -0
- package/src/utils/scroll.ts +38 -0
- package/src/utils/sets.ts +30 -0
- package/src/utils/shallow-compare.ts +30 -0
- package/src/utils/staticImplements.ts +7 -0
- package/src/utils/strings.ts +64 -0
- package/src/utils/time.ts +39 -0
- package/src/utils/timed-cache.ts +52 -0
- package/src/utils/timeout.ts +42 -0
- package/src/utils/traceback.ts +104 -0
- package/src/utils/tracer.ts +106 -0
- package/src/utils/typed.ts +17 -0
- package/src/utils/url.ts +12 -0
- package/src/utils/urls.ts +33 -0
- package/src/utils/uuid.ts +8 -0
- package/src/utils/versions.ts +66 -0
- package/src/utils/vitals.ts +30 -0
- package/src/utils/waitForWs.ts +31 -0
- package/dist/assets/_baseMap-DI8H5mdU.js +0 -1
- package/dist/assets/architectureDiagram-SUXI7LT5-BEcV3kj8.js +0 -36
- package/dist/assets/blockDiagram-6J76NXCF-BUxeo5Pp.js +0 -122
- package/dist/assets/channel-BgIIdDsO.js +0 -1
- package/dist/assets/classDiagram-M3E45YP4-CocoijMx.js +0 -1
- package/dist/assets/classDiagram-v2-YAWTLIQI-CocoijMx.js +0 -1
- package/dist/assets/clone-CkywUQE5.js +0 -1
- package/dist/assets/cytoscape.esm-CzSnbbKZ.js +0 -325
- package/dist/assets/diagram-5UYTHUR4-CaEJdB-c.js +0 -24
- package/dist/assets/edit-page-0aVIqkPG.js +0 -163
- package/dist/assets/flowDiagram-KYDEHFYC-COI3Wlzg.js +0 -162
- package/dist/assets/ganttDiagram-EK5VF46D-T8K8LZXH.js +0 -267
- package/dist/assets/index-BlxPam9h.css +0 -1
- package/dist/assets/index-DPzEQsyf.js +0 -518
- package/dist/assets/infoDiagram-LHK5PUON-DIh9EeeW.js +0 -2
- package/dist/assets/links-Co7kZnDQ.js +0 -17
- package/dist/assets/mermaid-sbM5kvPX.js +0 -207
- package/dist/assets/min-ClcSmngt.js +0 -1
- package/dist/assets/pieDiagram-NIOCPIFQ-ClBSTDHM.js +0 -30
- package/dist/assets/sortBy-BPqL9Az6.js +0 -1
- package/dist/assets/stateDiagram-v2-5AN5P6BG-Ch96oS1p.js +0 -1
- package/dist/assets/storage-6bL26f8J.js +0 -26
- package/dist/assets/time--ds3HCGk.js +0 -1
- package/dist/assets/xychartDiagram-H2YORKM3-tbgrOMTu.js +0 -7
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
var ae,se;import{g as ie}from"./chunk-E2GYISFI-uWIZ1Jhx.js";import{_ as h,F as V,d as oe,l as m,y as le,A as ce,c as z,a2 as de,P as he,a3 as q,a4 as $t,a5 as ge,u as Q,j as ye,a6 as pe,a7 as gt,a8 as ue,h as Dt}from"./mermaid-sbM5kvPX.js";import{c as xe}from"./clone-CkywUQE5.js";import{s as R}from"./transform-B8bpuzxV.js";import{G as be}from"./graph-mQaQlEC0.js";import{c as fe}from"./channel-BgIIdDsO.js";import{l as me,k as we}from"./step-BwsUM5iJ.js";import"./index-DPzEQsyf.js";import"./_baseUniq-Ds9S94xv.js";import"./_baseEach-CjvI0y7T.js";import"./timer-BwIYMJWC.js";var yt=function(){var e=h(function(d,u,k,b){for(k=k||{},b=d.length;b--;k[d[b]]=u);return k},"o"),t=[1,7],a=[1,13],n=[1,14],r=[1,15],s=[1,19],i=[1,16],o=[1,17],c=[1,18],p=[8,30],y=[8,21,28,29,30,31,32,40,44,47],x=[1,23],f=[1,24],_=[8,15,16,21,28,29,30,31,32,40,44,47],S=[8,15,16,21,27,28,29,30,31,32,40,44,47],E=[1,49],v={trace:h(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,block:31,NODE_ID:32,nodeShapeNLabel:33,dirList:34,DIR:35,NODE_DSTART:36,NODE_DEND:37,BLOCK_ARROW_START:38,BLOCK_ARROW_END:39,classDef:40,CLASSDEF_ID:41,CLASSDEF_STYLEOPTS:42,DEFAULT:43,class:44,CLASSENTITY_IDS:45,STYLECLASS:46,style:47,STYLE_ENTITY_IDS:48,STYLE_DEFINITION_DATA:49,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"block",32:"NODE_ID",35:"DIR",36:"NODE_DSTART",37:"NODE_DEND",38:"BLOCK_ARROW_START",39:"BLOCK_ARROW_END",40:"classDef",41:"CLASSDEF_ID",42:"CLASSDEF_STYLEOPTS",43:"DEFAULT",44:"class",45:"CLASSENTITY_IDS",46:"STYLECLASS",47:"style",48:"STYLE_ENTITY_IDS",49:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[34,1],[34,2],[33,3],[33,4],[23,3],[23,3],[24,3],[25,3]],performAction:h(function(d,u,k,b,w,l,L){var g=l.length-1;switch(w){case 4:b.getLogger().debug("Rule: separator (NL) ");break;case 5:b.getLogger().debug("Rule: separator (Space) ");break;case 6:b.getLogger().debug("Rule: separator (EOF) ");break;case 7:b.getLogger().debug("Rule: hierarchy: ",l[g-1]),b.setHierarchy(l[g-1]);break;case 8:b.getLogger().debug("Stop NL ");break;case 9:b.getLogger().debug("Stop EOF ");break;case 10:b.getLogger().debug("Stop NL2 ");break;case 11:b.getLogger().debug("Stop EOF2 ");break;case 12:b.getLogger().debug("Rule: statement: ",l[g]),typeof l[g].length=="number"?this.$=l[g]:this.$=[l[g]];break;case 13:b.getLogger().debug("Rule: statement #2: ",l[g-1]),this.$=[l[g-1]].concat(l[g]);break;case 14:b.getLogger().debug("Rule: link: ",l[g],d),this.$={edgeTypeStr:l[g],label:""};break;case 15:b.getLogger().debug("Rule: LABEL link: ",l[g-3],l[g-1],l[g]),this.$={edgeTypeStr:l[g],label:l[g-1]};break;case 18:const D=parseInt(l[g]),H=b.generateId();this.$={id:H,type:"space",label:"",width:D,children:[]};break;case 23:b.getLogger().debug("Rule: (nodeStatement link node) ",l[g-2],l[g-1],l[g]," typestr: ",l[g-1].edgeTypeStr);const U=b.edgeStrToEdgeData(l[g-1].edgeTypeStr);this.$=[{id:l[g-2].id,label:l[g-2].label,type:l[g-2].type,directions:l[g-2].directions},{id:l[g-2].id+"-"+l[g].id,start:l[g-2].id,end:l[g].id,label:l[g-1].label,type:"edge",directions:l[g].directions,arrowTypeEnd:U,arrowTypeStart:"arrow_open"},{id:l[g].id,label:l[g].label,type:b.typeStr2Type(l[g].typeStr),directions:l[g].directions}];break;case 24:b.getLogger().debug("Rule: nodeStatement (abc88 node size) ",l[g-1],l[g]),this.$={id:l[g-1].id,label:l[g-1].label,type:b.typeStr2Type(l[g-1].typeStr),directions:l[g-1].directions,widthInColumns:parseInt(l[g],10)};break;case 25:b.getLogger().debug("Rule: nodeStatement (node) ",l[g]),this.$={id:l[g].id,label:l[g].label,type:b.typeStr2Type(l[g].typeStr),directions:l[g].directions,widthInColumns:1};break;case 26:b.getLogger().debug("APA123",this?this:"na"),b.getLogger().debug("COLUMNS: ",l[g]),this.$={type:"column-setting",columns:l[g]==="auto"?-1:parseInt(l[g])};break;case 27:b.getLogger().debug("Rule: id-block statement : ",l[g-2],l[g-1]),b.generateId(),this.$={...l[g-2],type:"composite",children:l[g-1]};break;case 28:b.getLogger().debug("Rule: blockStatement : ",l[g-2],l[g-1],l[g]);const T=b.generateId();this.$={id:T,type:"composite",label:"",children:l[g-1]};break;case 29:b.getLogger().debug("Rule: node (NODE_ID separator): ",l[g]),this.$={id:l[g]};break;case 30:b.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",l[g-1],l[g]),this.$={id:l[g-1],label:l[g].label,typeStr:l[g].typeStr,directions:l[g].directions};break;case 31:b.getLogger().debug("Rule: dirList: ",l[g]),this.$=[l[g]];break;case 32:b.getLogger().debug("Rule: dirList: ",l[g-1],l[g]),this.$=[l[g-1]].concat(l[g]);break;case 33:b.getLogger().debug("Rule: nodeShapeNLabel: ",l[g-2],l[g-1],l[g]),this.$={typeStr:l[g-2]+l[g],label:l[g-1]};break;case 34:b.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",l[g-3],l[g-2]," #3:",l[g-1],l[g]),this.$={typeStr:l[g-3]+l[g],label:l[g-2],directions:l[g-1]};break;case 35:case 36:this.$={type:"classDef",id:l[g-1].trim(),css:l[g].trim()};break;case 37:this.$={type:"applyClass",id:l[g-1].trim(),styleClass:l[g].trim()};break;case 38:this.$={type:"applyStyles",id:l[g-1].trim(),stylesStr:l[g].trim()}}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{11:3,13:4,19:5,20:6,21:t,22:8,23:9,24:10,25:11,26:12,28:a,29:n,31:r,32:s,40:i,44:o,47:c},{8:[1,20]},e(p,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,21:t,28:a,29:n,31:r,32:s,40:i,44:o,47:c}),e(y,[2,16],{14:22,15:x,16:f}),e(y,[2,17]),e(y,[2,18]),e(y,[2,19]),e(y,[2,20]),e(y,[2,21]),e(y,[2,22]),e(_,[2,25],{27:[1,25]}),e(y,[2,26]),{19:26,26:12,32:s},{11:27,13:4,19:5,20:6,21:t,22:8,23:9,24:10,25:11,26:12,28:a,29:n,31:r,32:s,40:i,44:o,47:c},{41:[1,28],43:[1,29]},{45:[1,30]},{48:[1,31]},e(S,[2,29],{33:32,36:[1,33],38:[1,34]}),{1:[2,7]},e(p,[2,13]),{26:35,32:s},{32:[2,14]},{17:[1,36]},e(_,[2,24]),{11:37,13:4,14:22,15:x,16:f,19:5,20:6,21:t,22:8,23:9,24:10,25:11,26:12,28:a,29:n,31:r,32:s,40:i,44:o,47:c},{30:[1,38]},{42:[1,39]},{42:[1,40]},{46:[1,41]},{49:[1,42]},e(S,[2,30]),{18:[1,43]},{18:[1,44]},e(_,[2,23]),{18:[1,45]},{30:[1,46]},e(y,[2,28]),e(y,[2,35]),e(y,[2,36]),e(y,[2,37]),e(y,[2,38]),{37:[1,47]},{34:48,35:E},{15:[1,50]},e(y,[2,27]),e(S,[2,33]),{39:[1,51]},{34:52,35:E,39:[2,31]},{32:[2,15]},e(S,[2,34]),{39:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:h(function(d,u){if(!u.recoverable){var k=new Error(d);throw k.hash=u,k}this.trace(d)},"parseError"),parse:h(function(d){var u=this,k=[0],b=[],w=[null],l=[],L=this.table,g="",D=0,H=0,U=l.slice.call(arguments,1),T=Object.create(this.lexer),M={yy:{}};for(var dt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,dt)&&(M.yy[dt]=this.yy[dt]);T.setInput(d,M.yy),M.yy.lexer=T,M.yy.parser=this,T.yylloc===void 0&&(T.yylloc={});var ht=T.yylloc;l.push(ht);var ne=T.options&&T.options.ranges;function Lt(){var X;return typeof(X=b.pop()||T.lex()||1)!="number"&&(X instanceof Array&&(X=(b=X).pop()),X=u.symbols_[X]||X),X}typeof M.yy.parseError=="function"?this.parseError=M.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,h(function(X){k.length=k.length-2*X,w.length=w.length-X,l.length=l.length-X},"popStack"),h(Lt,"lex");for(var P,G,W,_t,rt,Z,Et,at,J={};;){if(G=k[k.length-1],this.defaultActions[G]?W=this.defaultActions[G]:(P==null&&(P=Lt()),W=L[G]&&L[G][P]),W===void 0||!W.length||!W[0]){var vt="";for(rt in at=[],L[G])this.terminals_[rt]&&rt>2&&at.push("'"+this.terminals_[rt]+"'");vt=T.showPosition?"Parse error on line "+(D+1)+`:
|
|
2
|
-
`+T.showPosition()+`
|
|
3
|
-
Expecting `+at.join(", ")+", got '"+(this.terminals_[P]||P)+"'":"Parse error on line "+(D+1)+": Unexpected "+(P==1?"end of input":"'"+(this.terminals_[P]||P)+"'"),this.parseError(vt,{text:T.match,token:this.terminals_[P]||P,line:T.yylineno,loc:ht,expected:at})}if(W[0]instanceof Array&&W.length>1)throw new Error("Parse Error: multiple actions possible at state: "+G+", token: "+P);switch(W[0]){case 1:k.push(P),w.push(T.yytext),l.push(T.yylloc),k.push(W[1]),P=null,H=T.yyleng,g=T.yytext,D=T.yylineno,ht=T.yylloc;break;case 2:if(Z=this.productions_[W[1]][1],J.$=w[w.length-Z],J._$={first_line:l[l.length-(Z||1)].first_line,last_line:l[l.length-1].last_line,first_column:l[l.length-(Z||1)].first_column,last_column:l[l.length-1].last_column},ne&&(J._$.range=[l[l.length-(Z||1)].range[0],l[l.length-1].range[1]]),(_t=this.performAction.apply(J,[g,H,D,M.yy,W[1],w,l].concat(U)))!==void 0)return _t;Z&&(k=k.slice(0,-1*Z*2),w=w.slice(0,-1*Z),l=l.slice(0,-1*Z)),k.push(this.productions_[W[1]][0]),w.push(J.$),l.push(J._$),Et=L[k[k.length-2]][k[k.length-1]],k.push(Et);break;case 3:return!0}}return!0},"parse")},N=function(){return{EOF:1,parseError:h(function(d,u){if(!this.yy.parser)throw new Error(d);this.yy.parser.parseError(d,u)},"parseError"),setInput:h(function(d,u){return this.yy=u||this.yy||{},this._input=d,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:h(function(){var d=this._input[0];return this.yytext+=d,this.yyleng++,this.offset++,this.match+=d,this.matched+=d,d.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),d},"input"),unput:h(function(d){var u=d.length,k=d.split(/(?:\r\n?|\n)/g);this._input=d+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var b=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),k.length-1&&(this.yylineno-=k.length-1);var w=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:k?(k.length===b.length?this.yylloc.first_column:0)+b[b.length-k.length].length-k[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[w[0],w[0]+this.yyleng-u]),this.yyleng=this.yytext.length,this},"unput"),more:h(function(){return this._more=!0,this},"more"),reject:h(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:h(function(d){this.unput(this.match.slice(d))},"less"),pastInput:h(function(){var d=this.matched.substr(0,this.matched.length-this.match.length);return(d.length>20?"...":"")+d.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:h(function(){var d=this.match;return d.length<20&&(d+=this._input.substr(0,20-d.length)),(d.substr(0,20)+(d.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:h(function(){var d=this.pastInput(),u=new Array(d.length+1).join("-");return d+this.upcomingInput()+`
|
|
5
|
-
`+u+"^"},"showPosition"),test_match:h(function(d,u){var k,b,w;if(this.options.backtrack_lexer&&(w={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(w.yylloc.range=this.yylloc.range.slice(0))),(b=d[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=b.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:b?b[b.length-1].length-b[b.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+d[0].length},this.yytext+=d[0],this.match+=d[0],this.matches=d,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(d[0].length),this.matched+=d[0],k=this.performAction.call(this,this.yy,this,u,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),k)return k;if(this._backtrack){for(var l in w)this[l]=w[l];return!1}return!1},"test_match"),next:h(function(){if(this.done)return this.EOF;var d,u,k,b;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var w=this._currentRules(),l=0;l<w.length;l++)if((k=this._input.match(this.rules[w[l]]))&&(!u||k[0].length>u[0].length)){if(u=k,b=l,this.options.backtrack_lexer){if((d=this.test_match(k,w[l]))!==!1)return d;if(this._backtrack){u=!1;continue}return!1}if(!this.options.flex)break}return u?(d=this.test_match(u,w[b]))!==!1&&d:this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:h(function(){var d=this.next();return d||this.lex()},"lex"),begin:h(function(d){this.conditionStack.push(d)},"begin"),popState:h(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:h(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:h(function(d){return(d=this.conditionStack.length-1-Math.abs(d||0))>=0?this.conditionStack[d]:"INITIAL"},"topState"),pushState:h(function(d){this.begin(d)},"pushState"),stateStackSize:h(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:h(function(d,u,k,b){switch(k){case 0:return 10;case 1:return d.getLogger().debug("Found space-block"),31;case 2:return d.getLogger().debug("Found nl-block"),31;case 3:return d.getLogger().debug("Found space-block"),29;case 4:d.getLogger().debug(".",u.yytext);break;case 5:d.getLogger().debug("_",u.yytext);break;case 6:return 5;case 7:return u.yytext=-1,28;case 8:return u.yytext=u.yytext.replace(/columns\s+/,""),d.getLogger().debug("COLUMNS (LEX)",u.yytext),28;case 9:case 77:case 78:case 100:this.pushState("md_string");break;case 10:return"MD_STR";case 11:case 35:case 80:this.popState();break;case 12:this.pushState("string");break;case 13:d.getLogger().debug("LEX: POPPING STR:",u.yytext),this.popState();break;case 14:return d.getLogger().debug("LEX: STR end:",u.yytext),"STR";case 15:return u.yytext=u.yytext.replace(/space\:/,""),d.getLogger().debug("SPACE NUM (LEX)",u.yytext),21;case 16:return u.yytext="1",d.getLogger().debug("COLUMNS (LEX)",u.yytext),21;case 17:return 43;case 18:return"LINKSTYLE";case 19:return"INTERPOLATE";case 20:return this.pushState("CLASSDEF"),40;case 21:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 22:return this.popState(),this.pushState("CLASSDEFID"),41;case 23:return this.popState(),42;case 24:return this.pushState("CLASS"),44;case 25:return this.popState(),this.pushState("CLASS_STYLE"),45;case 26:return this.popState(),46;case 27:return this.pushState("STYLE_STMNT"),47;case 28:return this.popState(),this.pushState("STYLE_DEFINITION"),48;case 29:return this.popState(),49;case 30:return this.pushState("acc_title"),"acc_title";case 31:return this.popState(),"acc_title_value";case 32:return this.pushState("acc_descr"),"acc_descr";case 33:return this.popState(),"acc_descr_value";case 34:this.pushState("acc_descr_multiline");break;case 36:return"acc_descr_multiline_value";case 37:return 30;case 38:case 39:case 41:case 42:case 45:return this.popState(),d.getLogger().debug("Lex: (("),"NODE_DEND";case 40:return this.popState(),d.getLogger().debug("Lex: ))"),"NODE_DEND";case 43:return this.popState(),d.getLogger().debug("Lex: (-"),"NODE_DEND";case 44:return this.popState(),d.getLogger().debug("Lex: -)"),"NODE_DEND";case 46:return this.popState(),d.getLogger().debug("Lex: ]]"),"NODE_DEND";case 47:return this.popState(),d.getLogger().debug("Lex: ("),"NODE_DEND";case 48:return this.popState(),d.getLogger().debug("Lex: ])"),"NODE_DEND";case 49:case 50:return this.popState(),d.getLogger().debug("Lex: /]"),"NODE_DEND";case 51:return this.popState(),d.getLogger().debug("Lex: )]"),"NODE_DEND";case 52:return this.popState(),d.getLogger().debug("Lex: )"),"NODE_DEND";case 53:return this.popState(),d.getLogger().debug("Lex: ]>"),"NODE_DEND";case 54:return this.popState(),d.getLogger().debug("Lex: ]"),"NODE_DEND";case 55:return d.getLogger().debug("Lexa: -)"),this.pushState("NODE"),36;case 56:return d.getLogger().debug("Lexa: (-"),this.pushState("NODE"),36;case 57:return d.getLogger().debug("Lexa: ))"),this.pushState("NODE"),36;case 58:case 60:case 61:case 62:case 65:return d.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 59:return d.getLogger().debug("Lex: ((("),this.pushState("NODE"),36;case 63:return d.getLogger().debug("Lexc: >"),this.pushState("NODE"),36;case 64:return d.getLogger().debug("Lexa: (["),this.pushState("NODE"),36;case 66:case 67:case 68:case 69:case 70:case 71:case 72:return this.pushState("NODE"),36;case 73:return d.getLogger().debug("Lexa: ["),this.pushState("NODE"),36;case 74:return this.pushState("BLOCK_ARROW"),d.getLogger().debug("LEX ARR START"),38;case 75:return d.getLogger().debug("Lex: NODE_ID",u.yytext),32;case 76:return d.getLogger().debug("Lex: EOF",u.yytext),8;case 79:return"NODE_DESCR";case 81:d.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 82:d.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 83:return d.getLogger().debug("LEX: NODE_DESCR:",u.yytext),"NODE_DESCR";case 84:d.getLogger().debug("LEX POPPING"),this.popState();break;case 85:d.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 86:return u.yytext=u.yytext.replace(/^,\s*/,""),d.getLogger().debug("Lex (right): dir:",u.yytext),"DIR";case 87:return u.yytext=u.yytext.replace(/^,\s*/,""),d.getLogger().debug("Lex (left):",u.yytext),"DIR";case 88:return u.yytext=u.yytext.replace(/^,\s*/,""),d.getLogger().debug("Lex (x):",u.yytext),"DIR";case 89:return u.yytext=u.yytext.replace(/^,\s*/,""),d.getLogger().debug("Lex (y):",u.yytext),"DIR";case 90:return u.yytext=u.yytext.replace(/^,\s*/,""),d.getLogger().debug("Lex (up):",u.yytext),"DIR";case 91:return u.yytext=u.yytext.replace(/^,\s*/,""),d.getLogger().debug("Lex (down):",u.yytext),"DIR";case 92:return u.yytext="]>",d.getLogger().debug("Lex (ARROW_DIR end):",u.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 93:return d.getLogger().debug("Lex: LINK","#"+u.yytext+"#"),15;case 94:case 95:case 96:return d.getLogger().debug("Lex: LINK",u.yytext),15;case 97:case 98:case 99:return d.getLogger().debug("Lex: START_LINK",u.yytext),this.pushState("LLABEL"),16;case 101:return d.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 102:return this.popState(),d.getLogger().debug("Lex: LINK","#"+u.yytext+"#"),15;case 103:case 104:return this.popState(),d.getLogger().debug("Lex: LINK",u.yytext),15;case 105:return d.getLogger().debug("Lex: COLON",u.yytext),u.yytext=u.yytext.slice(1),27}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block\s+)/,/^(?:block\n+)/,/^(?:block:)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[29],inclusive:!1},STYLE_STMNT:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[23],inclusive:!1},CLASSDEF:{rules:[21,22],inclusive:!1},CLASS_STYLE:{rules:[26],inclusive:!1},CLASS:{rules:[25],inclusive:!1},LLABEL:{rules:[100,101,102,103,104],inclusive:!1},ARROW_DIR:{rules:[86,87,88,89,90,91,92],inclusive:!1},BLOCK_ARROW:{rules:[77,82,85],inclusive:!1},NODE:{rules:[38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,78,81],inclusive:!1},md_string:{rules:[10,11,79,80],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[13,14,83,84],inclusive:!1},acc_descr_multiline:{rules:[35,36],inclusive:!1},acc_descr:{rules:[33],inclusive:!1},acc_title:{rules:[31],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,12,15,16,17,18,19,20,24,27,30,32,34,37,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,93,94,95,96,97,98,99,105],inclusive:!0}}}}();function $(){this.yy={}}return v.lexer=N,h($,"Parser"),$.prototype=v,v.Parser=$,new $}();yt.parser=yt;var ke=yt,K=new Map,pt=[],ut=new Map,Tt="color",Ct="fill",Se=z(),st=new Map,Le=h(e=>ye.sanitizeText(e,Se),"sanitizeText"),_e=h(function(e,t=""){let a=st.get(e);a||(a={id:e,styles:[],textStyles:[]},st.set(e,a)),t!=null&&t.split(",").forEach(n=>{const r=n.replace(/([^;]*);/,"$1").trim();if(RegExp(Tt).exec(n)){const s=r.replace(Ct,"bgFill").replace(Tt,Ct);a.textStyles.push(s)}a.styles.push(r)})},"addStyleClass"),Ee=h(function(e,t=""){const a=K.get(e);t!=null&&(a.styles=t.split(","))},"addStyle2Node"),ve=h(function(e,t){e.split(",").forEach(function(a){let n=K.get(a);if(n===void 0){const r=a.trim();n={id:r,type:"na",children:[]},K.set(r,n)}n.classes||(n.classes=[]),n.classes.push(t)})},"setCssClass"),Nt=h((e,t)=>{const a=e.flat(),n=[];for(const r of a)if(r.label&&(r.label=Le(r.label)),r.type!=="classDef")if(r.type!=="applyClass")if(r.type!=="applyStyles")if(r.type==="column-setting")t.columns=r.columns??-1;else if(r.type==="edge"){const s=(ut.get(r.id)??0)+1;ut.set(r.id,s),r.id=s+"-"+r.id,pt.push(r)}else{r.label||(r.type==="composite"?r.label="":r.label=r.id);const s=K.get(r.id);if(s===void 0?K.set(r.id,r):(r.type!=="na"&&(s.type=r.type),r.label!==r.id&&(s.label=r.label)),r.children&&Nt(r.children,r),r.type==="space"){const i=r.width??1;for(let o=0;o<i;o++){const c=xe(r);c.id=c.id+"-"+o,K.set(c.id,c),n.push(c)}}else s===void 0&&n.push(r)}else r!=null&&r.stylesStr&&Ee(r.id,r==null?void 0:r.stylesStr);else ve(r.id,(r==null?void 0:r.styleClass)??"");else _e(r.id,r.css);t.children=n},"populateBlockDatabase"),xt=[],tt={id:"root",type:"composite",children:[],columns:-1},$e=h(()=>{m.debug("Clear called"),le(),tt={id:"root",type:"composite",children:[],columns:-1},K=new Map([["root",tt]]),xt=[],st=new Map,pt=[],ut=new Map},"clear");function It(e){switch(m.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return m.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}function Bt(e){return m.debug("typeStr2Type",e),e==="=="?"thick":"normal"}function zt(e){switch(e.trim()){case"--x":return"arrow_cross";case"--o":return"arrow_circle";default:return"arrow_point"}}h(It,"typeStr2Type"),h(Bt,"edgeTypeStr2Type"),h(zt,"edgeStrToEdgeData");var Rt=0,De=h(()=>(Rt++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Rt),"generateId"),Te=h(e=>{tt.children=e,Nt(e,tt),xt=tt.children},"setHierarchy"),Ce=h(e=>{const t=K.get(e);return t?t.columns?t.columns:t.children?t.children.length:-1:-1},"getColumns"),Ne=h(()=>[...K.values()],"getBlocksFlat"),Ie=h(()=>xt||[],"getBlocks"),Be=h(()=>pt,"getEdges"),ze=h(e=>K.get(e),"getBlock"),Re=h(e=>{K.set(e.id,e)},"setBlock"),Oe=h(()=>m,"getLogger"),Ae=h(function(){return st},"getClasses"),Me={getConfig:h(()=>V().block,"getConfig"),typeStr2Type:It,edgeTypeStr2Type:Bt,edgeStrToEdgeData:zt,getLogger:Oe,getBlocksFlat:Ne,getBlocks:Ie,getEdges:Be,setHierarchy:Te,getBlock:ze,setBlock:Re,getColumns:Ce,getClasses:Ae,clear:$e,generateId:De},nt=h((e,t)=>{const a=fe,n=a(e,"r"),r=a(e,"g"),s=a(e,"b");return ce(n,r,s,t)},"fade"),Pe=h(e=>`.label {
|
|
7
|
-
font-family: ${e.fontFamily};
|
|
8
|
-
color: ${e.nodeTextColor||e.textColor};
|
|
9
|
-
}
|
|
10
|
-
.cluster-label text {
|
|
11
|
-
fill: ${e.titleColor};
|
|
12
|
-
}
|
|
13
|
-
.cluster-label span,p {
|
|
14
|
-
color: ${e.titleColor};
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
.label text,span,p {
|
|
20
|
-
fill: ${e.nodeTextColor||e.textColor};
|
|
21
|
-
color: ${e.nodeTextColor||e.textColor};
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.node rect,
|
|
25
|
-
.node circle,
|
|
26
|
-
.node ellipse,
|
|
27
|
-
.node polygon,
|
|
28
|
-
.node path {
|
|
29
|
-
fill: ${e.mainBkg};
|
|
30
|
-
stroke: ${e.nodeBorder};
|
|
31
|
-
stroke-width: 1px;
|
|
32
|
-
}
|
|
33
|
-
.flowchart-label text {
|
|
34
|
-
text-anchor: middle;
|
|
35
|
-
}
|
|
36
|
-
// .flowchart-label .text-outer-tspan {
|
|
37
|
-
// text-anchor: middle;
|
|
38
|
-
// }
|
|
39
|
-
// .flowchart-label .text-inner-tspan {
|
|
40
|
-
// text-anchor: start;
|
|
41
|
-
// }
|
|
42
|
-
|
|
43
|
-
.node .label {
|
|
44
|
-
text-align: center;
|
|
45
|
-
}
|
|
46
|
-
.node.clickable {
|
|
47
|
-
cursor: pointer;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.arrowheadPath {
|
|
51
|
-
fill: ${e.arrowheadColor};
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.edgePath .path {
|
|
55
|
-
stroke: ${e.lineColor};
|
|
56
|
-
stroke-width: 2.0px;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.flowchart-link {
|
|
60
|
-
stroke: ${e.lineColor};
|
|
61
|
-
fill: none;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.edgeLabel {
|
|
65
|
-
background-color: ${e.edgeLabelBackground};
|
|
66
|
-
rect {
|
|
67
|
-
opacity: 0.5;
|
|
68
|
-
background-color: ${e.edgeLabelBackground};
|
|
69
|
-
fill: ${e.edgeLabelBackground};
|
|
70
|
-
}
|
|
71
|
-
text-align: center;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/* For html labels only */
|
|
75
|
-
.labelBkg {
|
|
76
|
-
background-color: ${nt(e.edgeLabelBackground,.5)};
|
|
77
|
-
// background-color:
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.node .cluster {
|
|
81
|
-
// fill: ${nt(e.mainBkg,.5)};
|
|
82
|
-
fill: ${nt(e.clusterBkg,.5)};
|
|
83
|
-
stroke: ${nt(e.clusterBorder,.2)};
|
|
84
|
-
box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
|
|
85
|
-
stroke-width: 1px;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.cluster text {
|
|
89
|
-
fill: ${e.titleColor};
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.cluster span,p {
|
|
93
|
-
color: ${e.titleColor};
|
|
94
|
-
}
|
|
95
|
-
/* .cluster div {
|
|
96
|
-
color: ${e.titleColor};
|
|
97
|
-
} */
|
|
98
|
-
|
|
99
|
-
div.mermaidTooltip {
|
|
100
|
-
position: absolute;
|
|
101
|
-
text-align: center;
|
|
102
|
-
max-width: 200px;
|
|
103
|
-
padding: 2px;
|
|
104
|
-
font-family: ${e.fontFamily};
|
|
105
|
-
font-size: 12px;
|
|
106
|
-
background: ${e.tertiaryColor};
|
|
107
|
-
border: 1px solid ${e.border2};
|
|
108
|
-
border-radius: 2px;
|
|
109
|
-
pointer-events: none;
|
|
110
|
-
z-index: 100;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
.flowchartTitleText {
|
|
114
|
-
text-anchor: middle;
|
|
115
|
-
font-size: 18px;
|
|
116
|
-
fill: ${e.textColor};
|
|
117
|
-
}
|
|
118
|
-
${ie()}
|
|
119
|
-
`,"getStyles"),Ye=h((e,t,a,n)=>{t.forEach(r=>{We[r](e,a,n)})},"insertMarkers"),We={extension:h((e,t,a)=>{m.trace("Making markers for ",a),e.append("defs").append("marker").attr("id",a+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",a+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),composition:h((e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",a+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),aggregation:h((e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",a+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),dependency:h((e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",a+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),lollipop:h((e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",a+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),point:h((e,t,a)=>{e.append("marker").attr("id",a+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",a+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),circle:h((e,t,a)=>{e.append("marker").attr("id",a+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",a+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),cross:h((e,t,a)=>{e.append("marker").attr("id",a+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",a+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),barb:h((e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb")},Xe=Ye,B=((se=(ae=z())==null?void 0:ae.block)==null?void 0:se.padding)??8;function Ot(e,t){if(e===0||!Number.isInteger(e))throw new Error("Columns must be an integer !== 0.");if(t<0||!Number.isInteger(t))throw new Error("Position must be a non-negative integer."+t);return e<0?{px:t,py:0}:e===1?{px:0,py:t}:{px:t%e,py:Math.floor(t/e)}}h(Ot,"calculateBlockPosition");var Fe=h(e=>{let t=0,a=0;for(const n of e.children){const{width:r,height:s,x:i,y:o}=n.size??{width:0,height:0,x:0,y:0};m.debug("getMaxChildSize abc95 child:",n.id,"width:",r,"height:",s,"x:",i,"y:",o,n.type),n.type!=="space"&&(r>t&&(t=r/(e.widthInColumns??1)),s>a&&(a=s))}return{width:t,height:a}},"getMaxChildSize");function it(e,t,a=0,n=0){var i,o,c,p,y,x,f,_,S,E,v;m.debug("setBlockSizes abc95 (start)",e.id,(i=e==null?void 0:e.size)==null?void 0:i.x,"block width =",e==null?void 0:e.size,"siblingWidth",a),(o=e==null?void 0:e.size)!=null&&o.width||(e.size={width:a,height:n,x:0,y:0});let r=0,s=0;if(((c=e.children)==null?void 0:c.length)>0){for(const l of e.children)it(l,t);const N=Fe(e);r=N.width,s=N.height,m.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",r,s);for(const l of e.children)l.size&&(m.debug(`abc95 Setting size of children of ${e.id} id=${l.id} ${r} ${s} ${JSON.stringify(l.size)}`),l.size.width=r*(l.widthInColumns??1)+B*((l.widthInColumns??1)-1),l.size.height=s,l.size.x=0,l.size.y=0,m.debug(`abc95 updating size of ${e.id} children child:${l.id} maxWidth:${r} maxHeight:${s}`));for(const l of e.children)it(l,t,r,s);const $=e.columns??-1;let d=0;for(const l of e.children)d+=l.widthInColumns??1;let u=e.children.length;$>0&&$<d&&(u=$);const k=Math.ceil(d/u);let b=u*(r+B)+B,w=k*(s+B)+B;if(b<a){m.debug(`Detected to small sibling: abc95 ${e.id} siblingWidth ${a} siblingHeight ${n} width ${b}`),b=a,w=n;const l=(a-u*B-B)/u,L=(n-k*B-B)/k;m.debug("Size indata abc88",e.id,"childWidth",l,"maxWidth",r),m.debug("Size indata abc88",e.id,"childHeight",L,"maxHeight",s),m.debug("Size indata abc88 xSize",u,"padding",B);for(const g of e.children)g.size&&(g.size.width=l,g.size.height=L,g.size.x=0,g.size.y=0)}if(m.debug(`abc95 (finale calc) ${e.id} xSize ${u} ySize ${k} columns ${$}${e.children.length} width=${Math.max(b,((p=e.size)==null?void 0:p.width)||0)}`),b<(((y=e==null?void 0:e.size)==null?void 0:y.width)||0)){b=((x=e==null?void 0:e.size)==null?void 0:x.width)||0;const l=$>0?Math.min(e.children.length,$):e.children.length;if(l>0){const L=(b-l*B-B)/l;m.debug("abc95 (growing to fit) width",e.id,b,(f=e.size)==null?void 0:f.width,L);for(const g of e.children)g.size&&(g.size.width=L)}}e.size={width:b,height:w,x:0,y:0}}m.debug("setBlockSizes abc94 (done)",e.id,(_=e==null?void 0:e.size)==null?void 0:_.x,(S=e==null?void 0:e.size)==null?void 0:S.width,(E=e==null?void 0:e.size)==null?void 0:E.y,(v=e==null?void 0:e.size)==null?void 0:v.height)}function bt(e,t){var n,r,s,i,o,c,p,y,x,f,_,S,E,v,N,$,d;m.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${(n=e==null?void 0:e.size)==null?void 0:n.x} y: ${(r=e==null?void 0:e.size)==null?void 0:r.y} width: ${(s=e==null?void 0:e.size)==null?void 0:s.width}`);const a=e.columns??-1;if(m.debug("layoutBlocks columns abc95",e.id,"=>",a,e),e.children&&e.children.length>0){const u=((o=(i=e==null?void 0:e.children[0])==null?void 0:i.size)==null?void 0:o.width)??0,k=e.children.length*u+(e.children.length-1)*B;m.debug("widthOfChildren 88",k,"posX");let b=0;m.debug("abc91 block?.size?.x",e.id,(c=e==null?void 0:e.size)==null?void 0:c.x);let w=(p=e==null?void 0:e.size)!=null&&p.x?((y=e==null?void 0:e.size)==null?void 0:y.x)+(-((x=e==null?void 0:e.size)==null?void 0:x.width)/2||0):-B,l=0;for(const L of e.children){const g=e;if(!L.size)continue;const{width:D,height:H}=L.size,{px:U,py:T}=Ot(a,b);if(T!=l&&(l=T,w=(f=e==null?void 0:e.size)!=null&&f.x?((_=e==null?void 0:e.size)==null?void 0:_.x)+(-((S=e==null?void 0:e.size)==null?void 0:S.width)/2||0):-B,m.debug("New row in layout for block",e.id," and child ",L.id,l)),m.debug(`abc89 layout blocks (child) id: ${L.id} Pos: ${b} (px, py) ${U},${T} (${(E=g==null?void 0:g.size)==null?void 0:E.x},${(v=g==null?void 0:g.size)==null?void 0:v.y}) parent: ${g.id} width: ${D}${B}`),g.size){const M=D/2;L.size.x=w+B+M,m.debug(`abc91 layout blocks (calc) px, pyid:${L.id} startingPos=X${w} new startingPosX${L.size.x} ${M} padding=${B} width=${D} halfWidth=${M} => x:${L.size.x} y:${L.size.y} ${L.widthInColumns} (width * (child?.w || 1)) / 2 ${D*((L==null?void 0:L.widthInColumns)??1)/2}`),w=L.size.x+M,L.size.y=g.size.y-g.size.height/2+T*(H+B)+H/2+B,m.debug(`abc88 layout blocks (calc) px, pyid:${L.id}startingPosX${w}${B}${M}=>x:${L.size.x}y:${L.size.y}${L.widthInColumns}(width * (child?.w || 1)) / 2${D*((L==null?void 0:L.widthInColumns)??1)/2}`)}L.children&&bt(L),b+=(L==null?void 0:L.widthInColumns)??1,m.debug("abc88 columnsPos",L,b)}}m.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${(N=e==null?void 0:e.size)==null?void 0:N.x} y: ${($=e==null?void 0:e.size)==null?void 0:$.y} width: ${(d=e==null?void 0:e.size)==null?void 0:d.width}`)}function ft(e,{minX:t,minY:a,maxX:n,maxY:r}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&e.id!=="root"){const{x:s,y:i,width:o,height:c}=e.size;s-o/2<t&&(t=s-o/2),i-c/2<a&&(a=i-c/2),s+o/2>n&&(n=s+o/2),i+c/2>r&&(r=i+c/2)}if(e.children)for(const s of e.children)({minX:t,minY:a,maxX:n,maxY:r}=ft(s,{minX:t,minY:a,maxX:n,maxY:r}));return{minX:t,minY:a,maxX:n,maxY:r}}function At(e){const t=e.getBlock("root");if(!t)return;it(t,e,0,0),bt(t),m.debug("getBlocks",JSON.stringify(t,null,2));const{minX:a,minY:n,maxX:r,maxY:s}=ft(t);return{x:a,y:n,width:r-a,height:s-n}}function mt(e,t){t&&e.attr("style",t)}function Mt(e){const t=R(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),a=t.append("xhtml:div"),n=e.label,r=e.isNode?"nodeLabel":"edgeLabel",s=a.append("span");return s.html(n),mt(s,e.labelStyle),s.attr("class",r),mt(a,e.labelStyle),a.style("display","inline-block"),a.style("white-space","nowrap"),a.attr("xmlns","http://www.w3.org/1999/xhtml"),t.node()}h(it,"setBlockSizes"),h(bt,"layoutBlocks"),h(ft,"findBounds"),h(At,"layout"),h(mt,"applyStyle"),h(Mt,"addHtmlLabel");var F=h(async(e,t,a,n)=>{let r=e||"";if(typeof r=="object"&&(r=r[0]),q(z().flowchart.htmlLabels))return r=r.replace(/\\n|\n/g,"<br />"),m.debug("vertexText"+r),Mt({isNode:n,label:await pe(gt(r)),labelStyle:t.replace("fill:","color:")});{const s=document.createElementNS("http://www.w3.org/2000/svg","text");s.setAttribute("style",t.replace("color:","fill:"));let i=[];i=typeof r=="string"?r.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(r)?r:[];for(const o of i){const c=document.createElementNS("http://www.w3.org/2000/svg","tspan");c.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),c.setAttribute("dy","1em"),c.setAttribute("x","0"),a?c.setAttribute("class","title-row"):c.setAttribute("class","row"),c.textContent=o.trim(),s.appendChild(c)}return s}},"createLabel"),He=h((e,t,a,n,r)=>{t.arrowTypeStart&&Pt(e,"start",t.arrowTypeStart,a,n,r),t.arrowTypeEnd&&Pt(e,"end",t.arrowTypeEnd,a,n,r)},"addEdgeMarkers"),Ue={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},Pt=h((e,t,a,n,r,s)=>{const i=Ue[a];if(!i)return void m.warn(`Unknown arrow type: ${a}`);const o=t==="start"?"Start":"End";e.attr(`marker-${t}`,`url(${n}#${r}_${s}-${i}${o})`)},"addEdgeMarker"),wt={},A={},Ke=h(async(e,t)=>{const a=z(),n=q(a.flowchart.htmlLabels),r=t.labelType==="markdown"?$t(e,t.label,{style:t.labelStyle,useHtmlLabels:n,addSvgBackground:!0},a):await F(t.label,t.labelStyle),s=e.insert("g").attr("class","edgeLabel"),i=s.insert("g").attr("class","label");i.node().appendChild(r);let o,c=r.getBBox();if(n){const p=r.children[0],y=R(r);c=p.getBoundingClientRect(),y.attr("width",c.width),y.attr("height",c.height)}if(i.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),wt[t.id]=s,t.width=c.width,t.height=c.height,t.startLabelLeft){const p=await F(t.startLabelLeft,t.labelStyle),y=e.insert("g").attr("class","edgeTerminals"),x=y.insert("g").attr("class","inner");o=x.node().appendChild(p);const f=p.getBBox();x.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),A[t.id]||(A[t.id]={}),A[t.id].startLeft=y,et(o,t.startLabelLeft)}if(t.startLabelRight){const p=await F(t.startLabelRight,t.labelStyle),y=e.insert("g").attr("class","edgeTerminals"),x=y.insert("g").attr("class","inner");o=y.node().appendChild(p),x.node().appendChild(p);const f=p.getBBox();x.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),A[t.id]||(A[t.id]={}),A[t.id].startRight=y,et(o,t.startLabelRight)}if(t.endLabelLeft){const p=await F(t.endLabelLeft,t.labelStyle),y=e.insert("g").attr("class","edgeTerminals"),x=y.insert("g").attr("class","inner");o=x.node().appendChild(p);const f=p.getBBox();x.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),y.node().appendChild(p),A[t.id]||(A[t.id]={}),A[t.id].endLeft=y,et(o,t.endLabelLeft)}if(t.endLabelRight){const p=await F(t.endLabelRight,t.labelStyle),y=e.insert("g").attr("class","edgeTerminals"),x=y.insert("g").attr("class","inner");o=x.node().appendChild(p);const f=p.getBBox();x.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),y.node().appendChild(p),A[t.id]||(A[t.id]={}),A[t.id].endRight=y,et(o,t.endLabelRight)}return r},"insertEdgeLabel");function et(e,t){z().flowchart.htmlLabels&&e&&(e.style.width=9*t.length+"px",e.style.height="12px")}h(et,"setTerminalWidth");var je=h((e,t)=>{m.debug("Moving label abc88 ",e.id,e.label,wt[e.id],t);let a=t.updatedPath?t.updatedPath:t.originalPath;const n=z(),{subGraphTitleTotalMargin:r}=ge(n);if(e.label){const s=wt[e.id];let i=e.x,o=e.y;if(a){const c=Q.calcLabelPosition(a);m.debug("Moving label "+e.label+" from (",i,",",o,") to (",c.x,",",c.y,") abc88"),t.updatedPath&&(i=c.x,o=c.y)}s.attr("transform",`translate(${i}, ${o+r/2})`)}if(e.startLabelLeft){const s=A[e.id].startLeft;let i=e.x,o=e.y;if(a){const c=Q.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",a);i=c.x,o=c.y}s.attr("transform",`translate(${i}, ${o})`)}if(e.startLabelRight){const s=A[e.id].startRight;let i=e.x,o=e.y;if(a){const c=Q.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",a);i=c.x,o=c.y}s.attr("transform",`translate(${i}, ${o})`)}if(e.endLabelLeft){const s=A[e.id].endLeft;let i=e.x,o=e.y;if(a){const c=Q.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",a);i=c.x,o=c.y}s.attr("transform",`translate(${i}, ${o})`)}if(e.endLabelRight){const s=A[e.id].endRight;let i=e.x,o=e.y;if(a){const c=Q.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",a);i=c.x,o=c.y}s.attr("transform",`translate(${i}, ${o})`)}},"positionEdgeLabel"),qe=h((e,t)=>{const a=e.x,n=e.y,r=Math.abs(t.x-a),s=Math.abs(t.y-n),i=e.width/2,o=e.height/2;return r>=i||s>=o},"outsideNode"),Ze=h((e,t,a)=>{m.debug(`intersection calc abc89:
|
|
120
|
-
outsidePoint: ${JSON.stringify(t)}
|
|
121
|
-
insidePoint : ${JSON.stringify(a)}
|
|
122
|
-
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const n=e.x,r=e.y,s=Math.abs(n-a.x),i=e.width/2;let o=a.x<t.x?i-s:i+s;const c=e.height/2,p=Math.abs(t.y-a.y),y=Math.abs(t.x-a.x);if(Math.abs(r-t.y)*i>Math.abs(n-t.x)*c){let x=a.y<t.y?t.y-c-r:r-c-t.y;o=y*x/p;const f={x:a.x<t.x?a.x+o:a.x-y+o,y:a.y<t.y?a.y+p-x:a.y-p+x};return o===0&&(f.x=t.x,f.y=t.y),y===0&&(f.x=t.x),p===0&&(f.y=t.y),m.debug(`abc89 topp/bott calc, Q ${p}, q ${x}, R ${y}, r ${o}`,f),f}{o=a.x<t.x?t.x-i-n:n-i-t.x;let x=p*o/y,f=a.x<t.x?a.x+y-o:a.x-y+o,_=a.y<t.y?a.y+x:a.y-x;return m.debug(`sides calc abc89, Q ${p}, q ${x}, R ${y}, r ${o}`,{_x:f,_y:_}),o===0&&(f=t.x,_=t.y),y===0&&(f=t.x),p===0&&(_=t.y),{x:f,y:_}}},"intersection"),Yt=h((e,t)=>{m.debug("abc88 cutPathAtIntersect",e,t);let a=[],n=e[0],r=!1;return e.forEach(s=>{if(qe(t,s)||r)n=s,r||a.push(s);else{const i=Ze(t,n,s);let o=!1;a.forEach(c=>{o=o||c.x===i.x&&c.y===i.y}),a.some(c=>c.x===i.x&&c.y===i.y)||a.push(i),r=!0}}),a},"cutPathAtIntersect"),Ge=h(function(e,t,a,n,r,s,i){let o=a.points;m.debug("abc88 InsertEdge: edge=",a,"e=",t);let c=!1;const p=s.node(t.v);var y=s.node(t.w);y!=null&&y.intersect&&(p!=null&&p.intersect)&&(o=o.slice(1,a.points.length-1),o.unshift(p.intersect(o[0])),o.push(y.intersect(o[o.length-1]))),a.toCluster&&(m.debug("to cluster abc88",n[a.toCluster]),o=Yt(a.points,n[a.toCluster].node),c=!0),a.fromCluster&&(m.debug("from cluster abc88",n[a.fromCluster]),o=Yt(o.reverse(),n[a.fromCluster].node).reverse(),c=!0);const x=o.filter(u=>!Number.isNaN(u.y));let f=we;!a.curve||r!=="graph"&&r!=="flowchart"||(f=a.curve);const{x:_,y:S}=de(a),E=me().x(_).y(S).curve(f);let v;switch(a.thickness){case"normal":v="edge-thickness-normal";break;case"thick":case"invisible":v="edge-thickness-thick";break;default:v=""}switch(a.pattern){case"solid":v+=" edge-pattern-solid";break;case"dotted":v+=" edge-pattern-dotted";break;case"dashed":v+=" edge-pattern-dashed"}const N=e.append("path").attr("d",E(x)).attr("id",a.id).attr("class"," "+v+(a.classes?" "+a.classes:"")).attr("style",a.style);let $="";(z().flowchart.arrowMarkerAbsolute||z().state.arrowMarkerAbsolute)&&($=he(!0)),He(N,a,$,i,r);let d={};return c&&(d.updatedPath=o),d.originalPath=a.points,d},"insertEdge"),Je=h(e=>{const t=new Set;for(const a of e)switch(a){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(a)}return t},"expandAndDeduplicateDirections"),Ve=h((e,t,a)=>{const n=Je(e),r=t.height+2*a.padding,s=r/2,i=t.width+2*s+a.padding,o=a.padding/2;return n.has("right")&&n.has("left")&&n.has("up")&&n.has("down")?[{x:0,y:0},{x:s,y:0},{x:i/2,y:2*o},{x:i-s,y:0},{x:i,y:0},{x:i,y:-r/3},{x:i+2*o,y:-r/2},{x:i,y:-2*r/3},{x:i,y:-r},{x:i-s,y:-r},{x:i/2,y:-r-2*o},{x:s,y:-r},{x:0,y:-r},{x:0,y:-2*r/3},{x:-2*o,y:-r/2},{x:0,y:-r/3}]:n.has("right")&&n.has("left")&&n.has("up")?[{x:s,y:0},{x:i-s,y:0},{x:i,y:-r/2},{x:i-s,y:-r},{x:s,y:-r},{x:0,y:-r/2}]:n.has("right")&&n.has("left")&&n.has("down")?[{x:0,y:0},{x:s,y:-r},{x:i-s,y:-r},{x:i,y:0}]:n.has("right")&&n.has("up")&&n.has("down")?[{x:0,y:0},{x:i,y:-s},{x:i,y:-r+s},{x:0,y:-r}]:n.has("left")&&n.has("up")&&n.has("down")?[{x:i,y:0},{x:0,y:-s},{x:0,y:-r+s},{x:i,y:-r}]:n.has("right")&&n.has("left")?[{x:s,y:0},{x:s,y:-o},{x:i-s,y:-o},{x:i-s,y:0},{x:i,y:-r/2},{x:i-s,y:-r},{x:i-s,y:-r+o},{x:s,y:-r+o},{x:s,y:-r},{x:0,y:-r/2}]:n.has("up")&&n.has("down")?[{x:i/2,y:0},{x:0,y:-o},{x:s,y:-o},{x:s,y:-r+o},{x:0,y:-r+o},{x:i/2,y:-r},{x:i,y:-r+o},{x:i-s,y:-r+o},{x:i-s,y:-o},{x:i,y:-o}]:n.has("right")&&n.has("up")?[{x:0,y:0},{x:i,y:-s},{x:0,y:-r}]:n.has("right")&&n.has("down")?[{x:0,y:0},{x:i,y:0},{x:0,y:-r}]:n.has("left")&&n.has("up")?[{x:i,y:0},{x:0,y:-s},{x:i,y:-r}]:n.has("left")&&n.has("down")?[{x:i,y:0},{x:0,y:0},{x:i,y:-r}]:n.has("right")?[{x:s,y:-o},{x:s,y:-o},{x:i-s,y:-o},{x:i-s,y:0},{x:i,y:-r/2},{x:i-s,y:-r},{x:i-s,y:-r+o},{x:s,y:-r+o},{x:s,y:-r+o}]:n.has("left")?[{x:s,y:0},{x:s,y:-o},{x:i-s,y:-o},{x:i-s,y:-r+o},{x:s,y:-r+o},{x:s,y:-r},{x:0,y:-r/2}]:n.has("up")?[{x:s,y:-o},{x:s,y:-r+o},{x:0,y:-r+o},{x:i/2,y:-r},{x:i,y:-r+o},{x:i-s,y:-r+o},{x:i-s,y:-o}]:n.has("down")?[{x:i/2,y:0},{x:0,y:-o},{x:s,y:-o},{x:s,y:-r+o},{x:i-s,y:-r+o},{x:i-s,y:-o},{x:i,y:-o}]:[{x:0,y:0}]},"getArrowPoints");function Wt(e,t){return e.intersect(t)}h(Wt,"intersectNode");var Qe=Wt;function Xt(e,t,a,n){var r=e.x,s=e.y,i=r-n.x,o=s-n.y,c=Math.sqrt(t*t*o*o+a*a*i*i),p=Math.abs(t*a*i/c);n.x<r&&(p=-p);var y=Math.abs(t*a*o/c);return n.y<s&&(y=-y),{x:r+p,y:s+y}}h(Xt,"intersectEllipse");var Ft=Xt;function Ht(e,t,a){return Ft(e,t,t,a)}h(Ht,"intersectCircle");var tr=Ht;function Ut(e,t,a,n){var r,s,i,o,c,p,y,x,f,_,S,E,v;if(r=t.y-e.y,i=e.x-t.x,c=t.x*e.y-e.x*t.y,f=r*a.x+i*a.y+c,_=r*n.x+i*n.y+c,!(f!==0&&_!==0&&kt(f,_)||(s=n.y-a.y,o=a.x-n.x,p=n.x*a.y-a.x*n.y,y=s*e.x+o*e.y+p,x=s*t.x+o*t.y+p,y!==0&&x!==0&&kt(y,x)||(S=r*o-s*i)===0)))return E=Math.abs(S/2),{x:(v=i*p-o*c)<0?(v-E)/S:(v+E)/S,y:(v=s*c-r*p)<0?(v-E)/S:(v+E)/S}}function kt(e,t){return e*t>0}h(Ut,"intersectLine"),h(kt,"sameSign");var er=Ut,rr=Kt;function Kt(e,t,a){var n=e.x,r=e.y,s=[],i=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(S){i=Math.min(i,S.x),o=Math.min(o,S.y)}):(i=Math.min(i,t.x),o=Math.min(o,t.y));for(var c=n-e.width/2-i,p=r-e.height/2-o,y=0;y<t.length;y++){var x=t[y],f=t[y<t.length-1?y+1:0],_=er(e,a,{x:c+x.x,y:p+x.y},{x:c+f.x,y:p+f.y});_&&s.push(_)}return s.length?(s.length>1&&s.sort(function(S,E){var v=S.x-a.x,N=S.y-a.y,$=Math.sqrt(v*v+N*N),d=E.x-a.x,u=E.y-a.y,k=Math.sqrt(d*d+u*u);return $<k?-1:$===k?0:1}),s[0]):e}h(Kt,"intersectPolygon");var C={node:Qe,circle:tr,ellipse:Ft,polygon:rr,rect:h((e,t)=>{var a,n,r=e.x,s=e.y,i=t.x-r,o=t.y-s,c=e.width/2,p=e.height/2;return Math.abs(o)*c>Math.abs(i)*p?(o<0&&(p=-p),a=o===0?0:p*i/o,n=p):(i<0&&(c=-c),a=c,n=i===0?0:c*o/i),{x:r+a,y:s+n}},"intersectRect")},O=h(async(e,t,a,n)=>{const r=z();let s;const i=t.useHtmlLabels||q(r.flowchart.htmlLabels);s=a||"node default";const o=e.insert("g").attr("class",s).attr("id",t.domId||t.id),c=o.insert("g").attr("class","label").attr("style",t.labelStyle);let p;p=t.labelText===void 0?"":typeof t.labelText=="string"?t.labelText:t.labelText[0];const y=c.node();let x;x=t.labelType==="markdown"?$t(c,Dt(gt(p),r),{useHtmlLabels:i,width:t.width||r.flowchart.wrappingWidth,classes:"markdown-node-label"},r):y.appendChild(await F(Dt(gt(p),r),t.labelStyle,!1,n));let f=x.getBBox();const _=t.padding/2;if(q(r.flowchart.htmlLabels)){const S=x.children[0],E=R(x),v=S.getElementsByTagName("img");if(v){const N=p.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...v].map($=>new Promise(d=>{function u(){if($.style.display="flex",$.style.flexDirection="column",N){const k=r.fontSize?r.fontSize:window.getComputedStyle(document.body).fontSize,b=5,w=parseInt(k,10)*b+"px";$.style.minWidth=w,$.style.maxWidth=w}else $.style.width="100%";d($)}h(u,"setupImage"),setTimeout(()=>{$.complete&&u()}),$.addEventListener("error",u),$.addEventListener("load",u)})))}f=S.getBoundingClientRect(),E.attr("width",f.width),E.attr("height",f.height)}return i?c.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"):c.attr("transform","translate(0, "+-f.height/2+")"),t.centerLabel&&c.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),c.insert("rect",":first-child"),{shapeSvg:o,bbox:f,halfPadding:_,label:c}},"labelHelper"),I=h((e,t)=>{const a=t.node().getBBox();e.width=a.width,e.height=a.height},"updateNodeBounds");function j(e,t,a,n){return e.insert("polygon",":first-child").attr("points",n.map(function(r){return r.x+","+r.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+a/2+")")}h(j,"insertPolygonShape");var ar=h(async(e,t)=>{t.useHtmlLabels||z().flowchart.htmlLabels||(t.centerLabel=!0);const{shapeSvg:a,bbox:n,halfPadding:r}=await O(e,t,"node "+t.classes,!0);m.info("Classes = ",t.classes);const s=a.insert("rect",":first-child");return s.attr("rx",t.rx).attr("ry",t.ry).attr("x",-n.width/2-r).attr("y",-n.height/2-r).attr("width",n.width+t.padding).attr("height",n.height+t.padding),I(t,s),t.intersect=function(i){return C.rect(t,i)},a},"note"),jt=h(e=>e?" "+e:"","formatClass"),Y=h((e,t)=>`${t||"node default"}${jt(e.classes)} ${jt(e.class)}`,"getClassesFromNode"),qt=h(async(e,t)=>{const{shapeSvg:a,bbox:n}=await O(e,t,Y(t,void 0),!0),r=n.width+t.padding+(n.height+t.padding),s=[{x:r/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}];m.info("Question main (Circle)");const i=j(a,r,r,s);return i.attr("style",t.style),I(t,i),t.intersect=function(o){return m.warn("Intersect called"),C.polygon(t,s,o)},a},"question"),sr=h((e,t)=>{const a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}];return a.insert("polygon",":first-child").attr("points",n.map(function(r){return r.x+","+r.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),t.width=28,t.height=28,t.intersect=function(r){return C.circle(t,14,r)},a},"choice"),nr=h(async(e,t)=>{const{shapeSvg:a,bbox:n}=await O(e,t,Y(t,void 0),!0),r=n.height+t.padding,s=r/4,i=n.width+2*s+t.padding,o=[{x:s,y:0},{x:i-s,y:0},{x:i,y:-r/2},{x:i-s,y:-r},{x:s,y:-r},{x:0,y:-r/2}],c=j(a,i,r,o);return c.attr("style",t.style),I(t,c),t.intersect=function(p){return C.polygon(t,o,p)},a},"hexagon"),ir=h(async(e,t)=>{const{shapeSvg:a,bbox:n}=await O(e,t,void 0,!0),r=n.height+2*t.padding,s=r/2,i=n.width+2*s+t.padding,o=Ve(t.directions,n,t),c=j(a,i,r,o);return c.attr("style",t.style),I(t,c),t.intersect=function(p){return C.polygon(t,o,p)},a},"block_arrow"),or=h(async(e,t)=>{const{shapeSvg:a,bbox:n}=await O(e,t,Y(t,void 0),!0),r=n.width+t.padding,s=n.height+t.padding,i=[{x:-s/2,y:0},{x:r,y:0},{x:r,y:-s},{x:-s/2,y:-s},{x:0,y:-s/2}];return j(a,r,s,i).attr("style",t.style),t.width=r+s,t.height=s,t.intersect=function(o){return C.polygon(t,i,o)},a},"rect_left_inv_arrow"),lr=h(async(e,t)=>{const{shapeSvg:a,bbox:n}=await O(e,t,Y(t),!0),r=n.width+t.padding,s=n.height+t.padding,i=[{x:-2*s/6,y:0},{x:r-s/6,y:0},{x:r+2*s/6,y:-s},{x:s/6,y:-s}],o=j(a,r,s,i);return o.attr("style",t.style),I(t,o),t.intersect=function(c){return C.polygon(t,i,c)},a},"lean_right"),cr=h(async(e,t)=>{const{shapeSvg:a,bbox:n}=await O(e,t,Y(t,void 0),!0),r=n.width+t.padding,s=n.height+t.padding,i=[{x:2*s/6,y:0},{x:r+s/6,y:0},{x:r-2*s/6,y:-s},{x:-s/6,y:-s}],o=j(a,r,s,i);return o.attr("style",t.style),I(t,o),t.intersect=function(c){return C.polygon(t,i,c)},a},"lean_left"),dr=h(async(e,t)=>{const{shapeSvg:a,bbox:n}=await O(e,t,Y(t,void 0),!0),r=n.width+t.padding,s=n.height+t.padding,i=[{x:-2*s/6,y:0},{x:r+2*s/6,y:0},{x:r-s/6,y:-s},{x:s/6,y:-s}],o=j(a,r,s,i);return o.attr("style",t.style),I(t,o),t.intersect=function(c){return C.polygon(t,i,c)},a},"trapezoid"),hr=h(async(e,t)=>{const{shapeSvg:a,bbox:n}=await O(e,t,Y(t,void 0),!0),r=n.width+t.padding,s=n.height+t.padding,i=[{x:s/6,y:0},{x:r-s/6,y:0},{x:r+2*s/6,y:-s},{x:-2*s/6,y:-s}],o=j(a,r,s,i);return o.attr("style",t.style),I(t,o),t.intersect=function(c){return C.polygon(t,i,c)},a},"inv_trapezoid"),gr=h(async(e,t)=>{const{shapeSvg:a,bbox:n}=await O(e,t,Y(t,void 0),!0),r=n.width+t.padding,s=n.height+t.padding,i=[{x:0,y:0},{x:r+s/2,y:0},{x:r,y:-s/2},{x:r+s/2,y:-s},{x:0,y:-s}],o=j(a,r,s,i);return o.attr("style",t.style),I(t,o),t.intersect=function(c){return C.polygon(t,i,c)},a},"rect_right_inv_arrow"),yr=h(async(e,t)=>{const{shapeSvg:a,bbox:n}=await O(e,t,Y(t,void 0),!0),r=n.width+t.padding,s=r/2,i=s/(2.5+r/50),o=n.height+i+t.padding,c="M 0,"+i+" a "+s+","+i+" 0,0,0 "+r+" 0 a "+s+","+i+" 0,0,0 "+-r+" 0 l 0,"+o+" a "+s+","+i+" 0,0,0 "+r+" 0 l 0,"+-o,p=a.attr("label-offset-y",i).insert("path",":first-child").attr("style",t.style).attr("d",c).attr("transform","translate("+-r/2+","+-(o/2+i)+")");return I(t,p),t.intersect=function(y){const x=C.rect(t,y),f=x.x-t.x;if(s!=0&&(Math.abs(f)<t.width/2||Math.abs(f)==t.width/2&&Math.abs(x.y-t.y)>t.height/2-i)){let _=i*i*(1-f*f/(s*s));_!=0&&(_=Math.sqrt(_)),_=i-_,y.y-t.y>0&&(_=-_),x.y+=_}return x},a},"cylinder"),pr=h(async(e,t)=>{const{shapeSvg:a,bbox:n,halfPadding:r}=await O(e,t,"node "+t.classes+" "+t.class,!0),s=a.insert("rect",":first-child"),i=t.positioned?t.width:n.width+t.padding,o=t.positioned?t.height:n.height+t.padding,c=t.positioned?-i/2:-n.width/2-r,p=t.positioned?-o/2:-n.height/2-r;if(s.attr("class","basic label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",c).attr("y",p).attr("width",i).attr("height",o),t.props){const y=new Set(Object.keys(t.props));t.props.borders&&(ot(s,t.props.borders,i,o),y.delete("borders")),y.forEach(x=>{m.warn(`Unknown node property ${x}`)})}return I(t,s),t.intersect=function(y){return C.rect(t,y)},a},"rect"),ur=h(async(e,t)=>{const{shapeSvg:a,bbox:n,halfPadding:r}=await O(e,t,"node "+t.classes,!0),s=a.insert("rect",":first-child"),i=t.positioned?t.width:n.width+t.padding,o=t.positioned?t.height:n.height+t.padding,c=t.positioned?-i/2:-n.width/2-r,p=t.positioned?-o/2:-n.height/2-r;if(s.attr("class","basic cluster composite label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",c).attr("y",p).attr("width",i).attr("height",o),t.props){const y=new Set(Object.keys(t.props));t.props.borders&&(ot(s,t.props.borders,i,o),y.delete("borders")),y.forEach(x=>{m.warn(`Unknown node property ${x}`)})}return I(t,s),t.intersect=function(y){return C.rect(t,y)},a},"composite"),xr=h(async(e,t)=>{const{shapeSvg:a}=await O(e,t,"label",!0);m.trace("Classes = ",t.class);const n=a.insert("rect",":first-child");if(n.attr("width",0).attr("height",0),a.attr("class","label edgeLabel"),t.props){const r=new Set(Object.keys(t.props));t.props.borders&&(ot(n,t.props.borders,0,0),r.delete("borders")),r.forEach(s=>{m.warn(`Unknown node property ${s}`)})}return I(t,n),t.intersect=function(r){return C.rect(t,r)},a},"labelRect");function ot(e,t,a,n){const r=[],s=h(o=>{r.push(o,0)},"addBorder"),i=h(o=>{r.push(0,o)},"skipBorder");t.includes("t")?(m.debug("add top border"),s(a)):i(a),t.includes("r")?(m.debug("add right border"),s(n)):i(n),t.includes("b")?(m.debug("add bottom border"),s(a)):i(a),t.includes("l")?(m.debug("add left border"),s(n)):i(n),e.attr("stroke-dasharray",r.join(" "))}h(ot,"applyNodePropertyBorders");var br=h(async(e,t)=>{let a;a=t.classes?"node "+t.classes:"node default";const n=e.insert("g").attr("class",a).attr("id",t.domId||t.id),r=n.insert("rect",":first-child"),s=n.insert("line"),i=n.insert("g").attr("class","label"),o=t.labelText.flat?t.labelText.flat():t.labelText;let c="";c=typeof o=="object"?o[0]:o,m.info("Label text abc79",c,o,typeof o=="object");const p=i.node().appendChild(await F(c,t.labelStyle,!0,!0));let y={width:0,height:0};if(q(z().flowchart.htmlLabels)){const E=p.children[0],v=R(p);y=E.getBoundingClientRect(),v.attr("width",y.width),v.attr("height",y.height)}m.info("Text 2",o);const x=o.slice(1,o.length);let f=p.getBBox();const _=i.node().appendChild(await F(x.join?x.join("<br/>"):x,t.labelStyle,!0,!0));if(q(z().flowchart.htmlLabels)){const E=_.children[0],v=R(_);y=E.getBoundingClientRect(),v.attr("width",y.width),v.attr("height",y.height)}const S=t.padding/2;return R(_).attr("transform","translate( "+(y.width>f.width?0:(f.width-y.width)/2)+", "+(f.height+S+5)+")"),R(p).attr("transform","translate( "+(y.width<f.width?0:-(f.width-y.width)/2)+", 0)"),y=i.node().getBBox(),i.attr("transform","translate("+-y.width/2+", "+(-y.height/2-S+3)+")"),r.attr("class","outer title-state").attr("x",-y.width/2-S).attr("y",-y.height/2-S).attr("width",y.width+t.padding).attr("height",y.height+t.padding),s.attr("class","divider").attr("x1",-y.width/2-S).attr("x2",y.width/2+S).attr("y1",-y.height/2-S+f.height+S).attr("y2",-y.height/2-S+f.height+S),I(t,r),t.intersect=function(E){return C.rect(t,E)},n},"rectWithTitle"),fr=h(async(e,t)=>{const{shapeSvg:a,bbox:n}=await O(e,t,Y(t,void 0),!0),r=n.height+t.padding,s=n.width+r/4+t.padding,i=a.insert("rect",":first-child").attr("style",t.style).attr("rx",r/2).attr("ry",r/2).attr("x",-s/2).attr("y",-r/2).attr("width",s).attr("height",r);return I(t,i),t.intersect=function(o){return C.rect(t,o)},a},"stadium"),mr=h(async(e,t)=>{const{shapeSvg:a,bbox:n,halfPadding:r}=await O(e,t,Y(t,void 0),!0),s=a.insert("circle",":first-child");return s.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+r).attr("width",n.width+t.padding).attr("height",n.height+t.padding),m.info("Circle main"),I(t,s),t.intersect=function(i){return m.info("Circle intersect",t,n.width/2+r,i),C.circle(t,n.width/2+r,i)},a},"circle"),wr=h(async(e,t)=>{const{shapeSvg:a,bbox:n,halfPadding:r}=await O(e,t,Y(t,void 0),!0),s=a.insert("g",":first-child"),i=s.insert("circle"),o=s.insert("circle");return s.attr("class",t.class),i.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+r+5).attr("width",n.width+t.padding+10).attr("height",n.height+t.padding+10),o.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+r).attr("width",n.width+t.padding).attr("height",n.height+t.padding),m.info("DoubleCircle main"),I(t,i),t.intersect=function(c){return m.info("DoubleCircle intersect",t,n.width/2+r+5,c),C.circle(t,n.width/2+r+5,c)},a},"doublecircle"),kr=h(async(e,t)=>{const{shapeSvg:a,bbox:n}=await O(e,t,Y(t,void 0),!0),r=n.width+t.padding,s=n.height+t.padding,i=[{x:0,y:0},{x:r,y:0},{x:r,y:-s},{x:0,y:-s},{x:0,y:0},{x:-8,y:0},{x:r+8,y:0},{x:r+8,y:-s},{x:-8,y:-s},{x:-8,y:0}],o=j(a,r,s,i);return o.attr("style",t.style),I(t,o),t.intersect=function(c){return C.polygon(t,i,c)},a},"subroutine"),Sr=h((e,t)=>{const a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=a.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),I(t,n),t.intersect=function(r){return C.circle(t,7,r)},a},"start"),Zt=h((e,t,a)=>{const n=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let r=70,s=10;a==="LR"&&(r=10,s=70);const i=n.append("rect").attr("x",-1*r/2).attr("y",-1*s/2).attr("width",r).attr("height",s).attr("class","fork-join");return I(t,i),t.height=t.height+t.padding/2,t.width=t.width+t.padding/2,t.intersect=function(o){return C.rect(t,o)},n},"forkJoin"),Gt={rhombus:qt,composite:ur,question:qt,rect:pr,labelRect:xr,rectWithTitle:br,choice:sr,circle:mr,doublecircle:wr,stadium:fr,hexagon:nr,block_arrow:ir,rect_left_inv_arrow:or,lean_right:lr,lean_left:cr,trapezoid:dr,inv_trapezoid:hr,rect_right_inv_arrow:gr,cylinder:yr,start:Sr,end:h((e,t)=>{const a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=a.insert("circle",":first-child"),r=a.insert("circle",":first-child");return r.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),n.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),I(t,r),t.intersect=function(s){return C.circle(t,7,s)},a},"end"),note:ar,subroutine:kr,fork:Zt,join:Zt,class_box:h(async(e,t)=>{var b;const a=t.padding/2;let n;n=t.classes?"node "+t.classes:"node default";const r=e.insert("g").attr("class",n).attr("id",t.domId||t.id),s=r.insert("rect",":first-child"),i=r.insert("line"),o=r.insert("line");let c=0,p=4;const y=r.insert("g").attr("class","label");let x=0;const f=(b=t.classData.annotations)==null?void 0:b[0],_=t.classData.annotations[0]?"\xAB"+t.classData.annotations[0]+"\xBB":"",S=y.node().appendChild(await F(_,t.labelStyle,!0,!0));let E=S.getBBox();if(q(z().flowchart.htmlLabels)){const w=S.children[0],l=R(S);E=w.getBoundingClientRect(),l.attr("width",E.width),l.attr("height",E.height)}t.classData.annotations[0]&&(p+=E.height+4,c+=E.width);let v=t.classData.label;t.classData.type!==void 0&&t.classData.type!==""&&(z().flowchart.htmlLabels?v+="<"+t.classData.type+">":v+="<"+t.classData.type+">");const N=y.node().appendChild(await F(v,t.labelStyle,!0,!0));R(N).attr("class","classTitle");let $=N.getBBox();if(q(z().flowchart.htmlLabels)){const w=N.children[0],l=R(N);$=w.getBoundingClientRect(),l.attr("width",$.width),l.attr("height",$.height)}p+=$.height+4,$.width>c&&(c=$.width);const d=[];t.classData.members.forEach(async w=>{const l=w.getDisplayDetails();let L=l.displayText;z().flowchart.htmlLabels&&(L=L.replace(/</g,"<").replace(/>/g,">"));const g=y.node().appendChild(await F(L,l.cssStyle?l.cssStyle:t.labelStyle,!0,!0));let D=g.getBBox();if(q(z().flowchart.htmlLabels)){const H=g.children[0],U=R(g);D=H.getBoundingClientRect(),U.attr("width",D.width),U.attr("height",D.height)}D.width>c&&(c=D.width),p+=D.height+4,d.push(g)}),p+=8;const u=[];if(t.classData.methods.forEach(async w=>{const l=w.getDisplayDetails();let L=l.displayText;z().flowchart.htmlLabels&&(L=L.replace(/</g,"<").replace(/>/g,">"));const g=y.node().appendChild(await F(L,l.cssStyle?l.cssStyle:t.labelStyle,!0,!0));let D=g.getBBox();if(q(z().flowchart.htmlLabels)){const H=g.children[0],U=R(g);D=H.getBoundingClientRect(),U.attr("width",D.width),U.attr("height",D.height)}D.width>c&&(c=D.width),p+=D.height+4,u.push(g)}),p+=8,f){let w=(c-E.width)/2;R(S).attr("transform","translate( "+(-1*c/2+w)+", "+-1*p/2+")"),x=E.height+4}let k=(c-$.width)/2;return R(N).attr("transform","translate( "+(-1*c/2+k)+", "+(-1*p/2+x)+")"),x+=$.height+4,i.attr("class","divider").attr("x1",-c/2-a).attr("x2",c/2+a).attr("y1",-p/2-a+8+x).attr("y2",-p/2-a+8+x),x+=8,d.forEach(w=>{R(w).attr("transform","translate( "+-c/2+", "+(-1*p/2+x+4)+")");const l=w==null?void 0:w.getBBox();x+=((l==null?void 0:l.height)??0)+4}),x+=8,o.attr("class","divider").attr("x1",-c/2-a).attr("x2",c/2+a).attr("y1",-p/2-a+8+x).attr("y2",-p/2-a+8+x),x+=8,u.forEach(w=>{R(w).attr("transform","translate( "+-c/2+", "+(-1*p/2+x)+")");const l=w==null?void 0:w.getBBox();x+=((l==null?void 0:l.height)??0)+4}),s.attr("style",t.style).attr("class","outer title-state").attr("x",-c/2-a).attr("y",-p/2-a).attr("width",c+t.padding).attr("height",p+t.padding),I(t,s),t.intersect=function(w){return C.rect(t,w)},r},"class_box")},lt={},Jt=h(async(e,t,a)=>{let n,r;if(t.link){let s;z().securityLevel==="sandbox"?s="_top":t.linkTarget&&(s=t.linkTarget||"_blank"),n=e.insert("svg:a").attr("xlink:href",t.link).attr("target",s),r=await Gt[t.shape](n,t,a)}else r=await Gt[t.shape](e,t,a),n=r;return t.tooltip&&r.attr("title",t.tooltip),t.class&&r.attr("class","node default "+t.class),lt[t.id]=n,t.haveCallback&<[t.id].attr("class",lt[t.id].attr("class")+" clickable"),n},"insertNode"),Lr=h(e=>{const t=lt[e.id];m.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const a=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+a-e.width/2)+", "+(e.y-e.height/2-8)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),a},"positionNode");function St(e,t,a=!1){var x,f,_;const n=e;let r="default";(((x=n==null?void 0:n.classes)==null?void 0:x.length)||0)>0&&(r=((n==null?void 0:n.classes)??[]).join(" ")),r+=" flowchart-label";let s,i=0,o="";switch(n.type){case"round":i=5,o="rect";break;case"composite":i=0,o="composite",s=0;break;case"square":case"group":default:o="rect";break;case"diamond":o="question";break;case"hexagon":o="hexagon";break;case"block_arrow":o="block_arrow";break;case"odd":case"rect_left_inv_arrow":o="rect_left_inv_arrow";break;case"lean_right":o="lean_right";break;case"lean_left":o="lean_left";break;case"trapezoid":o="trapezoid";break;case"inv_trapezoid":o="inv_trapezoid";break;case"circle":o="circle";break;case"ellipse":o="ellipse";break;case"stadium":o="stadium";break;case"subroutine":o="subroutine";break;case"cylinder":o="cylinder";break;case"doublecircle":o="doublecircle"}const c=ue((n==null?void 0:n.styles)??[]),p=n.label,y=n.size??{width:0,height:0,x:0,y:0};return{labelStyle:c.labelStyle,shape:o,labelText:p,rx:i,ry:i,class:r,style:c.style,id:n.id,directions:n.directions,width:y.width,height:y.height,x:y.x,y:y.y,positioned:a,intersect:void 0,type:n.type,padding:s??((_=(f=V())==null?void 0:f.block)==null?void 0:_.padding)??0}}async function Vt(e,t,a){const n=St(t,0,!1);if(n.type==="group")return;const r=V(),s=await Jt(e,n,{config:r}),i=s.node().getBBox(),o=a.getBlock(n.id);o.size={width:i.width,height:i.height,x:0,y:0,node:s},a.setBlock(o),s.remove()}async function Qt(e,t,a){const n=St(t,0,!0);if(a.getBlock(n.id).type!=="space"){const r=V();await Jt(e,n,{config:r}),t.intersect=n==null?void 0:n.intersect,Lr(n)}}async function ct(e,t,a,n){for(const r of t)await n(e,r,a),r.children&&await ct(e,r.children,a,n)}async function te(e,t,a){await ct(e,t,a,Vt)}async function ee(e,t,a){await ct(e,t,a,Qt)}async function re(e,t,a,n,r){const s=new be({multigraph:!0,compound:!0});s.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const i of a)i.size&&s.setNode(i.id,{width:i.size.width,height:i.size.height,intersect:i.intersect});for(const i of t)if(i.start&&i.end){const o=n.getBlock(i.start),c=n.getBlock(i.end);if(o!=null&&o.size&&(c!=null&&c.size)){const p=o.size,y=c.size,x=[{x:p.x,y:p.y},{x:p.x+(y.x-p.x)/2,y:p.y+(y.y-p.y)/2},{x:y.x,y:y.y}];Ge(e,{v:i.start,w:i.end,name:i.id},{...i,arrowTypeEnd:i.arrowTypeEnd,arrowTypeStart:i.arrowTypeStart,points:x,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",s,r),i.label&&(await Ke(e,{...i,label:i.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:i.arrowTypeEnd,arrowTypeStart:i.arrowTypeStart,points:x,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),je({...i,x:x[1].x,y:x[1].y},{originalPath:x}))}}}h(St,"getNodeFromBlock"),h(Vt,"calculateBlockSize"),h(Qt,"insertBlockPositioned"),h(ct,"performOperations"),h(te,"calculateBlockSizes"),h(ee,"insertBlocks"),h(re,"insertEdges");var _r=h(function(e,t){return t.db.getClasses()},"getClasses"),Er={parser:ke,db:Me,renderer:{draw:h(async function(e,t,a,n){const{securityLevel:r,block:s}=V(),i=n.db;let o;r==="sandbox"&&(o=R("#i"+t));const c=R(r==="sandbox"?o.nodes()[0].contentDocument.body:"body"),p=r==="sandbox"?c.select(`[id="${t}"]`):R(`[id="${t}"]`);Xe(p,["point","circle","cross"],n.type,t);const y=i.getBlocks(),x=i.getBlocksFlat(),f=i.getEdges(),_=p.insert("g").attr("class","block");await te(_,y,i);const S=At(i);if(await ee(_,y,i),await re(_,f,x,i,t),S){const E=S,v=Math.max(1,Math.round(E.width/E.height*.125)),N=E.height+v+10,$=E.width+10,{useMaxWidth:d}=s;oe(p,N,$,!!d),m.debug("Here Bounds",S,E),p.attr("viewBox",`${E.x-5} ${E.y-5} ${E.width+10} ${E.height+10}`)}},"draw"),getClasses:_r},styles:Pe};export{Er as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{U as s,C as o}from"./mermaid-sbM5kvPX.js";const n=(a,r)=>s.lang.round(o.parse(a)[r]);export{n as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as a,c as s,a as t,C as o}from"./chunk-SZ463SBG-DHkdo7UI.js";import{_ as e}from"./mermaid-sbM5kvPX.js";import"./transform-B8bpuzxV.js";import"./chunk-E2GYISFI-uWIZ1Jhx.js";import"./chunk-BFAMUDN2-CY30V5X_.js";import"./chunk-SKB7J2MH-DPsXY34k.js";import"./index-DPzEQsyf.js";import"./step-BwsUM5iJ.js";import"./timer-BwIYMJWC.js";var i={parser:t,get db(){return new o},renderer:s,styles:a,init:e(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{i as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as a,c as s,a as t,C as o}from"./chunk-SZ463SBG-DHkdo7UI.js";import{_ as e}from"./mermaid-sbM5kvPX.js";import"./transform-B8bpuzxV.js";import"./chunk-E2GYISFI-uWIZ1Jhx.js";import"./chunk-BFAMUDN2-CY30V5X_.js";import"./chunk-SKB7J2MH-DPsXY34k.js";import"./index-DPzEQsyf.js";import"./step-BwsUM5iJ.js";import"./timer-BwIYMJWC.js";var i={parser:t,get db(){return new o},renderer:s,styles:a,init:e(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{i as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as n}from"./_baseUniq-Ds9S94xv.js";function o(r){return n(r,4)}export{o as c};
|