@marimo-team/islands 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.
Files changed (1233) hide show
  1. package/dist/{ConnectedDataExplorerComponent-sKkoI7J_.js → ConnectedDataExplorerComponent-BIDHfFwH.js} +2 -2
  2. package/dist/{ImageComparisonComponent-TPiJpnLF.js → ImageComparisonComponent-DNmskQsB.js} +1 -1
  3. package/dist/{_baseUniq-CNdqwfN5.js → _baseUniq-BerGWgvp.js} +54 -54
  4. package/dist/{any-language-editor-DYK8XIV9.js → any-language-editor-Doic3dKC.js} +1 -1
  5. package/dist/{architectureDiagram-SUXI7LT5-BiIH4UYX.js → architectureDiagram-KFL7JDKH-DX7Dfxnr.js} +2056 -2033
  6. package/dist/assets/{worker-CvLTHCt4.js → worker-COGufAQn.js} +701 -694
  7. package/dist/{blockDiagram-6J76NXCF-BpnWfh2V.js → blockDiagram-ZYB65J3Q-BJOFl2aM.js} +874 -867
  8. package/dist/{c4Diagram-6F6E4RAY-D29QE7hB.js → c4Diagram-AAMF2YG6-x0qS411O.js} +2 -2
  9. package/dist/{channel-Bcgertj0.js → channel-C6r9bPk3.js} +1 -1
  10. package/dist/{chunk-353BL4L5--CiHV6cN.js → chunk-ANTBXLJU-CvP1oYb6.js} +1 -1
  11. package/dist/{chunk-AACKK3MU-CBPZxRq5.js → chunk-FHKO5MBM-C8Qc-5zQ.js} +1 -1
  12. package/dist/{chunk-E2GYISFI-m0FySePo.js → chunk-GLLZNHP4-BQrm-sfi.js} +1 -1
  13. package/dist/{chunk-SZ463SBG-DKPaz0ti.js → chunk-JBRWN2VN-BaXj52HO.js} +101 -100
  14. package/dist/{chunk-OW32GOEJ-DWr9cx7S.js → chunk-LXBSTHXV-gjraHKLG.js} +3 -3
  15. package/dist/{chunk-SKB7J2MH-Dmp2cNaO.js → chunk-NRVI72HA-DMBGbqKL.js} +1 -1
  16. package/dist/{chunk-67H74DCK-BQWB3que.js → chunk-OMD6QJNC-BYhvZR0Q.js} +1 -1
  17. package/dist/{chunk-BFAMUDN2-Bc32Nopu.js → chunk-WVR4S24B-ZjtqNnTl.js} +1 -1
  18. package/dist/{classDiagram-v2-YAWTLIQI-GHh_bW8b.js → classDiagram-3BZAVTQC-DWYE4NoQ.js} +2 -2
  19. package/dist/{classDiagram-M3E45YP4-GHh_bW8b.js → classDiagram-v2-QTMF73CY-DWYE4NoQ.js} +2 -2
  20. package/dist/{clone-_N6EM6Op.js → clone-dxPIOZ-r.js} +1 -1
  21. package/dist/common-keywords-BefPf8TA.js +7 -0
  22. package/dist/{cytoscape.esm-DHKdpbSh.js → cytoscape.esm-BYnVVhJX.js} +4462 -4345
  23. package/dist/{dagre-JOIXM2OF-D3Ixmsdf.js → dagre-2BBEFEWP-CzHJ4OhK.js} +6 -6
  24. package/dist/{data-grid-overlay-editor-BZIlBk_2.js → data-grid-overlay-editor-XeDv35OR.js} +2 -2
  25. package/dist/{diagram-VMROVX33-Bcg30UDf.js → diagram-4IRLE6MV-BClcg9HA.js} +5 -5
  26. package/dist/diagram-GUPCWM2R-B_6JECpn.js +144 -0
  27. package/dist/{diagram-ZTM2IBQH-BhmyIBE-.js → diagram-RP2FKANI-B_7Xh4fv.js} +3 -3
  28. package/dist/duckdb-keywords-WTV2Iln-.js +7 -0
  29. package/dist/{erDiagram-3M52JZNH-y6YXLXuL.js → erDiagram-HZWUO2LU-DT9UvdxG.js} +4 -4
  30. package/dist/{flowDiagram-KYDEHFYC-xkSHpgfV.js → flowDiagram-THRYKUMA-mFTSeIk7.js} +61 -61
  31. package/dist/{ganttDiagram-EK5VF46D-CjlWOxxR.js → ganttDiagram-WV7ZQ7D5-BY3c9UTU.js} +562 -565
  32. package/dist/{gitGraphDiagram-GW3U2K7C-BOFtN_k5.js → gitGraphDiagram-OJR772UL-zoDq5W94.js} +4 -4
  33. package/dist/{glide-data-editor-DSqE1MGb.js → glide-data-editor-C_RlTnet.js} +3 -3
  34. package/dist/{graph-CYaaS8YP.js → graph-CufF5hzB.js} +3 -3
  35. package/dist/{index-B5bbjNeG.js → index-Bdw9CplZ.js} +1 -1
  36. package/dist/{index-CpWjEJkV.js → index-CO0vo1K7.js} +144 -144
  37. package/dist/index-CzG80T92.js +40315 -0
  38. package/dist/{index-CK3137W-.js → index-V6AHCVvK.js} +1 -1
  39. package/dist/{index-CGh27NE4.js → index-ezOrnRNU.js} +1 -1
  40. package/dist/{infoDiagram-LHK5PUON-C9568Giu.js → infoDiagram-6WOFNB3A-ChWW8LLZ.js} +2 -2
  41. package/dist/{journeyDiagram-EWQZEKCU-BCDjdWlE.js → journeyDiagram-FFXJYRFH-B5tIHsz4.js} +3 -3
  42. package/dist/{kanban-definition-ZSS6B67P-DJv26ypt.js → kanban-definition-KOZQBZVT-CT4S8AJD.js} +2 -2
  43. package/dist/{layout-CPN5719K.js → layout-DEnv2D-P.js} +35 -35
  44. package/dist/{linear-qwYbqeyR.js → linear-Bii2oeTZ.js} +19 -19
  45. package/dist/{main-BiZBHBEd.js → main-C81Qd2DK.js} +41523 -40156
  46. package/dist/main.js +1 -1
  47. package/dist/{mermaid-CLsxmXkQ.js → mermaid-CTBiBoaH.js} +4060 -3954
  48. package/dist/{min-CL5SEDkT.js → min-DqeIcY6U.js} +14 -14
  49. package/dist/{mindmap-definition-6CBA2TL7-Bbh3fuli.js → mindmap-definition-LNHGMQRG-BsmOiQJ4.js} +3 -3
  50. package/dist/{number-overlay-editor-D5mnbuyJ.js → number-overlay-editor-BHC5X-Lb.js} +2 -2
  51. package/dist/pieDiagram-DBDJKBY4-lxeLW5ty.js +162 -0
  52. package/dist/{quadrantDiagram-2OG54O6I-Cc8BnfHa.js → quadrantDiagram-YPSRARAO-CI2Xnnw_.js} +2 -2
  53. package/dist/{react-plotly-D3sBLSao.js → react-plotly-Dc87nM_n.js} +1 -1
  54. package/dist/{requirementDiagram-QOLK2EJ7-XP3SJztJ.js → requirementDiagram-EGVEC5DT-DnkoJ9T9.js} +3 -3
  55. package/dist/{sankeyDiagram-4UZDY2LN-CLfl4x5B.js → sankeyDiagram-HRAUVNP4-D_qWNV3j.js} +11 -9
  56. package/dist/{sequenceDiagram-SKLFT4DO-B6uZ2TLe.js → sequenceDiagram-WFGC7UMF-BWKW7aPY.js} +4 -4
  57. package/dist/{slides-component-Bb8CIGfJ.js → slides-component--9d0imfh.js} +26 -26
  58. package/dist/{stateDiagram-MI5ZYTHO-BkZswbX2.js → stateDiagram-UUKSUZ4H-CoPA3raY.js} +4 -4
  59. package/dist/{stateDiagram-v2-5AN5P6BG-DotZR8CQ.js → stateDiagram-v2-EYPG3UTE-6owwpkmY.js} +2 -2
  60. package/dist/{time-Bys_HZaY.js → time-B0f3H4v6.js} +2 -2
  61. package/dist/{timeline-definition-MYPXXCX6-bVR0nW5y.js → timeline-definition-3HZDQTIS-DogrRgC9.js} +1 -1
  62. package/dist/{treemap-75Q7IDZK-CmZmDu3A.js → treemap-75Q7IDZK-DlQO6GtH.js} +131 -131
  63. package/dist/{vega-component-DLlF3Y5o.js → vega-component-CyP-TV60.js} +2 -2
  64. package/dist/{xychartDiagram-H2YORKM3-C9HzjkZl.js → xychartDiagram-FDP5SA34-CRJjfJQa.js} +36 -34
  65. package/package.json +11 -6
  66. package/src/README.md +18 -0
  67. package/src/__mocks__/common.ts +160 -0
  68. package/src/__mocks__/notebook.ts +76 -0
  69. package/src/__mocks__/requests.ts +72 -0
  70. package/src/__mocks__/tracebacks.ts +32 -0
  71. package/src/__tests__/CellStatus.test.tsx +263 -0
  72. package/src/__tests__/__snapshots__/CellStatus.test.tsx.snap +523 -0
  73. package/src/__tests__/chat-utils.test.ts +234 -0
  74. package/src/__tests__/lru.test.ts +74 -0
  75. package/src/__tests__/main.test.tsx +174 -0
  76. package/src/__tests__/setup.ts +17 -0
  77. package/src/__tests__/test-helpers.ts +24 -0
  78. package/src/assets/circle-check.ico +0 -0
  79. package/src/assets/circle-play.ico +0 -0
  80. package/src/assets/circle-x.ico +0 -0
  81. package/src/assets/gradient.png +0 -0
  82. package/src/assets/icon-16x16.png +0 -0
  83. package/src/assets/icon-32x32.png +0 -0
  84. package/src/assets/noise.png +0 -0
  85. package/src/components/ai/ai-model-dropdown.tsx +405 -0
  86. package/src/components/ai/ai-provider-icon.tsx +54 -0
  87. package/src/components/app-config/ai-config.tsx +855 -0
  88. package/src/components/app-config/app-config-button.tsx +100 -0
  89. package/src/components/app-config/app-config-form.tsx +307 -0
  90. package/src/components/app-config/common.tsx +48 -0
  91. package/src/components/app-config/constants.ts +13 -0
  92. package/src/components/app-config/incorrect-model-id.tsx +43 -0
  93. package/src/components/app-config/is-overridden.tsx +119 -0
  94. package/src/components/app-config/optional-features.tsx +251 -0
  95. package/src/components/app-config/state.ts +18 -0
  96. package/src/components/app-config/user-config-form.tsx +1361 -0
  97. package/src/components/audio/audio-recorder.tsx +63 -0
  98. package/src/components/buttons/clear-button.tsx +23 -0
  99. package/src/components/buttons/undo-button.tsx +35 -0
  100. package/src/components/chat/chat-panel.tsx +720 -0
  101. package/src/components/chat/markdown-renderer.tsx +217 -0
  102. package/src/components/chat/reasoning-accordion.tsx +50 -0
  103. package/src/components/chat/tool-call-accordion.tsx +118 -0
  104. package/src/components/data-table/SearchBar.tsx +66 -0
  105. package/src/components/data-table/TableActions.tsx +183 -0
  106. package/src/components/data-table/__tests__/__snapshots__/chart-spec-model.test.ts.snap +1079 -0
  107. package/src/components/data-table/__tests__/chart-spec-model.test.ts +707 -0
  108. package/src/components/data-table/__tests__/column_formatting.test.ts +115 -0
  109. package/src/components/data-table/__tests__/columns.test.tsx +341 -0
  110. package/src/components/data-table/__tests__/data-table.test.tsx +60 -0
  111. package/src/components/data-table/__tests__/pagination.test.tsx +152 -0
  112. package/src/components/data-table/__tests__/types.test.ts +44 -0
  113. package/src/components/data-table/__tests__/url-detector.test.tsx +169 -0
  114. package/src/components/data-table/__tests__/useColumnPinning.test.ts +76 -0
  115. package/src/components/data-table/cell-selection/__tests__/feature.test.ts +187 -0
  116. package/src/components/data-table/cell-selection/feature.ts +123 -0
  117. package/src/components/data-table/cell-selection/types.ts +49 -0
  118. package/src/components/data-table/cell-styling/feature.ts +40 -0
  119. package/src/components/data-table/cell-styling/types.ts +26 -0
  120. package/src/components/data-table/charts/README.md +65 -0
  121. package/src/components/data-table/charts/__tests__/__snapshots__/spec-snapshot.test.ts.snap +47 -0
  122. package/src/components/data-table/charts/__tests__/altair-generator.test.ts +425 -0
  123. package/src/components/data-table/charts/__tests__/renderer.test.ts +20 -0
  124. package/src/components/data-table/charts/__tests__/spec-snapshot.test.ts +83 -0
  125. package/src/components/data-table/charts/__tests__/spec.test.ts +997 -0
  126. package/src/components/data-table/charts/__tests__/storage.test.ts +103 -0
  127. package/src/components/data-table/charts/chart-spec/altair-generator.ts +162 -0
  128. package/src/components/data-table/charts/chart-spec/encodings.ts +173 -0
  129. package/src/components/data-table/charts/chart-spec/spec.ts +345 -0
  130. package/src/components/data-table/charts/chart-spec/tooltips.ts +168 -0
  131. package/src/components/data-table/charts/chart-spec/types.ts +77 -0
  132. package/src/components/data-table/charts/charts.tsx +492 -0
  133. package/src/components/data-table/charts/components/chart-items.tsx +369 -0
  134. package/src/components/data-table/charts/components/chart-states.tsx +37 -0
  135. package/src/components/data-table/charts/components/form-fields.tsx +872 -0
  136. package/src/components/data-table/charts/components/layouts.tsx +118 -0
  137. package/src/components/data-table/charts/constants.ts +159 -0
  138. package/src/components/data-table/charts/context.ts +20 -0
  139. package/src/components/data-table/charts/forms/common-chart.tsx +202 -0
  140. package/src/components/data-table/charts/forms/heatmap.tsx +44 -0
  141. package/src/components/data-table/charts/forms/pie.tsx +70 -0
  142. package/src/components/data-table/charts/lazy-chart.tsx +56 -0
  143. package/src/components/data-table/charts/schemas.ts +140 -0
  144. package/src/components/data-table/charts/storage.ts +88 -0
  145. package/src/components/data-table/charts/types.ts +124 -0
  146. package/src/components/data-table/column-explorer-panel/column-explorer.tsx +227 -0
  147. package/src/components/data-table/column-formatting/feature.ts +247 -0
  148. package/src/components/data-table/column-formatting/types.ts +54 -0
  149. package/src/components/data-table/column-header.tsx +672 -0
  150. package/src/components/data-table/column-summary/chart-skeleton.tsx +57 -0
  151. package/src/components/data-table/column-summary/chart-spec-model.tsx +916 -0
  152. package/src/components/data-table/column-summary/column-summary.tsx +166 -0
  153. package/src/components/data-table/column-summary/legacy-chart-spec.ts +242 -0
  154. package/src/components/data-table/column-summary/utils.ts +142 -0
  155. package/src/components/data-table/column-wrapping/feature.ts +62 -0
  156. package/src/components/data-table/column-wrapping/types.ts +29 -0
  157. package/src/components/data-table/columns.tsx +528 -0
  158. package/src/components/data-table/copy-column/feature.ts +27 -0
  159. package/src/components/data-table/copy-column/types.ts +19 -0
  160. package/src/components/data-table/data-table.tsx +298 -0
  161. package/src/components/data-table/date-popover.tsx +146 -0
  162. package/src/components/data-table/download-actions.tsx +186 -0
  163. package/src/components/data-table/filter-pills.tsx +120 -0
  164. package/src/components/data-table/filters.ts +202 -0
  165. package/src/components/data-table/focus-row/feature.ts +41 -0
  166. package/src/components/data-table/focus-row/types.ts +32 -0
  167. package/src/components/data-table/header-items.tsx +295 -0
  168. package/src/components/data-table/hooks/use-column-pinning.ts +51 -0
  169. package/src/components/data-table/hooks/use-panel-ownership.ts +98 -0
  170. package/src/components/data-table/loading-table.tsx +56 -0
  171. package/src/components/data-table/mime-cell.tsx +68 -0
  172. package/src/components/data-table/pagination.tsx +329 -0
  173. package/src/components/data-table/range-focus/__tests__/atoms.test.ts +907 -0
  174. package/src/components/data-table/range-focus/__tests__/utils.test.ts +316 -0
  175. package/src/components/data-table/range-focus/atoms.ts +380 -0
  176. package/src/components/data-table/range-focus/cell-selection-indicator.tsx +37 -0
  177. package/src/components/data-table/range-focus/provider.tsx +13 -0
  178. package/src/components/data-table/range-focus/use-cell-range-selection.ts +119 -0
  179. package/src/components/data-table/range-focus/use-scroll-into-view.ts +46 -0
  180. package/src/components/data-table/range-focus/utils.ts +105 -0
  181. package/src/components/data-table/renderers.tsx +247 -0
  182. package/src/components/data-table/row-viewer-panel/__tests__/filter-rows.test.ts +82 -0
  183. package/src/components/data-table/row-viewer-panel/__tests__/row-viewer.test.tsx +58 -0
  184. package/src/components/data-table/row-viewer-panel/row-viewer.tsx +371 -0
  185. package/src/components/data-table/types.ts +81 -0
  186. package/src/components/data-table/uniformSample.tsx +19 -0
  187. package/src/components/data-table/url-detector.tsx +111 -0
  188. package/src/components/data-table/utils.ts +46 -0
  189. package/src/components/databases/display.tsx +66 -0
  190. package/src/components/databases/engine-variable.tsx +51 -0
  191. package/src/components/databases/icon.tsx +91 -0
  192. package/src/components/databases/icons/clickhouse.svg +1 -0
  193. package/src/components/databases/icons/databricks.svg +1 -0
  194. package/src/components/databases/icons/datafusion.png +0 -0
  195. package/src/components/databases/icons/duckdb.svg +1 -0
  196. package/src/components/databases/icons/googlebigquery.svg +1 -0
  197. package/src/components/databases/icons/iceberg.png +0 -0
  198. package/src/components/databases/icons/motherduck.svg +9 -0
  199. package/src/components/databases/icons/mysql.svg +1 -0
  200. package/src/components/databases/icons/postgresql.svg +1 -0
  201. package/src/components/databases/icons/redshift.svg +1 -0
  202. package/src/components/databases/icons/snowflake.svg +1 -0
  203. package/src/components/databases/icons/spark.svg +1 -0
  204. package/src/components/databases/icons/sqlalchemy.svg +1 -0
  205. package/src/components/databases/icons/sqlite.svg +1 -0
  206. package/src/components/databases/icons/timeplus.svg +17 -0
  207. package/src/components/databases/icons/trino.svg +1 -0
  208. package/src/components/datasets/icons.tsx +55 -0
  209. package/src/components/datasources/__tests__/install-package-button.test.tsx +85 -0
  210. package/src/components/datasources/__tests__/utils.test.ts +171 -0
  211. package/src/components/datasources/column-preview.tsx +269 -0
  212. package/src/components/datasources/components.tsx +100 -0
  213. package/src/components/datasources/datasources.tsx +799 -0
  214. package/src/components/datasources/install-package-button.tsx +46 -0
  215. package/src/components/datasources/utils.ts +62 -0
  216. package/src/components/debug/indicator.tsx +19 -0
  217. package/src/components/debugger/debugger-code.css +3 -0
  218. package/src/components/debugger/debugger-code.tsx +222 -0
  219. package/src/components/dependency-graph/custom-node.tsx +89 -0
  220. package/src/components/dependency-graph/dependency-graph-minimap.tsx +197 -0
  221. package/src/components/dependency-graph/dependency-graph-tree.tsx +181 -0
  222. package/src/components/dependency-graph/dependency-graph.css +17 -0
  223. package/src/components/dependency-graph/dependency-graph.tsx +66 -0
  224. package/src/components/dependency-graph/elements.ts +185 -0
  225. package/src/components/dependency-graph/panels.tsx +279 -0
  226. package/src/components/dependency-graph/types.ts +21 -0
  227. package/src/components/dependency-graph/utils/changes.ts +54 -0
  228. package/src/components/dependency-graph/utils/layout.ts +45 -0
  229. package/src/components/dependency-graph/utils/useFitToViewOnDimensionChange.ts +25 -0
  230. package/src/components/editor/Cell.tsx +1175 -0
  231. package/src/components/editor/Disconnected.tsx +72 -0
  232. package/src/components/editor/Output.tsx +462 -0
  233. package/src/components/editor/RecoveryButton.tsx +161 -0
  234. package/src/components/editor/SortableCell.tsx +161 -0
  235. package/src/components/editor/__tests__/data-attributes.test.tsx +173 -0
  236. package/src/components/editor/__tests__/dynamic-favicon.test.tsx +183 -0
  237. package/src/components/editor/actions/name-cell-input.tsx +137 -0
  238. package/src/components/editor/actions/types.ts +53 -0
  239. package/src/components/editor/actions/useCellActionButton.tsx +422 -0
  240. package/src/components/editor/actions/useConfigActions.tsx +182 -0
  241. package/src/components/editor/actions/useCopyNotebook.tsx +41 -0
  242. package/src/components/editor/actions/useHideAllMarkdownCode.ts +53 -0
  243. package/src/components/editor/actions/useNotebookActions.tsx +556 -0
  244. package/src/components/editor/actions/useRestartKernel.tsx +36 -0
  245. package/src/components/editor/ai/__tests__/completion-utils.test.ts +379 -0
  246. package/src/components/editor/ai/add-cell-with-ai.tsx +428 -0
  247. package/src/components/editor/ai/ai-completion-editor.tsx +261 -0
  248. package/src/components/editor/ai/completion-handlers.tsx +91 -0
  249. package/src/components/editor/ai/completion-utils.ts +95 -0
  250. package/src/components/editor/ai/merge-editor.css +9 -0
  251. package/src/components/editor/alerts/connecting-alert.tsx +46 -0
  252. package/src/components/editor/alerts/floating-alert.tsx +47 -0
  253. package/src/components/editor/alerts/stdin-blocking-alert.tsx +61 -0
  254. package/src/components/editor/app-container.tsx +53 -0
  255. package/src/components/editor/boundary/ErrorBoundary.tsx +41 -0
  256. package/src/components/editor/cell/CellStatus.tsx +371 -0
  257. package/src/components/editor/cell/CreateCellButton.tsx +132 -0
  258. package/src/components/editor/cell/DeleteButton.tsx +58 -0
  259. package/src/components/editor/cell/PendingDeleteConfirmation.tsx +126 -0
  260. package/src/components/editor/cell/RunButton.tsx +109 -0
  261. package/src/components/editor/cell/StopButton.tsx +36 -0
  262. package/src/components/editor/cell/TinyCode.css +10 -0
  263. package/src/components/editor/cell/TinyCode.tsx +53 -0
  264. package/src/components/editor/cell/cell-actions.tsx +185 -0
  265. package/src/components/editor/cell/cell-context-menu.tsx +243 -0
  266. package/src/components/editor/cell/cell-status.css +21 -0
  267. package/src/components/editor/cell/code/cell-editor.tsx +546 -0
  268. package/src/components/editor/cell/code/icons.tsx +31 -0
  269. package/src/components/editor/cell/code/language-toggle.tsx +140 -0
  270. package/src/components/editor/cell/collapse.tsx +100 -0
  271. package/src/components/editor/cell/toolbar.tsx +89 -0
  272. package/src/components/editor/cell/useAddCell.ts +29 -0
  273. package/src/components/editor/cell/useDeleteCell.tsx +89 -0
  274. package/src/components/editor/cell/useRunCells.ts +86 -0
  275. package/src/components/editor/cell/useShouldShowInterrupt.ts +26 -0
  276. package/src/components/editor/cell/useSplitCell.tsx +41 -0
  277. package/src/components/editor/chrome/components/contribute-snippet-button.tsx +138 -0
  278. package/src/components/editor/chrome/components/feedback-button.tsx +105 -0
  279. package/src/components/editor/chrome/panels/__tests__/write-secret-modal.test.ts +43 -0
  280. package/src/components/editor/chrome/panels/constants.ts +2 -0
  281. package/src/components/editor/chrome/panels/context-aware-panel/atoms.ts +28 -0
  282. package/src/components/editor/chrome/panels/context-aware-panel/context-aware-panel.tsx +167 -0
  283. package/src/components/editor/chrome/panels/datasources-panel.tsx +6 -0
  284. package/src/components/editor/chrome/panels/dependency-graph-panel.tsx +23 -0
  285. package/src/components/editor/chrome/panels/documentation-panel.tsx +29 -0
  286. package/src/components/editor/chrome/panels/empty-state.tsx +28 -0
  287. package/src/components/editor/chrome/panels/error-panel.tsx +35 -0
  288. package/src/components/editor/chrome/panels/file-explorer-panel.tsx +33 -0
  289. package/src/components/editor/chrome/panels/logs-panel.tsx +97 -0
  290. package/src/components/editor/chrome/panels/outline/floating-outline.tsx +129 -0
  291. package/src/components/editor/chrome/panels/outline/useActiveOutline.tsx +172 -0
  292. package/src/components/editor/chrome/panels/outline-panel.css +6 -0
  293. package/src/components/editor/chrome/panels/outline-panel.tsx +39 -0
  294. package/src/components/editor/chrome/panels/packages-panel.tsx +635 -0
  295. package/src/components/editor/chrome/panels/packages-state.ts +5 -0
  296. package/src/components/editor/chrome/panels/scratchpad-panel.tsx +8 -0
  297. package/src/components/editor/chrome/panels/secrets-panel.tsx +155 -0
  298. package/src/components/editor/chrome/panels/snippets-panel.css +11 -0
  299. package/src/components/editor/chrome/panels/snippets-panel.tsx +230 -0
  300. package/src/components/editor/chrome/panels/tracing-panel.tsx +28 -0
  301. package/src/components/editor/chrome/panels/variable-panel.tsx +31 -0
  302. package/src/components/editor/chrome/panels/write-secret-modal.tsx +190 -0
  303. package/src/components/editor/chrome/state.ts +102 -0
  304. package/src/components/editor/chrome/types.ts +133 -0
  305. package/src/components/editor/chrome/wrapper/__tests__/minimap-state.test.ts +209 -0
  306. package/src/components/editor/chrome/wrapper/__tests__/storage.test.ts +41 -0
  307. package/src/components/editor/chrome/wrapper/app-chrome.css +22 -0
  308. package/src/components/editor/chrome/wrapper/app-chrome.tsx +256 -0
  309. package/src/components/editor/chrome/wrapper/footer-item.tsx +43 -0
  310. package/src/components/editor/chrome/wrapper/footer-items/ai-status.tsx +47 -0
  311. package/src/components/editor/chrome/wrapper/footer-items/backend-status.tsx +111 -0
  312. package/src/components/editor/chrome/wrapper/footer-items/copilot-status.tsx +125 -0
  313. package/src/components/editor/chrome/wrapper/footer-items/machine-stats.tsx +185 -0
  314. package/src/components/editor/chrome/wrapper/footer-items/minimap-status.tsx +21 -0
  315. package/src/components/editor/chrome/wrapper/footer-items/rtc-status.tsx +65 -0
  316. package/src/components/editor/chrome/wrapper/footer-items/runtime-settings.tsx +370 -0
  317. package/src/components/editor/chrome/wrapper/footer.tsx +90 -0
  318. package/src/components/editor/chrome/wrapper/minimap-state.ts +164 -0
  319. package/src/components/editor/chrome/wrapper/minimap.tsx +443 -0
  320. package/src/components/editor/chrome/wrapper/panels.tsx +10 -0
  321. package/src/components/editor/chrome/wrapper/sidebar.tsx +100 -0
  322. package/src/components/editor/chrome/wrapper/storage.ts +56 -0
  323. package/src/components/editor/chrome/wrapper/utils.ts +8 -0
  324. package/src/components/editor/code/readonly-python-code.tsx +160 -0
  325. package/src/components/editor/columns/__tests__/storage.test.ts +104 -0
  326. package/src/components/editor/columns/cell-column.tsx +105 -0
  327. package/src/components/editor/columns/sortable-column.tsx +175 -0
  328. package/src/components/editor/columns/storage.ts +56 -0
  329. package/src/components/editor/common.ts +20 -0
  330. package/src/components/editor/controls/Controls.tsx +225 -0
  331. package/src/components/editor/controls/command-palette-button.tsx +27 -0
  332. package/src/components/editor/controls/command-palette.tsx +210 -0
  333. package/src/components/editor/controls/keyboard-shortcuts.tsx +309 -0
  334. package/src/components/editor/controls/notebook-menu-dropdown.tsx +157 -0
  335. package/src/components/editor/controls/shutdown-button.tsx +70 -0
  336. package/src/components/editor/database/__tests__/__snapshots__/as-code.test.ts.snap +659 -0
  337. package/src/components/editor/database/__tests__/as-code.test.ts +598 -0
  338. package/src/components/editor/database/__tests__/secrets.test.ts +38 -0
  339. package/src/components/editor/database/add-database-form.tsx +395 -0
  340. package/src/components/editor/database/as-code.ts +786 -0
  341. package/src/components/editor/database/form-renderers.tsx +211 -0
  342. package/src/components/editor/database/schemas.ts +485 -0
  343. package/src/components/editor/database/secrets.ts +25 -0
  344. package/src/components/editor/documentation.css +139 -0
  345. package/src/components/editor/dynamic-favicon.tsx +126 -0
  346. package/src/components/editor/errors/auto-fix.tsx +61 -0
  347. package/src/components/editor/file-tree/__tests__/requesting-tree.test.ts +321 -0
  348. package/src/components/editor/file-tree/file-explorer.tsx +679 -0
  349. package/src/components/editor/file-tree/file-viewer.tsx +283 -0
  350. package/src/components/editor/file-tree/renderers.tsx +83 -0
  351. package/src/components/editor/file-tree/requesting-tree.tsx +228 -0
  352. package/src/components/editor/file-tree/state.tsx +26 -0
  353. package/src/components/editor/file-tree/types.ts +118 -0
  354. package/src/components/editor/file-tree/upload.tsx +101 -0
  355. package/src/components/editor/header/app-header.tsx +28 -0
  356. package/src/components/editor/header/filename-form.tsx +27 -0
  357. package/src/components/editor/header/filename-input.css +21 -0
  358. package/src/components/editor/header/filename-input.tsx +244 -0
  359. package/src/components/editor/header/status.tsx +72 -0
  360. package/src/components/editor/inputs/Inputs.css +118 -0
  361. package/src/components/editor/inputs/Inputs.styles.ts +66 -0
  362. package/src/components/editor/inputs/Inputs.tsx +34 -0
  363. package/src/components/editor/kiosk-mode.tsx +25 -0
  364. package/src/components/editor/links/cell-link-list.tsx +74 -0
  365. package/src/components/editor/links/cell-link.tsx +128 -0
  366. package/src/components/editor/navigation/__tests__/clipboard.test.ts +466 -0
  367. package/src/components/editor/navigation/__tests__/navigation.test.ts +1771 -0
  368. package/src/components/editor/navigation/__tests__/selection.test.ts +194 -0
  369. package/src/components/editor/navigation/clipboard.ts +205 -0
  370. package/src/components/editor/navigation/focus-utils.ts +48 -0
  371. package/src/components/editor/navigation/multi-cell-action-toolbar.tsx +499 -0
  372. package/src/components/editor/navigation/navigation.ts +704 -0
  373. package/src/components/editor/navigation/selection.ts +114 -0
  374. package/src/components/editor/navigation/state.ts +5 -0
  375. package/src/components/editor/navigation/vim-bindings.test.ts +109 -0
  376. package/src/components/editor/navigation/vim-bindings.ts +90 -0
  377. package/src/components/editor/notebook-banner.tsx +75 -0
  378. package/src/components/editor/output/CalloutOutput.styles.ts +22 -0
  379. package/src/components/editor/output/CalloutOutput.tsx +19 -0
  380. package/src/components/editor/output/ConsoleOutput.tsx +276 -0
  381. package/src/components/editor/output/EmotionCacheProvider.tsx +32 -0
  382. package/src/components/editor/output/HtmlOutput.tsx +25 -0
  383. package/src/components/editor/output/ImageOutput.tsx +25 -0
  384. package/src/components/editor/output/JsonOutput.tsx +424 -0
  385. package/src/components/editor/output/MarimoErrorOutput.tsx +511 -0
  386. package/src/components/editor/output/MarimoTracebackOutput.tsx +233 -0
  387. package/src/components/editor/output/Outputs.css +102 -0
  388. package/src/components/editor/output/TextOutput.tsx +42 -0
  389. package/src/components/editor/output/VideoOutput.tsx +11 -0
  390. package/src/components/editor/output/__tests__/ansi.test.ts +39 -0
  391. package/src/components/editor/output/__tests__/json-output.test.ts +269 -0
  392. package/src/components/editor/output/__tests__/traceback.test.tsx +105 -0
  393. package/src/components/editor/output/useWrapText.ts +14 -0
  394. package/src/components/editor/package-alert.tsx +596 -0
  395. package/src/components/editor/renderMimeIcon.tsx +38 -0
  396. package/src/components/editor/renderers/CellArray.tsx +352 -0
  397. package/src/components/editor/renderers/cells-renderer.tsx +96 -0
  398. package/src/components/editor/renderers/grid-layout/grid-layout.tsx +650 -0
  399. package/src/components/editor/renderers/grid-layout/plugin.tsx +146 -0
  400. package/src/components/editor/renderers/grid-layout/styles.css +31 -0
  401. package/src/components/editor/renderers/grid-layout/types.ts +89 -0
  402. package/src/components/editor/renderers/layout-select.tsx +86 -0
  403. package/src/components/editor/renderers/plugins.ts +31 -0
  404. package/src/components/editor/renderers/slides-layout/plugin.tsx +31 -0
  405. package/src/components/editor/renderers/slides-layout/slides-layout.tsx +74 -0
  406. package/src/components/editor/renderers/slides-layout/types.ts +12 -0
  407. package/src/components/editor/renderers/types.ts +75 -0
  408. package/src/components/editor/renderers/vertical-layout/__tests__/useDelayVisibility.test.ts +87 -0
  409. package/src/components/editor/renderers/vertical-layout/__tests__/useFocusFirstEditor.test.ts +123 -0
  410. package/src/components/editor/renderers/vertical-layout/__tests__/vertical-layout.test.ts +173 -0
  411. package/src/components/editor/renderers/vertical-layout/sidebar/__tests__/sidebar.test.tsx +56 -0
  412. package/src/components/editor/renderers/vertical-layout/sidebar/sheet-sidebar.tsx +32 -0
  413. package/src/components/editor/renderers/vertical-layout/sidebar/sidebar-slot.tsx +10 -0
  414. package/src/components/editor/renderers/vertical-layout/sidebar/sidebar.css +20 -0
  415. package/src/components/editor/renderers/vertical-layout/sidebar/sidebar.tsx +30 -0
  416. package/src/components/editor/renderers/vertical-layout/sidebar/state.ts +46 -0
  417. package/src/components/editor/renderers/vertical-layout/sidebar/toggle.tsx +25 -0
  418. package/src/components/editor/renderers/vertical-layout/sidebar/wrapped-with-sidebar.tsx +38 -0
  419. package/src/components/editor/renderers/vertical-layout/useDelayVisibility.ts +32 -0
  420. package/src/components/editor/renderers/vertical-layout/useFocusFirstEditor.ts +107 -0
  421. package/src/components/editor/renderers/vertical-layout/vertical-layout-wrapper.tsx +46 -0
  422. package/src/components/editor/renderers/vertical-layout/vertical-layout.tsx +451 -0
  423. package/src/components/editor/stdin-blocking-alert.tsx +83 -0
  424. package/src/components/export/export-output-button.tsx +14 -0
  425. package/src/components/find-replace/find-replace.tsx +293 -0
  426. package/src/components/forms/__tests__/form-utils.test.ts +104 -0
  427. package/src/components/forms/form-utils.ts +90 -0
  428. package/src/components/forms/form.tsx +817 -0
  429. package/src/components/forms/options.ts +59 -0
  430. package/src/components/forms/switchable-multi-select.tsx +134 -0
  431. package/src/components/home/components.tsx +189 -0
  432. package/src/components/home/state.ts +30 -0
  433. package/src/components/icons/copy-icon.tsx +59 -0
  434. package/src/components/icons/github-copilot.tsx +17 -0
  435. package/src/components/icons/large-spinner.tsx +39 -0
  436. package/src/components/icons/loading-ellipsis.tsx +46 -0
  437. package/src/components/icons/multi-icon.css +9 -0
  438. package/src/components/icons/multi-icon.tsx +30 -0
  439. package/src/components/icons/spinner.tsx +38 -0
  440. package/src/components/layout/toolbar.tsx +26 -0
  441. package/src/components/modal/ImperativeModal.tsx +187 -0
  442. package/src/components/pages/edit-page.tsx +37 -0
  443. package/src/components/pages/home-page.tsx +514 -0
  444. package/src/components/pages/run-page.tsx +55 -0
  445. package/src/components/scratchpad/scratchpad-history.ts +28 -0
  446. package/src/components/scratchpad/scratchpad.tsx +280 -0
  447. package/src/components/shortcuts/renderShortcut.tsx +208 -0
  448. package/src/components/slides/slides-component.tsx +132 -0
  449. package/src/components/slides/slides.css +100 -0
  450. package/src/components/sort/SortableCellsProvider.tsx +242 -0
  451. package/src/components/static-html/share-modal.tsx +181 -0
  452. package/src/components/static-html/static-banner.tsx +164 -0
  453. package/src/components/terminal/terminal.tsx +110 -0
  454. package/src/components/terminal/xterm.css +3 -0
  455. package/src/components/tracing/tracing-spec.ts +118 -0
  456. package/src/components/tracing/tracing.test.tsx +66 -0
  457. package/src/components/tracing/tracing.tsx +410 -0
  458. package/src/components/ui/accordion.tsx +70 -0
  459. package/src/components/ui/alert-dialog.tsx +176 -0
  460. package/src/components/ui/alert.tsx +64 -0
  461. package/src/components/ui/aria-popover.tsx +43 -0
  462. package/src/components/ui/badge.tsx +41 -0
  463. package/src/components/ui/button.tsx +156 -0
  464. package/src/components/ui/calendar.tsx +231 -0
  465. package/src/components/ui/card.tsx +83 -0
  466. package/src/components/ui/checkbox.tsx +33 -0
  467. package/src/components/ui/combobox.tsx +278 -0
  468. package/src/components/ui/command.tsx +165 -0
  469. package/src/components/ui/context-menu.tsx +193 -0
  470. package/src/components/ui/date-input.tsx +127 -0
  471. package/src/components/ui/date-picker.tsx +188 -0
  472. package/src/components/ui/dialog.tsx +155 -0
  473. package/src/components/ui/draggable-popover.tsx +68 -0
  474. package/src/components/ui/dropdown-menu.tsx +190 -0
  475. package/src/components/ui/field.tsx +90 -0
  476. package/src/components/ui/form.tsx +224 -0
  477. package/src/components/ui/fullscreen.tsx +38 -0
  478. package/src/components/ui/input.tsx +208 -0
  479. package/src/components/ui/kbd.tsx +22 -0
  480. package/src/components/ui/label.tsx +26 -0
  481. package/src/components/ui/links.tsx +23 -0
  482. package/src/components/ui/menu-items.tsx +101 -0
  483. package/src/components/ui/native-select.tsx +39 -0
  484. package/src/components/ui/navigation.tsx +154 -0
  485. package/src/components/ui/number-field.tsx +99 -0
  486. package/src/components/ui/popover.tsx +63 -0
  487. package/src/components/ui/progress.tsx +28 -0
  488. package/src/components/ui/radio-group.tsx +44 -0
  489. package/src/components/ui/range-slider.tsx +102 -0
  490. package/src/components/ui/scroll-area.tsx +47 -0
  491. package/src/components/ui/select.tsx +167 -0
  492. package/src/components/ui/sheet.tsx +143 -0
  493. package/src/components/ui/skeleton.tsx +16 -0
  494. package/src/components/ui/slider.tsx +80 -0
  495. package/src/components/ui/switch.tsx +54 -0
  496. package/src/components/ui/table.tsx +122 -0
  497. package/src/components/ui/tabs.tsx +55 -0
  498. package/src/components/ui/textarea.tsx +104 -0
  499. package/src/components/ui/toast.tsx +133 -0
  500. package/src/components/ui/toaster.tsx +30 -0
  501. package/src/components/ui/toggle.tsx +49 -0
  502. package/src/components/ui/tooltip.tsx +87 -0
  503. package/src/components/ui/typography.tsx +207 -0
  504. package/src/components/ui/use-restore-focus.ts +28 -0
  505. package/src/components/ui/use-toast.ts +224 -0
  506. package/src/components/utils/delay-mount.tsx +81 -0
  507. package/src/components/utils/lazy-mount.tsx +24 -0
  508. package/src/components/variables/common.tsx +37 -0
  509. package/src/components/variables/variables-table.tsx +335 -0
  510. package/src/core/MarimoApp.tsx +103 -0
  511. package/src/core/ai/__tests__/model-registry.test.ts +357 -0
  512. package/src/core/ai/chat-utils.ts +71 -0
  513. package/src/core/ai/config.ts +76 -0
  514. package/src/core/ai/context/__tests__/registry.test.ts +516 -0
  515. package/src/core/ai/context/context.ts +16 -0
  516. package/src/core/ai/context/providers/__tests__/__snapshots__/tables.test.ts.snap +291 -0
  517. package/src/core/ai/context/providers/__tests__/__snapshots__/variable.test.ts.snap +378 -0
  518. package/src/core/ai/context/providers/__tests__/tables.test.ts +271 -0
  519. package/src/core/ai/context/providers/__tests__/variable.test.ts +312 -0
  520. package/src/core/ai/context/providers/common.ts +7 -0
  521. package/src/core/ai/context/providers/tables.ts +208 -0
  522. package/src/core/ai/context/providers/variable.ts +72 -0
  523. package/src/core/ai/context/registry.ts +180 -0
  524. package/src/core/ai/ids/__tests__/ids.test.ts +193 -0
  525. package/src/core/ai/ids/ids.ts +71 -0
  526. package/src/core/ai/model-registry.ts +158 -0
  527. package/src/core/ai/state.ts +58 -0
  528. package/src/core/alerts/state.ts +75 -0
  529. package/src/core/cells/__tests__/__snapshots__/cells.test.ts.snap +1312 -0
  530. package/src/core/cells/__tests__/add-missing-import.test.ts +78 -0
  531. package/src/core/cells/__tests__/cell.test.ts +193 -0
  532. package/src/core/cells/__tests__/cells.test.ts +2664 -0
  533. package/src/core/cells/__tests__/collapseConsoleOutputs.test.ts +239 -0
  534. package/src/core/cells/__tests__/focus.test.ts +271 -0
  535. package/src/core/cells/__tests__/ids.test.ts +90 -0
  536. package/src/core/cells/__tests__/names.test.ts +62 -0
  537. package/src/core/cells/__tests__/pending-delete-service.test.tsx +202 -0
  538. package/src/core/cells/__tests__/runs.test.ts +453 -0
  539. package/src/core/cells/__tests__/session.test.ts +757 -0
  540. package/src/core/cells/__tests__/utils.test.ts +428 -0
  541. package/src/core/cells/actions.ts +21 -0
  542. package/src/core/cells/add-missing-import.ts +114 -0
  543. package/src/core/cells/cell.ts +243 -0
  544. package/src/core/cells/cells.ts +1751 -0
  545. package/src/core/cells/collapseConsoleOutputs.tsx +133 -0
  546. package/src/core/cells/effects.ts +42 -0
  547. package/src/core/cells/focus.ts +128 -0
  548. package/src/core/cells/ids.ts +124 -0
  549. package/src/core/cells/logs.ts +114 -0
  550. package/src/core/cells/names.ts +107 -0
  551. package/src/core/cells/outline.ts +30 -0
  552. package/src/core/cells/outputs.ts +34 -0
  553. package/src/core/cells/pending-delete-service.ts +183 -0
  554. package/src/core/cells/runs.ts +196 -0
  555. package/src/core/cells/scrollCellIntoView.ts +133 -0
  556. package/src/core/cells/session.ts +281 -0
  557. package/src/core/cells/types.ts +128 -0
  558. package/src/core/cells/utils.ts +141 -0
  559. package/src/core/codemirror/__tests__/__snapshots__/setup.test.ts.snap +216 -0
  560. package/src/core/codemirror/__tests__/extensions.test.ts +117 -0
  561. package/src/core/codemirror/__tests__/format.test.ts +227 -0
  562. package/src/core/codemirror/__tests__/setup.test.ts +178 -0
  563. package/src/core/codemirror/ai/request.ts +72 -0
  564. package/src/core/codemirror/ai/resources.ts +90 -0
  565. package/src/core/codemirror/cells/extensions.ts +387 -0
  566. package/src/core/codemirror/cells/state.ts +32 -0
  567. package/src/core/codemirror/cells/traceback-decorations.ts +111 -0
  568. package/src/core/codemirror/cm.ts +272 -0
  569. package/src/core/codemirror/compat/__tests__/jupyter.test.ts +136 -0
  570. package/src/core/codemirror/compat/jupyter.tsx +244 -0
  571. package/src/core/codemirror/completion/Autocompleter.ts +172 -0
  572. package/src/core/codemirror/completion/__tests__/hints.test.ts +84 -0
  573. package/src/core/codemirror/completion/__tests__/keymap.test.ts +44 -0
  574. package/src/core/codemirror/completion/completer.ts +58 -0
  575. package/src/core/codemirror/completion/hints.ts +143 -0
  576. package/src/core/codemirror/completion/keymap.ts +70 -0
  577. package/src/core/codemirror/completion/utils.ts +18 -0
  578. package/src/core/codemirror/completion/variable-completions.ts +100 -0
  579. package/src/core/codemirror/config/extension.ts +63 -0
  580. package/src/core/codemirror/config/types.ts +10 -0
  581. package/src/core/codemirror/copilot/__tests__/copilot.test.ts +260 -0
  582. package/src/core/codemirror/copilot/__tests__/getCodes.test.ts +209 -0
  583. package/src/core/codemirror/copilot/__tests__/trim-utils.test.ts +291 -0
  584. package/src/core/codemirror/copilot/client.ts +123 -0
  585. package/src/core/codemirror/copilot/copilot-config.tsx +285 -0
  586. package/src/core/codemirror/copilot/extension.ts +285 -0
  587. package/src/core/codemirror/copilot/getCodes.ts +130 -0
  588. package/src/core/codemirror/copilot/language-server.ts +255 -0
  589. package/src/core/codemirror/copilot/state.ts +66 -0
  590. package/src/core/codemirror/copilot/trim-utils.ts +33 -0
  591. package/src/core/codemirror/copilot/types.ts +41 -0
  592. package/src/core/codemirror/editing/__tests__/commands.test.ts +106 -0
  593. package/src/core/codemirror/editing/__tests__/debugging.test.ts +193 -0
  594. package/src/core/codemirror/editing/commands.ts +25 -0
  595. package/src/core/codemirror/editing/debugging.ts +58 -0
  596. package/src/core/codemirror/editing/extensions.ts +4 -0
  597. package/src/core/codemirror/extensions.ts +95 -0
  598. package/src/core/codemirror/facet.ts +19 -0
  599. package/src/core/codemirror/find-replace/__tests__/navigate.test.ts +695 -0
  600. package/src/core/codemirror/find-replace/extension.ts +41 -0
  601. package/src/core/codemirror/find-replace/navigate.ts +221 -0
  602. package/src/core/codemirror/find-replace/query.ts +31 -0
  603. package/src/core/codemirror/find-replace/search-highlight.ts +148 -0
  604. package/src/core/codemirror/find-replace/state.ts +167 -0
  605. package/src/core/codemirror/format.ts +120 -0
  606. package/src/core/codemirror/go-to-definition/__tests__/commands.test.ts +205 -0
  607. package/src/core/codemirror/go-to-definition/commands.ts +80 -0
  608. package/src/core/codemirror/go-to-definition/extension.ts +23 -0
  609. package/src/core/codemirror/go-to-definition/underline.ts +223 -0
  610. package/src/core/codemirror/go-to-definition/utils.ts +126 -0
  611. package/src/core/codemirror/keymaps/__tests__/keymaps.test.ts +43 -0
  612. package/src/core/codemirror/keymaps/__tests__/vimrc.test.ts +121 -0
  613. package/src/core/codemirror/keymaps/keymaps.ts +163 -0
  614. package/src/core/codemirror/keymaps/vim.ts +360 -0
  615. package/src/core/codemirror/keymaps/vimrc.ts +149 -0
  616. package/src/core/codemirror/language/LanguageAdapters.ts +23 -0
  617. package/src/core/codemirror/language/__tests__/ast.test.ts +124 -0
  618. package/src/core/codemirror/language/__tests__/extension.test.ts +260 -0
  619. package/src/core/codemirror/language/__tests__/indentOneTab.test.ts +31 -0
  620. package/src/core/codemirror/language/__tests__/markdown.test.ts +495 -0
  621. package/src/core/codemirror/language/__tests__/sql.test.ts +1640 -0
  622. package/src/core/codemirror/language/__tests__/utils.test.ts +166 -0
  623. package/src/core/codemirror/language/commands.ts +59 -0
  624. package/src/core/codemirror/language/embedded/__tests__/embedded-python.test.ts +163 -0
  625. package/src/core/codemirror/language/embedded/embedded-python.ts +131 -0
  626. package/src/core/codemirror/language/embedded/latex.ts +257 -0
  627. package/src/core/codemirror/language/extension.ts +322 -0
  628. package/src/core/codemirror/language/languages/markdown.ts +261 -0
  629. package/src/core/codemirror/language/languages/python.ts +329 -0
  630. package/src/core/codemirror/language/languages/sql/completion-sources.tsx +99 -0
  631. package/src/core/codemirror/language/languages/sql/completion-store.ts +191 -0
  632. package/src/core/codemirror/language/languages/sql/sql.ts +545 -0
  633. package/src/core/codemirror/language/languages/sql/utils.ts +42 -0
  634. package/src/core/codemirror/language/metadata.ts +71 -0
  635. package/src/core/codemirror/language/panel/markdown.tsx +63 -0
  636. package/src/core/codemirror/language/panel/panel.tsx +197 -0
  637. package/src/core/codemirror/language/panel/sql.tsx +132 -0
  638. package/src/core/codemirror/language/types.ts +41 -0
  639. package/src/core/codemirror/language/utils/ast.ts +84 -0
  640. package/src/core/codemirror/language/utils/indentOneTab.ts +9 -0
  641. package/src/core/codemirror/language/utils/quotes.ts +18 -0
  642. package/src/core/codemirror/language/utils.ts +78 -0
  643. package/src/core/codemirror/lsp/__tests__/notebook-lsp.test.ts +860 -0
  644. package/src/core/codemirror/lsp/federated-lsp.ts +235 -0
  645. package/src/core/codemirror/lsp/lens.ts +130 -0
  646. package/src/core/codemirror/lsp/notebook-lsp.ts +604 -0
  647. package/src/core/codemirror/lsp/transports.ts +31 -0
  648. package/src/core/codemirror/lsp/types.ts +55 -0
  649. package/src/core/codemirror/lsp/utils.ts +11 -0
  650. package/src/core/codemirror/markdown/__tests__/commands.test.ts +522 -0
  651. package/src/core/codemirror/markdown/commands.ts +478 -0
  652. package/src/core/codemirror/markdown/completions.ts +273 -0
  653. package/src/core/codemirror/markdown/extension.ts +106 -0
  654. package/src/core/codemirror/misc/__tests__/dnd.test.ts +111 -0
  655. package/src/core/codemirror/misc/__tests__/paste.test.ts +239 -0
  656. package/src/core/codemirror/misc/dnd.ts +48 -0
  657. package/src/core/codemirror/misc/paste.ts +181 -0
  658. package/src/core/codemirror/placeholder/__tests__/extensions.test.ts +132 -0
  659. package/src/core/codemirror/placeholder/extensions.ts +99 -0
  660. package/src/core/codemirror/react-dom/createPanel.tsx +39 -0
  661. package/src/core/codemirror/reactive-references/__tests__/analyzer.test.ts +1222 -0
  662. package/src/core/codemirror/reactive-references/analyzer.ts +608 -0
  663. package/src/core/codemirror/reactive-references/extension.ts +154 -0
  664. package/src/core/codemirror/readonly/__tests__/extension.test.ts +55 -0
  665. package/src/core/codemirror/readonly/extension.ts +187 -0
  666. package/src/core/codemirror/rtc/extension.ts +450 -0
  667. package/src/core/codemirror/rtc/loro/awareness.ts +496 -0
  668. package/src/core/codemirror/rtc/loro/colors.ts +38 -0
  669. package/src/core/codemirror/rtc/loro/sync.ts +159 -0
  670. package/src/core/codemirror/theme/__tests__/light.test.ts +136 -0
  671. package/src/core/codemirror/theme/dark.ts +50 -0
  672. package/src/core/codemirror/theme/light.ts +58 -0
  673. package/src/core/codemirror/types.ts +5 -0
  674. package/src/core/codemirror/utils.ts +103 -0
  675. package/src/core/codemirror/vim/cursor-visibility.ts +58 -0
  676. package/src/core/config/__tests__/config-schema.test.ts +232 -0
  677. package/src/core/config/capabilities.ts +15 -0
  678. package/src/core/config/config-schema.ts +296 -0
  679. package/src/core/config/config.ts +113 -0
  680. package/src/core/config/feature-flag.tsx +58 -0
  681. package/src/core/config/if-capability.tsx +19 -0
  682. package/src/core/config/widths.ts +5 -0
  683. package/src/core/constants.ts +52 -0
  684. package/src/core/datasets/__tests__/all-tables.test.ts +466 -0
  685. package/src/core/datasets/__tests__/data-source.test.ts +461 -0
  686. package/src/core/datasets/data-source-connections.ts +334 -0
  687. package/src/core/datasets/engines.ts +11 -0
  688. package/src/core/datasets/request-registry.ts +34 -0
  689. package/src/core/datasets/state.ts +143 -0
  690. package/src/core/datasets/types.ts +38 -0
  691. package/src/core/debugger/state.ts +10 -0
  692. package/src/core/documentation/state.ts +13 -0
  693. package/src/core/dom/__tests__/htmlUtils.test.ts +22 -0
  694. package/src/core/dom/__tests__/outline.test.ts +370 -0
  695. package/src/core/dom/defineCustomElement.ts +23 -0
  696. package/src/core/dom/events.ts +94 -0
  697. package/src/core/dom/htmlUtils.ts +75 -0
  698. package/src/core/dom/outline.ts +123 -0
  699. package/src/core/dom/ui-element.css +8 -0
  700. package/src/core/dom/ui-element.ts +249 -0
  701. package/src/core/dom/uiregistry.ts +209 -0
  702. package/src/core/edit-app.tsx +189 -0
  703. package/src/core/errors/__tests__/errors.test.ts +62 -0
  704. package/src/core/errors/__tests__/utils.test.ts +108 -0
  705. package/src/core/errors/errors.ts +96 -0
  706. package/src/core/errors/state.ts +44 -0
  707. package/src/core/errors/utils.ts +67 -0
  708. package/src/core/export/hooks.ts +60 -0
  709. package/src/core/functions/FunctionRegistry.ts +18 -0
  710. package/src/core/hotkeys/__tests__/hotkeys.test.ts +74 -0
  711. package/src/core/hotkeys/__tests__/shortcuts.test.ts +166 -0
  712. package/src/core/hotkeys/actions.ts +38 -0
  713. package/src/core/hotkeys/hotkeys.ts +523 -0
  714. package/src/core/hotkeys/shortcuts.ts +146 -0
  715. package/src/core/islands/__tests__/parse.test.ts +89 -0
  716. package/src/core/islands/bridge.ts +196 -0
  717. package/src/core/islands/components/output-wrapper.tsx +154 -0
  718. package/src/core/islands/components/web-components.tsx +120 -0
  719. package/src/core/islands/islands.css +14 -0
  720. package/src/core/islands/main.ts +200 -0
  721. package/src/core/islands/parse.ts +161 -0
  722. package/src/core/islands/state.ts +30 -0
  723. package/src/core/islands/toast.ts +41 -0
  724. package/src/core/islands/utils.ts +5 -0
  725. package/src/core/islands/worker/controller.ts +52 -0
  726. package/src/core/islands/worker/worker.tsx +178 -0
  727. package/src/core/kernel/RuntimeState.ts +94 -0
  728. package/src/core/kernel/__tests__/RuntimeState.test.ts +57 -0
  729. package/src/core/kernel/__tests__/handlers.test.ts +61 -0
  730. package/src/core/kernel/__tests__/session.test.ts +10 -0
  731. package/src/core/kernel/handlers.ts +159 -0
  732. package/src/core/kernel/messages.ts +54 -0
  733. package/src/core/kernel/queryParamHandlers.ts +39 -0
  734. package/src/core/kernel/session.ts +50 -0
  735. package/src/core/layout/layout.ts +99 -0
  736. package/src/core/layout/useTogglePresenting.ts +50 -0
  737. package/src/core/meta/globals.ts +25 -0
  738. package/src/core/meta/state.ts +25 -0
  739. package/src/core/mime.ts +9 -0
  740. package/src/core/mode.ts +80 -0
  741. package/src/core/network/DeferredRequestRegistry.ts +71 -0
  742. package/src/core/network/__tests__/DeferredRequestRegistry.test.ts +37 -0
  743. package/src/core/network/__tests__/api.test.ts +80 -0
  744. package/src/core/network/api.ts +145 -0
  745. package/src/core/network/auth.ts +13 -0
  746. package/src/core/network/connection.ts +33 -0
  747. package/src/core/network/requests-network.ts +398 -0
  748. package/src/core/network/requests-static.ts +88 -0
  749. package/src/core/network/requests-toasting.ts +91 -0
  750. package/src/core/network/requests.ts +24 -0
  751. package/src/core/network/resolve.ts +17 -0
  752. package/src/core/network/types.ts +188 -0
  753. package/src/core/packages/toast-components.tsx +88 -0
  754. package/src/core/packages/useInstallPackage.ts +46 -0
  755. package/src/core/rtc/state.ts +20 -0
  756. package/src/core/run-app.tsx +69 -0
  757. package/src/core/runtime/__tests__/config.test.ts +173 -0
  758. package/src/core/runtime/__tests__/createWsUrl.test.ts +61 -0
  759. package/src/core/runtime/__tests__/runtime.test.ts +603 -0
  760. package/src/core/runtime/config.ts +49 -0
  761. package/src/core/runtime/runtime.ts +277 -0
  762. package/src/core/runtime/types.ts +7 -0
  763. package/src/core/runtime/utils.ts +9 -0
  764. package/src/core/saving/file-state.ts +15 -0
  765. package/src/core/saving/filename.ts +55 -0
  766. package/src/core/saving/save-component.tsx +274 -0
  767. package/src/core/saving/state.ts +51 -0
  768. package/src/core/saving/useAutoSave.ts +68 -0
  769. package/src/core/secrets/request-registry.ts +16 -0
  770. package/src/core/slots/slots.ts +9 -0
  771. package/src/core/state/__tests__/jotai.test.ts +25 -0
  772. package/src/core/state/jotai.ts +69 -0
  773. package/src/core/state/observable.ts +23 -0
  774. package/src/core/static/__tests__/download-html.test.ts +41 -0
  775. package/src/core/static/__tests__/files.test.ts +494 -0
  776. package/src/core/static/__tests__/virtual-file-tracker.test.ts +92 -0
  777. package/src/core/static/download-html.ts +59 -0
  778. package/src/core/static/files.ts +150 -0
  779. package/src/core/static/static-state.ts +19 -0
  780. package/src/core/static/types.ts +8 -0
  781. package/src/core/static/virtual-file-tracker.ts +83 -0
  782. package/src/core/variables/__tests__/state.test.ts +148 -0
  783. package/src/core/variables/state.ts +81 -0
  784. package/src/core/variables/types.ts +22 -0
  785. package/src/core/vscode/vscode-bindings.ts +176 -0
  786. package/src/core/wasm/PyodideLoader.tsx +72 -0
  787. package/src/core/wasm/__tests__/router.test.ts +57 -0
  788. package/src/core/wasm/__tests__/share.test.ts +35 -0
  789. package/src/core/wasm/__tests__/state.test.ts +124 -0
  790. package/src/core/wasm/__tests__/store.test.ts +55 -0
  791. package/src/core/wasm/bridge.ts +622 -0
  792. package/src/core/wasm/router.ts +39 -0
  793. package/src/core/wasm/rpc.ts +32 -0
  794. package/src/core/wasm/share.ts +15 -0
  795. package/src/core/wasm/state.ts +21 -0
  796. package/src/core/wasm/store.ts +122 -0
  797. package/src/core/wasm/utils.ts +12 -0
  798. package/src/core/wasm/worker/bootstrap.ts +223 -0
  799. package/src/core/wasm/worker/constants.ts +2 -0
  800. package/src/core/wasm/worker/fs.ts +90 -0
  801. package/src/core/wasm/worker/getController.ts +16 -0
  802. package/src/core/wasm/worker/getFS.ts +9 -0
  803. package/src/core/wasm/worker/getMarimoWheel.ts +15 -0
  804. package/src/core/wasm/worker/getPyodideVersion.ts +10 -0
  805. package/src/core/wasm/worker/message-buffer.ts +32 -0
  806. package/src/core/wasm/worker/save-worker.ts +107 -0
  807. package/src/core/wasm/worker/tracer.ts +7 -0
  808. package/src/core/wasm/worker/types.ts +97 -0
  809. package/src/core/wasm/worker/worker.ts +375 -0
  810. package/src/core/websocket/StaticWebsocket.ts +61 -0
  811. package/src/core/websocket/connection-utils.ts +59 -0
  812. package/src/core/websocket/types.ts +43 -0
  813. package/src/core/websocket/useMarimoWebSocket.tsx +386 -0
  814. package/src/core/websocket/useWebSocket.tsx +88 -0
  815. package/src/css/admonition.css +127 -0
  816. package/src/css/app/App.css +77 -0
  817. package/src/css/app/Cell.css +433 -0
  818. package/src/css/app/Header.css +25 -0
  819. package/src/css/app/codemirror-completions.css +308 -0
  820. package/src/css/app/codemirror.css +136 -0
  821. package/src/css/app/fonts.css +50 -0
  822. package/src/css/app/print.css +86 -0
  823. package/src/css/app/reset.css +18 -0
  824. package/src/css/codehilite.css +354 -0
  825. package/src/css/common.css +45 -0
  826. package/src/css/globals.css +176 -0
  827. package/src/css/index.css +10 -0
  828. package/src/css/katex-fonts.css +214 -0
  829. package/src/css/katex.min.css +1183 -0
  830. package/src/css/md-tooltip.css +52 -0
  831. package/src/css/md.css +365 -0
  832. package/src/css/progress.css +93 -0
  833. package/src/css/table.css +45 -0
  834. package/src/custom.d.ts +24 -0
  835. package/src/fonts/Fira_Mono/FiraMono-Bold.ttf +0 -0
  836. package/src/fonts/Fira_Mono/FiraMono-Medium.ttf +0 -0
  837. package/src/fonts/Fira_Mono/FiraMono-Regular.ttf +0 -0
  838. package/src/fonts/KaTeX/KaTeX_AMS-Regular.ttf +0 -0
  839. package/src/fonts/KaTeX/KaTeX_AMS-Regular.woff +0 -0
  840. package/src/fonts/KaTeX/KaTeX_AMS-Regular.woff2 +0 -0
  841. package/src/fonts/KaTeX/KaTeX_Caligraphic-Bold.ttf +0 -0
  842. package/src/fonts/KaTeX/KaTeX_Caligraphic-Bold.woff +0 -0
  843. package/src/fonts/KaTeX/KaTeX_Caligraphic-Bold.woff2 +0 -0
  844. package/src/fonts/KaTeX/KaTeX_Caligraphic-Regular.ttf +0 -0
  845. package/src/fonts/KaTeX/KaTeX_Caligraphic-Regular.woff +0 -0
  846. package/src/fonts/KaTeX/KaTeX_Caligraphic-Regular.woff2 +0 -0
  847. package/src/fonts/KaTeX/KaTeX_Fraktur-Bold.ttf +0 -0
  848. package/src/fonts/KaTeX/KaTeX_Fraktur-Bold.woff +0 -0
  849. package/src/fonts/KaTeX/KaTeX_Fraktur-Bold.woff2 +0 -0
  850. package/src/fonts/KaTeX/KaTeX_Fraktur-Regular.ttf +0 -0
  851. package/src/fonts/KaTeX/KaTeX_Fraktur-Regular.woff +0 -0
  852. package/src/fonts/KaTeX/KaTeX_Fraktur-Regular.woff2 +0 -0
  853. package/src/fonts/KaTeX/KaTeX_Main-Bold.ttf +0 -0
  854. package/src/fonts/KaTeX/KaTeX_Main-Bold.woff +0 -0
  855. package/src/fonts/KaTeX/KaTeX_Main-Bold.woff2 +0 -0
  856. package/src/fonts/KaTeX/KaTeX_Main-BoldItalic.ttf +0 -0
  857. package/src/fonts/KaTeX/KaTeX_Main-BoldItalic.woff +0 -0
  858. package/src/fonts/KaTeX/KaTeX_Main-BoldItalic.woff2 +0 -0
  859. package/src/fonts/KaTeX/KaTeX_Main-Italic.ttf +0 -0
  860. package/src/fonts/KaTeX/KaTeX_Main-Italic.woff +0 -0
  861. package/src/fonts/KaTeX/KaTeX_Main-Italic.woff2 +0 -0
  862. package/src/fonts/KaTeX/KaTeX_Main-Regular.ttf +0 -0
  863. package/src/fonts/KaTeX/KaTeX_Main-Regular.woff +0 -0
  864. package/src/fonts/KaTeX/KaTeX_Main-Regular.woff2 +0 -0
  865. package/src/fonts/KaTeX/KaTeX_Math-BoldItalic.ttf +0 -0
  866. package/src/fonts/KaTeX/KaTeX_Math-BoldItalic.woff +0 -0
  867. package/src/fonts/KaTeX/KaTeX_Math-BoldItalic.woff2 +0 -0
  868. package/src/fonts/KaTeX/KaTeX_Math-Italic.ttf +0 -0
  869. package/src/fonts/KaTeX/KaTeX_Math-Italic.woff +0 -0
  870. package/src/fonts/KaTeX/KaTeX_Math-Italic.woff2 +0 -0
  871. package/src/fonts/KaTeX/KaTeX_SansSerif-Bold.ttf +0 -0
  872. package/src/fonts/KaTeX/KaTeX_SansSerif-Bold.woff +0 -0
  873. package/src/fonts/KaTeX/KaTeX_SansSerif-Bold.woff2 +0 -0
  874. package/src/fonts/KaTeX/KaTeX_SansSerif-Italic.ttf +0 -0
  875. package/src/fonts/KaTeX/KaTeX_SansSerif-Italic.woff +0 -0
  876. package/src/fonts/KaTeX/KaTeX_SansSerif-Italic.woff2 +0 -0
  877. package/src/fonts/KaTeX/KaTeX_SansSerif-Regular.ttf +0 -0
  878. package/src/fonts/KaTeX/KaTeX_SansSerif-Regular.woff +0 -0
  879. package/src/fonts/KaTeX/KaTeX_SansSerif-Regular.woff2 +0 -0
  880. package/src/fonts/KaTeX/KaTeX_Script-Regular.ttf +0 -0
  881. package/src/fonts/KaTeX/KaTeX_Script-Regular.woff +0 -0
  882. package/src/fonts/KaTeX/KaTeX_Script-Regular.woff2 +0 -0
  883. package/src/fonts/KaTeX/KaTeX_Size1-Regular.ttf +0 -0
  884. package/src/fonts/KaTeX/KaTeX_Size1-Regular.woff +0 -0
  885. package/src/fonts/KaTeX/KaTeX_Size1-Regular.woff2 +0 -0
  886. package/src/fonts/KaTeX/KaTeX_Size2-Regular.ttf +0 -0
  887. package/src/fonts/KaTeX/KaTeX_Size2-Regular.woff +0 -0
  888. package/src/fonts/KaTeX/KaTeX_Size2-Regular.woff2 +0 -0
  889. package/src/fonts/KaTeX/KaTeX_Size3-Regular.ttf +0 -0
  890. package/src/fonts/KaTeX/KaTeX_Size3-Regular.woff +0 -0
  891. package/src/fonts/KaTeX/KaTeX_Size3-Regular.woff2 +0 -0
  892. package/src/fonts/KaTeX/KaTeX_Size4-Regular.ttf +0 -0
  893. package/src/fonts/KaTeX/KaTeX_Size4-Regular.woff +0 -0
  894. package/src/fonts/KaTeX/KaTeX_Size4-Regular.woff2 +0 -0
  895. package/src/fonts/KaTeX/KaTeX_Typewriter-Regular.ttf +0 -0
  896. package/src/fonts/KaTeX/KaTeX_Typewriter-Regular.woff +0 -0
  897. package/src/fonts/KaTeX/KaTeX_Typewriter-Regular.woff2 +0 -0
  898. package/src/fonts/Lora/Lora-Italic-VariableFont_wght.ttf +0 -0
  899. package/src/fonts/Lora/Lora-VariableFont_wght.ttf +0 -0
  900. package/src/fonts/Lora/static/Lora-Bold.ttf +0 -0
  901. package/src/fonts/Lora/static/Lora-BoldItalic.ttf +0 -0
  902. package/src/fonts/Lora/static/Lora-Italic.ttf +0 -0
  903. package/src/fonts/Lora/static/Lora-Medium.ttf +0 -0
  904. package/src/fonts/Lora/static/Lora-MediumItalic.ttf +0 -0
  905. package/src/fonts/Lora/static/Lora-Regular.ttf +0 -0
  906. package/src/fonts/Lora/static/Lora-SemiBold.ttf +0 -0
  907. package/src/fonts/Lora/static/Lora-SemiBoldItalic.ttf +0 -0
  908. package/src/fonts/PT_Sans/PTSans-Bold.ttf +0 -0
  909. package/src/fonts/PT_Sans/PTSans-BoldItalic.ttf +0 -0
  910. package/src/fonts/PT_Sans/PTSans-Italic.ttf +0 -0
  911. package/src/fonts/PT_Sans/PTSans-Regular.ttf +0 -0
  912. package/src/hooks/__tests__/useBoolean.test.tsx +33 -0
  913. package/src/hooks/__tests__/useDebounce.test.tsx +182 -0
  914. package/src/hooks/__tests__/useEffectSkipFirstRender.test.tsx +42 -0
  915. package/src/hooks/__tests__/useEventListener.test.tsx +148 -0
  916. package/src/hooks/__tests__/useInternalStateWithSync.test.tsx +76 -0
  917. package/src/hooks/__tests__/useInterval.test.tsx +70 -0
  918. package/src/hooks/__tests__/usePackageMetadata.test.tsx +219 -0
  919. package/src/hooks/__tests__/useResizeHandle.test.tsx +240 -0
  920. package/src/hooks/__tests__/useResizeObserver.test.tsx +86 -0
  921. package/src/hooks/__tests__/useTimer.test.tsx +62 -0
  922. package/src/hooks/debug.ts +116 -0
  923. package/src/hooks/useAsyncData.ts +392 -0
  924. package/src/hooks/useAudioRecorder.ts +89 -0
  925. package/src/hooks/useAutoGrowInputProps.ts +56 -0
  926. package/src/hooks/useBoolean.ts +26 -0
  927. package/src/hooks/useCellRenderCount.ts +15 -0
  928. package/src/hooks/useDebounce.ts +95 -0
  929. package/src/hooks/useDeepCompareMemoize.ts +22 -0
  930. package/src/hooks/useEffectSkipFirstRender.ts +24 -0
  931. package/src/hooks/useElapsedTime.ts +25 -0
  932. package/src/hooks/useEvent.ts +2 -0
  933. package/src/hooks/useEventListener.ts +68 -0
  934. package/src/hooks/useHotkey.ts +77 -0
  935. package/src/hooks/useInternalStateWithSync.ts +26 -0
  936. package/src/hooks/useInterval.ts +49 -0
  937. package/src/hooks/useIsDragging.tsx +39 -0
  938. package/src/hooks/useLifecycle.ts +20 -0
  939. package/src/hooks/useLocalStorage.ts +22 -0
  940. package/src/hooks/useNonce.ts +9 -0
  941. package/src/hooks/usePackageMetadata.ts +52 -0
  942. package/src/hooks/useRecentCommands.ts +25 -0
  943. package/src/hooks/useResizeHandle.ts +110 -0
  944. package/src/hooks/useResizeObserver.ts +101 -0
  945. package/src/hooks/useScript.ts +90 -0
  946. package/src/hooks/useSelectAllContent.ts +42 -0
  947. package/src/hooks/useTimer.ts +48 -0
  948. package/src/main.tsx +20 -0
  949. package/src/mount.tsx +331 -0
  950. package/src/plugins/core/BadPlugin.tsx +72 -0
  951. package/src/plugins/core/RenderHTML.tsx +136 -0
  952. package/src/plugins/core/__test__/RenderHTML.test.ts +146 -0
  953. package/src/plugins/core/builder.ts +59 -0
  954. package/src/plugins/core/registerReactComponent.tsx +535 -0
  955. package/src/plugins/core/rpc.ts +55 -0
  956. package/src/plugins/core/sidebar-element.tsx +104 -0
  957. package/src/plugins/impl/ButtonPlugin.tsx +95 -0
  958. package/src/plugins/impl/CheckboxPlugin.tsx +56 -0
  959. package/src/plugins/impl/CodeEditorPlugin.tsx +119 -0
  960. package/src/plugins/impl/DataEditorPlugin.tsx +181 -0
  961. package/src/plugins/impl/DataTablePlugin.tsx +948 -0
  962. package/src/plugins/impl/DatePickerPlugin.tsx +74 -0
  963. package/src/plugins/impl/DateRangePlugin.tsx +82 -0
  964. package/src/plugins/impl/DateTimePickerPlugin.tsx +76 -0
  965. package/src/plugins/impl/DictPlugin.tsx +80 -0
  966. package/src/plugins/impl/DropdownPlugin.tsx +102 -0
  967. package/src/plugins/impl/FileBrowserPlugin.tsx +500 -0
  968. package/src/plugins/impl/FileUploadPlugin.tsx +302 -0
  969. package/src/plugins/impl/FormPlugin.tsx +294 -0
  970. package/src/plugins/impl/MicrophonePlugin.tsx +58 -0
  971. package/src/plugins/impl/MultiselectPlugin.tsx +207 -0
  972. package/src/plugins/impl/NumberPlugin.tsx +84 -0
  973. package/src/plugins/impl/RadioPlugin.tsx +77 -0
  974. package/src/plugins/impl/RangeSliderPlugin.tsx +163 -0
  975. package/src/plugins/impl/RefreshPlugin.tsx +158 -0
  976. package/src/plugins/impl/SearchableSelect.tsx +122 -0
  977. package/src/plugins/impl/SliderPlugin.tsx +166 -0
  978. package/src/plugins/impl/SwitchPlugin.tsx +48 -0
  979. package/src/plugins/impl/TabsPlugin.tsx +83 -0
  980. package/src/plugins/impl/TextAreaPlugin.tsx +131 -0
  981. package/src/plugins/impl/TextInputPlugin.tsx +169 -0
  982. package/src/plugins/impl/__tests__/DateTimePickerPlugin.test.tsx +45 -0
  983. package/src/plugins/impl/__tests__/DropdownPlugin.test.tsx +178 -0
  984. package/src/plugins/impl/__tests__/MultiSelectPlugin.test.ts +41 -0
  985. package/src/plugins/impl/__tests__/NumberPlugin.test.tsx +144 -0
  986. package/src/plugins/impl/anywidget/AnyWidgetPlugin.tsx +269 -0
  987. package/src/plugins/impl/anywidget/__tests__/AnyWidgetPlugin.test.tsx +181 -0
  988. package/src/plugins/impl/anywidget/__tests__/model.test.ts +370 -0
  989. package/src/plugins/impl/anywidget/model.ts +314 -0
  990. package/src/plugins/impl/chat/ChatPlugin.tsx +98 -0
  991. package/src/plugins/impl/chat/chat-ui.tsx +713 -0
  992. package/src/plugins/impl/chat/types.ts +39 -0
  993. package/src/plugins/impl/code/LazyAnyLanguageCodeMirror.tsx +6 -0
  994. package/src/plugins/impl/code/any-language-editor.tsx +68 -0
  995. package/src/plugins/impl/common/error-banner.tsx +111 -0
  996. package/src/plugins/impl/common/intent.ts +18 -0
  997. package/src/plugins/impl/common/labeled.tsx +69 -0
  998. package/src/plugins/impl/data-editor/__tests__/data-utils.test.ts +876 -0
  999. package/src/plugins/impl/data-editor/__tests__/glide-utils.test.ts +452 -0
  1000. package/src/plugins/impl/data-editor/components.tsx +179 -0
  1001. package/src/plugins/impl/data-editor/data-utils.ts +123 -0
  1002. package/src/plugins/impl/data-editor/glide-data-editor.tsx +651 -0
  1003. package/src/plugins/impl/data-editor/glide-utils.ts +200 -0
  1004. package/src/plugins/impl/data-editor/themes.ts +49 -0
  1005. package/src/plugins/impl/data-editor/types.ts +44 -0
  1006. package/src/plugins/impl/data-explorer/ConnectedDataExplorerComponent.tsx +268 -0
  1007. package/src/plugins/impl/data-explorer/DataExplorerPlugin.tsx +31 -0
  1008. package/src/plugins/impl/data-explorer/components/column-summary.tsx +174 -0
  1009. package/src/plugins/impl/data-explorer/components/icons.tsx +30 -0
  1010. package/src/plugins/impl/data-explorer/components/query-form.tsx +296 -0
  1011. package/src/plugins/impl/data-explorer/encoding.ts +107 -0
  1012. package/src/plugins/impl/data-explorer/functions/function.ts +83 -0
  1013. package/src/plugins/impl/data-explorer/functions/types.ts +32 -0
  1014. package/src/plugins/impl/data-explorer/marks.ts +21 -0
  1015. package/src/plugins/impl/data-explorer/queries/field-suggestion.ts +65 -0
  1016. package/src/plugins/impl/data-explorer/queries/histograms.ts +41 -0
  1017. package/src/plugins/impl/data-explorer/queries/queries.ts +204 -0
  1018. package/src/plugins/impl/data-explorer/queries/removeUndefined.ts +11 -0
  1019. package/src/plugins/impl/data-explorer/queries/types.ts +54 -0
  1020. package/src/plugins/impl/data-explorer/queries/utils.ts +85 -0
  1021. package/src/plugins/impl/data-explorer/spec.ts +28 -0
  1022. package/src/plugins/impl/data-explorer/state/reducer.ts +92 -0
  1023. package/src/plugins/impl/data-explorer/state/types.ts +28 -0
  1024. package/src/plugins/impl/data-frames/DataFramePlugin.tsx +303 -0
  1025. package/src/plugins/impl/data-frames/forms/__tests__/__snapshots__/form.test.tsx.snap +1600 -0
  1026. package/src/plugins/impl/data-frames/forms/__tests__/form.test.tsx +67 -0
  1027. package/src/plugins/impl/data-frames/forms/context.ts +13 -0
  1028. package/src/plugins/impl/data-frames/forms/datatype-icon.tsx +43 -0
  1029. package/src/plugins/impl/data-frames/forms/renderers.tsx +518 -0
  1030. package/src/plugins/impl/data-frames/panel.tsx +308 -0
  1031. package/src/plugins/impl/data-frames/schema.ts +211 -0
  1032. package/src/plugins/impl/data-frames/types.ts +91 -0
  1033. package/src/plugins/impl/data-frames/utils/__tests__/getUpdatedColumnTypes.test.ts +191 -0
  1034. package/src/plugins/impl/data-frames/utils/__tests__/operators.test.ts +116 -0
  1035. package/src/plugins/impl/data-frames/utils/getUpdatedColumnTypes.ts +67 -0
  1036. package/src/plugins/impl/data-frames/utils/operators.ts +202 -0
  1037. package/src/plugins/impl/image-comparison/ImageComparisonComponent.tsx +39 -0
  1038. package/src/plugins/impl/multiselectFilterFn.tsx +22 -0
  1039. package/src/plugins/impl/panel/PanelPlugin.tsx +266 -0
  1040. package/src/plugins/impl/panel/__tests__/utils.test.ts +119 -0
  1041. package/src/plugins/impl/panel/utils.ts +104 -0
  1042. package/src/plugins/impl/plotly/PlotlyPlugin.tsx +300 -0
  1043. package/src/plugins/impl/plotly/__tests__/parse-from-template.test.ts +73 -0
  1044. package/src/plugins/impl/plotly/mapbox.css +359 -0
  1045. package/src/plugins/impl/plotly/parse-from-template.ts +58 -0
  1046. package/src/plugins/impl/plotly/plotly.css +280 -0
  1047. package/src/plugins/impl/vega/VegaPlugin.tsx +40 -0
  1048. package/src/plugins/impl/vega/__tests__/__snapshots__/make-selectable.test.ts.snap +1210 -0
  1049. package/src/plugins/impl/vega/__tests__/encodings.test.ts +172 -0
  1050. package/src/plugins/impl/vega/__tests__/loader.test.ts +73 -0
  1051. package/src/plugins/impl/vega/__tests__/make-selectable.test.ts +575 -0
  1052. package/src/plugins/impl/vega/__tests__/params.test.ts +52 -0
  1053. package/src/plugins/impl/vega/__tests__/resolve-data.test.ts +236 -0
  1054. package/src/plugins/impl/vega/__tests__/vega.test.ts +603 -0
  1055. package/src/plugins/impl/vega/batched.ts +41 -0
  1056. package/src/plugins/impl/vega/encodings.ts +111 -0
  1057. package/src/plugins/impl/vega/fix-relative-url.ts +15 -0
  1058. package/src/plugins/impl/vega/formats.ts +25 -0
  1059. package/src/plugins/impl/vega/loader.ts +320 -0
  1060. package/src/plugins/impl/vega/make-selectable.ts +248 -0
  1061. package/src/plugins/impl/vega/marks.ts +36 -0
  1062. package/src/plugins/impl/vega/params.ts +192 -0
  1063. package/src/plugins/impl/vega/resolve-data.ts +101 -0
  1064. package/src/plugins/impl/vega/types.ts +32 -0
  1065. package/src/plugins/impl/vega/utils.ts +46 -0
  1066. package/src/plugins/impl/vega/vega-component.tsx +271 -0
  1067. package/src/plugins/impl/vega/vega-loader.ts +53 -0
  1068. package/src/plugins/impl/vega/vega.css +31 -0
  1069. package/src/plugins/layout/AccordionPlugin.tsx +63 -0
  1070. package/src/plugins/layout/CalloutPlugin.tsx +34 -0
  1071. package/src/plugins/layout/DownloadPlugin.tsx +136 -0
  1072. package/src/plugins/layout/ImageComparisonPlugin.tsx +35 -0
  1073. package/src/plugins/layout/JsonOutputPlugin.tsx +47 -0
  1074. package/src/plugins/layout/LazyPlugin.tsx +98 -0
  1075. package/src/plugins/layout/MimeRenderPlugin.tsx +45 -0
  1076. package/src/plugins/layout/NavigationMenuPlugin.tsx +219 -0
  1077. package/src/plugins/layout/ProgressPlugin.tsx +175 -0
  1078. package/src/plugins/layout/RoutesPlugin.tsx +81 -0
  1079. package/src/plugins/layout/StatPlugin.tsx +100 -0
  1080. package/src/plugins/layout/TexPlugin.tsx +102 -0
  1081. package/src/plugins/layout/__test__/ProgressPlugin.test.ts +26 -0
  1082. package/src/plugins/layout/carousel/CarouselPlugin.tsx +48 -0
  1083. package/src/plugins/layout/mermaid/MermaidPlugin.tsx +26 -0
  1084. package/src/plugins/layout/mermaid/mermaid.tsx +94 -0
  1085. package/src/plugins/layout/navigation-menu.css +37 -0
  1086. package/src/plugins/plugins.ts +116 -0
  1087. package/src/plugins/stateless-plugin.ts +29 -0
  1088. package/src/plugins/types.ts +82 -0
  1089. package/src/stories/__fixtures__/vega.ts +225 -0
  1090. package/src/stories/accordion.stories.tsx +100 -0
  1091. package/src/stories/alert-dialog.mdx +42 -0
  1092. package/src/stories/app-chrome.stories.tsx +26 -0
  1093. package/src/stories/button.stories.tsx +90 -0
  1094. package/src/stories/callout.stories.tsx +73 -0
  1095. package/src/stories/cell-status.stories.tsx +145 -0
  1096. package/src/stories/cell.stories.tsx +336 -0
  1097. package/src/stories/checkbox.stories.tsx +44 -0
  1098. package/src/stories/colors.stories.tsx +156 -0
  1099. package/src/stories/combobox.stories.tsx +133 -0
  1100. package/src/stories/context-menu.mdx +23 -0
  1101. package/src/stories/data-explorer.stories.tsx +30 -0
  1102. package/src/stories/data-table.stories.tsx +130 -0
  1103. package/src/stories/dataframe.stories.tsx +46 -0
  1104. package/src/stories/debugger.stories.tsx +34 -0
  1105. package/src/stories/dialog.stories.tsx +80 -0
  1106. package/src/stories/dropdown-menu.mdx +159 -0
  1107. package/src/stories/editor-inputs.stories.tsx +47 -0
  1108. package/src/stories/editor.stories.tsx +91 -0
  1109. package/src/stories/file-upload.stories.tsx +103 -0
  1110. package/src/stories/form-wrapper.stories.tsx +147 -0
  1111. package/src/stories/input.stories.tsx +56 -0
  1112. package/src/stories/label.mdx +9 -0
  1113. package/src/stories/log-viewer.stories.tsx +74 -0
  1114. package/src/stories/number-field.mdx +17 -0
  1115. package/src/stories/number-field.stories.tsx +41 -0
  1116. package/src/stories/progress-component.stories.tsx +74 -0
  1117. package/src/stories/progress.stories.tsx +33 -0
  1118. package/src/stories/radio-group.mdx +54 -0
  1119. package/src/stories/select-native.stories.tsx +49 -0
  1120. package/src/stories/select.stories.tsx +92 -0
  1121. package/src/stories/slider.stories.tsx +27 -0
  1122. package/src/stories/stat.stories.tsx +123 -0
  1123. package/src/stories/switch.mdx +20 -0
  1124. package/src/stories/switchable-multi-select.stories.tsx +31 -0
  1125. package/src/stories/tabs.mdx +59 -0
  1126. package/src/stories/textarea.stories.tsx +58 -0
  1127. package/src/stories/theme.stories.tsx +111 -0
  1128. package/src/stories/tooltip.mdx +32 -0
  1129. package/src/stories/typography.stories.tsx +80 -0
  1130. package/src/stories/variables.stories.tsx +58 -0
  1131. package/src/stories/vega.stories.tsx +57 -0
  1132. package/src/theme/ThemeProvider.tsx +32 -0
  1133. package/src/theme/namespace.tsx +23 -0
  1134. package/src/theme/useTheme.ts +89 -0
  1135. package/src/utils/Deferred.ts +20 -0
  1136. package/src/utils/Logger.ts +91 -0
  1137. package/src/utils/__tests__/Deferred.test.ts +38 -0
  1138. package/src/utils/__tests__/arrays.test.ts +130 -0
  1139. package/src/utils/__tests__/batch-requests.test.ts +60 -0
  1140. package/src/utils/__tests__/blob.test.ts +52 -0
  1141. package/src/utils/__tests__/cell-urls.test.ts +92 -0
  1142. package/src/utils/__tests__/createReducer.test.ts +184 -0
  1143. package/src/utils/__tests__/data-views.test.ts +112 -0
  1144. package/src/utils/__tests__/dates.test.ts +188 -0
  1145. package/src/utils/__tests__/edit-distance.test.ts +302 -0
  1146. package/src/utils/__tests__/errors.test.ts +54 -0
  1147. package/src/utils/__tests__/filenames.test.ts +30 -0
  1148. package/src/utils/__tests__/id-tree.test.ts +1994 -0
  1149. package/src/utils/__tests__/json-parser.test.ts +79 -0
  1150. package/src/utils/__tests__/local-storage.test.ts +77 -0
  1151. package/src/utils/__tests__/lru.test.ts +74 -0
  1152. package/src/utils/__tests__/maps.test.ts +91 -0
  1153. package/src/utils/__tests__/math.test.ts +29 -0
  1154. package/src/utils/__tests__/multi-map.test.ts +295 -0
  1155. package/src/utils/__tests__/numbers.test.ts +76 -0
  1156. package/src/utils/__tests__/path.test.ts +170 -0
  1157. package/src/utils/__tests__/pluralize.test.ts +47 -0
  1158. package/src/utils/__tests__/routes.test.ts +134 -0
  1159. package/src/utils/__tests__/sets.test.ts +41 -0
  1160. package/src/utils/__tests__/shallow-compare.test.ts +55 -0
  1161. package/src/utils/__tests__/strings.test.ts +68 -0
  1162. package/src/utils/__tests__/time.test.ts +61 -0
  1163. package/src/utils/__tests__/timed-cache.test.ts +142 -0
  1164. package/src/utils/__tests__/timeout.test.ts +153 -0
  1165. package/src/utils/__tests__/traceback.test.ts +34 -0
  1166. package/src/utils/__tests__/url.test.ts +100 -0
  1167. package/src/utils/__tests__/urls.test.ts +10 -0
  1168. package/src/utils/__tests__/versions.test.ts +63 -0
  1169. package/src/utils/__tests__/waitForWs.test.ts +76 -0
  1170. package/src/utils/arrays.ts +75 -0
  1171. package/src/utils/assertExists.ts +12 -0
  1172. package/src/utils/assertNever.ts +20 -0
  1173. package/src/utils/batch-requests.ts +28 -0
  1174. package/src/utils/blob.ts +45 -0
  1175. package/src/utils/cell-urls.ts +31 -0
  1176. package/src/utils/cn.ts +8 -0
  1177. package/src/utils/copy.ts +17 -0
  1178. package/src/utils/createReducer.ts +137 -0
  1179. package/src/utils/data-views.ts +54 -0
  1180. package/src/utils/dates.ts +145 -0
  1181. package/src/utils/dereference.ts +10 -0
  1182. package/src/utils/download.ts +47 -0
  1183. package/src/utils/edit-distance.ts +141 -0
  1184. package/src/utils/errors.ts +63 -0
  1185. package/src/utils/events.ts +85 -0
  1186. package/src/utils/fileToBase64.ts +30 -0
  1187. package/src/utils/filenames.ts +29 -0
  1188. package/src/utils/functions.ts +24 -0
  1189. package/src/utils/id-tree.tsx +1032 -0
  1190. package/src/utils/idle.ts +19 -0
  1191. package/src/utils/invariant.ts +37 -0
  1192. package/src/utils/json/__tests__/base64.test.ts +100 -0
  1193. package/src/utils/json/base64.ts +51 -0
  1194. package/src/utils/json/json-parser.ts +65 -0
  1195. package/src/utils/lazy.ts +30 -0
  1196. package/src/utils/links.ts +11 -0
  1197. package/src/utils/localStorage.ts +132 -0
  1198. package/src/utils/lru.ts +68 -0
  1199. package/src/utils/maps.ts +65 -0
  1200. package/src/utils/math.ts +6 -0
  1201. package/src/utils/mergeRefs.ts +14 -0
  1202. package/src/utils/multi-map.ts +71 -0
  1203. package/src/utils/numbers.ts +124 -0
  1204. package/src/utils/objects.ts +105 -0
  1205. package/src/utils/once.ts +17 -0
  1206. package/src/utils/pathUtils.test.ts +113 -0
  1207. package/src/utils/pathUtils.ts +76 -0
  1208. package/src/utils/paths.ts +67 -0
  1209. package/src/utils/pluralize.ts +35 -0
  1210. package/src/utils/python-poet/__tests__/poet.test.ts +286 -0
  1211. package/src/utils/python-poet/poet.ts +196 -0
  1212. package/src/utils/reload-safe.ts +15 -0
  1213. package/src/utils/repl.ts +23 -0
  1214. package/src/utils/routes.ts +36 -0
  1215. package/src/utils/scroll.ts +38 -0
  1216. package/src/utils/sets.ts +30 -0
  1217. package/src/utils/shallow-compare.ts +30 -0
  1218. package/src/utils/staticImplements.ts +7 -0
  1219. package/src/utils/strings.ts +64 -0
  1220. package/src/utils/time.ts +39 -0
  1221. package/src/utils/timed-cache.ts +52 -0
  1222. package/src/utils/timeout.ts +42 -0
  1223. package/src/utils/traceback.ts +104 -0
  1224. package/src/utils/tracer.ts +106 -0
  1225. package/src/utils/typed.ts +17 -0
  1226. package/src/utils/url.ts +12 -0
  1227. package/src/utils/urls.ts +33 -0
  1228. package/src/utils/uuid.ts +8 -0
  1229. package/src/utils/versions.ts +66 -0
  1230. package/src/utils/vitals.ts +30 -0
  1231. package/src/utils/waitForWs.ts +31 -0
  1232. package/dist/diagram-5UYTHUR4-CHaQuLxe.js +0 -137
  1233. package/dist/pieDiagram-NIOCPIFQ-B2HPuDbO.js +0 -162
