@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,1919 @@
1
+ import * as _ from "lodash-es";
2
+ import { G as Graph } from "./graph-DH3cnEko.js";
3
+ class List {
4
+ constructor() {
5
+ var sentinel = {};
6
+ sentinel._next = sentinel._prev = sentinel;
7
+ this._sentinel = sentinel;
8
+ }
9
+ dequeue() {
10
+ var sentinel = this._sentinel;
11
+ var entry = sentinel._prev;
12
+ if (entry !== sentinel) {
13
+ unlink(entry);
14
+ return entry;
15
+ }
16
+ }
17
+ enqueue(entry) {
18
+ var sentinel = this._sentinel;
19
+ if (entry._prev && entry._next) {
20
+ unlink(entry);
21
+ }
22
+ entry._next = sentinel._next;
23
+ sentinel._next._prev = entry;
24
+ sentinel._next = entry;
25
+ entry._prev = sentinel;
26
+ }
27
+ toString() {
28
+ var strs = [];
29
+ var sentinel = this._sentinel;
30
+ var curr = sentinel._prev;
31
+ while (curr !== sentinel) {
32
+ strs.push(JSON.stringify(curr, filterOutLinks));
33
+ curr = curr._prev;
34
+ }
35
+ return "[" + strs.join(", ") + "]";
36
+ }
37
+ }
38
+ function unlink(entry) {
39
+ entry._prev._next = entry._next;
40
+ entry._next._prev = entry._prev;
41
+ delete entry._next;
42
+ delete entry._prev;
43
+ }
44
+ function filterOutLinks(k, v) {
45
+ if (k !== "_next" && k !== "_prev") {
46
+ return v;
47
+ }
48
+ }
49
+ var DEFAULT_WEIGHT_FN = _.constant(1);
50
+ function greedyFAS(g, weightFn) {
51
+ if (g.nodeCount() <= 1) {
52
+ return [];
53
+ }
54
+ var state = buildState(g, weightFn || DEFAULT_WEIGHT_FN);
55
+ var results = doGreedyFAS(state.graph, state.buckets, state.zeroIdx);
56
+ return _.flatten(
57
+ _.map(results, function(e) {
58
+ return g.outEdges(e.v, e.w);
59
+ })
60
+ );
61
+ }
62
+ function doGreedyFAS(g, buckets, zeroIdx) {
63
+ var results = [];
64
+ var sources = buckets[buckets.length - 1];
65
+ var sinks = buckets[0];
66
+ var entry;
67
+ while (g.nodeCount()) {
68
+ while (entry = sinks.dequeue()) {
69
+ removeNode(g, buckets, zeroIdx, entry);
70
+ }
71
+ while (entry = sources.dequeue()) {
72
+ removeNode(g, buckets, zeroIdx, entry);
73
+ }
74
+ if (g.nodeCount()) {
75
+ for (var i = buckets.length - 2; i > 0; --i) {
76
+ entry = buckets[i].dequeue();
77
+ if (entry) {
78
+ results = results.concat(removeNode(g, buckets, zeroIdx, entry, true));
79
+ break;
80
+ }
81
+ }
82
+ }
83
+ }
84
+ return results;
85
+ }
86
+ function removeNode(g, buckets, zeroIdx, entry, collectPredecessors) {
87
+ var results = collectPredecessors ? [] : void 0;
88
+ _.forEach(g.inEdges(entry.v), function(edge) {
89
+ var weight = g.edge(edge);
90
+ var uEntry = g.node(edge.v);
91
+ if (collectPredecessors) {
92
+ results.push({ v: edge.v, w: edge.w });
93
+ }
94
+ uEntry.out -= weight;
95
+ assignBucket(buckets, zeroIdx, uEntry);
96
+ });
97
+ _.forEach(g.outEdges(entry.v), function(edge) {
98
+ var weight = g.edge(edge);
99
+ var w = edge.w;
100
+ var wEntry = g.node(w);
101
+ wEntry["in"] -= weight;
102
+ assignBucket(buckets, zeroIdx, wEntry);
103
+ });
104
+ g.removeNode(entry.v);
105
+ return results;
106
+ }
107
+ function buildState(g, weightFn) {
108
+ var fasGraph = new Graph();
109
+ var maxIn = 0;
110
+ var maxOut = 0;
111
+ _.forEach(g.nodes(), function(v) {
112
+ fasGraph.setNode(v, { v, in: 0, out: 0 });
113
+ });
114
+ _.forEach(g.edges(), function(e) {
115
+ var prevWeight = fasGraph.edge(e.v, e.w) || 0;
116
+ var weight = weightFn(e);
117
+ var edgeWeight = prevWeight + weight;
118
+ fasGraph.setEdge(e.v, e.w, edgeWeight);
119
+ maxOut = Math.max(maxOut, fasGraph.node(e.v).out += weight);
120
+ maxIn = Math.max(maxIn, fasGraph.node(e.w)["in"] += weight);
121
+ });
122
+ var buckets = _.range(maxOut + maxIn + 3).map(function() {
123
+ return new List();
124
+ });
125
+ var zeroIdx = maxIn + 1;
126
+ _.forEach(fasGraph.nodes(), function(v) {
127
+ assignBucket(buckets, zeroIdx, fasGraph.node(v));
128
+ });
129
+ return { graph: fasGraph, buckets, zeroIdx };
130
+ }
131
+ function assignBucket(buckets, zeroIdx, entry) {
132
+ if (!entry.out) {
133
+ buckets[0].enqueue(entry);
134
+ } else if (!entry["in"]) {
135
+ buckets[buckets.length - 1].enqueue(entry);
136
+ } else {
137
+ buckets[entry.out - entry["in"] + zeroIdx].enqueue(entry);
138
+ }
139
+ }
140
+ function run$2(g) {
141
+ var fas = g.graph().acyclicer === "greedy" ? greedyFAS(g, weightFn(g)) : dfsFAS(g);
142
+ _.forEach(fas, function(e) {
143
+ var label = g.edge(e);
144
+ g.removeEdge(e);
145
+ label.forwardName = e.name;
146
+ label.reversed = true;
147
+ g.setEdge(e.w, e.v, label, _.uniqueId("rev"));
148
+ });
149
+ function weightFn(g2) {
150
+ return function(e) {
151
+ return g2.edge(e).weight;
152
+ };
153
+ }
154
+ }
155
+ function dfsFAS(g) {
156
+ var fas = [];
157
+ var stack = {};
158
+ var visited = {};
159
+ function dfs2(v) {
160
+ if (Object.prototype.hasOwnProperty.call(visited, v)) {
161
+ return;
162
+ }
163
+ visited[v] = true;
164
+ stack[v] = true;
165
+ _.forEach(g.outEdges(v), function(e) {
166
+ if (Object.prototype.hasOwnProperty.call(stack, e.w)) {
167
+ fas.push(e);
168
+ } else {
169
+ dfs2(e.w);
170
+ }
171
+ });
172
+ delete stack[v];
173
+ }
174
+ _.forEach(g.nodes(), dfs2);
175
+ return fas;
176
+ }
177
+ function undo$2(g) {
178
+ _.forEach(g.edges(), function(e) {
179
+ var label = g.edge(e);
180
+ if (label.reversed) {
181
+ g.removeEdge(e);
182
+ var forwardName = label.forwardName;
183
+ delete label.reversed;
184
+ delete label.forwardName;
185
+ g.setEdge(e.w, e.v, label, forwardName);
186
+ }
187
+ });
188
+ }
189
+ function addDummyNode(g, type, attrs, name) {
190
+ var v;
191
+ do {
192
+ v = _.uniqueId(name);
193
+ } while (g.hasNode(v));
194
+ attrs.dummy = type;
195
+ g.setNode(v, attrs);
196
+ return v;
197
+ }
198
+ function simplify(g) {
199
+ var simplified = new Graph().setGraph(g.graph());
200
+ _.forEach(g.nodes(), function(v) {
201
+ simplified.setNode(v, g.node(v));
202
+ });
203
+ _.forEach(g.edges(), function(e) {
204
+ var simpleLabel = simplified.edge(e.v, e.w) || { weight: 0, minlen: 1 };
205
+ var label = g.edge(e);
206
+ simplified.setEdge(e.v, e.w, {
207
+ weight: simpleLabel.weight + label.weight,
208
+ minlen: Math.max(simpleLabel.minlen, label.minlen)
209
+ });
210
+ });
211
+ return simplified;
212
+ }
213
+ function asNonCompoundGraph(g) {
214
+ var simplified = new Graph({ multigraph: g.isMultigraph() }).setGraph(g.graph());
215
+ _.forEach(g.nodes(), function(v) {
216
+ if (!g.children(v).length) {
217
+ simplified.setNode(v, g.node(v));
218
+ }
219
+ });
220
+ _.forEach(g.edges(), function(e) {
221
+ simplified.setEdge(e, g.edge(e));
222
+ });
223
+ return simplified;
224
+ }
225
+ function intersectRect(rect, point) {
226
+ var x = rect.x;
227
+ var y = rect.y;
228
+ var dx = point.x - x;
229
+ var dy = point.y - y;
230
+ var w = rect.width / 2;
231
+ var h = rect.height / 2;
232
+ if (!dx && !dy) {
233
+ throw new Error("Not possible to find intersection inside of the rectangle");
234
+ }
235
+ var sx, sy;
236
+ if (Math.abs(dy) * w > Math.abs(dx) * h) {
237
+ if (dy < 0) {
238
+ h = -h;
239
+ }
240
+ sx = h * dx / dy;
241
+ sy = h;
242
+ } else {
243
+ if (dx < 0) {
244
+ w = -w;
245
+ }
246
+ sx = w;
247
+ sy = w * dy / dx;
248
+ }
249
+ return { x: x + sx, y: y + sy };
250
+ }
251
+ function buildLayerMatrix(g) {
252
+ var layering = _.map(_.range(maxRank(g) + 1), function() {
253
+ return [];
254
+ });
255
+ _.forEach(g.nodes(), function(v) {
256
+ var node = g.node(v);
257
+ var rank2 = node.rank;
258
+ if (!_.isUndefined(rank2)) {
259
+ layering[rank2][node.order] = v;
260
+ }
261
+ });
262
+ return layering;
263
+ }
264
+ function normalizeRanks(g) {
265
+ var min = _.min(
266
+ _.map(g.nodes(), function(v) {
267
+ return g.node(v).rank;
268
+ })
269
+ );
270
+ _.forEach(g.nodes(), function(v) {
271
+ var node = g.node(v);
272
+ if (_.has(node, "rank")) {
273
+ node.rank -= min;
274
+ }
275
+ });
276
+ }
277
+ function removeEmptyRanks(g) {
278
+ var offset = _.min(
279
+ _.map(g.nodes(), function(v) {
280
+ return g.node(v).rank;
281
+ })
282
+ );
283
+ var layers = [];
284
+ _.forEach(g.nodes(), function(v) {
285
+ var rank2 = g.node(v).rank - offset;
286
+ if (!layers[rank2]) {
287
+ layers[rank2] = [];
288
+ }
289
+ layers[rank2].push(v);
290
+ });
291
+ var delta = 0;
292
+ var nodeRankFactor = g.graph().nodeRankFactor;
293
+ _.forEach(layers, function(vs, i) {
294
+ if (_.isUndefined(vs) && i % nodeRankFactor !== 0) {
295
+ --delta;
296
+ } else if (delta) {
297
+ _.forEach(vs, function(v) {
298
+ g.node(v).rank += delta;
299
+ });
300
+ }
301
+ });
302
+ }
303
+ function addBorderNode$1(g, prefix, rank2, order2) {
304
+ var node = {
305
+ width: 0,
306
+ height: 0
307
+ };
308
+ if (arguments.length >= 4) {
309
+ node.rank = rank2;
310
+ node.order = order2;
311
+ }
312
+ return addDummyNode(g, "border", node, prefix);
313
+ }
314
+ function maxRank(g) {
315
+ return _.max(
316
+ _.map(g.nodes(), function(v) {
317
+ var rank2 = g.node(v).rank;
318
+ if (!_.isUndefined(rank2)) {
319
+ return rank2;
320
+ }
321
+ })
322
+ );
323
+ }
324
+ function partition(collection, fn) {
325
+ var result = { lhs: [], rhs: [] };
326
+ _.forEach(collection, function(value) {
327
+ if (fn(value)) {
328
+ result.lhs.push(value);
329
+ } else {
330
+ result.rhs.push(value);
331
+ }
332
+ });
333
+ return result;
334
+ }
335
+ function notime(name, fn) {
336
+ return fn();
337
+ }
338
+ function addBorderSegments(g) {
339
+ function dfs2(v) {
340
+ var children = g.children(v);
341
+ var node = g.node(v);
342
+ if (children.length) {
343
+ _.forEach(children, dfs2);
344
+ }
345
+ if (Object.prototype.hasOwnProperty.call(node, "minRank")) {
346
+ node.borderLeft = [];
347
+ node.borderRight = [];
348
+ for (var rank2 = node.minRank, maxRank2 = node.maxRank + 1; rank2 < maxRank2; ++rank2) {
349
+ addBorderNode(g, "borderLeft", "_bl", v, node, rank2);
350
+ addBorderNode(g, "borderRight", "_br", v, node, rank2);
351
+ }
352
+ }
353
+ }
354
+ _.forEach(g.children(), dfs2);
355
+ }
356
+ function addBorderNode(g, prop, prefix, sg, sgNode, rank2) {
357
+ var label = { width: 0, height: 0, rank: rank2, borderType: prop };
358
+ var prev = sgNode[prop][rank2 - 1];
359
+ var curr = addDummyNode(g, "border", label, prefix);
360
+ sgNode[prop][rank2] = curr;
361
+ g.setParent(curr, sg);
362
+ if (prev) {
363
+ g.setEdge(prev, curr, { weight: 1 });
364
+ }
365
+ }
366
+ function adjust(g) {
367
+ var rankDir = g.graph().rankdir.toLowerCase();
368
+ if (rankDir === "lr" || rankDir === "rl") {
369
+ swapWidthHeight(g);
370
+ }
371
+ }
372
+ function undo$1(g) {
373
+ var rankDir = g.graph().rankdir.toLowerCase();
374
+ if (rankDir === "bt" || rankDir === "rl") {
375
+ reverseY(g);
376
+ }
377
+ if (rankDir === "lr" || rankDir === "rl") {
378
+ swapXY(g);
379
+ swapWidthHeight(g);
380
+ }
381
+ }
382
+ function swapWidthHeight(g) {
383
+ _.forEach(g.nodes(), function(v) {
384
+ swapWidthHeightOne(g.node(v));
385
+ });
386
+ _.forEach(g.edges(), function(e) {
387
+ swapWidthHeightOne(g.edge(e));
388
+ });
389
+ }
390
+ function swapWidthHeightOne(attrs) {
391
+ var w = attrs.width;
392
+ attrs.width = attrs.height;
393
+ attrs.height = w;
394
+ }
395
+ function reverseY(g) {
396
+ _.forEach(g.nodes(), function(v) {
397
+ reverseYOne(g.node(v));
398
+ });
399
+ _.forEach(g.edges(), function(e) {
400
+ var edge = g.edge(e);
401
+ _.forEach(edge.points, reverseYOne);
402
+ if (Object.prototype.hasOwnProperty.call(edge, "y")) {
403
+ reverseYOne(edge);
404
+ }
405
+ });
406
+ }
407
+ function reverseYOne(attrs) {
408
+ attrs.y = -attrs.y;
409
+ }
410
+ function swapXY(g) {
411
+ _.forEach(g.nodes(), function(v) {
412
+ swapXYOne(g.node(v));
413
+ });
414
+ _.forEach(g.edges(), function(e) {
415
+ var edge = g.edge(e);
416
+ _.forEach(edge.points, swapXYOne);
417
+ if (Object.prototype.hasOwnProperty.call(edge, "x")) {
418
+ swapXYOne(edge);
419
+ }
420
+ });
421
+ }
422
+ function swapXYOne(attrs) {
423
+ var x = attrs.x;
424
+ attrs.x = attrs.y;
425
+ attrs.y = x;
426
+ }
427
+ function run$1(g) {
428
+ g.graph().dummyChains = [];
429
+ _.forEach(g.edges(), function(edge) {
430
+ normalizeEdge(g, edge);
431
+ });
432
+ }
433
+ function normalizeEdge(g, e) {
434
+ var v = e.v;
435
+ var vRank = g.node(v).rank;
436
+ var w = e.w;
437
+ var wRank = g.node(w).rank;
438
+ var name = e.name;
439
+ var edgeLabel = g.edge(e);
440
+ var labelRank = edgeLabel.labelRank;
441
+ if (wRank === vRank + 1) return;
442
+ g.removeEdge(e);
443
+ var attrs = void 0;
444
+ var dummy, i;
445
+ for (i = 0, ++vRank; vRank < wRank; ++i, ++vRank) {
446
+ edgeLabel.points = [];
447
+ attrs = {
448
+ width: 0,
449
+ height: 0,
450
+ edgeLabel,
451
+ edgeObj: e,
452
+ rank: vRank
453
+ };
454
+ dummy = addDummyNode(g, "edge", attrs, "_d");
455
+ if (vRank === labelRank) {
456
+ attrs.width = edgeLabel.width;
457
+ attrs.height = edgeLabel.height;
458
+ attrs.dummy = "edge-label";
459
+ attrs.labelpos = edgeLabel.labelpos;
460
+ }
461
+ g.setEdge(v, dummy, { weight: edgeLabel.weight }, name);
462
+ if (i === 0) {
463
+ g.graph().dummyChains.push(dummy);
464
+ }
465
+ v = dummy;
466
+ }
467
+ g.setEdge(v, w, { weight: edgeLabel.weight }, name);
468
+ }
469
+ function undo(g) {
470
+ _.forEach(g.graph().dummyChains, function(v) {
471
+ var node = g.node(v);
472
+ var origLabel = node.edgeLabel;
473
+ var w;
474
+ g.setEdge(node.edgeObj, origLabel);
475
+ while (node.dummy) {
476
+ w = g.successors(v)[0];
477
+ g.removeNode(v);
478
+ origLabel.points.push({ x: node.x, y: node.y });
479
+ if (node.dummy === "edge-label") {
480
+ origLabel.x = node.x;
481
+ origLabel.y = node.y;
482
+ origLabel.width = node.width;
483
+ origLabel.height = node.height;
484
+ }
485
+ v = w;
486
+ node = g.node(v);
487
+ }
488
+ });
489
+ }
490
+ function longestPath(g) {
491
+ var visited = {};
492
+ function dfs2(v) {
493
+ var label = g.node(v);
494
+ if (Object.prototype.hasOwnProperty.call(visited, v)) {
495
+ return label.rank;
496
+ }
497
+ visited[v] = true;
498
+ var rank2 = _.min(
499
+ _.map(g.outEdges(v), function(e) {
500
+ return dfs2(e.w) - g.edge(e).minlen;
501
+ })
502
+ );
503
+ if (rank2 === Number.POSITIVE_INFINITY || // return value of _.map([]) for Lodash 3
504
+ rank2 === void 0 || // return value of _.map([]) for Lodash 4
505
+ rank2 === null) {
506
+ rank2 = 0;
507
+ }
508
+ return label.rank = rank2;
509
+ }
510
+ _.forEach(g.sources(), dfs2);
511
+ }
512
+ function slack(g, e) {
513
+ return g.node(e.w).rank - g.node(e.v).rank - g.edge(e).minlen;
514
+ }
515
+ function feasibleTree(g) {
516
+ var t = new Graph({ directed: false });
517
+ var start = g.nodes()[0];
518
+ var size = g.nodeCount();
519
+ t.setNode(start, {});
520
+ var edge, delta;
521
+ while (tightTree(t, g) < size) {
522
+ edge = findMinSlackEdge(t, g);
523
+ delta = t.hasNode(edge.v) ? slack(g, edge) : -slack(g, edge);
524
+ shiftRanks(t, g, delta);
525
+ }
526
+ return t;
527
+ }
528
+ function tightTree(t, g) {
529
+ function dfs2(v) {
530
+ _.forEach(g.nodeEdges(v), function(e) {
531
+ var edgeV = e.v, w = v === edgeV ? e.w : edgeV;
532
+ if (!t.hasNode(w) && !slack(g, e)) {
533
+ t.setNode(w, {});
534
+ t.setEdge(v, w, {});
535
+ dfs2(w);
536
+ }
537
+ });
538
+ }
539
+ _.forEach(t.nodes(), dfs2);
540
+ return t.nodeCount();
541
+ }
542
+ function findMinSlackEdge(t, g) {
543
+ return _.minBy(g.edges(), function(e) {
544
+ if (t.hasNode(e.v) !== t.hasNode(e.w)) {
545
+ return slack(g, e);
546
+ }
547
+ });
548
+ }
549
+ function shiftRanks(t, g, delta) {
550
+ _.forEach(t.nodes(), function(v) {
551
+ g.node(v).rank += delta;
552
+ });
553
+ }
554
+ _.constant(1);
555
+ _.constant(1);
556
+ function CycleException() {
557
+ }
558
+ CycleException.prototype = new Error();
559
+ function dfs$1(g, vs, order2) {
560
+ if (!_.isArray(vs)) {
561
+ vs = [vs];
562
+ }
563
+ var navigation = (g.isDirected() ? g.successors : g.neighbors).bind(g);
564
+ var acc = [];
565
+ var visited = {};
566
+ _.each(vs, function(v) {
567
+ if (!g.hasNode(v)) {
568
+ throw new Error("Graph does not have node: " + v);
569
+ }
570
+ doDfs(g, v, order2 === "post", visited, navigation, acc);
571
+ });
572
+ return acc;
573
+ }
574
+ function doDfs(g, v, postorder2, visited, navigation, acc) {
575
+ if (!Object.prototype.hasOwnProperty.call(visited, v)) {
576
+ visited[v] = true;
577
+ if (!postorder2) {
578
+ acc.push(v);
579
+ }
580
+ _.each(navigation(v), function(w) {
581
+ doDfs(g, w, postorder2, visited, navigation, acc);
582
+ });
583
+ if (postorder2) {
584
+ acc.push(v);
585
+ }
586
+ }
587
+ }
588
+ function postorder$1(g, vs) {
589
+ return dfs$1(g, vs, "post");
590
+ }
591
+ function preorder(g, vs) {
592
+ return dfs$1(g, vs, "pre");
593
+ }
594
+ networkSimplex.initLowLimValues = initLowLimValues;
595
+ networkSimplex.initCutValues = initCutValues;
596
+ networkSimplex.calcCutValue = calcCutValue;
597
+ networkSimplex.leaveEdge = leaveEdge;
598
+ networkSimplex.enterEdge = enterEdge;
599
+ networkSimplex.exchangeEdges = exchangeEdges;
600
+ function networkSimplex(g) {
601
+ g = simplify(g);
602
+ longestPath(g);
603
+ var t = feasibleTree(g);
604
+ initLowLimValues(t);
605
+ initCutValues(t, g);
606
+ var e, f;
607
+ while (e = leaveEdge(t)) {
608
+ f = enterEdge(t, g, e);
609
+ exchangeEdges(t, g, e, f);
610
+ }
611
+ }
612
+ function initCutValues(t, g) {
613
+ var vs = postorder$1(t, t.nodes());
614
+ vs = vs.slice(0, vs.length - 1);
615
+ _.forEach(vs, function(v) {
616
+ assignCutValue(t, g, v);
617
+ });
618
+ }
619
+ function assignCutValue(t, g, child) {
620
+ var childLab = t.node(child);
621
+ var parent = childLab.parent;
622
+ t.edge(child, parent).cutvalue = calcCutValue(t, g, child);
623
+ }
624
+ function calcCutValue(t, g, child) {
625
+ var childLab = t.node(child);
626
+ var parent = childLab.parent;
627
+ var childIsTail = true;
628
+ var graphEdge = g.edge(child, parent);
629
+ var cutValue = 0;
630
+ if (!graphEdge) {
631
+ childIsTail = false;
632
+ graphEdge = g.edge(parent, child);
633
+ }
634
+ cutValue = graphEdge.weight;
635
+ _.forEach(g.nodeEdges(child), function(e) {
636
+ var isOutEdge = e.v === child, other = isOutEdge ? e.w : e.v;
637
+ if (other !== parent) {
638
+ var pointsToHead = isOutEdge === childIsTail, otherWeight = g.edge(e).weight;
639
+ cutValue += pointsToHead ? otherWeight : -otherWeight;
640
+ if (isTreeEdge(t, child, other)) {
641
+ var otherCutValue = t.edge(child, other).cutvalue;
642
+ cutValue += pointsToHead ? -otherCutValue : otherCutValue;
643
+ }
644
+ }
645
+ });
646
+ return cutValue;
647
+ }
648
+ function initLowLimValues(tree, root) {
649
+ if (arguments.length < 2) {
650
+ root = tree.nodes()[0];
651
+ }
652
+ dfsAssignLowLim(tree, {}, 1, root);
653
+ }
654
+ function dfsAssignLowLim(tree, visited, nextLim, v, parent) {
655
+ var low = nextLim;
656
+ var label = tree.node(v);
657
+ visited[v] = true;
658
+ _.forEach(tree.neighbors(v), function(w) {
659
+ if (!Object.prototype.hasOwnProperty.call(visited, w)) {
660
+ nextLim = dfsAssignLowLim(tree, visited, nextLim, w, v);
661
+ }
662
+ });
663
+ label.low = low;
664
+ label.lim = nextLim++;
665
+ if (parent) {
666
+ label.parent = parent;
667
+ } else {
668
+ delete label.parent;
669
+ }
670
+ return nextLim;
671
+ }
672
+ function leaveEdge(tree) {
673
+ return _.find(tree.edges(), function(e) {
674
+ return tree.edge(e).cutvalue < 0;
675
+ });
676
+ }
677
+ function enterEdge(t, g, edge) {
678
+ var v = edge.v;
679
+ var w = edge.w;
680
+ if (!g.hasEdge(v, w)) {
681
+ v = edge.w;
682
+ w = edge.v;
683
+ }
684
+ var vLabel = t.node(v);
685
+ var wLabel = t.node(w);
686
+ var tailLabel = vLabel;
687
+ var flip = false;
688
+ if (vLabel.lim > wLabel.lim) {
689
+ tailLabel = wLabel;
690
+ flip = true;
691
+ }
692
+ var candidates = _.filter(g.edges(), function(edge2) {
693
+ return flip === isDescendant(t, t.node(edge2.v), tailLabel) && flip !== isDescendant(t, t.node(edge2.w), tailLabel);
694
+ });
695
+ return _.minBy(candidates, function(edge2) {
696
+ return slack(g, edge2);
697
+ });
698
+ }
699
+ function exchangeEdges(t, g, e, f) {
700
+ var v = e.v;
701
+ var w = e.w;
702
+ t.removeEdge(v, w);
703
+ t.setEdge(f.v, f.w, {});
704
+ initLowLimValues(t);
705
+ initCutValues(t, g);
706
+ updateRanks(t, g);
707
+ }
708
+ function updateRanks(t, g) {
709
+ var root = _.find(t.nodes(), function(v) {
710
+ return !g.node(v).parent;
711
+ });
712
+ var vs = preorder(t, root);
713
+ vs = vs.slice(1);
714
+ _.forEach(vs, function(v) {
715
+ var parent = t.node(v).parent, edge = g.edge(v, parent), flipped = false;
716
+ if (!edge) {
717
+ edge = g.edge(parent, v);
718
+ flipped = true;
719
+ }
720
+ g.node(v).rank = g.node(parent).rank + (flipped ? edge.minlen : -edge.minlen);
721
+ });
722
+ }
723
+ function isTreeEdge(tree, u, v) {
724
+ return tree.hasEdge(u, v);
725
+ }
726
+ function isDescendant(tree, vLabel, rootLabel) {
727
+ return rootLabel.low <= vLabel.lim && vLabel.lim <= rootLabel.lim;
728
+ }
729
+ function rank(g) {
730
+ switch (g.graph().ranker) {
731
+ case "network-simplex":
732
+ networkSimplexRanker(g);
733
+ break;
734
+ case "tight-tree":
735
+ tightTreeRanker(g);
736
+ break;
737
+ case "longest-path":
738
+ longestPathRanker(g);
739
+ break;
740
+ default:
741
+ networkSimplexRanker(g);
742
+ }
743
+ }
744
+ var longestPathRanker = longestPath;
745
+ function tightTreeRanker(g) {
746
+ longestPath(g);
747
+ feasibleTree(g);
748
+ }
749
+ function networkSimplexRanker(g) {
750
+ networkSimplex(g);
751
+ }
752
+ function run(g) {
753
+ var root = addDummyNode(g, "root", {}, "_root");
754
+ var depths = treeDepths(g);
755
+ var height = _.max(_.values(depths)) - 1;
756
+ var nodeSep = 2 * height + 1;
757
+ g.graph().nestingRoot = root;
758
+ _.forEach(g.edges(), function(e) {
759
+ g.edge(e).minlen *= nodeSep;
760
+ });
761
+ var weight = sumWeights(g) + 1;
762
+ _.forEach(g.children(), function(child) {
763
+ dfs(g, root, nodeSep, weight, height, depths, child);
764
+ });
765
+ g.graph().nodeRankFactor = nodeSep;
766
+ }
767
+ function dfs(g, root, nodeSep, weight, height, depths, v) {
768
+ var children = g.children(v);
769
+ if (!children.length) {
770
+ if (v !== root) {
771
+ g.setEdge(root, v, { weight: 0, minlen: nodeSep });
772
+ }
773
+ return;
774
+ }
775
+ var top = addBorderNode$1(g, "_bt");
776
+ var bottom = addBorderNode$1(g, "_bb");
777
+ var label = g.node(v);
778
+ g.setParent(top, v);
779
+ label.borderTop = top;
780
+ g.setParent(bottom, v);
781
+ label.borderBottom = bottom;
782
+ _.forEach(children, function(child) {
783
+ dfs(g, root, nodeSep, weight, height, depths, child);
784
+ var childNode = g.node(child);
785
+ var childTop = childNode.borderTop ? childNode.borderTop : child;
786
+ var childBottom = childNode.borderBottom ? childNode.borderBottom : child;
787
+ var thisWeight = childNode.borderTop ? weight : 2 * weight;
788
+ var minlen = childTop !== childBottom ? 1 : height - depths[v] + 1;
789
+ g.setEdge(top, childTop, {
790
+ weight: thisWeight,
791
+ minlen,
792
+ nestingEdge: true
793
+ });
794
+ g.setEdge(childBottom, bottom, {
795
+ weight: thisWeight,
796
+ minlen,
797
+ nestingEdge: true
798
+ });
799
+ });
800
+ if (!g.parent(v)) {
801
+ g.setEdge(root, top, { weight: 0, minlen: height + depths[v] });
802
+ }
803
+ }
804
+ function treeDepths(g) {
805
+ var depths = {};
806
+ function dfs2(v, depth) {
807
+ var children = g.children(v);
808
+ if (children && children.length) {
809
+ _.forEach(children, function(child) {
810
+ dfs2(child, depth + 1);
811
+ });
812
+ }
813
+ depths[v] = depth;
814
+ }
815
+ _.forEach(g.children(), function(v) {
816
+ dfs2(v, 1);
817
+ });
818
+ return depths;
819
+ }
820
+ function sumWeights(g) {
821
+ return _.reduce(
822
+ g.edges(),
823
+ function(acc, e) {
824
+ return acc + g.edge(e).weight;
825
+ },
826
+ 0
827
+ );
828
+ }
829
+ function cleanup(g) {
830
+ var graphLabel = g.graph();
831
+ g.removeNode(graphLabel.nestingRoot);
832
+ delete graphLabel.nestingRoot;
833
+ _.forEach(g.edges(), function(e) {
834
+ var edge = g.edge(e);
835
+ if (edge.nestingEdge) {
836
+ g.removeEdge(e);
837
+ }
838
+ });
839
+ }
840
+ function addSubgraphConstraints(g, cg, vs) {
841
+ var prev = {}, rootPrev;
842
+ _.forEach(vs, function(v) {
843
+ var child = g.parent(v), parent, prevChild;
844
+ while (child) {
845
+ parent = g.parent(child);
846
+ if (parent) {
847
+ prevChild = prev[parent];
848
+ prev[parent] = child;
849
+ } else {
850
+ prevChild = rootPrev;
851
+ rootPrev = child;
852
+ }
853
+ if (prevChild && prevChild !== child) {
854
+ cg.setEdge(prevChild, child);
855
+ return;
856
+ }
857
+ child = parent;
858
+ }
859
+ });
860
+ }
861
+ function buildLayerGraph(g, rank2, relationship) {
862
+ var root = createRootNode(g), result = new Graph({ compound: true }).setGraph({ root }).setDefaultNodeLabel(function(v) {
863
+ return g.node(v);
864
+ });
865
+ _.forEach(g.nodes(), function(v) {
866
+ var node = g.node(v), parent = g.parent(v);
867
+ if (node.rank === rank2 || node.minRank <= rank2 && rank2 <= node.maxRank) {
868
+ result.setNode(v);
869
+ result.setParent(v, parent || root);
870
+ _.forEach(g[relationship](v), function(e) {
871
+ var u = e.v === v ? e.w : e.v, edge = result.edge(u, v), weight = !_.isUndefined(edge) ? edge.weight : 0;
872
+ result.setEdge(u, v, { weight: g.edge(e).weight + weight });
873
+ });
874
+ if (Object.prototype.hasOwnProperty.call(node, "minRank")) {
875
+ result.setNode(v, {
876
+ borderLeft: node.borderLeft[rank2],
877
+ borderRight: node.borderRight[rank2]
878
+ });
879
+ }
880
+ }
881
+ });
882
+ return result;
883
+ }
884
+ function createRootNode(g) {
885
+ var v;
886
+ while (g.hasNode(v = _.uniqueId("_root"))) ;
887
+ return v;
888
+ }
889
+ function crossCount(g, layering) {
890
+ var cc = 0;
891
+ for (var i = 1; i < layering.length; ++i) {
892
+ cc += twoLayerCrossCount(g, layering[i - 1], layering[i]);
893
+ }
894
+ return cc;
895
+ }
896
+ function twoLayerCrossCount(g, northLayer, southLayer) {
897
+ var southPos = _.zipObject(
898
+ southLayer,
899
+ _.map(southLayer, function(v, i) {
900
+ return i;
901
+ })
902
+ );
903
+ var southEntries = _.flatten(
904
+ _.map(northLayer, function(v) {
905
+ return _.sortBy(
906
+ _.map(g.outEdges(v), function(e) {
907
+ return { pos: southPos[e.w], weight: g.edge(e).weight };
908
+ }),
909
+ "pos"
910
+ );
911
+ })
912
+ );
913
+ var firstIndex = 1;
914
+ while (firstIndex < southLayer.length) firstIndex <<= 1;
915
+ var treeSize = 2 * firstIndex - 1;
916
+ firstIndex -= 1;
917
+ var tree = _.map(new Array(treeSize), function() {
918
+ return 0;
919
+ });
920
+ var cc = 0;
921
+ _.forEach(
922
+ // @ts-expect-error
923
+ southEntries.forEach(function(entry) {
924
+ var index = entry.pos + firstIndex;
925
+ tree[index] += entry.weight;
926
+ var weightSum = 0;
927
+ while (index > 0) {
928
+ if (index % 2) {
929
+ weightSum += tree[index + 1];
930
+ }
931
+ index = index - 1 >> 1;
932
+ tree[index] += entry.weight;
933
+ }
934
+ cc += entry.weight * weightSum;
935
+ })
936
+ );
937
+ return cc;
938
+ }
939
+ function initOrder(g) {
940
+ var visited = {};
941
+ var simpleNodes = _.filter(g.nodes(), function(v) {
942
+ return !g.children(v).length;
943
+ });
944
+ var maxRank2 = _.max(
945
+ _.map(simpleNodes, function(v) {
946
+ return g.node(v).rank;
947
+ })
948
+ );
949
+ var layers = _.map(_.range(maxRank2 + 1), function() {
950
+ return [];
951
+ });
952
+ function dfs2(v) {
953
+ if (_.has(visited, v)) return;
954
+ visited[v] = true;
955
+ var node = g.node(v);
956
+ layers[node.rank].push(v);
957
+ _.forEach(g.successors(v), dfs2);
958
+ }
959
+ var orderedVs = _.sortBy(simpleNodes, function(v) {
960
+ return g.node(v).rank;
961
+ });
962
+ _.forEach(orderedVs, dfs2);
963
+ return layers;
964
+ }
965
+ function barycenter(g, movable) {
966
+ return _.map(movable, function(v) {
967
+ var inV = g.inEdges(v);
968
+ if (!inV.length) {
969
+ return { v };
970
+ } else {
971
+ var result = _.reduce(
972
+ inV,
973
+ function(acc, e) {
974
+ var edge = g.edge(e), nodeU = g.node(e.v);
975
+ return {
976
+ sum: acc.sum + edge.weight * nodeU.order,
977
+ weight: acc.weight + edge.weight
978
+ };
979
+ },
980
+ { sum: 0, weight: 0 }
981
+ );
982
+ return {
983
+ v,
984
+ barycenter: result.sum / result.weight,
985
+ weight: result.weight
986
+ };
987
+ }
988
+ });
989
+ }
990
+ function resolveConflicts(entries, cg) {
991
+ var mappedEntries = {};
992
+ _.forEach(entries, function(entry, i) {
993
+ var tmp = mappedEntries[entry.v] = {
994
+ indegree: 0,
995
+ in: [],
996
+ out: [],
997
+ vs: [entry.v],
998
+ i
999
+ };
1000
+ if (!_.isUndefined(entry.barycenter)) {
1001
+ tmp.barycenter = entry.barycenter;
1002
+ tmp.weight = entry.weight;
1003
+ }
1004
+ });
1005
+ _.forEach(cg.edges(), function(e) {
1006
+ var entryV = mappedEntries[e.v];
1007
+ var entryW = mappedEntries[e.w];
1008
+ if (!_.isUndefined(entryV) && !_.isUndefined(entryW)) {
1009
+ entryW.indegree++;
1010
+ entryV.out.push(mappedEntries[e.w]);
1011
+ }
1012
+ });
1013
+ var sourceSet = _.filter(mappedEntries, function(entry) {
1014
+ return !entry.indegree;
1015
+ });
1016
+ return doResolveConflicts(sourceSet);
1017
+ }
1018
+ function doResolveConflicts(sourceSet) {
1019
+ var entries = [];
1020
+ function handleIn(vEntry) {
1021
+ return function(uEntry) {
1022
+ if (uEntry.merged) {
1023
+ return;
1024
+ }
1025
+ if (_.isUndefined(uEntry.barycenter) || _.isUndefined(vEntry.barycenter) || uEntry.barycenter >= vEntry.barycenter) {
1026
+ mergeEntries(vEntry, uEntry);
1027
+ }
1028
+ };
1029
+ }
1030
+ function handleOut(vEntry) {
1031
+ return function(wEntry) {
1032
+ wEntry["in"].push(vEntry);
1033
+ if (--wEntry.indegree === 0) {
1034
+ sourceSet.push(wEntry);
1035
+ }
1036
+ };
1037
+ }
1038
+ while (sourceSet.length) {
1039
+ var entry = sourceSet.pop();
1040
+ entries.push(entry);
1041
+ _.forEach(entry["in"].reverse(), handleIn(entry));
1042
+ _.forEach(entry.out, handleOut(entry));
1043
+ }
1044
+ return _.map(
1045
+ _.filter(entries, function(entry2) {
1046
+ return !entry2.merged;
1047
+ }),
1048
+ function(entry2) {
1049
+ return _.pick(entry2, ["vs", "i", "barycenter", "weight"]);
1050
+ }
1051
+ );
1052
+ }
1053
+ function mergeEntries(target, source) {
1054
+ var sum = 0;
1055
+ var weight = 0;
1056
+ if (target.weight) {
1057
+ sum += target.barycenter * target.weight;
1058
+ weight += target.weight;
1059
+ }
1060
+ if (source.weight) {
1061
+ sum += source.barycenter * source.weight;
1062
+ weight += source.weight;
1063
+ }
1064
+ target.vs = source.vs.concat(target.vs);
1065
+ target.barycenter = sum / weight;
1066
+ target.weight = weight;
1067
+ target.i = Math.min(source.i, target.i);
1068
+ source.merged = true;
1069
+ }
1070
+ function sort(entries, biasRight) {
1071
+ var parts = partition(entries, function(entry) {
1072
+ return Object.prototype.hasOwnProperty.call(entry, "barycenter");
1073
+ });
1074
+ var sortable = parts.lhs, unsortable = _.sortBy(parts.rhs, function(entry) {
1075
+ return -entry.i;
1076
+ }), vs = [], sum = 0, weight = 0, vsIndex = 0;
1077
+ sortable.sort(compareWithBias(!!biasRight));
1078
+ vsIndex = consumeUnsortable(vs, unsortable, vsIndex);
1079
+ _.forEach(sortable, function(entry) {
1080
+ vsIndex += entry.vs.length;
1081
+ vs.push(entry.vs);
1082
+ sum += entry.barycenter * entry.weight;
1083
+ weight += entry.weight;
1084
+ vsIndex = consumeUnsortable(vs, unsortable, vsIndex);
1085
+ });
1086
+ var result = { vs: _.flatten(vs) };
1087
+ if (weight) {
1088
+ result.barycenter = sum / weight;
1089
+ result.weight = weight;
1090
+ }
1091
+ return result;
1092
+ }
1093
+ function consumeUnsortable(vs, unsortable, index) {
1094
+ var last;
1095
+ while (unsortable.length && (last = _.last(unsortable)).i <= index) {
1096
+ unsortable.pop();
1097
+ vs.push(last.vs);
1098
+ index++;
1099
+ }
1100
+ return index;
1101
+ }
1102
+ function compareWithBias(bias) {
1103
+ return function(entryV, entryW) {
1104
+ if (entryV.barycenter < entryW.barycenter) {
1105
+ return -1;
1106
+ } else if (entryV.barycenter > entryW.barycenter) {
1107
+ return 1;
1108
+ }
1109
+ return !bias ? entryV.i - entryW.i : entryW.i - entryV.i;
1110
+ };
1111
+ }
1112
+ function sortSubgraph(g, v, cg, biasRight) {
1113
+ var movable = g.children(v);
1114
+ var node = g.node(v);
1115
+ var bl = node ? node.borderLeft : void 0;
1116
+ var br = node ? node.borderRight : void 0;
1117
+ var subgraphs = {};
1118
+ if (bl) {
1119
+ movable = _.filter(movable, function(w) {
1120
+ return w !== bl && w !== br;
1121
+ });
1122
+ }
1123
+ var barycenters = barycenter(g, movable);
1124
+ _.forEach(barycenters, function(entry) {
1125
+ if (g.children(entry.v).length) {
1126
+ var subgraphResult = sortSubgraph(g, entry.v, cg, biasRight);
1127
+ subgraphs[entry.v] = subgraphResult;
1128
+ if (Object.prototype.hasOwnProperty.call(subgraphResult, "barycenter")) {
1129
+ mergeBarycenters(entry, subgraphResult);
1130
+ }
1131
+ }
1132
+ });
1133
+ var entries = resolveConflicts(barycenters, cg);
1134
+ expandSubgraphs(entries, subgraphs);
1135
+ var result = sort(entries, biasRight);
1136
+ if (bl) {
1137
+ result.vs = _.flatten([bl, result.vs, br]);
1138
+ if (g.predecessors(bl).length) {
1139
+ var blPred = g.node(g.predecessors(bl)[0]), brPred = g.node(g.predecessors(br)[0]);
1140
+ if (!Object.prototype.hasOwnProperty.call(result, "barycenter")) {
1141
+ result.barycenter = 0;
1142
+ result.weight = 0;
1143
+ }
1144
+ result.barycenter = (result.barycenter * result.weight + blPred.order + brPred.order) / (result.weight + 2);
1145
+ result.weight += 2;
1146
+ }
1147
+ }
1148
+ return result;
1149
+ }
1150
+ function expandSubgraphs(entries, subgraphs) {
1151
+ _.forEach(entries, function(entry) {
1152
+ entry.vs = _.flatten(
1153
+ entry.vs.map(function(v) {
1154
+ if (subgraphs[v]) {
1155
+ return subgraphs[v].vs;
1156
+ }
1157
+ return v;
1158
+ })
1159
+ );
1160
+ });
1161
+ }
1162
+ function mergeBarycenters(target, other) {
1163
+ if (!_.isUndefined(target.barycenter)) {
1164
+ target.barycenter = (target.barycenter * target.weight + other.barycenter * other.weight) / (target.weight + other.weight);
1165
+ target.weight += other.weight;
1166
+ } else {
1167
+ target.barycenter = other.barycenter;
1168
+ target.weight = other.weight;
1169
+ }
1170
+ }
1171
+ function order(g) {
1172
+ var maxRank$1 = maxRank(g), downLayerGraphs = buildLayerGraphs(g, _.range(1, maxRank$1 + 1), "inEdges"), upLayerGraphs = buildLayerGraphs(g, _.range(maxRank$1 - 1, -1, -1), "outEdges");
1173
+ var layering = initOrder(g);
1174
+ assignOrder(g, layering);
1175
+ var bestCC = Number.POSITIVE_INFINITY, best;
1176
+ for (var i = 0, lastBest = 0; lastBest < 4; ++i, ++lastBest) {
1177
+ sweepLayerGraphs(i % 2 ? downLayerGraphs : upLayerGraphs, i % 4 >= 2);
1178
+ layering = buildLayerMatrix(g);
1179
+ var cc = crossCount(g, layering);
1180
+ if (cc < bestCC) {
1181
+ lastBest = 0;
1182
+ best = _.cloneDeep(layering);
1183
+ bestCC = cc;
1184
+ }
1185
+ }
1186
+ assignOrder(g, best);
1187
+ }
1188
+ function buildLayerGraphs(g, ranks, relationship) {
1189
+ return _.map(ranks, function(rank2) {
1190
+ return buildLayerGraph(g, rank2, relationship);
1191
+ });
1192
+ }
1193
+ function sweepLayerGraphs(layerGraphs, biasRight) {
1194
+ var cg = new Graph();
1195
+ _.forEach(layerGraphs, function(lg) {
1196
+ var root = lg.graph().root;
1197
+ var sorted = sortSubgraph(lg, root, cg, biasRight);
1198
+ _.forEach(sorted.vs, function(v, i) {
1199
+ lg.node(v).order = i;
1200
+ });
1201
+ addSubgraphConstraints(lg, cg, sorted.vs);
1202
+ });
1203
+ }
1204
+ function assignOrder(g, layering) {
1205
+ _.forEach(layering, function(layer) {
1206
+ _.forEach(layer, function(v, i) {
1207
+ g.node(v).order = i;
1208
+ });
1209
+ });
1210
+ }
1211
+ function parentDummyChains(g) {
1212
+ var postorderNums = postorder(g);
1213
+ _.forEach(g.graph().dummyChains, function(v) {
1214
+ var node = g.node(v);
1215
+ var edgeObj = node.edgeObj;
1216
+ var pathData = findPath(g, postorderNums, edgeObj.v, edgeObj.w);
1217
+ var path = pathData.path;
1218
+ var lca = pathData.lca;
1219
+ var pathIdx = 0;
1220
+ var pathV = path[pathIdx];
1221
+ var ascending = true;
1222
+ while (v !== edgeObj.w) {
1223
+ node = g.node(v);
1224
+ if (ascending) {
1225
+ while ((pathV = path[pathIdx]) !== lca && g.node(pathV).maxRank < node.rank) {
1226
+ pathIdx++;
1227
+ }
1228
+ if (pathV === lca) {
1229
+ ascending = false;
1230
+ }
1231
+ }
1232
+ if (!ascending) {
1233
+ while (pathIdx < path.length - 1 && g.node(pathV = path[pathIdx + 1]).minRank <= node.rank) {
1234
+ pathIdx++;
1235
+ }
1236
+ pathV = path[pathIdx];
1237
+ }
1238
+ g.setParent(v, pathV);
1239
+ v = g.successors(v)[0];
1240
+ }
1241
+ });
1242
+ }
1243
+ function findPath(g, postorderNums, v, w) {
1244
+ var vPath = [];
1245
+ var wPath = [];
1246
+ var low = Math.min(postorderNums[v].low, postorderNums[w].low);
1247
+ var lim = Math.max(postorderNums[v].lim, postorderNums[w].lim);
1248
+ var parent;
1249
+ var lca;
1250
+ parent = v;
1251
+ do {
1252
+ parent = g.parent(parent);
1253
+ vPath.push(parent);
1254
+ } while (parent && (postorderNums[parent].low > low || lim > postorderNums[parent].lim));
1255
+ lca = parent;
1256
+ parent = w;
1257
+ while ((parent = g.parent(parent)) !== lca) {
1258
+ wPath.push(parent);
1259
+ }
1260
+ return { path: vPath.concat(wPath.reverse()), lca };
1261
+ }
1262
+ function postorder(g) {
1263
+ var result = {};
1264
+ var lim = 0;
1265
+ function dfs2(v) {
1266
+ var low = lim;
1267
+ _.forEach(g.children(v), dfs2);
1268
+ result[v] = { low, lim: lim++ };
1269
+ }
1270
+ _.forEach(g.children(), dfs2);
1271
+ return result;
1272
+ }
1273
+ function findType1Conflicts(g, layering) {
1274
+ var conflicts = {};
1275
+ function visitLayer(prevLayer, layer) {
1276
+ var k0 = 0, scanPos = 0, prevLayerLength = prevLayer.length, lastNode = _.last(layer);
1277
+ _.forEach(layer, function(v, i) {
1278
+ var w = findOtherInnerSegmentNode(g, v), k1 = w ? g.node(w).order : prevLayerLength;
1279
+ if (w || v === lastNode) {
1280
+ _.forEach(layer.slice(scanPos, i + 1), function(scanNode) {
1281
+ _.forEach(g.predecessors(scanNode), function(u) {
1282
+ var uLabel = g.node(u), uPos = uLabel.order;
1283
+ if ((uPos < k0 || k1 < uPos) && !(uLabel.dummy && g.node(scanNode).dummy)) {
1284
+ addConflict(conflicts, u, scanNode);
1285
+ }
1286
+ });
1287
+ });
1288
+ scanPos = i + 1;
1289
+ k0 = k1;
1290
+ }
1291
+ });
1292
+ return layer;
1293
+ }
1294
+ _.reduce(layering, visitLayer);
1295
+ return conflicts;
1296
+ }
1297
+ function findType2Conflicts(g, layering) {
1298
+ var conflicts = {};
1299
+ function scan(south, southPos, southEnd, prevNorthBorder, nextNorthBorder) {
1300
+ var v;
1301
+ _.forEach(_.range(southPos, southEnd), function(i) {
1302
+ v = south[i];
1303
+ if (g.node(v).dummy) {
1304
+ _.forEach(g.predecessors(v), function(u) {
1305
+ var uNode = g.node(u);
1306
+ if (uNode.dummy && (uNode.order < prevNorthBorder || uNode.order > nextNorthBorder)) {
1307
+ addConflict(conflicts, u, v);
1308
+ }
1309
+ });
1310
+ }
1311
+ });
1312
+ }
1313
+ function visitLayer(north, south) {
1314
+ var prevNorthPos = -1, nextNorthPos, southPos = 0;
1315
+ _.forEach(south, function(v, southLookahead) {
1316
+ if (g.node(v).dummy === "border") {
1317
+ var predecessors = g.predecessors(v);
1318
+ if (predecessors.length) {
1319
+ nextNorthPos = g.node(predecessors[0]).order;
1320
+ scan(south, southPos, southLookahead, prevNorthPos, nextNorthPos);
1321
+ southPos = southLookahead;
1322
+ prevNorthPos = nextNorthPos;
1323
+ }
1324
+ }
1325
+ scan(south, southPos, south.length, nextNorthPos, north.length);
1326
+ });
1327
+ return south;
1328
+ }
1329
+ _.reduce(layering, visitLayer);
1330
+ return conflicts;
1331
+ }
1332
+ function findOtherInnerSegmentNode(g, v) {
1333
+ if (g.node(v).dummy) {
1334
+ return _.find(g.predecessors(v), function(u) {
1335
+ return g.node(u).dummy;
1336
+ });
1337
+ }
1338
+ }
1339
+ function addConflict(conflicts, v, w) {
1340
+ if (v > w) {
1341
+ var tmp = v;
1342
+ v = w;
1343
+ w = tmp;
1344
+ }
1345
+ if (!Object.prototype.hasOwnProperty.call(conflicts, v)) {
1346
+ Object.defineProperty(conflicts, v, {
1347
+ enumerable: true,
1348
+ configurable: true,
1349
+ value: {},
1350
+ writable: true
1351
+ });
1352
+ }
1353
+ var conflictsV = conflicts[v];
1354
+ Object.defineProperty(conflictsV, w, {
1355
+ enumerable: true,
1356
+ configurable: true,
1357
+ value: true,
1358
+ writable: true
1359
+ });
1360
+ }
1361
+ function hasConflict(conflicts, v, w) {
1362
+ if (v > w) {
1363
+ var tmp = v;
1364
+ v = w;
1365
+ w = tmp;
1366
+ }
1367
+ return !!conflicts[v] && Object.prototype.hasOwnProperty.call(conflicts[v], w);
1368
+ }
1369
+ function verticalAlignment(g, layering, conflicts, neighborFn) {
1370
+ var root = {}, align = {}, pos = {};
1371
+ _.forEach(layering, function(layer) {
1372
+ _.forEach(layer, function(v, order2) {
1373
+ root[v] = v;
1374
+ align[v] = v;
1375
+ pos[v] = order2;
1376
+ });
1377
+ });
1378
+ _.forEach(layering, function(layer) {
1379
+ var prevIdx = -1;
1380
+ _.forEach(layer, function(v) {
1381
+ var ws = neighborFn(v);
1382
+ if (ws.length) {
1383
+ ws = _.sortBy(ws, function(w2) {
1384
+ return pos[w2];
1385
+ });
1386
+ var mp = (ws.length - 1) / 2;
1387
+ for (var i = Math.floor(mp), il = Math.ceil(mp); i <= il; ++i) {
1388
+ var w = ws[i];
1389
+ if (align[v] === v && prevIdx < pos[w] && !hasConflict(conflicts, v, w)) {
1390
+ align[w] = v;
1391
+ align[v] = root[v] = root[w];
1392
+ prevIdx = pos[w];
1393
+ }
1394
+ }
1395
+ }
1396
+ });
1397
+ });
1398
+ return { root, align };
1399
+ }
1400
+ function horizontalCompaction(g, layering, root, align, reverseSep) {
1401
+ var xs = {}, blockG = buildBlockGraph(g, layering, root, reverseSep), borderType = reverseSep ? "borderLeft" : "borderRight";
1402
+ function iterate(setXsFunc, nextNodesFunc) {
1403
+ var stack = blockG.nodes();
1404
+ var elem = stack.pop();
1405
+ var visited = {};
1406
+ while (elem) {
1407
+ if (visited[elem]) {
1408
+ setXsFunc(elem);
1409
+ } else {
1410
+ visited[elem] = true;
1411
+ stack.push(elem);
1412
+ stack = stack.concat(nextNodesFunc(elem));
1413
+ }
1414
+ elem = stack.pop();
1415
+ }
1416
+ }
1417
+ function pass1(elem) {
1418
+ xs[elem] = blockG.inEdges(elem).reduce(function(acc, e) {
1419
+ return Math.max(acc, xs[e.v] + blockG.edge(e));
1420
+ }, 0);
1421
+ }
1422
+ function pass2(elem) {
1423
+ var min = blockG.outEdges(elem).reduce(function(acc, e) {
1424
+ return Math.min(acc, xs[e.w] - blockG.edge(e));
1425
+ }, Number.POSITIVE_INFINITY);
1426
+ var node = g.node(elem);
1427
+ if (min !== Number.POSITIVE_INFINITY && node.borderType !== borderType) {
1428
+ xs[elem] = Math.max(xs[elem], min);
1429
+ }
1430
+ }
1431
+ iterate(pass1, blockG.predecessors.bind(blockG));
1432
+ iterate(pass2, blockG.successors.bind(blockG));
1433
+ _.forEach(align, function(v) {
1434
+ xs[v] = xs[root[v]];
1435
+ });
1436
+ return xs;
1437
+ }
1438
+ function buildBlockGraph(g, layering, root, reverseSep) {
1439
+ var blockGraph = new Graph(), graphLabel = g.graph(), sepFn = sep(graphLabel.nodesep, graphLabel.edgesep, reverseSep);
1440
+ _.forEach(layering, function(layer) {
1441
+ var u;
1442
+ _.forEach(layer, function(v) {
1443
+ var vRoot = root[v];
1444
+ blockGraph.setNode(vRoot);
1445
+ if (u) {
1446
+ var uRoot = root[u], prevMax = blockGraph.edge(uRoot, vRoot);
1447
+ blockGraph.setEdge(uRoot, vRoot, Math.max(sepFn(g, v, u), prevMax || 0));
1448
+ }
1449
+ u = v;
1450
+ });
1451
+ });
1452
+ return blockGraph;
1453
+ }
1454
+ function findSmallestWidthAlignment(g, xss) {
1455
+ return _.minBy(_.values(xss), function(xs) {
1456
+ var max = Number.NEGATIVE_INFINITY;
1457
+ var min = Number.POSITIVE_INFINITY;
1458
+ _.forIn(xs, function(x, v) {
1459
+ var halfWidth = width(g, v) / 2;
1460
+ max = Math.max(x + halfWidth, max);
1461
+ min = Math.min(x - halfWidth, min);
1462
+ });
1463
+ return max - min;
1464
+ });
1465
+ }
1466
+ function alignCoordinates(xss, alignTo) {
1467
+ var alignToVals = _.values(alignTo), alignToMin = _.min(alignToVals), alignToMax = _.max(alignToVals);
1468
+ _.forEach(["u", "d"], function(vert) {
1469
+ _.forEach(["l", "r"], function(horiz) {
1470
+ var alignment = vert + horiz, xs = xss[alignment], delta;
1471
+ if (xs === alignTo) return;
1472
+ var xsVals = _.values(xs);
1473
+ delta = horiz === "l" ? alignToMin - _.min(xsVals) : alignToMax - _.max(xsVals);
1474
+ if (delta) {
1475
+ xss[alignment] = _.mapValues(xs, function(x) {
1476
+ return x + delta;
1477
+ });
1478
+ }
1479
+ });
1480
+ });
1481
+ }
1482
+ function balance(xss, align) {
1483
+ return _.mapValues(xss.ul, function(ignore, v) {
1484
+ if (align) {
1485
+ return xss[align.toLowerCase()][v];
1486
+ } else {
1487
+ var xs = _.sortBy(_.map(xss, v));
1488
+ return (xs[1] + xs[2]) / 2;
1489
+ }
1490
+ });
1491
+ }
1492
+ function positionX(g) {
1493
+ var layering = buildLayerMatrix(g);
1494
+ var conflicts = _.merge(findType1Conflicts(g, layering), findType2Conflicts(g, layering));
1495
+ var xss = {};
1496
+ var adjustedLayering;
1497
+ _.forEach(["u", "d"], function(vert) {
1498
+ adjustedLayering = vert === "u" ? layering : _.values(layering).reverse();
1499
+ _.forEach(["l", "r"], function(horiz) {
1500
+ if (horiz === "r") {
1501
+ adjustedLayering = _.map(adjustedLayering, function(inner) {
1502
+ return _.values(inner).reverse();
1503
+ });
1504
+ }
1505
+ var neighborFn = (vert === "u" ? g.predecessors : g.successors).bind(g);
1506
+ var align = verticalAlignment(g, adjustedLayering, conflicts, neighborFn);
1507
+ var xs = horizontalCompaction(g, adjustedLayering, align.root, align.align, horiz === "r");
1508
+ if (horiz === "r") {
1509
+ xs = _.mapValues(xs, function(x) {
1510
+ return -x;
1511
+ });
1512
+ }
1513
+ xss[vert + horiz] = xs;
1514
+ });
1515
+ });
1516
+ var smallestWidth = findSmallestWidthAlignment(g, xss);
1517
+ alignCoordinates(xss, smallestWidth);
1518
+ return balance(xss, g.graph().align);
1519
+ }
1520
+ function sep(nodeSep, edgeSep, reverseSep) {
1521
+ return function(g, v, w) {
1522
+ var vLabel = g.node(v);
1523
+ var wLabel = g.node(w);
1524
+ var sum = 0;
1525
+ var delta;
1526
+ sum += vLabel.width / 2;
1527
+ if (Object.prototype.hasOwnProperty.call(vLabel, "labelpos")) {
1528
+ switch (vLabel.labelpos.toLowerCase()) {
1529
+ case "l":
1530
+ delta = -vLabel.width / 2;
1531
+ break;
1532
+ case "r":
1533
+ delta = vLabel.width / 2;
1534
+ break;
1535
+ }
1536
+ }
1537
+ if (delta) {
1538
+ sum += reverseSep ? delta : -delta;
1539
+ }
1540
+ delta = 0;
1541
+ sum += (vLabel.dummy ? edgeSep : nodeSep) / 2;
1542
+ sum += (wLabel.dummy ? edgeSep : nodeSep) / 2;
1543
+ sum += wLabel.width / 2;
1544
+ if (Object.prototype.hasOwnProperty.call(wLabel, "labelpos")) {
1545
+ switch (wLabel.labelpos.toLowerCase()) {
1546
+ case "l":
1547
+ delta = wLabel.width / 2;
1548
+ break;
1549
+ case "r":
1550
+ delta = -wLabel.width / 2;
1551
+ break;
1552
+ }
1553
+ }
1554
+ if (delta) {
1555
+ sum += reverseSep ? delta : -delta;
1556
+ }
1557
+ delta = 0;
1558
+ return sum;
1559
+ };
1560
+ }
1561
+ function width(g, v) {
1562
+ return g.node(v).width;
1563
+ }
1564
+ function position(g) {
1565
+ g = asNonCompoundGraph(g);
1566
+ positionY(g);
1567
+ _.forOwn(positionX(g), function(x, v) {
1568
+ g.node(v).x = x;
1569
+ });
1570
+ }
1571
+ function positionY(g) {
1572
+ var layering = buildLayerMatrix(g);
1573
+ var rankSep = g.graph().ranksep;
1574
+ var prevY = 0;
1575
+ _.forEach(layering, function(layer) {
1576
+ var maxHeight = _.max(
1577
+ _.map(layer, function(v) {
1578
+ return g.node(v).height;
1579
+ })
1580
+ );
1581
+ _.forEach(layer, function(v) {
1582
+ g.node(v).y = prevY + maxHeight / 2;
1583
+ });
1584
+ prevY += maxHeight + rankSep;
1585
+ });
1586
+ }
1587
+ function layout(g, opts) {
1588
+ var time = notime;
1589
+ time("layout", () => {
1590
+ var layoutGraph = time(" buildLayoutGraph", () => buildLayoutGraph(g));
1591
+ time(" runLayout", () => runLayout(layoutGraph, time));
1592
+ time(" updateInputGraph", () => updateInputGraph(g, layoutGraph));
1593
+ });
1594
+ }
1595
+ function runLayout(g, time) {
1596
+ time(" makeSpaceForEdgeLabels", () => makeSpaceForEdgeLabels(g));
1597
+ time(" removeSelfEdges", () => removeSelfEdges(g));
1598
+ time(" acyclic", () => run$2(g));
1599
+ time(" nestingGraph.run", () => run(g));
1600
+ time(" rank", () => rank(asNonCompoundGraph(g)));
1601
+ time(" injectEdgeLabelProxies", () => injectEdgeLabelProxies(g));
1602
+ time(" removeEmptyRanks", () => removeEmptyRanks(g));
1603
+ time(" nestingGraph.cleanup", () => cleanup(g));
1604
+ time(" normalizeRanks", () => normalizeRanks(g));
1605
+ time(" assignRankMinMax", () => assignRankMinMax(g));
1606
+ time(" removeEdgeLabelProxies", () => removeEdgeLabelProxies(g));
1607
+ time(" normalize.run", () => run$1(g));
1608
+ time(" parentDummyChains", () => parentDummyChains(g));
1609
+ time(" addBorderSegments", () => addBorderSegments(g));
1610
+ time(" order", () => order(g));
1611
+ time(" insertSelfEdges", () => insertSelfEdges(g));
1612
+ time(" adjustCoordinateSystem", () => adjust(g));
1613
+ time(" position", () => position(g));
1614
+ time(" positionSelfEdges", () => positionSelfEdges(g));
1615
+ time(" removeBorderNodes", () => removeBorderNodes(g));
1616
+ time(" normalize.undo", () => undo(g));
1617
+ time(" fixupEdgeLabelCoords", () => fixupEdgeLabelCoords(g));
1618
+ time(" undoCoordinateSystem", () => undo$1(g));
1619
+ time(" translateGraph", () => translateGraph(g));
1620
+ time(" assignNodeIntersects", () => assignNodeIntersects(g));
1621
+ time(" reversePoints", () => reversePointsForReversedEdges(g));
1622
+ time(" acyclic.undo", () => undo$2(g));
1623
+ }
1624
+ function updateInputGraph(inputGraph, layoutGraph) {
1625
+ _.forEach(inputGraph.nodes(), function(v) {
1626
+ var inputLabel = inputGraph.node(v);
1627
+ var layoutLabel = layoutGraph.node(v);
1628
+ if (inputLabel) {
1629
+ inputLabel.x = layoutLabel.x;
1630
+ inputLabel.y = layoutLabel.y;
1631
+ if (layoutGraph.children(v).length) {
1632
+ inputLabel.width = layoutLabel.width;
1633
+ inputLabel.height = layoutLabel.height;
1634
+ }
1635
+ }
1636
+ });
1637
+ _.forEach(inputGraph.edges(), function(e) {
1638
+ var inputLabel = inputGraph.edge(e);
1639
+ var layoutLabel = layoutGraph.edge(e);
1640
+ inputLabel.points = layoutLabel.points;
1641
+ if (Object.prototype.hasOwnProperty.call(layoutLabel, "x")) {
1642
+ inputLabel.x = layoutLabel.x;
1643
+ inputLabel.y = layoutLabel.y;
1644
+ }
1645
+ });
1646
+ inputGraph.graph().width = layoutGraph.graph().width;
1647
+ inputGraph.graph().height = layoutGraph.graph().height;
1648
+ }
1649
+ var graphNumAttrs = ["nodesep", "edgesep", "ranksep", "marginx", "marginy"];
1650
+ var graphDefaults = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: "tb" };
1651
+ var graphAttrs = ["acyclicer", "ranker", "rankdir", "align"];
1652
+ var nodeNumAttrs = ["width", "height"];
1653
+ var nodeDefaults = { width: 0, height: 0 };
1654
+ var edgeNumAttrs = ["minlen", "weight", "width", "height", "labeloffset"];
1655
+ var edgeDefaults = {
1656
+ minlen: 1,
1657
+ weight: 1,
1658
+ width: 0,
1659
+ height: 0,
1660
+ labeloffset: 10,
1661
+ labelpos: "r"
1662
+ };
1663
+ var edgeAttrs = ["labelpos"];
1664
+ function buildLayoutGraph(inputGraph) {
1665
+ var g = new Graph({ multigraph: true, compound: true });
1666
+ var graph = canonicalize(inputGraph.graph());
1667
+ g.setGraph(
1668
+ _.merge({}, graphDefaults, selectNumberAttrs(graph, graphNumAttrs), _.pick(graph, graphAttrs))
1669
+ );
1670
+ _.forEach(inputGraph.nodes(), function(v) {
1671
+ var node = canonicalize(inputGraph.node(v));
1672
+ g.setNode(v, _.defaults(selectNumberAttrs(node, nodeNumAttrs), nodeDefaults));
1673
+ g.setParent(v, inputGraph.parent(v));
1674
+ });
1675
+ _.forEach(inputGraph.edges(), function(e) {
1676
+ var edge = canonicalize(inputGraph.edge(e));
1677
+ g.setEdge(
1678
+ e,
1679
+ _.merge({}, edgeDefaults, selectNumberAttrs(edge, edgeNumAttrs), _.pick(edge, edgeAttrs))
1680
+ );
1681
+ });
1682
+ return g;
1683
+ }
1684
+ function makeSpaceForEdgeLabels(g) {
1685
+ var graph = g.graph();
1686
+ graph.ranksep /= 2;
1687
+ _.forEach(g.edges(), function(e) {
1688
+ var edge = g.edge(e);
1689
+ edge.minlen *= 2;
1690
+ if (edge.labelpos.toLowerCase() !== "c") {
1691
+ if (graph.rankdir === "TB" || graph.rankdir === "BT") {
1692
+ edge.width += edge.labeloffset;
1693
+ } else {
1694
+ edge.height += edge.labeloffset;
1695
+ }
1696
+ }
1697
+ });
1698
+ }
1699
+ function injectEdgeLabelProxies(g) {
1700
+ _.forEach(g.edges(), function(e) {
1701
+ var edge = g.edge(e);
1702
+ if (edge.width && edge.height) {
1703
+ var v = g.node(e.v);
1704
+ var w = g.node(e.w);
1705
+ var label = { rank: (w.rank - v.rank) / 2 + v.rank, e };
1706
+ addDummyNode(g, "edge-proxy", label, "_ep");
1707
+ }
1708
+ });
1709
+ }
1710
+ function assignRankMinMax(g) {
1711
+ var maxRank2 = 0;
1712
+ _.forEach(g.nodes(), function(v) {
1713
+ var node = g.node(v);
1714
+ if (node.borderTop) {
1715
+ node.minRank = g.node(node.borderTop).rank;
1716
+ node.maxRank = g.node(node.borderBottom).rank;
1717
+ maxRank2 = _.max(maxRank2, node.maxRank);
1718
+ }
1719
+ });
1720
+ g.graph().maxRank = maxRank2;
1721
+ }
1722
+ function removeEdgeLabelProxies(g) {
1723
+ _.forEach(g.nodes(), function(v) {
1724
+ var node = g.node(v);
1725
+ if (node.dummy === "edge-proxy") {
1726
+ g.edge(node.e).labelRank = node.rank;
1727
+ g.removeNode(v);
1728
+ }
1729
+ });
1730
+ }
1731
+ function translateGraph(g) {
1732
+ var minX = Number.POSITIVE_INFINITY;
1733
+ var maxX = 0;
1734
+ var minY = Number.POSITIVE_INFINITY;
1735
+ var maxY = 0;
1736
+ var graphLabel = g.graph();
1737
+ var marginX = graphLabel.marginx || 0;
1738
+ var marginY = graphLabel.marginy || 0;
1739
+ function getExtremes(attrs) {
1740
+ var x = attrs.x;
1741
+ var y = attrs.y;
1742
+ var w = attrs.width;
1743
+ var h = attrs.height;
1744
+ minX = Math.min(minX, x - w / 2);
1745
+ maxX = Math.max(maxX, x + w / 2);
1746
+ minY = Math.min(minY, y - h / 2);
1747
+ maxY = Math.max(maxY, y + h / 2);
1748
+ }
1749
+ _.forEach(g.nodes(), function(v) {
1750
+ getExtremes(g.node(v));
1751
+ });
1752
+ _.forEach(g.edges(), function(e) {
1753
+ var edge = g.edge(e);
1754
+ if (Object.prototype.hasOwnProperty.call(edge, "x")) {
1755
+ getExtremes(edge);
1756
+ }
1757
+ });
1758
+ minX -= marginX;
1759
+ minY -= marginY;
1760
+ _.forEach(g.nodes(), function(v) {
1761
+ var node = g.node(v);
1762
+ node.x -= minX;
1763
+ node.y -= minY;
1764
+ });
1765
+ _.forEach(g.edges(), function(e) {
1766
+ var edge = g.edge(e);
1767
+ _.forEach(edge.points, function(p) {
1768
+ p.x -= minX;
1769
+ p.y -= minY;
1770
+ });
1771
+ if (Object.prototype.hasOwnProperty.call(edge, "x")) {
1772
+ edge.x -= minX;
1773
+ }
1774
+ if (Object.prototype.hasOwnProperty.call(edge, "y")) {
1775
+ edge.y -= minY;
1776
+ }
1777
+ });
1778
+ graphLabel.width = maxX - minX + marginX;
1779
+ graphLabel.height = maxY - minY + marginY;
1780
+ }
1781
+ function assignNodeIntersects(g) {
1782
+ _.forEach(g.edges(), function(e) {
1783
+ var edge = g.edge(e);
1784
+ var nodeV = g.node(e.v);
1785
+ var nodeW = g.node(e.w);
1786
+ var p1, p2;
1787
+ if (!edge.points) {
1788
+ edge.points = [];
1789
+ p1 = nodeW;
1790
+ p2 = nodeV;
1791
+ } else {
1792
+ p1 = edge.points[0];
1793
+ p2 = edge.points[edge.points.length - 1];
1794
+ }
1795
+ edge.points.unshift(intersectRect(nodeV, p1));
1796
+ edge.points.push(intersectRect(nodeW, p2));
1797
+ });
1798
+ }
1799
+ function fixupEdgeLabelCoords(g) {
1800
+ _.forEach(g.edges(), function(e) {
1801
+ var edge = g.edge(e);
1802
+ if (Object.prototype.hasOwnProperty.call(edge, "x")) {
1803
+ if (edge.labelpos === "l" || edge.labelpos === "r") {
1804
+ edge.width -= edge.labeloffset;
1805
+ }
1806
+ switch (edge.labelpos) {
1807
+ case "l":
1808
+ edge.x -= edge.width / 2 + edge.labeloffset;
1809
+ break;
1810
+ case "r":
1811
+ edge.x += edge.width / 2 + edge.labeloffset;
1812
+ break;
1813
+ }
1814
+ }
1815
+ });
1816
+ }
1817
+ function reversePointsForReversedEdges(g) {
1818
+ _.forEach(g.edges(), function(e) {
1819
+ var edge = g.edge(e);
1820
+ if (edge.reversed) {
1821
+ edge.points.reverse();
1822
+ }
1823
+ });
1824
+ }
1825
+ function removeBorderNodes(g) {
1826
+ _.forEach(g.nodes(), function(v) {
1827
+ if (g.children(v).length) {
1828
+ var node = g.node(v);
1829
+ var t = g.node(node.borderTop);
1830
+ var b = g.node(node.borderBottom);
1831
+ var l = g.node(_.last(node.borderLeft));
1832
+ var r = g.node(_.last(node.borderRight));
1833
+ node.width = Math.abs(r.x - l.x);
1834
+ node.height = Math.abs(b.y - t.y);
1835
+ node.x = l.x + node.width / 2;
1836
+ node.y = t.y + node.height / 2;
1837
+ }
1838
+ });
1839
+ _.forEach(g.nodes(), function(v) {
1840
+ if (g.node(v).dummy === "border") {
1841
+ g.removeNode(v);
1842
+ }
1843
+ });
1844
+ }
1845
+ function removeSelfEdges(g) {
1846
+ _.forEach(g.edges(), function(e) {
1847
+ if (e.v === e.w) {
1848
+ var node = g.node(e.v);
1849
+ if (!node.selfEdges) {
1850
+ node.selfEdges = [];
1851
+ }
1852
+ node.selfEdges.push({ e, label: g.edge(e) });
1853
+ g.removeEdge(e);
1854
+ }
1855
+ });
1856
+ }
1857
+ function insertSelfEdges(g) {
1858
+ var layers = buildLayerMatrix(g);
1859
+ _.forEach(layers, function(layer) {
1860
+ var orderShift = 0;
1861
+ _.forEach(layer, function(v, i) {
1862
+ var node = g.node(v);
1863
+ node.order = i + orderShift;
1864
+ _.forEach(node.selfEdges, function(selfEdge) {
1865
+ addDummyNode(
1866
+ g,
1867
+ "selfedge",
1868
+ {
1869
+ width: selfEdge.label.width,
1870
+ height: selfEdge.label.height,
1871
+ rank: node.rank,
1872
+ order: i + ++orderShift,
1873
+ e: selfEdge.e,
1874
+ label: selfEdge.label
1875
+ },
1876
+ "_se"
1877
+ );
1878
+ });
1879
+ delete node.selfEdges;
1880
+ });
1881
+ });
1882
+ }
1883
+ function positionSelfEdges(g) {
1884
+ _.forEach(g.nodes(), function(v) {
1885
+ var node = g.node(v);
1886
+ if (node.dummy === "selfedge") {
1887
+ var selfNode = g.node(node.e.v);
1888
+ var x = selfNode.x + selfNode.width / 2;
1889
+ var y = selfNode.y;
1890
+ var dx = node.x - x;
1891
+ var dy = selfNode.height / 2;
1892
+ g.setEdge(node.e, node.label);
1893
+ g.removeNode(v);
1894
+ node.label.points = [
1895
+ { x: x + 2 * dx / 3, y: y - dy },
1896
+ { x: x + 5 * dx / 6, y: y - dy },
1897
+ { x: x + dx, y },
1898
+ { x: x + 5 * dx / 6, y: y + dy },
1899
+ { x: x + 2 * dx / 3, y: y + dy }
1900
+ ];
1901
+ node.label.x = node.x;
1902
+ node.label.y = node.y;
1903
+ }
1904
+ });
1905
+ }
1906
+ function selectNumberAttrs(obj, attrs) {
1907
+ return _.mapValues(_.pick(obj, attrs), Number);
1908
+ }
1909
+ function canonicalize(attrs) {
1910
+ var newAttrs = {};
1911
+ _.forEach(attrs, function(v, k) {
1912
+ newAttrs[k.toLowerCase()] = v;
1913
+ });
1914
+ return newAttrs;
1915
+ }
1916
+ export {
1917
+ layout as l
1918
+ };
1919
+ //# sourceMappingURL=layout-bxkZz7Cm.js.map