@spteck/react-controls-v2 2.0.18 → 2.2.1

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 (662) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +143 -387
  3. package/dist/LocalizationProvider-BLjmybBa.cjs +2 -0
  4. package/dist/LocalizationProvider-BSlUf0tp.js +497 -0
  5. package/dist/_arrayEach-CnIMt1eB.js +61 -0
  6. package/dist/_arrayEach-vx8gLv03.cjs +2 -0
  7. package/dist/abstractions/ILocalizationProvider.d.ts +52 -0
  8. package/dist/abstractions/index.d.ts +1 -0
  9. package/dist/abstractions/providers/DefaultLocalizationProvider.d.ts +52 -0
  10. package/dist/abstractions/providers/LocalizationProvider.d.ts +47 -0
  11. package/dist/abstractions/providers/index.d.ts +3 -1
  12. package/dist/ar-C1pLt8fa.js +219 -0
  13. package/dist/ar-Jzw7PLrc.cjs +2 -0
  14. package/dist/arc-DPTV8xm_.js +132 -0
  15. package/dist/arc-fdHOvWdS.cjs +2 -0
  16. package/dist/architecture-7HQA4BMR-BAUhgjE2.js +6 -0
  17. package/dist/architecture-7HQA4BMR-DwCjpO72.cjs +2 -0
  18. package/dist/architectureDiagram-VXUJARFQ-B5yGOjRk.js +8680 -0
  19. package/dist/architectureDiagram-VXUJARFQ-C7K57uon.cjs +2 -0
  20. package/dist/az-C0Ow5Hxa.cjs +2 -0
  21. package/dist/az-C3-F9ybX.js +219 -0
  22. package/dist/bg-YB0TmpRF.cjs +2 -0
  23. package/dist/bg-w2e_udiK.js +219 -0
  24. package/dist/blockDiagram-VD42YOAC-B9MtQVc8.js +3756 -0
  25. package/dist/blockDiagram-VD42YOAC-CXUX1_9K.cjs +2 -0
  26. package/dist/bs-BoW04lRb.cjs +2 -0
  27. package/dist/bs-CEe_gjEx.js +219 -0
  28. package/dist/c4Diagram-YG6GDRKO-0rSYap-S.cjs +2 -0
  29. package/dist/c4Diagram-YG6GDRKO-CKFTKCbq.js +2483 -0
  30. package/dist/ca-Bsy2Y5pS.cjs +2 -0
  31. package/dist/ca-CKpd72XI.js +219 -0
  32. package/dist/channel-CJ2FoHig.js +8 -0
  33. package/dist/channel-DjKs64mj.cjs +2 -0
  34. package/dist/chunk-4BX2VUAB-DJlF8TIZ.cjs +2 -0
  35. package/dist/chunk-4BX2VUAB-ghaW5jSQ.js +18 -0
  36. package/dist/chunk-55IACEB6-9B1z6QHL.cjs +2 -0
  37. package/dist/chunk-55IACEB6-__yJgpDO.js +14 -0
  38. package/dist/chunk-B4BG7PRW-Dbzu88Oo.cjs +2 -0
  39. package/dist/chunk-B4BG7PRW-NVucxzRs.js +1828 -0
  40. package/dist/chunk-DI55MBZ5-Bun58OTZ.js +1928 -0
  41. package/dist/chunk-DI55MBZ5-e__JA50C.cjs +2 -0
  42. package/dist/chunk-FMBD7UC4-DulgQOWY.js +20 -0
  43. package/dist/chunk-FMBD7UC4-Pi8Fs7F6.cjs +2 -0
  44. package/dist/chunk-QN33PNHL-DA_6jplh.js +26 -0
  45. package/dist/chunk-QN33PNHL-DcHwlyDo.cjs +2 -0
  46. package/dist/chunk-QZHKN3VN-BfGBK4_s.cjs +2 -0
  47. package/dist/chunk-QZHKN3VN-C5x9oEL1.js +18 -0
  48. package/dist/chunk-TZMSLE5B-BCBp8EeB.cjs +2 -0
  49. package/dist/chunk-TZMSLE5B-Bj2-6aT8.js +109 -0
  50. package/dist/classDiagram-2ON5EDUG-BGUaVc1W.cjs +2 -0
  51. package/dist/classDiagram-2ON5EDUG-BcR1HP9z.js +20 -0
  52. package/dist/classDiagram-v2-WZHVMYZB-BGUaVc1W.cjs +2 -0
  53. package/dist/classDiagram-v2-WZHVMYZB-BcR1HP9z.js +20 -0
  54. package/dist/components/AISearchControl/index.d.ts +1 -0
  55. package/dist/components/Card/index.d.ts +0 -1
  56. package/dist/components/Carousel/index.d.ts +0 -3
  57. package/dist/components/Container/Container.d.ts +1 -9
  58. package/dist/components/Container/IContainerProps.d.ts +10 -4
  59. package/dist/components/Container/index.d.ts +1 -1
  60. package/dist/components/ContentRenderer/ContentRenderer.d.ts +1 -37
  61. package/dist/components/ContentRenderer/IContentRendererProps.d.ts +45 -0
  62. package/dist/components/ContentRenderer/index.d.ts +1 -1
  63. package/dist/components/DataGridV2/DataGridHandle.d.ts +14 -0
  64. package/dist/components/DataGridV2/DataGridV2.d.ts +2 -36
  65. package/dist/components/DataGridV2/IDataGridV2ExtraProps.d.ts +25 -0
  66. package/dist/components/DataGridV2/index.d.ts +1 -0
  67. package/dist/components/Grid/useGridStyles.d.ts +1 -1
  68. package/dist/components/ItemPicker/IItemPickerOption.d.ts +14 -0
  69. package/dist/components/ItemPicker/IItemPickerPagingInfo.d.ts +9 -0
  70. package/dist/components/ItemPicker/IItemPickerProps.d.ts +54 -0
  71. package/dist/components/ItemPicker/ItemPicker.d.ts +4 -0
  72. package/dist/components/ItemPicker/index.d.ts +5 -0
  73. package/dist/components/ItemPicker/useItemPickerStyles.d.ts +10 -0
  74. package/dist/components/KPIControl/IKpiCardData.d.ts +19 -0
  75. package/dist/components/KPIControl/IKpiCardProps.d.ts +6 -0
  76. package/dist/components/KPIControl/KpiCard.d.ts +4 -0
  77. package/dist/components/KPIControl/KpiCardCompact.d.ts +4 -0
  78. package/dist/components/KPIControl/KpiCardSkeleton.d.ts +8 -0
  79. package/dist/components/KPIControl/Kpis.d.ts +7 -0
  80. package/dist/components/KPIControl/NoKpisCard.d.ts +8 -0
  81. package/dist/components/KPIControl/index.d.ts +8 -0
  82. package/dist/components/KPIControl/useKpiStyles.d.ts +33 -0
  83. package/dist/components/ListToolbar/FlatItem.d.ts +8 -0
  84. package/dist/components/ListToolbar/IListToolbarProps.d.ts +27 -0
  85. package/dist/components/ListToolbar/IToolbarItem.d.ts +37 -0
  86. package/dist/components/ListToolbar/IToolbarItemRendererProps.d.ts +13 -0
  87. package/dist/components/ListToolbar/ListToolbar.d.ts +5 -0
  88. package/dist/components/ListToolbar/ToolbarItemRenderer.d.ts +7 -0
  89. package/dist/components/ListToolbar/helpers.d.ts +6 -0
  90. package/dist/components/ListToolbar/index.d.ts +4 -0
  91. package/dist/components/ListToolbar/useListToolbarStyles.d.ts +16 -0
  92. package/dist/components/ListToolbar/useOverflowIndex.d.ts +18 -0
  93. package/dist/components/MarkdownRenderer/MarkdownRenderer.d.ts +1 -1
  94. package/dist/components/MarkdownRenderer/useMarkdownStyles.d.ts +4 -0
  95. package/dist/components/MermaidDiagram/IMermaidDiagramProps.d.ts +31 -0
  96. package/dist/components/MermaidDiagram/MermaidDiagram.d.ts +4 -0
  97. package/dist/components/MermaidDiagram/index.d.ts +4 -0
  98. package/dist/components/MermaidDiagram/useMermaidDiagramStyles.d.ts +9 -0
  99. package/dist/components/Navigation/INavigationProps.d.ts +141 -0
  100. package/dist/components/Navigation/Navigation.d.ts +27 -0
  101. package/dist/components/Navigation/index.d.ts +4 -0
  102. package/dist/components/Navigation/useNavigationStyles.d.ts +13 -0
  103. package/dist/components/SelectTime/IOptionTimeProps.d.ts +23 -0
  104. package/dist/components/SelectTime/ISelectTimeProps.d.ts +25 -0
  105. package/dist/components/SelectTime/OptionTime.d.ts +16 -0
  106. package/dist/components/SelectTime/SelectTime.d.ts +4 -0
  107. package/dist/components/SelectTime/index.d.ts +7 -0
  108. package/dist/components/SelectTime/useOptionTimeStyles.d.ts +6 -0
  109. package/dist/components/SelectTime/useSelectTimeStyles.d.ts +7 -0
  110. package/dist/components/SplitPane/ISplitPaneProps.d.ts +28 -0
  111. package/dist/components/SplitPane/SplitPane.d.ts +10 -0
  112. package/dist/components/SplitPane/index.d.ts +4 -0
  113. package/dist/components/SplitPane/useSplitPaneStyles.d.ts +13 -0
  114. package/dist/components/adaptiveCardHost/AdaptiveCardHost.Utilities.d.ts +1 -1
  115. package/dist/components/adaptiveCardHost/fluentUI/renderCompat.d.ts +7 -0
  116. package/dist/components/aiAssistant/index.d.ts +1 -0
  117. package/dist/components/appDashboard/IAppDashboardProps.d.ts +2 -2
  118. package/dist/components/breadcrumb/IBreadcrumProps.d.ts +1 -1
  119. package/dist/components/breadcrumb/index.d.ts +1 -0
  120. package/dist/components/customControlBar/CustomControlBar.d.ts +1 -13
  121. package/dist/components/customControlBar/IControlItem.d.ts +6 -0
  122. package/dist/components/customControlBar/ICustomControlBarProps.d.ts +11 -0
  123. package/dist/components/customControlBar/index.d.ts +2 -0
  124. package/dist/components/dropDownField/useDropdownFieldStyles.d.ts +5 -0
  125. package/dist/components/index.d.ts +7 -0
  126. package/dist/components/inputField/IInputFieldProps.d.ts +22 -0
  127. package/dist/components/inputField/InputField.d.ts +4 -0
  128. package/dist/components/inputField/index.d.ts +3 -0
  129. package/dist/components/inputField/useInputFieldStyles.d.ts +5 -0
  130. package/dist/components/renderDrawer/RenderDrawer.d.ts +1 -4
  131. package/dist/components/renderHeader/index.d.ts +1 -0
  132. package/dist/components/searchControl/ISearchControlProps.d.ts +14 -0
  133. package/dist/components/searchControl/SearchControl.d.ts +5 -0
  134. package/dist/components/searchControl/index.d.ts +3 -0
  135. package/dist/components/searchControl/useSearchControlStyles.d.ts +13 -0
  136. package/dist/components/stackv2/StackV2.d.ts +1 -1
  137. package/dist/components/worldMap/index.d.ts +2 -0
  138. package/dist/components/worldMap/useContentToolTipStyles.d.ts +2 -8
  139. package/dist/cose-bilkent-S5V4N54A-BcLbJZT7.cjs +2 -0
  140. package/dist/cose-bilkent-S5V4N54A-CtEV3dGx.js +4934 -0
  141. package/dist/cs-D-801PIR.cjs +2 -0
  142. package/dist/cs-DQvRPciB.js +219 -0
  143. package/dist/cy-BxyJCM05.js +219 -0
  144. package/dist/cy-aUPUcn-S.cjs +2 -0
  145. package/dist/cytoscape.esm-BS1owLay.js +30250 -0
  146. package/dist/cytoscape.esm-BxB3woZB.cjs +10 -0
  147. package/dist/da-B05ad5Iq.js +219 -0
  148. package/dist/da-CTiLOqut.cjs +2 -0
  149. package/dist/dagre-6UL2VRFP-BZ9apxkx.js +696 -0
  150. package/dist/dagre-6UL2VRFP-FmOJGmX_.cjs +2 -0
  151. package/dist/de-DJ5iwpd7.js +219 -0
  152. package/dist/de-Dm204UMA.cjs +2 -0
  153. package/dist/defaultLocale-7NeEK7SF.cjs +2 -0
  154. package/dist/defaultLocale-DVr69WTU.js +207 -0
  155. package/dist/diagram-PSM6KHXK-BZxXJahR.cjs +2 -0
  156. package/dist/diagram-PSM6KHXK-_wkJk__z.js +848 -0
  157. package/dist/diagram-QEK2KX5R-NQiK3YZe.cjs +2 -0
  158. package/dist/diagram-QEK2KX5R-YQAU79Lo.js +305 -0
  159. package/dist/diagram-S2PKOQOG-Cob2HIrt.cjs +2 -0
  160. package/dist/diagram-S2PKOQOG-D8jaJbP8.js +212 -0
  161. package/dist/el-CBS9mHS3.js +219 -0
  162. package/dist/el-DbtZj-ph.cjs +2 -0
  163. package/dist/erDiagram-Q2GNP2WA-DAzex-RZ.cjs +2 -0
  164. package/dist/erDiagram-Q2GNP2WA-syuB6Tgc.js +1160 -0
  165. package/dist/es-Bo08apQr.js +219 -0
  166. package/dist/es-Cc-4Vqf7.cjs +2 -0
  167. package/dist/et-D5pQ66eY.cjs +2 -0
  168. package/dist/et-pRL0Tmle.js +219 -0
  169. package/dist/eu-Br68gaf7.js +219 -0
  170. package/dist/eu-RZ-27koK.cjs +2 -0
  171. package/dist/fi-BCXB-k_X.js +219 -0
  172. package/dist/fi-Dqa9mgnW.cjs +2 -0
  173. package/dist/flowDiagram-NV44I4VS-CXJA5Xu7.js +2339 -0
  174. package/dist/flowDiagram-NV44I4VS-DOcXDmk8.cjs +2 -0
  175. package/dist/fr-B7fhkle4.cjs +2 -0
  176. package/dist/fr-gKE1SSIF.js +219 -0
  177. package/dist/ga-4Hf7vKvr.cjs +2 -0
  178. package/dist/ga-C1SpITZy.js +219 -0
  179. package/dist/ganttDiagram-JELNMOA3-BodaBsjX.js +3652 -0
  180. package/dist/ganttDiagram-JELNMOA3-oeOE4Au1.cjs +2 -0
  181. package/dist/gitGraph-G5XIXVHT-BAoUh2t9.js +6 -0
  182. package/dist/gitGraph-G5XIXVHT-bEuOx0_B.cjs +2 -0
  183. package/dist/gitGraphDiagram-V2S2FVAM-B5dByD3_.js +1215 -0
  184. package/dist/gitGraphDiagram-V2S2FVAM-D4G2FRg-.cjs +2 -0
  185. package/dist/gl-COSpsMSK.cjs +2 -0
  186. package/dist/gl-CSzCeu2L.js +219 -0
  187. package/dist/graph-C7xixGrW.cjs +2 -0
  188. package/dist/graph-DH3cnEko.js +421 -0
  189. package/dist/he-BrkfqoIm.js +219 -0
  190. package/dist/he-C7Wi6-EL.cjs +2 -0
  191. package/dist/hi-C1RGDPzn.js +219 -0
  192. package/dist/hi-ojklJj-a.cjs +2 -0
  193. package/dist/hooks/index.d.ts +1 -0
  194. package/dist/hooks/useLocalizationStrings.d.ts +71 -0
  195. package/dist/hr-CsO_h2VT.js +219 -0
  196. package/dist/hr-DkEwOCGU.cjs +2 -0
  197. package/dist/hu-CVtbM-V2.js +219 -0
  198. package/dist/hu-D8uAAzvN.cjs +2 -0
  199. package/dist/id-18yPGK2f.cjs +2 -0
  200. package/dist/id-CARSN0W8.js +219 -0
  201. package/dist/index-CP55uT1-.js +55270 -0
  202. package/dist/index-DkoeCnje.cjs +428 -0
  203. package/dist/index.cjs +2 -0
  204. package/dist/index.d.ts +14 -0
  205. package/dist/index.js +165 -200
  206. package/dist/info-VBDWY6EO-CCtIeR-l.js +6 -0
  207. package/dist/info-VBDWY6EO-CIQZzC1h.cjs +2 -0
  208. package/dist/infoDiagram-HS3SLOUP-BCGLBWdb.js +32 -0
  209. package/dist/infoDiagram-HS3SLOUP-l61UBAGu.cjs +2 -0
  210. package/dist/init-DZ96s0AS.cjs +2 -0
  211. package/dist/init-ZxktEp_H.js +17 -0
  212. package/dist/it-BVq911RW.cjs +2 -0
  213. package/dist/it-ClWGK7XT.js +219 -0
  214. package/dist/ja-BgcKuKZ4.cjs +2 -0
  215. package/dist/ja-DGL12HwE.js +219 -0
  216. package/dist/journeyDiagram-XKPGCS4Q-CngaMpvw.js +1255 -0
  217. package/dist/journeyDiagram-XKPGCS4Q-DDFQr_sf.cjs +2 -0
  218. package/dist/kanban-definition-3W4ZIXB7-DE64tG2k.js +1049 -0
  219. package/dist/kanban-definition-3W4ZIXB7-Yh2cXBd5.cjs +2 -0
  220. package/dist/katex-DPu4QpBP.cjs +2 -0
  221. package/dist/katex-Dd1-wdX2.js +14523 -0
  222. package/dist/kk-CkKXbKso.js +219 -0
  223. package/dist/kk-Dn3FBkOR.cjs +2 -0
  224. package/dist/ko-CKAbV25b.cjs +2 -0
  225. package/dist/ko-QYvDV2aw.js +219 -0
  226. package/dist/layout-D6yO7DzL.cjs +2 -0
  227. package/dist/layout-bxkZz7Cm.js +1919 -0
  228. package/dist/linear-CytTXQM2.cjs +2 -0
  229. package/dist/linear-R5bATomY.js +341 -0
  230. package/dist/localization/ILibraryStrings.d.ts +299 -0
  231. package/dist/localization/defaults/ar.d.ts +8 -0
  232. package/dist/localization/defaults/az.d.ts +8 -0
  233. package/dist/localization/defaults/bg.d.ts +8 -0
  234. package/dist/localization/defaults/bs.d.ts +8 -0
  235. package/dist/localization/defaults/ca.d.ts +8 -0
  236. package/dist/localization/defaults/cs.d.ts +8 -0
  237. package/dist/localization/defaults/cy.d.ts +8 -0
  238. package/dist/localization/defaults/da.d.ts +8 -0
  239. package/dist/localization/defaults/de.d.ts +8 -0
  240. package/dist/localization/defaults/el.d.ts +8 -0
  241. package/dist/localization/defaults/en.d.ts +8 -0
  242. package/dist/localization/defaults/es.d.ts +8 -0
  243. package/dist/localization/defaults/et.d.ts +8 -0
  244. package/dist/localization/defaults/eu.d.ts +8 -0
  245. package/dist/localization/defaults/fi.d.ts +8 -0
  246. package/dist/localization/defaults/fr.d.ts +8 -0
  247. package/dist/localization/defaults/ga.d.ts +8 -0
  248. package/dist/localization/defaults/gl.d.ts +8 -0
  249. package/dist/localization/defaults/he.d.ts +8 -0
  250. package/dist/localization/defaults/hi.d.ts +8 -0
  251. package/dist/localization/defaults/hr.d.ts +8 -0
  252. package/dist/localization/defaults/hu.d.ts +8 -0
  253. package/dist/localization/defaults/id.d.ts +8 -0
  254. package/dist/localization/defaults/index.d.ts +47 -0
  255. package/dist/localization/defaults/it.d.ts +8 -0
  256. package/dist/localization/defaults/ja.d.ts +8 -0
  257. package/dist/localization/defaults/kk.d.ts +8 -0
  258. package/dist/localization/defaults/ko.d.ts +8 -0
  259. package/dist/localization/defaults/lt.d.ts +8 -0
  260. package/dist/localization/defaults/lv.d.ts +8 -0
  261. package/dist/localization/defaults/mk.d.ts +8 -0
  262. package/dist/localization/defaults/ms.d.ts +8 -0
  263. package/dist/localization/defaults/nb.d.ts +8 -0
  264. package/dist/localization/defaults/nl.d.ts +8 -0
  265. package/dist/localization/defaults/pl.d.ts +8 -0
  266. package/dist/localization/defaults/pt.d.ts +8 -0
  267. package/dist/localization/defaults/ro.d.ts +8 -0
  268. package/dist/localization/defaults/ru.d.ts +8 -0
  269. package/dist/localization/defaults/sk.d.ts +8 -0
  270. package/dist/localization/defaults/sl.d.ts +8 -0
  271. package/dist/localization/defaults/sr.d.ts +8 -0
  272. package/dist/localization/defaults/sv.d.ts +8 -0
  273. package/dist/localization/defaults/th.d.ts +8 -0
  274. package/dist/localization/defaults/tr.d.ts +8 -0
  275. package/dist/localization/defaults/uk.d.ts +8 -0
  276. package/dist/localization/defaults/vi.d.ts +8 -0
  277. package/dist/localization/defaults/zh.d.ts +8 -0
  278. package/dist/localization/index.d.ts +8 -0
  279. package/dist/localization/utils.d.ts +10 -0
  280. package/dist/lt-BKnFyiLV.js +219 -0
  281. package/dist/lt-BnGNEsIS.cjs +2 -0
  282. package/dist/lv-Clqo0Ogm.js +219 -0
  283. package/dist/lv-D3rJQRhc.cjs +2 -0
  284. package/dist/maplibre-gl-D9TSGNCf.cjs +6 -0
  285. package/dist/maplibre-gl-DwyiD0x9.js +23511 -0
  286. package/dist/mermaid-parser.core-BbdofhA6.js +23791 -0
  287. package/dist/mermaid-parser.core-C4ChZJz4.cjs +2 -0
  288. package/dist/mindmap-definition-VGOIOE7T-BonbrEly.cjs +2 -0
  289. package/dist/mindmap-definition-VGOIOE7T-C8FL7caj.js +1129 -0
  290. package/dist/mk-EhcD0RzW.js +219 -0
  291. package/dist/mk-hVxJgrE0.cjs +2 -0
  292. package/dist/ms-CJACwjo7.js +219 -0
  293. package/dist/ms-D0txYckK.cjs +2 -0
  294. package/dist/nb-BfKRl99z.cjs +2 -0
  295. package/dist/nb-NCgnP0Pu.js +219 -0
  296. package/dist/nl-EgsNCunP.js +219 -0
  297. package/dist/nl-ZXiLkBj_.cjs +2 -0
  298. package/dist/ordinal-BZdahNih.cjs +2 -0
  299. package/dist/ordinal-DSZU4PqD.js +77 -0
  300. package/dist/packet-DYOGHKS2-64UpspMA.cjs +2 -0
  301. package/dist/packet-DYOGHKS2-DCndr5Wp.js +6 -0
  302. package/dist/pie-VRWISCQL-B_5_SIgL.cjs +2 -0
  303. package/dist/pie-VRWISCQL-BbSFz_Jh.js +6 -0
  304. package/dist/pieDiagram-ADFJNKIX-C8b4kPLp.cjs +2 -0
  305. package/dist/pieDiagram-ADFJNKIX-CQjh4P80.js +238 -0
  306. package/dist/pl-H28GVtiG.js +219 -0
  307. package/dist/pl-tVjdYTB9.cjs +2 -0
  308. package/dist/providers.cjs +2 -0
  309. package/dist/providers.js +252 -1
  310. package/dist/pt-1k62N9F3.cjs +2 -0
  311. package/dist/pt-BSPZhWKl.js +211 -0
  312. package/dist/quadrantDiagram-AYHSOK5B-Bb99yQJL.cjs +2 -0
  313. package/dist/quadrantDiagram-AYHSOK5B-BiLBDCHf.js +1338 -0
  314. package/dist/radar-ZZBFDIW7-DC8bA3_e.cjs +2 -0
  315. package/dist/radar-ZZBFDIW7-DpGZ3D_F.js +6 -0
  316. package/dist/requirementDiagram-UZGBJVZJ-BeLfR5tA.cjs +2 -0
  317. package/dist/requirementDiagram-UZGBJVZJ-D6hcN5kf.js +1164 -0
  318. package/dist/ro-9Qt1qDDA.cjs +2 -0
  319. package/dist/ro-BpaZLre_.js +219 -0
  320. package/dist/ru-4WxRouIU.cjs +2 -0
  321. package/dist/ru-CUZzD-Tx.js +219 -0
  322. package/dist/sankeyDiagram-TZEHDZUN-7K2pggbF.js +1194 -0
  323. package/dist/sankeyDiagram-TZEHDZUN-T1lqY3ke.cjs +2 -0
  324. package/dist/sequenceDiagram-WL72ISMW-CaSRrEHR.cjs +2 -0
  325. package/dist/sequenceDiagram-WL72ISMW-DymCRly8.js +3882 -0
  326. package/dist/sk-CoQ6XiCY.js +219 -0
  327. package/dist/sk-uWukDQab.cjs +2 -0
  328. package/dist/sl-B6DVbKg6.cjs +2 -0
  329. package/dist/sl-CHW-ZGol.js +219 -0
  330. package/dist/sr-BOD8Tc-D.cjs +2 -0
  331. package/dist/sr-EQGjIBJE.js +219 -0
  332. package/dist/stateDiagram-FKZM4ZOC-B3uhYYpW.js +449 -0
  333. package/dist/stateDiagram-FKZM4ZOC-BETxyYxX.cjs +2 -0
  334. package/dist/stateDiagram-v2-4FDKWEC3-B4AjT1wB.cjs +2 -0
  335. package/dist/stateDiagram-v2-4FDKWEC3-BuiA8K0X.js +20 -0
  336. package/dist/style.css +1 -0
  337. package/dist/sv-B6nLuQr7.cjs +2 -0
  338. package/dist/sv-DTxWN6ED.js +219 -0
  339. package/dist/th-BVPzHvBf.js +219 -0
  340. package/dist/th-DmULV6uT.cjs +2 -0
  341. package/dist/timeline-definition-IT6M3QCI-CsJvwNrg.cjs +2 -0
  342. package/dist/timeline-definition-IT6M3QCI-DNROY61n.js +1227 -0
  343. package/dist/tr-BE5geTUC.cjs +2 -0
  344. package/dist/tr-BHR1QA-D.js +219 -0
  345. package/dist/treemap-GDKQZRPO-DbPXSmw-.js +6 -0
  346. package/dist/treemap-GDKQZRPO-Dj3L_VQH.cjs +2 -0
  347. package/dist/uk-Bc5TwelE.js +219 -0
  348. package/dist/uk-DS5ukB_-.cjs +2 -0
  349. package/dist/vi-D9FF4kkG.cjs +2 -0
  350. package/dist/vi-DC0eQZb7.js +219 -0
  351. package/dist/xychartDiagram-PRI3JC2R-CXT2FhOm.cjs +2 -0
  352. package/dist/xychartDiagram-PRI3JC2R-D7UaoGaC.js +1887 -0
  353. package/dist/zh-CGcOiJ3s.cjs +2 -0
  354. package/dist/zh-GsCLn8OE.js +219 -0
  355. package/package.json +95 -92
  356. package/dist/ILoggingProvider-C4FFlnQ0.js +0 -2
  357. package/dist/ILoggingProvider-C4FFlnQ0.js.map +0 -1
  358. package/dist/ILoggingProvider-CYYYCGLY.mjs +0 -18
  359. package/dist/ILoggingProvider-CYYYCGLY.mjs.map +0 -1
  360. package/dist/abstractions/IApplicationContext.d.ts.map +0 -1
  361. package/dist/abstractions/IAuthenticationProvider.d.ts.map +0 -1
  362. package/dist/abstractions/IGraphProvider.d.ts.map +0 -1
  363. package/dist/abstractions/ILoggingProvider.d.ts.map +0 -1
  364. package/dist/abstractions/IPageContext.d.ts.map +0 -1
  365. package/dist/abstractions/IStorageProvider.d.ts.map +0 -1
  366. package/dist/abstractions/index.d.ts.map +0 -1
  367. package/dist/abstractions/providers/ConsoleLoggingProvider.d.ts.map +0 -1
  368. package/dist/abstractions/providers/DefaultGraphClient.d.ts.map +0 -1
  369. package/dist/abstractions/providers/LocalStorageProvider.d.ts.map +0 -1
  370. package/dist/abstractions/providers/index.d.ts.map +0 -1
  371. package/dist/components/AISearchControl/AISearchControl.d.ts.map +0 -1
  372. package/dist/components/AISearchControl/AISearchIcon.d.ts.map +0 -1
  373. package/dist/components/AISearchControl/AISearchIconExample.d.ts.map +0 -1
  374. package/dist/components/AISearchControl/index.d.ts.map +0 -1
  375. package/dist/components/AISearchControl/useAISearchControlStyles.d.ts.map +0 -1
  376. package/dist/components/AspectRatio/AspectRatio.d.ts.map +0 -1
  377. package/dist/components/AspectRatio/IAspectRationProps.d.ts.map +0 -1
  378. package/dist/components/AspectRatio/index.d.ts.map +0 -1
  379. package/dist/components/AspectRatio/useAspectRatioStyles.d.ts.map +0 -1
  380. package/dist/components/Card/Card.d.ts.map +0 -1
  381. package/dist/components/Card/ICardProps.d.ts.map +0 -1
  382. package/dist/components/Card/index.d.ts.map +0 -1
  383. package/dist/components/Card/useCardStyles.d.ts.map +0 -1
  384. package/dist/components/Carousel/Carousel.d.ts.map +0 -1
  385. package/dist/components/Carousel/ICarouselProps.d.ts.map +0 -1
  386. package/dist/components/Carousel/index.d.ts.map +0 -1
  387. package/dist/components/Carousel/useCarouselButton.d.ts.map +0 -1
  388. package/dist/components/Carousel/useCarouselStyles.d.ts.map +0 -1
  389. package/dist/components/Carousel/useCarouselStylesMain.d.ts.map +0 -1
  390. package/dist/components/Center/Center.d.ts.map +0 -1
  391. package/dist/components/Center/ICenterProps.d.ts.map +0 -1
  392. package/dist/components/Center/index.d.ts.map +0 -1
  393. package/dist/components/Center/useCenterStyles.d.ts.map +0 -1
  394. package/dist/components/Container/Container.d.ts.map +0 -1
  395. package/dist/components/Container/IContainerProps.d.ts.map +0 -1
  396. package/dist/components/Container/index.d.ts.map +0 -1
  397. package/dist/components/Container/useContainerStyles.d.ts.map +0 -1
  398. package/dist/components/ContentRenderer/ContentRenderer.d.ts.map +0 -1
  399. package/dist/components/ContentRenderer/index.d.ts.map +0 -1
  400. package/dist/components/DataGridV2/DataGridV2.d.ts.map +0 -1
  401. package/dist/components/DataGridV2/index.d.ts.map +0 -1
  402. package/dist/components/DataGridV2/useDataGridV2Styles.d.ts.map +0 -1
  403. package/dist/components/Grid/Grid.d.ts.map +0 -1
  404. package/dist/components/Grid/IGridProps.d.ts.map +0 -1
  405. package/dist/components/Grid/index.d.ts.map +0 -1
  406. package/dist/components/Grid/useGridStyles.d.ts.map +0 -1
  407. package/dist/components/Layout/ILayoutProps.d.ts.map +0 -1
  408. package/dist/components/Layout/Layout.d.ts.map +0 -1
  409. package/dist/components/Layout/LayoutItem.d.ts.map +0 -1
  410. package/dist/components/Layout/index.d.ts.map +0 -1
  411. package/dist/components/Layout/useLayoutStyles.d.ts.map +0 -1
  412. package/dist/components/ListItemActivityMessage/IAction.d.ts.map +0 -1
  413. package/dist/components/ListItemActivityMessage/IActivity.d.ts.map +0 -1
  414. package/dist/components/ListItemActivityMessage/IActivityMessageProps.d.ts.map +0 -1
  415. package/dist/components/ListItemActivityMessage/IActor.d.ts.map +0 -1
  416. package/dist/components/ListItemActivityMessage/IUserActor.d.ts.map +0 -1
  417. package/dist/components/ListItemActivityMessage/ListItemActivityMessage.d.ts.map +0 -1
  418. package/dist/components/ListItemActivityMessage/index.d.ts.map +0 -1
  419. package/dist/components/ListItemActivityMessage/useSharePointActivities.d.ts.map +0 -1
  420. package/dist/components/LivePersona/ILivePersonaProps.d.ts.map +0 -1
  421. package/dist/components/LivePersona/LivePersona.d.ts.map +0 -1
  422. package/dist/components/LivePersona/index.d.ts.map +0 -1
  423. package/dist/components/MarkdownRenderer/MarkdownRenderer.d.ts.map +0 -1
  424. package/dist/components/MarkdownRenderer/index.d.ts.map +0 -1
  425. package/dist/components/Popup/Popup.d.ts.map +0 -1
  426. package/dist/components/Popup/index.d.ts.map +0 -1
  427. package/dist/components/Provider/UniversalProvider.d.ts.map +0 -1
  428. package/dist/components/Provider/index.d.ts.map +0 -1
  429. package/dist/components/RenderLabel/RenderLabel.d.ts.map +0 -1
  430. package/dist/components/RenderLabel/index.d.ts.map +0 -1
  431. package/dist/components/RenderLabel/useRenderLabelStylesStyles.d.ts.map +0 -1
  432. package/dist/components/RenderSpninner/RenderSpinner.d.ts.map +0 -1
  433. package/dist/components/RenderSpninner/index.d.ts.map +0 -1
  434. package/dist/components/Space/ISpaceProps.d.ts.map +0 -1
  435. package/dist/components/Space/SPace.d.ts.map +0 -1
  436. package/dist/components/Space/index.d.ts.map +0 -1
  437. package/dist/components/Space/useSpaceStyles.d.ts.map +0 -1
  438. package/dist/components/Stack/IStackProps.d.ts.map +0 -1
  439. package/dist/components/Stack/Stack.d.ts.map +0 -1
  440. package/dist/components/Stack/StackItem.d.ts.map +0 -1
  441. package/dist/components/Stack/index.d.ts.map +0 -1
  442. package/dist/components/Stack/useStackStyles.d.ts.map +0 -1
  443. package/dist/components/StackedUsers/IStackedUsersProps.d.ts.map +0 -1
  444. package/dist/components/StackedUsers/StackedUsers.d.ts.map +0 -1
  445. package/dist/components/StackedUsers/index.d.ts.map +0 -1
  446. package/dist/components/StackedUsers/useStackedUsersStyles.d.ts.map +0 -1
  447. package/dist/components/adaptiveCardHost/AdaptiveCardHost.Exports.d.ts.map +0 -1
  448. package/dist/components/adaptiveCardHost/AdaptiveCardHost.HostConfig.d.ts.map +0 -1
  449. package/dist/components/adaptiveCardHost/AdaptiveCardHost.Utilities.d.ts.map +0 -1
  450. package/dist/components/adaptiveCardHost/AdaptiveCardHost.d.ts.map +0 -1
  451. package/dist/components/adaptiveCardHost/IAdaptiveCardHostProps.d.ts.map +0 -1
  452. package/dist/components/adaptiveCardHost/fluentUI/Actions.d.ts.map +0 -1
  453. package/dist/components/adaptiveCardHost/fluentUI/Elements.d.ts.map +0 -1
  454. package/dist/components/adaptiveCardHost/fluentUI/FluentUIChoiceSetInput.d.ts.map +0 -1
  455. package/dist/components/adaptiveCardHost/fluentUI/FluentUIDateInput.d.ts.map +0 -1
  456. package/dist/components/adaptiveCardHost/fluentUI/FluentUINumberInput.d.ts.map +0 -1
  457. package/dist/components/adaptiveCardHost/fluentUI/FluentUITextInput.d.ts.map +0 -1
  458. package/dist/components/adaptiveCardHost/fluentUI/FluentUITimeInput.d.ts.map +0 -1
  459. package/dist/components/adaptiveCardHost/fluentUI/FluentUIToggleInput.d.ts.map +0 -1
  460. package/dist/components/adaptiveCardHost/fluentUI/HostCapability.d.ts.map +0 -1
  461. package/dist/components/adaptiveCardHost/fluentUI/HostConfig.d.ts.map +0 -1
  462. package/dist/components/adaptiveCardHost/fluentUI/IconButton.d.ts.map +0 -1
  463. package/dist/components/adaptiveCardHost/fluentUI/Styles.d.ts.map +0 -1
  464. package/dist/components/adaptiveCardHost/fluentUI/index.d.ts.map +0 -1
  465. package/dist/components/adaptiveCardHost/fluentUI/inlineButtonRootStyle.d.ts.map +0 -1
  466. package/dist/components/adaptiveCardHost/fluentUI/internalRender.d.ts.map +0 -1
  467. package/dist/components/adaptiveCardHost/index.d.ts.map +0 -1
  468. package/dist/components/adaptiveCardHost/models/AdaptiveCardHostThemeType.d.ts.map +0 -1
  469. package/dist/components/adaptiveCardHost/models/IAadInfo.d.ts.map +0 -1
  470. package/dist/components/adaptiveCardHost/models/IAdaptiveCardHostActionResult.d.ts.map +0 -1
  471. package/dist/components/adaptiveCardHost/models/IAdaptiveCardHostConfigResult.d.ts.map +0 -1
  472. package/dist/components/adaptiveCardHost/models/IAdaptiveCardHostEvaluationContext.d.ts.map +0 -1
  473. package/dist/components/adaptiveCardHost/models/ICultureInfo.d.ts.map +0 -1
  474. package/dist/components/adaptiveCardHost/models/ISPListInfo.d.ts.map +0 -1
  475. package/dist/components/adaptiveCardHost/models/ISPListItemInfo.d.ts.map +0 -1
  476. package/dist/components/adaptiveCardHost/models/ISPSiteInfo.d.ts.map +0 -1
  477. package/dist/components/adaptiveCardHost/models/ISPWebInfo.d.ts.map +0 -1
  478. package/dist/components/adaptiveCardHost/models/IUserInfo.d.ts.map +0 -1
  479. package/dist/components/adaptiveCardHost/models/index.d.ts.map +0 -1
  480. package/dist/components/aiAssistant/AIAssistant.d.ts.map +0 -1
  481. package/dist/components/aiAssistant/ChatAction.d.ts.map +0 -1
  482. package/dist/components/aiAssistant/ChatInput.d.ts.map +0 -1
  483. package/dist/components/aiAssistant/ChatInputProps.d.ts.map +0 -1
  484. package/dist/components/aiAssistant/ChatInputWithMensions.d.ts.map +0 -1
  485. package/dist/components/aiAssistant/ChatInputWithMensionsProps.d.ts.map +0 -1
  486. package/dist/components/aiAssistant/ChatInputWithMensionsV1.d.ts.map +0 -1
  487. package/dist/components/aiAssistant/ChatInputWithMensionsV2.d.ts.map +0 -1
  488. package/dist/components/aiAssistant/ChatList.d.ts.map +0 -1
  489. package/dist/components/aiAssistant/ChatState.d.ts.map +0 -1
  490. package/dist/components/aiAssistant/IAIAssistantProps.d.ts.map +0 -1
  491. package/dist/components/aiAssistant/IChatItem.d.ts.map +0 -1
  492. package/dist/components/aiAssistant/IResponse.d.ts.map +0 -1
  493. package/dist/components/aiAssistant/LoadingDots.d.ts.map +0 -1
  494. package/dist/components/aiAssistant/chatReducer.d.ts.map +0 -1
  495. package/dist/components/aiAssistant/index.d.ts.map +0 -1
  496. package/dist/components/aiAssistant/useAIAssistantStyles.d.ts.map +0 -1
  497. package/dist/components/aiAssistant/useChatInputStyles.d.ts.map +0 -1
  498. package/dist/components/aiAssistant/useChatInputWithMensionsStyles.d.ts.map +0 -1
  499. package/dist/components/aiAssistant/useLoadingDotsStyles.d.ts.map +0 -1
  500. package/dist/components/aiAssistant/useStreamRequest.d.ts.map +0 -1
  501. package/dist/components/aiAssistant/useStyles.d.ts.map +0 -1
  502. package/dist/components/appDashboard/AppDashboard.d.ts.map +0 -1
  503. package/dist/components/appDashboard/IAppDashboardProps.d.ts.map +0 -1
  504. package/dist/components/appDashboard/NoDashboards.d.ts.map +0 -1
  505. package/dist/components/appDashboard/index.d.ts.map +0 -1
  506. package/dist/components/appDashboard/selectZoom/SelectZoom.d.ts.map +0 -1
  507. package/dist/components/appDashboard/useDashboardStyles.d.ts.map +0 -1
  508. package/dist/components/baseComponentProps/IBaseProps.d.ts.map +0 -1
  509. package/dist/components/breadcrumb/Breadcrumb.d.ts.map +0 -1
  510. package/dist/components/breadcrumb/IBreadcrumItem.d.ts.map +0 -1
  511. package/dist/components/breadcrumb/IBreadcrumProps.d.ts.map +0 -1
  512. package/dist/components/breadcrumb/OverflowMenu.d.ts.map +0 -1
  513. package/dist/components/breadcrumb/index.d.ts.map +0 -1
  514. package/dist/components/breadcrumb/useBreadcrumStyles.d.ts.map +0 -1
  515. package/dist/components/buttonMenu/ButtonMenu.d.ts.map +0 -1
  516. package/dist/components/buttonMenu/IButtonMenuOption.d.ts.map +0 -1
  517. package/dist/components/buttonMenu/index.d.ts.map +0 -1
  518. package/dist/components/calendarControl/CalendarControl.d.ts.map +0 -1
  519. package/dist/components/calendarControl/Day.d.ts.map +0 -1
  520. package/dist/components/calendarControl/DayView.d.ts.map +0 -1
  521. package/dist/components/calendarControl/EventDetailsPopover.d.ts.map +0 -1
  522. package/dist/components/calendarControl/EventPopoverCard.d.ts.map +0 -1
  523. package/dist/components/calendarControl/EventRender.d.ts.map +0 -1
  524. package/dist/components/calendarControl/RenderEventToDayOfMonth.d.ts.map +0 -1
  525. package/dist/components/calendarControl/SelectCalendarView.d.ts.map +0 -1
  526. package/dist/components/calendarControl/Toolbar.d.ts.map +0 -1
  527. package/dist/components/calendarControl/WeekView.d.ts.map +0 -1
  528. package/dist/components/calendarControl/hooks/index.d.ts.map +0 -1
  529. package/dist/components/calendarControl/hooks/useCalendar.d.ts.map +0 -1
  530. package/dist/components/calendarControl/hooks/useCalendarStyles.d.ts.map +0 -1
  531. package/dist/components/calendarControl/hooks/useDayViewStyles.d.ts.map +0 -1
  532. package/dist/components/calendarControl/hooks/useUtils.d.ts.map +0 -1
  533. package/dist/components/calendarControl/hooks/useWeekViewStyles.d.ts.map +0 -1
  534. package/dist/components/calendarControl/index.d.ts.map +0 -1
  535. package/dist/components/calendarControl/models/ECalendarViews.d.ts.map +0 -1
  536. package/dist/components/calendarControl/models/IAttendee.d.ts.map +0 -1
  537. package/dist/components/calendarControl/models/ICalendarControlProps.d.ts.map +0 -1
  538. package/dist/components/calendarControl/models/ICalendarDay.d.ts.map +0 -1
  539. package/dist/components/calendarControl/models/IEventColors.d.ts.map +0 -1
  540. package/dist/components/calendarControl/models/IEvents.d.ts.map +0 -1
  541. package/dist/components/calendarControl/models/IStrings.d.ts.map +0 -1
  542. package/dist/components/calendarControl/models/index.d.ts.map +0 -1
  543. package/dist/components/customControlBar/CustomControlBar.d.ts.map +0 -1
  544. package/dist/components/customControlBar/index.d.ts.map +0 -1
  545. package/dist/components/dataGrid/DataGrid.d.ts.map +0 -1
  546. package/dist/components/dataGrid/IColumnConfig.d.ts.map +0 -1
  547. package/dist/components/dataGrid/IDataGridProps.d.ts.map +0 -1
  548. package/dist/components/dataGrid/ISortState.d.ts.map +0 -1
  549. package/dist/components/dataGrid/index.d.ts.map +0 -1
  550. package/dist/components/dataGrid/stack/IStackProps.d.ts.map +0 -1
  551. package/dist/components/dataGrid/stack/Stack.d.ts.map +0 -1
  552. package/dist/components/dataGrid/useDataGridStyles.d.ts.map +0 -1
  553. package/dist/components/dropDownField/DropDownField.d.ts.map +0 -1
  554. package/dist/components/dropDownField/IDropDownFieldProps.d.ts.map +0 -1
  555. package/dist/components/dropDownField/IOption.d.ts.map +0 -1
  556. package/dist/components/dropDownField/index.d.ts.map +0 -1
  557. package/dist/components/genericOverFlowMenu/GenericOverFlowMenu.d.ts.map +0 -1
  558. package/dist/components/genericOverFlowMenu/index.d.ts.map +0 -1
  559. package/dist/components/genericOverFlowMenu/useOverflowMenuStyles.d.ts.map +0 -1
  560. package/dist/components/iconButton/IconButton.d.ts.map +0 -1
  561. package/dist/components/iconButton/IconButtonProps.d.ts.map +0 -1
  562. package/dist/components/iconButton/index.d.ts.map +0 -1
  563. package/dist/components/index.d.ts.map +0 -1
  564. package/dist/components/mensions/IMensionsProps.d.ts.map +0 -1
  565. package/dist/components/mensions/Mensions.d.ts.map +0 -1
  566. package/dist/components/mensions/MensionsExample.d.ts.map +0 -1
  567. package/dist/components/mensions/index.d.ts.map +0 -1
  568. package/dist/components/mensions/useMensionsStyles.d.ts.map +0 -1
  569. package/dist/components/renderAdaptiveCard/RenderAdaptiveCard.d.ts.map +0 -1
  570. package/dist/components/renderAdaptiveCard/index.d.ts.map +0 -1
  571. package/dist/components/renderDialog/RenderDialog.d.ts.map +0 -1
  572. package/dist/components/renderDialog/index.d.ts.map +0 -1
  573. package/dist/components/renderDrawer/RenderDrawer.d.ts.map +0 -1
  574. package/dist/components/renderDrawer/index.d.ts.map +0 -1
  575. package/dist/components/renderHeader/IRenderHeaderProps.d.ts.map +0 -1
  576. package/dist/components/renderHeader/RenderHeader.d.ts.map +0 -1
  577. package/dist/components/renderHeader/index.d.ts.map +0 -1
  578. package/dist/components/renderHeader/useRenderHeaderStyles.d.ts.map +0 -1
  579. package/dist/components/selectDay/SelectDay.d.ts.map +0 -1
  580. package/dist/components/selectDay/index.d.ts.map +0 -1
  581. package/dist/components/selectMonth/CalendarMonth.d.ts.map +0 -1
  582. package/dist/components/selectMonth/SelectMonth.d.ts.map +0 -1
  583. package/dist/components/selectMonth/index.d.ts.map +0 -1
  584. package/dist/components/selectView/SelectView.d.ts.map +0 -1
  585. package/dist/components/selectView/index.d.ts.map +0 -1
  586. package/dist/components/selectWeek/SelectWeek.d.ts.map +0 -1
  587. package/dist/components/selectWeek/index.d.ts.map +0 -1
  588. package/dist/components/shareDialog/ShareDialog.d.ts.map +0 -1
  589. package/dist/components/shareDialog/index.d.ts.map +0 -1
  590. package/dist/components/showError/IErrorDisplayProps.d.ts.map +0 -1
  591. package/dist/components/showError/ShowError.d.ts.map +0 -1
  592. package/dist/components/showError/index.d.ts.map +0 -1
  593. package/dist/components/showError/useShowErrorStyles.d.ts.map +0 -1
  594. package/dist/components/showMessage/IShowMessage.d.ts.map +0 -1
  595. package/dist/components/showMessage/ShowMessage.d.ts.map +0 -1
  596. package/dist/components/showMessage/index.d.ts.map +0 -1
  597. package/dist/components/showMessage/useShowMessageStyles.d.ts.map +0 -1
  598. package/dist/components/stackv2/IStackV2Props.d.ts.map +0 -1
  599. package/dist/components/stackv2/StackV2.d.ts.map +0 -1
  600. package/dist/components/stackv2/index.d.ts.map +0 -1
  601. package/dist/components/svgImages/BusinessReportIcon.d.ts.map +0 -1
  602. package/dist/components/typographyControl/ITypographyControlProps.d.ts.map +0 -1
  603. package/dist/components/typographyControl/TypographyControl.d.ts.map +0 -1
  604. package/dist/components/typographyControl/index.d.ts.map +0 -1
  605. package/dist/components/userCard/IUserCardProps.d.ts.map +0 -1
  606. package/dist/components/userCard/IUserInfo.d.ts.map +0 -1
  607. package/dist/components/userCard/UserCard.d.ts.map +0 -1
  608. package/dist/components/userCard/constants.d.ts.map +0 -1
  609. package/dist/components/userCard/index.d.ts.map +0 -1
  610. package/dist/components/userCard/useUserCardStyles.d.ts.map +0 -1
  611. package/dist/components/userCard/useUserProfile.d.ts.map +0 -1
  612. package/dist/components/videoPlayer/VideoPlayer.d.ts.map +0 -1
  613. package/dist/components/videoPlayer/index.d.ts.map +0 -1
  614. package/dist/components/videoPlayer/useVideoStyles.d.ts.map +0 -1
  615. package/dist/components/worldMap/IWorldMapProps.d.ts.map +0 -1
  616. package/dist/components/worldMap/MapNavigation.d.ts.map +0 -1
  617. package/dist/components/worldMap/MaplibreWorldMapProps.d.ts.map +0 -1
  618. package/dist/components/worldMap/TooltipContent.d.ts.map +0 -1
  619. package/dist/components/worldMap/WorldMap.d.ts.map +0 -1
  620. package/dist/components/worldMap/WorldMapControl.d.ts.map +0 -1
  621. package/dist/components/worldMap/data.d.ts.map +0 -1
  622. package/dist/components/worldMap/index.d.ts.map +0 -1
  623. package/dist/components/worldMap/marker.d.ts.map +0 -1
  624. package/dist/components/worldMap/useCleanMapStyle.d.ts.map +0 -1
  625. package/dist/components/worldMap/useContentToolTipStyles.d.ts.map +0 -1
  626. package/dist/components/worldMap/useGeocodedCountries.d.ts.map +0 -1
  627. package/dist/constants/EBreakPoints.d.ts.map +0 -1
  628. package/dist/constants/EMessageTypes.d.ts.map +0 -1
  629. package/dist/constants/index.d.ts.map +0 -1
  630. package/dist/hooks/index.d.ts.map +0 -1
  631. package/dist/hooks/useAIAssistant.d.ts.map +0 -1
  632. package/dist/hooks/useAIAssistantParser.d.ts.map +0 -1
  633. package/dist/hooks/useGraphAPI.d.ts.map +0 -1
  634. package/dist/hooks/useIndexedDB.d.ts.map +0 -1
  635. package/dist/hooks/useLogging.d.ts.map +0 -1
  636. package/dist/hooks/usePolling.d.ts.map +0 -1
  637. package/dist/hooks/useTimeZone.d.ts.map +0 -1
  638. package/dist/hooks/useTimeZoneHelper.d.ts.map +0 -1
  639. package/dist/index.d.ts.map +0 -1
  640. package/dist/index.js.map +0 -1
  641. package/dist/index.mjs +0 -27983
  642. package/dist/index.mjs.map +0 -1
  643. package/dist/models/IAppCardContainer.d.ts.map +0 -1
  644. package/dist/models/index.d.ts.map +0 -1
  645. package/dist/providers.js.map +0 -1
  646. package/dist/providers.mjs +0 -250
  647. package/dist/providers.mjs.map +0 -1
  648. package/dist/types/TBaseSpacing.d.ts.map +0 -1
  649. package/dist/types/THorizontalSpacing.d.ts.map +0 -1
  650. package/dist/types/THorizontalSpacingBreakPoints.d.ts.map +0 -1
  651. package/dist/types/TLayoutBreakPoints.d.ts.map +0 -1
  652. package/dist/types/TPaddingBreakPoints.d.ts.map +0 -1
  653. package/dist/types/TPading.d.ts.map +0 -1
  654. package/dist/types/TVerticalSpacing.d.ts.map +0 -1
  655. package/dist/types/TVerticalSpacingBreakPoints.d.ts.map +0 -1
  656. package/dist/types/index.d.ts.map +0 -1
  657. package/dist/utils/contentDetector.d.ts.map +0 -1
  658. package/dist/utils/index.d.ts.map +0 -1
  659. package/dist/utils/lodash.d.ts.map +0 -1
  660. package/dist/utils/useComponentsUtils.d.ts.map +0 -1
  661. package/dist/utils/useDateUtils.d.ts.map +0 -1
  662. package/dist/utils/useImageUtils.d.ts.map +0 -1