@@ -1,24 +1,24 @@
1
1
  var _a, _b;
2
- import { g as oe } from "./chunk-E2GYISFI-m0FySePo.js";
3
- import { _ as d, G as rt, d as O, e as he, l as L, z as de, B as ge, c as R, a3 as ue, Q as pe, a4 as j, a5 as Wt, a6 as fe, u as $, k as xe, a7 as ye, a8 as xt, a9 as be, i as Tt } from "./mermaid-CLsxmXkQ.js";
4
- import { c as we } from "./clone-_N6EM6Op.js";
5
- import { G as me } from "./graph-CYaaS8YP.js";
6
- import { c as Le } from "./channel-Bcgertj0.js";
2
+ import { g as oe } from "./chunk-GLLZNHP4-BQrm-sfi.js";
3
+ import { _ as d, G as rt, d as O, e as he, l as L, z as de, B as ge, c as R, a3 as ue, Q as pe, a4 as j, a5 as Wt, a6 as fe, u as $, k as xe, a7 as ye, a8 as xt, i as yt, a9 as be } from "./mermaid-CTBiBoaH.js";
4
+ import { c as we } from "./clone-dxPIOZ-r.js";
5
+ import { G as me } from "./graph-CufF5hzB.js";
6
+ import { c as Le } from "./channel-C6r9bPk3.js";
7
7
  import { l as Se, k as ke } from "./timer-BYwnU4DF.js";
8
- var yt = function() {
8
+ var bt = function() {
9
9
  var e = /* @__PURE__ */ d(function(D, y, g, f) {
10
10
  for (g = g || {}, f = D.length; f--; g[D[f]] = y) ;
11
11
  return g;
12
- }, "o"), t = [1, 7], s = [1, 13], n = [1, 14], i = [1, 15], a = [1, 19], r = [1, 16], l = [1, 17], c = [1, 18], u = [8, 30], h = [8, 21, 28, 29, 30, 31, 32, 40, 44, 47], x = [1, 23], w = [1, 24], b = [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], k = {
12
+ }, "o"), t = [1, 15], a = [1, 7], i = [1, 13], l = [1, 14], s = [1, 19], r = [1, 16], n = [1, 17], c = [1, 18], u = [8, 30], o = [8, 10, 21, 28, 29, 30, 31, 39, 43, 46], x = [1, 23], w = [1, 24], b = [8, 10, 15, 16, 21, 28, 29, 30, 31, 39, 43, 46], S = [8, 10, 15, 16, 21, 27, 28, 29, 30, 31, 39, 43, 46], v = [1, 49], k = {
13
13
  trace: /* @__PURE__ */ d(function() {
14
14
  }, "trace"),
15
15
  yy: {},
16
- 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 },
17
- 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" },
18
- 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]],
19
- performAction: /* @__PURE__ */ d(function(y, g, f, m, v, o, W) {
20
- var p = o.length - 1;
21
- switch (v) {
16
+ 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, NODE_ID: 31, nodeShapeNLabel: 32, dirList: 33, DIR: 34, NODE_DSTART: 35, NODE_DEND: 36, BLOCK_ARROW_START: 37, BLOCK_ARROW_END: 38, classDef: 39, CLASSDEF_ID: 40, CLASSDEF_STYLEOPTS: 41, DEFAULT: 42, class: 43, CLASSENTITY_IDS: 44, STYLECLASS: 45, style: 46, STYLE_ENTITY_IDS: 47, STYLE_DEFINITION_DATA: 48, $accept: 0, $end: 1 },
17
+ 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: "NODE_ID", 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" },
18
+ 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], [33, 1], [33, 2], [32, 3], [32, 4], [23, 3], [23, 3], [24, 3], [25, 3]],
19
+ performAction: /* @__PURE__ */ d(function(y, g, f, m, E, h, W) {
20
+ var p = h.length - 1;
21
+ switch (E) {
22
22
  case 4:
23
23
  m.getLogger().debug("Rule: separator (NL) ");
24
24
  break;
@@ -29,7 +29,7 @@ var yt = function() {
29
29
  m.getLogger().debug("Rule: separator (EOF) ");
30
30
  break;
31
31
  case 7:
32
- m.getLogger().debug("Rule: hierarchy: ", o[p - 1]), m.setHierarchy(o[p - 1]);
32
+ m.getLogger().debug("Rule: hierarchy: ", h[p - 1]), m.setHierarchy(h[p - 1]);
33
33
  break;
34
34
  case 8:
35
35
  m.getLogger().debug("Stop NL ");
@@ -44,78 +44,78 @@ var yt = function() {
44
44
  m.getLogger().debug("Stop EOF2 ");
45
45
  break;
46
46
  case 12:
47
- m.getLogger().debug("Rule: statement: ", o[p]), typeof o[p].length == "number" ? this.$ = o[p] : this.$ = [o[p]];
47
+ m.getLogger().debug("Rule: statement: ", h[p]), typeof h[p].length == "number" ? this.$ = h[p] : this.$ = [h[p]];
48
48
  break;
49
49
  case 13:
50
- m.getLogger().debug("Rule: statement #2: ", o[p - 1]), this.$ = [o[p - 1]].concat(o[p]);
50
+ m.getLogger().debug("Rule: statement #2: ", h[p - 1]), this.$ = [h[p - 1]].concat(h[p]);
51
51
  break;
52
52
  case 14:
53
- m.getLogger().debug("Rule: link: ", o[p], y), this.$ = { edgeTypeStr: o[p], label: "" };
53
+ m.getLogger().debug("Rule: link: ", h[p], y), this.$ = { edgeTypeStr: h[p], label: "" };
54
54
  break;
55
55
  case 15:
56
- m.getLogger().debug("Rule: LABEL link: ", o[p - 3], o[p - 1], o[p]), this.$ = { edgeTypeStr: o[p], label: o[p - 1] };
56
+ m.getLogger().debug("Rule: LABEL link: ", h[p - 3], h[p - 1], h[p]), this.$ = { edgeTypeStr: h[p], label: h[p - 1] };
57
57
  break;
58
58
  case 18:
59
- const I = parseInt(o[p]), Z = m.generateId();
59
+ const I = parseInt(h[p]), Z = m.generateId();
60
60
  this.$ = { id: Z, type: "space", label: "", width: I, children: [] };
61
61
  break;
62
62
  case 23:
63
- m.getLogger().debug("Rule: (nodeStatement link node) ", o[p - 2], o[p - 1], o[p], " typestr: ", o[p - 1].edgeTypeStr);
64
- const V = m.edgeStrToEdgeData(o[p - 1].edgeTypeStr);
63
+ m.getLogger().debug("Rule: (nodeStatement link node) ", h[p - 2], h[p - 1], h[p], " typestr: ", h[p - 1].edgeTypeStr);
64
+ const V = m.edgeStrToEdgeData(h[p - 1].edgeTypeStr);
65
65
  this.$ = [
66
- { id: o[p - 2].id, label: o[p - 2].label, type: o[p - 2].type, directions: o[p - 2].directions },
67
- { id: o[p - 2].id + "-" + o[p].id, start: o[p - 2].id, end: o[p].id, label: o[p - 1].label, type: "edge", directions: o[p].directions, arrowTypeEnd: V, arrowTypeStart: "arrow_open" },
68
- { id: o[p].id, label: o[p].label, type: m.typeStr2Type(o[p].typeStr), directions: o[p].directions }
66
+ { id: h[p - 2].id, label: h[p - 2].label, type: h[p - 2].type, directions: h[p - 2].directions },
67
+ { id: h[p - 2].id + "-" + h[p].id, start: h[p - 2].id, end: h[p].id, label: h[p - 1].label, type: "edge", directions: h[p].directions, arrowTypeEnd: V, arrowTypeStart: "arrow_open" },
68
+ { id: h[p].id, label: h[p].label, type: m.typeStr2Type(h[p].typeStr), directions: h[p].directions }
69
69
  ];
70
70
  break;
71
71
  case 24:
72
- m.getLogger().debug("Rule: nodeStatement (abc88 node size) ", o[p - 1], o[p]), this.$ = { id: o[p - 1].id, label: o[p - 1].label, type: m.typeStr2Type(o[p - 1].typeStr), directions: o[p - 1].directions, widthInColumns: parseInt(o[p], 10) };
72
+ m.getLogger().debug("Rule: nodeStatement (abc88 node size) ", h[p - 1], h[p]), this.$ = { id: h[p - 1].id, label: h[p - 1].label, type: m.typeStr2Type(h[p - 1].typeStr), directions: h[p - 1].directions, widthInColumns: parseInt(h[p], 10) };
73
73
  break;
74
74
  case 25:
75
- m.getLogger().debug("Rule: nodeStatement (node) ", o[p]), this.$ = { id: o[p].id, label: o[p].label, type: m.typeStr2Type(o[p].typeStr), directions: o[p].directions, widthInColumns: 1 };
75
+ m.getLogger().debug("Rule: nodeStatement (node) ", h[p]), this.$ = { id: h[p].id, label: h[p].label, type: m.typeStr2Type(h[p].typeStr), directions: h[p].directions, widthInColumns: 1 };
76
76
  break;
77
77
  case 26:
78
- m.getLogger().debug("APA123", this ? this : "na"), m.getLogger().debug("COLUMNS: ", o[p]), this.$ = { type: "column-setting", columns: o[p] === "auto" ? -1 : parseInt(o[p]) };
78
+ m.getLogger().debug("APA123", this ? this : "na"), m.getLogger().debug("COLUMNS: ", h[p]), this.$ = { type: "column-setting", columns: h[p] === "auto" ? -1 : parseInt(h[p]) };
79
79
  break;
80
80
  case 27:
81
- m.getLogger().debug("Rule: id-block statement : ", o[p - 2], o[p - 1]), m.generateId(), this.$ = { ...o[p - 2], type: "composite", children: o[p - 1] };
81
+ m.getLogger().debug("Rule: id-block statement : ", h[p - 2], h[p - 1]), m.generateId(), this.$ = { ...h[p - 2], type: "composite", children: h[p - 1] };
82
82
  break;
83
83
  case 28:
84
- m.getLogger().debug("Rule: blockStatement : ", o[p - 2], o[p - 1], o[p]);
84
+ m.getLogger().debug("Rule: blockStatement : ", h[p - 2], h[p - 1], h[p]);
85
85
  const at = m.generateId();
86
- this.$ = { id: at, type: "composite", label: "", children: o[p - 1] };
86
+ this.$ = { id: at, type: "composite", label: "", children: h[p - 1] };
87
87
  break;
88
88
  case 29:
89
- m.getLogger().debug("Rule: node (NODE_ID separator): ", o[p]), this.$ = { id: o[p] };
89
+ m.getLogger().debug("Rule: node (NODE_ID separator): ", h[p]), this.$ = { id: h[p] };
90
90
  break;
91
91
  case 30:
92
- m.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ", o[p - 1], o[p]), this.$ = { id: o[p - 1], label: o[p].label, typeStr: o[p].typeStr, directions: o[p].directions };
92
+ m.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ", h[p - 1], h[p]), this.$ = { id: h[p - 1], label: h[p].label, typeStr: h[p].typeStr, directions: h[p].directions };
93
93
  break;
94
94
  case 31:
95
- m.getLogger().debug("Rule: dirList: ", o[p]), this.$ = [o[p]];
95
+ m.getLogger().debug("Rule: dirList: ", h[p]), this.$ = [h[p]];
96
96
  break;
97
97
  case 32:
98
- m.getLogger().debug("Rule: dirList: ", o[p - 1], o[p]), this.$ = [o[p - 1]].concat(o[p]);
98
+ m.getLogger().debug("Rule: dirList: ", h[p - 1], h[p]), this.$ = [h[p - 1]].concat(h[p]);
99
99
  break;
100
100
  case 33:
101
- m.getLogger().debug("Rule: nodeShapeNLabel: ", o[p - 2], o[p - 1], o[p]), this.$ = { typeStr: o[p - 2] + o[p], label: o[p - 1] };
101
+ m.getLogger().debug("Rule: nodeShapeNLabel: ", h[p - 2], h[p - 1], h[p]), this.$ = { typeStr: h[p - 2] + h[p], label: h[p - 1] };
102
102
  break;
103
103
  case 34:
104
- m.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ", o[p - 3], o[p - 2], " #3:", o[p - 1], o[p]), this.$ = { typeStr: o[p - 3] + o[p], label: o[p - 2], directions: o[p - 1] };
104
+ m.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ", h[p - 3], h[p - 2], " #3:", h[p - 1], h[p]), this.$ = { typeStr: h[p - 3] + h[p], label: h[p - 2], directions: h[p - 1] };
105
105
  break;
106
106
  case 35:
107
107
  case 36:
108
- this.$ = { type: "classDef", id: o[p - 1].trim(), css: o[p].trim() };
108
+ this.$ = { type: "classDef", id: h[p - 1].trim(), css: h[p].trim() };
109
109
  break;
110
110
  case 37:
111
- this.$ = { type: "applyClass", id: o[p - 1].trim(), styleClass: o[p].trim() };
111
+ this.$ = { type: "applyClass", id: h[p - 1].trim(), styleClass: h[p].trim() };
112
112
  break;
113
113
  case 38:
114
- this.$ = { type: "applyStyles", id: o[p - 1].trim(), stylesStr: o[p].trim() };
114
+ this.$ = { type: "applyStyles", id: h[p - 1].trim(), stylesStr: h[p].trim() };
115
115
  break;
116
116
  }
117
117
  }, "anonymous"),
118
- 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: s, 29: n, 31: i, 32: a, 40: r, 44: l, 47: c }, { 8: [1, 20] }, e(u, [2, 12], { 13: 4, 19: 5, 20: 6, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 11: 21, 21: t, 28: s, 29: n, 31: i, 32: a, 40: r, 44: l, 47: c }), e(h, [2, 16], { 14: 22, 15: x, 16: w }), e(h, [2, 17]), e(h, [2, 18]), e(h, [2, 19]), e(h, [2, 20]), e(h, [2, 21]), e(h, [2, 22]), e(b, [2, 25], { 27: [1, 25] }), e(h, [2, 26]), { 19: 26, 26: 12, 32: a }, { 11: 27, 13: 4, 19: 5, 20: 6, 21: t, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: s, 29: n, 31: i, 32: a, 40: r, 44: l, 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(u, [2, 13]), { 26: 35, 32: a }, { 32: [2, 14] }, { 17: [1, 36] }, e(b, [2, 24]), { 11: 37, 13: 4, 14: 22, 15: x, 16: w, 19: 5, 20: 6, 21: t, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: s, 29: n, 31: i, 32: a, 40: r, 44: l, 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(b, [2, 23]), { 18: [1, 45] }, { 30: [1, 46] }, e(h, [2, 28]), e(h, [2, 35]), e(h, [2, 36]), e(h, [2, 37]), e(h, [2, 38]), { 37: [1, 47] }, { 34: 48, 35: E }, { 15: [1, 50] }, e(h, [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] }],
118
+ table: [{ 9: 1, 10: [1, 2] }, { 1: [3] }, { 10: t, 11: 3, 13: 4, 19: 5, 20: 6, 21: a, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: i, 29: l, 31: s, 39: r, 43: n, 46: c }, { 8: [1, 20] }, e(u, [2, 12], { 13: 4, 19: 5, 20: 6, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 11: 21, 10: t, 21: a, 28: i, 29: l, 31: s, 39: r, 43: n, 46: c }), e(o, [2, 16], { 14: 22, 15: x, 16: w }), e(o, [2, 17]), e(o, [2, 18]), e(o, [2, 19]), e(o, [2, 20]), e(o, [2, 21]), e(o, [2, 22]), e(b, [2, 25], { 27: [1, 25] }), e(o, [2, 26]), { 19: 26, 26: 12, 31: s }, { 10: t, 11: 27, 13: 4, 19: 5, 20: 6, 21: a, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: i, 29: l, 31: s, 39: r, 43: n, 46: c }, { 40: [1, 28], 42: [1, 29] }, { 44: [1, 30] }, { 47: [1, 31] }, e(S, [2, 29], { 32: 32, 35: [1, 33], 37: [1, 34] }), { 1: [2, 7] }, e(u, [2, 13]), { 26: 35, 31: s }, { 31: [2, 14] }, { 17: [1, 36] }, e(b, [2, 24]), { 10: t, 11: 37, 13: 4, 14: 22, 15: x, 16: w, 19: 5, 20: 6, 21: a, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: i, 29: l, 31: s, 39: r, 43: n, 46: c }, { 30: [1, 38] }, { 41: [1, 39] }, { 41: [1, 40] }, { 45: [1, 41] }, { 48: [1, 42] }, e(S, [2, 30]), { 18: [1, 43] }, { 18: [1, 44] }, e(b, [2, 23]), { 18: [1, 45] }, { 30: [1, 46] }, e(o, [2, 28]), e(o, [2, 35]), e(o, [2, 36]), e(o, [2, 37]), e(o, [2, 38]), { 36: [1, 47] }, { 33: 48, 34: v }, { 15: [1, 50] }, e(o, [2, 27]), e(S, [2, 33]), { 38: [1, 51] }, { 33: 52, 34: v, 38: [2, 31] }, { 31: [2, 15] }, e(S, [2, 34]), { 38: [2, 32] }],
119
119
  defaultActions: { 20: [2, 7], 23: [2, 14], 50: [2, 15], 52: [2, 32] },
120
120
  parseError: /* @__PURE__ */ d(function(y, g) {
121
121
  if (g.recoverable)
@@ -126,25 +126,25 @@ var yt = function() {
126
126
  }
127
127
  }, "parseError"),
128
128
  parse: /* @__PURE__ */ d(function(y) {
129
- var g = this, f = [0], m = [], v = [null], o = [], W = this.table, p = "", I = 0, Z = 0, V = 2, at = 1, ne = o.slice.call(arguments, 1), z = Object.create(this.lexer), q = { yy: {} };
129
+ var g = this, f = [0], m = [], E = [null], h = [], W = this.table, p = "", I = 0, Z = 0, V = 2, at = 1, ne = h.slice.call(arguments, 1), z = Object.create(this.lexer), q = { yy: {} };
130
130
  for (var gt in this.yy)
131
131
  Object.prototype.hasOwnProperty.call(this.yy, gt) && (q.yy[gt] = this.yy[gt]);
132
132
  z.setInput(y, q.yy), q.yy.lexer = z, q.yy.parser = this, typeof z.yylloc > "u" && (z.yylloc = {});
133
133
  var ut = z.yylloc;
134
- o.push(ut);
134
+ h.push(ut);
135
135
  var le = z.options && z.options.ranges;
136
136
  typeof q.yy.parseError == "function" ? this.parseError = q.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
137
137
  function ce(P) {
138
- f.length = f.length - 2 * P, v.length = v.length - P, o.length = o.length - P;
138
+ f.length = f.length - 2 * P, E.length = E.length - P, h.length = h.length - P;
139
139
  }
140
140
  d(ce, "popStack");
141
- function Dt() {
141
+ function Nt() {
142
142
  var P;
143
143
  return P = m.pop() || z.lex() || at, typeof P != "number" && (P instanceof Array && (m = P, P = m.pop()), P = g.symbols_[P] || P), P;
144
144
  }
145
- d(Dt, "lex");
146
- for (var F, J, H, pt, Q = {}, st, G, Nt, it; ; ) {
147
- if (J = f[f.length - 1], this.defaultActions[J] ? H = this.defaultActions[J] : ((F === null || typeof F > "u") && (F = Dt()), H = W[J] && W[J][F]), typeof H > "u" || !H.length || !H[0]) {
145
+ d(Nt, "lex");
146
+ for (var F, J, H, pt, Q = {}, st, G, Tt, it; ; ) {
147
+ if (J = f[f.length - 1], this.defaultActions[J] ? H = this.defaultActions[J] : ((F === null || typeof F > "u") && (F = Nt()), H = W[J] && W[J][F]), typeof H > "u" || !H.length || !H[0]) {
148
148
  var ft = "";
149
149
  it = [];
150
150
  for (st in W[J])
@@ -163,28 +163,28 @@ Expecting ` + it.join(", ") + ", got '" + (this.terminals_[F] || F) + "'" : ft =
163
163
  throw new Error("Parse Error: multiple actions possible at state: " + J + ", token: " + F);
164
164
  switch (H[0]) {
165
165
  case 1:
166
- f.push(F), v.push(z.yytext), o.push(z.yylloc), f.push(H[1]), F = null, Z = z.yyleng, p = z.yytext, I = z.yylineno, ut = z.yylloc;
166
+ f.push(F), E.push(z.yytext), h.push(z.yylloc), f.push(H[1]), F = null, Z = z.yyleng, p = z.yytext, I = z.yylineno, ut = z.yylloc;
167
167
  break;
168
168
  case 2:
169
- if (G = this.productions_[H[1]][1], Q.$ = v[v.length - G], Q._$ = {
170
- first_line: o[o.length - (G || 1)].first_line,
171
- last_line: o[o.length - 1].last_line,
172
- first_column: o[o.length - (G || 1)].first_column,
173
- last_column: o[o.length - 1].last_column
169
+ if (G = this.productions_[H[1]][1], Q.$ = E[E.length - G], Q._$ = {
170
+ first_line: h[h.length - (G || 1)].first_line,
171
+ last_line: h[h.length - 1].last_line,
172
+ first_column: h[h.length - (G || 1)].first_column,
173
+ last_column: h[h.length - 1].last_column
174
174
  }, le && (Q._$.range = [
175
- o[o.length - (G || 1)].range[0],
176
- o[o.length - 1].range[1]
175
+ h[h.length - (G || 1)].range[0],
176
+ h[h.length - 1].range[1]
177
177
  ]), pt = this.performAction.apply(Q, [
178
178
  p,
179
179
  Z,
180
180
  I,
181
181
  q.yy,
182
182
  H[1],
183
- v,
184
- o
183
+ E,
184
+ h
185
185
  ].concat(ne)), typeof pt < "u")
186
186
  return pt;
187
- G && (f = f.slice(0, -1 * G * 2), v = v.slice(0, -1 * G), o = o.slice(0, -1 * G)), f.push(this.productions_[H[1]][0]), v.push(Q.$), o.push(Q._$), Nt = W[f[f.length - 2]][f[f.length - 1]], f.push(Nt);
187
+ G && (f = f.slice(0, -1 * G * 2), E = E.slice(0, -1 * G), h = h.slice(0, -1 * G)), f.push(this.productions_[H[1]][0]), E.push(Q.$), h.push(Q._$), Tt = W[f[f.length - 2]][f[f.length - 1]], f.push(Tt);
188
188
  break;
189
189
  case 3:
190
190
  return true;
@@ -223,13 +223,13 @@ Expecting ` + it.join(", ") + ", got '" + (this.terminals_[F] || F) + "'" : ft =
223
223
  this._input = y + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - g), this.offset -= g;
224
224
  var m = this.match.split(/(?:\r\n?|\n)/g);
225
225
  this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), f.length - 1 && (this.yylineno -= f.length - 1);
226
- var v = this.yylloc.range;
226
+ var E = this.yylloc.range;
227
227
  return this.yylloc = {
228
228
  first_line: this.yylloc.first_line,
229
229
  last_line: this.yylineno + 1,
230
230
  first_column: this.yylloc.first_column,
231
231
  last_column: f ? (f.length === m.length ? this.yylloc.first_column : 0) + m[m.length - f.length].length - f[0].length : this.yylloc.first_column - g
232
- }, this.options.ranges && (this.yylloc.range = [v[0], v[0] + this.yyleng - g]), this.yyleng = this.yytext.length, this;
232
+ }, this.options.ranges && (this.yylloc.range = [E[0], E[0] + this.yyleng - g]), this.yyleng = this.yytext.length, this;
233
233
  }, "unput"),
234
234
  // When called from action, caches matched text and appends it on next action
235
235
  more: /* @__PURE__ */ d(function() {
@@ -270,8 +270,8 @@ Expecting ` + it.join(", ") + ", got '" + (this.terminals_[F] || F) + "'" : ft =
270
270
  }, "showPosition"),
271
271
  // test the lexed token: return FALSE when not a match, otherwise return token
272
272
  test_match: /* @__PURE__ */ d(function(y, g) {
273
- var f, m, v;
274
- if (this.options.backtrack_lexer && (v = {
273
+ var f, m, E;
274
+ if (this.options.backtrack_lexer && (E = {
275
275
  yylineno: this.yylineno,
276
276
  yylloc: {
277
277
  first_line: this.yylloc.first_line,
@@ -290,7 +290,7 @@ Expecting ` + it.join(", ") + ", got '" + (this.terminals_[F] || F) + "'" : ft =
290
290
  yy: this.yy,
291
291
  conditionStack: this.conditionStack.slice(0),
292
292
  done: this.done
293
- }, this.options.ranges && (v.yylloc.range = this.yylloc.range.slice(0))), m = y[0].match(/(?:\r\n?|\n).*/g), m && (this.yylineno += m.length), this.yylloc = {
293
+ }, this.options.ranges && (E.yylloc.range = this.yylloc.range.slice(0))), m = y[0].match(/(?:\r\n?|\n).*/g), m && (this.yylineno += m.length), this.yylloc = {
294
294
  first_line: this.yylloc.last_line,
295
295
  last_line: this.yylineno + 1,
296
296
  first_column: this.yylloc.last_column,
@@ -298,8 +298,8 @@ Expecting ` + it.join(", ") + ", got '" + (this.terminals_[F] || F) + "'" : ft =
298
298
  }, this.yytext += y[0], this.match += y[0], this.matches = y, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = false, this._backtrack = false, this._input = this._input.slice(y[0].length), this.matched += y[0], f = this.performAction.call(this, this.yy, this, g, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = false), f)
299
299
  return f;
300
300
  if (this._backtrack) {
301
- for (var o in v)
302
- this[o] = v[o];
301
+ for (var h in E)
302
+ this[h] = E[h];
303
303
  return false;
304
304
  }
305
305
  return false;
@@ -311,10 +311,10 @@ Expecting ` + it.join(", ") + ", got '" + (this.terminals_[F] || F) + "'" : ft =
311
311
  this._input || (this.done = true);
312
312
  var y, g, f, m;
313
313
  this._more || (this.yytext = "", this.match = "");
314
- for (var v = this._currentRules(), o = 0; o < v.length; o++)
315
- if (f = this._input.match(this.rules[v[o]]), f && (!g || f[0].length > g[0].length)) {
316
- if (g = f, m = o, this.options.backtrack_lexer) {
317
- if (y = this.test_match(f, v[o]), y !== false)
314
+ for (var E = this._currentRules(), h = 0; h < E.length; h++)
315
+ if (f = this._input.match(this.rules[E[h]]), f && (!g || f[0].length > g[0].length)) {
316
+ if (g = f, m = h, this.options.backtrack_lexer) {
317
+ if (y = this.test_match(f, E[h]), y !== false)
318
318
  return y;
319
319
  if (this._backtrack) {
320
320
  g = false;
@@ -324,7 +324,7 @@ Expecting ` + it.join(", ") + ", got '" + (this.terminals_[F] || F) + "'" : ft =
324
324
  } else if (!this.options.flex)
325
325
  break;
326
326
  }
327
- return g ? (y = this.test_match(g, v[m]), y !== false ? y : false) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
327
+ return g ? (y = this.test_match(g, E[m]), y !== false ? y : false) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
328
328
  ` + this.showPosition(), {
329
329
  text: "",
330
330
  token: null,
@@ -362,240 +362,238 @@ Expecting ` + it.join(", ") + ", got '" + (this.terminals_[F] || F) + "'" : ft =
362
362
  return this.conditionStack.length;
363
363
  }, "stateStackSize"),
364
364
  options: {},
365
- performAction: /* @__PURE__ */ d(function(g, f, m, v) {
365
+ performAction: /* @__PURE__ */ d(function(g, f, m, E) {
366
366
  switch (m) {
367
367
  case 0:
368
- return 10;
368
+ return g.getLogger().debug("Found block-beta"), 10;
369
369
  case 1:
370
- return g.getLogger().debug("Found space-block"), 31;
370
+ return g.getLogger().debug("Found id-block"), 29;
371
371
  case 2:
372
- return g.getLogger().debug("Found nl-block"), 31;
372
+ return g.getLogger().debug("Found block"), 10;
373
373
  case 3:
374
- return g.getLogger().debug("Found space-block"), 29;
375
- case 4:
376
374
  g.getLogger().debug(".", f.yytext);
377
375
  break;
378
- case 5:
376
+ case 4:
379
377
  g.getLogger().debug("_", f.yytext);
380
378
  break;
381
- case 6:
379
+ case 5:
382
380
  return 5;
383
- case 7:
381
+ case 6:
384
382
  return f.yytext = -1, 28;
385
- case 8:
383
+ case 7:
386
384
  return f.yytext = f.yytext.replace(/columns\s+/, ""), g.getLogger().debug("COLUMNS (LEX)", f.yytext), 28;
387
- case 9:
385
+ case 8:
388
386
  this.pushState("md_string");
389
387
  break;
390
- case 10:
388
+ case 9:
391
389
  return "MD_STR";
392
- case 11:
390
+ case 10:
393
391
  this.popState();
394
392
  break;
395
- case 12:
393
+ case 11:
396
394
  this.pushState("string");
397
395
  break;
398
- case 13:
396
+ case 12:
399
397
  g.getLogger().debug("LEX: POPPING STR:", f.yytext), this.popState();
400
398
  break;
401
- case 14:
399
+ case 13:
402
400
  return g.getLogger().debug("LEX: STR end:", f.yytext), "STR";
403
- case 15:
401
+ case 14:
404
402
  return f.yytext = f.yytext.replace(/space\:/, ""), g.getLogger().debug("SPACE NUM (LEX)", f.yytext), 21;
405
- case 16:
403
+ case 15:
406
404
  return f.yytext = "1", g.getLogger().debug("COLUMNS (LEX)", f.yytext), 21;
405
+ case 16:
406
+ return 42;
407
407
  case 17:
408
- return 43;
409
- case 18:
410
408
  return "LINKSTYLE";
411
- case 19:
409
+ case 18:
412
410
  return "INTERPOLATE";
411
+ case 19:
412
+ return this.pushState("CLASSDEF"), 39;
413
413
  case 20:
414
- return this.pushState("CLASSDEF"), 40;
415
- case 21:
416
414
  return this.popState(), this.pushState("CLASSDEFID"), "DEFAULT_CLASSDEF_ID";
415
+ case 21:
416
+ return this.popState(), this.pushState("CLASSDEFID"), 40;
417
417
  case 22:
418
- return this.popState(), this.pushState("CLASSDEFID"), 41;
418
+ return this.popState(), 41;
419
419
  case 23:
420
- return this.popState(), 42;
420
+ return this.pushState("CLASS"), 43;
421
421
  case 24:
422
- return this.pushState("CLASS"), 44;
422
+ return this.popState(), this.pushState("CLASS_STYLE"), 44;
423
423
  case 25:
424
- return this.popState(), this.pushState("CLASS_STYLE"), 45;
424
+ return this.popState(), 45;
425
425
  case 26:
426
- return this.popState(), 46;
426
+ return this.pushState("STYLE_STMNT"), 46;
427
427
  case 27:
428
- return this.pushState("STYLE_STMNT"), 47;
428
+ return this.popState(), this.pushState("STYLE_DEFINITION"), 47;
429
429
  case 28:
430
- return this.popState(), this.pushState("STYLE_DEFINITION"), 48;
430
+ return this.popState(), 48;
431
431
  case 29:
432
- return this.popState(), 49;
433
- case 30:
434
432
  return this.pushState("acc_title"), "acc_title";
435
- case 31:
433
+ case 30:
436
434
  return this.popState(), "acc_title_value";
437
- case 32:
435
+ case 31:
438
436
  return this.pushState("acc_descr"), "acc_descr";
439
- case 33:
437
+ case 32:
440
438
  return this.popState(), "acc_descr_value";
441
- case 34:
439
+ case 33:
442
440
  this.pushState("acc_descr_multiline");
443
441
  break;
444
- case 35:
442
+ case 34:
445
443
  this.popState();
446
444
  break;
447
- case 36:
445
+ case 35:
448
446
  return "acc_descr_multiline_value";
449
- case 37:
447
+ case 36:
450
448
  return 30;
449
+ case 37:
450
+ return this.popState(), g.getLogger().debug("Lex: (("), "NODE_DEND";
451
451
  case 38:
452
452
  return this.popState(), g.getLogger().debug("Lex: (("), "NODE_DEND";
453
453
  case 39:
454
- return this.popState(), g.getLogger().debug("Lex: (("), "NODE_DEND";
455
- case 40:
456
454
  return this.popState(), g.getLogger().debug("Lex: ))"), "NODE_DEND";
455
+ case 40:
456
+ return this.popState(), g.getLogger().debug("Lex: (("), "NODE_DEND";
457
457
  case 41:
458
458
  return this.popState(), g.getLogger().debug("Lex: (("), "NODE_DEND";
459
459
  case 42:
460
- return this.popState(), g.getLogger().debug("Lex: (("), "NODE_DEND";
461
- case 43:
462
460
  return this.popState(), g.getLogger().debug("Lex: (-"), "NODE_DEND";
463
- case 44:
461
+ case 43:
464
462
  return this.popState(), g.getLogger().debug("Lex: -)"), "NODE_DEND";
465
- case 45:
463
+ case 44:
466
464
  return this.popState(), g.getLogger().debug("Lex: (("), "NODE_DEND";
467
- case 46:
465
+ case 45:
468
466
  return this.popState(), g.getLogger().debug("Lex: ]]"), "NODE_DEND";
469
- case 47:
467
+ case 46:
470
468
  return this.popState(), g.getLogger().debug("Lex: ("), "NODE_DEND";
471
- case 48:
469
+ case 47:
472
470
  return this.popState(), g.getLogger().debug("Lex: ])"), "NODE_DEND";
471
+ case 48:
472
+ return this.popState(), g.getLogger().debug("Lex: /]"), "NODE_DEND";
473
473
  case 49:
474
474
  return this.popState(), g.getLogger().debug("Lex: /]"), "NODE_DEND";
475
475
  case 50:
476
- return this.popState(), g.getLogger().debug("Lex: /]"), "NODE_DEND";
477
- case 51:
478
476
  return this.popState(), g.getLogger().debug("Lex: )]"), "NODE_DEND";
479
- case 52:
477
+ case 51:
480
478
  return this.popState(), g.getLogger().debug("Lex: )"), "NODE_DEND";
481
- case 53:
479
+ case 52:
482
480
  return this.popState(), g.getLogger().debug("Lex: ]>"), "NODE_DEND";
483
- case 54:
481
+ case 53:
484
482
  return this.popState(), g.getLogger().debug("Lex: ]"), "NODE_DEND";
483
+ case 54:
484
+ return g.getLogger().debug("Lexa: -)"), this.pushState("NODE"), 35;
485
485
  case 55:
486
- return g.getLogger().debug("Lexa: -)"), this.pushState("NODE"), 36;
486
+ return g.getLogger().debug("Lexa: (-"), this.pushState("NODE"), 35;
487
487
  case 56:
488
- return g.getLogger().debug("Lexa: (-"), this.pushState("NODE"), 36;
488
+ return g.getLogger().debug("Lexa: ))"), this.pushState("NODE"), 35;
489
489
  case 57:
490
- return g.getLogger().debug("Lexa: ))"), this.pushState("NODE"), 36;
490
+ return g.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
491
491
  case 58:
492
- return g.getLogger().debug("Lexa: )"), this.pushState("NODE"), 36;
492
+ return g.getLogger().debug("Lex: ((("), this.pushState("NODE"), 35;
493
493
  case 59:
494
- return g.getLogger().debug("Lex: ((("), this.pushState("NODE"), 36;
494
+ return g.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
495
495
  case 60:
496
- return g.getLogger().debug("Lexa: )"), this.pushState("NODE"), 36;
496
+ return g.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
497
497
  case 61:
498
- return g.getLogger().debug("Lexa: )"), this.pushState("NODE"), 36;
498
+ return g.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
499
499
  case 62:
500
- return g.getLogger().debug("Lexa: )"), this.pushState("NODE"), 36;
500
+ return g.getLogger().debug("Lexc: >"), this.pushState("NODE"), 35;
501
501
  case 63:
502
- return g.getLogger().debug("Lexc: >"), this.pushState("NODE"), 36;
502
+ return g.getLogger().debug("Lexa: (["), this.pushState("NODE"), 35;
503
503
  case 64:
504
- return g.getLogger().debug("Lexa: (["), this.pushState("NODE"), 36;
504
+ return g.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
505
505
  case 65:
506
- return g.getLogger().debug("Lexa: )"), this.pushState("NODE"), 36;
506
+ return this.pushState("NODE"), 35;
507
507
  case 66:
508
- return this.pushState("NODE"), 36;
508
+ return this.pushState("NODE"), 35;
509
509
  case 67:
510
- return this.pushState("NODE"), 36;
510
+ return this.pushState("NODE"), 35;
511
511
  case 68:
512
- return this.pushState("NODE"), 36;
512
+ return this.pushState("NODE"), 35;
513
513
  case 69:
514
- return this.pushState("NODE"), 36;
514
+ return this.pushState("NODE"), 35;
515
515
  case 70:
516
- return this.pushState("NODE"), 36;
516
+ return this.pushState("NODE"), 35;
517
517
  case 71:
518
- return this.pushState("NODE"), 36;
518
+ return this.pushState("NODE"), 35;
519
519
  case 72:
520
- return this.pushState("NODE"), 36;
520
+ return g.getLogger().debug("Lexa: ["), this.pushState("NODE"), 35;
521
521
  case 73:
522
- return g.getLogger().debug("Lexa: ["), this.pushState("NODE"), 36;
522
+ return this.pushState("BLOCK_ARROW"), g.getLogger().debug("LEX ARR START"), 37;
523
523
  case 74:
524
- return this.pushState("BLOCK_ARROW"), g.getLogger().debug("LEX ARR START"), 38;
524
+ return g.getLogger().debug("Lex: NODE_ID", f.yytext), 31;
525
525
  case 75:
526
- return g.getLogger().debug("Lex: NODE_ID", f.yytext), 32;
527
- case 76:
528
526
  return g.getLogger().debug("Lex: EOF", f.yytext), 8;
529
- case 77:
527
+ case 76:
530
528
  this.pushState("md_string");
531
529
  break;
532
- case 78:
530
+ case 77:
533
531
  this.pushState("md_string");
534
532
  break;
535
- case 79:
533
+ case 78:
536
534
  return "NODE_DESCR";
537
- case 80:
535
+ case 79:
538
536
  this.popState();
539
537
  break;
540
- case 81:
538
+ case 80:
541
539
  g.getLogger().debug("Lex: Starting string"), this.pushState("string");
542
540
  break;
543
- case 82:
541
+ case 81:
544
542
  g.getLogger().debug("LEX ARR: Starting string"), this.pushState("string");
545
543
  break;
546
- case 83:
544
+ case 82:
547
545
  return g.getLogger().debug("LEX: NODE_DESCR:", f.yytext), "NODE_DESCR";
548
- case 84:
546
+ case 83:
549
547
  g.getLogger().debug("LEX POPPING"), this.popState();
550
548
  break;
551
- case 85:
549
+ case 84:
552
550
  g.getLogger().debug("Lex: =>BAE"), this.pushState("ARROW_DIR");
553
551
  break;
554
- case 86:
552
+ case 85:
555
553
  return f.yytext = f.yytext.replace(/^,\s*/, ""), g.getLogger().debug("Lex (right): dir:", f.yytext), "DIR";
556
- case 87:
554
+ case 86:
557
555
  return f.yytext = f.yytext.replace(/^,\s*/, ""), g.getLogger().debug("Lex (left):", f.yytext), "DIR";
558
- case 88:
556
+ case 87:
559
557
  return f.yytext = f.yytext.replace(/^,\s*/, ""), g.getLogger().debug("Lex (x):", f.yytext), "DIR";
560
- case 89:
558
+ case 88:
561
559
  return f.yytext = f.yytext.replace(/^,\s*/, ""), g.getLogger().debug("Lex (y):", f.yytext), "DIR";
562
- case 90:
560
+ case 89:
563
561
  return f.yytext = f.yytext.replace(/^,\s*/, ""), g.getLogger().debug("Lex (up):", f.yytext), "DIR";
564
- case 91:
562
+ case 90:
565
563
  return f.yytext = f.yytext.replace(/^,\s*/, ""), g.getLogger().debug("Lex (down):", f.yytext), "DIR";
566
- case 92:
564
+ case 91:
567
565
  return f.yytext = "]>", g.getLogger().debug("Lex (ARROW_DIR end):", f.yytext), this.popState(), this.popState(), "BLOCK_ARROW_END";
568
- case 93:
566
+ case 92:
569
567
  return g.getLogger().debug("Lex: LINK", "#" + f.yytext + "#"), 15;
568
+ case 93:
569
+ return g.getLogger().debug("Lex: LINK", f.yytext), 15;
570
570
  case 94:
571
571
  return g.getLogger().debug("Lex: LINK", f.yytext), 15;
572
572
  case 95:
573
573
  return g.getLogger().debug("Lex: LINK", f.yytext), 15;
574
574
  case 96:
575
- return g.getLogger().debug("Lex: LINK", f.yytext), 15;
575
+ return g.getLogger().debug("Lex: START_LINK", f.yytext), this.pushState("LLABEL"), 16;
576
576
  case 97:
577
577
  return g.getLogger().debug("Lex: START_LINK", f.yytext), this.pushState("LLABEL"), 16;
578
578
  case 98:
579
579
  return g.getLogger().debug("Lex: START_LINK", f.yytext), this.pushState("LLABEL"), 16;
580
580
  case 99:
581
- return g.getLogger().debug("Lex: START_LINK", f.yytext), this.pushState("LLABEL"), 16;
582
- case 100:
583
581
  this.pushState("md_string");
584
582
  break;
585
- case 101:
583
+ case 100:
586
584
  return g.getLogger().debug("Lex: Starting string"), this.pushState("string"), "LINK_LABEL";
587
- case 102:
585
+ case 101:
588
586
  return this.popState(), g.getLogger().debug("Lex: LINK", "#" + f.yytext + "#"), 15;
587
+ case 102:
588
+ return this.popState(), g.getLogger().debug("Lex: LINK", f.yytext), 15;
589
589
  case 103:
590
590
  return this.popState(), g.getLogger().debug("Lex: LINK", f.yytext), 15;
591
591
  case 104:
592
- return this.popState(), g.getLogger().debug("Lex: LINK", f.yytext), 15;
593
- case 105:
594
592
  return g.getLogger().debug("Lex: COLON", f.yytext), f.yytext = f.yytext.slice(1), 27;
595
593
  }
596
594
  }, "anonymous"),
597
- 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+)/],
598
- conditions: { STYLE_DEFINITION: { rules: [29], inclusive: false }, STYLE_STMNT: { rules: [28], inclusive: false }, CLASSDEFID: { rules: [23], inclusive: false }, CLASSDEF: { rules: [21, 22], inclusive: false }, CLASS_STYLE: { rules: [26], inclusive: false }, CLASS: { rules: [25], inclusive: false }, LLABEL: { rules: [100, 101, 102, 103, 104], inclusive: false }, ARROW_DIR: { rules: [86, 87, 88, 89, 90, 91, 92], inclusive: false }, BLOCK_ARROW: { rules: [77, 82, 85], inclusive: false }, NODE: { rules: [38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 78, 81], inclusive: false }, md_string: { rules: [10, 11, 79, 80], inclusive: false }, space: { rules: [], inclusive: false }, string: { rules: [13, 14, 83, 84], inclusive: false }, acc_descr_multiline: { rules: [35, 36], inclusive: false }, acc_descr: { rules: [33], inclusive: false }, acc_title: { rules: [31], inclusive: false }, 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: true } }
595
+ rules: [/^(?:block-beta\b)/, /^(?:block:)/, /^(?:block\b)/, /^(?:[\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+)/],
596
+ conditions: { STYLE_DEFINITION: { rules: [28], inclusive: false }, STYLE_STMNT: { rules: [27], inclusive: false }, CLASSDEFID: { rules: [22], inclusive: false }, CLASSDEF: { rules: [20, 21], inclusive: false }, CLASS_STYLE: { rules: [25], inclusive: false }, CLASS: { rules: [24], inclusive: false }, LLABEL: { rules: [99, 100, 101, 102, 103], inclusive: false }, ARROW_DIR: { rules: [85, 86, 87, 88, 89, 90, 91], inclusive: false }, BLOCK_ARROW: { rules: [76, 81, 84], inclusive: false }, NODE: { rules: [37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 77, 80], inclusive: false }, md_string: { rules: [9, 10, 78, 79], inclusive: false }, space: { rules: [], inclusive: false }, string: { rules: [12, 13, 82, 83], inclusive: false }, acc_descr_multiline: { rules: [34, 35], inclusive: false }, acc_descr: { rules: [32], inclusive: false }, acc_title: { rules: [30], inclusive: false }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 7, 8, 11, 14, 15, 16, 17, 18, 19, 23, 26, 29, 31, 33, 36, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 92, 93, 94, 95, 96, 97, 98, 104], inclusive: true } }
599
597
  };
600
598
  return D;
601
599
  }();
@@ -605,64 +603,67 @@ Expecting ` + it.join(", ") + ", got '" + (this.terminals_[F] || F) + "'" : ft =
605
603
  }
606
604
  return d(_, "Parser"), _.prototype = k, k.Parser = _, new _();
607
605
  }();
608
- yt.parser = yt;
609
- var ve = yt, X = /* @__PURE__ */ new Map(), St = [], bt = /* @__PURE__ */ new Map(), Bt = "color", Ct = "fill", Ee = "bgFill", Pt = ",", _e = R(), ct = /* @__PURE__ */ new Map(), De = /* @__PURE__ */ d((e) => xe.sanitizeText(e, _e), "sanitizeText"), Ne = /* @__PURE__ */ d(function(e, t = "") {
610
- let s = ct.get(e);
611
- s || (s = { id: e, styles: [], textStyles: [] }, ct.set(e, s)), t == null ? void 0 : t.split(Pt).forEach((n) => {
612
- const i = n.replace(/([^;]*);/, "$1").trim();
613
- if (RegExp(Bt).exec(n)) {
614
- const r = i.replace(Ct, Ee).replace(Bt, Ct);
615
- s.textStyles.push(r);
606
+ bt.parser = bt;
607
+ var ve = bt, X = /* @__PURE__ */ new Map(), kt = [], wt = /* @__PURE__ */ new Map(), Bt = "color", Ct = "fill", Ee = "bgFill", Pt = ",", _e = R(), ct = /* @__PURE__ */ new Map(), De = /* @__PURE__ */ d((e) => xe.sanitizeText(e, _e), "sanitizeText"), Ne = /* @__PURE__ */ d(function(e, t = "") {
608
+ let a = ct.get(e);
609
+ a || (a = { id: e, styles: [], textStyles: [] }, ct.set(e, a)), t == null ? void 0 : t.split(Pt).forEach((i) => {
610
+ const l = i.replace(/([^;]*);/, "$1").trim();
611
+ if (RegExp(Bt).exec(i)) {
612
+ const r = l.replace(Ct, Ee).replace(Bt, Ct);
613
+ a.textStyles.push(r);
616
614
  }
617
- s.styles.push(i);
615
+ a.styles.push(l);
618
616
  });
619
617
  }, "addStyleClass"), Te = /* @__PURE__ */ d(function(e, t = "") {
620
- const s = X.get(e);
621
- t != null && (s.styles = t.split(Pt));
618
+ const a = X.get(e);
619
+ t != null && (a.styles = t.split(Pt));
622
620
  }, "addStyle2Node"), Be = /* @__PURE__ */ d(function(e, t) {
623
- e.split(",").forEach(function(s) {
624
- let n = X.get(s);
625
- if (n === void 0) {
626
- const i = s.trim();
627
- n = { id: i, type: "na", children: [] }, X.set(i, n);
621
+ e.split(",").forEach(function(a) {
622
+ let i = X.get(a);
623
+ if (i === void 0) {
624
+ const l = a.trim();
625
+ i = { id: l, type: "na", children: [] }, X.set(l, i);
628
626
  }
629
- n.classes || (n.classes = []), n.classes.push(t);
627
+ i.classes || (i.classes = []), i.classes.push(t);
630
628
  });
631
629
  }, "setCssClass"), Yt = /* @__PURE__ */ d((e, t) => {
632
- const s = e.flat(), n = [];
633
- for (const i of s) {
634
- if (i.label && (i.label = De(i.label)), i.type === "classDef") {
635
- Ne(i.id, i.css);
630
+ var _a2;
631
+ const a = e.flat(), i = [], s = ((_a2 = a.find((r) => (r == null ? void 0 : r.type) === "column-setting")) == null ? void 0 : _a2.columns) ?? -1;
632
+ for (const r of a) {
633
+ if (typeof s == "number" && s > 0 && r.type !== "column-setting" && typeof r.widthInColumns == "number" && r.widthInColumns > s && L.warn(
634
+ `Block ${r.id} width ${r.widthInColumns} exceeds configured column width ${s}`
635
+ ), r.label && (r.label = De(r.label)), r.type === "classDef") {
636
+ Ne(r.id, r.css);
636
637
  continue;
637
638
  }
638
- if (i.type === "applyClass") {
639
- Be(i.id, (i == null ? void 0 : i.styleClass) ?? "");
639
+ if (r.type === "applyClass") {
640
+ Be(r.id, (r == null ? void 0 : r.styleClass) ?? "");
640
641
  continue;
641
642
  }
642
- if (i.type === "applyStyles") {
643
- (i == null ? void 0 : i.stylesStr) && Te(i.id, i == null ? void 0 : i.stylesStr);
643
+ if (r.type === "applyStyles") {
644
+ (r == null ? void 0 : r.stylesStr) && Te(r.id, r == null ? void 0 : r.stylesStr);
644
645
  continue;
645
646
  }
646
- if (i.type === "column-setting")
647
- t.columns = i.columns ?? -1;
648
- else if (i.type === "edge") {
649
- const a = (bt.get(i.id) ?? 0) + 1;
650
- bt.set(i.id, a), i.id = a + "-" + i.id, St.push(i);
647
+ if (r.type === "column-setting")
648
+ t.columns = r.columns ?? -1;
649
+ else if (r.type === "edge") {
650
+ const n = (wt.get(r.id) ?? 0) + 1;
651
+ wt.set(r.id, n), r.id = n + "-" + r.id, kt.push(r);
651
652
  } else {
652
- i.label || (i.type === "composite" ? i.label = "" : i.label = i.id);
653
- const a = X.get(i.id);
654
- if (a === void 0 ? X.set(i.id, i) : (i.type !== "na" && (a.type = i.type), i.label !== i.id && (a.label = i.label)), i.children && Yt(i.children, i), i.type === "space") {
655
- const r = i.width ?? 1;
656
- for (let l = 0; l < r; l++) {
657
- const c = we(i);
658
- c.id = c.id + "-" + l, X.set(c.id, c), n.push(c);
653
+ r.label || (r.type === "composite" ? r.label = "" : r.label = r.id);
654
+ const n = X.get(r.id);
655
+ if (n === void 0 ? X.set(r.id, r) : (r.type !== "na" && (n.type = r.type), r.label !== r.id && (n.label = r.label)), r.children && Yt(r.children, r), r.type === "space") {
656
+ const c = r.width ?? 1;
657
+ for (let u = 0; u < c; u++) {
658
+ const o = we(r);
659
+ o.id = o.id + "-" + u, X.set(o.id, o), i.push(o);
659
660
  }
660
- } else a === void 0 && n.push(i);
661
+ } else n === void 0 && i.push(r);
661
662
  }
662
663
  }
663
- t.children = n;
664
- }, "populateBlockDatabase"), kt = [], et = { id: "root", type: "composite", children: [], columns: -1 }, Ce = /* @__PURE__ */ d(() => {
665
- L.debug("Clear called"), de(), et = { id: "root", type: "composite", children: [], columns: -1 }, X = /* @__PURE__ */ new Map([["root", et]]), kt = [], ct = /* @__PURE__ */ new Map(), St = [], bt = /* @__PURE__ */ new Map();
664
+ t.children = i;
665
+ }, "populateBlockDatabase"), vt = [], et = { id: "root", type: "composite", children: [], columns: -1 }, Ce = /* @__PURE__ */ d(() => {
666
+ L.debug("Clear called"), de(), et = { id: "root", type: "composite", children: [], columns: -1 }, X = /* @__PURE__ */ new Map([["root", et]]), vt = [], ct = /* @__PURE__ */ new Map(), kt = [], wt = /* @__PURE__ */ new Map();
666
667
  }, "clear");
667
668
  function Ht(e) {
668
669
  switch (L.debug("typeStr2Type", e), e) {
@@ -711,22 +712,24 @@ function Kt(e) {
711
712
  }
712
713
  d(Kt, "edgeTypeStr2Type");
713
714
  function Xt(e) {
714
- switch (e.trim()) {
715
- case "--x":
715
+ switch (e.replace(/^[\s-]+|[\s-]+$/g, "")) {
716
+ case "x":
716
717
  return "arrow_cross";
717
- case "--o":
718
+ case "o":
718
719
  return "arrow_circle";
719
- default:
720
+ case ">":
720
721
  return "arrow_point";
722
+ default:
723
+ return "";
721
724
  }
722
725
  }
723
726
  d(Xt, "edgeStrToEdgeData");
724
727
  var It = 0, Ie = /* @__PURE__ */ d(() => (It++, "id-" + Math.random().toString(36).substr(2, 12) + "-" + It), "generateId"), Oe = /* @__PURE__ */ d((e) => {
725
- et.children = e, Yt(e, et), kt = et.children;
728
+ et.children = e, Yt(e, et), vt = et.children;
726
729
  }, "setHierarchy"), Re = /* @__PURE__ */ d((e) => {
727
730
  const t = X.get(e);
728
731
  return t ? t.columns ? t.columns : t.children ? t.children.length : -1 : -1;
729
- }, "getColumns"), ze = /* @__PURE__ */ d(() => [...X.values()], "getBlocksFlat"), Ae = /* @__PURE__ */ d(() => kt || [], "getBlocks"), Me = /* @__PURE__ */ d(() => St, "getEdges"), Fe = /* @__PURE__ */ d((e) => X.get(e), "getBlock"), We = /* @__PURE__ */ d((e) => {
732
+ }, "getColumns"), ze = /* @__PURE__ */ d(() => [...X.values()], "getBlocksFlat"), Ae = /* @__PURE__ */ d(() => vt || [], "getBlocks"), Me = /* @__PURE__ */ d(() => kt, "getEdges"), Fe = /* @__PURE__ */ d((e) => X.get(e), "getBlock"), We = /* @__PURE__ */ d((e) => {
730
733
  X.set(e.id, e);
731
734
  }, "setBlock"), Pe = /* @__PURE__ */ d(() => L, "getLogger"), Ye = /* @__PURE__ */ d(function() {
732
735
  return ct;
@@ -747,8 +750,8 @@ var It = 0, Ie = /* @__PURE__ */ d(() => (It++, "id-" + Math.random().toString(3
747
750
  clear: Ce,
748
751
  generateId: Ie
749
752
  }, Ke = He, nt = /* @__PURE__ */ d((e, t) => {
750
- const s = Le, n = s(e, "r"), i = s(e, "g"), a = s(e, "b");
751
- return ge(n, i, a, t);
753
+ const a = Le, i = a(e, "r"), l = a(e, "g"), s = a(e, "b");
754
+ return ge(i, l, s, t);
752
755
  }, "fade"), Xe = /* @__PURE__ */ d((e) => `.label {
753
756
  font-family: ${e.fontFamily};
754
757
  color: ${e.nodeTextColor || e.textColor};
@@ -862,28 +865,28 @@ var It = 0, Ie = /* @__PURE__ */ d(() => (It++, "id-" + Math.random().toString(3
862
865
  fill: ${e.textColor};
863
866
  }
864
867
  ${oe()}
865
- `, "getStyles"), Ue = Xe, je = /* @__PURE__ */ d((e, t, s, n) => {
866
- t.forEach((i) => {
867
- rr[i](e, s, n);
868
+ `, "getStyles"), Ue = Xe, je = /* @__PURE__ */ d((e, t, a, i) => {
869
+ t.forEach((l) => {
870
+ rr[l](e, a, i);
868
871
  });
869
- }, "insertMarkers"), Ve = /* @__PURE__ */ d((e, t, s) => {
870
- L.trace("Making markers for ", s), e.append("defs").append("marker").attr("id", s + "_" + 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", s + "_" + 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");
871
- }, "extension"), Ge = /* @__PURE__ */ d((e, t, s) => {
872
- e.append("defs").append("marker").attr("id", s + "_" + 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", s + "_" + 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");
873
- }, "composition"), Ze = /* @__PURE__ */ d((e, t, s) => {
874
- e.append("defs").append("marker").attr("id", s + "_" + 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", s + "_" + 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");
875
- }, "aggregation"), qe = /* @__PURE__ */ d((e, t, s) => {
876
- e.append("defs").append("marker").attr("id", s + "_" + 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", s + "_" + 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");
877
- }, "dependency"), Je = /* @__PURE__ */ d((e, t, s) => {
878
- e.append("defs").append("marker").attr("id", s + "_" + 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", s + "_" + 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);
879
- }, "lollipop"), Qe = /* @__PURE__ */ d((e, t, s) => {
880
- e.append("marker").attr("id", s + "_" + 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", s + "_" + 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");
881
- }, "point"), $e = /* @__PURE__ */ d((e, t, s) => {
882
- e.append("marker").attr("id", s + "_" + 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", s + "_" + 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");
883
- }, "circle"), tr = /* @__PURE__ */ d((e, t, s) => {
884
- e.append("marker").attr("id", s + "_" + 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", s + "_" + 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");
885
- }, "cross"), er = /* @__PURE__ */ d((e, t, s) => {
886
- e.append("defs").append("marker").attr("id", s + "_" + 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");
872
+ }, "insertMarkers"), Ve = /* @__PURE__ */ d((e, t, a) => {
873
+ L.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");
874
+ }, "extension"), Ge = /* @__PURE__ */ d((e, t, a) => {
875
+ 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");
876
+ }, "composition"), Ze = /* @__PURE__ */ d((e, t, a) => {
877
+ 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");
878
+ }, "aggregation"), qe = /* @__PURE__ */ d((e, t, a) => {
879
+ 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");
880
+ }, "dependency"), Je = /* @__PURE__ */ d((e, t, a) => {
881
+ 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);
882
+ }, "lollipop"), Qe = /* @__PURE__ */ d((e, t, a) => {
883
+ 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");
884
+ }, "point"), $e = /* @__PURE__ */ d((e, t, a) => {
885
+ 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");
886
+ }, "circle"), tr = /* @__PURE__ */ d((e, t, a) => {
887
+ 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");
888
+ }, "cross"), er = /* @__PURE__ */ d((e, t, a) => {
889
+ 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");
887
890
  }, "barb"), rr = {
888
891
  extension: Ve,
889
892
  composition: Ge,
@@ -904,31 +907,31 @@ function Ut(e, t) {
904
907
  return { px: t, py: 0 };
905
908
  if (e === 1)
906
909
  return { px: 0, py: t };
907
- const s = t % e, n = Math.floor(t / e);
908
- return { px: s, py: n };
910
+ const a = t % e, i = Math.floor(t / e);
911
+ return { px: a, py: i };
909
912
  }
910
913
  d(Ut, "calculateBlockPosition");
911
914
  var sr = /* @__PURE__ */ d((e) => {
912
- let t = 0, s = 0;
913
- for (const n of e.children) {
914
- const { width: i, height: a, x: r, y: l } = n.size ?? { width: 0, height: 0, x: 0, y: 0 };
915
+ let t = 0, a = 0;
916
+ for (const i of e.children) {
917
+ const { width: l, height: s, x: r, y: n } = i.size ?? { width: 0, height: 0, x: 0, y: 0 };
915
918
  L.debug(
916
919
  "getMaxChildSize abc95 child:",
917
- n.id,
920
+ i.id,
918
921
  "width:",
919
- i,
922
+ l,
920
923
  "height:",
921
- a,
924
+ s,
922
925
  "x:",
923
926
  r,
924
927
  "y:",
925
- l,
926
- n.type
927
- ), n.type !== "space" && (i > t && (t = i / (e.widthInColumns ?? 1)), a > s && (s = a));
928
+ n,
929
+ i.type
930
+ ), i.type !== "space" && (l > t && (t = l / (e.widthInColumns ?? 1)), s > a && (a = s));
928
931
  }
929
- return { width: t, height: s };
932
+ return { width: t, height: a };
930
933
  }, "getMaxChildSize");
931
- function ot(e, t, s = 0, n = 0) {
934
+ function ot(e, t, a = 0, i = 0) {
932
935
  var _a2, _b2, _c, _d, _e2, _f, _g, _h, _i, _j, _k;
933
936
  L.debug(
934
937
  "setBlockSizes abc95 (start)",
@@ -937,54 +940,54 @@ function ot(e, t, s = 0, n = 0) {
937
940
  "block width =",
938
941
  e == null ? void 0 : e.size,
939
942
  "siblingWidth",
940
- s
943
+ a
941
944
  ), ((_b2 = e == null ? void 0 : e.size) == null ? void 0 : _b2.width) || (e.size = {
942
- width: s,
943
- height: n,
945
+ width: a,
946
+ height: i,
944
947
  x: 0,
945
948
  y: 0
946
949
  });
947
- let i = 0, a = 0;
950
+ let l = 0, s = 0;
948
951
  if (((_c = e.children) == null ? void 0 : _c.length) > 0) {
949
952
  for (const b of e.children)
950
953
  ot(b, t);
951
954
  const r = sr(e);
952
- i = r.width, a = r.height, L.debug("setBlockSizes abc95 maxWidth of", e.id, ":s children is ", i, a);
955
+ l = r.width, s = r.height, L.debug("setBlockSizes abc95 maxWidth of", e.id, ":s children is ", l, s);
953
956
  for (const b of e.children)
954
957
  b.size && (L.debug(
955
- `abc95 Setting size of children of ${e.id} id=${b.id} ${i} ${a} ${JSON.stringify(b.size)}`
956
- ), b.size.width = i * (b.widthInColumns ?? 1) + C * ((b.widthInColumns ?? 1) - 1), b.size.height = a, b.size.x = 0, b.size.y = 0, L.debug(
957
- `abc95 updating size of ${e.id} children child:${b.id} maxWidth:${i} maxHeight:${a}`
958
+ `abc95 Setting size of children of ${e.id} id=${b.id} ${l} ${s} ${JSON.stringify(b.size)}`
959
+ ), b.size.width = l * (b.widthInColumns ?? 1) + C * ((b.widthInColumns ?? 1) - 1), b.size.height = s, b.size.x = 0, b.size.y = 0, L.debug(
960
+ `abc95 updating size of ${e.id} children child:${b.id} maxWidth:${l} maxHeight:${s}`
958
961
  ));
959
962
  for (const b of e.children)
960
- ot(b, t, i, a);
961
- const l = e.columns ?? -1;
963
+ ot(b, t, l, s);
964
+ const n = e.columns ?? -1;
962
965
  let c = 0;
963
966
  for (const b of e.children)
964
967
  c += b.widthInColumns ?? 1;
965
968
  let u = e.children.length;
966
- l > 0 && l < c && (u = l);
967
- const h = Math.ceil(c / u);
968
- let x = u * (i + C) + C, w = h * (a + C) + C;
969
- if (x < s) {
969
+ n > 0 && n < c && (u = n);
970
+ const o = Math.ceil(c / u);
971
+ let x = u * (l + C) + C, w = o * (s + C) + C;
972
+ if (x < a) {
970
973
  L.debug(
971
- `Detected to small sibling: abc95 ${e.id} siblingWidth ${s} siblingHeight ${n} width ${x}`
972
- ), x = s, w = n;
973
- const b = (s - u * C - C) / u, S = (n - h * C - C) / h;
974
- L.debug("Size indata abc88", e.id, "childWidth", b, "maxWidth", i), L.debug("Size indata abc88", e.id, "childHeight", S, "maxHeight", a), L.debug("Size indata abc88 xSize", u, "padding", C);
975
- for (const E of e.children)
976
- E.size && (E.size.width = b, E.size.height = S, E.size.x = 0, E.size.y = 0);
974
+ `Detected to small sibling: abc95 ${e.id} siblingWidth ${a} siblingHeight ${i} width ${x}`
975
+ ), x = a, w = i;
976
+ const b = (a - u * C - C) / u, S = (i - o * C - C) / o;
977
+ L.debug("Size indata abc88", e.id, "childWidth", b, "maxWidth", l), L.debug("Size indata abc88", e.id, "childHeight", S, "maxHeight", s), L.debug("Size indata abc88 xSize", u, "padding", C);
978
+ for (const v of e.children)
979
+ v.size && (v.size.width = b, v.size.height = S, v.size.x = 0, v.size.y = 0);
977
980
  }
978
981
  if (L.debug(
979
- `abc95 (finale calc) ${e.id} xSize ${u} ySize ${h} columns ${l}${e.children.length} width=${Math.max(x, ((_d = e.size) == null ? void 0 : _d.width) || 0)}`
982
+ `abc95 (finale calc) ${e.id} xSize ${u} ySize ${o} columns ${n}${e.children.length} width=${Math.max(x, ((_d = e.size) == null ? void 0 : _d.width) || 0)}`
980
983
  ), x < (((_e2 = e == null ? void 0 : e.size) == null ? void 0 : _e2.width) || 0)) {
981
984
  x = ((_f = e == null ? void 0 : e.size) == null ? void 0 : _f.width) || 0;
982
- const b = l > 0 ? Math.min(e.children.length, l) : e.children.length;
985
+ const b = n > 0 ? Math.min(e.children.length, n) : e.children.length;
983
986
  if (b > 0) {
984
987
  const S = (x - b * C - C) / b;
985
988
  L.debug("abc95 (growing to fit) width", e.id, x, (_g = e.size) == null ? void 0 : _g.width, S);
986
- for (const E of e.children)
987
- E.size && (E.size.width = S);
989
+ for (const v of e.children)
990
+ v.size && (v.size.width = S);
988
991
  }
989
992
  }
990
993
  e.size = {
@@ -1004,94 +1007,98 @@ function ot(e, t, s = 0, n = 0) {
1004
1007
  );
1005
1008
  }
1006
1009
  d(ot, "setBlockSizes");
1007
- function vt(e, t) {
1010
+ function Et(e, t) {
1008
1011
  var _a2, _b2, _c, _d, _e2, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
1009
1012
  L.debug(
1010
1013
  `abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${(_a2 = e == null ? void 0 : e.size) == null ? void 0 : _a2.x} y: ${(_b2 = e == null ? void 0 : e.size) == null ? void 0 : _b2.y} width: ${(_c = e == null ? void 0 : e.size) == null ? void 0 : _c.width}`
1011
1014
  );
1012
- const s = e.columns ?? -1;
1013
- if (L.debug("layoutBlocks columns abc95", e.id, "=>", s, e), e.children && // find max width of children
1015
+ const a = e.columns ?? -1;
1016
+ if (L.debug("layoutBlocks columns abc95", e.id, "=>", a, e), e.children && // find max width of children
1014
1017
  e.children.length > 0) {
1015
- const n = ((_e2 = (_d = e == null ? void 0 : e.children[0]) == null ? void 0 : _d.size) == null ? void 0 : _e2.width) ?? 0, i = e.children.length * n + (e.children.length - 1) * C;
1016
- L.debug("widthOfChildren 88", i, "posX");
1017
- let a = 0;
1018
+ const i = ((_e2 = (_d = e == null ? void 0 : e.children[0]) == null ? void 0 : _d.size) == null ? void 0 : _e2.width) ?? 0, l = e.children.length * i + (e.children.length - 1) * C;
1019
+ L.debug("widthOfChildren 88", l, "posX");
1020
+ let s = 0;
1018
1021
  L.debug("abc91 block?.size?.x", e.id, (_f = e == null ? void 0 : e.size) == null ? void 0 : _f.x);
1019
- let r = ((_g = e == null ? void 0 : e.size) == null ? void 0 : _g.x) ? ((_h = e == null ? void 0 : e.size) == null ? void 0 : _h.x) + (-((_i = e == null ? void 0 : e.size) == null ? void 0 : _i.width) / 2 || 0) : -C, l = 0;
1022
+ let r = ((_g = e == null ? void 0 : e.size) == null ? void 0 : _g.x) ? ((_h = e == null ? void 0 : e.size) == null ? void 0 : _h.x) + (-((_i = e == null ? void 0 : e.size) == null ? void 0 : _i.width) / 2 || 0) : -C, n = 0;
1020
1023
  for (const c of e.children) {
1021
1024
  const u = e;
1022
1025
  if (!c.size)
1023
1026
  continue;
1024
- const { width: h, height: x } = c.size, { px: w, py: b } = Ut(s, a);
1025
- if (b != l && (l = b, r = ((_j = e == null ? void 0 : e.size) == null ? void 0 : _j.x) ? ((_k = e == null ? void 0 : e.size) == null ? void 0 : _k.x) + (-((_l = e == null ? void 0 : e.size) == null ? void 0 : _l.width) / 2 || 0) : -C, L.debug("New row in layout for block", e.id, " and child ", c.id, l)), L.debug(
1026
- `abc89 layout blocks (child) id: ${c.id} Pos: ${a} (px, py) ${w},${b} (${(_m = u == null ? void 0 : u.size) == null ? void 0 : _m.x},${(_n = u == null ? void 0 : u.size) == null ? void 0 : _n.y}) parent: ${u.id} width: ${h}${C}`
1027
+ const { width: o, height: x } = c.size, { px: w, py: b } = Ut(a, s);
1028
+ if (b != n && (n = b, r = ((_j = e == null ? void 0 : e.size) == null ? void 0 : _j.x) ? ((_k = e == null ? void 0 : e.size) == null ? void 0 : _k.x) + (-((_l = e == null ? void 0 : e.size) == null ? void 0 : _l.width) / 2 || 0) : -C, L.debug("New row in layout for block", e.id, " and child ", c.id, n)), L.debug(
1029
+ `abc89 layout blocks (child) id: ${c.id} Pos: ${s} (px, py) ${w},${b} (${(_m = u == null ? void 0 : u.size) == null ? void 0 : _m.x},${(_n = u == null ? void 0 : u.size) == null ? void 0 : _n.y}) parent: ${u.id} width: ${o}${C}`
1027
1030
  ), u.size) {
1028
- const S = h / 2;
1029
- c.size.x = r + C + S, L.debug(
1030
- `abc91 layout blocks (calc) px, pyid:${c.id} startingPos=X${r} new startingPosX${c.size.x} ${S} padding=${C} width=${h} halfWidth=${S} => x:${c.size.x} y:${c.size.y} ${c.widthInColumns} (width * (child?.w || 1)) / 2 ${h * ((c == null ? void 0 : c.widthInColumns) ?? 1) / 2}`
1031
- ), r = c.size.x + S, c.size.y = u.size.y - u.size.height / 2 + b * (x + C) + x / 2 + C, L.debug(
1032
- `abc88 layout blocks (calc) px, pyid:${c.id}startingPosX${r}${C}${S}=>x:${c.size.x}y:${c.size.y}${c.widthInColumns}(width * (child?.w || 1)) / 2${h * ((c == null ? void 0 : c.widthInColumns) ?? 1) / 2}`
1031
+ const v = o / 2;
1032
+ c.size.x = r + C + v, L.debug(
1033
+ `abc91 layout blocks (calc) px, pyid:${c.id} startingPos=X${r} new startingPosX${c.size.x} ${v} padding=${C} width=${o} halfWidth=${v} => x:${c.size.x} y:${c.size.y} ${c.widthInColumns} (width * (child?.w || 1)) / 2 ${o * ((c == null ? void 0 : c.widthInColumns) ?? 1) / 2}`
1034
+ ), r = c.size.x + v, c.size.y = u.size.y - u.size.height / 2 + b * (x + C) + x / 2 + C, L.debug(
1035
+ `abc88 layout blocks (calc) px, pyid:${c.id}startingPosX${r}${C}${v}=>x:${c.size.x}y:${c.size.y}${c.widthInColumns}(width * (child?.w || 1)) / 2${o * ((c == null ? void 0 : c.widthInColumns) ?? 1) / 2}`
1033
1036
  );
1034
1037
  }
1035
- c.children && vt(c), a += (c == null ? void 0 : c.widthInColumns) ?? 1, L.debug("abc88 columnsPos", c, a);
1038
+ c.children && Et(c);
1039
+ let S = (c == null ? void 0 : c.widthInColumns) ?? 1;
1040
+ a > 0 && (S = Math.min(S, a - s % a)), s += S, L.debug("abc88 columnsPos", c, s);
1036
1041
  }
1037
1042
  }
1038
1043
  L.debug(
1039
1044
  `layout blocks (<==layoutBlocks) ${e.id} x: ${(_o = e == null ? void 0 : e.size) == null ? void 0 : _o.x} y: ${(_p = e == null ? void 0 : e.size) == null ? void 0 : _p.y} width: ${(_q = e == null ? void 0 : e.size) == null ? void 0 : _q.width}`
1040
1045
  );
1041
1046
  }
1042
- d(vt, "layoutBlocks");
1043
- function Et(e, { minX: t, minY: s, maxX: n, maxY: i } = { minX: 0, minY: 0, maxX: 0, maxY: 0 }) {
1047
+ d(Et, "layoutBlocks");
1048
+ function _t(e, { minX: t, minY: a, maxX: i, maxY: l } = { minX: 0, minY: 0, maxX: 0, maxY: 0 }) {
1044
1049
  if (e.size && e.id !== "root") {
1045
- const { x: a, y: r, width: l, height: c } = e.size;
1046
- a - l / 2 < t && (t = a - l / 2), r - c / 2 < s && (s = r - c / 2), a + l / 2 > n && (n = a + l / 2), r + c / 2 > i && (i = r + c / 2);
1050
+ const { x: s, y: r, width: n, height: c } = e.size;
1051
+ s - n / 2 < t && (t = s - n / 2), r - c / 2 < a && (a = r - c / 2), s + n / 2 > i && (i = s + n / 2), r + c / 2 > l && (l = r + c / 2);
1047
1052
  }
1048
1053
  if (e.children)
1049
- for (const a of e.children)
1050
- ({ minX: t, minY: s, maxX: n, maxY: i } = Et(a, { minX: t, minY: s, maxX: n, maxY: i }));
1051
- return { minX: t, minY: s, maxX: n, maxY: i };
1054
+ for (const s of e.children)
1055
+ ({ minX: t, minY: a, maxX: i, maxY: l } = _t(s, { minX: t, minY: a, maxX: i, maxY: l }));
1056
+ return { minX: t, minY: a, maxX: i, maxY: l };
1052
1057
  }
1053
- d(Et, "findBounds");
1058
+ d(_t, "findBounds");
1054
1059
  function jt(e) {
1055
1060
  const t = e.getBlock("root");
1056
1061
  if (!t)
1057
1062
  return;
1058
- ot(t, e, 0, 0), vt(t), L.debug("getBlocks", JSON.stringify(t, null, 2));
1059
- const { minX: s, minY: n, maxX: i, maxY: a } = Et(t), r = a - n, l = i - s;
1060
- return { x: s, y: n, width: l, height: r };
1063
+ ot(t, e, 0, 0), Et(t), L.debug("getBlocks", JSON.stringify(t, null, 2));
1064
+ const { minX: a, minY: i, maxX: l, maxY: s } = _t(t), r = s - i, n = l - a;
1065
+ return { x: a, y: i, width: n, height: r };
1061
1066
  }
1062
1067
  d(jt, "layout");
1063
- function wt(e, t) {
1068
+ function mt(e, t) {
1064
1069
  t && e.attr("style", t);
1065
1070
  }
1066
- d(wt, "applyStyle");
1067
- function Vt(e) {
1068
- const t = O(document.createElementNS("http://www.w3.org/2000/svg", "foreignObject")), s = t.append("xhtml:div"), n = e.label, i = e.isNode ? "nodeLabel" : "edgeLabel", a = s.append("span");
1069
- return a.html(n), wt(a, e.labelStyle), a.attr("class", i), wt(s, e.labelStyle), s.style("display", "inline-block"), s.style("white-space", "nowrap"), s.attr("xmlns", "http://www.w3.org/1999/xhtml"), t.node();
1071
+ d(mt, "applyStyle");
1072
+ function Vt(e, t) {
1073
+ const a = O(document.createElementNS("http://www.w3.org/2000/svg", "foreignObject")), i = a.append("xhtml:div"), l = e.label, s = e.isNode ? "nodeLabel" : "edgeLabel", r = i.append("span");
1074
+ return r.html(yt(l, t)), mt(r, e.labelStyle), r.attr("class", s), mt(i, e.labelStyle), i.style("display", "inline-block"), i.style("white-space", "nowrap"), i.attr("xmlns", "http://www.w3.org/1999/xhtml"), a.node();
1070
1075
  }
1071
1076
  d(Vt, "addHtmlLabel");
1072
- var ir = /* @__PURE__ */ d(async (e, t, s, n) => {
1073
- let i = e || "";
1074
- if (typeof i == "object" && (i = i[0]), j(R().flowchart.htmlLabels)) {
1075
- i = i.replace(/\\n|\n/g, "<br />"), L.debug("vertexText" + i);
1076
- const a = await ye(xt(i)), r = {
1077
- isNode: n,
1078
- label: a,
1077
+ var ir = /* @__PURE__ */ d(async (e, t, a, i) => {
1078
+ let l = e || "";
1079
+ typeof l == "object" && (l = l[0]);
1080
+ const s = R();
1081
+ if (j(s.flowchart.htmlLabels)) {
1082
+ l = l.replace(/\\n|\n/g, "<br />"), L.debug("vertexText" + l);
1083
+ const r = await ye(xt(l)), n = {
1084
+ isNode: i,
1085
+ label: r,
1079
1086
  labelStyle: t.replace("fill:", "color:")
1080
1087
  };
1081
- return Vt(r);
1088
+ return Vt(n, s);
1082
1089
  } else {
1083
- const a = document.createElementNS("http://www.w3.org/2000/svg", "text");
1084
- a.setAttribute("style", t.replace("color:", "fill:"));
1085
- let r = [];
1086
- typeof i == "string" ? r = i.split(/\\n|\n|<br\s*\/?>/gi) : Array.isArray(i) ? r = i : r = [];
1087
- for (const l of r) {
1088
- const c = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
1089
- c.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), c.setAttribute("dy", "1em"), c.setAttribute("x", "0"), s ? c.setAttribute("class", "title-row") : c.setAttribute("class", "row"), c.textContent = l.trim(), a.appendChild(c);
1090
+ const r = document.createElementNS("http://www.w3.org/2000/svg", "text");
1091
+ r.setAttribute("style", t.replace("color:", "fill:"));
1092
+ let n = [];
1093
+ typeof l == "string" ? n = l.split(/\\n|\n|<br\s*\/?>/gi) : Array.isArray(l) ? n = l : n = [];
1094
+ for (const c of n) {
1095
+ const u = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
1096
+ u.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), u.setAttribute("dy", "1em"), u.setAttribute("x", "0"), a ? u.setAttribute("class", "title-row") : u.setAttribute("class", "row"), u.textContent = c.trim(), r.appendChild(u);
1090
1097
  }
1091
- return a;
1098
+ return r;
1092
1099
  }
1093
- }, "createLabel"), K = ir, nr = /* @__PURE__ */ d((e, t, s, n, i) => {
1094
- t.arrowTypeStart && Ot(e, "start", t.arrowTypeStart, s, n, i), t.arrowTypeEnd && Ot(e, "end", t.arrowTypeEnd, s, n, i);
1100
+ }, "createLabel"), K = ir, nr = /* @__PURE__ */ d((e, t, a, i, l) => {
1101
+ t.arrowTypeStart && Ot(e, "start", t.arrowTypeStart, a, i, l), t.arrowTypeEnd && Ot(e, "end", t.arrowTypeEnd, a, i, l);
1095
1102
  }, "addEdgeMarkers"), lr = {
1096
1103
  arrow_cross: "cross",
1097
1104
  arrow_point: "point",
@@ -1102,176 +1109,176 @@ var ir = /* @__PURE__ */ d(async (e, t, s, n) => {
1102
1109
  composition: "composition",
1103
1110
  dependency: "dependency",
1104
1111
  lollipop: "lollipop"
1105
- }, Ot = /* @__PURE__ */ d((e, t, s, n, i, a) => {
1106
- const r = lr[s];
1112
+ }, Ot = /* @__PURE__ */ d((e, t, a, i, l, s) => {
1113
+ const r = lr[a];
1107
1114
  if (!r) {
1108
- L.warn(`Unknown arrow type: ${s}`);
1115
+ L.warn(`Unknown arrow type: ${a}`);
1109
1116
  return;
1110
1117
  }
1111
- const l = t === "start" ? "Start" : "End";
1112
- e.attr(`marker-${t}`, `url(${n}#${i}_${a}-${r}${l})`);
1113
- }, "addEdgeMarker"), mt = {}, M = {}, cr = /* @__PURE__ */ d(async (e, t) => {
1114
- const s = R(), n = j(s.flowchart.htmlLabels), i = t.labelType === "markdown" ? Wt(
1118
+ const n = t === "start" ? "Start" : "End";
1119
+ e.attr(`marker-${t}`, `url(${i}#${l}_${s}-${r}${n})`);
1120
+ }, "addEdgeMarker"), Lt = {}, M = {}, cr = /* @__PURE__ */ d(async (e, t) => {
1121
+ const a = R(), i = j(a.flowchart.htmlLabels), l = t.labelType === "markdown" ? Wt(
1115
1122
  e,
1116
1123
  t.label,
1117
1124
  {
1118
1125
  style: t.labelStyle,
1119
- useHtmlLabels: n,
1126
+ useHtmlLabels: i,
1120
1127
  addSvgBackground: true
1121
1128
  },
1122
- s
1123
- ) : await K(t.label, t.labelStyle), a = e.insert("g").attr("class", "edgeLabel"), r = a.insert("g").attr("class", "label");
1124
- r.node().appendChild(i);
1125
- let l = i.getBBox();
1126
- if (n) {
1127
- const u = i.children[0], h = O(i);
1128
- l = u.getBoundingClientRect(), h.attr("width", l.width), h.attr("height", l.height);
1129
+ a
1130
+ ) : await K(t.label, t.labelStyle), s = e.insert("g").attr("class", "edgeLabel"), r = s.insert("g").attr("class", "label");
1131
+ r.node().appendChild(l);
1132
+ let n = l.getBBox();
1133
+ if (i) {
1134
+ const u = l.children[0], o = O(l);
1135
+ n = u.getBoundingClientRect(), o.attr("width", n.width), o.attr("height", n.height);
1129
1136
  }
1130
- r.attr("transform", "translate(" + -l.width / 2 + ", " + -l.height / 2 + ")"), mt[t.id] = a, t.width = l.width, t.height = l.height;
1137
+ r.attr("transform", "translate(" + -n.width / 2 + ", " + -n.height / 2 + ")"), Lt[t.id] = s, t.width = n.width, t.height = n.height;
1131
1138
  let c;
1132
1139
  if (t.startLabelLeft) {
1133
- const u = await K(t.startLabelLeft, t.labelStyle), h = e.insert("g").attr("class", "edgeTerminals"), x = h.insert("g").attr("class", "inner");
1140
+ const u = await K(t.startLabelLeft, t.labelStyle), o = e.insert("g").attr("class", "edgeTerminals"), x = o.insert("g").attr("class", "inner");
1134
1141
  c = x.node().appendChild(u);
1135
1142
  const w = u.getBBox();
1136
- x.attr("transform", "translate(" + -w.width / 2 + ", " + -w.height / 2 + ")"), M[t.id] || (M[t.id] = {}), M[t.id].startLeft = h, tt(c, t.startLabelLeft);
1143
+ x.attr("transform", "translate(" + -w.width / 2 + ", " + -w.height / 2 + ")"), M[t.id] || (M[t.id] = {}), M[t.id].startLeft = o, tt(c, t.startLabelLeft);
1137
1144
  }
1138
1145
  if (t.startLabelRight) {
1139
- const u = await K(t.startLabelRight, t.labelStyle), h = e.insert("g").attr("class", "edgeTerminals"), x = h.insert("g").attr("class", "inner");
1140
- c = h.node().appendChild(u), x.node().appendChild(u);
1146
+ const u = await K(t.startLabelRight, t.labelStyle), o = e.insert("g").attr("class", "edgeTerminals"), x = o.insert("g").attr("class", "inner");
1147
+ c = o.node().appendChild(u), x.node().appendChild(u);
1141
1148
  const w = u.getBBox();
1142
- x.attr("transform", "translate(" + -w.width / 2 + ", " + -w.height / 2 + ")"), M[t.id] || (M[t.id] = {}), M[t.id].startRight = h, tt(c, t.startLabelRight);
1149
+ x.attr("transform", "translate(" + -w.width / 2 + ", " + -w.height / 2 + ")"), M[t.id] || (M[t.id] = {}), M[t.id].startRight = o, tt(c, t.startLabelRight);
1143
1150
  }
1144
1151
  if (t.endLabelLeft) {
1145
- const u = await K(t.endLabelLeft, t.labelStyle), h = e.insert("g").attr("class", "edgeTerminals"), x = h.insert("g").attr("class", "inner");
1152
+ const u = await K(t.endLabelLeft, t.labelStyle), o = e.insert("g").attr("class", "edgeTerminals"), x = o.insert("g").attr("class", "inner");
1146
1153
  c = x.node().appendChild(u);
1147
1154
  const w = u.getBBox();
1148
- x.attr("transform", "translate(" + -w.width / 2 + ", " + -w.height / 2 + ")"), h.node().appendChild(u), M[t.id] || (M[t.id] = {}), M[t.id].endLeft = h, tt(c, t.endLabelLeft);
1155
+ x.attr("transform", "translate(" + -w.width / 2 + ", " + -w.height / 2 + ")"), o.node().appendChild(u), M[t.id] || (M[t.id] = {}), M[t.id].endLeft = o, tt(c, t.endLabelLeft);
1149
1156
  }
1150
1157
  if (t.endLabelRight) {
1151
- const u = await K(t.endLabelRight, t.labelStyle), h = e.insert("g").attr("class", "edgeTerminals"), x = h.insert("g").attr("class", "inner");
1158
+ const u = await K(t.endLabelRight, t.labelStyle), o = e.insert("g").attr("class", "edgeTerminals"), x = o.insert("g").attr("class", "inner");
1152
1159
  c = x.node().appendChild(u);
1153
1160
  const w = u.getBBox();
1154
- x.attr("transform", "translate(" + -w.width / 2 + ", " + -w.height / 2 + ")"), h.node().appendChild(u), M[t.id] || (M[t.id] = {}), M[t.id].endRight = h, tt(c, t.endLabelRight);
1161
+ x.attr("transform", "translate(" + -w.width / 2 + ", " + -w.height / 2 + ")"), o.node().appendChild(u), M[t.id] || (M[t.id] = {}), M[t.id].endRight = o, tt(c, t.endLabelRight);
1155
1162
  }
1156
- return i;
1163
+ return l;
1157
1164
  }, "insertEdgeLabel");
1158
1165
  function tt(e, t) {
1159
1166
  R().flowchart.htmlLabels && e && (e.style.width = t.length * 9 + "px", e.style.height = "12px");
1160
1167
  }
1161
1168
  d(tt, "setTerminalWidth");
1162
1169
  var or = /* @__PURE__ */ d((e, t) => {
1163
- L.debug("Moving label abc88 ", e.id, e.label, mt[e.id], t);
1164
- let s = t.updatedPath ? t.updatedPath : t.originalPath;
1165
- const n = R(), { subGraphTitleTotalMargin: i } = fe(n);
1170
+ L.debug("Moving label abc88 ", e.id, e.label, Lt[e.id], t);
1171
+ let a = t.updatedPath ? t.updatedPath : t.originalPath;
1172
+ const i = R(), { subGraphTitleTotalMargin: l } = fe(i);
1166
1173
  if (e.label) {
1167
- const a = mt[e.id];
1168
- let r = e.x, l = e.y;
1169
- if (s) {
1170
- const c = $.calcLabelPosition(s);
1174
+ const s = Lt[e.id];
1175
+ let r = e.x, n = e.y;
1176
+ if (a) {
1177
+ const c = $.calcLabelPosition(a);
1171
1178
  L.debug(
1172
1179
  "Moving label " + e.label + " from (",
1173
1180
  r,
1174
1181
  ",",
1175
- l,
1182
+ n,
1176
1183
  ") to (",
1177
1184
  c.x,
1178
1185
  ",",
1179
1186
  c.y,
1180
1187
  ") abc88"
1181
- ), t.updatedPath && (r = c.x, l = c.y);
1188
+ ), t.updatedPath && (r = c.x, n = c.y);
1182
1189
  }
1183
- a.attr("transform", `translate(${r}, ${l + i / 2})`);
1190
+ s.attr("transform", `translate(${r}, ${n + l / 2})`);
1184
1191
  }
1185
1192
  if (e.startLabelLeft) {
1186
- const a = M[e.id].startLeft;
1187
- let r = e.x, l = e.y;
1188
- if (s) {
1189
- const c = $.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_left", s);
1190
- r = c.x, l = c.y;
1193
+ const s = M[e.id].startLeft;
1194
+ let r = e.x, n = e.y;
1195
+ if (a) {
1196
+ const c = $.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_left", a);
1197
+ r = c.x, n = c.y;
1191
1198
  }
1192
- a.attr("transform", `translate(${r}, ${l})`);
1199
+ s.attr("transform", `translate(${r}, ${n})`);
1193
1200
  }
1194
1201
  if (e.startLabelRight) {
1195
- const a = M[e.id].startRight;
1196
- let r = e.x, l = e.y;
1197
- if (s) {
1202
+ const s = M[e.id].startRight;
1203
+ let r = e.x, n = e.y;
1204
+ if (a) {
1198
1205
  const c = $.calcTerminalLabelPosition(
1199
1206
  e.arrowTypeStart ? 10 : 0,
1200
1207
  "start_right",
1201
- s
1208
+ a
1202
1209
  );
1203
- r = c.x, l = c.y;
1210
+ r = c.x, n = c.y;
1204
1211
  }
1205
- a.attr("transform", `translate(${r}, ${l})`);
1212
+ s.attr("transform", `translate(${r}, ${n})`);
1206
1213
  }
1207
1214
  if (e.endLabelLeft) {
1208
- const a = M[e.id].endLeft;
1209
- let r = e.x, l = e.y;
1210
- if (s) {
1211
- const c = $.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_left", s);
1212
- r = c.x, l = c.y;
1215
+ const s = M[e.id].endLeft;
1216
+ let r = e.x, n = e.y;
1217
+ if (a) {
1218
+ const c = $.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_left", a);
1219
+ r = c.x, n = c.y;
1213
1220
  }
1214
- a.attr("transform", `translate(${r}, ${l})`);
1221
+ s.attr("transform", `translate(${r}, ${n})`);
1215
1222
  }
1216
1223
  if (e.endLabelRight) {
1217
- const a = M[e.id].endRight;
1218
- let r = e.x, l = e.y;
1219
- if (s) {
1220
- const c = $.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_right", s);
1221
- r = c.x, l = c.y;
1224
+ const s = M[e.id].endRight;
1225
+ let r = e.x, n = e.y;
1226
+ if (a) {
1227
+ const c = $.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_right", a);
1228
+ r = c.x, n = c.y;
1222
1229
  }
1223
- a.attr("transform", `translate(${r}, ${l})`);
1230
+ s.attr("transform", `translate(${r}, ${n})`);
1224
1231
  }
1225
1232
  }, "positionEdgeLabel"), hr = /* @__PURE__ */ d((e, t) => {
1226
- const s = e.x, n = e.y, i = Math.abs(t.x - s), a = Math.abs(t.y - n), r = e.width / 2, l = e.height / 2;
1227
- return i >= r || a >= l;
1228
- }, "outsideNode"), dr = /* @__PURE__ */ d((e, t, s) => {
1233
+ const a = e.x, i = e.y, l = Math.abs(t.x - a), s = Math.abs(t.y - i), r = e.width / 2, n = e.height / 2;
1234
+ return l >= r || s >= n;
1235
+ }, "outsideNode"), dr = /* @__PURE__ */ d((e, t, a) => {
1229
1236
  L.debug(`intersection calc abc89:
1230
1237
  outsidePoint: ${JSON.stringify(t)}
1231
- insidePoint : ${JSON.stringify(s)}
1238
+ insidePoint : ${JSON.stringify(a)}
1232
1239
  node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);
1233
- const n = e.x, i = e.y, a = Math.abs(n - s.x), r = e.width / 2;
1234
- let l = s.x < t.x ? r - a : r + a;
1235
- const c = e.height / 2, u = Math.abs(t.y - s.y), h = Math.abs(t.x - s.x);
1236
- if (Math.abs(i - t.y) * r > Math.abs(n - t.x) * c) {
1237
- let x = s.y < t.y ? t.y - c - i : i - c - t.y;
1238
- l = h * x / u;
1240
+ const i = e.x, l = e.y, s = Math.abs(i - a.x), r = e.width / 2;
1241
+ let n = a.x < t.x ? r - s : r + s;
1242
+ const c = e.height / 2, u = Math.abs(t.y - a.y), o = Math.abs(t.x - a.x);
1243
+ if (Math.abs(l - t.y) * r > Math.abs(i - t.x) * c) {
1244
+ let x = a.y < t.y ? t.y - c - l : l - c - t.y;
1245
+ n = o * x / u;
1239
1246
  const w = {
1240
- x: s.x < t.x ? s.x + l : s.x - h + l,
1241
- y: s.y < t.y ? s.y + u - x : s.y - u + x
1247
+ x: a.x < t.x ? a.x + n : a.x - o + n,
1248
+ y: a.y < t.y ? a.y + u - x : a.y - u + x
1242
1249
  };
1243
- return l === 0 && (w.x = t.x, w.y = t.y), h === 0 && (w.x = t.x), u === 0 && (w.y = t.y), L.debug(`abc89 topp/bott calc, Q ${u}, q ${x}, R ${h}, r ${l}`, w), w;
1250
+ return n === 0 && (w.x = t.x, w.y = t.y), o === 0 && (w.x = t.x), u === 0 && (w.y = t.y), L.debug(`abc89 topp/bott calc, Q ${u}, q ${x}, R ${o}, r ${n}`, w), w;
1244
1251
  } else {
1245
- s.x < t.x ? l = t.x - r - n : l = n - r - t.x;
1246
- let x = u * l / h, w = s.x < t.x ? s.x + h - l : s.x - h + l, b = s.y < t.y ? s.y + x : s.y - x;
1247
- return L.debug(`sides calc abc89, Q ${u}, q ${x}, R ${h}, r ${l}`, { _x: w, _y: b }), l === 0 && (w = t.x, b = t.y), h === 0 && (w = t.x), u === 0 && (b = t.y), { x: w, y: b };
1252
+ a.x < t.x ? n = t.x - r - i : n = i - r - t.x;
1253
+ let x = u * n / o, w = a.x < t.x ? a.x + o - n : a.x - o + n, b = a.y < t.y ? a.y + x : a.y - x;
1254
+ return L.debug(`sides calc abc89, Q ${u}, q ${x}, R ${o}, r ${n}`, { _x: w, _y: b }), n === 0 && (w = t.x, b = t.y), o === 0 && (w = t.x), u === 0 && (b = t.y), { x: w, y: b };
1248
1255
  }
1249
1256
  }, "intersection"), Rt = /* @__PURE__ */ d((e, t) => {
1250
1257
  L.debug("abc88 cutPathAtIntersect", e, t);
1251
- let s = [], n = e[0], i = false;
1252
- return e.forEach((a) => {
1253
- if (!hr(t, a) && !i) {
1254
- const r = dr(t, n, a);
1255
- let l = false;
1256
- s.forEach((c) => {
1257
- l = l || c.x === r.x && c.y === r.y;
1258
- }), s.some((c) => c.x === r.x && c.y === r.y) || s.push(r), i = true;
1258
+ let a = [], i = e[0], l = false;
1259
+ return e.forEach((s) => {
1260
+ if (!hr(t, s) && !l) {
1261
+ const r = dr(t, i, s);
1262
+ let n = false;
1263
+ a.forEach((c) => {
1264
+ n = n || c.x === r.x && c.y === r.y;
1265
+ }), a.some((c) => c.x === r.x && c.y === r.y) || a.push(r), l = true;
1259
1266
  } else
1260
- n = a, i || s.push(a);
1261
- }), s;
1262
- }, "cutPathAtIntersect"), gr = /* @__PURE__ */ d(function(e, t, s, n, i, a, r) {
1263
- let l = s.points;
1264
- L.debug("abc88 InsertEdge: edge=", s, "e=", t);
1267
+ i = s, l || a.push(s);
1268
+ }), a;
1269
+ }, "cutPathAtIntersect"), gr = /* @__PURE__ */ d(function(e, t, a, i, l, s, r) {
1270
+ let n = a.points;
1271
+ L.debug("abc88 InsertEdge: edge=", a, "e=", t);
1265
1272
  let c = false;
1266
- const u = a.node(t.v);
1267
- var h = a.node(t.w);
1268
- (h == null ? void 0 : h.intersect) && (u == null ? void 0 : u.intersect) && (l = l.slice(1, s.points.length - 1), l.unshift(u.intersect(l[0])), l.push(h.intersect(l[l.length - 1]))), s.toCluster && (L.debug("to cluster abc88", n[s.toCluster]), l = Rt(s.points, n[s.toCluster].node), c = true), s.fromCluster && (L.debug("from cluster abc88", n[s.fromCluster]), l = Rt(l.reverse(), n[s.fromCluster].node).reverse(), c = true);
1269
- const x = l.filter((y) => !Number.isNaN(y.y));
1273
+ const u = s.node(t.v);
1274
+ var o = s.node(t.w);
1275
+ (o == null ? void 0 : o.intersect) && (u == null ? void 0 : u.intersect) && (n = n.slice(1, a.points.length - 1), n.unshift(u.intersect(n[0])), n.push(o.intersect(n[n.length - 1]))), a.toCluster && (L.debug("to cluster abc88", i[a.toCluster]), n = Rt(a.points, i[a.toCluster].node), c = true), a.fromCluster && (L.debug("from cluster abc88", i[a.fromCluster]), n = Rt(n.reverse(), i[a.fromCluster].node).reverse(), c = true);
1276
+ const x = n.filter((y) => !Number.isNaN(y.y));
1270
1277
  let w = ke;
1271
- s.curve && (i === "graph" || i === "flowchart") && (w = s.curve);
1272
- const { x: b, y: S } = ue(s), E = Se().x(b).y(S).curve(w);
1278
+ a.curve && (l === "graph" || l === "flowchart") && (w = a.curve);
1279
+ const { x: b, y: S } = ue(a), v = Se().x(b).y(S).curve(w);
1273
1280
  let k;
1274
- switch (s.thickness) {
1281
+ switch (a.thickness) {
1275
1282
  case "normal":
1276
1283
  k = "edge-thickness-normal";
1277
1284
  break;
@@ -1284,7 +1291,7 @@ var or = /* @__PURE__ */ d((e, t) => {
1284
1291
  default:
1285
1292
  k = "";
1286
1293
  }
1287
- switch (s.pattern) {
1294
+ switch (a.pattern) {
1288
1295
  case "solid":
1289
1296
  k += " edge-pattern-solid";
1290
1297
  break;
@@ -1295,15 +1302,15 @@ var or = /* @__PURE__ */ d((e, t) => {
1295
1302
  k += " edge-pattern-dashed";
1296
1303
  break;
1297
1304
  }
1298
- const B = e.append("path").attr("d", E(x)).attr("id", s.id).attr("class", " " + k + (s.classes ? " " + s.classes : "")).attr("style", s.style);
1305
+ const B = e.append("path").attr("d", v(x)).attr("id", a.id).attr("class", " " + k + (a.classes ? " " + a.classes : "")).attr("style", a.style);
1299
1306
  let _ = "";
1300
- (R().flowchart.arrowMarkerAbsolute || R().state.arrowMarkerAbsolute) && (_ = pe(true)), nr(B, s, _, r, i);
1307
+ (R().flowchart.arrowMarkerAbsolute || R().state.arrowMarkerAbsolute) && (_ = pe(true)), nr(B, a, _, r, l);
1301
1308
  let D = {};
1302
- return c && (D.updatedPath = l), D.originalPath = s.points, D;
1309
+ return c && (D.updatedPath = n), D.originalPath = a.points, D;
1303
1310
  }, "insertEdge"), ur = /* @__PURE__ */ d((e) => {
1304
1311
  const t = /* @__PURE__ */ new Set();
1305
- for (const s of e)
1306
- switch (s) {
1312
+ for (const a of e)
1313
+ switch (a) {
1307
1314
  case "x":
1308
1315
  t.add("right"), t.add("left");
1309
1316
  break;
@@ -1311,141 +1318,141 @@ var or = /* @__PURE__ */ d((e, t) => {
1311
1318
  t.add("up"), t.add("down");
1312
1319
  break;
1313
1320
  default:
1314
- t.add(s);
1321
+ t.add(a);
1315
1322
  break;
1316
1323
  }
1317
1324
  return t;
1318
- }, "expandAndDeduplicateDirections"), pr = /* @__PURE__ */ d((e, t, s) => {
1319
- const n = ur(e), i = 2, a = t.height + 2 * s.padding, r = a / i, l = t.width + 2 * r + s.padding, c = s.padding / 2;
1320
- return n.has("right") && n.has("left") && n.has("up") && n.has("down") ? [
1325
+ }, "expandAndDeduplicateDirections"), pr = /* @__PURE__ */ d((e, t, a) => {
1326
+ const i = ur(e), l = 2, s = t.height + 2 * a.padding, r = s / l, n = t.width + 2 * r + a.padding, c = a.padding / 2;
1327
+ return i.has("right") && i.has("left") && i.has("up") && i.has("down") ? [
1321
1328
  // Bottom
1322
1329
  { x: 0, y: 0 },
1323
1330
  { x: r, y: 0 },
1324
- { x: l / 2, y: 2 * c },
1325
- { x: l - r, y: 0 },
1326
- { x: l, y: 0 },
1331
+ { x: n / 2, y: 2 * c },
1332
+ { x: n - r, y: 0 },
1333
+ { x: n, y: 0 },
1327
1334
  // Right
1328
- { x: l, y: -a / 3 },
1329
- { x: l + 2 * c, y: -a / 2 },
1330
- { x: l, y: -2 * a / 3 },
1331
- { x: l, y: -a },
1335
+ { x: n, y: -s / 3 },
1336
+ { x: n + 2 * c, y: -s / 2 },
1337
+ { x: n, y: -2 * s / 3 },
1338
+ { x: n, y: -s },
1332
1339
  // Top
1333
- { x: l - r, y: -a },
1334
- { x: l / 2, y: -a - 2 * c },
1335
- { x: r, y: -a },
1340
+ { x: n - r, y: -s },
1341
+ { x: n / 2, y: -s - 2 * c },
1342
+ { x: r, y: -s },
1336
1343
  // Left
1337
- { x: 0, y: -a },
1338
- { x: 0, y: -2 * a / 3 },
1339
- { x: -2 * c, y: -a / 2 },
1340
- { x: 0, y: -a / 3 }
1341
- ] : n.has("right") && n.has("left") && n.has("up") ? [
1344
+ { x: 0, y: -s },
1345
+ { x: 0, y: -2 * s / 3 },
1346
+ { x: -2 * c, y: -s / 2 },
1347
+ { x: 0, y: -s / 3 }
1348
+ ] : i.has("right") && i.has("left") && i.has("up") ? [
1342
1349
  { x: r, y: 0 },
1343
- { x: l - r, y: 0 },
1344
- { x: l, y: -a / 2 },
1345
- { x: l - r, y: -a },
1346
- { x: r, y: -a },
1347
- { x: 0, y: -a / 2 }
1348
- ] : n.has("right") && n.has("left") && n.has("down") ? [
1350
+ { x: n - r, y: 0 },
1351
+ { x: n, y: -s / 2 },
1352
+ { x: n - r, y: -s },
1353
+ { x: r, y: -s },
1354
+ { x: 0, y: -s / 2 }
1355
+ ] : i.has("right") && i.has("left") && i.has("down") ? [
1349
1356
  { x: 0, y: 0 },
1350
- { x: r, y: -a },
1351
- { x: l - r, y: -a },
1352
- { x: l, y: 0 }
1353
- ] : n.has("right") && n.has("up") && n.has("down") ? [
1357
+ { x: r, y: -s },
1358
+ { x: n - r, y: -s },
1359
+ { x: n, y: 0 }
1360
+ ] : i.has("right") && i.has("up") && i.has("down") ? [
1354
1361
  { x: 0, y: 0 },
1355
- { x: l, y: -r },
1356
- { x: l, y: -a + r },
1357
- { x: 0, y: -a }
1358
- ] : n.has("left") && n.has("up") && n.has("down") ? [
1359
- { x: l, y: 0 },
1362
+ { x: n, y: -r },
1363
+ { x: n, y: -s + r },
1364
+ { x: 0, y: -s }
1365
+ ] : i.has("left") && i.has("up") && i.has("down") ? [
1366
+ { x: n, y: 0 },
1360
1367
  { x: 0, y: -r },
1361
- { x: 0, y: -a + r },
1362
- { x: l, y: -a }
1363
- ] : n.has("right") && n.has("left") ? [
1368
+ { x: 0, y: -s + r },
1369
+ { x: n, y: -s }
1370
+ ] : i.has("right") && i.has("left") ? [
1364
1371
  { x: r, y: 0 },
1365
1372
  { x: r, y: -c },
1366
- { x: l - r, y: -c },
1367
- { x: l - r, y: 0 },
1368
- { x: l, y: -a / 2 },
1369
- { x: l - r, y: -a },
1370
- { x: l - r, y: -a + c },
1371
- { x: r, y: -a + c },
1372
- { x: r, y: -a },
1373
- { x: 0, y: -a / 2 }
1374
- ] : n.has("up") && n.has("down") ? [
1373
+ { x: n - r, y: -c },
1374
+ { x: n - r, y: 0 },
1375
+ { x: n, y: -s / 2 },
1376
+ { x: n - r, y: -s },
1377
+ { x: n - r, y: -s + c },
1378
+ { x: r, y: -s + c },
1379
+ { x: r, y: -s },
1380
+ { x: 0, y: -s / 2 }
1381
+ ] : i.has("up") && i.has("down") ? [
1375
1382
  // Bottom center
1376
- { x: l / 2, y: 0 },
1383
+ { x: n / 2, y: 0 },
1377
1384
  // Left pont of bottom arrow
1378
1385
  { x: 0, y: -c },
1379
1386
  { x: r, y: -c },
1380
1387
  // Left top over vertical section
1381
- { x: r, y: -a + c },
1382
- { x: 0, y: -a + c },
1388
+ { x: r, y: -s + c },
1389
+ { x: 0, y: -s + c },
1383
1390
  // Top of arrow
1384
- { x: l / 2, y: -a },
1385
- { x: l, y: -a + c },
1391
+ { x: n / 2, y: -s },
1392
+ { x: n, y: -s + c },
1386
1393
  // Top of right vertical bar
1387
- { x: l - r, y: -a + c },
1388
- { x: l - r, y: -c },
1389
- { x: l, y: -c }
1390
- ] : n.has("right") && n.has("up") ? [
1394
+ { x: n - r, y: -s + c },
1395
+ { x: n - r, y: -c },
1396
+ { x: n, y: -c }
1397
+ ] : i.has("right") && i.has("up") ? [
1391
1398
  { x: 0, y: 0 },
1392
- { x: l, y: -r },
1393
- { x: 0, y: -a }
1394
- ] : n.has("right") && n.has("down") ? [
1399
+ { x: n, y: -r },
1400
+ { x: 0, y: -s }
1401
+ ] : i.has("right") && i.has("down") ? [
1395
1402
  { x: 0, y: 0 },
1396
- { x: l, y: 0 },
1397
- { x: 0, y: -a }
1398
- ] : n.has("left") && n.has("up") ? [
1399
- { x: l, y: 0 },
1403
+ { x: n, y: 0 },
1404
+ { x: 0, y: -s }
1405
+ ] : i.has("left") && i.has("up") ? [
1406
+ { x: n, y: 0 },
1400
1407
  { x: 0, y: -r },
1401
- { x: l, y: -a }
1402
- ] : n.has("left") && n.has("down") ? [
1403
- { x: l, y: 0 },
1408
+ { x: n, y: -s }
1409
+ ] : i.has("left") && i.has("down") ? [
1410
+ { x: n, y: 0 },
1404
1411
  { x: 0, y: 0 },
1405
- { x: l, y: -a }
1406
- ] : n.has("right") ? [
1412
+ { x: n, y: -s }
1413
+ ] : i.has("right") ? [
1407
1414
  { x: r, y: -c },
1408
1415
  { x: r, y: -c },
1409
- { x: l - r, y: -c },
1410
- { x: l - r, y: 0 },
1411
- { x: l, y: -a / 2 },
1412
- { x: l - r, y: -a },
1413
- { x: l - r, y: -a + c },
1416
+ { x: n - r, y: -c },
1417
+ { x: n - r, y: 0 },
1418
+ { x: n, y: -s / 2 },
1419
+ { x: n - r, y: -s },
1420
+ { x: n - r, y: -s + c },
1414
1421
  // top left corner of arrow
1415
- { x: r, y: -a + c },
1416
- { x: r, y: -a + c }
1417
- ] : n.has("left") ? [
1422
+ { x: r, y: -s + c },
1423
+ { x: r, y: -s + c }
1424
+ ] : i.has("left") ? [
1418
1425
  { x: r, y: 0 },
1419
1426
  { x: r, y: -c },
1420
1427
  // Two points, the right corners
1421
- { x: l - r, y: -c },
1422
- { x: l - r, y: -a + c },
1423
- { x: r, y: -a + c },
1424
- { x: r, y: -a },
1425
- { x: 0, y: -a / 2 }
1426
- ] : n.has("up") ? [
1428
+ { x: n - r, y: -c },
1429
+ { x: n - r, y: -s + c },
1430
+ { x: r, y: -s + c },
1431
+ { x: r, y: -s },
1432
+ { x: 0, y: -s / 2 }
1433
+ ] : i.has("up") ? [
1427
1434
  // Bottom center
1428
1435
  { x: r, y: -c },
1429
1436
  // Left top over vertical section
1430
- { x: r, y: -a + c },
1431
- { x: 0, y: -a + c },
1437
+ { x: r, y: -s + c },
1438
+ { x: 0, y: -s + c },
1432
1439
  // Top of arrow
1433
- { x: l / 2, y: -a },
1434
- { x: l, y: -a + c },
1440
+ { x: n / 2, y: -s },
1441
+ { x: n, y: -s + c },
1435
1442
  // Top of right vertical bar
1436
- { x: l - r, y: -a + c },
1437
- { x: l - r, y: -c }
1438
- ] : n.has("down") ? [
1443
+ { x: n - r, y: -s + c },
1444
+ { x: n - r, y: -c }
1445
+ ] : i.has("down") ? [
1439
1446
  // Bottom center
1440
- { x: l / 2, y: 0 },
1447
+ { x: n / 2, y: 0 },
1441
1448
  // Left pont of bottom arrow
1442
1449
  { x: 0, y: -c },
1443
1450
  { x: r, y: -c },
1444
1451
  // Left top over vertical section
1445
- { x: r, y: -a + c },
1446
- { x: l - r, y: -a + c },
1447
- { x: l - r, y: -c },
1448
- { x: l, y: -c }
1452
+ { x: r, y: -s + c },
1453
+ { x: n - r, y: -s + c },
1454
+ { x: n - r, y: -c },
1455
+ { x: n, y: -c }
1449
1456
  ] : [{ x: 0, y: 0 }];
1450
1457
  }, "getArrowPoints");
1451
1458
  function Gt(e, t) {
@@ -1453,90 +1460,90 @@ function Gt(e, t) {
1453
1460
  }
1454
1461
  d(Gt, "intersectNode");
1455
1462
  var fr = Gt;
1456
- function Zt(e, t, s, n) {
1457
- var i = e.x, a = e.y, r = i - n.x, l = a - n.y, c = Math.sqrt(t * t * l * l + s * s * r * r), u = Math.abs(t * s * r / c);
1458
- n.x < i && (u = -u);
1459
- var h = Math.abs(t * s * l / c);
1460
- return n.y < a && (h = -h), { x: i + u, y: a + h };
1463
+ function Zt(e, t, a, i) {
1464
+ var l = e.x, s = e.y, r = l - i.x, n = s - i.y, c = Math.sqrt(t * t * n * n + a * a * r * r), u = Math.abs(t * a * r / c);
1465
+ i.x < l && (u = -u);
1466
+ var o = Math.abs(t * a * n / c);
1467
+ return i.y < s && (o = -o), { x: l + u, y: s + o };
1461
1468
  }
1462
1469
  d(Zt, "intersectEllipse");
1463
1470
  var qt = Zt;
1464
- function Jt(e, t, s) {
1465
- return qt(e, t, t, s);
1471
+ function Jt(e, t, a) {
1472
+ return qt(e, t, t, a);
1466
1473
  }
1467
1474
  d(Jt, "intersectCircle");
1468
1475
  var xr = Jt;
1469
- function Qt(e, t, s, n) {
1470
- var i, a, r, l, c, u, h, x, w, b, S, E, k, B, _;
1471
- if (i = t.y - e.y, r = e.x - t.x, c = t.x * e.y - e.x * t.y, w = i * s.x + r * s.y + c, b = i * n.x + r * n.y + c, !(w !== 0 && b !== 0 && Lt(w, b)) && (a = n.y - s.y, l = s.x - n.x, u = n.x * s.y - s.x * n.y, h = a * e.x + l * e.y + u, x = a * t.x + l * t.y + u, !(h !== 0 && x !== 0 && Lt(h, x)) && (S = i * l - a * r, S !== 0)))
1472
- return E = Math.abs(S / 2), k = r * u - l * c, B = k < 0 ? (k - E) / S : (k + E) / S, k = a * c - i * u, _ = k < 0 ? (k - E) / S : (k + E) / S, { x: B, y: _ };
1476
+ function Qt(e, t, a, i) {
1477
+ var l, s, r, n, c, u, o, x, w, b, S, v, k, B, _;
1478
+ if (l = t.y - e.y, r = e.x - t.x, c = t.x * e.y - e.x * t.y, w = l * a.x + r * a.y + c, b = l * i.x + r * i.y + c, !(w !== 0 && b !== 0 && St(w, b)) && (s = i.y - a.y, n = a.x - i.x, u = i.x * a.y - a.x * i.y, o = s * e.x + n * e.y + u, x = s * t.x + n * t.y + u, !(o !== 0 && x !== 0 && St(o, x)) && (S = l * n - s * r, S !== 0)))
1479
+ return v = Math.abs(S / 2), k = r * u - n * c, B = k < 0 ? (k - v) / S : (k + v) / S, k = s * c - l * u, _ = k < 0 ? (k - v) / S : (k + v) / S, { x: B, y: _ };
1473
1480
  }
1474
1481
  d(Qt, "intersectLine");
1475
- function Lt(e, t) {
1482
+ function St(e, t) {
1476
1483
  return e * t > 0;
1477
1484
  }
1478
- d(Lt, "sameSign");
1485
+ d(St, "sameSign");
1479
1486
  var yr = Qt, br = $t;
1480
- function $t(e, t, s) {
1481
- var n = e.x, i = e.y, a = [], r = Number.POSITIVE_INFINITY, l = Number.POSITIVE_INFINITY;
1487
+ function $t(e, t, a) {
1488
+ var i = e.x, l = e.y, s = [], r = Number.POSITIVE_INFINITY, n = Number.POSITIVE_INFINITY;
1482
1489
  typeof t.forEach == "function" ? t.forEach(function(S) {
1483
- r = Math.min(r, S.x), l = Math.min(l, S.y);
1484
- }) : (r = Math.min(r, t.x), l = Math.min(l, t.y));
1485
- for (var c = n - e.width / 2 - r, u = i - e.height / 2 - l, h = 0; h < t.length; h++) {
1486
- var x = t[h], w = t[h < t.length - 1 ? h + 1 : 0], b = yr(
1490
+ r = Math.min(r, S.x), n = Math.min(n, S.y);
1491
+ }) : (r = Math.min(r, t.x), n = Math.min(n, t.y));
1492
+ for (var c = i - e.width / 2 - r, u = l - e.height / 2 - n, o = 0; o < t.length; o++) {
1493
+ var x = t[o], w = t[o < t.length - 1 ? o + 1 : 0], b = yr(
1487
1494
  e,
1488
- s,
1495
+ a,
1489
1496
  { x: c + x.x, y: u + x.y },
1490
1497
  { x: c + w.x, y: u + w.y }
1491
1498
  );
1492
- b && a.push(b);
1499
+ b && s.push(b);
1493
1500
  }
1494
- return a.length ? (a.length > 1 && a.sort(function(S, E) {
1495
- var k = S.x - s.x, B = S.y - s.y, _ = Math.sqrt(k * k + B * B), D = E.x - s.x, y = E.y - s.y, g = Math.sqrt(D * D + y * y);
1501
+ return s.length ? (s.length > 1 && s.sort(function(S, v) {
1502
+ var k = S.x - a.x, B = S.y - a.y, _ = Math.sqrt(k * k + B * B), D = v.x - a.x, y = v.y - a.y, g = Math.sqrt(D * D + y * y);
1496
1503
  return _ < g ? -1 : _ === g ? 0 : 1;
1497
- }), a[0]) : e;
1504
+ }), s[0]) : e;
1498
1505
  }
1499
1506
  d($t, "intersectPolygon");
1500
1507
  var wr = /* @__PURE__ */ d((e, t) => {
1501
- var s = e.x, n = e.y, i = t.x - s, a = t.y - n, r = e.width / 2, l = e.height / 2, c, u;
1502
- return Math.abs(a) * r > Math.abs(i) * l ? (a < 0 && (l = -l), c = a === 0 ? 0 : l * i / a, u = l) : (i < 0 && (r = -r), c = r, u = i === 0 ? 0 : r * a / i), { x: s + c, y: n + u };
1508
+ var a = e.x, i = e.y, l = t.x - a, s = t.y - i, r = e.width / 2, n = e.height / 2, c, u;
1509
+ return Math.abs(s) * r > Math.abs(l) * n ? (s < 0 && (n = -n), c = s === 0 ? 0 : n * l / s, u = n) : (l < 0 && (r = -r), c = r, u = l === 0 ? 0 : r * s / l), { x: a + c, y: i + u };
1503
1510
  }, "intersectRect"), mr = wr, N = {
1504
1511
  node: fr,
1505
1512
  circle: xr,
1506
1513
  ellipse: qt,
1507
1514
  polygon: br,
1508
1515
  rect: mr
1509
- }, A = /* @__PURE__ */ d(async (e, t, s, n) => {
1510
- const i = R();
1511
- let a;
1512
- const r = t.useHtmlLabels || j(i.flowchart.htmlLabels);
1513
- s ? a = s : a = "node default";
1514
- const l = e.insert("g").attr("class", a).attr("id", t.domId || t.id), c = l.insert("g").attr("class", "label").attr("style", t.labelStyle);
1516
+ }, A = /* @__PURE__ */ d(async (e, t, a, i) => {
1517
+ const l = R();
1518
+ let s;
1519
+ const r = t.useHtmlLabels || j(l.flowchart.htmlLabels);
1520
+ a ? s = a : s = "node default";
1521
+ const n = e.insert("g").attr("class", s).attr("id", t.domId || t.id), c = n.insert("g").attr("class", "label").attr("style", t.labelStyle);
1515
1522
  let u;
1516
1523
  t.labelText === void 0 ? u = "" : u = typeof t.labelText == "string" ? t.labelText : t.labelText[0];
1517
- const h = c.node();
1524
+ const o = c.node();
1518
1525
  let x;
1519
1526
  t.labelType === "markdown" ? x = Wt(
1520
1527
  c,
1521
- Tt(xt(u), i),
1528
+ yt(xt(u), l),
1522
1529
  {
1523
1530
  useHtmlLabels: r,
1524
- width: t.width || i.flowchart.wrappingWidth,
1531
+ width: t.width || l.flowchart.wrappingWidth,
1525
1532
  classes: "markdown-node-label"
1526
1533
  },
1527
- i
1528
- ) : x = h.appendChild(
1534
+ l
1535
+ ) : x = o.appendChild(
1529
1536
  await K(
1530
- Tt(xt(u), i),
1537
+ yt(xt(u), l),
1531
1538
  t.labelStyle,
1532
1539
  false,
1533
- n
1540
+ i
1534
1541
  )
1535
1542
  );
1536
1543
  let w = x.getBBox();
1537
1544
  const b = t.padding / 2;
1538
- if (j(i.flowchart.htmlLabels)) {
1539
- const S = x.children[0], E = O(x), k = S.getElementsByTagName("img");
1545
+ if (j(l.flowchart.htmlLabels)) {
1546
+ const S = x.children[0], v = O(x), k = S.getElementsByTagName("img");
1540
1547
  if (k) {
1541
1548
  const B = u.replace(/<img[^>]*>/g, "").trim() === "";
1542
1549
  await Promise.all(
@@ -1544,7 +1551,7 @@ var wr = /* @__PURE__ */ d((e, t) => {
1544
1551
  (_) => new Promise((D) => {
1545
1552
  function y() {
1546
1553
  if (_.style.display = "flex", _.style.flexDirection = "column", B) {
1547
- const g = i.fontSize ? i.fontSize : window.getComputedStyle(document.body).fontSize, m = parseInt(g, 10) * 5 + "px";
1554
+ const g = l.fontSize ? l.fontSize : window.getComputedStyle(document.body).fontSize, m = parseInt(g, 10) * 5 + "px";
1548
1555
  _.style.minWidth = m, _.style.maxWidth = m;
1549
1556
  } else
1550
1557
  _.style.width = "100%";
@@ -1557,262 +1564,262 @@ var wr = /* @__PURE__ */ d((e, t) => {
1557
1564
  )
1558
1565
  );
1559
1566
  }
1560
- w = S.getBoundingClientRect(), E.attr("width", w.width), E.attr("height", w.height);
1567
+ w = S.getBoundingClientRect(), v.attr("width", w.width), v.attr("height", w.height);
1561
1568
  }
1562
- return r ? c.attr("transform", "translate(" + -w.width / 2 + ", " + -w.height / 2 + ")") : c.attr("transform", "translate(0, " + -w.height / 2 + ")"), t.centerLabel && c.attr("transform", "translate(" + -w.width / 2 + ", " + -w.height / 2 + ")"), c.insert("rect", ":first-child"), { shapeSvg: l, bbox: w, halfPadding: b, label: c };
1569
+ return r ? c.attr("transform", "translate(" + -w.width / 2 + ", " + -w.height / 2 + ")") : c.attr("transform", "translate(0, " + -w.height / 2 + ")"), t.centerLabel && c.attr("transform", "translate(" + -w.width / 2 + ", " + -w.height / 2 + ")"), c.insert("rect", ":first-child"), { shapeSvg: n, bbox: w, halfPadding: b, label: c };
1563
1570
  }, "labelHelper"), T = /* @__PURE__ */ d((e, t) => {
1564
- const s = t.node().getBBox();
1565
- e.width = s.width, e.height = s.height;
1571
+ const a = t.node().getBBox();
1572
+ e.width = a.width, e.height = a.height;
1566
1573
  }, "updateNodeBounds");
1567
- function U(e, t, s, n) {
1574
+ function U(e, t, a, i) {
1568
1575
  return e.insert("polygon", ":first-child").attr(
1569
1576
  "points",
1570
- n.map(function(i) {
1571
- return i.x + "," + i.y;
1577
+ i.map(function(l) {
1578
+ return l.x + "," + l.y;
1572
1579
  }).join(" ")
1573
- ).attr("class", "label-container").attr("transform", "translate(" + -t / 2 + "," + s / 2 + ")");
1580
+ ).attr("class", "label-container").attr("transform", "translate(" + -t / 2 + "," + a / 2 + ")");
1574
1581
  }
1575
1582
  d(U, "insertPolygonShape");
1576
1583
  var Lr = /* @__PURE__ */ d(async (e, t) => {
1577
1584
  t.useHtmlLabels || R().flowchart.htmlLabels || (t.centerLabel = true);
1578
- const { shapeSvg: n, bbox: i, halfPadding: a } = await A(
1585
+ const { shapeSvg: i, bbox: l, halfPadding: s } = await A(
1579
1586
  e,
1580
1587
  t,
1581
1588
  "node " + t.classes,
1582
1589
  true
1583
1590
  );
1584
1591
  L.info("Classes = ", t.classes);
1585
- const r = n.insert("rect", ":first-child");
1586
- return r.attr("rx", t.rx).attr("ry", t.ry).attr("x", -i.width / 2 - a).attr("y", -i.height / 2 - a).attr("width", i.width + t.padding).attr("height", i.height + t.padding), T(t, r), t.intersect = function(l) {
1587
- return N.rect(t, l);
1588
- }, n;
1592
+ const r = i.insert("rect", ":first-child");
1593
+ return r.attr("rx", t.rx).attr("ry", t.ry).attr("x", -l.width / 2 - s).attr("y", -l.height / 2 - s).attr("width", l.width + t.padding).attr("height", l.height + t.padding), T(t, r), t.intersect = function(n) {
1594
+ return N.rect(t, n);
1595
+ }, i;
1589
1596
  }, "note"), Sr = Lr, zt = /* @__PURE__ */ d((e) => e ? " " + e : "", "formatClass"), Y = /* @__PURE__ */ d((e, t) => `${t || "node default"}${zt(e.classes)} ${zt(
1590
1597
  e.class
1591
1598
  )}`, "getClassesFromNode"), At = /* @__PURE__ */ d(async (e, t) => {
1592
- const { shapeSvg: s, bbox: n } = await A(
1599
+ const { shapeSvg: a, bbox: i } = await A(
1593
1600
  e,
1594
1601
  t,
1595
1602
  Y(t, void 0),
1596
1603
  true
1597
- ), i = n.width + t.padding, a = n.height + t.padding, r = i + a, l = [
1604
+ ), l = i.width + t.padding, s = i.height + t.padding, r = l + s, n = [
1598
1605
  { x: r / 2, y: 0 },
1599
1606
  { x: r, y: -r / 2 },
1600
1607
  { x: r / 2, y: -r },
1601
1608
  { x: 0, y: -r / 2 }
1602
1609
  ];
1603
1610
  L.info("Question main (Circle)");
1604
- const c = U(s, r, r, l);
1611
+ const c = U(a, r, r, n);
1605
1612
  return c.attr("style", t.style), T(t, c), t.intersect = function(u) {
1606
- return L.warn("Intersect called"), N.polygon(t, l, u);
1607
- }, s;
1613
+ return L.warn("Intersect called"), N.polygon(t, n, u);
1614
+ }, a;
1608
1615
  }, "question"), kr = /* @__PURE__ */ d((e, t) => {
1609
- const s = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), n = 28, i = [
1610
- { x: 0, y: n / 2 },
1611
- { x: n / 2, y: 0 },
1612
- { x: 0, y: -n / 2 },
1613
- { x: -n / 2, y: 0 }
1616
+ const a = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), i = 28, l = [
1617
+ { x: 0, y: i / 2 },
1618
+ { x: i / 2, y: 0 },
1619
+ { x: 0, y: -i / 2 },
1620
+ { x: -i / 2, y: 0 }
1614
1621
  ];
1615
- return s.insert("polygon", ":first-child").attr(
1622
+ return a.insert("polygon", ":first-child").attr(
1616
1623
  "points",
1617
- i.map(function(r) {
1624
+ l.map(function(r) {
1618
1625
  return r.x + "," + r.y;
1619
1626
  }).join(" ")
1620
1627
  ).attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28), t.width = 28, t.height = 28, t.intersect = function(r) {
1621
1628
  return N.circle(t, 14, r);
1622
- }, s;
1629
+ }, a;
1623
1630
  }, "choice"), vr = /* @__PURE__ */ d(async (e, t) => {
1624
- const { shapeSvg: s, bbox: n } = await A(
1631
+ const { shapeSvg: a, bbox: i } = await A(
1625
1632
  e,
1626
1633
  t,
1627
1634
  Y(t, void 0),
1628
1635
  true
1629
- ), i = 4, a = n.height + t.padding, r = a / i, l = n.width + 2 * r + t.padding, c = [
1636
+ ), l = 4, s = i.height + t.padding, r = s / l, n = i.width + 2 * r + t.padding, c = [
1630
1637
  { x: r, y: 0 },
1631
- { x: l - r, y: 0 },
1632
- { x: l, y: -a / 2 },
1633
- { x: l - r, y: -a },
1634
- { x: r, y: -a },
1635
- { x: 0, y: -a / 2 }
1636
- ], u = U(s, l, a, c);
1637
- return u.attr("style", t.style), T(t, u), t.intersect = function(h) {
1638
- return N.polygon(t, c, h);
1639
- }, s;
1638
+ { x: n - r, y: 0 },
1639
+ { x: n, y: -s / 2 },
1640
+ { x: n - r, y: -s },
1641
+ { x: r, y: -s },
1642
+ { x: 0, y: -s / 2 }
1643
+ ], u = U(a, n, s, c);
1644
+ return u.attr("style", t.style), T(t, u), t.intersect = function(o) {
1645
+ return N.polygon(t, c, o);
1646
+ }, a;
1640
1647
  }, "hexagon"), Er = /* @__PURE__ */ d(async (e, t) => {
1641
- const { shapeSvg: s, bbox: n } = await A(e, t, void 0, true), i = 2, a = n.height + 2 * t.padding, r = a / i, l = n.width + 2 * r + t.padding, c = pr(t.directions, n, t), u = U(s, l, a, c);
1642
- return u.attr("style", t.style), T(t, u), t.intersect = function(h) {
1643
- return N.polygon(t, c, h);
1644
- }, s;
1648
+ const { shapeSvg: a, bbox: i } = await A(e, t, void 0, true), l = 2, s = i.height + 2 * t.padding, r = s / l, n = i.width + 2 * r + t.padding, c = pr(t.directions, i, t), u = U(a, n, s, c);
1649
+ return u.attr("style", t.style), T(t, u), t.intersect = function(o) {
1650
+ return N.polygon(t, c, o);
1651
+ }, a;
1645
1652
  }, "block_arrow"), _r = /* @__PURE__ */ d(async (e, t) => {
1646
- const { shapeSvg: s, bbox: n } = await A(
1653
+ const { shapeSvg: a, bbox: i } = await A(
1647
1654
  e,
1648
1655
  t,
1649
1656
  Y(t, void 0),
1650
1657
  true
1651
- ), i = n.width + t.padding, a = n.height + t.padding, r = [
1652
- { x: -a / 2, y: 0 },
1653
- { x: i, y: 0 },
1654
- { x: i, y: -a },
1655
- { x: -a / 2, y: -a },
1656
- { x: 0, y: -a / 2 }
1658
+ ), l = i.width + t.padding, s = i.height + t.padding, r = [
1659
+ { x: -s / 2, y: 0 },
1660
+ { x: l, y: 0 },
1661
+ { x: l, y: -s },
1662
+ { x: -s / 2, y: -s },
1663
+ { x: 0, y: -s / 2 }
1657
1664
  ];
1658
- return U(s, i, a, r).attr("style", t.style), t.width = i + a, t.height = a, t.intersect = function(c) {
1665
+ return U(a, l, s, r).attr("style", t.style), t.width = l + s, t.height = s, t.intersect = function(c) {
1659
1666
  return N.polygon(t, r, c);
1660
- }, s;
1667
+ }, a;
1661
1668
  }, "rect_left_inv_arrow"), Dr = /* @__PURE__ */ d(async (e, t) => {
1662
- const { shapeSvg: s, bbox: n } = await A(e, t, Y(t), true), i = n.width + t.padding, a = n.height + t.padding, r = [
1663
- { x: -2 * a / 6, y: 0 },
1664
- { x: i - a / 6, y: 0 },
1665
- { x: i + 2 * a / 6, y: -a },
1666
- { x: a / 6, y: -a }
1667
- ], l = U(s, i, a, r);
1668
- return l.attr("style", t.style), T(t, l), t.intersect = function(c) {
1669
+ const { shapeSvg: a, bbox: i } = await A(e, t, Y(t), true), l = i.width + t.padding, s = i.height + t.padding, r = [
1670
+ { x: -2 * s / 6, y: 0 },
1671
+ { x: l - s / 6, y: 0 },
1672
+ { x: l + 2 * s / 6, y: -s },
1673
+ { x: s / 6, y: -s }
1674
+ ], n = U(a, l, s, r);
1675
+ return n.attr("style", t.style), T(t, n), t.intersect = function(c) {
1669
1676
  return N.polygon(t, r, c);
1670
- }, s;
1677
+ }, a;
1671
1678
  }, "lean_right"), Nr = /* @__PURE__ */ d(async (e, t) => {
1672
- const { shapeSvg: s, bbox: n } = await A(
1679
+ const { shapeSvg: a, bbox: i } = await A(
1673
1680
  e,
1674
1681
  t,
1675
1682
  Y(t, void 0),
1676
1683
  true
1677
- ), i = n.width + t.padding, a = n.height + t.padding, r = [
1678
- { x: 2 * a / 6, y: 0 },
1679
- { x: i + a / 6, y: 0 },
1680
- { x: i - 2 * a / 6, y: -a },
1681
- { x: -a / 6, y: -a }
1682
- ], l = U(s, i, a, r);
1683
- return l.attr("style", t.style), T(t, l), t.intersect = function(c) {
1684
+ ), l = i.width + t.padding, s = i.height + t.padding, r = [
1685
+ { x: 2 * s / 6, y: 0 },
1686
+ { x: l + s / 6, y: 0 },
1687
+ { x: l - 2 * s / 6, y: -s },
1688
+ { x: -s / 6, y: -s }
1689
+ ], n = U(a, l, s, r);
1690
+ return n.attr("style", t.style), T(t, n), t.intersect = function(c) {
1684
1691
  return N.polygon(t, r, c);
1685
- }, s;
1692
+ }, a;
1686
1693
  }, "lean_left"), Tr = /* @__PURE__ */ d(async (e, t) => {
1687
- const { shapeSvg: s, bbox: n } = await A(
1694
+ const { shapeSvg: a, bbox: i } = await A(
1688
1695
  e,
1689
1696
  t,
1690
1697
  Y(t, void 0),
1691
1698
  true
1692
- ), i = n.width + t.padding, a = n.height + t.padding, r = [
1693
- { x: -2 * a / 6, y: 0 },
1694
- { x: i + 2 * a / 6, y: 0 },
1695
- { x: i - a / 6, y: -a },
1696
- { x: a / 6, y: -a }
1697
- ], l = U(s, i, a, r);
1698
- return l.attr("style", t.style), T(t, l), t.intersect = function(c) {
1699
+ ), l = i.width + t.padding, s = i.height + t.padding, r = [
1700
+ { x: -2 * s / 6, y: 0 },
1701
+ { x: l + 2 * s / 6, y: 0 },
1702
+ { x: l - s / 6, y: -s },
1703
+ { x: s / 6, y: -s }
1704
+ ], n = U(a, l, s, r);
1705
+ return n.attr("style", t.style), T(t, n), t.intersect = function(c) {
1699
1706
  return N.polygon(t, r, c);
1700
- }, s;
1707
+ }, a;
1701
1708
  }, "trapezoid"), Br = /* @__PURE__ */ d(async (e, t) => {
1702
- const { shapeSvg: s, bbox: n } = await A(
1709
+ const { shapeSvg: a, bbox: i } = await A(
1703
1710
  e,
1704
1711
  t,
1705
1712
  Y(t, void 0),
1706
1713
  true
1707
- ), i = n.width + t.padding, a = n.height + t.padding, r = [
1708
- { x: a / 6, y: 0 },
1709
- { x: i - a / 6, y: 0 },
1710
- { x: i + 2 * a / 6, y: -a },
1711
- { x: -2 * a / 6, y: -a }
1712
- ], l = U(s, i, a, r);
1713
- return l.attr("style", t.style), T(t, l), t.intersect = function(c) {
1714
+ ), l = i.width + t.padding, s = i.height + t.padding, r = [
1715
+ { x: s / 6, y: 0 },
1716
+ { x: l - s / 6, y: 0 },
1717
+ { x: l + 2 * s / 6, y: -s },
1718
+ { x: -2 * s / 6, y: -s }
1719
+ ], n = U(a, l, s, r);
1720
+ return n.attr("style", t.style), T(t, n), t.intersect = function(c) {
1714
1721
  return N.polygon(t, r, c);
1715
- }, s;
1722
+ }, a;
1716
1723
  }, "inv_trapezoid"), Cr = /* @__PURE__ */ d(async (e, t) => {
1717
- const { shapeSvg: s, bbox: n } = await A(
1724
+ const { shapeSvg: a, bbox: i } = await A(
1718
1725
  e,
1719
1726
  t,
1720
1727
  Y(t, void 0),
1721
1728
  true
1722
- ), i = n.width + t.padding, a = n.height + t.padding, r = [
1729
+ ), l = i.width + t.padding, s = i.height + t.padding, r = [
1723
1730
  { x: 0, y: 0 },
1724
- { x: i + a / 2, y: 0 },
1725
- { x: i, y: -a / 2 },
1726
- { x: i + a / 2, y: -a },
1727
- { x: 0, y: -a }
1728
- ], l = U(s, i, a, r);
1729
- return l.attr("style", t.style), T(t, l), t.intersect = function(c) {
1731
+ { x: l + s / 2, y: 0 },
1732
+ { x: l, y: -s / 2 },
1733
+ { x: l + s / 2, y: -s },
1734
+ { x: 0, y: -s }
1735
+ ], n = U(a, l, s, r);
1736
+ return n.attr("style", t.style), T(t, n), t.intersect = function(c) {
1730
1737
  return N.polygon(t, r, c);
1731
- }, s;
1738
+ }, a;
1732
1739
  }, "rect_right_inv_arrow"), Ir = /* @__PURE__ */ d(async (e, t) => {
1733
- const { shapeSvg: s, bbox: n } = await A(
1740
+ const { shapeSvg: a, bbox: i } = await A(
1734
1741
  e,
1735
1742
  t,
1736
1743
  Y(t, void 0),
1737
1744
  true
1738
- ), i = n.width + t.padding, a = i / 2, r = a / (2.5 + i / 50), l = n.height + r + t.padding, c = "M 0," + r + " a " + a + "," + r + " 0,0,0 " + i + " 0 a " + a + "," + r + " 0,0,0 " + -i + " 0 l 0," + l + " a " + a + "," + r + " 0,0,0 " + i + " 0 l 0," + -l, u = s.attr("label-offset-y", r).insert("path", ":first-child").attr("style", t.style).attr("d", c).attr("transform", "translate(" + -i / 2 + "," + -(l / 2 + r) + ")");
1739
- return T(t, u), t.intersect = function(h) {
1740
- const x = N.rect(t, h), w = x.x - t.x;
1741
- if (a != 0 && (Math.abs(w) < t.width / 2 || Math.abs(w) == t.width / 2 && Math.abs(x.y - t.y) > t.height / 2 - r)) {
1742
- let b = r * r * (1 - w * w / (a * a));
1743
- b != 0 && (b = Math.sqrt(b)), b = r - b, h.y - t.y > 0 && (b = -b), x.y += b;
1745
+ ), l = i.width + t.padding, s = l / 2, r = s / (2.5 + l / 50), n = i.height + r + t.padding, c = "M 0," + r + " a " + s + "," + r + " 0,0,0 " + l + " 0 a " + s + "," + r + " 0,0,0 " + -l + " 0 l 0," + n + " a " + s + "," + r + " 0,0,0 " + l + " 0 l 0," + -n, u = a.attr("label-offset-y", r).insert("path", ":first-child").attr("style", t.style).attr("d", c).attr("transform", "translate(" + -l / 2 + "," + -(n / 2 + r) + ")");
1746
+ return T(t, u), t.intersect = function(o) {
1747
+ const x = N.rect(t, o), w = x.x - t.x;
1748
+ if (s != 0 && (Math.abs(w) < t.width / 2 || Math.abs(w) == t.width / 2 && Math.abs(x.y - t.y) > t.height / 2 - r)) {
1749
+ let b = r * r * (1 - w * w / (s * s));
1750
+ b != 0 && (b = Math.sqrt(b)), b = r - b, o.y - t.y > 0 && (b = -b), x.y += b;
1744
1751
  }
1745
1752
  return x;
1746
- }, s;
1753
+ }, a;
1747
1754
  }, "cylinder"), Or = /* @__PURE__ */ d(async (e, t) => {
1748
- const { shapeSvg: s, bbox: n, halfPadding: i } = await A(
1755
+ const { shapeSvg: a, bbox: i, halfPadding: l } = await A(
1749
1756
  e,
1750
1757
  t,
1751
1758
  "node " + t.classes + " " + t.class,
1752
1759
  true
1753
- ), a = s.insert("rect", ":first-child"), r = t.positioned ? t.width : n.width + t.padding, l = t.positioned ? t.height : n.height + t.padding, c = t.positioned ? -r / 2 : -n.width / 2 - i, u = t.positioned ? -l / 2 : -n.height / 2 - i;
1754
- if (a.attr("class", "basic label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", c).attr("y", u).attr("width", r).attr("height", l), t.props) {
1755
- const h = new Set(Object.keys(t.props));
1756
- t.props.borders && (ht(a, t.props.borders, r, l), h.delete("borders")), h.forEach((x) => {
1760
+ ), s = a.insert("rect", ":first-child"), r = t.positioned ? t.width : i.width + t.padding, n = t.positioned ? t.height : i.height + t.padding, c = t.positioned ? -r / 2 : -i.width / 2 - l, u = t.positioned ? -n / 2 : -i.height / 2 - l;
1761
+ if (s.attr("class", "basic label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", c).attr("y", u).attr("width", r).attr("height", n), t.props) {
1762
+ const o = new Set(Object.keys(t.props));
1763
+ t.props.borders && (ht(s, t.props.borders, r, n), o.delete("borders")), o.forEach((x) => {
1757
1764
  L.warn(`Unknown node property ${x}`);
1758
1765
  });
1759
1766
  }
1760
- return T(t, a), t.intersect = function(h) {
1761
- return N.rect(t, h);
1762
- }, s;
1767
+ return T(t, s), t.intersect = function(o) {
1768
+ return N.rect(t, o);
1769
+ }, a;
1763
1770
  }, "rect"), Rr = /* @__PURE__ */ d(async (e, t) => {
1764
- const { shapeSvg: s, bbox: n, halfPadding: i } = await A(
1771
+ const { shapeSvg: a, bbox: i, halfPadding: l } = await A(
1765
1772
  e,
1766
1773
  t,
1767
1774
  "node " + t.classes,
1768
1775
  true
1769
- ), a = s.insert("rect", ":first-child"), r = t.positioned ? t.width : n.width + t.padding, l = t.positioned ? t.height : n.height + t.padding, c = t.positioned ? -r / 2 : -n.width / 2 - i, u = t.positioned ? -l / 2 : -n.height / 2 - i;
1770
- if (a.attr("class", "basic cluster composite label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", c).attr("y", u).attr("width", r).attr("height", l), t.props) {
1771
- const h = new Set(Object.keys(t.props));
1772
- t.props.borders && (ht(a, t.props.borders, r, l), h.delete("borders")), h.forEach((x) => {
1776
+ ), s = a.insert("rect", ":first-child"), r = t.positioned ? t.width : i.width + t.padding, n = t.positioned ? t.height : i.height + t.padding, c = t.positioned ? -r / 2 : -i.width / 2 - l, u = t.positioned ? -n / 2 : -i.height / 2 - l;
1777
+ 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", u).attr("width", r).attr("height", n), t.props) {
1778
+ const o = new Set(Object.keys(t.props));
1779
+ t.props.borders && (ht(s, t.props.borders, r, n), o.delete("borders")), o.forEach((x) => {
1773
1780
  L.warn(`Unknown node property ${x}`);
1774
1781
  });
1775
1782
  }
1776
- return T(t, a), t.intersect = function(h) {
1777
- return N.rect(t, h);
1778
- }, s;
1783
+ return T(t, s), t.intersect = function(o) {
1784
+ return N.rect(t, o);
1785
+ }, a;
1779
1786
  }, "composite"), zr = /* @__PURE__ */ d(async (e, t) => {
1780
- const { shapeSvg: s } = await A(e, t, "label", true);
1787
+ const { shapeSvg: a } = await A(e, t, "label", true);
1781
1788
  L.trace("Classes = ", t.class);
1782
- const n = s.insert("rect", ":first-child"), i = 0, a = 0;
1783
- if (n.attr("width", i).attr("height", a), s.attr("class", "label edgeLabel"), t.props) {
1789
+ const i = a.insert("rect", ":first-child"), l = 0, s = 0;
1790
+ if (i.attr("width", l).attr("height", s), a.attr("class", "label edgeLabel"), t.props) {
1784
1791
  const r = new Set(Object.keys(t.props));
1785
- t.props.borders && (ht(n, t.props.borders, i, a), r.delete("borders")), r.forEach((l) => {
1786
- L.warn(`Unknown node property ${l}`);
1792
+ t.props.borders && (ht(i, t.props.borders, l, s), r.delete("borders")), r.forEach((n) => {
1793
+ L.warn(`Unknown node property ${n}`);
1787
1794
  });
1788
1795
  }
1789
- return T(t, n), t.intersect = function(r) {
1796
+ return T(t, i), t.intersect = function(r) {
1790
1797
  return N.rect(t, r);
1791
- }, s;
1798
+ }, a;
1792
1799
  }, "labelRect");
1793
- function ht(e, t, s, n) {
1794
- const i = [], a = /* @__PURE__ */ d((l) => {
1795
- i.push(l, 0);
1796
- }, "addBorder"), r = /* @__PURE__ */ d((l) => {
1797
- i.push(0, l);
1800
+ function ht(e, t, a, i) {
1801
+ const l = [], s = /* @__PURE__ */ d((n) => {
1802
+ l.push(n, 0);
1803
+ }, "addBorder"), r = /* @__PURE__ */ d((n) => {
1804
+ l.push(0, n);
1798
1805
  }, "skipBorder");
1799
- t.includes("t") ? (L.debug("add top border"), a(s)) : r(s), t.includes("r") ? (L.debug("add right border"), a(n)) : r(n), t.includes("b") ? (L.debug("add bottom border"), a(s)) : r(s), t.includes("l") ? (L.debug("add left border"), a(n)) : r(n), e.attr("stroke-dasharray", i.join(" "));
1806
+ t.includes("t") ? (L.debug("add top border"), s(a)) : r(a), t.includes("r") ? (L.debug("add right border"), s(i)) : r(i), t.includes("b") ? (L.debug("add bottom border"), s(a)) : r(a), t.includes("l") ? (L.debug("add left border"), s(i)) : r(i), e.attr("stroke-dasharray", l.join(" "));
1800
1807
  }
1801
1808
  d(ht, "applyNodePropertyBorders");
1802
1809
  var Ar = /* @__PURE__ */ d(async (e, t) => {
1803
- let s;
1804
- t.classes ? s = "node " + t.classes : s = "node default";
1805
- const n = e.insert("g").attr("class", s).attr("id", t.domId || t.id), i = n.insert("rect", ":first-child"), a = n.insert("line"), r = n.insert("g").attr("class", "label"), l = t.labelText.flat ? t.labelText.flat() : t.labelText;
1810
+ let a;
1811
+ t.classes ? a = "node " + t.classes : a = "node default";
1812
+ const i = e.insert("g").attr("class", a).attr("id", t.domId || t.id), l = i.insert("rect", ":first-child"), s = i.insert("line"), r = i.insert("g").attr("class", "label"), n = t.labelText.flat ? t.labelText.flat() : t.labelText;
1806
1813
  let c = "";
1807
- typeof l == "object" ? c = l[0] : c = l, L.info("Label text abc79", c, l, typeof l == "object");
1814
+ typeof n == "object" ? c = n[0] : c = n, L.info("Label text abc79", c, n, typeof n == "object");
1808
1815
  const u = r.node().appendChild(await K(c, t.labelStyle, true, true));
1809
- let h = { width: 0, height: 0 };
1816
+ let o = { width: 0, height: 0 };
1810
1817
  if (j(R().flowchart.htmlLabels)) {
1811
- const E = u.children[0], k = O(u);
1812
- h = E.getBoundingClientRect(), k.attr("width", h.width), k.attr("height", h.height);
1818
+ const v = u.children[0], k = O(u);
1819
+ o = v.getBoundingClientRect(), k.attr("width", o.width), k.attr("height", o.height);
1813
1820
  }
1814
- L.info("Text 2", l);
1815
- const x = l.slice(1, l.length);
1821
+ L.info("Text 2", n);
1822
+ const x = n.slice(1, n.length);
1816
1823
  let w = u.getBBox();
1817
1824
  const b = r.node().appendChild(
1818
1825
  await K(
@@ -1823,128 +1830,128 @@ var Ar = /* @__PURE__ */ d(async (e, t) => {
1823
1830
  )
1824
1831
  );
1825
1832
  if (j(R().flowchart.htmlLabels)) {
1826
- const E = b.children[0], k = O(b);
1827
- h = E.getBoundingClientRect(), k.attr("width", h.width), k.attr("height", h.height);
1833
+ const v = b.children[0], k = O(b);
1834
+ o = v.getBoundingClientRect(), k.attr("width", o.width), k.attr("height", o.height);
1828
1835
  }
1829
1836
  const S = t.padding / 2;
1830
1837
  return O(b).attr(
1831
1838
  "transform",
1832
1839
  "translate( " + // (titleBox.width - bbox.width) / 2 +
1833
- (h.width > w.width ? 0 : (w.width - h.width) / 2) + ", " + (w.height + S + 5) + ")"
1840
+ (o.width > w.width ? 0 : (w.width - o.width) / 2) + ", " + (w.height + S + 5) + ")"
1834
1841
  ), O(u).attr(
1835
1842
  "transform",
1836
1843
  "translate( " + // (titleBox.width - bbox.width) / 2 +
1837
- (h.width < w.width ? 0 : -(w.width - h.width) / 2) + ", 0)"
1838
- ), h = r.node().getBBox(), r.attr(
1844
+ (o.width < w.width ? 0 : -(w.width - o.width) / 2) + ", 0)"
1845
+ ), o = r.node().getBBox(), r.attr(
1839
1846
  "transform",
1840
- "translate(" + -h.width / 2 + ", " + (-h.height / 2 - S + 3) + ")"
1841
- ), i.attr("class", "outer title-state").attr("x", -h.width / 2 - S).attr("y", -h.height / 2 - S).attr("width", h.width + t.padding).attr("height", h.height + t.padding), a.attr("class", "divider").attr("x1", -h.width / 2 - S).attr("x2", h.width / 2 + S).attr("y1", -h.height / 2 - S + w.height + S).attr("y2", -h.height / 2 - S + w.height + S), T(t, i), t.intersect = function(E) {
1842
- return N.rect(t, E);
1843
- }, n;
1847
+ "translate(" + -o.width / 2 + ", " + (-o.height / 2 - S + 3) + ")"
1848
+ ), l.attr("class", "outer title-state").attr("x", -o.width / 2 - S).attr("y", -o.height / 2 - S).attr("width", o.width + t.padding).attr("height", o.height + t.padding), s.attr("class", "divider").attr("x1", -o.width / 2 - S).attr("x2", o.width / 2 + S).attr("y1", -o.height / 2 - S + w.height + S).attr("y2", -o.height / 2 - S + w.height + S), T(t, l), t.intersect = function(v) {
1849
+ return N.rect(t, v);
1850
+ }, i;
1844
1851
  }, "rectWithTitle"), Mr = /* @__PURE__ */ d(async (e, t) => {
1845
- const { shapeSvg: s, bbox: n } = await A(
1852
+ const { shapeSvg: a, bbox: i } = await A(
1846
1853
  e,
1847
1854
  t,
1848
1855
  Y(t, void 0),
1849
1856
  true
1850
- ), i = n.height + t.padding, a = n.width + i / 4 + t.padding, r = s.insert("rect", ":first-child").attr("style", t.style).attr("rx", i / 2).attr("ry", i / 2).attr("x", -a / 2).attr("y", -i / 2).attr("width", a).attr("height", i);
1851
- return T(t, r), t.intersect = function(l) {
1852
- return N.rect(t, l);
1853
- }, s;
1857
+ ), l = i.height + t.padding, s = i.width + l / 4 + t.padding, r = a.insert("rect", ":first-child").attr("style", t.style).attr("rx", l / 2).attr("ry", l / 2).attr("x", -s / 2).attr("y", -l / 2).attr("width", s).attr("height", l);
1858
+ return T(t, r), t.intersect = function(n) {
1859
+ return N.rect(t, n);
1860
+ }, a;
1854
1861
  }, "stadium"), Fr = /* @__PURE__ */ d(async (e, t) => {
1855
- const { shapeSvg: s, bbox: n, halfPadding: i } = await A(
1862
+ const { shapeSvg: a, bbox: i, halfPadding: l } = await A(
1856
1863
  e,
1857
1864
  t,
1858
1865
  Y(t, void 0),
1859
1866
  true
1860
- ), a = s.insert("circle", ":first-child");
1861
- return a.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", n.width / 2 + i).attr("width", n.width + t.padding).attr("height", n.height + t.padding), L.info("Circle main"), T(t, a), t.intersect = function(r) {
1862
- return L.info("Circle intersect", t, n.width / 2 + i, r), N.circle(t, n.width / 2 + i, r);
1863
- }, s;
1867
+ ), s = a.insert("circle", ":first-child");
1868
+ return s.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", i.width / 2 + l).attr("width", i.width + t.padding).attr("height", i.height + t.padding), L.info("Circle main"), T(t, s), t.intersect = function(r) {
1869
+ return L.info("Circle intersect", t, i.width / 2 + l, r), N.circle(t, i.width / 2 + l, r);
1870
+ }, a;
1864
1871
  }, "circle"), Wr = /* @__PURE__ */ d(async (e, t) => {
1865
- const { shapeSvg: s, bbox: n, halfPadding: i } = await A(
1872
+ const { shapeSvg: a, bbox: i, halfPadding: l } = await A(
1866
1873
  e,
1867
1874
  t,
1868
1875
  Y(t, void 0),
1869
1876
  true
1870
- ), a = 5, r = s.insert("g", ":first-child"), l = r.insert("circle"), c = r.insert("circle");
1871
- return r.attr("class", t.class), l.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", n.width / 2 + i + a).attr("width", n.width + t.padding + a * 2).attr("height", n.height + t.padding + a * 2), c.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", n.width / 2 + i).attr("width", n.width + t.padding).attr("height", n.height + t.padding), L.info("DoubleCircle main"), T(t, l), t.intersect = function(u) {
1872
- return L.info("DoubleCircle intersect", t, n.width / 2 + i + a, u), N.circle(t, n.width / 2 + i + a, u);
1873
- }, s;
1877
+ ), s = 5, r = a.insert("g", ":first-child"), n = r.insert("circle"), c = r.insert("circle");
1878
+ return r.attr("class", t.class), n.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", i.width / 2 + l + s).attr("width", i.width + t.padding + s * 2).attr("height", i.height + t.padding + s * 2), c.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", i.width / 2 + l).attr("width", i.width + t.padding).attr("height", i.height + t.padding), L.info("DoubleCircle main"), T(t, n), t.intersect = function(u) {
1879
+ return L.info("DoubleCircle intersect", t, i.width / 2 + l + s, u), N.circle(t, i.width / 2 + l + s, u);
1880
+ }, a;
1874
1881
  }, "doublecircle"), Pr = /* @__PURE__ */ d(async (e, t) => {
1875
- const { shapeSvg: s, bbox: n } = await A(
1882
+ const { shapeSvg: a, bbox: i } = await A(
1876
1883
  e,
1877
1884
  t,
1878
1885
  Y(t, void 0),
1879
1886
  true
1880
- ), i = n.width + t.padding, a = n.height + t.padding, r = [
1887
+ ), l = i.width + t.padding, s = i.height + t.padding, r = [
1881
1888
  { x: 0, y: 0 },
1882
- { x: i, y: 0 },
1883
- { x: i, y: -a },
1884
- { x: 0, y: -a },
1889
+ { x: l, y: 0 },
1890
+ { x: l, y: -s },
1891
+ { x: 0, y: -s },
1885
1892
  { x: 0, y: 0 },
1886
1893
  { x: -8, y: 0 },
1887
- { x: i + 8, y: 0 },
1888
- { x: i + 8, y: -a },
1889
- { x: -8, y: -a },
1894
+ { x: l + 8, y: 0 },
1895
+ { x: l + 8, y: -s },
1896
+ { x: -8, y: -s },
1890
1897
  { x: -8, y: 0 }
1891
- ], l = U(s, i, a, r);
1892
- return l.attr("style", t.style), T(t, l), t.intersect = function(c) {
1898
+ ], n = U(a, l, s, r);
1899
+ return n.attr("style", t.style), T(t, n), t.intersect = function(c) {
1893
1900
  return N.polygon(t, r, c);
1894
- }, s;
1901
+ }, a;
1895
1902
  }, "subroutine"), Yr = /* @__PURE__ */ d((e, t) => {
1896
- const s = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), n = s.insert("circle", ":first-child");
1897
- return n.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), T(t, n), t.intersect = function(i) {
1898
- return N.circle(t, 7, i);
1899
- }, s;
1900
- }, "start"), Mt = /* @__PURE__ */ d((e, t, s) => {
1901
- const n = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id);
1902
- let i = 70, a = 10;
1903
- s === "LR" && (i = 10, a = 70);
1904
- const r = n.append("rect").attr("x", -1 * i / 2).attr("y", -1 * a / 2).attr("width", i).attr("height", a).attr("class", "fork-join");
1905
- return T(t, r), t.height = t.height + t.padding / 2, t.width = t.width + t.padding / 2, t.intersect = function(l) {
1906
- return N.rect(t, l);
1907
- }, n;
1903
+ const a = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), i = a.insert("circle", ":first-child");
1904
+ return i.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), T(t, i), t.intersect = function(l) {
1905
+ return N.circle(t, 7, l);
1906
+ }, a;
1907
+ }, "start"), Mt = /* @__PURE__ */ d((e, t, a) => {
1908
+ const i = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id);
1909
+ let l = 70, s = 10;
1910
+ a === "LR" && (l = 10, s = 70);
1911
+ const r = i.append("rect").attr("x", -1 * l / 2).attr("y", -1 * s / 2).attr("width", l).attr("height", s).attr("class", "fork-join");
1912
+ return T(t, r), t.height = t.height + t.padding / 2, t.width = t.width + t.padding / 2, t.intersect = function(n) {
1913
+ return N.rect(t, n);
1914
+ }, i;
1908
1915
  }, "forkJoin"), Hr = /* @__PURE__ */ d((e, t) => {
1909
- const s = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), n = s.insert("circle", ":first-child"), i = s.insert("circle", ":first-child");
1910
- return i.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), T(t, i), t.intersect = function(a) {
1911
- return N.circle(t, 7, a);
1912
- }, s;
1916
+ const a = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), i = a.insert("circle", ":first-child"), l = a.insert("circle", ":first-child");
1917
+ return l.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), i.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10), T(t, l), t.intersect = function(s) {
1918
+ return N.circle(t, 7, s);
1919
+ }, a;
1913
1920
  }, "end"), Kr = /* @__PURE__ */ d(async (e, t) => {
1914
1921
  var _a2;
1915
- const s = t.padding / 2, n = 4, i = 8;
1916
- let a;
1917
- t.classes ? a = "node " + t.classes : a = "node default";
1918
- const r = e.insert("g").attr("class", a).attr("id", t.domId || t.id), l = r.insert("rect", ":first-child"), c = r.insert("line"), u = r.insert("line");
1919
- let h = 0, x = n;
1922
+ const a = t.padding / 2, i = 4, l = 8;
1923
+ let s;
1924
+ t.classes ? s = "node " + t.classes : s = "node default";
1925
+ const r = e.insert("g").attr("class", s).attr("id", t.domId || t.id), n = r.insert("rect", ":first-child"), c = r.insert("line"), u = r.insert("line");
1926
+ let o = 0, x = i;
1920
1927
  const w = r.insert("g").attr("class", "label");
1921
1928
  let b = 0;
1922
- const S = (_a2 = t.classData.annotations) == null ? void 0 : _a2[0], E = t.classData.annotations[0] ? "\xAB" + t.classData.annotations[0] + "\xBB" : "", k = w.node().appendChild(await K(E, t.labelStyle, true, true));
1929
+ const S = (_a2 = t.classData.annotations) == null ? void 0 : _a2[0], v = t.classData.annotations[0] ? "\xAB" + t.classData.annotations[0] + "\xBB" : "", k = w.node().appendChild(await K(v, t.labelStyle, true, true));
1923
1930
  let B = k.getBBox();
1924
1931
  if (j(R().flowchart.htmlLabels)) {
1925
- const v = k.children[0], o = O(k);
1926
- B = v.getBoundingClientRect(), o.attr("width", B.width), o.attr("height", B.height);
1932
+ const E = k.children[0], h = O(k);
1933
+ B = E.getBoundingClientRect(), h.attr("width", B.width), h.attr("height", B.height);
1927
1934
  }
1928
- t.classData.annotations[0] && (x += B.height + n, h += B.width);
1935
+ t.classData.annotations[0] && (x += B.height + i, o += B.width);
1929
1936
  let _ = t.classData.label;
1930
1937
  t.classData.type !== void 0 && t.classData.type !== "" && (R().flowchart.htmlLabels ? _ += "&lt;" + t.classData.type + "&gt;" : _ += "<" + t.classData.type + ">");
1931
1938
  const D = w.node().appendChild(await K(_, t.labelStyle, true, true));
1932
1939
  O(D).attr("class", "classTitle");
1933
1940
  let y = D.getBBox();
1934
1941
  if (j(R().flowchart.htmlLabels)) {
1935
- const v = D.children[0], o = O(D);
1936
- y = v.getBoundingClientRect(), o.attr("width", y.width), o.attr("height", y.height);
1942
+ const E = D.children[0], h = O(D);
1943
+ y = E.getBoundingClientRect(), h.attr("width", y.width), h.attr("height", y.height);
1937
1944
  }
1938
- x += y.height + n, y.width > h && (h = y.width);
1945
+ x += y.height + i, y.width > o && (o = y.width);
1939
1946
  const g = [];
1940
- t.classData.members.forEach(async (v) => {
1941
- const o = v.getDisplayDetails();
1942
- let W = o.displayText;
1947
+ t.classData.members.forEach(async (E) => {
1948
+ const h = E.getDisplayDetails();
1949
+ let W = h.displayText;
1943
1950
  R().flowchart.htmlLabels && (W = W.replace(/</g, "&lt;").replace(/>/g, "&gt;"));
1944
1951
  const p = w.node().appendChild(
1945
1952
  await K(
1946
1953
  W,
1947
- o.cssStyle ? o.cssStyle : t.labelStyle,
1954
+ h.cssStyle ? h.cssStyle : t.labelStyle,
1948
1955
  true,
1949
1956
  true
1950
1957
  )
@@ -1954,17 +1961,17 @@ var Ar = /* @__PURE__ */ d(async (e, t) => {
1954
1961
  const Z = p.children[0], V = O(p);
1955
1962
  I = Z.getBoundingClientRect(), V.attr("width", I.width), V.attr("height", I.height);
1956
1963
  }
1957
- I.width > h && (h = I.width), x += I.height + n, g.push(p);
1958
- }), x += i;
1964
+ I.width > o && (o = I.width), x += I.height + i, g.push(p);
1965
+ }), x += l;
1959
1966
  const f = [];
1960
- if (t.classData.methods.forEach(async (v) => {
1961
- const o = v.getDisplayDetails();
1962
- let W = o.displayText;
1967
+ if (t.classData.methods.forEach(async (E) => {
1968
+ const h = E.getDisplayDetails();
1969
+ let W = h.displayText;
1963
1970
  R().flowchart.htmlLabels && (W = W.replace(/</g, "&lt;").replace(/>/g, "&gt;"));
1964
1971
  const p = w.node().appendChild(
1965
1972
  await K(
1966
1973
  W,
1967
- o.cssStyle ? o.cssStyle : t.labelStyle,
1974
+ h.cssStyle ? h.cssStyle : t.labelStyle,
1968
1975
  true,
1969
1976
  true
1970
1977
  )
@@ -1974,34 +1981,34 @@ var Ar = /* @__PURE__ */ d(async (e, t) => {
1974
1981
  const Z = p.children[0], V = O(p);
1975
1982
  I = Z.getBoundingClientRect(), V.attr("width", I.width), V.attr("height", I.height);
1976
1983
  }
1977
- I.width > h && (h = I.width), x += I.height + n, f.push(p);
1978
- }), x += i, S) {
1979
- let v = (h - B.width) / 2;
1984
+ I.width > o && (o = I.width), x += I.height + i, f.push(p);
1985
+ }), x += l, S) {
1986
+ let E = (o - B.width) / 2;
1980
1987
  O(k).attr(
1981
1988
  "transform",
1982
- "translate( " + (-1 * h / 2 + v) + ", " + -1 * x / 2 + ")"
1983
- ), b = B.height + n;
1989
+ "translate( " + (-1 * o / 2 + E) + ", " + -1 * x / 2 + ")"
1990
+ ), b = B.height + i;
1984
1991
  }
1985
- let m = (h - y.width) / 2;
1992
+ let m = (o - y.width) / 2;
1986
1993
  return O(D).attr(
1987
1994
  "transform",
1988
- "translate( " + (-1 * h / 2 + m) + ", " + (-1 * x / 2 + b) + ")"
1989
- ), b += y.height + n, c.attr("class", "divider").attr("x1", -h / 2 - s).attr("x2", h / 2 + s).attr("y1", -x / 2 - s + i + b).attr("y2", -x / 2 - s + i + b), b += i, g.forEach((v) => {
1990
- O(v).attr(
1995
+ "translate( " + (-1 * o / 2 + m) + ", " + (-1 * x / 2 + b) + ")"
1996
+ ), b += y.height + i, c.attr("class", "divider").attr("x1", -o / 2 - a).attr("x2", o / 2 + a).attr("y1", -x / 2 - a + l + b).attr("y2", -x / 2 - a + l + b), b += l, g.forEach((E) => {
1997
+ O(E).attr(
1991
1998
  "transform",
1992
- "translate( " + -h / 2 + ", " + (-1 * x / 2 + b + i / 2) + ")"
1999
+ "translate( " + -o / 2 + ", " + (-1 * x / 2 + b + l / 2) + ")"
1993
2000
  );
1994
- const o = v == null ? void 0 : v.getBBox();
1995
- b += ((o == null ? void 0 : o.height) ?? 0) + n;
1996
- }), b += i, u.attr("class", "divider").attr("x1", -h / 2 - s).attr("x2", h / 2 + s).attr("y1", -x / 2 - s + i + b).attr("y2", -x / 2 - s + i + b), b += i, f.forEach((v) => {
1997
- O(v).attr(
2001
+ const h = E == null ? void 0 : E.getBBox();
2002
+ b += ((h == null ? void 0 : h.height) ?? 0) + i;
2003
+ }), b += l, u.attr("class", "divider").attr("x1", -o / 2 - a).attr("x2", o / 2 + a).attr("y1", -x / 2 - a + l + b).attr("y2", -x / 2 - a + l + b), b += l, f.forEach((E) => {
2004
+ O(E).attr(
1998
2005
  "transform",
1999
- "translate( " + -h / 2 + ", " + (-1 * x / 2 + b) + ")"
2006
+ "translate( " + -o / 2 + ", " + (-1 * x / 2 + b) + ")"
2000
2007
  );
2001
- const o = v == null ? void 0 : v.getBBox();
2002
- b += ((o == null ? void 0 : o.height) ?? 0) + n;
2003
- }), l.attr("style", t.style).attr("class", "outer title-state").attr("x", -h / 2 - s).attr("y", -(x / 2) - s).attr("width", h + t.padding).attr("height", x + t.padding), T(t, l), t.intersect = function(v) {
2004
- return N.rect(t, v);
2008
+ const h = E == null ? void 0 : E.getBBox();
2009
+ b += ((h == null ? void 0 : h.height) ?? 0) + i;
2010
+ }), n.attr("style", t.style).attr("class", "outer title-state").attr("x", -o / 2 - a).attr("y", -(x / 2) - a).attr("width", o + t.padding).attr("height", x + t.padding), T(t, n), t.intersect = function(E) {
2011
+ return N.rect(t, E);
2005
2012
  }, r;
2006
2013
  }, "class_box"), Ft = {
2007
2014
  rhombus: At,
@@ -2030,14 +2037,14 @@ var Ar = /* @__PURE__ */ d(async (e, t) => {
2030
2037
  fork: Mt,
2031
2038
  join: Mt,
2032
2039
  class_box: Kr
2033
- }, lt = {}, te = /* @__PURE__ */ d(async (e, t, s) => {
2034
- let n, i;
2040
+ }, lt = {}, te = /* @__PURE__ */ d(async (e, t, a) => {
2041
+ let i, l;
2035
2042
  if (t.link) {
2036
- let a;
2037
- R().securityLevel === "sandbox" ? a = "_top" : t.linkTarget && (a = t.linkTarget || "_blank"), n = e.insert("svg:a").attr("xlink:href", t.link).attr("target", a), i = await Ft[t.shape](n, t, s);
2043
+ let s;
2044
+ R().securityLevel === "sandbox" ? s = "_top" : t.linkTarget && (s = t.linkTarget || "_blank"), i = e.insert("svg:a").attr("xlink:href", t.link).attr("target", s), l = await Ft[t.shape](i, t, a);
2038
2045
  } else
2039
- i = await Ft[t.shape](e, t, s), n = i;
2040
- return t.tooltip && i.attr("title", t.tooltip), t.class && i.attr("class", "node default " + t.class), lt[t.id] = n, t.haveCallback && lt[t.id].attr("class", lt[t.id].attr("class") + " clickable"), n;
2046
+ l = await Ft[t.shape](e, t, a), i = l;
2047
+ return t.tooltip && l.attr("title", t.tooltip), t.class && l.attr("class", "node default " + t.class), lt[t.id] = i, t.haveCallback && lt[t.id].attr("class", lt[t.id].attr("class") + " clickable"), i;
2041
2048
  }, "insertNode"), Xr = /* @__PURE__ */ d((e) => {
2042
2049
  const t = lt[e.id];
2043
2050
  L.trace(
@@ -2046,24 +2053,24 @@ var Ar = /* @__PURE__ */ d(async (e, t) => {
2046
2053
  e,
2047
2054
  "translate(" + (e.x - e.width / 2 - 5) + ", " + e.width / 2 + ")"
2048
2055
  );
2049
- const s = 8, n = e.diff || 0;
2056
+ const a = 8, i = e.diff || 0;
2050
2057
  return e.clusterNode ? t.attr(
2051
2058
  "transform",
2052
- "translate(" + (e.x + n - e.width / 2) + ", " + (e.y - e.height / 2 - s) + ")"
2053
- ) : t.attr("transform", "translate(" + e.x + ", " + e.y + ")"), n;
2059
+ "translate(" + (e.x + i - e.width / 2) + ", " + (e.y - e.height / 2 - a) + ")"
2060
+ ) : t.attr("transform", "translate(" + e.x + ", " + e.y + ")"), i;
2054
2061
  }, "positionNode");
2055
- function _t(e, t, s = false) {
2062
+ function Dt(e, t, a = false) {
2056
2063
  var _a2, _b2, _c;
2057
- const n = e;
2058
- let i = "default";
2059
- (((_a2 = n == null ? void 0 : n.classes) == null ? void 0 : _a2.length) || 0) > 0 && (i = ((n == null ? void 0 : n.classes) ?? []).join(" ")), i = i + " flowchart-label";
2060
- let a = 0, r = "", l;
2061
- switch (n.type) {
2064
+ const i = e;
2065
+ let l = "default";
2066
+ (((_a2 = i == null ? void 0 : i.classes) == null ? void 0 : _a2.length) || 0) > 0 && (l = ((i == null ? void 0 : i.classes) ?? []).join(" ")), l = l + " flowchart-label";
2067
+ let s = 0, r = "", n;
2068
+ switch (i.type) {
2062
2069
  case "round":
2063
- a = 5, r = "rect";
2070
+ s = 5, r = "rect";
2064
2071
  break;
2065
2072
  case "composite":
2066
- a = 0, r = "composite", l = 0;
2073
+ s = 0, r = "composite", n = 0;
2067
2074
  break;
2068
2075
  case "square":
2069
2076
  r = "rect";
@@ -2119,83 +2126,83 @@ function _t(e, t, s = false) {
2119
2126
  default:
2120
2127
  r = "rect";
2121
2128
  }
2122
- const c = be((n == null ? void 0 : n.styles) ?? []), u = n.label, h = n.size ?? { width: 0, height: 0, x: 0, y: 0 };
2129
+ const c = be((i == null ? void 0 : i.styles) ?? []), u = i.label, o = i.size ?? { width: 0, height: 0, x: 0, y: 0 };
2123
2130
  return {
2124
2131
  labelStyle: c.labelStyle,
2125
2132
  shape: r,
2126
2133
  labelText: u,
2127
- rx: a,
2128
- ry: a,
2129
- class: i,
2134
+ rx: s,
2135
+ ry: s,
2136
+ class: l,
2130
2137
  style: c.style,
2131
- id: n.id,
2132
- directions: n.directions,
2133
- width: h.width,
2134
- height: h.height,
2135
- x: h.x,
2136
- y: h.y,
2137
- positioned: s,
2138
+ id: i.id,
2139
+ directions: i.directions,
2140
+ width: o.width,
2141
+ height: o.height,
2142
+ x: o.x,
2143
+ y: o.y,
2144
+ positioned: a,
2138
2145
  intersect: void 0,
2139
- type: n.type,
2140
- padding: l ?? ((_c = (_b2 = rt()) == null ? void 0 : _b2.block) == null ? void 0 : _c.padding) ?? 0
2146
+ type: i.type,
2147
+ padding: n ?? ((_c = (_b2 = rt()) == null ? void 0 : _b2.block) == null ? void 0 : _c.padding) ?? 0
2141
2148
  };
2142
2149
  }
2143
- d(_t, "getNodeFromBlock");
2144
- async function ee(e, t, s) {
2145
- const n = _t(t, s, false);
2146
- if (n.type === "group")
2150
+ d(Dt, "getNodeFromBlock");
2151
+ async function ee(e, t, a) {
2152
+ const i = Dt(t, a, false);
2153
+ if (i.type === "group")
2147
2154
  return;
2148
- const i = rt(), a = await te(e, n, { config: i }), r = a.node().getBBox(), l = s.getBlock(n.id);
2149
- l.size = { width: r.width, height: r.height, x: 0, y: 0, node: a }, s.setBlock(l), a.remove();
2155
+ const l = rt(), s = await te(e, i, { config: l }), r = s.node().getBBox(), n = a.getBlock(i.id);
2156
+ n.size = { width: r.width, height: r.height, x: 0, y: 0, node: s }, a.setBlock(n), s.remove();
2150
2157
  }
2151
2158
  d(ee, "calculateBlockSize");
2152
- async function re(e, t, s) {
2153
- const n = _t(t, s, true);
2154
- if (s.getBlock(n.id).type !== "space") {
2155
- const a = rt();
2156
- await te(e, n, { config: a }), t.intersect = n == null ? void 0 : n.intersect, Xr(n);
2159
+ async function re(e, t, a) {
2160
+ const i = Dt(t, a, true);
2161
+ if (a.getBlock(i.id).type !== "space") {
2162
+ const s = rt();
2163
+ await te(e, i, { config: s }), t.intersect = i == null ? void 0 : i.intersect, Xr(i);
2157
2164
  }
2158
2165
  }
2159
2166
  d(re, "insertBlockPositioned");
2160
- async function dt(e, t, s, n) {
2161
- for (const i of t)
2162
- await n(e, i, s), i.children && await dt(e, i.children, s, n);
2167
+ async function dt(e, t, a, i) {
2168
+ for (const l of t)
2169
+ await i(e, l, a), l.children && await dt(e, l.children, a, i);
2163
2170
  }
2164
2171
  d(dt, "performOperations");
2165
- async function ae(e, t, s) {
2166
- await dt(e, t, s, ee);
2172
+ async function ae(e, t, a) {
2173
+ await dt(e, t, a, ee);
2167
2174
  }
2168
2175
  d(ae, "calculateBlockSizes");
2169
- async function se(e, t, s) {
2170
- await dt(e, t, s, re);
2176
+ async function se(e, t, a) {
2177
+ await dt(e, t, a, re);
2171
2178
  }
2172
2179
  d(se, "insertBlocks");
2173
- async function ie(e, t, s, n, i) {
2174
- const a = new me({
2180
+ async function ie(e, t, a, i, l) {
2181
+ const s = new me({
2175
2182
  multigraph: true,
2176
2183
  compound: true
2177
2184
  });
2178
- a.setGraph({
2185
+ s.setGraph({
2179
2186
  rankdir: "TB",
2180
2187
  nodesep: 10,
2181
2188
  ranksep: 10,
2182
2189
  marginx: 8,
2183
2190
  marginy: 8
2184
2191
  });
2185
- for (const r of s)
2186
- r.size && a.setNode(r.id, {
2192
+ for (const r of a)
2193
+ r.size && s.setNode(r.id, {
2187
2194
  width: r.size.width,
2188
2195
  height: r.size.height,
2189
2196
  intersect: r.intersect
2190
2197
  });
2191
2198
  for (const r of t)
2192
2199
  if (r.start && r.end) {
2193
- const l = n.getBlock(r.start), c = n.getBlock(r.end);
2194
- if ((l == null ? void 0 : l.size) && (c == null ? void 0 : c.size)) {
2195
- const u = l.size, h = c.size, x = [
2200
+ const n = i.getBlock(r.start), c = i.getBlock(r.end);
2201
+ if ((n == null ? void 0 : n.size) && (c == null ? void 0 : c.size)) {
2202
+ const u = n.size, o = c.size, x = [
2196
2203
  { x: u.x, y: u.y },
2197
- { x: u.x + (h.x - u.x) / 2, y: u.y + (h.y - u.y) / 2 },
2198
- { x: h.x, y: h.y }
2204
+ { x: u.x + (o.x - u.x) / 2, y: u.y + (o.y - u.y) / 2 },
2205
+ { x: o.x, y: o.y }
2199
2206
  ];
2200
2207
  gr(
2201
2208
  e,
@@ -2209,8 +2216,8 @@ async function ie(e, t, s, n, i) {
2209
2216
  },
2210
2217
  void 0,
2211
2218
  "block",
2212
- a,
2213
- i
2219
+ s,
2220
+ l
2214
2221
  ), r.label && (await cr(e, {
2215
2222
  ...r,
2216
2223
  label: r.label,
@@ -2231,18 +2238,18 @@ async function ie(e, t, s, n, i) {
2231
2238
  d(ie, "insertEdges");
2232
2239
  var Ur = /* @__PURE__ */ d(function(e, t) {
2233
2240
  return t.db.getClasses();
2234
- }, "getClasses"), jr = /* @__PURE__ */ d(async function(e, t, s, n) {
2235
- const { securityLevel: i, block: a } = rt(), r = n.db;
2236
- let l;
2237
- i === "sandbox" && (l = O("#i" + t));
2238
- const c = i === "sandbox" ? O(l.nodes()[0].contentDocument.body) : O("body"), u = i === "sandbox" ? c.select(`[id="${t}"]`) : O(`[id="${t}"]`);
2239
- ar(u, ["point", "circle", "cross"], n.type, t);
2241
+ }, "getClasses"), jr = /* @__PURE__ */ d(async function(e, t, a, i) {
2242
+ const { securityLevel: l, block: s } = rt(), r = i.db;
2243
+ let n;
2244
+ l === "sandbox" && (n = O("#i" + t));
2245
+ const c = l === "sandbox" ? O(n.nodes()[0].contentDocument.body) : O("body"), u = l === "sandbox" ? c.select(`[id="${t}"]`) : O(`[id="${t}"]`);
2246
+ ar(u, ["point", "circle", "cross"], i.type, t);
2240
2247
  const x = r.getBlocks(), w = r.getBlocksFlat(), b = r.getEdges(), S = u.insert("g").attr("class", "block");
2241
2248
  await ae(S, x, r);
2242
- const E = jt(r);
2243
- if (await se(S, x, r), await ie(S, b, w, r, t), E) {
2244
- const k = E, B = Math.max(1, Math.round(0.125 * (k.width / k.height))), _ = k.height + B + 10, D = k.width + 10, { useMaxWidth: y } = a;
2245
- he(u, _, D, !!y), L.debug("Here Bounds", E, k), u.attr(
2249
+ const v = jt(r);
2250
+ if (await se(S, x, r), await ie(S, b, w, r, t), v) {
2251
+ const k = v, B = Math.max(1, Math.round(0.125 * (k.width / k.height))), _ = k.height + B + 10, D = k.width + 10, { useMaxWidth: y } = s;
2252
+ he(u, _, D, !!y), L.debug("Here Bounds", v, k), u.attr(
2246
2253
  "viewBox",
2247
2254
  `${k.x - 5} ${k.y - 5} ${k.width + 10} ${k.height + 10}`
2248
2255
  );