@@ -0,0 +1,3756 @@
1
+ var _a, _b;
2
+ import { g as getIconStyles } from "./chunk-FMBD7UC4-DulgQOWY.js";
3
+ import { aH as copyObject, aI as Symbol$1, aJ as cloneTypedArray, aK as cloneArrayBuffer, aL as isObjectLike, aM as getTag, aN as baseUnary, aO as nodeUtil, aP as isObject, aQ as copyArray, aR as isBuffer, aS as cloneBuffer, aT as initCloneObject, aU as Stack, aD as isArray, aV as assignValue, _ as __name, G as getConfig, d as select, e as configureSvgSize, l as log, z as clear, B as rgba, c as getConfig2, aW as getLineFunctionsWithOffset, a9 as line, aa as curveBasis, a6 as getUrl, aX as evaluate, az as createText, as as getSubGraphTitleMargins, u as utils_default, k as common_default, aY as replaceIconSubstring, aZ as decodeEntities, i as sanitizeText, a_ as getStylesFromArray } from "./index-CP55uT1-.js";
4
+ import { k as keys, g as getSymbols, a as getAllKeys, b as arrayEach } from "./_arrayEach-CnIMt1eB.js";
5
+ import { G as Graph } from "./graph-DH3cnEko.js";
6
+ import { c as channel } from "./channel-CJ2FoHig.js";
7
+ function baseAssign(object, source) {
8
+ return object && copyObject(source, keys(source), object);
9
+ }
10
+ function copySymbols(source, object) {
11
+ return copyObject(source, getSymbols(source), object);
12
+ }
13
+ var objectProto = Object.prototype;
14
+ var hasOwnProperty = objectProto.hasOwnProperty;
15
+ function initCloneArray(array) {
16
+ var length = array.length, result = new array.constructor(length);
17
+ if (length && typeof array[0] == "string" && hasOwnProperty.call(array, "index")) {
18
+ result.index = array.index;
19
+ result.input = array.input;
20
+ }
21
+ return result;
22
+ }
23
+ function cloneDataView(dataView, isDeep) {
24
+ var buffer = dataView.buffer;
25
+ return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
26
+ }
27
+ var reFlags = /\w*$/;
28
+ function cloneRegExp(regexp) {
29
+ var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
30
+ result.lastIndex = regexp.lastIndex;
31
+ return result;
32
+ }
33
+ var symbolProto = Symbol$1 ? Symbol$1.prototype : void 0, symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
34
+ function cloneSymbol(symbol) {
35
+ return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
36
+ }
37
+ var boolTag$1 = "[object Boolean]", dateTag$1 = "[object Date]", mapTag$2 = "[object Map]", numberTag$1 = "[object Number]", regexpTag$1 = "[object RegExp]", setTag$2 = "[object Set]", stringTag$1 = "[object String]", symbolTag$1 = "[object Symbol]";
38
+ var arrayBufferTag$1 = "[object ArrayBuffer]", dataViewTag$1 = "[object DataView]", float32Tag$1 = "[object Float32Array]", float64Tag$1 = "[object Float64Array]", int8Tag$1 = "[object Int8Array]", int16Tag$1 = "[object Int16Array]", int32Tag$1 = "[object Int32Array]", uint8Tag$1 = "[object Uint8Array]", uint8ClampedTag$1 = "[object Uint8ClampedArray]", uint16Tag$1 = "[object Uint16Array]", uint32Tag$1 = "[object Uint32Array]";
39
+ function initCloneByTag(object, tag, isDeep) {
40
+ var Ctor = object.constructor;
41
+ switch (tag) {
42
+ case arrayBufferTag$1:
43
+ return cloneArrayBuffer(object);
44
+ case boolTag$1:
45
+ case dateTag$1:
46
+ return new Ctor(+object);
47
+ case dataViewTag$1:
48
+ return cloneDataView(object);
49
+ case float32Tag$1:
50
+ case float64Tag$1:
51
+ case int8Tag$1:
52
+ case int16Tag$1:
53
+ case int32Tag$1:
54
+ case uint8Tag$1:
55
+ case uint8ClampedTag$1:
56
+ case uint16Tag$1:
57
+ case uint32Tag$1:
58
+ return cloneTypedArray(object, isDeep);
59
+ case mapTag$2:
60
+ return new Ctor();
61
+ case numberTag$1:
62
+ case stringTag$1:
63
+ return new Ctor(object);
64
+ case regexpTag$1:
65
+ return cloneRegExp(object);
66
+ case setTag$2:
67
+ return new Ctor();
68
+ case symbolTag$1:
69
+ return cloneSymbol(object);
70
+ }
71
+ }
72
+ var mapTag$1 = "[object Map]";
73
+ function baseIsMap(value) {
74
+ return isObjectLike(value) && getTag(value) == mapTag$1;
75
+ }
76
+ var nodeIsMap = nodeUtil && nodeUtil.isMap;
77
+ var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
78
+ var setTag$1 = "[object Set]";
79
+ function baseIsSet(value) {
80
+ return isObjectLike(value) && getTag(value) == setTag$1;
81
+ }
82
+ var nodeIsSet = nodeUtil && nodeUtil.isSet;
83
+ var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
84
+ var CLONE_DEEP_FLAG = 1;
85
+ var argsTag = "[object Arguments]", arrayTag = "[object Array]", boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", mapTag = "[object Map]", numberTag = "[object Number]", objectTag = "[object Object]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]", weakMapTag = "[object WeakMap]";
86
+ var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]";
87
+ var cloneableTags = {};
88
+ cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
89
+ cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
90
+ function baseClone(value, bitmask, customizer, key, object, stack) {
91
+ var result, isDeep = bitmask & CLONE_DEEP_FLAG;
92
+ if (result !== void 0) {
93
+ return result;
94
+ }
95
+ if (!isObject(value)) {
96
+ return value;
97
+ }
98
+ var isArr = isArray(value);
99
+ if (isArr) {
100
+ result = initCloneArray(value);
101
+ {
102
+ return copyArray(value, result);
103
+ }
104
+ } else {
105
+ var tag = getTag(value), isFunc = tag == funcTag || tag == genTag;
106
+ if (isBuffer(value)) {
107
+ return cloneBuffer(value, isDeep);
108
+ }
109
+ if (tag == objectTag || tag == argsTag || isFunc && !object) {
110
+ result = isFunc ? {} : initCloneObject(value);
111
+ {
112
+ return copySymbols(value, baseAssign(result, value));
113
+ }
114
+ } else {
115
+ if (!cloneableTags[tag]) {
116
+ return object ? value : {};
117
+ }
118
+ result = initCloneByTag(value, tag, isDeep);
119
+ }
120
+ }
121
+ stack || (stack = new Stack());
122
+ var stacked = stack.get(value);
123
+ if (stacked) {
124
+ return stacked;
125
+ }
126
+ stack.set(value, result);
127
+ if (isSet(value)) {
128
+ value.forEach(function(subValue) {
129
+ result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
130
+ });
131
+ } else if (isMap(value)) {
132
+ value.forEach(function(subValue, key2) {
133
+ result.set(key2, baseClone(subValue, bitmask, customizer, key2, value, stack));
134
+ });
135
+ }
136
+ var keysFunc = getAllKeys;
137
+ var props = isArr ? void 0 : keysFunc(value);
138
+ arrayEach(props || value, function(subValue, key2) {
139
+ if (props) {
140
+ key2 = subValue;
141
+ subValue = value[key2];
142
+ }
143
+ assignValue(result, key2, baseClone(subValue, bitmask, customizer, key2, value, stack));
144
+ });
145
+ return result;
146
+ }
147
+ var CLONE_SYMBOLS_FLAG = 4;
148
+ function clone(value) {
149
+ return baseClone(value, CLONE_SYMBOLS_FLAG);
150
+ }
151
+ var parser = function() {
152
+ var o = /* @__PURE__ */ __name(function(k, v, o2, l) {
153
+ for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) ;
154
+ return o2;
155
+ }, "o"), $V0 = [1, 15], $V1 = [1, 7], $V2 = [1, 13], $V3 = [1, 14], $V4 = [1, 19], $V5 = [1, 16], $V6 = [1, 17], $V7 = [1, 18], $V8 = [8, 30], $V9 = [8, 10, 21, 28, 29, 30, 31, 39, 43, 46], $Va = [1, 23], $Vb = [1, 24], $Vc = [8, 10, 15, 16, 21, 28, 29, 30, 31, 39, 43, 46], $Vd = [8, 10, 15, 16, 21, 27, 28, 29, 30, 31, 39, 43, 46], $Ve = [1, 49];
156
+ var parser2 = {
157
+ trace: /* @__PURE__ */ __name(function trace() {
158
+ }, "trace"),
159
+ yy: {},
160
+ 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 },
161
+ 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" },
162
+ 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]],
163
+ performAction: /* @__PURE__ */ __name(function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
164
+ var $0 = $$.length - 1;
165
+ switch (yystate) {
166
+ case 4:
167
+ yy.getLogger().debug("Rule: separator (NL) ");
168
+ break;
169
+ case 5:
170
+ yy.getLogger().debug("Rule: separator (Space) ");
171
+ break;
172
+ case 6:
173
+ yy.getLogger().debug("Rule: separator (EOF) ");
174
+ break;
175
+ case 7:
176
+ yy.getLogger().debug("Rule: hierarchy: ", $$[$0 - 1]);
177
+ yy.setHierarchy($$[$0 - 1]);
178
+ break;
179
+ case 8:
180
+ yy.getLogger().debug("Stop NL ");
181
+ break;
182
+ case 9:
183
+ yy.getLogger().debug("Stop EOF ");
184
+ break;
185
+ case 10:
186
+ yy.getLogger().debug("Stop NL2 ");
187
+ break;
188
+ case 11:
189
+ yy.getLogger().debug("Stop EOF2 ");
190
+ break;
191
+ case 12:
192
+ yy.getLogger().debug("Rule: statement: ", $$[$0]);
193
+ typeof $$[$0].length === "number" ? this.$ = $$[$0] : this.$ = [$$[$0]];
194
+ break;
195
+ case 13:
196
+ yy.getLogger().debug("Rule: statement #2: ", $$[$0 - 1]);
197
+ this.$ = [$$[$0 - 1]].concat($$[$0]);
198
+ break;
199
+ case 14:
200
+ yy.getLogger().debug("Rule: link: ", $$[$0], yytext);
201
+ this.$ = { edgeTypeStr: $$[$0], label: "" };
202
+ break;
203
+ case 15:
204
+ yy.getLogger().debug("Rule: LABEL link: ", $$[$0 - 3], $$[$0 - 1], $$[$0]);
205
+ this.$ = { edgeTypeStr: $$[$0], label: $$[$0 - 1] };
206
+ break;
207
+ case 18:
208
+ const num = parseInt($$[$0]);
209
+ const spaceId = yy.generateId();
210
+ this.$ = { id: spaceId, type: "space", label: "", width: num, children: [] };
211
+ break;
212
+ case 23:
213
+ yy.getLogger().debug("Rule: (nodeStatement link node) ", $$[$0 - 2], $$[$0 - 1], $$[$0], " typestr: ", $$[$0 - 1].edgeTypeStr);
214
+ const edgeData = yy.edgeStrToEdgeData($$[$0 - 1].edgeTypeStr);
215
+ this.$ = [
216
+ { id: $$[$0 - 2].id, label: $$[$0 - 2].label, type: $$[$0 - 2].type, directions: $$[$0 - 2].directions },
217
+ { id: $$[$0 - 2].id + "-" + $$[$0].id, start: $$[$0 - 2].id, end: $$[$0].id, label: $$[$0 - 1].label, type: "edge", directions: $$[$0].directions, arrowTypeEnd: edgeData, arrowTypeStart: "arrow_open" },
218
+ { id: $$[$0].id, label: $$[$0].label, type: yy.typeStr2Type($$[$0].typeStr), directions: $$[$0].directions }
219
+ ];
220
+ break;
221
+ case 24:
222
+ yy.getLogger().debug("Rule: nodeStatement (abc88 node size) ", $$[$0 - 1], $$[$0]);
223
+ this.$ = { id: $$[$0 - 1].id, label: $$[$0 - 1].label, type: yy.typeStr2Type($$[$0 - 1].typeStr), directions: $$[$0 - 1].directions, widthInColumns: parseInt($$[$0], 10) };
224
+ break;
225
+ case 25:
226
+ yy.getLogger().debug("Rule: nodeStatement (node) ", $$[$0]);
227
+ this.$ = { id: $$[$0].id, label: $$[$0].label, type: yy.typeStr2Type($$[$0].typeStr), directions: $$[$0].directions, widthInColumns: 1 };
228
+ break;
229
+ case 26:
230
+ yy.getLogger().debug("APA123", this ? this : "na");
231
+ yy.getLogger().debug("COLUMNS: ", $$[$0]);
232
+ this.$ = { type: "column-setting", columns: $$[$0] === "auto" ? -1 : parseInt($$[$0]) };
233
+ break;
234
+ case 27:
235
+ yy.getLogger().debug("Rule: id-block statement : ", $$[$0 - 2], $$[$0 - 1]);
236
+ yy.generateId();
237
+ this.$ = { ...$$[$0 - 2], type: "composite", children: $$[$0 - 1] };
238
+ break;
239
+ case 28:
240
+ yy.getLogger().debug("Rule: blockStatement : ", $$[$0 - 2], $$[$0 - 1], $$[$0]);
241
+ const id = yy.generateId();
242
+ this.$ = { id, type: "composite", label: "", children: $$[$0 - 1] };
243
+ break;
244
+ case 29:
245
+ yy.getLogger().debug("Rule: node (NODE_ID separator): ", $$[$0]);
246
+ this.$ = { id: $$[$0] };
247
+ break;
248
+ case 30:
249
+ yy.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ", $$[$0 - 1], $$[$0]);
250
+ this.$ = { id: $$[$0 - 1], label: $$[$0].label, typeStr: $$[$0].typeStr, directions: $$[$0].directions };
251
+ break;
252
+ case 31:
253
+ yy.getLogger().debug("Rule: dirList: ", $$[$0]);
254
+ this.$ = [$$[$0]];
255
+ break;
256
+ case 32:
257
+ yy.getLogger().debug("Rule: dirList: ", $$[$0 - 1], $$[$0]);
258
+ this.$ = [$$[$0 - 1]].concat($$[$0]);
259
+ break;
260
+ case 33:
261
+ yy.getLogger().debug("Rule: nodeShapeNLabel: ", $$[$0 - 2], $$[$0 - 1], $$[$0]);
262
+ this.$ = { typeStr: $$[$0 - 2] + $$[$0], label: $$[$0 - 1] };
263
+ break;
264
+ case 34:
265
+ yy.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ", $$[$0 - 3], $$[$0 - 2], " #3:", $$[$0 - 1], $$[$0]);
266
+ this.$ = { typeStr: $$[$0 - 3] + $$[$0], label: $$[$0 - 2], directions: $$[$0 - 1] };
267
+ break;
268
+ case 35:
269
+ case 36:
270
+ this.$ = { type: "classDef", id: $$[$0 - 1].trim(), css: $$[$0].trim() };
271
+ break;
272
+ case 37:
273
+ this.$ = { type: "applyClass", id: $$[$0 - 1].trim(), styleClass: $$[$0].trim() };
274
+ break;
275
+ case 38:
276
+ this.$ = { type: "applyStyles", id: $$[$0 - 1].trim(), stylesStr: $$[$0].trim() };
277
+ break;
278
+ }
279
+ }, "anonymous"),
280
+ table: [{ 9: 1, 10: [1, 2] }, { 1: [3] }, { 10: $V0, 11: 3, 13: 4, 19: 5, 20: 6, 21: $V1, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: $V2, 29: $V3, 31: $V4, 39: $V5, 43: $V6, 46: $V7 }, { 8: [1, 20] }, o($V8, [2, 12], { 13: 4, 19: 5, 20: 6, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 11: 21, 10: $V0, 21: $V1, 28: $V2, 29: $V3, 31: $V4, 39: $V5, 43: $V6, 46: $V7 }), o($V9, [2, 16], { 14: 22, 15: $Va, 16: $Vb }), o($V9, [2, 17]), o($V9, [2, 18]), o($V9, [2, 19]), o($V9, [2, 20]), o($V9, [2, 21]), o($V9, [2, 22]), o($Vc, [2, 25], { 27: [1, 25] }), o($V9, [2, 26]), { 19: 26, 26: 12, 31: $V4 }, { 10: $V0, 11: 27, 13: 4, 19: 5, 20: 6, 21: $V1, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: $V2, 29: $V3, 31: $V4, 39: $V5, 43: $V6, 46: $V7 }, { 40: [1, 28], 42: [1, 29] }, { 44: [1, 30] }, { 47: [1, 31] }, o($Vd, [2, 29], { 32: 32, 35: [1, 33], 37: [1, 34] }), { 1: [2, 7] }, o($V8, [2, 13]), { 26: 35, 31: $V4 }, { 31: [2, 14] }, { 17: [1, 36] }, o($Vc, [2, 24]), { 10: $V0, 11: 37, 13: 4, 14: 22, 15: $Va, 16: $Vb, 19: 5, 20: 6, 21: $V1, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: $V2, 29: $V3, 31: $V4, 39: $V5, 43: $V6, 46: $V7 }, { 30: [1, 38] }, { 41: [1, 39] }, { 41: [1, 40] }, { 45: [1, 41] }, { 48: [1, 42] }, o($Vd, [2, 30]), { 18: [1, 43] }, { 18: [1, 44] }, o($Vc, [2, 23]), { 18: [1, 45] }, { 30: [1, 46] }, o($V9, [2, 28]), o($V9, [2, 35]), o($V9, [2, 36]), o($V9, [2, 37]), o($V9, [2, 38]), { 36: [1, 47] }, { 33: 48, 34: $Ve }, { 15: [1, 50] }, o($V9, [2, 27]), o($Vd, [2, 33]), { 38: [1, 51] }, { 33: 52, 34: $Ve, 38: [2, 31] }, { 31: [2, 15] }, o($Vd, [2, 34]), { 38: [2, 32] }],
281
+ defaultActions: { 20: [2, 7], 23: [2, 14], 50: [2, 15], 52: [2, 32] },
282
+ parseError: /* @__PURE__ */ __name(function parseError(str, hash) {
283
+ if (hash.recoverable) {
284
+ this.trace(str);
285
+ } else {
286
+ var error = new Error(str);
287
+ error.hash = hash;
288
+ throw error;
289
+ }
290
+ }, "parseError"),
291
+ parse: /* @__PURE__ */ __name(function parse(input) {
292
+ var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1;
293
+ var args = lstack.slice.call(arguments, 1);
294
+ var lexer2 = Object.create(this.lexer);
295
+ var sharedState = { yy: {} };
296
+ for (var k in this.yy) {
297
+ if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
298
+ sharedState.yy[k] = this.yy[k];
299
+ }
300
+ }
301
+ lexer2.setInput(input, sharedState.yy);
302
+ sharedState.yy.lexer = lexer2;
303
+ sharedState.yy.parser = this;
304
+ if (typeof lexer2.yylloc == "undefined") {
305
+ lexer2.yylloc = {};
306
+ }
307
+ var yyloc = lexer2.yylloc;
308
+ lstack.push(yyloc);
309
+ var ranges = lexer2.options && lexer2.options.ranges;
310
+ if (typeof sharedState.yy.parseError === "function") {
311
+ this.parseError = sharedState.yy.parseError;
312
+ } else {
313
+ this.parseError = Object.getPrototypeOf(this).parseError;
314
+ }
315
+ function popStack(n) {
316
+ stack.length = stack.length - 2 * n;
317
+ vstack.length = vstack.length - n;
318
+ lstack.length = lstack.length - n;
319
+ }
320
+ __name(popStack, "popStack");
321
+ function lex() {
322
+ var token;
323
+ token = tstack.pop() || lexer2.lex() || EOF;
324
+ if (typeof token !== "number") {
325
+ if (token instanceof Array) {
326
+ tstack = token;
327
+ token = tstack.pop();
328
+ }
329
+ token = self.symbols_[token] || token;
330
+ }
331
+ return token;
332
+ }
333
+ __name(lex, "lex");
334
+ var symbol, state, action, r, yyval = {}, p, len, newState, expected;
335
+ while (true) {
336
+ state = stack[stack.length - 1];
337
+ if (this.defaultActions[state]) {
338
+ action = this.defaultActions[state];
339
+ } else {
340
+ if (symbol === null || typeof symbol == "undefined") {
341
+ symbol = lex();
342
+ }
343
+ action = table[state] && table[state][symbol];
344
+ }
345
+ if (typeof action === "undefined" || !action.length || !action[0]) {
346
+ var errStr = "";
347
+ expected = [];
348
+ for (p in table[state]) {
349
+ if (this.terminals_[p] && p > TERROR) {
350
+ expected.push("'" + this.terminals_[p] + "'");
351
+ }
352
+ }
353
+ if (lexer2.showPosition) {
354
+ errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
355
+ } else {
356
+ errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
357
+ }
358
+ this.parseError(errStr, {
359
+ text: lexer2.match,
360
+ token: this.terminals_[symbol] || symbol,
361
+ line: lexer2.yylineno,
362
+ loc: yyloc,
363
+ expected
364
+ });
365
+ }
366
+ if (action[0] instanceof Array && action.length > 1) {
367
+ throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
368
+ }
369
+ switch (action[0]) {
370
+ case 1:
371
+ stack.push(symbol);
372
+ vstack.push(lexer2.yytext);
373
+ lstack.push(lexer2.yylloc);
374
+ stack.push(action[1]);
375
+ symbol = null;
376
+ {
377
+ yyleng = lexer2.yyleng;
378
+ yytext = lexer2.yytext;
379
+ yylineno = lexer2.yylineno;
380
+ yyloc = lexer2.yylloc;
381
+ }
382
+ break;
383
+ case 2:
384
+ len = this.productions_[action[1]][1];
385
+ yyval.$ = vstack[vstack.length - len];
386
+ yyval._$ = {
387
+ first_line: lstack[lstack.length - (len || 1)].first_line,
388
+ last_line: lstack[lstack.length - 1].last_line,
389
+ first_column: lstack[lstack.length - (len || 1)].first_column,
390
+ last_column: lstack[lstack.length - 1].last_column
391
+ };
392
+ if (ranges) {
393
+ yyval._$.range = [
394
+ lstack[lstack.length - (len || 1)].range[0],
395
+ lstack[lstack.length - 1].range[1]
396
+ ];
397
+ }
398
+ r = this.performAction.apply(yyval, [
399
+ yytext,
400
+ yyleng,
401
+ yylineno,
402
+ sharedState.yy,
403
+ action[1],
404
+ vstack,
405
+ lstack
406
+ ].concat(args));
407
+ if (typeof r !== "undefined") {
408
+ return r;
409
+ }
410
+ if (len) {
411
+ stack = stack.slice(0, -1 * len * 2);
412
+ vstack = vstack.slice(0, -1 * len);
413
+ lstack = lstack.slice(0, -1 * len);
414
+ }
415
+ stack.push(this.productions_[action[1]][0]);
416
+ vstack.push(yyval.$);
417
+ lstack.push(yyval._$);
418
+ newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
419
+ stack.push(newState);
420
+ break;
421
+ case 3:
422
+ return true;
423
+ }
424
+ }
425
+ return true;
426
+ }, "parse")
427
+ };
428
+ var lexer = /* @__PURE__ */ function() {
429
+ var lexer2 = {
430
+ EOF: 1,
431
+ parseError: /* @__PURE__ */ __name(function parseError(str, hash) {
432
+ if (this.yy.parser) {
433
+ this.yy.parser.parseError(str, hash);
434
+ } else {
435
+ throw new Error(str);
436
+ }
437
+ }, "parseError"),
438
+ // resets the lexer, sets new input
439
+ setInput: /* @__PURE__ */ __name(function(input, yy) {
440
+ this.yy = yy || this.yy || {};
441
+ this._input = input;
442
+ this._more = this._backtrack = this.done = false;
443
+ this.yylineno = this.yyleng = 0;
444
+ this.yytext = this.matched = this.match = "";
445
+ this.conditionStack = ["INITIAL"];
446
+ this.yylloc = {
447
+ first_line: 1,
448
+ first_column: 0,
449
+ last_line: 1,
450
+ last_column: 0
451
+ };
452
+ if (this.options.ranges) {
453
+ this.yylloc.range = [0, 0];
454
+ }
455
+ this.offset = 0;
456
+ return this;
457
+ }, "setInput"),
458
+ // consumes and returns one char from the input
459
+ input: /* @__PURE__ */ __name(function() {
460
+ var ch = this._input[0];
461
+ this.yytext += ch;
462
+ this.yyleng++;
463
+ this.offset++;
464
+ this.match += ch;
465
+ this.matched += ch;
466
+ var lines = ch.match(/(?:\r\n?|\n).*/g);
467
+ if (lines) {
468
+ this.yylineno++;
469
+ this.yylloc.last_line++;
470
+ } else {
471
+ this.yylloc.last_column++;
472
+ }
473
+ if (this.options.ranges) {
474
+ this.yylloc.range[1]++;
475
+ }
476
+ this._input = this._input.slice(1);
477
+ return ch;
478
+ }, "input"),
479
+ // unshifts one char (or a string) into the input
480
+ unput: /* @__PURE__ */ __name(function(ch) {
481
+ var len = ch.length;
482
+ var lines = ch.split(/(?:\r\n?|\n)/g);
483
+ this._input = ch + this._input;
484
+ this.yytext = this.yytext.substr(0, this.yytext.length - len);
485
+ this.offset -= len;
486
+ var oldLines = this.match.split(/(?:\r\n?|\n)/g);
487
+ this.match = this.match.substr(0, this.match.length - 1);
488
+ this.matched = this.matched.substr(0, this.matched.length - 1);
489
+ if (lines.length - 1) {
490
+ this.yylineno -= lines.length - 1;
491
+ }
492
+ var r = this.yylloc.range;
493
+ this.yylloc = {
494
+ first_line: this.yylloc.first_line,
495
+ last_line: this.yylineno + 1,
496
+ first_column: this.yylloc.first_column,
497
+ last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
498
+ };
499
+ if (this.options.ranges) {
500
+ this.yylloc.range = [r[0], r[0] + this.yyleng - len];
501
+ }
502
+ this.yyleng = this.yytext.length;
503
+ return this;
504
+ }, "unput"),
505
+ // When called from action, caches matched text and appends it on next action
506
+ more: /* @__PURE__ */ __name(function() {
507
+ this._more = true;
508
+ return this;
509
+ }, "more"),
510
+ // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
511
+ reject: /* @__PURE__ */ __name(function() {
512
+ if (this.options.backtrack_lexer) {
513
+ this._backtrack = true;
514
+ } else {
515
+ return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), {
516
+ text: "",
517
+ token: null,
518
+ line: this.yylineno
519
+ });
520
+ }
521
+ return this;
522
+ }, "reject"),
523
+ // retain first n characters of the match
524
+ less: /* @__PURE__ */ __name(function(n) {
525
+ this.unput(this.match.slice(n));
526
+ }, "less"),
527
+ // displays already matched input, i.e. for error messages
528
+ pastInput: /* @__PURE__ */ __name(function() {
529
+ var past = this.matched.substr(0, this.matched.length - this.match.length);
530
+ return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
531
+ }, "pastInput"),
532
+ // displays upcoming input, i.e. for error messages
533
+ upcomingInput: /* @__PURE__ */ __name(function() {
534
+ var next = this.match;
535
+ if (next.length < 20) {
536
+ next += this._input.substr(0, 20 - next.length);
537
+ }
538
+ return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
539
+ }, "upcomingInput"),
540
+ // displays the character position where the lexing error occurred, i.e. for error messages
541
+ showPosition: /* @__PURE__ */ __name(function() {
542
+ var pre = this.pastInput();
543
+ var c = new Array(pre.length + 1).join("-");
544
+ return pre + this.upcomingInput() + "\n" + c + "^";
545
+ }, "showPosition"),
546
+ // test the lexed token: return FALSE when not a match, otherwise return token
547
+ test_match: /* @__PURE__ */ __name(function(match, indexed_rule) {
548
+ var token, lines, backup;
549
+ if (this.options.backtrack_lexer) {
550
+ backup = {
551
+ yylineno: this.yylineno,
552
+ yylloc: {
553
+ first_line: this.yylloc.first_line,
554
+ last_line: this.last_line,
555
+ first_column: this.yylloc.first_column,
556
+ last_column: this.yylloc.last_column
557
+ },
558
+ yytext: this.yytext,
559
+ match: this.match,
560
+ matches: this.matches,
561
+ matched: this.matched,
562
+ yyleng: this.yyleng,
563
+ offset: this.offset,
564
+ _more: this._more,
565
+ _input: this._input,
566
+ yy: this.yy,
567
+ conditionStack: this.conditionStack.slice(0),
568
+ done: this.done
569
+ };
570
+ if (this.options.ranges) {
571
+ backup.yylloc.range = this.yylloc.range.slice(0);
572
+ }
573
+ }
574
+ lines = match[0].match(/(?:\r\n?|\n).*/g);
575
+ if (lines) {
576
+ this.yylineno += lines.length;
577
+ }
578
+ this.yylloc = {
579
+ first_line: this.yylloc.last_line,
580
+ last_line: this.yylineno + 1,
581
+ first_column: this.yylloc.last_column,
582
+ last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
583
+ };
584
+ this.yytext += match[0];
585
+ this.match += match[0];
586
+ this.matches = match;
587
+ this.yyleng = this.yytext.length;
588
+ if (this.options.ranges) {
589
+ this.yylloc.range = [this.offset, this.offset += this.yyleng];
590
+ }
591
+ this._more = false;
592
+ this._backtrack = false;
593
+ this._input = this._input.slice(match[0].length);
594
+ this.matched += match[0];
595
+ token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
596
+ if (this.done && this._input) {
597
+ this.done = false;
598
+ }
599
+ if (token) {
600
+ return token;
601
+ } else if (this._backtrack) {
602
+ for (var k in backup) {
603
+ this[k] = backup[k];
604
+ }
605
+ return false;
606
+ }
607
+ return false;
608
+ }, "test_match"),
609
+ // return next match in input
610
+ next: /* @__PURE__ */ __name(function() {
611
+ if (this.done) {
612
+ return this.EOF;
613
+ }
614
+ if (!this._input) {
615
+ this.done = true;
616
+ }
617
+ var token, match, tempMatch, index;
618
+ if (!this._more) {
619
+ this.yytext = "";
620
+ this.match = "";
621
+ }
622
+ var rules = this._currentRules();
623
+ for (var i = 0; i < rules.length; i++) {
624
+ tempMatch = this._input.match(this.rules[rules[i]]);
625
+ if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
626
+ match = tempMatch;
627
+ index = i;
628
+ if (this.options.backtrack_lexer) {
629
+ token = this.test_match(tempMatch, rules[i]);
630
+ if (token !== false) {
631
+ return token;
632
+ } else if (this._backtrack) {
633
+ match = false;
634
+ continue;
635
+ } else {
636
+ return false;
637
+ }
638
+ } else if (!this.options.flex) {
639
+ break;
640
+ }
641
+ }
642
+ }
643
+ if (match) {
644
+ token = this.test_match(match, rules[index]);
645
+ if (token !== false) {
646
+ return token;
647
+ }
648
+ return false;
649
+ }
650
+ if (this._input === "") {
651
+ return this.EOF;
652
+ } else {
653
+ return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
654
+ text: "",
655
+ token: null,
656
+ line: this.yylineno
657
+ });
658
+ }
659
+ }, "next"),
660
+ // return next match that has a token
661
+ lex: /* @__PURE__ */ __name(function lex() {
662
+ var r = this.next();
663
+ if (r) {
664
+ return r;
665
+ } else {
666
+ return this.lex();
667
+ }
668
+ }, "lex"),
669
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
670
+ begin: /* @__PURE__ */ __name(function begin(condition) {
671
+ this.conditionStack.push(condition);
672
+ }, "begin"),
673
+ // pop the previously active lexer condition state off the condition stack
674
+ popState: /* @__PURE__ */ __name(function popState() {
675
+ var n = this.conditionStack.length - 1;
676
+ if (n > 0) {
677
+ return this.conditionStack.pop();
678
+ } else {
679
+ return this.conditionStack[0];
680
+ }
681
+ }, "popState"),
682
+ // produce the lexer rule set which is active for the currently active lexer condition state
683
+ _currentRules: /* @__PURE__ */ __name(function _currentRules() {
684
+ if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
685
+ return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
686
+ } else {
687
+ return this.conditions["INITIAL"].rules;
688
+ }
689
+ }, "_currentRules"),
690
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
691
+ topState: /* @__PURE__ */ __name(function topState(n) {
692
+ n = this.conditionStack.length - 1 - Math.abs(n || 0);
693
+ if (n >= 0) {
694
+ return this.conditionStack[n];
695
+ } else {
696
+ return "INITIAL";
697
+ }
698
+ }, "topState"),
699
+ // alias for begin(condition)
700
+ pushState: /* @__PURE__ */ __name(function pushState(condition) {
701
+ this.begin(condition);
702
+ }, "pushState"),
703
+ // return the number of states currently on the stack
704
+ stateStackSize: /* @__PURE__ */ __name(function stateStackSize() {
705
+ return this.conditionStack.length;
706
+ }, "stateStackSize"),
707
+ options: {},
708
+ performAction: /* @__PURE__ */ __name(function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
709
+ switch ($avoiding_name_collisions) {
710
+ case 0:
711
+ yy.getLogger().debug("Found block-beta");
712
+ return 10;
713
+ case 1:
714
+ yy.getLogger().debug("Found id-block");
715
+ return 29;
716
+ case 2:
717
+ yy.getLogger().debug("Found block");
718
+ return 10;
719
+ case 3:
720
+ yy.getLogger().debug(".", yy_.yytext);
721
+ break;
722
+ case 4:
723
+ yy.getLogger().debug("_", yy_.yytext);
724
+ break;
725
+ case 5:
726
+ return 5;
727
+ case 6:
728
+ yy_.yytext = -1;
729
+ return 28;
730
+ case 7:
731
+ yy_.yytext = yy_.yytext.replace(/columns\s+/, "");
732
+ yy.getLogger().debug("COLUMNS (LEX)", yy_.yytext);
733
+ return 28;
734
+ case 8:
735
+ this.pushState("md_string");
736
+ break;
737
+ case 9:
738
+ return "MD_STR";
739
+ case 10:
740
+ this.popState();
741
+ break;
742
+ case 11:
743
+ this.pushState("string");
744
+ break;
745
+ case 12:
746
+ yy.getLogger().debug("LEX: POPPING STR:", yy_.yytext);
747
+ this.popState();
748
+ break;
749
+ case 13:
750
+ yy.getLogger().debug("LEX: STR end:", yy_.yytext);
751
+ return "STR";
752
+ case 14:
753
+ yy_.yytext = yy_.yytext.replace(/space\:/, "");
754
+ yy.getLogger().debug("SPACE NUM (LEX)", yy_.yytext);
755
+ return 21;
756
+ case 15:
757
+ yy_.yytext = "1";
758
+ yy.getLogger().debug("COLUMNS (LEX)", yy_.yytext);
759
+ return 21;
760
+ case 16:
761
+ return 42;
762
+ case 17:
763
+ return "LINKSTYLE";
764
+ case 18:
765
+ return "INTERPOLATE";
766
+ case 19:
767
+ this.pushState("CLASSDEF");
768
+ return 39;
769
+ case 20:
770
+ this.popState();
771
+ this.pushState("CLASSDEFID");
772
+ return "DEFAULT_CLASSDEF_ID";
773
+ case 21:
774
+ this.popState();
775
+ this.pushState("CLASSDEFID");
776
+ return 40;
777
+ case 22:
778
+ this.popState();
779
+ return 41;
780
+ case 23:
781
+ this.pushState("CLASS");
782
+ return 43;
783
+ case 24:
784
+ this.popState();
785
+ this.pushState("CLASS_STYLE");
786
+ return 44;
787
+ case 25:
788
+ this.popState();
789
+ return 45;
790
+ case 26:
791
+ this.pushState("STYLE_STMNT");
792
+ return 46;
793
+ case 27:
794
+ this.popState();
795
+ this.pushState("STYLE_DEFINITION");
796
+ return 47;
797
+ case 28:
798
+ this.popState();
799
+ return 48;
800
+ case 29:
801
+ this.pushState("acc_title");
802
+ return "acc_title";
803
+ case 30:
804
+ this.popState();
805
+ return "acc_title_value";
806
+ case 31:
807
+ this.pushState("acc_descr");
808
+ return "acc_descr";
809
+ case 32:
810
+ this.popState();
811
+ return "acc_descr_value";
812
+ case 33:
813
+ this.pushState("acc_descr_multiline");
814
+ break;
815
+ case 34:
816
+ this.popState();
817
+ break;
818
+ case 35:
819
+ return "acc_descr_multiline_value";
820
+ case 36:
821
+ return 30;
822
+ case 37:
823
+ this.popState();
824
+ yy.getLogger().debug("Lex: ((");
825
+ return "NODE_DEND";
826
+ case 38:
827
+ this.popState();
828
+ yy.getLogger().debug("Lex: ((");
829
+ return "NODE_DEND";
830
+ case 39:
831
+ this.popState();
832
+ yy.getLogger().debug("Lex: ))");
833
+ return "NODE_DEND";
834
+ case 40:
835
+ this.popState();
836
+ yy.getLogger().debug("Lex: ((");
837
+ return "NODE_DEND";
838
+ case 41:
839
+ this.popState();
840
+ yy.getLogger().debug("Lex: ((");
841
+ return "NODE_DEND";
842
+ case 42:
843
+ this.popState();
844
+ yy.getLogger().debug("Lex: (-");
845
+ return "NODE_DEND";
846
+ case 43:
847
+ this.popState();
848
+ yy.getLogger().debug("Lex: -)");
849
+ return "NODE_DEND";
850
+ case 44:
851
+ this.popState();
852
+ yy.getLogger().debug("Lex: ((");
853
+ return "NODE_DEND";
854
+ case 45:
855
+ this.popState();
856
+ yy.getLogger().debug("Lex: ]]");
857
+ return "NODE_DEND";
858
+ case 46:
859
+ this.popState();
860
+ yy.getLogger().debug("Lex: (");
861
+ return "NODE_DEND";
862
+ case 47:
863
+ this.popState();
864
+ yy.getLogger().debug("Lex: ])");
865
+ return "NODE_DEND";
866
+ case 48:
867
+ this.popState();
868
+ yy.getLogger().debug("Lex: /]");
869
+ return "NODE_DEND";
870
+ case 49:
871
+ this.popState();
872
+ yy.getLogger().debug("Lex: /]");
873
+ return "NODE_DEND";
874
+ case 50:
875
+ this.popState();
876
+ yy.getLogger().debug("Lex: )]");
877
+ return "NODE_DEND";
878
+ case 51:
879
+ this.popState();
880
+ yy.getLogger().debug("Lex: )");
881
+ return "NODE_DEND";
882
+ case 52:
883
+ this.popState();
884
+ yy.getLogger().debug("Lex: ]>");
885
+ return "NODE_DEND";
886
+ case 53:
887
+ this.popState();
888
+ yy.getLogger().debug("Lex: ]");
889
+ return "NODE_DEND";
890
+ case 54:
891
+ yy.getLogger().debug("Lexa: -)");
892
+ this.pushState("NODE");
893
+ return 35;
894
+ case 55:
895
+ yy.getLogger().debug("Lexa: (-");
896
+ this.pushState("NODE");
897
+ return 35;
898
+ case 56:
899
+ yy.getLogger().debug("Lexa: ))");
900
+ this.pushState("NODE");
901
+ return 35;
902
+ case 57:
903
+ yy.getLogger().debug("Lexa: )");
904
+ this.pushState("NODE");
905
+ return 35;
906
+ case 58:
907
+ yy.getLogger().debug("Lex: (((");
908
+ this.pushState("NODE");
909
+ return 35;
910
+ case 59:
911
+ yy.getLogger().debug("Lexa: )");
912
+ this.pushState("NODE");
913
+ return 35;
914
+ case 60:
915
+ yy.getLogger().debug("Lexa: )");
916
+ this.pushState("NODE");
917
+ return 35;
918
+ case 61:
919
+ yy.getLogger().debug("Lexa: )");
920
+ this.pushState("NODE");
921
+ return 35;
922
+ case 62:
923
+ yy.getLogger().debug("Lexc: >");
924
+ this.pushState("NODE");
925
+ return 35;
926
+ case 63:
927
+ yy.getLogger().debug("Lexa: ([");
928
+ this.pushState("NODE");
929
+ return 35;
930
+ case 64:
931
+ yy.getLogger().debug("Lexa: )");
932
+ this.pushState("NODE");
933
+ return 35;
934
+ case 65:
935
+ this.pushState("NODE");
936
+ return 35;
937
+ case 66:
938
+ this.pushState("NODE");
939
+ return 35;
940
+ case 67:
941
+ this.pushState("NODE");
942
+ return 35;
943
+ case 68:
944
+ this.pushState("NODE");
945
+ return 35;
946
+ case 69:
947
+ this.pushState("NODE");
948
+ return 35;
949
+ case 70:
950
+ this.pushState("NODE");
951
+ return 35;
952
+ case 71:
953
+ this.pushState("NODE");
954
+ return 35;
955
+ case 72:
956
+ yy.getLogger().debug("Lexa: [");
957
+ this.pushState("NODE");
958
+ return 35;
959
+ case 73:
960
+ this.pushState("BLOCK_ARROW");
961
+ yy.getLogger().debug("LEX ARR START");
962
+ return 37;
963
+ case 74:
964
+ yy.getLogger().debug("Lex: NODE_ID", yy_.yytext);
965
+ return 31;
966
+ case 75:
967
+ yy.getLogger().debug("Lex: EOF", yy_.yytext);
968
+ return 8;
969
+ case 76:
970
+ this.pushState("md_string");
971
+ break;
972
+ case 77:
973
+ this.pushState("md_string");
974
+ break;
975
+ case 78:
976
+ return "NODE_DESCR";
977
+ case 79:
978
+ this.popState();
979
+ break;
980
+ case 80:
981
+ yy.getLogger().debug("Lex: Starting string");
982
+ this.pushState("string");
983
+ break;
984
+ case 81:
985
+ yy.getLogger().debug("LEX ARR: Starting string");
986
+ this.pushState("string");
987
+ break;
988
+ case 82:
989
+ yy.getLogger().debug("LEX: NODE_DESCR:", yy_.yytext);
990
+ return "NODE_DESCR";
991
+ case 83:
992
+ yy.getLogger().debug("LEX POPPING");
993
+ this.popState();
994
+ break;
995
+ case 84:
996
+ yy.getLogger().debug("Lex: =>BAE");
997
+ this.pushState("ARROW_DIR");
998
+ break;
999
+ case 85:
1000
+ yy_.yytext = yy_.yytext.replace(/^,\s*/, "");
1001
+ yy.getLogger().debug("Lex (right): dir:", yy_.yytext);
1002
+ return "DIR";
1003
+ case 86:
1004
+ yy_.yytext = yy_.yytext.replace(/^,\s*/, "");
1005
+ yy.getLogger().debug("Lex (left):", yy_.yytext);
1006
+ return "DIR";
1007
+ case 87:
1008
+ yy_.yytext = yy_.yytext.replace(/^,\s*/, "");
1009
+ yy.getLogger().debug("Lex (x):", yy_.yytext);
1010
+ return "DIR";
1011
+ case 88:
1012
+ yy_.yytext = yy_.yytext.replace(/^,\s*/, "");
1013
+ yy.getLogger().debug("Lex (y):", yy_.yytext);
1014
+ return "DIR";
1015
+ case 89:
1016
+ yy_.yytext = yy_.yytext.replace(/^,\s*/, "");
1017
+ yy.getLogger().debug("Lex (up):", yy_.yytext);
1018
+ return "DIR";
1019
+ case 90:
1020
+ yy_.yytext = yy_.yytext.replace(/^,\s*/, "");
1021
+ yy.getLogger().debug("Lex (down):", yy_.yytext);
1022
+ return "DIR";
1023
+ case 91:
1024
+ yy_.yytext = "]>";
1025
+ yy.getLogger().debug("Lex (ARROW_DIR end):", yy_.yytext);
1026
+ this.popState();
1027
+ this.popState();
1028
+ return "BLOCK_ARROW_END";
1029
+ case 92:
1030
+ yy.getLogger().debug("Lex: LINK", "#" + yy_.yytext + "#");
1031
+ return 15;
1032
+ case 93:
1033
+ yy.getLogger().debug("Lex: LINK", yy_.yytext);
1034
+ return 15;
1035
+ case 94:
1036
+ yy.getLogger().debug("Lex: LINK", yy_.yytext);
1037
+ return 15;
1038
+ case 95:
1039
+ yy.getLogger().debug("Lex: LINK", yy_.yytext);
1040
+ return 15;
1041
+ case 96:
1042
+ yy.getLogger().debug("Lex: START_LINK", yy_.yytext);
1043
+ this.pushState("LLABEL");
1044
+ return 16;
1045
+ case 97:
1046
+ yy.getLogger().debug("Lex: START_LINK", yy_.yytext);
1047
+ this.pushState("LLABEL");
1048
+ return 16;
1049
+ case 98:
1050
+ yy.getLogger().debug("Lex: START_LINK", yy_.yytext);
1051
+ this.pushState("LLABEL");
1052
+ return 16;
1053
+ case 99:
1054
+ this.pushState("md_string");
1055
+ break;
1056
+ case 100:
1057
+ yy.getLogger().debug("Lex: Starting string");
1058
+ this.pushState("string");
1059
+ return "LINK_LABEL";
1060
+ case 101:
1061
+ this.popState();
1062
+ yy.getLogger().debug("Lex: LINK", "#" + yy_.yytext + "#");
1063
+ return 15;
1064
+ case 102:
1065
+ this.popState();
1066
+ yy.getLogger().debug("Lex: LINK", yy_.yytext);
1067
+ return 15;
1068
+ case 103:
1069
+ this.popState();
1070
+ yy.getLogger().debug("Lex: LINK", yy_.yytext);
1071
+ return 15;
1072
+ case 104:
1073
+ yy.getLogger().debug("Lex: COLON", yy_.yytext);
1074
+ yy_.yytext = yy_.yytext.slice(1);
1075
+ return 27;
1076
+ }
1077
+ }, "anonymous"),
1078
+ 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+)/],
1079
+ 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 } }
1080
+ };
1081
+ return lexer2;
1082
+ }();
1083
+ parser2.lexer = lexer;
1084
+ function Parser() {
1085
+ this.yy = {};
1086
+ }
1087
+ __name(Parser, "Parser");
1088
+ Parser.prototype = parser2;
1089
+ parser2.Parser = Parser;
1090
+ return new Parser();
1091
+ }();
1092
+ parser.parser = parser;
1093
+ var block_default = parser;
1094
+ var blockDatabase = /* @__PURE__ */ new Map();
1095
+ var edgeList = [];
1096
+ var edgeCount = /* @__PURE__ */ new Map();
1097
+ var COLOR_KEYWORD = "color";
1098
+ var FILL_KEYWORD = "fill";
1099
+ var BG_FILL = "bgFill";
1100
+ var STYLECLASS_SEP = ",";
1101
+ var config = getConfig2();
1102
+ var classes = /* @__PURE__ */ new Map();
1103
+ var sanitizeText2 = /* @__PURE__ */ __name((txt) => common_default.sanitizeText(txt, config), "sanitizeText");
1104
+ var addStyleClass = /* @__PURE__ */ __name(function(id, styleAttributes = "") {
1105
+ let foundClass = classes.get(id);
1106
+ if (!foundClass) {
1107
+ foundClass = { id, styles: [], textStyles: [] };
1108
+ classes.set(id, foundClass);
1109
+ }
1110
+ if (styleAttributes !== void 0 && styleAttributes !== null) {
1111
+ styleAttributes.split(STYLECLASS_SEP).forEach((attrib) => {
1112
+ const fixedAttrib = attrib.replace(/([^;]*);/, "$1").trim();
1113
+ if (RegExp(COLOR_KEYWORD).exec(attrib)) {
1114
+ const newStyle1 = fixedAttrib.replace(FILL_KEYWORD, BG_FILL);
1115
+ const newStyle2 = newStyle1.replace(COLOR_KEYWORD, FILL_KEYWORD);
1116
+ foundClass.textStyles.push(newStyle2);
1117
+ }
1118
+ foundClass.styles.push(fixedAttrib);
1119
+ });
1120
+ }
1121
+ }, "addStyleClass");
1122
+ var addStyle2Node = /* @__PURE__ */ __name(function(id, styles = "") {
1123
+ const foundBlock = blockDatabase.get(id);
1124
+ if (styles !== void 0 && styles !== null) {
1125
+ foundBlock.styles = styles.split(STYLECLASS_SEP);
1126
+ }
1127
+ }, "addStyle2Node");
1128
+ var setCssClass = /* @__PURE__ */ __name(function(itemIds, cssClassName) {
1129
+ itemIds.split(",").forEach(function(id) {
1130
+ let foundBlock = blockDatabase.get(id);
1131
+ if (foundBlock === void 0) {
1132
+ const trimmedId = id.trim();
1133
+ foundBlock = { id: trimmedId, type: "na", children: [] };
1134
+ blockDatabase.set(trimmedId, foundBlock);
1135
+ }
1136
+ if (!foundBlock.classes) {
1137
+ foundBlock.classes = [];
1138
+ }
1139
+ foundBlock.classes.push(cssClassName);
1140
+ });
1141
+ }, "setCssClass");
1142
+ var populateBlockDatabase = /* @__PURE__ */ __name((_blockList, parent) => {
1143
+ const blockList = _blockList.flat();
1144
+ const children = [];
1145
+ const columnSettingBlock = blockList.find((b) => (b == null ? void 0 : b.type) === "column-setting");
1146
+ const column = (columnSettingBlock == null ? void 0 : columnSettingBlock.columns) ?? -1;
1147
+ for (const block of blockList) {
1148
+ if (typeof column === "number" && column > 0 && block.type !== "column-setting" && typeof block.widthInColumns === "number" && block.widthInColumns > column) {
1149
+ log.warn(
1150
+ `Block ${block.id} width ${block.widthInColumns} exceeds configured column width ${column}`
1151
+ );
1152
+ }
1153
+ if (block.label) {
1154
+ block.label = sanitizeText2(block.label);
1155
+ }
1156
+ if (block.type === "classDef") {
1157
+ addStyleClass(block.id, block.css);
1158
+ continue;
1159
+ }
1160
+ if (block.type === "applyClass") {
1161
+ setCssClass(block.id, (block == null ? void 0 : block.styleClass) ?? "");
1162
+ continue;
1163
+ }
1164
+ if (block.type === "applyStyles") {
1165
+ if (block == null ? void 0 : block.stylesStr) {
1166
+ addStyle2Node(block.id, block == null ? void 0 : block.stylesStr);
1167
+ }
1168
+ continue;
1169
+ }
1170
+ if (block.type === "column-setting") {
1171
+ parent.columns = block.columns ?? -1;
1172
+ } else if (block.type === "edge") {
1173
+ const count = (edgeCount.get(block.id) ?? 0) + 1;
1174
+ edgeCount.set(block.id, count);
1175
+ block.id = count + "-" + block.id;
1176
+ edgeList.push(block);
1177
+ } else {
1178
+ if (!block.label) {
1179
+ if (block.type === "composite") {
1180
+ block.label = "";
1181
+ } else {
1182
+ block.label = block.id;
1183
+ }
1184
+ }
1185
+ const existingBlock = blockDatabase.get(block.id);
1186
+ if (existingBlock === void 0) {
1187
+ blockDatabase.set(block.id, block);
1188
+ } else {
1189
+ if (block.type !== "na") {
1190
+ existingBlock.type = block.type;
1191
+ }
1192
+ if (block.label !== block.id) {
1193
+ existingBlock.label = block.label;
1194
+ }
1195
+ }
1196
+ if (block.children) {
1197
+ populateBlockDatabase(block.children, block);
1198
+ }
1199
+ if (block.type === "space") {
1200
+ const w = block.width ?? 1;
1201
+ for (let j = 0; j < w; j++) {
1202
+ const newBlock = clone(block);
1203
+ newBlock.id = newBlock.id + "-" + j;
1204
+ blockDatabase.set(newBlock.id, newBlock);
1205
+ children.push(newBlock);
1206
+ }
1207
+ } else if (existingBlock === void 0) {
1208
+ children.push(block);
1209
+ }
1210
+ }
1211
+ }
1212
+ parent.children = children;
1213
+ }, "populateBlockDatabase");
1214
+ var blocks = [];
1215
+ var rootBlock = { id: "root", type: "composite", children: [], columns: -1 };
1216
+ var clear2 = /* @__PURE__ */ __name(() => {
1217
+ log.debug("Clear called");
1218
+ clear();
1219
+ rootBlock = { id: "root", type: "composite", children: [], columns: -1 };
1220
+ blockDatabase = /* @__PURE__ */ new Map([["root", rootBlock]]);
1221
+ blocks = [];
1222
+ classes = /* @__PURE__ */ new Map();
1223
+ edgeList = [];
1224
+ edgeCount = /* @__PURE__ */ new Map();
1225
+ }, "clear");
1226
+ function typeStr2Type(typeStr) {
1227
+ log.debug("typeStr2Type", typeStr);
1228
+ switch (typeStr) {
1229
+ case "[]":
1230
+ return "square";
1231
+ case "()":
1232
+ log.debug("we have a round");
1233
+ return "round";
1234
+ case "(())":
1235
+ return "circle";
1236
+ case ">]":
1237
+ return "rect_left_inv_arrow";
1238
+ case "{}":
1239
+ return "diamond";
1240
+ case "{{}}":
1241
+ return "hexagon";
1242
+ case "([])":
1243
+ return "stadium";
1244
+ case "[[]]":
1245
+ return "subroutine";
1246
+ case "[()]":
1247
+ return "cylinder";
1248
+ case "((()))":
1249
+ return "doublecircle";
1250
+ case "[//]":
1251
+ return "lean_right";
1252
+ case "[\\\\]":
1253
+ return "lean_left";
1254
+ case "[/\\]":
1255
+ return "trapezoid";
1256
+ case "[\\/]":
1257
+ return "inv_trapezoid";
1258
+ case "<[]>":
1259
+ return "block_arrow";
1260
+ default:
1261
+ return "na";
1262
+ }
1263
+ }
1264
+ __name(typeStr2Type, "typeStr2Type");
1265
+ function edgeTypeStr2Type(typeStr) {
1266
+ log.debug("typeStr2Type", typeStr);
1267
+ switch (typeStr) {
1268
+ case "==":
1269
+ return "thick";
1270
+ default:
1271
+ return "normal";
1272
+ }
1273
+ }
1274
+ __name(edgeTypeStr2Type, "edgeTypeStr2Type");
1275
+ function edgeStrToEdgeData(typeStr) {
1276
+ switch (typeStr.replace(/^[\s-]+|[\s-]+$/g, "")) {
1277
+ case "x":
1278
+ return "arrow_cross";
1279
+ case "o":
1280
+ return "arrow_circle";
1281
+ case ">":
1282
+ return "arrow_point";
1283
+ default:
1284
+ return "";
1285
+ }
1286
+ }
1287
+ __name(edgeStrToEdgeData, "edgeStrToEdgeData");
1288
+ var cnt = 0;
1289
+ var generateId = /* @__PURE__ */ __name(() => {
1290
+ cnt++;
1291
+ return "id-" + Math.random().toString(36).substr(2, 12) + "-" + cnt;
1292
+ }, "generateId");
1293
+ var setHierarchy = /* @__PURE__ */ __name((block) => {
1294
+ rootBlock.children = block;
1295
+ populateBlockDatabase(block, rootBlock);
1296
+ blocks = rootBlock.children;
1297
+ }, "setHierarchy");
1298
+ var getColumns = /* @__PURE__ */ __name((blockId) => {
1299
+ const block = blockDatabase.get(blockId);
1300
+ if (!block) {
1301
+ return -1;
1302
+ }
1303
+ if (block.columns) {
1304
+ return block.columns;
1305
+ }
1306
+ if (!block.children) {
1307
+ return -1;
1308
+ }
1309
+ return block.children.length;
1310
+ }, "getColumns");
1311
+ var getBlocksFlat = /* @__PURE__ */ __name(() => {
1312
+ return [...blockDatabase.values()];
1313
+ }, "getBlocksFlat");
1314
+ var getBlocks = /* @__PURE__ */ __name(() => {
1315
+ return blocks || [];
1316
+ }, "getBlocks");
1317
+ var getEdges = /* @__PURE__ */ __name(() => {
1318
+ return edgeList;
1319
+ }, "getEdges");
1320
+ var getBlock = /* @__PURE__ */ __name((id) => {
1321
+ return blockDatabase.get(id);
1322
+ }, "getBlock");
1323
+ var setBlock = /* @__PURE__ */ __name((block) => {
1324
+ blockDatabase.set(block.id, block);
1325
+ }, "setBlock");
1326
+ var getLogger = /* @__PURE__ */ __name(() => log, "getLogger");
1327
+ var getClasses = /* @__PURE__ */ __name(function() {
1328
+ return classes;
1329
+ }, "getClasses");
1330
+ var db = {
1331
+ getConfig: /* @__PURE__ */ __name(() => getConfig().block, "getConfig"),
1332
+ typeStr2Type,
1333
+ edgeTypeStr2Type,
1334
+ edgeStrToEdgeData,
1335
+ getLogger,
1336
+ getBlocksFlat,
1337
+ getBlocks,
1338
+ getEdges,
1339
+ setHierarchy,
1340
+ getBlock,
1341
+ setBlock,
1342
+ getColumns,
1343
+ getClasses,
1344
+ clear: clear2,
1345
+ generateId
1346
+ };
1347
+ var blockDB_default = db;
1348
+ var fade = /* @__PURE__ */ __name((color, opacity) => {
1349
+ const channel2 = channel;
1350
+ const r = channel2(color, "r");
1351
+ const g = channel2(color, "g");
1352
+ const b = channel2(color, "b");
1353
+ return rgba(r, g, b, opacity);
1354
+ }, "fade");
1355
+ var getStyles = /* @__PURE__ */ __name((options) => `.label {
1356
+ font-family: ${options.fontFamily};
1357
+ color: ${options.nodeTextColor || options.textColor};
1358
+ }
1359
+ .cluster-label text {
1360
+ fill: ${options.titleColor};
1361
+ }
1362
+ .cluster-label span,p {
1363
+ color: ${options.titleColor};
1364
+ }
1365
+
1366
+
1367
+
1368
+ .label text,span,p {
1369
+ fill: ${options.nodeTextColor || options.textColor};
1370
+ color: ${options.nodeTextColor || options.textColor};
1371
+ }
1372
+
1373
+ .node rect,
1374
+ .node circle,
1375
+ .node ellipse,
1376
+ .node polygon,
1377
+ .node path {
1378
+ fill: ${options.mainBkg};
1379
+ stroke: ${options.nodeBorder};
1380
+ stroke-width: 1px;
1381
+ }
1382
+ .flowchart-label text {
1383
+ text-anchor: middle;
1384
+ }
1385
+ // .flowchart-label .text-outer-tspan {
1386
+ // text-anchor: middle;
1387
+ // }
1388
+ // .flowchart-label .text-inner-tspan {
1389
+ // text-anchor: start;
1390
+ // }
1391
+
1392
+ .node .label {
1393
+ text-align: center;
1394
+ }
1395
+ .node.clickable {
1396
+ cursor: pointer;
1397
+ }
1398
+
1399
+ .arrowheadPath {
1400
+ fill: ${options.arrowheadColor};
1401
+ }
1402
+
1403
+ .edgePath .path {
1404
+ stroke: ${options.lineColor};
1405
+ stroke-width: 2.0px;
1406
+ }
1407
+
1408
+ .flowchart-link {
1409
+ stroke: ${options.lineColor};
1410
+ fill: none;
1411
+ }
1412
+
1413
+ .edgeLabel {
1414
+ background-color: ${options.edgeLabelBackground};
1415
+ rect {
1416
+ opacity: 0.5;
1417
+ background-color: ${options.edgeLabelBackground};
1418
+ fill: ${options.edgeLabelBackground};
1419
+ }
1420
+ text-align: center;
1421
+ }
1422
+
1423
+ /* For html labels only */
1424
+ .labelBkg {
1425
+ background-color: ${fade(options.edgeLabelBackground, 0.5)};
1426
+ // background-color:
1427
+ }
1428
+
1429
+ .node .cluster {
1430
+ // fill: ${fade(options.mainBkg, 0.5)};
1431
+ fill: ${fade(options.clusterBkg, 0.5)};
1432
+ stroke: ${fade(options.clusterBorder, 0.2)};
1433
+ box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
1434
+ stroke-width: 1px;
1435
+ }
1436
+
1437
+ .cluster text {
1438
+ fill: ${options.titleColor};
1439
+ }
1440
+
1441
+ .cluster span,p {
1442
+ color: ${options.titleColor};
1443
+ }
1444
+ /* .cluster div {
1445
+ color: ${options.titleColor};
1446
+ } */
1447
+
1448
+ div.mermaidTooltip {
1449
+ position: absolute;
1450
+ text-align: center;
1451
+ max-width: 200px;
1452
+ padding: 2px;
1453
+ font-family: ${options.fontFamily};
1454
+ font-size: 12px;
1455
+ background: ${options.tertiaryColor};
1456
+ border: 1px solid ${options.border2};
1457
+ border-radius: 2px;
1458
+ pointer-events: none;
1459
+ z-index: 100;
1460
+ }
1461
+
1462
+ .flowchartTitleText {
1463
+ text-anchor: middle;
1464
+ font-size: 18px;
1465
+ fill: ${options.textColor};
1466
+ }
1467
+ ${getIconStyles()}
1468
+ `, "getStyles");
1469
+ var styles_default = getStyles;
1470
+ var insertMarkers = /* @__PURE__ */ __name((elem, markerArray, type, id) => {
1471
+ markerArray.forEach((markerName) => {
1472
+ markers[markerName](elem, type, id);
1473
+ });
1474
+ }, "insertMarkers");
1475
+ var extension = /* @__PURE__ */ __name((elem, type, id) => {
1476
+ log.trace("Making markers for ", id);
1477
+ elem.append("defs").append("marker").attr("id", id + "_" + type + "-extensionStart").attr("class", "marker extension " + type).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");
1478
+ elem.append("defs").append("marker").attr("id", id + "_" + type + "-extensionEnd").attr("class", "marker extension " + type).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");
1479
+ }, "extension");
1480
+ var composition = /* @__PURE__ */ __name((elem, type, id) => {
1481
+ elem.append("defs").append("marker").attr("id", id + "_" + type + "-compositionStart").attr("class", "marker composition " + type).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");
1482
+ elem.append("defs").append("marker").attr("id", id + "_" + type + "-compositionEnd").attr("class", "marker composition " + type).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");
1483
+ }, "composition");
1484
+ var aggregation = /* @__PURE__ */ __name((elem, type, id) => {
1485
+ elem.append("defs").append("marker").attr("id", id + "_" + type + "-aggregationStart").attr("class", "marker aggregation " + type).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");
1486
+ elem.append("defs").append("marker").attr("id", id + "_" + type + "-aggregationEnd").attr("class", "marker aggregation " + type).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");
1487
+ }, "aggregation");
1488
+ var dependency = /* @__PURE__ */ __name((elem, type, id) => {
1489
+ elem.append("defs").append("marker").attr("id", id + "_" + type + "-dependencyStart").attr("class", "marker dependency " + type).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");
1490
+ elem.append("defs").append("marker").attr("id", id + "_" + type + "-dependencyEnd").attr("class", "marker dependency " + type).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");
1491
+ }, "dependency");
1492
+ var lollipop = /* @__PURE__ */ __name((elem, type, id) => {
1493
+ elem.append("defs").append("marker").attr("id", id + "_" + type + "-lollipopStart").attr("class", "marker lollipop " + type).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);
1494
+ elem.append("defs").append("marker").attr("id", id + "_" + type + "-lollipopEnd").attr("class", "marker lollipop " + type).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);
1495
+ }, "lollipop");
1496
+ var point = /* @__PURE__ */ __name((elem, type, id) => {
1497
+ elem.append("marker").attr("id", id + "_" + type + "-pointEnd").attr("class", "marker " + type).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");
1498
+ elem.append("marker").attr("id", id + "_" + type + "-pointStart").attr("class", "marker " + type).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");
1499
+ }, "point");
1500
+ var circle = /* @__PURE__ */ __name((elem, type, id) => {
1501
+ elem.append("marker").attr("id", id + "_" + type + "-circleEnd").attr("class", "marker " + type).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");
1502
+ elem.append("marker").attr("id", id + "_" + type + "-circleStart").attr("class", "marker " + type).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");
1503
+ }, "circle");
1504
+ var cross = /* @__PURE__ */ __name((elem, type, id) => {
1505
+ elem.append("marker").attr("id", id + "_" + type + "-crossEnd").attr("class", "marker cross " + type).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");
1506
+ elem.append("marker").attr("id", id + "_" + type + "-crossStart").attr("class", "marker cross " + type).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");
1507
+ }, "cross");
1508
+ var barb = /* @__PURE__ */ __name((elem, type, id) => {
1509
+ elem.append("defs").append("marker").attr("id", id + "_" + type + "-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");
1510
+ }, "barb");
1511
+ var markers = {
1512
+ extension,
1513
+ composition,
1514
+ aggregation,
1515
+ dependency,
1516
+ lollipop,
1517
+ point,
1518
+ circle,
1519
+ cross,
1520
+ barb
1521
+ };
1522
+ var markers_default = insertMarkers;
1523
+ var padding = ((_b = (_a = getConfig2()) == null ? void 0 : _a.block) == null ? void 0 : _b.padding) ?? 8;
1524
+ function calculateBlockPosition(columns, position) {
1525
+ if (columns === 0 || !Number.isInteger(columns)) {
1526
+ throw new Error("Columns must be an integer !== 0.");
1527
+ }
1528
+ if (position < 0 || !Number.isInteger(position)) {
1529
+ throw new Error("Position must be a non-negative integer." + position);
1530
+ }
1531
+ if (columns < 0) {
1532
+ return { px: position, py: 0 };
1533
+ }
1534
+ if (columns === 1) {
1535
+ return { px: 0, py: position };
1536
+ }
1537
+ const px = position % columns;
1538
+ const py = Math.floor(position / columns);
1539
+ return { px, py };
1540
+ }
1541
+ __name(calculateBlockPosition, "calculateBlockPosition");
1542
+ var getMaxChildSize = /* @__PURE__ */ __name((block) => {
1543
+ let maxWidth = 0;
1544
+ let maxHeight = 0;
1545
+ for (const child of block.children) {
1546
+ const { width, height, x, y } = child.size ?? { width: 0, height: 0, x: 0, y: 0 };
1547
+ log.debug(
1548
+ "getMaxChildSize abc95 child:",
1549
+ child.id,
1550
+ "width:",
1551
+ width,
1552
+ "height:",
1553
+ height,
1554
+ "x:",
1555
+ x,
1556
+ "y:",
1557
+ y,
1558
+ child.type
1559
+ );
1560
+ if (child.type === "space") {
1561
+ continue;
1562
+ }
1563
+ if (width > maxWidth) {
1564
+ maxWidth = width / (block.widthInColumns ?? 1);
1565
+ }
1566
+ if (height > maxHeight) {
1567
+ maxHeight = height;
1568
+ }
1569
+ }
1570
+ return { width: maxWidth, height: maxHeight };
1571
+ }, "getMaxChildSize");
1572
+ function setBlockSizes(block, db2, siblingWidth = 0, siblingHeight = 0) {
1573
+ var _a2, _b2, _c, _d, _e, _f, _g, _h, _i, _j, _k;
1574
+ log.debug(
1575
+ "setBlockSizes abc95 (start)",
1576
+ block.id,
1577
+ (_a2 = block == null ? void 0 : block.size) == null ? void 0 : _a2.x,
1578
+ "block width =",
1579
+ block == null ? void 0 : block.size,
1580
+ "siblingWidth",
1581
+ siblingWidth
1582
+ );
1583
+ if (!((_b2 = block == null ? void 0 : block.size) == null ? void 0 : _b2.width)) {
1584
+ block.size = {
1585
+ width: siblingWidth,
1586
+ height: siblingHeight,
1587
+ x: 0,
1588
+ y: 0
1589
+ };
1590
+ }
1591
+ let maxWidth = 0;
1592
+ let maxHeight = 0;
1593
+ if (((_c = block.children) == null ? void 0 : _c.length) > 0) {
1594
+ for (const child of block.children) {
1595
+ setBlockSizes(child, db2);
1596
+ }
1597
+ const childSize = getMaxChildSize(block);
1598
+ maxWidth = childSize.width;
1599
+ maxHeight = childSize.height;
1600
+ log.debug("setBlockSizes abc95 maxWidth of", block.id, ":s children is ", maxWidth, maxHeight);
1601
+ for (const child of block.children) {
1602
+ if (child.size) {
1603
+ log.debug(
1604
+ `abc95 Setting size of children of ${block.id} id=${child.id} ${maxWidth} ${maxHeight} ${JSON.stringify(child.size)}`
1605
+ );
1606
+ child.size.width = maxWidth * (child.widthInColumns ?? 1) + padding * ((child.widthInColumns ?? 1) - 1);
1607
+ child.size.height = maxHeight;
1608
+ child.size.x = 0;
1609
+ child.size.y = 0;
1610
+ log.debug(
1611
+ `abc95 updating size of ${block.id} children child:${child.id} maxWidth:${maxWidth} maxHeight:${maxHeight}`
1612
+ );
1613
+ }
1614
+ }
1615
+ for (const child of block.children) {
1616
+ setBlockSizes(child, db2, maxWidth, maxHeight);
1617
+ }
1618
+ const columns = block.columns ?? -1;
1619
+ let numItems = 0;
1620
+ for (const child of block.children) {
1621
+ numItems += child.widthInColumns ?? 1;
1622
+ }
1623
+ let xSize = block.children.length;
1624
+ if (columns > 0 && columns < numItems) {
1625
+ xSize = columns;
1626
+ }
1627
+ const ySize = Math.ceil(numItems / xSize);
1628
+ let width = xSize * (maxWidth + padding) + padding;
1629
+ let height = ySize * (maxHeight + padding) + padding;
1630
+ if (width < siblingWidth) {
1631
+ log.debug(
1632
+ `Detected to small sibling: abc95 ${block.id} siblingWidth ${siblingWidth} siblingHeight ${siblingHeight} width ${width}`
1633
+ );
1634
+ width = siblingWidth;
1635
+ height = siblingHeight;
1636
+ const childWidth = (siblingWidth - xSize * padding - padding) / xSize;
1637
+ const childHeight = (siblingHeight - ySize * padding - padding) / ySize;
1638
+ log.debug("Size indata abc88", block.id, "childWidth", childWidth, "maxWidth", maxWidth);
1639
+ log.debug("Size indata abc88", block.id, "childHeight", childHeight, "maxHeight", maxHeight);
1640
+ log.debug("Size indata abc88 xSize", xSize, "padding", padding);
1641
+ for (const child of block.children) {
1642
+ if (child.size) {
1643
+ child.size.width = childWidth;
1644
+ child.size.height = childHeight;
1645
+ child.size.x = 0;
1646
+ child.size.y = 0;
1647
+ }
1648
+ }
1649
+ }
1650
+ log.debug(
1651
+ `abc95 (finale calc) ${block.id} xSize ${xSize} ySize ${ySize} columns ${columns}${block.children.length} width=${Math.max(width, ((_d = block.size) == null ? void 0 : _d.width) || 0)}`
1652
+ );
1653
+ if (width < (((_e = block == null ? void 0 : block.size) == null ? void 0 : _e.width) || 0)) {
1654
+ width = ((_f = block == null ? void 0 : block.size) == null ? void 0 : _f.width) || 0;
1655
+ const num = columns > 0 ? Math.min(block.children.length, columns) : block.children.length;
1656
+ if (num > 0) {
1657
+ const childWidth = (width - num * padding - padding) / num;
1658
+ log.debug("abc95 (growing to fit) width", block.id, width, (_g = block.size) == null ? void 0 : _g.width, childWidth);
1659
+ for (const child of block.children) {
1660
+ if (child.size) {
1661
+ child.size.width = childWidth;
1662
+ }
1663
+ }
1664
+ }
1665
+ }
1666
+ block.size = {
1667
+ width,
1668
+ height,
1669
+ x: 0,
1670
+ y: 0
1671
+ };
1672
+ }
1673
+ log.debug(
1674
+ "setBlockSizes abc94 (done)",
1675
+ block.id,
1676
+ (_h = block == null ? void 0 : block.size) == null ? void 0 : _h.x,
1677
+ (_i = block == null ? void 0 : block.size) == null ? void 0 : _i.width,
1678
+ (_j = block == null ? void 0 : block.size) == null ? void 0 : _j.y,
1679
+ (_k = block == null ? void 0 : block.size) == null ? void 0 : _k.height
1680
+ );
1681
+ }
1682
+ __name(setBlockSizes, "setBlockSizes");
1683
+ function layoutBlocks(block, db2) {
1684
+ var _a2, _b2, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
1685
+ log.debug(
1686
+ `abc85 layout blocks (=>layoutBlocks) ${block.id} x: ${(_a2 = block == null ? void 0 : block.size) == null ? void 0 : _a2.x} y: ${(_b2 = block == null ? void 0 : block.size) == null ? void 0 : _b2.y} width: ${(_c = block == null ? void 0 : block.size) == null ? void 0 : _c.width}`
1687
+ );
1688
+ const columns = block.columns ?? -1;
1689
+ log.debug("layoutBlocks columns abc95", block.id, "=>", columns, block);
1690
+ if (block.children && // find max width of children
1691
+ block.children.length > 0) {
1692
+ const width = ((_e = (_d = block == null ? void 0 : block.children[0]) == null ? void 0 : _d.size) == null ? void 0 : _e.width) ?? 0;
1693
+ const widthOfChildren = block.children.length * width + (block.children.length - 1) * padding;
1694
+ log.debug("widthOfChildren 88", widthOfChildren, "posX");
1695
+ let columnPos = 0;
1696
+ log.debug("abc91 block?.size?.x", block.id, (_f = block == null ? void 0 : block.size) == null ? void 0 : _f.x);
1697
+ let startingPosX = ((_g = block == null ? void 0 : block.size) == null ? void 0 : _g.x) ? ((_h = block == null ? void 0 : block.size) == null ? void 0 : _h.x) + (-((_i = block == null ? void 0 : block.size) == null ? void 0 : _i.width) / 2 || 0) : -padding;
1698
+ let rowPos = 0;
1699
+ for (const child of block.children) {
1700
+ const parent = block;
1701
+ if (!child.size) {
1702
+ continue;
1703
+ }
1704
+ const { width: width2, height } = child.size;
1705
+ const { px, py } = calculateBlockPosition(columns, columnPos);
1706
+ if (py != rowPos) {
1707
+ rowPos = py;
1708
+ startingPosX = ((_j = block == null ? void 0 : block.size) == null ? void 0 : _j.x) ? ((_k = block == null ? void 0 : block.size) == null ? void 0 : _k.x) + (-((_l = block == null ? void 0 : block.size) == null ? void 0 : _l.width) / 2 || 0) : -padding;
1709
+ log.debug("New row in layout for block", block.id, " and child ", child.id, rowPos);
1710
+ }
1711
+ log.debug(
1712
+ `abc89 layout blocks (child) id: ${child.id} Pos: ${columnPos} (px, py) ${px},${py} (${(_m = parent == null ? void 0 : parent.size) == null ? void 0 : _m.x},${(_n = parent == null ? void 0 : parent.size) == null ? void 0 : _n.y}) parent: ${parent.id} width: ${width2}${padding}`
1713
+ );
1714
+ if (parent.size) {
1715
+ const halfWidth = width2 / 2;
1716
+ child.size.x = startingPosX + padding + halfWidth;
1717
+ log.debug(
1718
+ `abc91 layout blocks (calc) px, pyid:${child.id} startingPos=X${startingPosX} new startingPosX${child.size.x} ${halfWidth} padding=${padding} width=${width2} halfWidth=${halfWidth} => x:${child.size.x} y:${child.size.y} ${child.widthInColumns} (width * (child?.w || 1)) / 2 ${width2 * ((child == null ? void 0 : child.widthInColumns) ?? 1) / 2}`
1719
+ );
1720
+ startingPosX = child.size.x + halfWidth;
1721
+ child.size.y = parent.size.y - parent.size.height / 2 + py * (height + padding) + height / 2 + padding;
1722
+ log.debug(
1723
+ `abc88 layout blocks (calc) px, pyid:${child.id}startingPosX${startingPosX}${padding}${halfWidth}=>x:${child.size.x}y:${child.size.y}${child.widthInColumns}(width * (child?.w || 1)) / 2${width2 * ((child == null ? void 0 : child.widthInColumns) ?? 1) / 2}`
1724
+ );
1725
+ }
1726
+ if (child.children) {
1727
+ layoutBlocks(child);
1728
+ }
1729
+ let columnsFilled = (child == null ? void 0 : child.widthInColumns) ?? 1;
1730
+ if (columns > 0) {
1731
+ columnsFilled = Math.min(columnsFilled, columns - columnPos % columns);
1732
+ }
1733
+ columnPos += columnsFilled;
1734
+ log.debug("abc88 columnsPos", child, columnPos);
1735
+ }
1736
+ }
1737
+ log.debug(
1738
+ `layout blocks (<==layoutBlocks) ${block.id} x: ${(_o = block == null ? void 0 : block.size) == null ? void 0 : _o.x} y: ${(_p = block == null ? void 0 : block.size) == null ? void 0 : _p.y} width: ${(_q = block == null ? void 0 : block.size) == null ? void 0 : _q.width}`
1739
+ );
1740
+ }
1741
+ __name(layoutBlocks, "layoutBlocks");
1742
+ function findBounds(block, { minX, minY, maxX, maxY } = { minX: 0, minY: 0, maxX: 0, maxY: 0 }) {
1743
+ if (block.size && block.id !== "root") {
1744
+ const { x, y, width, height } = block.size;
1745
+ if (x - width / 2 < minX) {
1746
+ minX = x - width / 2;
1747
+ }
1748
+ if (y - height / 2 < minY) {
1749
+ minY = y - height / 2;
1750
+ }
1751
+ if (x + width / 2 > maxX) {
1752
+ maxX = x + width / 2;
1753
+ }
1754
+ if (y + height / 2 > maxY) {
1755
+ maxY = y + height / 2;
1756
+ }
1757
+ }
1758
+ if (block.children) {
1759
+ for (const child of block.children) {
1760
+ ({ minX, minY, maxX, maxY } = findBounds(child, { minX, minY, maxX, maxY }));
1761
+ }
1762
+ }
1763
+ return { minX, minY, maxX, maxY };
1764
+ }
1765
+ __name(findBounds, "findBounds");
1766
+ function layout(db2) {
1767
+ const root = db2.getBlock("root");
1768
+ if (!root) {
1769
+ return;
1770
+ }
1771
+ setBlockSizes(root, db2, 0, 0);
1772
+ layoutBlocks(root);
1773
+ log.debug("getBlocks", JSON.stringify(root, null, 2));
1774
+ const { minX, minY, maxX, maxY } = findBounds(root);
1775
+ const height = maxY - minY;
1776
+ const width = maxX - minX;
1777
+ return { x: minX, y: minY, width, height };
1778
+ }
1779
+ __name(layout, "layout");
1780
+ function applyStyle(dom, styleFn) {
1781
+ if (styleFn) {
1782
+ dom.attr("style", styleFn);
1783
+ }
1784
+ }
1785
+ __name(applyStyle, "applyStyle");
1786
+ function addHtmlLabel(node, config2) {
1787
+ const fo = select(document.createElementNS("http://www.w3.org/2000/svg", "foreignObject"));
1788
+ const div = fo.append("xhtml:div");
1789
+ const label = node.label;
1790
+ const labelClass = node.isNode ? "nodeLabel" : "edgeLabel";
1791
+ const span = div.append("span");
1792
+ span.html(sanitizeText(label, config2));
1793
+ applyStyle(span, node.labelStyle);
1794
+ span.attr("class", labelClass);
1795
+ applyStyle(div, node.labelStyle);
1796
+ div.style("display", "inline-block");
1797
+ div.style("white-space", "nowrap");
1798
+ div.attr("xmlns", "http://www.w3.org/1999/xhtml");
1799
+ return fo.node();
1800
+ }
1801
+ __name(addHtmlLabel, "addHtmlLabel");
1802
+ var createLabel = /* @__PURE__ */ __name(async (_vertexText, style, isTitle, isNode) => {
1803
+ let vertexText = _vertexText || "";
1804
+ if (typeof vertexText === "object") {
1805
+ vertexText = vertexText[0];
1806
+ }
1807
+ const config2 = getConfig2();
1808
+ if (evaluate(config2.flowchart.htmlLabels)) {
1809
+ vertexText = vertexText.replace(/\\n|\n/g, "<br />");
1810
+ log.debug("vertexText" + vertexText);
1811
+ const label = await replaceIconSubstring(decodeEntities(vertexText));
1812
+ const node = {
1813
+ isNode,
1814
+ label,
1815
+ labelStyle: style.replace("fill:", "color:")
1816
+ };
1817
+ let vertexNode = addHtmlLabel(node, config2);
1818
+ return vertexNode;
1819
+ } else {
1820
+ const svgLabel = document.createElementNS("http://www.w3.org/2000/svg", "text");
1821
+ svgLabel.setAttribute("style", style.replace("color:", "fill:"));
1822
+ let rows = [];
1823
+ if (typeof vertexText === "string") {
1824
+ rows = vertexText.split(/\\n|\n|<br\s*\/?>/gi);
1825
+ } else if (Array.isArray(vertexText)) {
1826
+ rows = vertexText;
1827
+ } else {
1828
+ rows = [];
1829
+ }
1830
+ for (const row of rows) {
1831
+ const tspan = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
1832
+ tspan.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve");
1833
+ tspan.setAttribute("dy", "1em");
1834
+ tspan.setAttribute("x", "0");
1835
+ if (isTitle) {
1836
+ tspan.setAttribute("class", "title-row");
1837
+ } else {
1838
+ tspan.setAttribute("class", "row");
1839
+ }
1840
+ tspan.textContent = row.trim();
1841
+ svgLabel.appendChild(tspan);
1842
+ }
1843
+ return svgLabel;
1844
+ }
1845
+ }, "createLabel");
1846
+ var createLabel_default = createLabel;
1847
+ var addEdgeMarkers = /* @__PURE__ */ __name((svgPath, edge, url, id, diagramType) => {
1848
+ if (edge.arrowTypeStart) {
1849
+ addEdgeMarker(svgPath, "start", edge.arrowTypeStart, url, id, diagramType);
1850
+ }
1851
+ if (edge.arrowTypeEnd) {
1852
+ addEdgeMarker(svgPath, "end", edge.arrowTypeEnd, url, id, diagramType);
1853
+ }
1854
+ }, "addEdgeMarkers");
1855
+ var arrowTypesMap = {
1856
+ arrow_cross: "cross",
1857
+ arrow_point: "point",
1858
+ arrow_barb: "barb",
1859
+ arrow_circle: "circle",
1860
+ aggregation: "aggregation",
1861
+ extension: "extension",
1862
+ composition: "composition",
1863
+ dependency: "dependency",
1864
+ lollipop: "lollipop"
1865
+ };
1866
+ var addEdgeMarker = /* @__PURE__ */ __name((svgPath, position, arrowType, url, id, diagramType) => {
1867
+ const endMarkerType = arrowTypesMap[arrowType];
1868
+ if (!endMarkerType) {
1869
+ log.warn(`Unknown arrow type: ${arrowType}`);
1870
+ return;
1871
+ }
1872
+ const suffix = position === "start" ? "Start" : "End";
1873
+ svgPath.attr(`marker-${position}`, `url(${url}#${id}_${diagramType}-${endMarkerType}${suffix})`);
1874
+ }, "addEdgeMarker");
1875
+ var edgeLabels = {};
1876
+ var terminalLabels = {};
1877
+ var insertEdgeLabel = /* @__PURE__ */ __name(async (elem, edge) => {
1878
+ const config2 = getConfig2();
1879
+ const useHtmlLabels = evaluate(config2.flowchart.htmlLabels);
1880
+ const labelElement = edge.labelType === "markdown" ? createText(
1881
+ elem,
1882
+ edge.label,
1883
+ {
1884
+ style: edge.labelStyle,
1885
+ useHtmlLabels,
1886
+ addSvgBackground: true
1887
+ },
1888
+ config2
1889
+ ) : await createLabel_default(edge.label, edge.labelStyle);
1890
+ const edgeLabel = elem.insert("g").attr("class", "edgeLabel");
1891
+ const label = edgeLabel.insert("g").attr("class", "label");
1892
+ label.node().appendChild(labelElement);
1893
+ let bbox = labelElement.getBBox();
1894
+ if (useHtmlLabels) {
1895
+ const div = labelElement.children[0];
1896
+ const dv = select(labelElement);
1897
+ bbox = div.getBoundingClientRect();
1898
+ dv.attr("width", bbox.width);
1899
+ dv.attr("height", bbox.height);
1900
+ }
1901
+ label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")");
1902
+ edgeLabels[edge.id] = edgeLabel;
1903
+ edge.width = bbox.width;
1904
+ edge.height = bbox.height;
1905
+ let fo;
1906
+ if (edge.startLabelLeft) {
1907
+ const startLabelElement = await createLabel_default(edge.startLabelLeft, edge.labelStyle);
1908
+ const startEdgeLabelLeft = elem.insert("g").attr("class", "edgeTerminals");
1909
+ const inner = startEdgeLabelLeft.insert("g").attr("class", "inner");
1910
+ fo = inner.node().appendChild(startLabelElement);
1911
+ const slBox = startLabelElement.getBBox();
1912
+ inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")");
1913
+ if (!terminalLabels[edge.id]) {
1914
+ terminalLabels[edge.id] = {};
1915
+ }
1916
+ terminalLabels[edge.id].startLeft = startEdgeLabelLeft;
1917
+ setTerminalWidth(fo, edge.startLabelLeft);
1918
+ }
1919
+ if (edge.startLabelRight) {
1920
+ const startLabelElement = await createLabel_default(edge.startLabelRight, edge.labelStyle);
1921
+ const startEdgeLabelRight = elem.insert("g").attr("class", "edgeTerminals");
1922
+ const inner = startEdgeLabelRight.insert("g").attr("class", "inner");
1923
+ fo = startEdgeLabelRight.node().appendChild(startLabelElement);
1924
+ inner.node().appendChild(startLabelElement);
1925
+ const slBox = startLabelElement.getBBox();
1926
+ inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")");
1927
+ if (!terminalLabels[edge.id]) {
1928
+ terminalLabels[edge.id] = {};
1929
+ }
1930
+ terminalLabels[edge.id].startRight = startEdgeLabelRight;
1931
+ setTerminalWidth(fo, edge.startLabelRight);
1932
+ }
1933
+ if (edge.endLabelLeft) {
1934
+ const endLabelElement = await createLabel_default(edge.endLabelLeft, edge.labelStyle);
1935
+ const endEdgeLabelLeft = elem.insert("g").attr("class", "edgeTerminals");
1936
+ const inner = endEdgeLabelLeft.insert("g").attr("class", "inner");
1937
+ fo = inner.node().appendChild(endLabelElement);
1938
+ const slBox = endLabelElement.getBBox();
1939
+ inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")");
1940
+ endEdgeLabelLeft.node().appendChild(endLabelElement);
1941
+ if (!terminalLabels[edge.id]) {
1942
+ terminalLabels[edge.id] = {};
1943
+ }
1944
+ terminalLabels[edge.id].endLeft = endEdgeLabelLeft;
1945
+ setTerminalWidth(fo, edge.endLabelLeft);
1946
+ }
1947
+ if (edge.endLabelRight) {
1948
+ const endLabelElement = await createLabel_default(edge.endLabelRight, edge.labelStyle);
1949
+ const endEdgeLabelRight = elem.insert("g").attr("class", "edgeTerminals");
1950
+ const inner = endEdgeLabelRight.insert("g").attr("class", "inner");
1951
+ fo = inner.node().appendChild(endLabelElement);
1952
+ const slBox = endLabelElement.getBBox();
1953
+ inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")");
1954
+ endEdgeLabelRight.node().appendChild(endLabelElement);
1955
+ if (!terminalLabels[edge.id]) {
1956
+ terminalLabels[edge.id] = {};
1957
+ }
1958
+ terminalLabels[edge.id].endRight = endEdgeLabelRight;
1959
+ setTerminalWidth(fo, edge.endLabelRight);
1960
+ }
1961
+ return labelElement;
1962
+ }, "insertEdgeLabel");
1963
+ function setTerminalWidth(fo, value) {
1964
+ if (getConfig2().flowchart.htmlLabels && fo) {
1965
+ fo.style.width = value.length * 9 + "px";
1966
+ fo.style.height = "12px";
1967
+ }
1968
+ }
1969
+ __name(setTerminalWidth, "setTerminalWidth");
1970
+ var positionEdgeLabel = /* @__PURE__ */ __name((edge, paths) => {
1971
+ log.debug("Moving label abc88 ", edge.id, edge.label, edgeLabels[edge.id], paths);
1972
+ let path = paths.updatedPath ? paths.updatedPath : paths.originalPath;
1973
+ const siteConfig = getConfig2();
1974
+ const { subGraphTitleTotalMargin } = getSubGraphTitleMargins(siteConfig);
1975
+ if (edge.label) {
1976
+ const el = edgeLabels[edge.id];
1977
+ let x = edge.x;
1978
+ let y = edge.y;
1979
+ if (path) {
1980
+ const pos = utils_default.calcLabelPosition(path);
1981
+ log.debug(
1982
+ "Moving label " + edge.label + " from (",
1983
+ x,
1984
+ ",",
1985
+ y,
1986
+ ") to (",
1987
+ pos.x,
1988
+ ",",
1989
+ pos.y,
1990
+ ") abc88"
1991
+ );
1992
+ if (paths.updatedPath) {
1993
+ x = pos.x;
1994
+ y = pos.y;
1995
+ }
1996
+ }
1997
+ el.attr("transform", `translate(${x}, ${y + subGraphTitleTotalMargin / 2})`);
1998
+ }
1999
+ if (edge.startLabelLeft) {
2000
+ const el = terminalLabels[edge.id].startLeft;
2001
+ let x = edge.x;
2002
+ let y = edge.y;
2003
+ if (path) {
2004
+ const pos = utils_default.calcTerminalLabelPosition(edge.arrowTypeStart ? 10 : 0, "start_left", path);
2005
+ x = pos.x;
2006
+ y = pos.y;
2007
+ }
2008
+ el.attr("transform", `translate(${x}, ${y})`);
2009
+ }
2010
+ if (edge.startLabelRight) {
2011
+ const el = terminalLabels[edge.id].startRight;
2012
+ let x = edge.x;
2013
+ let y = edge.y;
2014
+ if (path) {
2015
+ const pos = utils_default.calcTerminalLabelPosition(
2016
+ edge.arrowTypeStart ? 10 : 0,
2017
+ "start_right",
2018
+ path
2019
+ );
2020
+ x = pos.x;
2021
+ y = pos.y;
2022
+ }
2023
+ el.attr("transform", `translate(${x}, ${y})`);
2024
+ }
2025
+ if (edge.endLabelLeft) {
2026
+ const el = terminalLabels[edge.id].endLeft;
2027
+ let x = edge.x;
2028
+ let y = edge.y;
2029
+ if (path) {
2030
+ const pos = utils_default.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, "end_left", path);
2031
+ x = pos.x;
2032
+ y = pos.y;
2033
+ }
2034
+ el.attr("transform", `translate(${x}, ${y})`);
2035
+ }
2036
+ if (edge.endLabelRight) {
2037
+ const el = terminalLabels[edge.id].endRight;
2038
+ let x = edge.x;
2039
+ let y = edge.y;
2040
+ if (path) {
2041
+ const pos = utils_default.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, "end_right", path);
2042
+ x = pos.x;
2043
+ y = pos.y;
2044
+ }
2045
+ el.attr("transform", `translate(${x}, ${y})`);
2046
+ }
2047
+ }, "positionEdgeLabel");
2048
+ var outsideNode = /* @__PURE__ */ __name((node, point2) => {
2049
+ const x = node.x;
2050
+ const y = node.y;
2051
+ const dx = Math.abs(point2.x - x);
2052
+ const dy = Math.abs(point2.y - y);
2053
+ const w = node.width / 2;
2054
+ const h = node.height / 2;
2055
+ if (dx >= w || dy >= h) {
2056
+ return true;
2057
+ }
2058
+ return false;
2059
+ }, "outsideNode");
2060
+ var intersection = /* @__PURE__ */ __name((node, outsidePoint, insidePoint) => {
2061
+ log.debug(`intersection calc abc89:
2062
+ outsidePoint: ${JSON.stringify(outsidePoint)}
2063
+ insidePoint : ${JSON.stringify(insidePoint)}
2064
+ node : x:${node.x} y:${node.y} w:${node.width} h:${node.height}`);
2065
+ const x = node.x;
2066
+ const y = node.y;
2067
+ const dx = Math.abs(x - insidePoint.x);
2068
+ const w = node.width / 2;
2069
+ let r = insidePoint.x < outsidePoint.x ? w - dx : w + dx;
2070
+ const h = node.height / 2;
2071
+ const Q = Math.abs(outsidePoint.y - insidePoint.y);
2072
+ const R = Math.abs(outsidePoint.x - insidePoint.x);
2073
+ if (Math.abs(y - outsidePoint.y) * w > Math.abs(x - outsidePoint.x) * h) {
2074
+ let q = insidePoint.y < outsidePoint.y ? outsidePoint.y - h - y : y - h - outsidePoint.y;
2075
+ r = R * q / Q;
2076
+ const res = {
2077
+ x: insidePoint.x < outsidePoint.x ? insidePoint.x + r : insidePoint.x - R + r,
2078
+ y: insidePoint.y < outsidePoint.y ? insidePoint.y + Q - q : insidePoint.y - Q + q
2079
+ };
2080
+ if (r === 0) {
2081
+ res.x = outsidePoint.x;
2082
+ res.y = outsidePoint.y;
2083
+ }
2084
+ if (R === 0) {
2085
+ res.x = outsidePoint.x;
2086
+ }
2087
+ if (Q === 0) {
2088
+ res.y = outsidePoint.y;
2089
+ }
2090
+ log.debug(`abc89 topp/bott calc, Q ${Q}, q ${q}, R ${R}, r ${r}`, res);
2091
+ return res;
2092
+ } else {
2093
+ if (insidePoint.x < outsidePoint.x) {
2094
+ r = outsidePoint.x - w - x;
2095
+ } else {
2096
+ r = x - w - outsidePoint.x;
2097
+ }
2098
+ let q = Q * r / R;
2099
+ let _x = insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : insidePoint.x - R + r;
2100
+ let _y = insidePoint.y < outsidePoint.y ? insidePoint.y + q : insidePoint.y - q;
2101
+ log.debug(`sides calc abc89, Q ${Q}, q ${q}, R ${R}, r ${r}`, { _x, _y });
2102
+ if (r === 0) {
2103
+ _x = outsidePoint.x;
2104
+ _y = outsidePoint.y;
2105
+ }
2106
+ if (R === 0) {
2107
+ _x = outsidePoint.x;
2108
+ }
2109
+ if (Q === 0) {
2110
+ _y = outsidePoint.y;
2111
+ }
2112
+ return { x: _x, y: _y };
2113
+ }
2114
+ }, "intersection");
2115
+ var cutPathAtIntersect = /* @__PURE__ */ __name((_points, boundaryNode) => {
2116
+ log.debug("abc88 cutPathAtIntersect", _points, boundaryNode);
2117
+ let points = [];
2118
+ let lastPointOutside = _points[0];
2119
+ let isInside = false;
2120
+ _points.forEach((point2) => {
2121
+ if (!outsideNode(boundaryNode, point2) && !isInside) {
2122
+ const inter = intersection(boundaryNode, lastPointOutside, point2);
2123
+ let pointPresent = false;
2124
+ points.forEach((p) => {
2125
+ pointPresent = pointPresent || p.x === inter.x && p.y === inter.y;
2126
+ });
2127
+ if (!points.some((e) => e.x === inter.x && e.y === inter.y)) {
2128
+ points.push(inter);
2129
+ }
2130
+ isInside = true;
2131
+ } else {
2132
+ lastPointOutside = point2;
2133
+ if (!isInside) {
2134
+ points.push(point2);
2135
+ }
2136
+ }
2137
+ });
2138
+ return points;
2139
+ }, "cutPathAtIntersect");
2140
+ var insertEdge = /* @__PURE__ */ __name(function(elem, e, edge, clusterDb, diagramType, graph, id) {
2141
+ let points = edge.points;
2142
+ log.debug("abc88 InsertEdge: edge=", edge, "e=", e);
2143
+ let pointsHasChanged = false;
2144
+ const tail = graph.node(e.v);
2145
+ var head = graph.node(e.w);
2146
+ if ((head == null ? void 0 : head.intersect) && (tail == null ? void 0 : tail.intersect)) {
2147
+ points = points.slice(1, edge.points.length - 1);
2148
+ points.unshift(tail.intersect(points[0]));
2149
+ points.push(head.intersect(points[points.length - 1]));
2150
+ }
2151
+ if (edge.toCluster) {
2152
+ log.debug("to cluster abc88", clusterDb[edge.toCluster]);
2153
+ points = cutPathAtIntersect(edge.points, clusterDb[edge.toCluster].node);
2154
+ pointsHasChanged = true;
2155
+ }
2156
+ if (edge.fromCluster) {
2157
+ log.debug("from cluster abc88", clusterDb[edge.fromCluster]);
2158
+ points = cutPathAtIntersect(points.reverse(), clusterDb[edge.fromCluster].node).reverse();
2159
+ pointsHasChanged = true;
2160
+ }
2161
+ const lineData = points.filter((p) => !Number.isNaN(p.y));
2162
+ let curve = curveBasis;
2163
+ if (edge.curve && (diagramType === "graph" || diagramType === "flowchart")) {
2164
+ curve = edge.curve;
2165
+ }
2166
+ const { x, y } = getLineFunctionsWithOffset(edge);
2167
+ const lineFunction = line().x(x).y(y).curve(curve);
2168
+ let strokeClasses;
2169
+ switch (edge.thickness) {
2170
+ case "normal":
2171
+ strokeClasses = "edge-thickness-normal";
2172
+ break;
2173
+ case "thick":
2174
+ strokeClasses = "edge-thickness-thick";
2175
+ break;
2176
+ case "invisible":
2177
+ strokeClasses = "edge-thickness-thick";
2178
+ break;
2179
+ default:
2180
+ strokeClasses = "";
2181
+ }
2182
+ switch (edge.pattern) {
2183
+ case "solid":
2184
+ strokeClasses += " edge-pattern-solid";
2185
+ break;
2186
+ case "dotted":
2187
+ strokeClasses += " edge-pattern-dotted";
2188
+ break;
2189
+ case "dashed":
2190
+ strokeClasses += " edge-pattern-dashed";
2191
+ break;
2192
+ }
2193
+ const svgPath = elem.append("path").attr("d", lineFunction(lineData)).attr("id", edge.id).attr("class", " " + strokeClasses + (edge.classes ? " " + edge.classes : "")).attr("style", edge.style);
2194
+ let url = "";
2195
+ if (getConfig2().flowchart.arrowMarkerAbsolute || getConfig2().state.arrowMarkerAbsolute) {
2196
+ url = getUrl(true);
2197
+ }
2198
+ addEdgeMarkers(svgPath, edge, url, id, diagramType);
2199
+ let paths = {};
2200
+ if (pointsHasChanged) {
2201
+ paths.updatedPath = points;
2202
+ }
2203
+ paths.originalPath = edge.points;
2204
+ return paths;
2205
+ }, "insertEdge");
2206
+ var expandAndDeduplicateDirections = /* @__PURE__ */ __name((directions) => {
2207
+ const uniqueDirections = /* @__PURE__ */ new Set();
2208
+ for (const direction of directions) {
2209
+ switch (direction) {
2210
+ case "x":
2211
+ uniqueDirections.add("right");
2212
+ uniqueDirections.add("left");
2213
+ break;
2214
+ case "y":
2215
+ uniqueDirections.add("up");
2216
+ uniqueDirections.add("down");
2217
+ break;
2218
+ default:
2219
+ uniqueDirections.add(direction);
2220
+ break;
2221
+ }
2222
+ }
2223
+ return uniqueDirections;
2224
+ }, "expandAndDeduplicateDirections");
2225
+ var getArrowPoints = /* @__PURE__ */ __name((duplicatedDirections, bbox, node) => {
2226
+ const directions = expandAndDeduplicateDirections(duplicatedDirections);
2227
+ const f = 2;
2228
+ const height = bbox.height + 2 * node.padding;
2229
+ const midpoint = height / f;
2230
+ const width = bbox.width + 2 * midpoint + node.padding;
2231
+ const padding2 = node.padding / 2;
2232
+ if (directions.has("right") && directions.has("left") && directions.has("up") && directions.has("down")) {
2233
+ return [
2234
+ // Bottom
2235
+ { x: 0, y: 0 },
2236
+ { x: midpoint, y: 0 },
2237
+ { x: width / 2, y: 2 * padding2 },
2238
+ { x: width - midpoint, y: 0 },
2239
+ { x: width, y: 0 },
2240
+ // Right
2241
+ { x: width, y: -height / 3 },
2242
+ { x: width + 2 * padding2, y: -height / 2 },
2243
+ { x: width, y: -2 * height / 3 },
2244
+ { x: width, y: -height },
2245
+ // Top
2246
+ { x: width - midpoint, y: -height },
2247
+ { x: width / 2, y: -height - 2 * padding2 },
2248
+ { x: midpoint, y: -height },
2249
+ // Left
2250
+ { x: 0, y: -height },
2251
+ { x: 0, y: -2 * height / 3 },
2252
+ { x: -2 * padding2, y: -height / 2 },
2253
+ { x: 0, y: -height / 3 }
2254
+ ];
2255
+ }
2256
+ if (directions.has("right") && directions.has("left") && directions.has("up")) {
2257
+ return [
2258
+ { x: midpoint, y: 0 },
2259
+ { x: width - midpoint, y: 0 },
2260
+ { x: width, y: -height / 2 },
2261
+ { x: width - midpoint, y: -height },
2262
+ { x: midpoint, y: -height },
2263
+ { x: 0, y: -height / 2 }
2264
+ ];
2265
+ }
2266
+ if (directions.has("right") && directions.has("left") && directions.has("down")) {
2267
+ return [
2268
+ { x: 0, y: 0 },
2269
+ { x: midpoint, y: -height },
2270
+ { x: width - midpoint, y: -height },
2271
+ { x: width, y: 0 }
2272
+ ];
2273
+ }
2274
+ if (directions.has("right") && directions.has("up") && directions.has("down")) {
2275
+ return [
2276
+ { x: 0, y: 0 },
2277
+ { x: width, y: -midpoint },
2278
+ { x: width, y: -height + midpoint },
2279
+ { x: 0, y: -height }
2280
+ ];
2281
+ }
2282
+ if (directions.has("left") && directions.has("up") && directions.has("down")) {
2283
+ return [
2284
+ { x: width, y: 0 },
2285
+ { x: 0, y: -midpoint },
2286
+ { x: 0, y: -height + midpoint },
2287
+ { x: width, y: -height }
2288
+ ];
2289
+ }
2290
+ if (directions.has("right") && directions.has("left")) {
2291
+ return [
2292
+ { x: midpoint, y: 0 },
2293
+ { x: midpoint, y: -padding2 },
2294
+ { x: width - midpoint, y: -padding2 },
2295
+ { x: width - midpoint, y: 0 },
2296
+ { x: width, y: -height / 2 },
2297
+ { x: width - midpoint, y: -height },
2298
+ { x: width - midpoint, y: -height + padding2 },
2299
+ { x: midpoint, y: -height + padding2 },
2300
+ { x: midpoint, y: -height },
2301
+ { x: 0, y: -height / 2 }
2302
+ ];
2303
+ }
2304
+ if (directions.has("up") && directions.has("down")) {
2305
+ return [
2306
+ // Bottom center
2307
+ { x: width / 2, y: 0 },
2308
+ // Left pont of bottom arrow
2309
+ { x: 0, y: -padding2 },
2310
+ { x: midpoint, y: -padding2 },
2311
+ // Left top over vertical section
2312
+ { x: midpoint, y: -height + padding2 },
2313
+ { x: 0, y: -height + padding2 },
2314
+ // Top of arrow
2315
+ { x: width / 2, y: -height },
2316
+ { x: width, y: -height + padding2 },
2317
+ // Top of right vertical bar
2318
+ { x: width - midpoint, y: -height + padding2 },
2319
+ { x: width - midpoint, y: -padding2 },
2320
+ { x: width, y: -padding2 }
2321
+ ];
2322
+ }
2323
+ if (directions.has("right") && directions.has("up")) {
2324
+ return [
2325
+ { x: 0, y: 0 },
2326
+ { x: width, y: -midpoint },
2327
+ { x: 0, y: -height }
2328
+ ];
2329
+ }
2330
+ if (directions.has("right") && directions.has("down")) {
2331
+ return [
2332
+ { x: 0, y: 0 },
2333
+ { x: width, y: 0 },
2334
+ { x: 0, y: -height }
2335
+ ];
2336
+ }
2337
+ if (directions.has("left") && directions.has("up")) {
2338
+ return [
2339
+ { x: width, y: 0 },
2340
+ { x: 0, y: -midpoint },
2341
+ { x: width, y: -height }
2342
+ ];
2343
+ }
2344
+ if (directions.has("left") && directions.has("down")) {
2345
+ return [
2346
+ { x: width, y: 0 },
2347
+ { x: 0, y: 0 },
2348
+ { x: width, y: -height }
2349
+ ];
2350
+ }
2351
+ if (directions.has("right")) {
2352
+ return [
2353
+ { x: midpoint, y: -padding2 },
2354
+ { x: midpoint, y: -padding2 },
2355
+ { x: width - midpoint, y: -padding2 },
2356
+ { x: width - midpoint, y: 0 },
2357
+ { x: width, y: -height / 2 },
2358
+ { x: width - midpoint, y: -height },
2359
+ { x: width - midpoint, y: -height + padding2 },
2360
+ // top left corner of arrow
2361
+ { x: midpoint, y: -height + padding2 },
2362
+ { x: midpoint, y: -height + padding2 }
2363
+ ];
2364
+ }
2365
+ if (directions.has("left")) {
2366
+ return [
2367
+ { x: midpoint, y: 0 },
2368
+ { x: midpoint, y: -padding2 },
2369
+ // Two points, the right corners
2370
+ { x: width - midpoint, y: -padding2 },
2371
+ { x: width - midpoint, y: -height + padding2 },
2372
+ { x: midpoint, y: -height + padding2 },
2373
+ { x: midpoint, y: -height },
2374
+ { x: 0, y: -height / 2 }
2375
+ ];
2376
+ }
2377
+ if (directions.has("up")) {
2378
+ return [
2379
+ // Bottom center
2380
+ { x: midpoint, y: -padding2 },
2381
+ // Left top over vertical section
2382
+ { x: midpoint, y: -height + padding2 },
2383
+ { x: 0, y: -height + padding2 },
2384
+ // Top of arrow
2385
+ { x: width / 2, y: -height },
2386
+ { x: width, y: -height + padding2 },
2387
+ // Top of right vertical bar
2388
+ { x: width - midpoint, y: -height + padding2 },
2389
+ { x: width - midpoint, y: -padding2 }
2390
+ ];
2391
+ }
2392
+ if (directions.has("down")) {
2393
+ return [
2394
+ // Bottom center
2395
+ { x: width / 2, y: 0 },
2396
+ // Left pont of bottom arrow
2397
+ { x: 0, y: -padding2 },
2398
+ { x: midpoint, y: -padding2 },
2399
+ // Left top over vertical section
2400
+ { x: midpoint, y: -height + padding2 },
2401
+ { x: width - midpoint, y: -height + padding2 },
2402
+ { x: width - midpoint, y: -padding2 },
2403
+ { x: width, y: -padding2 }
2404
+ ];
2405
+ }
2406
+ return [{ x: 0, y: 0 }];
2407
+ }, "getArrowPoints");
2408
+ function intersectNode(node, point2) {
2409
+ return node.intersect(point2);
2410
+ }
2411
+ __name(intersectNode, "intersectNode");
2412
+ var intersect_node_default = intersectNode;
2413
+ function intersectEllipse(node, rx, ry, point2) {
2414
+ var cx = node.x;
2415
+ var cy = node.y;
2416
+ var px = cx - point2.x;
2417
+ var py = cy - point2.y;
2418
+ var det = Math.sqrt(rx * rx * py * py + ry * ry * px * px);
2419
+ var dx = Math.abs(rx * ry * px / det);
2420
+ if (point2.x < cx) {
2421
+ dx = -dx;
2422
+ }
2423
+ var dy = Math.abs(rx * ry * py / det);
2424
+ if (point2.y < cy) {
2425
+ dy = -dy;
2426
+ }
2427
+ return { x: cx + dx, y: cy + dy };
2428
+ }
2429
+ __name(intersectEllipse, "intersectEllipse");
2430
+ var intersect_ellipse_default = intersectEllipse;
2431
+ function intersectCircle(node, rx, point2) {
2432
+ return intersect_ellipse_default(node, rx, rx, point2);
2433
+ }
2434
+ __name(intersectCircle, "intersectCircle");
2435
+ var intersect_circle_default = intersectCircle;
2436
+ function intersectLine(p1, p2, q1, q2) {
2437
+ var a1, a2, b1, b2, c1, c2;
2438
+ var r1, r2, r3, r4;
2439
+ var denom, offset, num;
2440
+ var x, y;
2441
+ a1 = p2.y - p1.y;
2442
+ b1 = p1.x - p2.x;
2443
+ c1 = p2.x * p1.y - p1.x * p2.y;
2444
+ r3 = a1 * q1.x + b1 * q1.y + c1;
2445
+ r4 = a1 * q2.x + b1 * q2.y + c1;
2446
+ if (r3 !== 0 && r4 !== 0 && sameSign(r3, r4)) {
2447
+ return;
2448
+ }
2449
+ a2 = q2.y - q1.y;
2450
+ b2 = q1.x - q2.x;
2451
+ c2 = q2.x * q1.y - q1.x * q2.y;
2452
+ r1 = a2 * p1.x + b2 * p1.y + c2;
2453
+ r2 = a2 * p2.x + b2 * p2.y + c2;
2454
+ if (r1 !== 0 && r2 !== 0 && sameSign(r1, r2)) {
2455
+ return;
2456
+ }
2457
+ denom = a1 * b2 - a2 * b1;
2458
+ if (denom === 0) {
2459
+ return;
2460
+ }
2461
+ offset = Math.abs(denom / 2);
2462
+ num = b1 * c2 - b2 * c1;
2463
+ x = num < 0 ? (num - offset) / denom : (num + offset) / denom;
2464
+ num = a2 * c1 - a1 * c2;
2465
+ y = num < 0 ? (num - offset) / denom : (num + offset) / denom;
2466
+ return { x, y };
2467
+ }
2468
+ __name(intersectLine, "intersectLine");
2469
+ function sameSign(r1, r2) {
2470
+ return r1 * r2 > 0;
2471
+ }
2472
+ __name(sameSign, "sameSign");
2473
+ var intersect_line_default = intersectLine;
2474
+ var intersect_polygon_default = intersectPolygon;
2475
+ function intersectPolygon(node, polyPoints, point2) {
2476
+ var x1 = node.x;
2477
+ var y1 = node.y;
2478
+ var intersections = [];
2479
+ var minX = Number.POSITIVE_INFINITY;
2480
+ var minY = Number.POSITIVE_INFINITY;
2481
+ if (typeof polyPoints.forEach === "function") {
2482
+ polyPoints.forEach(function(entry) {
2483
+ minX = Math.min(minX, entry.x);
2484
+ minY = Math.min(minY, entry.y);
2485
+ });
2486
+ } else {
2487
+ minX = Math.min(minX, polyPoints.x);
2488
+ minY = Math.min(minY, polyPoints.y);
2489
+ }
2490
+ var left = x1 - node.width / 2 - minX;
2491
+ var top = y1 - node.height / 2 - minY;
2492
+ for (var i = 0; i < polyPoints.length; i++) {
2493
+ var p1 = polyPoints[i];
2494
+ var p2 = polyPoints[i < polyPoints.length - 1 ? i + 1 : 0];
2495
+ var intersect = intersect_line_default(
2496
+ node,
2497
+ point2,
2498
+ { x: left + p1.x, y: top + p1.y },
2499
+ { x: left + p2.x, y: top + p2.y }
2500
+ );
2501
+ if (intersect) {
2502
+ intersections.push(intersect);
2503
+ }
2504
+ }
2505
+ if (!intersections.length) {
2506
+ return node;
2507
+ }
2508
+ if (intersections.length > 1) {
2509
+ intersections.sort(function(p, q) {
2510
+ var pdx = p.x - point2.x;
2511
+ var pdy = p.y - point2.y;
2512
+ var distp = Math.sqrt(pdx * pdx + pdy * pdy);
2513
+ var qdx = q.x - point2.x;
2514
+ var qdy = q.y - point2.y;
2515
+ var distq = Math.sqrt(qdx * qdx + qdy * qdy);
2516
+ return distp < distq ? -1 : distp === distq ? 0 : 1;
2517
+ });
2518
+ }
2519
+ return intersections[0];
2520
+ }
2521
+ __name(intersectPolygon, "intersectPolygon");
2522
+ var intersectRect = /* @__PURE__ */ __name((node, point2) => {
2523
+ var x = node.x;
2524
+ var y = node.y;
2525
+ var dx = point2.x - x;
2526
+ var dy = point2.y - y;
2527
+ var w = node.width / 2;
2528
+ var h = node.height / 2;
2529
+ var sx, sy;
2530
+ if (Math.abs(dy) * w > Math.abs(dx) * h) {
2531
+ if (dy < 0) {
2532
+ h = -h;
2533
+ }
2534
+ sx = dy === 0 ? 0 : h * dx / dy;
2535
+ sy = h;
2536
+ } else {
2537
+ if (dx < 0) {
2538
+ w = -w;
2539
+ }
2540
+ sx = w;
2541
+ sy = dx === 0 ? 0 : w * dy / dx;
2542
+ }
2543
+ return { x: x + sx, y: y + sy };
2544
+ }, "intersectRect");
2545
+ var intersect_rect_default = intersectRect;
2546
+ var intersect_default = {
2547
+ node: intersect_node_default,
2548
+ circle: intersect_circle_default,
2549
+ ellipse: intersect_ellipse_default,
2550
+ polygon: intersect_polygon_default,
2551
+ rect: intersect_rect_default
2552
+ };
2553
+ var labelHelper = /* @__PURE__ */ __name(async (parent, node, _classes, isNode) => {
2554
+ const config2 = getConfig2();
2555
+ let classes2;
2556
+ const useHtmlLabels = node.useHtmlLabels || evaluate(config2.flowchart.htmlLabels);
2557
+ if (!_classes) {
2558
+ classes2 = "node default";
2559
+ } else {
2560
+ classes2 = _classes;
2561
+ }
2562
+ const shapeSvg = parent.insert("g").attr("class", classes2).attr("id", node.domId || node.id);
2563
+ const label = shapeSvg.insert("g").attr("class", "label").attr("style", node.labelStyle);
2564
+ let labelText;
2565
+ if (node.labelText === void 0) {
2566
+ labelText = "";
2567
+ } else {
2568
+ labelText = typeof node.labelText === "string" ? node.labelText : node.labelText[0];
2569
+ }
2570
+ const textNode = label.node();
2571
+ let text;
2572
+ if (node.labelType === "markdown") {
2573
+ text = createText(
2574
+ label,
2575
+ sanitizeText(decodeEntities(labelText), config2),
2576
+ {
2577
+ useHtmlLabels,
2578
+ width: node.width || config2.flowchart.wrappingWidth,
2579
+ classes: "markdown-node-label"
2580
+ },
2581
+ config2
2582
+ );
2583
+ } else {
2584
+ text = textNode.appendChild(
2585
+ await createLabel_default(
2586
+ sanitizeText(decodeEntities(labelText), config2),
2587
+ node.labelStyle,
2588
+ false,
2589
+ isNode
2590
+ )
2591
+ );
2592
+ }
2593
+ let bbox = text.getBBox();
2594
+ const halfPadding = node.padding / 2;
2595
+ if (evaluate(config2.flowchart.htmlLabels)) {
2596
+ const div = text.children[0];
2597
+ const dv = select(text);
2598
+ const images = div.getElementsByTagName("img");
2599
+ if (images) {
2600
+ const noImgText = labelText.replace(/<img[^>]*>/g, "").trim() === "";
2601
+ await Promise.all(
2602
+ [...images].map(
2603
+ (img) => new Promise((res) => {
2604
+ function setupImage() {
2605
+ img.style.display = "flex";
2606
+ img.style.flexDirection = "column";
2607
+ if (noImgText) {
2608
+ const bodyFontSize = config2.fontSize ? config2.fontSize : window.getComputedStyle(document.body).fontSize;
2609
+ const enlargingFactor = 5;
2610
+ const width = parseInt(bodyFontSize, 10) * enlargingFactor + "px";
2611
+ img.style.minWidth = width;
2612
+ img.style.maxWidth = width;
2613
+ } else {
2614
+ img.style.width = "100%";
2615
+ }
2616
+ res(img);
2617
+ }
2618
+ __name(setupImage, "setupImage");
2619
+ setTimeout(() => {
2620
+ if (img.complete) {
2621
+ setupImage();
2622
+ }
2623
+ });
2624
+ img.addEventListener("error", setupImage);
2625
+ img.addEventListener("load", setupImage);
2626
+ })
2627
+ )
2628
+ );
2629
+ }
2630
+ bbox = div.getBoundingClientRect();
2631
+ dv.attr("width", bbox.width);
2632
+ dv.attr("height", bbox.height);
2633
+ }
2634
+ if (useHtmlLabels) {
2635
+ label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")");
2636
+ } else {
2637
+ label.attr("transform", "translate(0, " + -bbox.height / 2 + ")");
2638
+ }
2639
+ if (node.centerLabel) {
2640
+ label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")");
2641
+ }
2642
+ label.insert("rect", ":first-child");
2643
+ return { shapeSvg, bbox, halfPadding, label };
2644
+ }, "labelHelper");
2645
+ var updateNodeBounds = /* @__PURE__ */ __name((node, element) => {
2646
+ const bbox = element.node().getBBox();
2647
+ node.width = bbox.width;
2648
+ node.height = bbox.height;
2649
+ }, "updateNodeBounds");
2650
+ function insertPolygonShape(parent, w, h, points) {
2651
+ return parent.insert("polygon", ":first-child").attr(
2652
+ "points",
2653
+ points.map(function(d) {
2654
+ return d.x + "," + d.y;
2655
+ }).join(" ")
2656
+ ).attr("class", "label-container").attr("transform", "translate(" + -w / 2 + "," + h / 2 + ")");
2657
+ }
2658
+ __name(insertPolygonShape, "insertPolygonShape");
2659
+ var note = /* @__PURE__ */ __name(async (parent, node) => {
2660
+ const useHtmlLabels = node.useHtmlLabels || getConfig2().flowchart.htmlLabels;
2661
+ if (!useHtmlLabels) {
2662
+ node.centerLabel = true;
2663
+ }
2664
+ const { shapeSvg, bbox, halfPadding } = await labelHelper(
2665
+ parent,
2666
+ node,
2667
+ "node " + node.classes,
2668
+ true
2669
+ );
2670
+ log.info("Classes = ", node.classes);
2671
+ const rect2 = shapeSvg.insert("rect", ":first-child");
2672
+ rect2.attr("rx", node.rx).attr("ry", node.ry).attr("x", -bbox.width / 2 - halfPadding).attr("y", -bbox.height / 2 - halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding);
2673
+ updateNodeBounds(node, rect2);
2674
+ node.intersect = function(point2) {
2675
+ return intersect_default.rect(node, point2);
2676
+ };
2677
+ return shapeSvg;
2678
+ }, "note");
2679
+ var note_default = note;
2680
+ var formatClass = /* @__PURE__ */ __name((str) => {
2681
+ if (str) {
2682
+ return " " + str;
2683
+ }
2684
+ return "";
2685
+ }, "formatClass");
2686
+ var getClassesFromNode = /* @__PURE__ */ __name((node, otherClasses) => {
2687
+ return `${otherClasses ? otherClasses : "node default"}${formatClass(node.classes)} ${formatClass(
2688
+ node.class
2689
+ )}`;
2690
+ }, "getClassesFromNode");
2691
+ var question = /* @__PURE__ */ __name(async (parent, node) => {
2692
+ const { shapeSvg, bbox } = await labelHelper(
2693
+ parent,
2694
+ node,
2695
+ getClassesFromNode(node, void 0),
2696
+ true
2697
+ );
2698
+ const w = bbox.width + node.padding;
2699
+ const h = bbox.height + node.padding;
2700
+ const s = w + h;
2701
+ const points = [
2702
+ { x: s / 2, y: 0 },
2703
+ { x: s, y: -s / 2 },
2704
+ { x: s / 2, y: -s },
2705
+ { x: 0, y: -s / 2 }
2706
+ ];
2707
+ log.info("Question main (Circle)");
2708
+ const questionElem = insertPolygonShape(shapeSvg, s, s, points);
2709
+ questionElem.attr("style", node.style);
2710
+ updateNodeBounds(node, questionElem);
2711
+ node.intersect = function(point2) {
2712
+ log.warn("Intersect called");
2713
+ return intersect_default.polygon(node, points, point2);
2714
+ };
2715
+ return shapeSvg;
2716
+ }, "question");
2717
+ var choice = /* @__PURE__ */ __name((parent, node) => {
2718
+ const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id);
2719
+ const s = 28;
2720
+ const points = [
2721
+ { x: 0, y: s / 2 },
2722
+ { x: s / 2, y: 0 },
2723
+ { x: 0, y: -s / 2 },
2724
+ { x: -s / 2, y: 0 }
2725
+ ];
2726
+ const choice2 = shapeSvg.insert("polygon", ":first-child").attr(
2727
+ "points",
2728
+ points.map(function(d) {
2729
+ return d.x + "," + d.y;
2730
+ }).join(" ")
2731
+ );
2732
+ choice2.attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28);
2733
+ node.width = 28;
2734
+ node.height = 28;
2735
+ node.intersect = function(point2) {
2736
+ return intersect_default.circle(node, 14, point2);
2737
+ };
2738
+ return shapeSvg;
2739
+ }, "choice");
2740
+ var hexagon = /* @__PURE__ */ __name(async (parent, node) => {
2741
+ const { shapeSvg, bbox } = await labelHelper(
2742
+ parent,
2743
+ node,
2744
+ getClassesFromNode(node, void 0),
2745
+ true
2746
+ );
2747
+ const f = 4;
2748
+ const h = bbox.height + node.padding;
2749
+ const m = h / f;
2750
+ const w = bbox.width + 2 * m + node.padding;
2751
+ const points = [
2752
+ { x: m, y: 0 },
2753
+ { x: w - m, y: 0 },
2754
+ { x: w, y: -h / 2 },
2755
+ { x: w - m, y: -h },
2756
+ { x: m, y: -h },
2757
+ { x: 0, y: -h / 2 }
2758
+ ];
2759
+ const hex = insertPolygonShape(shapeSvg, w, h, points);
2760
+ hex.attr("style", node.style);
2761
+ updateNodeBounds(node, hex);
2762
+ node.intersect = function(point2) {
2763
+ return intersect_default.polygon(node, points, point2);
2764
+ };
2765
+ return shapeSvg;
2766
+ }, "hexagon");
2767
+ var block_arrow = /* @__PURE__ */ __name(async (parent, node) => {
2768
+ const { shapeSvg, bbox } = await labelHelper(parent, node, void 0, true);
2769
+ const f = 2;
2770
+ const h = bbox.height + 2 * node.padding;
2771
+ const m = h / f;
2772
+ const w = bbox.width + 2 * m + node.padding;
2773
+ const points = getArrowPoints(node.directions, bbox, node);
2774
+ const blockArrow = insertPolygonShape(shapeSvg, w, h, points);
2775
+ blockArrow.attr("style", node.style);
2776
+ updateNodeBounds(node, blockArrow);
2777
+ node.intersect = function(point2) {
2778
+ return intersect_default.polygon(node, points, point2);
2779
+ };
2780
+ return shapeSvg;
2781
+ }, "block_arrow");
2782
+ var rect_left_inv_arrow = /* @__PURE__ */ __name(async (parent, node) => {
2783
+ const { shapeSvg, bbox } = await labelHelper(
2784
+ parent,
2785
+ node,
2786
+ getClassesFromNode(node, void 0),
2787
+ true
2788
+ );
2789
+ const w = bbox.width + node.padding;
2790
+ const h = bbox.height + node.padding;
2791
+ const points = [
2792
+ { x: -h / 2, y: 0 },
2793
+ { x: w, y: 0 },
2794
+ { x: w, y: -h },
2795
+ { x: -h / 2, y: -h },
2796
+ { x: 0, y: -h / 2 }
2797
+ ];
2798
+ const el = insertPolygonShape(shapeSvg, w, h, points);
2799
+ el.attr("style", node.style);
2800
+ node.width = w + h;
2801
+ node.height = h;
2802
+ node.intersect = function(point2) {
2803
+ return intersect_default.polygon(node, points, point2);
2804
+ };
2805
+ return shapeSvg;
2806
+ }, "rect_left_inv_arrow");
2807
+ var lean_right = /* @__PURE__ */ __name(async (parent, node) => {
2808
+ const { shapeSvg, bbox } = await labelHelper(parent, node, getClassesFromNode(node), true);
2809
+ const w = bbox.width + node.padding;
2810
+ const h = bbox.height + node.padding;
2811
+ const points = [
2812
+ { x: -2 * h / 6, y: 0 },
2813
+ { x: w - h / 6, y: 0 },
2814
+ { x: w + 2 * h / 6, y: -h },
2815
+ { x: h / 6, y: -h }
2816
+ ];
2817
+ const el = insertPolygonShape(shapeSvg, w, h, points);
2818
+ el.attr("style", node.style);
2819
+ updateNodeBounds(node, el);
2820
+ node.intersect = function(point2) {
2821
+ return intersect_default.polygon(node, points, point2);
2822
+ };
2823
+ return shapeSvg;
2824
+ }, "lean_right");
2825
+ var lean_left = /* @__PURE__ */ __name(async (parent, node) => {
2826
+ const { shapeSvg, bbox } = await labelHelper(
2827
+ parent,
2828
+ node,
2829
+ getClassesFromNode(node, void 0),
2830
+ true
2831
+ );
2832
+ const w = bbox.width + node.padding;
2833
+ const h = bbox.height + node.padding;
2834
+ const points = [
2835
+ { x: 2 * h / 6, y: 0 },
2836
+ { x: w + h / 6, y: 0 },
2837
+ { x: w - 2 * h / 6, y: -h },
2838
+ { x: -h / 6, y: -h }
2839
+ ];
2840
+ const el = insertPolygonShape(shapeSvg, w, h, points);
2841
+ el.attr("style", node.style);
2842
+ updateNodeBounds(node, el);
2843
+ node.intersect = function(point2) {
2844
+ return intersect_default.polygon(node, points, point2);
2845
+ };
2846
+ return shapeSvg;
2847
+ }, "lean_left");
2848
+ var trapezoid = /* @__PURE__ */ __name(async (parent, node) => {
2849
+ const { shapeSvg, bbox } = await labelHelper(
2850
+ parent,
2851
+ node,
2852
+ getClassesFromNode(node, void 0),
2853
+ true
2854
+ );
2855
+ const w = bbox.width + node.padding;
2856
+ const h = bbox.height + node.padding;
2857
+ const points = [
2858
+ { x: -2 * h / 6, y: 0 },
2859
+ { x: w + 2 * h / 6, y: 0 },
2860
+ { x: w - h / 6, y: -h },
2861
+ { x: h / 6, y: -h }
2862
+ ];
2863
+ const el = insertPolygonShape(shapeSvg, w, h, points);
2864
+ el.attr("style", node.style);
2865
+ updateNodeBounds(node, el);
2866
+ node.intersect = function(point2) {
2867
+ return intersect_default.polygon(node, points, point2);
2868
+ };
2869
+ return shapeSvg;
2870
+ }, "trapezoid");
2871
+ var inv_trapezoid = /* @__PURE__ */ __name(async (parent, node) => {
2872
+ const { shapeSvg, bbox } = await labelHelper(
2873
+ parent,
2874
+ node,
2875
+ getClassesFromNode(node, void 0),
2876
+ true
2877
+ );
2878
+ const w = bbox.width + node.padding;
2879
+ const h = bbox.height + node.padding;
2880
+ const points = [
2881
+ { x: h / 6, y: 0 },
2882
+ { x: w - h / 6, y: 0 },
2883
+ { x: w + 2 * h / 6, y: -h },
2884
+ { x: -2 * h / 6, y: -h }
2885
+ ];
2886
+ const el = insertPolygonShape(shapeSvg, w, h, points);
2887
+ el.attr("style", node.style);
2888
+ updateNodeBounds(node, el);
2889
+ node.intersect = function(point2) {
2890
+ return intersect_default.polygon(node, points, point2);
2891
+ };
2892
+ return shapeSvg;
2893
+ }, "inv_trapezoid");
2894
+ var rect_right_inv_arrow = /* @__PURE__ */ __name(async (parent, node) => {
2895
+ const { shapeSvg, bbox } = await labelHelper(
2896
+ parent,
2897
+ node,
2898
+ getClassesFromNode(node, void 0),
2899
+ true
2900
+ );
2901
+ const w = bbox.width + node.padding;
2902
+ const h = bbox.height + node.padding;
2903
+ const points = [
2904
+ { x: 0, y: 0 },
2905
+ { x: w + h / 2, y: 0 },
2906
+ { x: w, y: -h / 2 },
2907
+ { x: w + h / 2, y: -h },
2908
+ { x: 0, y: -h }
2909
+ ];
2910
+ const el = insertPolygonShape(shapeSvg, w, h, points);
2911
+ el.attr("style", node.style);
2912
+ updateNodeBounds(node, el);
2913
+ node.intersect = function(point2) {
2914
+ return intersect_default.polygon(node, points, point2);
2915
+ };
2916
+ return shapeSvg;
2917
+ }, "rect_right_inv_arrow");
2918
+ var cylinder = /* @__PURE__ */ __name(async (parent, node) => {
2919
+ const { shapeSvg, bbox } = await labelHelper(
2920
+ parent,
2921
+ node,
2922
+ getClassesFromNode(node, void 0),
2923
+ true
2924
+ );
2925
+ const w = bbox.width + node.padding;
2926
+ const rx = w / 2;
2927
+ const ry = rx / (2.5 + w / 50);
2928
+ const h = bbox.height + ry + node.padding;
2929
+ const shape = "M 0," + ry + " a " + rx + "," + ry + " 0,0,0 " + w + " 0 a " + rx + "," + ry + " 0,0,0 " + -w + " 0 l 0," + h + " a " + rx + "," + ry + " 0,0,0 " + w + " 0 l 0," + -h;
2930
+ const el = shapeSvg.attr("label-offset-y", ry).insert("path", ":first-child").attr("style", node.style).attr("d", shape).attr("transform", "translate(" + -w / 2 + "," + -(h / 2 + ry) + ")");
2931
+ updateNodeBounds(node, el);
2932
+ node.intersect = function(point2) {
2933
+ const pos = intersect_default.rect(node, point2);
2934
+ const x = pos.x - node.x;
2935
+ if (rx != 0 && (Math.abs(x) < node.width / 2 || Math.abs(x) == node.width / 2 && Math.abs(pos.y - node.y) > node.height / 2 - ry)) {
2936
+ let y = ry * ry * (1 - x * x / (rx * rx));
2937
+ if (y != 0) {
2938
+ y = Math.sqrt(y);
2939
+ }
2940
+ y = ry - y;
2941
+ if (point2.y - node.y > 0) {
2942
+ y = -y;
2943
+ }
2944
+ pos.y += y;
2945
+ }
2946
+ return pos;
2947
+ };
2948
+ return shapeSvg;
2949
+ }, "cylinder");
2950
+ var rect = /* @__PURE__ */ __name(async (parent, node) => {
2951
+ const { shapeSvg, bbox, halfPadding } = await labelHelper(
2952
+ parent,
2953
+ node,
2954
+ "node " + node.classes + " " + node.class,
2955
+ true
2956
+ );
2957
+ const rect2 = shapeSvg.insert("rect", ":first-child");
2958
+ const totalWidth = node.positioned ? node.width : bbox.width + node.padding;
2959
+ const totalHeight = node.positioned ? node.height : bbox.height + node.padding;
2960
+ const x = node.positioned ? -totalWidth / 2 : -bbox.width / 2 - halfPadding;
2961
+ const y = node.positioned ? -totalHeight / 2 : -bbox.height / 2 - halfPadding;
2962
+ rect2.attr("class", "basic label-container").attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("x", x).attr("y", y).attr("width", totalWidth).attr("height", totalHeight);
2963
+ if (node.props) {
2964
+ const propKeys = new Set(Object.keys(node.props));
2965
+ if (node.props.borders) {
2966
+ applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight);
2967
+ propKeys.delete("borders");
2968
+ }
2969
+ propKeys.forEach((propKey) => {
2970
+ log.warn(`Unknown node property ${propKey}`);
2971
+ });
2972
+ }
2973
+ updateNodeBounds(node, rect2);
2974
+ node.intersect = function(point2) {
2975
+ return intersect_default.rect(node, point2);
2976
+ };
2977
+ return shapeSvg;
2978
+ }, "rect");
2979
+ var composite = /* @__PURE__ */ __name(async (parent, node) => {
2980
+ const { shapeSvg, bbox, halfPadding } = await labelHelper(
2981
+ parent,
2982
+ node,
2983
+ "node " + node.classes,
2984
+ true
2985
+ );
2986
+ const rect2 = shapeSvg.insert("rect", ":first-child");
2987
+ const totalWidth = node.positioned ? node.width : bbox.width + node.padding;
2988
+ const totalHeight = node.positioned ? node.height : bbox.height + node.padding;
2989
+ const x = node.positioned ? -totalWidth / 2 : -bbox.width / 2 - halfPadding;
2990
+ const y = node.positioned ? -totalHeight / 2 : -bbox.height / 2 - halfPadding;
2991
+ rect2.attr("class", "basic cluster composite label-container").attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("x", x).attr("y", y).attr("width", totalWidth).attr("height", totalHeight);
2992
+ if (node.props) {
2993
+ const propKeys = new Set(Object.keys(node.props));
2994
+ if (node.props.borders) {
2995
+ applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight);
2996
+ propKeys.delete("borders");
2997
+ }
2998
+ propKeys.forEach((propKey) => {
2999
+ log.warn(`Unknown node property ${propKey}`);
3000
+ });
3001
+ }
3002
+ updateNodeBounds(node, rect2);
3003
+ node.intersect = function(point2) {
3004
+ return intersect_default.rect(node, point2);
3005
+ };
3006
+ return shapeSvg;
3007
+ }, "composite");
3008
+ var labelRect = /* @__PURE__ */ __name(async (parent, node) => {
3009
+ const { shapeSvg } = await labelHelper(parent, node, "label", true);
3010
+ log.trace("Classes = ", node.class);
3011
+ const rect2 = shapeSvg.insert("rect", ":first-child");
3012
+ const totalWidth = 0;
3013
+ const totalHeight = 0;
3014
+ rect2.attr("width", totalWidth).attr("height", totalHeight);
3015
+ shapeSvg.attr("class", "label edgeLabel");
3016
+ if (node.props) {
3017
+ const propKeys = new Set(Object.keys(node.props));
3018
+ if (node.props.borders) {
3019
+ applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight);
3020
+ propKeys.delete("borders");
3021
+ }
3022
+ propKeys.forEach((propKey) => {
3023
+ log.warn(`Unknown node property ${propKey}`);
3024
+ });
3025
+ }
3026
+ updateNodeBounds(node, rect2);
3027
+ node.intersect = function(point2) {
3028
+ return intersect_default.rect(node, point2);
3029
+ };
3030
+ return shapeSvg;
3031
+ }, "labelRect");
3032
+ function applyNodePropertyBorders(rect2, borders, totalWidth, totalHeight) {
3033
+ const strokeDashArray = [];
3034
+ const addBorder = /* @__PURE__ */ __name((length) => {
3035
+ strokeDashArray.push(length, 0);
3036
+ }, "addBorder");
3037
+ const skipBorder = /* @__PURE__ */ __name((length) => {
3038
+ strokeDashArray.push(0, length);
3039
+ }, "skipBorder");
3040
+ if (borders.includes("t")) {
3041
+ log.debug("add top border");
3042
+ addBorder(totalWidth);
3043
+ } else {
3044
+ skipBorder(totalWidth);
3045
+ }
3046
+ if (borders.includes("r")) {
3047
+ log.debug("add right border");
3048
+ addBorder(totalHeight);
3049
+ } else {
3050
+ skipBorder(totalHeight);
3051
+ }
3052
+ if (borders.includes("b")) {
3053
+ log.debug("add bottom border");
3054
+ addBorder(totalWidth);
3055
+ } else {
3056
+ skipBorder(totalWidth);
3057
+ }
3058
+ if (borders.includes("l")) {
3059
+ log.debug("add left border");
3060
+ addBorder(totalHeight);
3061
+ } else {
3062
+ skipBorder(totalHeight);
3063
+ }
3064
+ rect2.attr("stroke-dasharray", strokeDashArray.join(" "));
3065
+ }
3066
+ __name(applyNodePropertyBorders, "applyNodePropertyBorders");
3067
+ var rectWithTitle = /* @__PURE__ */ __name(async (parent, node) => {
3068
+ let classes2;
3069
+ if (!node.classes) {
3070
+ classes2 = "node default";
3071
+ } else {
3072
+ classes2 = "node " + node.classes;
3073
+ }
3074
+ const shapeSvg = parent.insert("g").attr("class", classes2).attr("id", node.domId || node.id);
3075
+ const rect2 = shapeSvg.insert("rect", ":first-child");
3076
+ const innerLine = shapeSvg.insert("line");
3077
+ const label = shapeSvg.insert("g").attr("class", "label");
3078
+ const text2 = node.labelText.flat ? node.labelText.flat() : node.labelText;
3079
+ let title = "";
3080
+ if (typeof text2 === "object") {
3081
+ title = text2[0];
3082
+ } else {
3083
+ title = text2;
3084
+ }
3085
+ log.info("Label text abc79", title, text2, typeof text2 === "object");
3086
+ const text = label.node().appendChild(await createLabel_default(title, node.labelStyle, true, true));
3087
+ let bbox = { width: 0, height: 0 };
3088
+ if (evaluate(getConfig2().flowchart.htmlLabels)) {
3089
+ const div = text.children[0];
3090
+ const dv = select(text);
3091
+ bbox = div.getBoundingClientRect();
3092
+ dv.attr("width", bbox.width);
3093
+ dv.attr("height", bbox.height);
3094
+ }
3095
+ log.info("Text 2", text2);
3096
+ const textRows = text2.slice(1, text2.length);
3097
+ let titleBox = text.getBBox();
3098
+ const descr = label.node().appendChild(
3099
+ await createLabel_default(
3100
+ textRows.join ? textRows.join("<br/>") : textRows,
3101
+ node.labelStyle,
3102
+ true,
3103
+ true
3104
+ )
3105
+ );
3106
+ if (evaluate(getConfig2().flowchart.htmlLabels)) {
3107
+ const div = descr.children[0];
3108
+ const dv = select(descr);
3109
+ bbox = div.getBoundingClientRect();
3110
+ dv.attr("width", bbox.width);
3111
+ dv.attr("height", bbox.height);
3112
+ }
3113
+ const halfPadding = node.padding / 2;
3114
+ select(descr).attr(
3115
+ "transform",
3116
+ "translate( " + // (titleBox.width - bbox.width) / 2 +
3117
+ (bbox.width > titleBox.width ? 0 : (titleBox.width - bbox.width) / 2) + ", " + (titleBox.height + halfPadding + 5) + ")"
3118
+ );
3119
+ select(text).attr(
3120
+ "transform",
3121
+ "translate( " + // (titleBox.width - bbox.width) / 2 +
3122
+ (bbox.width < titleBox.width ? 0 : -(titleBox.width - bbox.width) / 2) + ", 0)"
3123
+ );
3124
+ bbox = label.node().getBBox();
3125
+ label.attr(
3126
+ "transform",
3127
+ "translate(" + -bbox.width / 2 + ", " + (-bbox.height / 2 - halfPadding + 3) + ")"
3128
+ );
3129
+ rect2.attr("class", "outer title-state").attr("x", -bbox.width / 2 - halfPadding).attr("y", -bbox.height / 2 - halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding);
3130
+ innerLine.attr("class", "divider").attr("x1", -bbox.width / 2 - halfPadding).attr("x2", bbox.width / 2 + halfPadding).attr("y1", -bbox.height / 2 - halfPadding + titleBox.height + halfPadding).attr("y2", -bbox.height / 2 - halfPadding + titleBox.height + halfPadding);
3131
+ updateNodeBounds(node, rect2);
3132
+ node.intersect = function(point2) {
3133
+ return intersect_default.rect(node, point2);
3134
+ };
3135
+ return shapeSvg;
3136
+ }, "rectWithTitle");
3137
+ var stadium = /* @__PURE__ */ __name(async (parent, node) => {
3138
+ const { shapeSvg, bbox } = await labelHelper(
3139
+ parent,
3140
+ node,
3141
+ getClassesFromNode(node, void 0),
3142
+ true
3143
+ );
3144
+ const h = bbox.height + node.padding;
3145
+ const w = bbox.width + h / 4 + node.padding;
3146
+ const rect2 = shapeSvg.insert("rect", ":first-child").attr("style", node.style).attr("rx", h / 2).attr("ry", h / 2).attr("x", -w / 2).attr("y", -h / 2).attr("width", w).attr("height", h);
3147
+ updateNodeBounds(node, rect2);
3148
+ node.intersect = function(point2) {
3149
+ return intersect_default.rect(node, point2);
3150
+ };
3151
+ return shapeSvg;
3152
+ }, "stadium");
3153
+ var circle2 = /* @__PURE__ */ __name(async (parent, node) => {
3154
+ const { shapeSvg, bbox, halfPadding } = await labelHelper(
3155
+ parent,
3156
+ node,
3157
+ getClassesFromNode(node, void 0),
3158
+ true
3159
+ );
3160
+ const circle3 = shapeSvg.insert("circle", ":first-child");
3161
+ circle3.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding);
3162
+ log.info("Circle main");
3163
+ updateNodeBounds(node, circle3);
3164
+ node.intersect = function(point2) {
3165
+ log.info("Circle intersect", node, bbox.width / 2 + halfPadding, point2);
3166
+ return intersect_default.circle(node, bbox.width / 2 + halfPadding, point2);
3167
+ };
3168
+ return shapeSvg;
3169
+ }, "circle");
3170
+ var doublecircle = /* @__PURE__ */ __name(async (parent, node) => {
3171
+ const { shapeSvg, bbox, halfPadding } = await labelHelper(
3172
+ parent,
3173
+ node,
3174
+ getClassesFromNode(node, void 0),
3175
+ true
3176
+ );
3177
+ const gap = 5;
3178
+ const circleGroup = shapeSvg.insert("g", ":first-child");
3179
+ const outerCircle = circleGroup.insert("circle");
3180
+ const innerCircle = circleGroup.insert("circle");
3181
+ circleGroup.attr("class", node.class);
3182
+ outerCircle.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding + gap).attr("width", bbox.width + node.padding + gap * 2).attr("height", bbox.height + node.padding + gap * 2);
3183
+ innerCircle.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding);
3184
+ log.info("DoubleCircle main");
3185
+ updateNodeBounds(node, outerCircle);
3186
+ node.intersect = function(point2) {
3187
+ log.info("DoubleCircle intersect", node, bbox.width / 2 + halfPadding + gap, point2);
3188
+ return intersect_default.circle(node, bbox.width / 2 + halfPadding + gap, point2);
3189
+ };
3190
+ return shapeSvg;
3191
+ }, "doublecircle");
3192
+ var subroutine = /* @__PURE__ */ __name(async (parent, node) => {
3193
+ const { shapeSvg, bbox } = await labelHelper(
3194
+ parent,
3195
+ node,
3196
+ getClassesFromNode(node, void 0),
3197
+ true
3198
+ );
3199
+ const w = bbox.width + node.padding;
3200
+ const h = bbox.height + node.padding;
3201
+ const points = [
3202
+ { x: 0, y: 0 },
3203
+ { x: w, y: 0 },
3204
+ { x: w, y: -h },
3205
+ { x: 0, y: -h },
3206
+ { x: 0, y: 0 },
3207
+ { x: -8, y: 0 },
3208
+ { x: w + 8, y: 0 },
3209
+ { x: w + 8, y: -h },
3210
+ { x: -8, y: -h },
3211
+ { x: -8, y: 0 }
3212
+ ];
3213
+ const el = insertPolygonShape(shapeSvg, w, h, points);
3214
+ el.attr("style", node.style);
3215
+ updateNodeBounds(node, el);
3216
+ node.intersect = function(point2) {
3217
+ return intersect_default.polygon(node, points, point2);
3218
+ };
3219
+ return shapeSvg;
3220
+ }, "subroutine");
3221
+ var start = /* @__PURE__ */ __name((parent, node) => {
3222
+ const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id);
3223
+ const circle3 = shapeSvg.insert("circle", ":first-child");
3224
+ circle3.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14);
3225
+ updateNodeBounds(node, circle3);
3226
+ node.intersect = function(point2) {
3227
+ return intersect_default.circle(node, 7, point2);
3228
+ };
3229
+ return shapeSvg;
3230
+ }, "start");
3231
+ var forkJoin = /* @__PURE__ */ __name((parent, node, dir) => {
3232
+ const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id);
3233
+ let width = 70;
3234
+ let height = 10;
3235
+ if (dir === "LR") {
3236
+ width = 10;
3237
+ height = 70;
3238
+ }
3239
+ const shape = shapeSvg.append("rect").attr("x", -1 * width / 2).attr("y", -1 * height / 2).attr("width", width).attr("height", height).attr("class", "fork-join");
3240
+ updateNodeBounds(node, shape);
3241
+ node.height = node.height + node.padding / 2;
3242
+ node.width = node.width + node.padding / 2;
3243
+ node.intersect = function(point2) {
3244
+ return intersect_default.rect(node, point2);
3245
+ };
3246
+ return shapeSvg;
3247
+ }, "forkJoin");
3248
+ var end = /* @__PURE__ */ __name((parent, node) => {
3249
+ const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id);
3250
+ const innerCircle = shapeSvg.insert("circle", ":first-child");
3251
+ const circle3 = shapeSvg.insert("circle", ":first-child");
3252
+ circle3.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14);
3253
+ innerCircle.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10);
3254
+ updateNodeBounds(node, circle3);
3255
+ node.intersect = function(point2) {
3256
+ return intersect_default.circle(node, 7, point2);
3257
+ };
3258
+ return shapeSvg;
3259
+ }, "end");
3260
+ var class_box = /* @__PURE__ */ __name(async (parent, node) => {
3261
+ var _a2;
3262
+ const halfPadding = node.padding / 2;
3263
+ const rowPadding = 4;
3264
+ const lineHeight = 8;
3265
+ let classes2;
3266
+ if (!node.classes) {
3267
+ classes2 = "node default";
3268
+ } else {
3269
+ classes2 = "node " + node.classes;
3270
+ }
3271
+ const shapeSvg = parent.insert("g").attr("class", classes2).attr("id", node.domId || node.id);
3272
+ const rect2 = shapeSvg.insert("rect", ":first-child");
3273
+ const topLine = shapeSvg.insert("line");
3274
+ const bottomLine = shapeSvg.insert("line");
3275
+ let maxWidth = 0;
3276
+ let maxHeight = rowPadding;
3277
+ const labelContainer = shapeSvg.insert("g").attr("class", "label");
3278
+ let verticalPos = 0;
3279
+ const hasInterface = (_a2 = node.classData.annotations) == null ? void 0 : _a2[0];
3280
+ const interfaceLabelText = node.classData.annotations[0] ? "«" + node.classData.annotations[0] + "»" : "";
3281
+ const interfaceLabel = labelContainer.node().appendChild(await createLabel_default(interfaceLabelText, node.labelStyle, true, true));
3282
+ let interfaceBBox = interfaceLabel.getBBox();
3283
+ if (evaluate(getConfig2().flowchart.htmlLabels)) {
3284
+ const div = interfaceLabel.children[0];
3285
+ const dv = select(interfaceLabel);
3286
+ interfaceBBox = div.getBoundingClientRect();
3287
+ dv.attr("width", interfaceBBox.width);
3288
+ dv.attr("height", interfaceBBox.height);
3289
+ }
3290
+ if (node.classData.annotations[0]) {
3291
+ maxHeight += interfaceBBox.height + rowPadding;
3292
+ maxWidth += interfaceBBox.width;
3293
+ }
3294
+ let classTitleString = node.classData.label;
3295
+ if (node.classData.type !== void 0 && node.classData.type !== "") {
3296
+ if (getConfig2().flowchart.htmlLabels) {
3297
+ classTitleString += "&lt;" + node.classData.type + "&gt;";
3298
+ } else {
3299
+ classTitleString += "<" + node.classData.type + ">";
3300
+ }
3301
+ }
3302
+ const classTitleLabel = labelContainer.node().appendChild(await createLabel_default(classTitleString, node.labelStyle, true, true));
3303
+ select(classTitleLabel).attr("class", "classTitle");
3304
+ let classTitleBBox = classTitleLabel.getBBox();
3305
+ if (evaluate(getConfig2().flowchart.htmlLabels)) {
3306
+ const div = classTitleLabel.children[0];
3307
+ const dv = select(classTitleLabel);
3308
+ classTitleBBox = div.getBoundingClientRect();
3309
+ dv.attr("width", classTitleBBox.width);
3310
+ dv.attr("height", classTitleBBox.height);
3311
+ }
3312
+ maxHeight += classTitleBBox.height + rowPadding;
3313
+ if (classTitleBBox.width > maxWidth) {
3314
+ maxWidth = classTitleBBox.width;
3315
+ }
3316
+ const classAttributes = [];
3317
+ node.classData.members.forEach(async (member) => {
3318
+ const parsedInfo = member.getDisplayDetails();
3319
+ let parsedText = parsedInfo.displayText;
3320
+ if (getConfig2().flowchart.htmlLabels) {
3321
+ parsedText = parsedText.replace(/</g, "&lt;").replace(/>/g, "&gt;");
3322
+ }
3323
+ const lbl = labelContainer.node().appendChild(
3324
+ await createLabel_default(
3325
+ parsedText,
3326
+ parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle,
3327
+ true,
3328
+ true
3329
+ )
3330
+ );
3331
+ let bbox = lbl.getBBox();
3332
+ if (evaluate(getConfig2().flowchart.htmlLabels)) {
3333
+ const div = lbl.children[0];
3334
+ const dv = select(lbl);
3335
+ bbox = div.getBoundingClientRect();
3336
+ dv.attr("width", bbox.width);
3337
+ dv.attr("height", bbox.height);
3338
+ }
3339
+ if (bbox.width > maxWidth) {
3340
+ maxWidth = bbox.width;
3341
+ }
3342
+ maxHeight += bbox.height + rowPadding;
3343
+ classAttributes.push(lbl);
3344
+ });
3345
+ maxHeight += lineHeight;
3346
+ const classMethods = [];
3347
+ node.classData.methods.forEach(async (member) => {
3348
+ const parsedInfo = member.getDisplayDetails();
3349
+ let displayText = parsedInfo.displayText;
3350
+ if (getConfig2().flowchart.htmlLabels) {
3351
+ displayText = displayText.replace(/</g, "&lt;").replace(/>/g, "&gt;");
3352
+ }
3353
+ const lbl = labelContainer.node().appendChild(
3354
+ await createLabel_default(
3355
+ displayText,
3356
+ parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle,
3357
+ true,
3358
+ true
3359
+ )
3360
+ );
3361
+ let bbox = lbl.getBBox();
3362
+ if (evaluate(getConfig2().flowchart.htmlLabels)) {
3363
+ const div = lbl.children[0];
3364
+ const dv = select(lbl);
3365
+ bbox = div.getBoundingClientRect();
3366
+ dv.attr("width", bbox.width);
3367
+ dv.attr("height", bbox.height);
3368
+ }
3369
+ if (bbox.width > maxWidth) {
3370
+ maxWidth = bbox.width;
3371
+ }
3372
+ maxHeight += bbox.height + rowPadding;
3373
+ classMethods.push(lbl);
3374
+ });
3375
+ maxHeight += lineHeight;
3376
+ if (hasInterface) {
3377
+ let diffX2 = (maxWidth - interfaceBBox.width) / 2;
3378
+ select(interfaceLabel).attr(
3379
+ "transform",
3380
+ "translate( " + (-1 * maxWidth / 2 + diffX2) + ", " + -1 * maxHeight / 2 + ")"
3381
+ );
3382
+ verticalPos = interfaceBBox.height + rowPadding;
3383
+ }
3384
+ let diffX = (maxWidth - classTitleBBox.width) / 2;
3385
+ select(classTitleLabel).attr(
3386
+ "transform",
3387
+ "translate( " + (-1 * maxWidth / 2 + diffX) + ", " + (-1 * maxHeight / 2 + verticalPos) + ")"
3388
+ );
3389
+ verticalPos += classTitleBBox.height + rowPadding;
3390
+ topLine.attr("class", "divider").attr("x1", -maxWidth / 2 - halfPadding).attr("x2", maxWidth / 2 + halfPadding).attr("y1", -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr("y2", -maxHeight / 2 - halfPadding + lineHeight + verticalPos);
3391
+ verticalPos += lineHeight;
3392
+ classAttributes.forEach((lbl) => {
3393
+ select(lbl).attr(
3394
+ "transform",
3395
+ "translate( " + -maxWidth / 2 + ", " + (-1 * maxHeight / 2 + verticalPos + lineHeight / 2) + ")"
3396
+ );
3397
+ const memberBBox = lbl == null ? void 0 : lbl.getBBox();
3398
+ verticalPos += ((memberBBox == null ? void 0 : memberBBox.height) ?? 0) + rowPadding;
3399
+ });
3400
+ verticalPos += lineHeight;
3401
+ bottomLine.attr("class", "divider").attr("x1", -maxWidth / 2 - halfPadding).attr("x2", maxWidth / 2 + halfPadding).attr("y1", -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr("y2", -maxHeight / 2 - halfPadding + lineHeight + verticalPos);
3402
+ verticalPos += lineHeight;
3403
+ classMethods.forEach((lbl) => {
3404
+ select(lbl).attr(
3405
+ "transform",
3406
+ "translate( " + -maxWidth / 2 + ", " + (-1 * maxHeight / 2 + verticalPos) + ")"
3407
+ );
3408
+ const memberBBox = lbl == null ? void 0 : lbl.getBBox();
3409
+ verticalPos += ((memberBBox == null ? void 0 : memberBBox.height) ?? 0) + rowPadding;
3410
+ });
3411
+ rect2.attr("style", node.style).attr("class", "outer title-state").attr("x", -maxWidth / 2 - halfPadding).attr("y", -(maxHeight / 2) - halfPadding).attr("width", maxWidth + node.padding).attr("height", maxHeight + node.padding);
3412
+ updateNodeBounds(node, rect2);
3413
+ node.intersect = function(point2) {
3414
+ return intersect_default.rect(node, point2);
3415
+ };
3416
+ return shapeSvg;
3417
+ }, "class_box");
3418
+ var shapes = {
3419
+ rhombus: question,
3420
+ composite,
3421
+ question,
3422
+ rect,
3423
+ labelRect,
3424
+ rectWithTitle,
3425
+ choice,
3426
+ circle: circle2,
3427
+ doublecircle,
3428
+ stadium,
3429
+ hexagon,
3430
+ block_arrow,
3431
+ rect_left_inv_arrow,
3432
+ lean_right,
3433
+ lean_left,
3434
+ trapezoid,
3435
+ inv_trapezoid,
3436
+ rect_right_inv_arrow,
3437
+ cylinder,
3438
+ start,
3439
+ end,
3440
+ note: note_default,
3441
+ subroutine,
3442
+ fork: forkJoin,
3443
+ join: forkJoin,
3444
+ class_box
3445
+ };
3446
+ var nodeElems = {};
3447
+ var insertNode = /* @__PURE__ */ __name(async (elem, node, renderOptions) => {
3448
+ let newEl;
3449
+ let el;
3450
+ if (node.link) {
3451
+ let target;
3452
+ if (getConfig2().securityLevel === "sandbox") {
3453
+ target = "_top";
3454
+ } else if (node.linkTarget) {
3455
+ target = node.linkTarget || "_blank";
3456
+ }
3457
+ newEl = elem.insert("svg:a").attr("xlink:href", node.link).attr("target", target);
3458
+ el = await shapes[node.shape](newEl, node, renderOptions);
3459
+ } else {
3460
+ el = await shapes[node.shape](elem, node, renderOptions);
3461
+ newEl = el;
3462
+ }
3463
+ if (node.tooltip) {
3464
+ el.attr("title", node.tooltip);
3465
+ }
3466
+ if (node.class) {
3467
+ el.attr("class", "node default " + node.class);
3468
+ }
3469
+ nodeElems[node.id] = newEl;
3470
+ if (node.haveCallback) {
3471
+ nodeElems[node.id].attr("class", nodeElems[node.id].attr("class") + " clickable");
3472
+ }
3473
+ return newEl;
3474
+ }, "insertNode");
3475
+ var positionNode = /* @__PURE__ */ __name((node) => {
3476
+ const el = nodeElems[node.id];
3477
+ log.trace(
3478
+ "Transforming node",
3479
+ node.diff,
3480
+ node,
3481
+ "translate(" + (node.x - node.width / 2 - 5) + ", " + node.width / 2 + ")"
3482
+ );
3483
+ const padding2 = 8;
3484
+ const diff = node.diff || 0;
3485
+ if (node.clusterNode) {
3486
+ el.attr(
3487
+ "transform",
3488
+ "translate(" + (node.x + diff - node.width / 2) + ", " + (node.y - node.height / 2 - padding2) + ")"
3489
+ );
3490
+ } else {
3491
+ el.attr("transform", "translate(" + node.x + ", " + node.y + ")");
3492
+ }
3493
+ return diff;
3494
+ }, "positionNode");
3495
+ function getNodeFromBlock(block, db2, positioned = false) {
3496
+ var _a2, _b2, _c;
3497
+ const vertex = block;
3498
+ let classStr = "default";
3499
+ if ((((_a2 = vertex == null ? void 0 : vertex.classes) == null ? void 0 : _a2.length) || 0) > 0) {
3500
+ classStr = ((vertex == null ? void 0 : vertex.classes) ?? []).join(" ");
3501
+ }
3502
+ classStr = classStr + " flowchart-label";
3503
+ let radius = 0;
3504
+ let shape = "";
3505
+ let padding2;
3506
+ switch (vertex.type) {
3507
+ case "round":
3508
+ radius = 5;
3509
+ shape = "rect";
3510
+ break;
3511
+ case "composite":
3512
+ radius = 0;
3513
+ shape = "composite";
3514
+ padding2 = 0;
3515
+ break;
3516
+ case "square":
3517
+ shape = "rect";
3518
+ break;
3519
+ case "diamond":
3520
+ shape = "question";
3521
+ break;
3522
+ case "hexagon":
3523
+ shape = "hexagon";
3524
+ break;
3525
+ case "block_arrow":
3526
+ shape = "block_arrow";
3527
+ break;
3528
+ case "odd":
3529
+ shape = "rect_left_inv_arrow";
3530
+ break;
3531
+ case "lean_right":
3532
+ shape = "lean_right";
3533
+ break;
3534
+ case "lean_left":
3535
+ shape = "lean_left";
3536
+ break;
3537
+ case "trapezoid":
3538
+ shape = "trapezoid";
3539
+ break;
3540
+ case "inv_trapezoid":
3541
+ shape = "inv_trapezoid";
3542
+ break;
3543
+ case "rect_left_inv_arrow":
3544
+ shape = "rect_left_inv_arrow";
3545
+ break;
3546
+ case "circle":
3547
+ shape = "circle";
3548
+ break;
3549
+ case "ellipse":
3550
+ shape = "ellipse";
3551
+ break;
3552
+ case "stadium":
3553
+ shape = "stadium";
3554
+ break;
3555
+ case "subroutine":
3556
+ shape = "subroutine";
3557
+ break;
3558
+ case "cylinder":
3559
+ shape = "cylinder";
3560
+ break;
3561
+ case "group":
3562
+ shape = "rect";
3563
+ break;
3564
+ case "doublecircle":
3565
+ shape = "doublecircle";
3566
+ break;
3567
+ default:
3568
+ shape = "rect";
3569
+ }
3570
+ const styles = getStylesFromArray((vertex == null ? void 0 : vertex.styles) ?? []);
3571
+ const vertexText = vertex.label;
3572
+ const bounds = vertex.size ?? { width: 0, height: 0, x: 0, y: 0 };
3573
+ const node = {
3574
+ labelStyle: styles.labelStyle,
3575
+ shape,
3576
+ labelText: vertexText,
3577
+ rx: radius,
3578
+ ry: radius,
3579
+ class: classStr,
3580
+ style: styles.style,
3581
+ id: vertex.id,
3582
+ directions: vertex.directions,
3583
+ width: bounds.width,
3584
+ height: bounds.height,
3585
+ x: bounds.x,
3586
+ y: bounds.y,
3587
+ positioned,
3588
+ intersect: void 0,
3589
+ type: vertex.type,
3590
+ padding: padding2 ?? ((_c = (_b2 = getConfig()) == null ? void 0 : _b2.block) == null ? void 0 : _c.padding) ?? 0
3591
+ };
3592
+ return node;
3593
+ }
3594
+ __name(getNodeFromBlock, "getNodeFromBlock");
3595
+ async function calculateBlockSize(elem, block, db2) {
3596
+ const node = getNodeFromBlock(block, db2, false);
3597
+ if (node.type === "group") {
3598
+ return;
3599
+ }
3600
+ const config2 = getConfig();
3601
+ const nodeEl = await insertNode(elem, node, { config: config2 });
3602
+ const boundingBox = nodeEl.node().getBBox();
3603
+ const obj = db2.getBlock(node.id);
3604
+ obj.size = { width: boundingBox.width, height: boundingBox.height, x: 0, y: 0, node: nodeEl };
3605
+ db2.setBlock(obj);
3606
+ nodeEl.remove();
3607
+ }
3608
+ __name(calculateBlockSize, "calculateBlockSize");
3609
+ async function insertBlockPositioned(elem, block, db2) {
3610
+ const node = getNodeFromBlock(block, db2, true);
3611
+ const obj = db2.getBlock(node.id);
3612
+ if (obj.type !== "space") {
3613
+ const config2 = getConfig();
3614
+ await insertNode(elem, node, { config: config2 });
3615
+ block.intersect = node == null ? void 0 : node.intersect;
3616
+ positionNode(node);
3617
+ }
3618
+ }
3619
+ __name(insertBlockPositioned, "insertBlockPositioned");
3620
+ async function performOperations(elem, blocks2, db2, operation) {
3621
+ for (const block of blocks2) {
3622
+ await operation(elem, block, db2);
3623
+ if (block.children) {
3624
+ await performOperations(elem, block.children, db2, operation);
3625
+ }
3626
+ }
3627
+ }
3628
+ __name(performOperations, "performOperations");
3629
+ async function calculateBlockSizes(elem, blocks2, db2) {
3630
+ await performOperations(elem, blocks2, db2, calculateBlockSize);
3631
+ }
3632
+ __name(calculateBlockSizes, "calculateBlockSizes");
3633
+ async function insertBlocks(elem, blocks2, db2) {
3634
+ await performOperations(elem, blocks2, db2, insertBlockPositioned);
3635
+ }
3636
+ __name(insertBlocks, "insertBlocks");
3637
+ async function insertEdges(elem, edges, blocks2, db2, id) {
3638
+ const g = new Graph({
3639
+ multigraph: true,
3640
+ compound: true
3641
+ });
3642
+ g.setGraph({
3643
+ rankdir: "TB",
3644
+ nodesep: 10,
3645
+ ranksep: 10,
3646
+ marginx: 8,
3647
+ marginy: 8
3648
+ });
3649
+ for (const block of blocks2) {
3650
+ if (block.size) {
3651
+ g.setNode(block.id, {
3652
+ width: block.size.width,
3653
+ height: block.size.height,
3654
+ intersect: block.intersect
3655
+ });
3656
+ }
3657
+ }
3658
+ for (const edge of edges) {
3659
+ if (edge.start && edge.end) {
3660
+ const startBlock = db2.getBlock(edge.start);
3661
+ const endBlock = db2.getBlock(edge.end);
3662
+ if ((startBlock == null ? void 0 : startBlock.size) && (endBlock == null ? void 0 : endBlock.size)) {
3663
+ const start2 = startBlock.size;
3664
+ const end2 = endBlock.size;
3665
+ const points = [
3666
+ { x: start2.x, y: start2.y },
3667
+ { x: start2.x + (end2.x - start2.x) / 2, y: start2.y + (end2.y - start2.y) / 2 },
3668
+ { x: end2.x, y: end2.y }
3669
+ ];
3670
+ insertEdge(
3671
+ elem,
3672
+ { v: edge.start, w: edge.end, name: edge.id },
3673
+ {
3674
+ ...edge,
3675
+ arrowTypeEnd: edge.arrowTypeEnd,
3676
+ arrowTypeStart: edge.arrowTypeStart,
3677
+ points,
3678
+ classes: "edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"
3679
+ },
3680
+ void 0,
3681
+ "block",
3682
+ g,
3683
+ id
3684
+ );
3685
+ if (edge.label) {
3686
+ await insertEdgeLabel(elem, {
3687
+ ...edge,
3688
+ label: edge.label,
3689
+ labelStyle: "stroke: #333; stroke-width: 1.5px;fill:none;",
3690
+ arrowTypeEnd: edge.arrowTypeEnd,
3691
+ arrowTypeStart: edge.arrowTypeStart,
3692
+ points,
3693
+ classes: "edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"
3694
+ });
3695
+ positionEdgeLabel(
3696
+ { ...edge, x: points[1].x, y: points[1].y },
3697
+ {
3698
+ originalPath: points
3699
+ }
3700
+ );
3701
+ }
3702
+ }
3703
+ }
3704
+ }
3705
+ }
3706
+ __name(insertEdges, "insertEdges");
3707
+ var getClasses2 = /* @__PURE__ */ __name(function(text, diagObj) {
3708
+ return diagObj.db.getClasses();
3709
+ }, "getClasses");
3710
+ var draw = /* @__PURE__ */ __name(async function(text, id, _version, diagObj) {
3711
+ const { securityLevel, block: conf } = getConfig();
3712
+ const db2 = diagObj.db;
3713
+ let sandboxElement;
3714
+ if (securityLevel === "sandbox") {
3715
+ sandboxElement = select("#i" + id);
3716
+ }
3717
+ const root = securityLevel === "sandbox" ? select(sandboxElement.nodes()[0].contentDocument.body) : select("body");
3718
+ const svg = securityLevel === "sandbox" ? root.select(`[id="${id}"]`) : select(`[id="${id}"]`);
3719
+ const markers2 = ["point", "circle", "cross"];
3720
+ markers_default(svg, markers2, diagObj.type, id);
3721
+ const bl = db2.getBlocks();
3722
+ const blArr = db2.getBlocksFlat();
3723
+ const edges = db2.getEdges();
3724
+ const nodes = svg.insert("g").attr("class", "block");
3725
+ await calculateBlockSizes(nodes, bl, db2);
3726
+ const bounds = layout(db2);
3727
+ await insertBlocks(nodes, bl, db2);
3728
+ await insertEdges(nodes, edges, blArr, db2, id);
3729
+ if (bounds) {
3730
+ const bounds2 = bounds;
3731
+ const magicFactor = Math.max(1, Math.round(0.125 * (bounds2.width / bounds2.height)));
3732
+ const height = bounds2.height + magicFactor + 10;
3733
+ const width = bounds2.width + 10;
3734
+ const { useMaxWidth } = conf;
3735
+ configureSvgSize(svg, height, width, !!useMaxWidth);
3736
+ log.debug("Here Bounds", bounds, bounds2);
3737
+ svg.attr(
3738
+ "viewBox",
3739
+ `${bounds2.x - 5} ${bounds2.y - 5} ${bounds2.width + 10} ${bounds2.height + 10}`
3740
+ );
3741
+ }
3742
+ }, "draw");
3743
+ var blockRenderer_default = {
3744
+ draw,
3745
+ getClasses: getClasses2
3746
+ };
3747
+ var diagram = {
3748
+ parser: block_default,
3749
+ db: blockDB_default,
3750
+ renderer: blockRenderer_default,
3751
+ styles: styles_default
3752
+ };
3753
+ export {
3754
+ diagram
3755
+ };
3756
+ //# sourceMappingURL=blockDiagram-VD42YOAC-B9MtQVc8.js.map