@orangelogic/design-system 2.162.0 → 2.164.0

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 (285) hide show
  1. package/library/chunks/{AxisLabelRadial.lE2gKah-.js → AxisLabelRadial.fe7zjixN.js} +1 -1
  2. package/library/chunks/{BaseColumnSeries.B57B3iHh.js → BaseColumnSeries.8Mpxz385.js} +1 -1
  3. package/library/chunks/{CandlestickSeries.CmmI426l.js → CandlestickSeries.DuadaOTa.js} +19 -19
  4. package/library/chunks/{Circle.DAhHYhrc.js → Circle.6LomW0ej.js} +1 -1
  5. package/library/chunks/{ColumnSeries.DBgXk-b4.js → ColumnSeries.D1NLfRh5.js} +2 -2
  6. package/library/chunks/{EditableAxisLabel.C6H99qiS.js → EditableAxisLabel.Bi9vxLDV.js} +2 -2
  7. package/library/chunks/{EditableLabel.B7HB7Cu4.js → EditableLabel.CMR3O9E-.js} +1 -1
  8. package/library/chunks/{Gradient.DHhBnhFd.js → Gradient.CquE8_a4.js} +1 -1
  9. package/library/chunks/{LinearGradient.CGx00O8B.js → LinearGradient.CVN1VJp-.js} +9 -9
  10. package/library/chunks/{Picture.DYltTVSo.js → Picture.BYTZ_I8g.js} +1 -1
  11. package/library/chunks/{Polygon.BCrxKagx.js → Polygon.CU2sMltE.js} +1 -1
  12. package/library/chunks/{ProgressPie.CXksPJFv.js → ProgressPie.Dd74dbmm.js} +6 -6
  13. package/library/chunks/{RadialLabel.BYH69FGU.js → RadialLabel.7ka6ND-t.js} +1 -1
  14. package/library/chunks/{Scrollbar.DEv50o4R.js → Scrollbar.DqUnZReo.js} +1 -1
  15. package/library/chunks/Slice.BVI8rfHI.js +34 -0
  16. package/library/chunks/{Slider.BX8g2iGv.js → Slider.DtjYaJOw.js} +1 -1
  17. package/library/chunks/{SpriteResizer.CfIBMSp3.js → SpriteResizer.Ci2Wt2YJ.js} +11 -11
  18. package/library/chunks/{Triangle.CNY8-QfL.js → Triangle.C75emy3D.js} +1 -1
  19. package/library/chunks/{ZoomTools.6jZrzA7x.js → ZoomTools.CA9mtHI8.js} +2 -2
  20. package/library/chunks/_arrayEach.DU4X1H_a.js +8 -0
  21. package/library/chunks/_baseClone.BHNjfIdS.js +215 -0
  22. package/library/chunks/_baseEach.DQk0As2f.js +32 -0
  23. package/library/chunks/{_baseIteratee.BdKyHJ5i.js → _baseIteratee.sC2wLi2m.js} +3 -2
  24. package/library/chunks/{_baseUniq.je-HWbb3.js → _baseUniq.lwMgmtt2.js} +16 -15
  25. package/library/chunks/_baseXor.DixEm6JQ.js +35 -0
  26. package/library/chunks/_flatRest.D3ZVApI5.js +30 -0
  27. package/library/chunks/abnfDiagram-VRR7QNED.DKqYa5p7.js +89 -0
  28. package/library/chunks/{am-chart.CqdmTS0P.js → am-chart.Cr-vMjcY.js} +1577 -1727
  29. package/library/chunks/{animation.S74lUDDc.js → animation.BD-1xugN.js} +1 -1
  30. package/library/chunks/arc.xqNd6x9S.js +84 -0
  31. package/library/chunks/architectureDiagram-ZJ3FMSHR.CBIOk9Kp.js +4757 -0
  32. package/library/chunks/{asset-link-format.DLAzKfhk.js → asset-link-format.0q_MQOYh.js} +691 -635
  33. package/library/chunks/asset-link-format.ClaYu_v8.js +7 -0
  34. package/library/chunks/blockDiagram-677ZJIJ3.CeQxLPwj.js +2428 -0
  35. package/library/chunks/{button.8syoJXYs.js → button.DGyqdBou.js} +2 -2
  36. package/library/chunks/c4Diagram-LMCZKHZV.B73xdpNh.js +1580 -0
  37. package/library/chunks/{capitalize.BTYI3NfM.js → capitalize.CIBKBL10.js} +1 -1
  38. package/library/chunks/{cardinal.BCA_LB0u.js → cardinal.BXTAeOLk.js} +1 -0
  39. package/library/chunks/cardinalClosed.Mdce1x5M.js +59 -0
  40. package/library/chunks/channel.s_XjcUYI.js +5 -0
  41. package/library/chunks/chunk-2Q5K7J3B.Dy1Z-bMH.js +15 -0
  42. package/library/chunks/chunk-32BRIVSS.BbIrVi3j.js +71 -0
  43. package/library/chunks/chunk-5VM5RSS4.D0-lddDM.js +19 -0
  44. package/library/chunks/chunk-EX3LRPZG.L693y8d4.js +1412 -0
  45. package/library/chunks/chunk-JWPE2WC7.BV0i4LDu.js +8 -0
  46. package/library/chunks/chunk-MOJQB5TN.BZstBMYC.js +664 -0
  47. package/library/chunks/chunk-RYQCIY6F.BMsuG7ya.js +314 -0
  48. package/library/chunks/chunk-V7JOEXUC.DcJlyQO0.js +1537 -0
  49. package/library/chunks/chunk-VR4S4FIN.BpryBs7q.js +19 -0
  50. package/library/chunks/chunk-XXDRQBXY.CSOjab1V.js +11 -0
  51. package/library/chunks/classDiagram-OUVF2IWQ.Dvz7CNwe.js +18 -0
  52. package/library/chunks/classDiagram-v2-EOCWNBFH.Dvz7CNwe.js +18 -0
  53. package/library/chunks/cloneDeep.B-5z5SI3.js +51 -0
  54. package/library/chunks/{color-swatch-group.CLv1LSZy.js → color-swatch-group.ChP9amU9.js} +2576 -2723
  55. package/library/chunks/{color-swatch.DsWP2fd-.js → color-swatch.QsHoy_K1.js} +1 -1
  56. package/library/chunks/{colorPicker.GYgA76kc.js → colorPicker.Cg6Zxf8f.js} +5 -5
  57. package/library/chunks/{confirm-popover.C-eHPJaU.js → confirm-popover.D8mdy6KG.js} +2 -2
  58. package/library/chunks/constant.BQ4UJ-kW.js +12 -0
  59. package/library/chunks/cose-bilkent-JH36ORCC.cfzS2XsK.js +2612 -0
  60. package/library/chunks/cynefin-VYW2F7L2.c7H5z9nQ.js +23790 -0
  61. package/library/chunks/cynefinDiagram-TSTJHNR4.C8SgNXWI.js +299 -0
  62. package/library/chunks/cytoscape.esm.Cbrwqewp.js +18786 -0
  63. package/library/chunks/dagre-VKFMJZFB.D5B1cAri.js +343 -0
  64. package/library/chunks/debounce.Bv1rtE8D.js +55 -0
  65. package/library/chunks/defaultLocale.CPy_WVtp.js +171 -0
  66. package/library/chunks/descending.AD5n-tFs.js +10 -0
  67. package/library/chunks/diagram-FQU43EPY.DJukDcLl.js +466 -0
  68. package/library/chunks/diagram-G47NLZAW.BBOvcbcR.js +316 -0
  69. package/library/chunks/diagram-NH7WQ7WH.DOpRwmC2.js +142 -0
  70. package/library/chunks/diagram-OA4YK3LP.Dm5WJs91.js +350 -0
  71. package/library/chunks/diagram-WEI45ONY.COuzdmSR.js +217 -0
  72. package/library/chunks/{dialog.Bzf4-IgH.js → dialog.05FgdLBZ.js} +2 -2
  73. package/library/chunks/{document-viewer.CGyOG1yw.js → document-viewer.Cng07M-1.js} +7 -7
  74. package/library/chunks/{dot-pagination.BdZc-K0r.js → dot-pagination.Pg9O0nIh.js} +1 -1
  75. package/library/chunks/ebnfDiagram-CCIWWBDH.Dz-QBH6Y.js +111 -0
  76. package/library/chunks/erDiagram-Q63AITRT.sSw_w-2B.js +913 -0
  77. package/library/chunks/{exporting.DQhKH1BX.js → exporting.Djsoh75g.js} +11 -11
  78. package/library/chunks/flow.aZRVH3p1.js +1304 -0
  79. package/library/chunks/flowDiagram-23GEKE2U.CMMbuUHf.js +1642 -0
  80. package/library/chunks/{folder-select.BKAuh4GE.js → folder-select.Dw1ZKZAq.js} +160 -140
  81. package/library/chunks/{gantt.tu-w6fQ5.js → gantt.Bv6_3H9y.js} +22 -22
  82. package/library/chunks/ganttDiagram-NO4QXBWP.DZdwd0O4.js +2715 -0
  83. package/library/chunks/gitGraphDiagram-IHSO6WYX.F6mwS3uS.js +818 -0
  84. package/library/chunks/graph.XHMI5hta.js +653 -0
  85. package/library/chunks/{header.e1FLwywx.js → header.DDI0MfJA.js} +1 -1
  86. package/library/chunks/{hierarchy.CTnBzzmQ.js → hierarchy.C4LxmFxx.js} +836 -904
  87. package/library/chunks/{hub-connection.CA_wS_wh.js → hub-connection.BtevPWYb.js} +1 -1
  88. package/library/chunks/{icon-button.DbVIFgu7.js → icon-button.BwmMJ0bI.js} +1 -1
  89. package/library/chunks/{icon.mxNZ85k0.js → icon.D5iM9wXS.js} +1 -1
  90. package/library/chunks/{iframe.DcHjOcLG.js → iframe.Cc-xZIm_.js} +1 -1
  91. package/library/chunks/{image.5mhGPvMN.js → image.BgODrAzQ.js} +2 -2
  92. package/library/chunks/{image.QVlPFadX.js → image.Y5c_hFx8.js} +1 -1
  93. package/library/chunks/{index.BVDhdCk-.js → index.2SOQHTpX.js} +23 -23
  94. package/library/chunks/index.BDn1QW8J.js +167 -0
  95. package/library/chunks/{index.DcjJFMlq.js → index.CrhRU5m8.js} +284 -273
  96. package/library/chunks/index.thKLME8E.js +77 -0
  97. package/library/chunks/infoDiagram-FWYZ7A6U.BnktKL7i.js +24 -0
  98. package/library/chunks/init.DjUOC4st.js +16 -0
  99. package/library/chunks/{input.BcyLZUmv.js → input.DOorVTYZ.js} +2 -2
  100. package/library/chunks/isArrayLikeObject.D7afXo-f.js +86 -0
  101. package/library/chunks/isEmpty.DtTJTUcf.js +27 -0
  102. package/library/chunks/ishikawaDiagram-FXEZZL3T.CFp-9Kes.js +621 -0
  103. package/library/chunks/journeyDiagram-5HDEW3XC.BxO1aPu_.js +837 -0
  104. package/library/chunks/{json.D7WeFaJm.js → json.Dz5QFEi5.js} +3 -3
  105. package/library/chunks/kanban-definition-HUTT4EX6.Bk8vmLFK.js +724 -0
  106. package/library/chunks/katex.DoRnZ_sp.js +11682 -0
  107. package/library/chunks/layout.DZcMFKol.js +1446 -0
  108. package/library/chunks/line.DP-iSN_J.js +157 -0
  109. package/library/chunks/linear.TNHhsH1m.js +215 -0
  110. package/library/chunks/{map.BjtxEozr.js → map.CBcV0WVq.js} +100 -105
  111. package/library/chunks/map.DJnohTgl.js +18 -0
  112. package/library/chunks/markdown.I1AJG75v.js +4180 -0
  113. package/library/chunks/math.D2lKC7md.js +22 -0
  114. package/library/chunks/mermaid.core.Dspbw7Ig.js +13598 -0
  115. package/library/chunks/mindmap-definition-LN4V7U3C.DuCBBYwE.js +808 -0
  116. package/library/chunks/{number.CtCaI0T_.js → number.Cx2ncfJJ.js} +2 -2
  117. package/library/chunks/{option.qN3aaqVI.js → option.DyNR1vzy.js} +2 -2
  118. package/library/chunks/ordinal.bqVaUip-.js +61 -0
  119. package/library/chunks/{pagination.Cupa46TN.js → pagination.qFmncShC.js} +5 -5
  120. package/library/chunks/pegDiagram-2B236MQR.DQrkEdJr.js +97 -0
  121. package/library/chunks/{percent.D_CkaRGb.js → percent.D8mkiJ2G.js} +17 -17
  122. package/library/chunks/pieDiagram-ENE6RG2P.B6nPW8Pj.js +212 -0
  123. package/library/chunks/position-picker.DjnhxIKF.js +4 -0
  124. package/library/chunks/quadrantDiagram-ABIIQ3AL.BFy9moxz.js +1026 -0
  125. package/library/chunks/{radar.BMKaNvJH.js → radar.B3p5bRix.js} +78 -129
  126. package/library/chunks/railroadDiagram-RFXS5EU6.CSao8YZX.js +79 -0
  127. package/library/chunks/range.DdOGybNB.js +9 -0
  128. package/library/chunks/requirementDiagram-TGXJPOKE.CjpliZnF.js +882 -0
  129. package/library/chunks/sankey.BR94A-8L.js +294 -0
  130. package/library/chunks/sankeyDiagram-HTMAVEWB.D8aAxVGe.js +564 -0
  131. package/library/chunks/select.C6_sM3Pr.js +7 -0
  132. package/library/chunks/sequenceDiagram-DBY2YBRQ.Cu9MV3h-.js +2891 -0
  133. package/library/chunks/sizeCapture-X5ZJPWSS.BDByEFcW.js +46 -0
  134. package/library/chunks/{sliceGrouper.C-t5ZRrz.js → sliceGrouper.CcRqQhZX.js} +1 -1
  135. package/library/chunks/stateDiagram-2N3HPSRC.DvrAW9Ck.js +267 -0
  136. package/library/chunks/stateDiagram-v2-6OUMAXLB.CFfuaFM1.js +18 -0
  137. package/library/chunks/step.almIqwJ6.js +51 -0
  138. package/library/chunks/{stock.vF_pji1F.js → stock.CQbn6zW4.js} +9 -9
  139. package/library/chunks/swimlanes-5IMT3BWC.AtMD47q7.js +5332 -0
  140. package/library/chunks/swimlanesDiagram-G3AALYLV.26A1eX7s.js +15 -0
  141. package/library/chunks/{tab-group.kSg5_10g.js → tab-group.1Y71_aN8.js} +3 -3
  142. package/library/chunks/{time.DWfbnPnM.js → time.DYWuX2id.js} +1 -1
  143. package/library/chunks/timeline-definition-FHXFAJF6.CYSh6xl5.js +1058 -0
  144. package/library/chunks/{timeline.gWu0up6r.js → timeline.Czz_uBEd.js} +33 -32
  145. package/library/chunks/toNumber.MuDz8DgU.js +31 -0
  146. package/library/chunks/{toString.Dcbz5jVT.js → toString.B1zKIiZc.js} +1 -1
  147. package/library/chunks/{toast.TDU3wVhq.js → toast.CXEAfCvN.js} +1 -1
  148. package/library/chunks/transformation.8uLv6uwG.js +264 -0
  149. package/library/chunks/{tree.C2dPd6gt.js → tree.vn5sHbdt.js} +123 -117
  150. package/library/chunks/value.BXEGBVFV.js +44 -0
  151. package/library/chunks/{venn.BVBe-JXs.js → venn.B5Jl-c4i.js} +2 -2
  152. package/library/chunks/vennDiagram-L72KCM5P.CSk1WWlu.js +1581 -0
  153. package/library/chunks/wardleyDiagram-EHGQE667.C7UzXYG7.js +675 -0
  154. package/library/chunks/{watch.DOt4Mabe.js → watch.DJF5K-8U.js} +27 -27
  155. package/library/chunks/{wc.DTNpfIc1.js → wc.B2THb2Kk.js} +18 -18
  156. package/library/chunks/xy.BO6U5QrZ.js +294 -0
  157. package/library/chunks/xychartDiagram-FW5EYKEG.idiZWvYS.js +1383 -0
  158. package/library/components/alert.js +2 -2
  159. package/library/components/am-chart.js +3 -3
  160. package/library/components/animated-image.js +2 -2
  161. package/library/components/animation.js +2 -2
  162. package/library/components/array-line-clamp.js +1 -1
  163. package/library/components/asset-link-format.js +8 -7
  164. package/library/components/atoms.js +29 -29
  165. package/library/components/audio.js +3 -3
  166. package/library/components/avatar.js +2 -2
  167. package/library/components/border-input-group.js +1 -1
  168. package/library/components/breadcrumb-item.js +1 -1
  169. package/library/components/breadcrumb.js +1 -1
  170. package/library/components/button.js +3 -3
  171. package/library/components/checkbox.js +195 -18
  172. package/library/components/color-picker.js +4 -4
  173. package/library/components/color-swatch-group.js +5 -5
  174. package/library/components/color-swatch.js +2 -2
  175. package/library/components/confirm-popover.js +3 -3
  176. package/library/components/copy-button.js +2 -2
  177. package/library/components/corner-position-input-group.js +2 -2
  178. package/library/components/cropper.js +4 -4
  179. package/library/components/date-calendar.js +1 -1
  180. package/library/components/details.js +2 -2
  181. package/library/components/dialog.js +3 -3
  182. package/library/components/diff.js +1 -1
  183. package/library/components/divider.js +1 -1
  184. package/library/components/document-viewer.js +3 -3
  185. package/library/components/dot-pagination.js +2 -2
  186. package/library/components/drawer.js +3 -3
  187. package/library/components/dropdown.js +2 -2
  188. package/library/components/dynamic-select.js +6 -6
  189. package/library/components/e-chart.js +1 -1
  190. package/library/components/element-clamp.js +2 -2
  191. package/library/components/file-on-demand.js +350 -374
  192. package/library/components/folder-select.js +5 -5
  193. package/library/components/format-time.js +2 -2
  194. package/library/components/grid-item.js +1 -1
  195. package/library/components/header.js +2 -2
  196. package/library/components/hub-connection.js +2 -2
  197. package/library/components/icon-button.js +2 -2
  198. package/library/components/icon.js +2 -2
  199. package/library/components/iframe.js +2 -2
  200. package/library/components/image-comparer.js +2 -2
  201. package/library/components/image.js +3 -3
  202. package/library/components/include.js +1 -1
  203. package/library/components/input.js +3 -3
  204. package/library/components/line-clamp.js +1 -1
  205. package/library/components/markdown.js +11 -2704
  206. package/library/components/masonry.js +76 -73
  207. package/library/components/menu-item.js +2 -2
  208. package/library/components/molecules.js +3 -3
  209. package/library/components/mutation-observer.js +1 -1
  210. package/library/components/option.js +3 -3
  211. package/library/components/organisms.js +2 -2
  212. package/library/components/padding-input-group.js +1 -1
  213. package/library/components/pagination.js +6 -6
  214. package/library/components/position-picker.js +25 -25
  215. package/library/components/qr-code.js +1 -1
  216. package/library/components/radio-button.js +1 -1
  217. package/library/components/radio-card.js +1 -1
  218. package/library/components/radio-group.js +1 -1
  219. package/library/components/radio.js +2 -2
  220. package/library/components/range.js +1 -1
  221. package/library/components/rating.js +2 -2
  222. package/library/components/resize-observer.js +1 -1
  223. package/library/components/select.js +3 -3
  224. package/library/components/shadow-input-group.js +1 -1
  225. package/library/components/share-option-list.js +2 -2
  226. package/library/components/sidebar.js +3 -3
  227. package/library/components/size-input-group.js +3 -3
  228. package/library/components/split-panel.js +1 -1
  229. package/library/components/step.js +1 -1
  230. package/library/components/stepper-wizard.js +1 -1
  231. package/library/components/stepper.js +1 -1
  232. package/library/components/switch.js +1 -1
  233. package/library/components/tab-group.js +4 -4
  234. package/library/components/tab-panel.js +1 -1
  235. package/library/components/tab.js +2 -2
  236. package/library/components/tag.js +1 -1
  237. package/library/components/textarea.js +1 -1
  238. package/library/components/timecode.js +1 -1
  239. package/library/components/tooltip.js +1 -1
  240. package/library/components/tree-item.js +4 -4
  241. package/library/components/tree.js +2 -2
  242. package/library/components/typeface.js +2 -2
  243. package/library/components/types.js +122327 -120686
  244. package/library/components/video.js +2 -2
  245. package/library/package.json +2 -1
  246. package/library/packages/atoms/src/components/markdown/markdown.d.ts +41 -1
  247. package/library/packages/atoms/src/components/markdown/parser.d.ts +18 -3
  248. package/library/packages/atoms/src/components/markdown/styles.d.ts +17 -0
  249. package/library/packages/atoms/src/components/tree/tree.d.ts +7 -1
  250. package/library/packages/atoms/src/components/tree-item/tree-item.d.ts +11 -1
  251. package/library/packages/events/src/cx-folder-select-loading-change.d.ts +8 -0
  252. package/library/packages/events/src/events.d.ts +1 -0
  253. package/library/packages/hybrid/table-core/src/table/styles/table-frozen.styles.d.ts +8 -0
  254. package/library/packages/hybrid/table-core/src/table/table.d.ts +9 -1
  255. package/library/packages/hybrid/table-core/src/tabulator-tables/modules/FrozenColumns/FrozenColumns.d.ts +14 -1
  256. package/library/packages/hybrid/table-core/src/tabulator-tables/modules/ResizeColumns/ResizeColumns.d.ts +18 -1
  257. package/library/packages/molecules/src/folder-select/components/folder-select-tree/folder-select-tree.d.ts +7 -0
  258. package/library/packages/molecules/src/folder-select/folder-select.d.ts +7 -0
  259. package/library/packages/molecules/src/index.d.ts +1 -0
  260. package/library/packages/molecules/src/markdown-viewer/markdown-viewer.d.ts +124 -0
  261. package/library/packages/molecules/src/markdown-viewer/markdown-viewer.styles.d.ts +6 -0
  262. package/library/packages/molecules/src/masonry/masonry.d.ts +5 -0
  263. package/library/packages/organisms/src/asset-link-format/asset-link-format.d.ts +9 -0
  264. package/library/packages/organisms/src/asset-link-format/components/asset-link-format-crop/asset-link-format-crop.d.ts +30 -0
  265. package/library/packages/tools/src/tiptap/utils/md/editor-controller.d.ts +57 -0
  266. package/library/packages/tools/src/tiptap/utils/md/from-markdown.d.ts +11 -0
  267. package/library/packages/tools/src/tiptap/utils/md/input-rules.d.ts +15 -0
  268. package/library/packages/tools/src/tiptap/utils/md/schema.d.ts +13 -0
  269. package/library/packages/tools/src/tiptap/utils/md/to-markdown.d.ts +14 -0
  270. package/library/packages/types/src/asset-link-format.d.ts +19 -0
  271. package/library/packages/types/src/markdown-viewer.d.ts +12 -0
  272. package/library/packages/types/src/tree-item.d.ts +12 -0
  273. package/library/react-web-component.d.ts +86 -8
  274. package/library/utils.js +64 -65
  275. package/package.json +2 -1
  276. package/library/chunks/Slice.C5lVu2g_.js +0 -120
  277. package/library/chunks/_baseXor.VohG8cOH.js +0 -116
  278. package/library/chunks/asset-link-format.QzzboHHE.js +0 -6
  279. package/library/chunks/checkbox.3i2j3PHc.js +0 -198
  280. package/library/chunks/content-builder.BU8X7I6V.js +0 -60
  281. package/library/chunks/debounce.C_J-9zJi.js +0 -82
  282. package/library/chunks/flow.hz0UDjCb.js +0 -1594
  283. package/library/chunks/index.DU0XUO4k.js +0 -176
  284. package/library/chunks/transformation.D1alV_s4.js +0 -189
  285. package/library/chunks/xy.BNgyrwGD.js +0 -333
@@ -0,0 +1,1304 @@
1
+ import { D as Je, x as P, aj as Qe, e as w, ak as ee, q as S, H as Ue, F as Ze, I as et, J as he, C as Ae, a as F, _ as j, L as T, T as C, b as Oe, ah as H, j as x, h as b, G as We, P as tt, b5 as st, b6 as pe, m as E, f as te, r as me, b1 as Le, R as it, aU as I, b3 as Se, b7 as nt } from "./am-chart.Cr-vMjcY.js";
2
+ import { L as Te } from "./LinearGradient.CVN1VJp-.js";
3
+ import "./index.CrhRU5m8.js";
4
+ import "./transform.BuqENXeT.js";
5
+ import { S as at } from "./Slice.BVI8rfHI.js";
6
+ import { R as ot } from "./RadialLabel.7ka6ND-t.js";
7
+ import { p as rt, l as lt } from "./line.DP-iSN_J.js";
8
+ import { a as ct, d as ht } from "./descending.AD5n-tFs.js";
9
+ import { c as Ce, a as Pe } from "./MonotoneXTension.CJMEHHj3.js";
10
+ import { S as gt, l as dt, c as ut, j as ft, r as pt } from "./sankey.BR94A-8L.js";
11
+ import { C as mt } from "./Circle.6LomW0ej.js";
12
+ class kt extends Je {
13
+ setupDefaultRules() {
14
+ super.setupDefaultRules();
15
+ const t = this._root.interfaceColors, e = this.rule.bind(this);
16
+ e("Flow").setAll({
17
+ width: P,
18
+ height: P,
19
+ paddingLeft: 10,
20
+ paddingRight: 10,
21
+ paddingTop: 10,
22
+ paddingBottom: 10,
23
+ hiddenSize: 0.05,
24
+ minSize: 0,
25
+ minHiddenValue: 0
26
+ }), e("FlowNodes").setAll({
27
+ colors: Qe.new(this._root, {}),
28
+ legendLabelText: "{name}",
29
+ legendValueText: "{sumOutgoing.formatNumber('#.#')}"
30
+ }), e("FlowNode").setAll({
31
+ setStateOnChildren: !0,
32
+ cursorOverStyle: "pointer",
33
+ toggleKey: "disabled"
34
+ }), e("FlowNode").states.create("disabled", {}), e("FlowNode", ["unknown"]).setAll({
35
+ draggable: !1,
36
+ opacity: 0
37
+ }), e("Label", ["flow"]).states.create("disabled", {
38
+ fill: t.get("disabled")
39
+ }), e("RadialLabel", ["flow", "node"]).setAll({
40
+ text: "{name}",
41
+ populateText: !0
42
+ }), e("FlowLink").setAll({
43
+ fillStyle: "gradient",
44
+ strokeStyle: "gradient"
45
+ }), e("FlowLink", ["source", "unknown"]).setAll({}), e("FlowLink", ["target", "unknown"]).setAll({}), e("FlowNode").events.on("pointerover", (s) => {
46
+ const n = s.target.dataItem;
47
+ if (n) {
48
+ const r = n.get("outgoingLinks");
49
+ r && w(r, (a) => {
50
+ const l = a.get("link");
51
+ l.hover(), l.hideTooltip();
52
+ });
53
+ const o = n.get("incomingLinks");
54
+ o && w(o, (a) => {
55
+ const l = a.get("link");
56
+ l.hover(), l.hideTooltip();
57
+ });
58
+ }
59
+ let i = n.get("slice") || n.get("rectangle");
60
+ i && i.get("tooltipText") && i.showTooltip();
61
+ }), e("FlowNode").events.on("pointerout", (s) => {
62
+ const n = s.target.dataItem;
63
+ if (n) {
64
+ const i = n.get("outgoingLinks");
65
+ i && w(i, (o) => {
66
+ o.get("link").unhover();
67
+ });
68
+ const r = n.get("incomingLinks");
69
+ r && w(r, (o) => {
70
+ o.get("link").unhover();
71
+ });
72
+ }
73
+ }), e("Sankey").setAll({
74
+ orientation: "horizontal",
75
+ nodeAlign: "justify",
76
+ linkTension: 0.5,
77
+ nodePadding: 10,
78
+ nodeWidth: 10
79
+ }), e("RoundedRectangle", ["sankey", "node", "shape"]).setAll({
80
+ cornerRadiusTL: 0,
81
+ cornerRadiusBL: 0,
82
+ cornerRadiusTR: 0,
83
+ cornerRadiusBR: 0
84
+ }), e("RoundedRectangle", ["shape"]).states.create("disabled", {
85
+ fill: t.get("disabled")
86
+ }), e("SankeyLink").setAll({
87
+ controlPointDistance: 0.2
88
+ }), e("FlowNode", ["sankey"]).setAll({
89
+ draggable: !0
90
+ });
91
+ {
92
+ const s = e("Graphics", ["sankey", "link"]);
93
+ s.setAll({
94
+ fillOpacity: 0.2,
95
+ strokeOpacity: 0,
96
+ interactive: !0,
97
+ tooltipText: "{sourceId} - {targetId}: {value}"
98
+ }), ee(s, "fill", t, "grid");
99
+ }
100
+ e("Graphics", ["sankey", "link"]).states.create("hover", { fillOpacity: 0.5 }), e("Label", ["sankey", "node"]).setAll({
101
+ text: "{name}",
102
+ populateText: !0
103
+ }), e("Label", ["sankey", "horizontal"]).setAll({
104
+ y: S,
105
+ centerY: S,
106
+ paddingLeft: 15
107
+ }), e("Label", ["sankey", "vertical"]).setAll({
108
+ x: S,
109
+ centerX: S,
110
+ paddingTop: 15
111
+ }), e("Chord").setAll({
112
+ radius: Ue(90),
113
+ nodeWidth: 10,
114
+ padAngle: 1,
115
+ startAngle: 0,
116
+ sort: "none"
117
+ }), e("ChordDirected").setAll({
118
+ linkHeadRadius: 10
119
+ }), e("ChordNodes").setAll({
120
+ x: S,
121
+ y: S
122
+ }), e("FlowNode", ["chord"]).setAll({
123
+ draggable: !0
124
+ }), e("ChordLink").setAll({
125
+ sourceRadius: P,
126
+ targetRadius: P,
127
+ fillStyle: "solid",
128
+ strokeStyle: "solid",
129
+ tooltipText: "{sourceId} - {targetId}: {value}"
130
+ }), e("Slice", ["chord", "node", "shape"]).setAll({
131
+ cornerRadius: 0
132
+ }), e("Slice", ["shape"]).states.create("disabled", {
133
+ fill: t.get("disabled")
134
+ }), e("RadialLabel", ["chord", "node"]).setAll({
135
+ radius: 5,
136
+ textType: "circular"
137
+ }), e("ChordLinkDirected").setAll({
138
+ headRadius: 10
139
+ });
140
+ {
141
+ const s = e("Graphics", ["chord", "link", "shape"]);
142
+ s.setAll({
143
+ fillOpacity: 0.2,
144
+ strokeOpacity: 0,
145
+ interactive: !0
146
+ }), ee(s, "fill", t, "grid"), ee(s, "stroke", t, "grid");
147
+ }
148
+ e("Graphics", ["chord", "link", "shape"]).states.create("hover", { fillOpacity: 0.5 }), e("ChordNonRibbon").setAll({
149
+ linkType: "curve"
150
+ // "line" | "curve"
151
+ }), e("ChordLink", ["basic"]).setAll({
152
+ fillStyle: "none",
153
+ strokeStyle: "source"
154
+ }), e("Graphics", ["chord", "link", "shape", "basic"]).setAll({
155
+ strokeOpacity: 0.4
156
+ }), e("Graphics", ["chord", "link", "shape", "basic"]).states.create("hover", { strokeWidth: 2, strokeOpacity: 1 }), e("ArcDiagram").setAll({
157
+ orientation: "horizontal",
158
+ nodePadding: 5,
159
+ minRadius: 5,
160
+ radiusKey: "sum",
161
+ animationEasing: Ze(et)
162
+ }), e("ArcDiagramNodes", ["horizontal"]).setAll({
163
+ y: P,
164
+ centerY: P
165
+ }), e("ArcDiagramNodes", ["vertical"]).setAll({
166
+ centerX: 0
167
+ }), e("Circle", ["arcdiagram", "node", "shape"]).setAll({
168
+ tooltipText: "{name}: {sum}"
169
+ }), e("Circle", ["arcdiagram", "node", "shape"]).states.create("disabled", {
170
+ fill: t.get("disabled")
171
+ });
172
+ {
173
+ const s = e("ArcDiagramLink", ["link", "shape"]);
174
+ s.setAll({
175
+ strokeOpacity: 0.15,
176
+ strokeStyle: "solid",
177
+ fillStyle: "none",
178
+ isMeasured: !1
179
+ }), ee(s, "stroke", t, "grid");
180
+ }
181
+ e("ArcDiagramLink", ["link", "shape"]).states.create("hover", {
182
+ strokeOpacity: 1
183
+ }), e("Label", ["arcdiagram", "node"]).setAll({
184
+ text: "{name}",
185
+ populateText: !0
186
+ }), e("Label", ["arcdiagram", "horizontal"]).setAll({
187
+ y: 0,
188
+ centerY: S,
189
+ centerX: P,
190
+ rotation: -90
191
+ }), e("Label", ["arcdiagram", "vertical"]).setAll({
192
+ centerY: S,
193
+ centerX: P,
194
+ paddingRight: 15
195
+ });
196
+ }
197
+ }
198
+ class R extends he {
199
+ constructor() {
200
+ super(...arguments), this.linksContainer = this.children.push(Ae.new(this._root, {})), this._nodesData = [], this._linksData = [], this._index = 0, this._nodesDataSet = !1, this._linksByIndex = {};
201
+ }
202
+ _afterNew() {
203
+ this._defaultThemes.push(kt.new(this._root)), this.fields.push("disabled", "sourceId", "targetId"), this.nodes && (this.nodes.flow = this), super._afterNew(), this.children.push(this.bulletsContainer);
204
+ }
205
+ processDataItem(t) {
206
+ super.processDataItem(t);
207
+ const e = this.nodes;
208
+ if (e) {
209
+ let s = !1, n = t.get("sourceId"), i = e.getDataItemById(n);
210
+ i || (n == null && (n = "undefined" + this._index, this._index++, s = !0), e.data.push({ id: n, unknown: s }), i = e.getDataItemById(n), s || i.set("name", n)), s = !1;
211
+ let r = t.get("targetId"), o = e.getDataItemById(r);
212
+ o || (r == null && (r = "undefined" + this._index, this._index++, s = !0), e.data.push({ id: r, unknown: s }), o = e.getDataItemById(r), s || o.set("name", r)), i && (t.set("source", i), e.addOutgoingLink(i, t)), o && (t.set("target", o), e.addincomingLink(o, t)), t.set("link", this.makeLink(t));
213
+ const a = this.nodes.dataItems.indexOf(i), l = this.nodes.dataItems.indexOf(o);
214
+ this._linksByIndex[a + "_" + l] = t, i.get("unknown") && (o && i.set("fill", o.get("fill")), t.get("link").set("fillStyle", "gradient")), o.get("unknown") && (i && o.set("fill", i.get("fill")), t.get("link").set("fillStyle", "gradient")), this._updateLinkColor(t);
215
+ }
216
+ }
217
+ _onDataClear() {
218
+ this.nodes._userDataSet || (this.nodes.data.setAll([]), this.nodes._userDataSet = !1);
219
+ }
220
+ _prepareChildren() {
221
+ super._prepareChildren();
222
+ let t = 1 / 0, e = -1 / 0, s = 0;
223
+ if (this._valuesDirty) {
224
+ this._nodesData = [];
225
+ const n = this.nodes;
226
+ n && w(n.dataItems, (i) => {
227
+ const r = i.get("d3SankeyNode");
228
+ this._nodesData.push(r);
229
+ const o = i.get("incomingLinks");
230
+ let a = 0, l = 0;
231
+ o && w(o, (u) => {
232
+ const _ = u.get("value"), f = u.get("valueWorking");
233
+ a += _, l += f;
234
+ }), i.set("sumIncoming", a), i.set("sumIncomingWorking", l);
235
+ const c = i.get("outgoingLinks");
236
+ let g = 0, k = 0;
237
+ c && w(c, (u) => {
238
+ const _ = u.get("value"), f = u.get("valueWorking");
239
+ g += _, k += f;
240
+ }), i.set("sumOutgoing", g), i.set("sumOutgoingWorking", k), i.set("sum", a + g), i.set("sumWorking", l + k), n.updateLegendValue(i);
241
+ }), this._linksData = [], w(this.dataItems, (i) => {
242
+ let r = i.get("value");
243
+ F(r) && (r < t && (t = r), r > e && (e = r), s += r);
244
+ }), w(this.dataItems, (i) => {
245
+ let r = i.get("value");
246
+ if (F(r)) {
247
+ let o = i.get("valueWorking"), a = this.get("minSize", 0);
248
+ a > 0 && o < a * s && (o = a * s);
249
+ let l = { source: i.get("source").get("d3SankeyNode"), target: i.get("target").get("d3SankeyNode"), value: o };
250
+ i.setRaw("d3SankeyLink", l), this._linksData.push(l), this.updateLegendValue(i);
251
+ }
252
+ }), this.setPrivateRaw("valueHigh", e), this.setPrivateRaw("valueLow", t), this.setPrivateRaw("valueSum", s);
253
+ }
254
+ }
255
+ _updateLinkColor(t) {
256
+ const e = t.get("link"), s = e.get("fillStyle"), n = e.get("strokeStyle"), i = t.get("source"), r = t.get("target"), o = i.get("fill"), a = r.get("fill");
257
+ switch (e.remove("fillGradient"), e.remove("strokeGradient"), s) {
258
+ case "solid":
259
+ e._applyTemplates();
260
+ break;
261
+ case "source":
262
+ e.set("fill", o);
263
+ break;
264
+ case "target":
265
+ e.set("fill", a);
266
+ break;
267
+ case "gradient":
268
+ let l = e._fillGradient;
269
+ l || (l = Te.new(this._root, {}));
270
+ const c = { color: o };
271
+ i.get("unknown") && (c.opacity = 0);
272
+ const g = { color: a };
273
+ r.get("unknown") && (g.opacity = 0), l.set("stops", [c, g]), e._fillGradient = l, e.set("fillGradient", l);
274
+ break;
275
+ case "none":
276
+ e.set("fill", void 0);
277
+ break;
278
+ }
279
+ switch (n) {
280
+ case "solid":
281
+ e._applyTemplates();
282
+ break;
283
+ case "source":
284
+ e.set("stroke", o);
285
+ break;
286
+ case "target":
287
+ e.set("stroke", a);
288
+ break;
289
+ case "gradient":
290
+ let l = e._strokeGradient;
291
+ if (!l) {
292
+ l = Te.new(this._root, {});
293
+ const c = { color: o };
294
+ i.get("unknown") && (c.opacity = 0);
295
+ const g = { color: a };
296
+ r.get("unknown") && (g.opacity = 0), l.set("stops", [c, g]), e._strokeGradient = l;
297
+ }
298
+ e.set("strokeGradient", l);
299
+ break;
300
+ case "none":
301
+ e.remove("stroke");
302
+ break;
303
+ }
304
+ }
305
+ /**
306
+ * @ignore
307
+ */
308
+ disposeDataItem(t) {
309
+ super.disposeDataItem(t);
310
+ let e = t.get("link");
311
+ e && (this.links.removeValue(e), e.dispose());
312
+ }
313
+ /**
314
+ * Shows diagram's data item.
315
+ *
316
+ * @param dataItem Data item
317
+ * @param duration Animation duration in milliseconds
318
+ * @return Promise
319
+ */
320
+ hideDataItem(t, e) {
321
+ const s = Object.create(null, {
322
+ hideDataItem: { get: () => super.hideDataItem }
323
+ });
324
+ return j(this, void 0, void 0, function* () {
325
+ const n = [s.hideDataItem.call(this, t, e)], i = this.states.create("hidden", {}), r = "stateAnimationDuration", o = "stateAnimationEasing";
326
+ F(e) || (e = i.get(r, this.get(r, 0)));
327
+ const a = i.get(o, this.get(o));
328
+ n.push(t.animate({
329
+ key: "valueWorking",
330
+ to: Math.max(this.get("minHiddenValue", 0), this.get("hiddenSize", 0) * t.get("value")),
331
+ duration: e,
332
+ easing: a
333
+ }).waitForStop()), t.get("link").hide(), yield Promise.all(n);
334
+ });
335
+ }
336
+ /**
337
+ * Shows diagram's data item.
338
+ *
339
+ * @param dataItem Data item
340
+ * @param duration Animation duration in milliseconds
341
+ * @return Promise
342
+ */
343
+ showDataItem(t, e) {
344
+ const s = Object.create(null, {
345
+ showDataItem: { get: () => super.showDataItem }
346
+ });
347
+ return j(this, void 0, void 0, function* () {
348
+ const n = [s.showDataItem.call(this, t, e)];
349
+ F(e) || (e = this.get("stateAnimationDuration", 0));
350
+ const i = this.get("stateAnimationEasing");
351
+ n.push(t.animate({ key: "valueWorking", to: t.get("value"), duration: e, easing: i }).waitForStop()), t.get("link").show(), yield Promise.all(n);
352
+ });
353
+ }
354
+ _positionBullet(t) {
355
+ const e = t.get("sprite");
356
+ if (e) {
357
+ const s = e.dataItem;
358
+ if (s) {
359
+ const n = s.get("link"), i = t.get("sprite");
360
+ if (i) {
361
+ const r = n.getPoint(this._getBulletLocation(t));
362
+ i.setAll({ x: r.x, y: r.y }), t.get("autoRotate") && i.set("rotation", r.angle + t.get("autoRotateAngle", 0));
363
+ }
364
+ }
365
+ }
366
+ }
367
+ _getBulletLocation(t) {
368
+ return t.get("locationY", 0);
369
+ }
370
+ }
371
+ R.className = "Flow";
372
+ R.classNames = he.classNames.concat([R.className]);
373
+ var Re = Math.abs, B = Math.cos, V = Math.sin, ze = Math.PI, se = ze / 2, Ge = ze * 2, Me = Math.max, ke = 1e-12;
374
+ function _e(m, t) {
375
+ return Array.from({ length: t - m }, (e, s) => m + s);
376
+ }
377
+ function _t(m) {
378
+ return function(t, e) {
379
+ return m(
380
+ t.source.value + t.target.value,
381
+ e.source.value + e.target.value
382
+ );
383
+ };
384
+ }
385
+ function yt() {
386
+ return Be(!1);
387
+ }
388
+ function wt() {
389
+ return Be(!0);
390
+ }
391
+ function Be(m, t) {
392
+ var e = 0, s = null, n = null, i = null;
393
+ function r(o) {
394
+ var a = o.length, l = new Array(a), c = _e(0, a), g = new Array(a * a), k = new Array(a), u = 0, _;
395
+ o = Float64Array.from({ length: a * a }, (f, h) => o[h / a | 0][h % a]);
396
+ for (let f = 0; f < a; ++f) {
397
+ let h = 0;
398
+ for (let y = 0; y < a; ++y) h += o[f * a + y] + m * o[y * a + f];
399
+ u += l[f] = h;
400
+ }
401
+ u = Me(0, Ge - e * a) / u, _ = u ? e : Ge / a;
402
+ {
403
+ let f = 0;
404
+ s && c.sort((h, y) => s(l[h], l[y]));
405
+ for (const h of c) {
406
+ const y = f;
407
+ if (m) {
408
+ const v = _e(~a + 1, a).filter((d) => d < 0 ? o[~d * a + h] : o[h * a + d]);
409
+ n && v.sort((d, p) => n(d < 0 ? -o[~d * a + h] : o[h * a + d], p < 0 ? -o[~p * a + h] : o[h * a + p]));
410
+ for (const d of v)
411
+ if (d < 0) {
412
+ const p = g[~d * a + h] || (g[~d * a + h] = { source: null, target: null });
413
+ p.target = { index: h, startAngle: f, endAngle: f += o[~d * a + h] * u, value: o[~d * a + h] };
414
+ } else {
415
+ const p = g[h * a + d] || (g[h * a + d] = { source: null, target: null });
416
+ p.source = { index: h, startAngle: f, endAngle: f += o[h * a + d] * u, value: o[h * a + d] };
417
+ }
418
+ k[h] = { index: h, startAngle: y, endAngle: f, value: l[h] };
419
+ } else {
420
+ const v = _e(0, a).filter((d) => o[h * a + d] || o[d * a + h]);
421
+ n && v.sort((d, p) => n(o[h * a + d], o[h * a + p]));
422
+ for (const d of v) {
423
+ let p;
424
+ if (h < d ? (p = g[h * a + d] || (g[h * a + d] = { source: null, target: null }), p.source = { index: h, startAngle: f, endAngle: f += o[h * a + d] * u, value: o[h * a + d] }) : (p = g[d * a + h] || (g[d * a + h] = { source: null, target: null }), p.target = { index: h, startAngle: f, endAngle: f += o[h * a + d] * u, value: o[h * a + d] }, h === d && (p.source = p.target)), p.source && p.target && p.source.value < p.target.value) {
425
+ const A = p.source;
426
+ p.source = p.target, p.target = A;
427
+ }
428
+ }
429
+ k[h] = { index: h, startAngle: y, endAngle: f, value: l[h] };
430
+ }
431
+ f += _;
432
+ }
433
+ }
434
+ return g = Object.values(g), g.groups = k, i ? g.sort(i) : g;
435
+ }
436
+ return r.padAngle = function(o) {
437
+ return arguments.length ? (e = Me(0, o), r) : e;
438
+ }, r.sortGroups = function(o) {
439
+ return arguments.length ? (s = o, r) : s;
440
+ }, r.sortSubgroups = function(o) {
441
+ return arguments.length ? (n = o, r) : n;
442
+ }, r.sortChords = function(o) {
443
+ return arguments.length ? (o == null ? i = null : (i = _t(o))._ = o, r) : i && i._;
444
+ }, r;
445
+ }
446
+ var vt = Array.prototype.slice;
447
+ function O(m) {
448
+ return function() {
449
+ return m;
450
+ };
451
+ }
452
+ function Dt(m) {
453
+ return m.source;
454
+ }
455
+ function At(m) {
456
+ return m.target;
457
+ }
458
+ function Ie(m) {
459
+ return m.radius;
460
+ }
461
+ function xt(m) {
462
+ return m.startAngle;
463
+ }
464
+ function bt(m) {
465
+ return m.endAngle;
466
+ }
467
+ function Nt() {
468
+ return 0;
469
+ }
470
+ function Lt() {
471
+ return 10;
472
+ }
473
+ function Ve(m) {
474
+ var t = Dt, e = At, s = Ie, n = Ie, i = xt, r = bt, o = Nt, a = null;
475
+ function l() {
476
+ var c, g = t.apply(this, arguments), k = e.apply(this, arguments), u = o.apply(this, arguments) / 2, _ = vt.call(arguments), f = +s.apply(this, (_[0] = g, _)), h = i.apply(this, _) - se, y = r.apply(this, _) - se, v = +n.apply(this, (_[0] = k, _)), d = i.apply(this, _) - se, p = r.apply(this, _) - se;
477
+ if (a || (a = c = rt()), u > ke && (Re(y - h) > u * 2 + ke ? y > h ? (h += u, y -= u) : (h -= u, y += u) : h = y = (h + y) / 2, Re(p - d) > u * 2 + ke ? p > d ? (d += u, p -= u) : (d -= u, p += u) : d = p = (d + p) / 2), a.moveTo(f * B(h), f * V(h)), a.arc(0, 0, f, h, y), h !== d || y !== p)
478
+ if (m) {
479
+ var A = +m.apply(this, arguments), N = v - A, X = (d + p) / 2;
480
+ a.quadraticCurveTo(0, 0, N * B(d), N * V(d)), a.lineTo(v * B(X), v * V(X)), a.lineTo(N * B(p), N * V(p));
481
+ } else
482
+ a.quadraticCurveTo(0, 0, v * B(d), v * V(d)), a.arc(0, 0, v, d, p);
483
+ if (a.quadraticCurveTo(0, 0, f * B(h), f * V(h)), a.closePath(), c) return a = null, c + "" || null;
484
+ }
485
+ return m && (l.headRadius = function(c) {
486
+ return arguments.length ? (m = typeof c == "function" ? c : O(+c), l) : m;
487
+ }), l.radius = function(c) {
488
+ return arguments.length ? (s = n = typeof c == "function" ? c : O(+c), l) : s;
489
+ }, l.sourceRadius = function(c) {
490
+ return arguments.length ? (s = typeof c == "function" ? c : O(+c), l) : s;
491
+ }, l.targetRadius = function(c) {
492
+ return arguments.length ? (n = typeof c == "function" ? c : O(+c), l) : n;
493
+ }, l.startAngle = function(c) {
494
+ return arguments.length ? (i = typeof c == "function" ? c : O(+c), l) : i;
495
+ }, l.endAngle = function(c) {
496
+ return arguments.length ? (r = typeof c == "function" ? c : O(+c), l) : r;
497
+ }, l.padAngle = function(c) {
498
+ return arguments.length ? (o = typeof c == "function" ? c : O(+c), l) : o;
499
+ }, l.source = function(c) {
500
+ return arguments.length ? (t = c, l) : t;
501
+ }, l.target = function(c) {
502
+ return arguments.length ? (e = c, l) : e;
503
+ }, l.context = function(c) {
504
+ return arguments.length ? (a = c ?? null, l) : a;
505
+ }, l;
506
+ }
507
+ function je() {
508
+ return Ve();
509
+ }
510
+ function Fe() {
511
+ return Ve(Lt);
512
+ }
513
+ class ie extends Ae {
514
+ }
515
+ ie.className = "FlowNode";
516
+ ie.classNames = Ae.classNames.concat([ie.className]);
517
+ class G extends he {
518
+ constructor() {
519
+ super(...arguments), this.labels = this.addDisposer(new T(C.new({}), () => Oe._new(this._root, { themeTags: ["flow"] }, [this.labels.template]))), this.nodes = this.addDisposer(new T(C.new({}), () => ie._new(this._root, { themeTags: ["node"] }, [this.nodes.template]))), this._userDataSet = !1;
520
+ }
521
+ _applyThemes(t = !1) {
522
+ const e = this.get("colors");
523
+ return e && e.reset(), super._applyThemes(t);
524
+ }
525
+ _afterNew() {
526
+ this.fields.push("unknown", "name", "fill"), this.set("idField", "id"), this.set("nameField", "id"), this.set("fillField", "fill"), this.set("unknownField", "unknown"), this.children.push(this.bulletsContainer), super._afterNew();
527
+ }
528
+ _onDataClear() {
529
+ const t = this.get("colors");
530
+ t && t.reset();
531
+ const e = this.get("patterns");
532
+ e && e.reset(), this._userDataSet = !0;
533
+ }
534
+ processDataItem(t) {
535
+ if (super.processDataItem(t), t.setRaw("d3SankeyNode", { name: t.get("id"), dataItem: t }), t.get("fill") == null) {
536
+ let n = this.get("colors");
537
+ n && t.setRaw("fill", n.next());
538
+ }
539
+ if (t.get("fillPattern") == null) {
540
+ let n = this.get("patterns");
541
+ n && t.setRaw("fillPattern", n.next());
542
+ }
543
+ const e = this.makeNode(t);
544
+ t.setRaw("node", e);
545
+ const s = this.get("disabledField");
546
+ if (s) {
547
+ const n = t.dataContext;
548
+ n && n[s] && this.root.events.once("frameended", () => {
549
+ this.disableDataItem(t, 0);
550
+ });
551
+ }
552
+ }
553
+ /**
554
+ * @ignore
555
+ */
556
+ makeNode(t, e) {
557
+ const s = this.nodes.make();
558
+ return this.nodes.push(s), e && s.addTag(e), t.get("unknown") && s.addTag("unknown"), this.children.push(s), s._setDataItem(t), s.series = this, s.events.on("click", (n) => {
559
+ const i = n.target;
560
+ if (i.get("toggleKey") == "disabled") {
561
+ const r = i.dataItem;
562
+ r && (r.isHidden() ? this.enableDataItem(r) : this.disableDataItem(r));
563
+ }
564
+ }), t.on("fill", () => {
565
+ this._updateNodeColor(t);
566
+ }), t.on("fillPattern", () => {
567
+ this._updateNodeColor(t);
568
+ }), t.set("node", s), s;
569
+ }
570
+ _updateNodeColor(t) {
571
+ }
572
+ /**
573
+ * @ignore
574
+ */
575
+ disposeDataItem(t) {
576
+ super.disposeDataItem(t);
577
+ let e = t.get("node");
578
+ e && (this.nodes.removeValue(e), e.dispose());
579
+ let s = t.get("label");
580
+ s && (this.labels.removeValue(s), s.dispose());
581
+ }
582
+ /**
583
+ * @ignore
584
+ */
585
+ addincomingLink(t, e) {
586
+ let s = t.get("incomingLinks");
587
+ s || (s = [], t.set("incomingLinks", s)), s.push(e);
588
+ }
589
+ /**
590
+ * @ignore
591
+ */
592
+ addOutgoingLink(t, e) {
593
+ let s = t.get("outgoingLinks");
594
+ s || (s = [], t.set("outgoingLinks", s)), s.push(e);
595
+ }
596
+ /**
597
+ * Shows node's data item.
598
+ *
599
+ * @param dataItem Data item
600
+ * @param duration Animation duration in milliseconds
601
+ * @return Promise
602
+ */
603
+ showDataItem(t, e) {
604
+ const s = Object.create(null, {
605
+ showDataItem: { get: () => super.showDataItem }
606
+ });
607
+ return j(this, void 0, void 0, function* () {
608
+ const n = [s.showDataItem.call(this, t, e)], i = this.flow;
609
+ if (i) {
610
+ const r = t.get("node");
611
+ r && r.show();
612
+ let o = t.get("label");
613
+ o && o.show(e);
614
+ let a = t.get("outgoingLinks");
615
+ a && w(a, (l) => {
616
+ i.showDataItem(l, e);
617
+ }), a = t.get("incomingLinks"), a && w(a, (l) => {
618
+ i.showDataItem(l, e);
619
+ });
620
+ }
621
+ yield n;
622
+ });
623
+ }
624
+ /**
625
+ * Hides series's data item.
626
+ *
627
+ * @param dataItem Data item
628
+ * @param duration Animation duration in milliseconds
629
+ * @return Promise
630
+ */
631
+ hideDataItem(t, e) {
632
+ const s = Object.create(null, {
633
+ hideDataItem: { get: () => super.hideDataItem }
634
+ });
635
+ return j(this, void 0, void 0, function* () {
636
+ const n = [s.hideDataItem.call(this, t, e)], i = this.flow;
637
+ if (i) {
638
+ const r = t.get("node");
639
+ r && r.hide();
640
+ let o = t.get("label");
641
+ o && o.hide(e);
642
+ let a = t.get("outgoingLinks");
643
+ a && w(a, (l) => {
644
+ i.hideDataItem(l, e);
645
+ }), a = t.get("incomingLinks"), a && w(a, (l) => {
646
+ i.hideDataItem(l, e);
647
+ });
648
+ }
649
+ yield n;
650
+ });
651
+ }
652
+ /**
653
+ * Shows node's data item.
654
+ *
655
+ * @param dataItem Data item
656
+ * @param duration Animation duration in milliseconds
657
+ * @return Promise
658
+ */
659
+ enableDataItem(t, e) {
660
+ const s = Object.create(null, {
661
+ showDataItem: { get: () => super.showDataItem }
662
+ });
663
+ return j(this, void 0, void 0, function* () {
664
+ const n = [s.showDataItem.call(this, t, e)], i = this.flow;
665
+ if (i) {
666
+ const r = t.get("node");
667
+ r && this.root.events.once("frameended", () => {
668
+ r.set("disabled", !1);
669
+ });
670
+ let o = t.get("label");
671
+ o && o.set("disabled", !1);
672
+ let a = t.get("outgoingLinks");
673
+ a && w(a, (l) => {
674
+ i.showDataItem(l, e);
675
+ }), a = t.get("incomingLinks"), a && w(a, (l) => {
676
+ i.showDataItem(l, e);
677
+ });
678
+ }
679
+ yield n;
680
+ });
681
+ }
682
+ /**
683
+ * Hides series's data item.
684
+ *
685
+ * @param dataItem Data item
686
+ * @param duration Animation duration in milliseconds
687
+ * @return Promise
688
+ */
689
+ disableDataItem(t, e) {
690
+ const s = Object.create(null, {
691
+ hideDataItem: { get: () => super.hideDataItem }
692
+ });
693
+ return j(this, void 0, void 0, function* () {
694
+ const n = [s.hideDataItem.call(this, t, e)], i = this.flow;
695
+ if (i) {
696
+ const r = t.get("node");
697
+ r && this.root.events.once("frameended", () => {
698
+ r.set("disabled", !0);
699
+ });
700
+ let o = t.get("label");
701
+ o && o.set("disabled", !0);
702
+ let a = t.get("outgoingLinks");
703
+ a && w(a, (l) => {
704
+ i.hideDataItem(l, e);
705
+ }), a = t.get("incomingLinks"), a && w(a, (l) => {
706
+ i.hideDataItem(l, e);
707
+ });
708
+ }
709
+ yield n;
710
+ });
711
+ }
712
+ }
713
+ G.className = "FlowNodes";
714
+ G.classNames = he.classNames.concat([G.className]);
715
+ class ne extends G {
716
+ constructor() {
717
+ super(...arguments), this.labels = this.addDisposer(new T(C.new({}), () => ot._new(this._root, {}, [this.labels.template]))), this._dAngle = 0, this.slices = this.addDisposer(new T(C.new({}), () => at._new(this._root, { themeTags: ["shape"] }, [this.slices.template]))), this.rectangles = this.slices;
718
+ }
719
+ /**
720
+ * @ignore
721
+ */
722
+ makeNode(t) {
723
+ const e = super.makeNode(t, "chord"), s = e.children.insertIndex(0, this.slices.make());
724
+ t.set("slice", s), s._setSoft("fill", t.get("fill")), s._setSoft("fillPattern", t.get("fillPattern"));
725
+ const n = this.labels.make();
726
+ return this.labels.push(n), n.addTag("flow"), n.addTag("chord"), n.addTag("node"), e.children.push(n), t.set("label", n), e.events.on("dragstart", (i) => {
727
+ let r = this.toLocal(i.point);
728
+ const o = H({ x: 0, y: 0 }, r);
729
+ this.flow && (this._dAngle = this.flow.get("startAngle", 0) - o);
730
+ }), e.events.on("dragged", (i) => {
731
+ let r = this.toLocal(i.point);
732
+ const o = H({ x: 0, y: 0 }, r);
733
+ e.setAll({ x: 0, y: 0 }), this.flow && this.flow.set("startAngle", o + this._dAngle);
734
+ }), n._setDataItem(t), s._setDataItem(t), e;
735
+ }
736
+ _positionBullet(t) {
737
+ const e = t.get("sprite");
738
+ if (e) {
739
+ const s = e.dataItem;
740
+ if (s) {
741
+ const n = t.get("sprite");
742
+ if (n) {
743
+ const i = s.get("slice"), r = t.get("locationX", 0.5), o = t.get("locationY", 0.5);
744
+ if (i) {
745
+ const a = i.get("radius", 0), l = i.get("innerRadius", 0), c = l + (a - l) * o, g = i.get("startAngle", 0) + i.get("arc", 0) * r;
746
+ n.setAll({ x: c * b(g), y: c * x(g) });
747
+ }
748
+ }
749
+ }
750
+ }
751
+ }
752
+ _updateNodeColor(t) {
753
+ const e = t.get("slice");
754
+ e && (e.set("fill", t.get("fill")), e.set("fillPattern", t.get("fillPattern")));
755
+ }
756
+ /**
757
+ * @ignore
758
+ */
759
+ disposeDataItem(t) {
760
+ super.disposeDataItem(t);
761
+ let e = t.get("slice");
762
+ e && (this.slices.removeValue(e), e.dispose());
763
+ }
764
+ }
765
+ ne.className = "ChordNodes";
766
+ ne.classNames = G.classNames.concat([ne.className]);
767
+ class M extends We {
768
+ _changed() {
769
+ if (super._changed(), this.isDirty("fillStyle")) {
770
+ const t = this.series, e = this.dataItem;
771
+ t && e && t._updateLinkColor(e);
772
+ }
773
+ }
774
+ _getTooltipPoint() {
775
+ let t = this.get("tooltipY"), e = 0.5;
776
+ return t instanceof tt && (e = t.value), this.getPoint(e);
777
+ }
778
+ }
779
+ M.className = "FlowLink";
780
+ M.classNames = We.classNames.concat([M.className]);
781
+ class Y extends M {
782
+ getPoint(t) {
783
+ if (this._p0 && this._p1)
784
+ if (this._type === "line") {
785
+ let e = st(this._p0, this._p1, t);
786
+ return { x: e.x, y: e.y, angle: H(this._p0, this._p1) };
787
+ } else {
788
+ let e = pe(this._p0, this._p1, { x: 0, y: 0 }, Math.max(0, t - 0.01)), s = pe(this._p0, this._p1, { x: 0, y: 0 }, Math.min(1, t + 0.01)), n = pe(this._p0, this._p1, { x: 0, y: 0 }, t);
789
+ return { x: n.x, y: n.y, angle: H(e, s) };
790
+ }
791
+ return { x: 0, y: 0, angle: 0 };
792
+ }
793
+ }
794
+ Y.className = "ChordLink";
795
+ Y.classNames = M.classNames.concat([Y.className]);
796
+ class W extends R {
797
+ constructor() {
798
+ super(...arguments), this.links = this.addDisposer(new T(C.new({}), () => Y._new(this._root, { themeTags: ["link", "shape"] }, [this.links.template]))), this.nodes = this.children.push(ne.new(this._root, {})), this._d3chord = yt(), this._chordLayout = [], this._ribbon = je();
799
+ }
800
+ _afterNew() {
801
+ this._settings.themeTags = E(this._settings.themeTags, ["chord"]), this.linksContainer.setAll({ x: S, y: S }), this.bulletsContainer.setAll({ x: S, y: S }), super._afterNew();
802
+ }
803
+ _fixRibbon(t) {
804
+ t.startAngle((e) => e.startAngle + this.get("startAngle", 0) * te + Math.PI / 2), t.endAngle((e) => e.endAngle + this.get("startAngle", 0) * te + Math.PI / 2);
805
+ }
806
+ /**
807
+ * @ignore
808
+ */
809
+ makeLink(t) {
810
+ const e = this.linksContainer.children.push(this.links.make());
811
+ return this.links.push(e), e._setDataItem(t), e.set("source", t.get("source")), e.set("target", t.get("target")), e.series = this, e;
812
+ }
813
+ _makeMatrix() {
814
+ const t = [];
815
+ return w(this.nodes.dataItems, (e) => {
816
+ const s = [];
817
+ t.push(s);
818
+ let n = e.get("outgoingLinks");
819
+ w(this.nodes.dataItems, (i) => {
820
+ let r = 0;
821
+ n && w(n, (o) => {
822
+ o.get("target") === i && (r = o.get("valueWorking"));
823
+ let a = this.getPrivate("valueSum", 0), l = this.get("minSize", 0);
824
+ r > 0 && l > 0 && r < a * l && (r = a * l);
825
+ }), s.push(r);
826
+ });
827
+ }), t;
828
+ }
829
+ _prepareChildren() {
830
+ super._prepareChildren(), this._fixRibbon(this._ribbon);
831
+ let t = !1;
832
+ if (this._valuesDirty || this._sizeDirty || this.isDirty("padAngle") || this.isDirty("startAngle")) {
833
+ const e = this._makeMatrix();
834
+ this._d3chord.padAngle(this.get("padAngle", 0) * te);
835
+ const s = this.get("sort");
836
+ s === "ascending" ? this._d3chord.sortGroups(ct) : s === "descending" && this._d3chord.sortGroups(ht), this._chordLayout = this._d3chord(e), t = !0;
837
+ }
838
+ if (t || this.isDirty("radius") || this.isDirty("nodeWidth")) {
839
+ let e = me(this.get("radius", 0), Math.min(this.innerWidth(), this.innerHeight())) / 2, s = 0;
840
+ const n = this.get("startAngle", 0), i = this.get("nodeWidth", 0);
841
+ w(this.nodes.dataItems, (o) => {
842
+ const a = o.get("slice"), l = this._chordLayout.groups[s], c = l.startAngle * Le + n, g = l.endAngle * Le + n;
843
+ a.setAll({ radius: e, innerRadius: e - i, startAngle: c, arc: g - c });
844
+ const k = o.get("label");
845
+ k.setAll({ labelAngle: c + (g - c) / 2 }), k.setPrivate("radius", e), k.setPrivate("innerRadius", 0.1), s++;
846
+ });
847
+ const r = e - this.get("nodeWidth", 0);
848
+ w(this._chordLayout, (o) => {
849
+ let a = this._linksByIndex[o.source.index + "_" + o.target.index];
850
+ if (a || (a = this._linksByIndex[o.target.index + "_" + o.source.index]), a) {
851
+ const l = a.get("link");
852
+ this._getLinkPoints(l, r, o), this._updateLink(this._ribbon, l, r, o);
853
+ }
854
+ });
855
+ }
856
+ }
857
+ _getLinkPoints(t, e, s) {
858
+ const n = s.source, i = s.target, r = this.get("startAngle", 0) * te;
859
+ if (n && i) {
860
+ const o = n.startAngle, a = n.endAngle, l = o + (a - o) / 2 + r, c = i.startAngle, g = i.endAngle, k = c + (g - c) / 2 + r;
861
+ t._p0 = { x: e * Math.cos(l), y: e * Math.sin(l) }, t._p1 = { x: e * Math.cos(k), y: e * Math.sin(k) };
862
+ }
863
+ }
864
+ _updateLink(t, e, s, n) {
865
+ n && (t.sourceRadius(me(e.get("sourceRadius", P), s)), t.targetRadius(me(e.get("targetRadius", P), s)), e.set("draw", (i) => {
866
+ t.context(i), t(n);
867
+ }));
868
+ }
869
+ }
870
+ W.className = "Chord";
871
+ W.classNames = R.classNames.concat([W.className]);
872
+ class ae extends Y {
873
+ _afterNew() {
874
+ this._settings.themeTags = E(this._settings.themeTags, ["chord", "link", "directed"]), super._afterNew();
875
+ }
876
+ }
877
+ ae.className = "ChordLinkDirected";
878
+ ae.classNames = Y.classNames.concat([ae.className]);
879
+ class ye extends W {
880
+ constructor() {
881
+ super(...arguments), this._d3chord = wt(), this._ribbonArrow = Fe(), this.links = this.addDisposer(new T(C.new({}), () => ae._new(this._root, { themeTags: ["link", "shape"] }, [this.links.template])));
882
+ }
883
+ /**
884
+ * @ignore
885
+ */
886
+ makeLink(t) {
887
+ const e = this.linksContainer.children.push(this.links.make());
888
+ return e._setDataItem(t), e.set("source", t.get("source")), e.set("target", t.get("target")), e.series = this, e;
889
+ }
890
+ _afterNew() {
891
+ this._settings.themeTags = E(this._settings.themeTags, ["directed"]), super._afterNew(), this._markDirtyKey("linkHeadRadius");
892
+ }
893
+ _prepareChildren() {
894
+ const t = "linkHeadRadius";
895
+ if (this.isDirty(t)) {
896
+ const e = this.get(t);
897
+ if (e == null)
898
+ this._ribbon = je();
899
+ else {
900
+ let s = Fe();
901
+ s.headRadius(e), this._ribbon = s;
902
+ }
903
+ }
904
+ super._prepareChildren();
905
+ }
906
+ }
907
+ ye.className = "ChordDirected";
908
+ ye.classNames = W.classNames.concat([ye.className]);
909
+ class we extends W {
910
+ _afterNew() {
911
+ this._settings.themeTags = E(this._settings.themeTags, ["chord", "basic"]), super._afterNew();
912
+ }
913
+ _makeMatrix() {
914
+ const t = [];
915
+ return w(this.nodes.dataItems, (e) => {
916
+ const s = [];
917
+ t.push(s), w(this.nodes.dataItems, (n) => {
918
+ let i = 1;
919
+ e === n && (i = 0), s.push(i);
920
+ });
921
+ }), t;
922
+ }
923
+ _updateLink(t, e, s, n) {
924
+ if (e._type = this.get("linkType"), n) {
925
+ const i = this.get("linkType");
926
+ e.set("draw", (r) => {
927
+ let o = e._p0, a = e._p1;
928
+ o && a && (r.moveTo(o.x, o.y), i == "line" ? r.lineTo(a.x, a.y) : r.quadraticCurveTo(0, 0, a.x, a.y));
929
+ });
930
+ }
931
+ }
932
+ _getLinkPoints(t, e, s) {
933
+ const n = t.get("source"), i = t.get("target");
934
+ if (n && i) {
935
+ const r = n.get("slice"), o = i.get("slice"), a = r.get("startAngle", 0), l = r.get("arc", 0), c = a + l / 2, g = o.get("startAngle", 0), k = o.get("arc", 0), u = g + k / 2;
936
+ t._p0 = { x: e * b(c), y: e * x(c) }, t._p1 = { x: e * b(u), y: e * x(u) };
937
+ }
938
+ }
939
+ }
940
+ we.className = "ChordNonRibbon";
941
+ we.classNames = W.classNames.concat([we.className]);
942
+ class oe extends G {
943
+ constructor() {
944
+ super(...arguments), this.rectangles = this.addDisposer(new T(C.new({}), () => it._new(this._root, { themeTags: ["shape"] }, [this.rectangles.template])));
945
+ }
946
+ /**
947
+ * @ignore
948
+ */
949
+ makeNode(t) {
950
+ const e = this.flow, s = super.makeNode(t, "sankey"), n = s.children.insertIndex(0, this.rectangles.make());
951
+ this.rectangles.push(n), n._setSoft("fill", t.get("fill")), n._setSoft("fillPattern", t.get("fillPattern")), t.set("rectangle", n), s.events.on("dragged", () => {
952
+ const r = s.dataItem.get("d3SankeyNode");
953
+ r && e && (e.get("orientation") == "horizontal" ? (r.x0 = s.x(), r.y0 = s.y()) : (r.x0 = s.y(), r.y0 = s.x()), e.updateSankey());
954
+ });
955
+ const i = this.labels.make();
956
+ return this.labels.push(i), e && i.addTag(e.get("orientation", "")), s.children.push(i), t.set("label", i), i._setDataItem(t), n._setDataItem(t), s;
957
+ }
958
+ _positionBullet(t) {
959
+ const e = t.get("sprite");
960
+ if (e) {
961
+ const s = e.dataItem;
962
+ if (s) {
963
+ const n = t.get("sprite");
964
+ if (n) {
965
+ const i = s.get("rectangle"), r = s.get("node"), o = t.get("locationX", 0.5), a = t.get("locationY", 0.5);
966
+ i && n.setAll({ x: r.x() + i.width() * o, y: r.y() + i.height() * a });
967
+ }
968
+ }
969
+ }
970
+ }
971
+ /**
972
+ * @ignore
973
+ */
974
+ disposeDataItem(t) {
975
+ super.disposeDataItem(t);
976
+ let e = t.get("rectangle");
977
+ e && (this.rectangles.removeValue(e), e.dispose());
978
+ }
979
+ _updateNodeColor(t) {
980
+ const e = t.get("rectangle");
981
+ e && (e.set("fill", t.get("fill")), e.set("fillPattern", t.get("fillPattern")));
982
+ }
983
+ }
984
+ oe.className = "SankeyNodes";
985
+ oe.classNames = G.classNames.concat([oe.className]);
986
+ class re extends M {
987
+ constructor() {
988
+ super(...arguments), this._svgPath = document.createElementNS("http://www.w3.org/2000/svg", "path"), this._totalLength = 0;
989
+ }
990
+ _beforeChanged() {
991
+ if (super._beforeChanged(), this.isDirty("source")) {
992
+ const i = this.get("source");
993
+ if (i) {
994
+ const r = i.get("node");
995
+ this._disposers.push(r.events.on("positionchanged", () => {
996
+ this.markDirty();
997
+ }));
998
+ }
999
+ }
1000
+ if (this.isDirty("target")) {
1001
+ const i = this.get("target");
1002
+ if (i) {
1003
+ const r = i.get("node");
1004
+ this._disposers.push(r.events.on("positionchanged", () => {
1005
+ this.markDirty();
1006
+ }));
1007
+ }
1008
+ }
1009
+ if (this.isPrivateDirty("orientation")) {
1010
+ const i = this.series, r = this.dataItem;
1011
+ r && i && i._updateLinkColor(r);
1012
+ }
1013
+ const t = this.get("target"), e = this.get("source");
1014
+ let s, n;
1015
+ if (e && t) {
1016
+ this._clear = !0, s = e.get("node"), n = t.get("node");
1017
+ let i = 0, r = 0, o = 0, a = 0, l = 0, c = 0, g = 0, k = 0, u = 0, _ = 0, f = 0, h = 0, y = 0, v = 0, d = 0, p = 0, A = 0, N = 0;
1018
+ const X = this.dataItem;
1019
+ if (X) {
1020
+ const z = X.get("d3SankeyLink");
1021
+ if (z) {
1022
+ let L = z.width || 0, xe = this.getPrivate("orientation");
1023
+ xe == "vertical" ? (s && (o = s.y() + s.get("dy", 0)), n && (a = n.y() + n.get("dy", 0)), A = 90, N = 90, i = z.y0 || 0, r = z.y1 || 0, i += s.get("dx", 0), r += n.get("dx", 0), a < o && ([i, r] = [r, i], [o, a] = [a, o]), e.get("unknown") && (i = r, o = o + (a - o) / 2), t.get("unknown") && (r = i, a = o + (a - o) / 2), l = i - L / 2, c = o, g = r - L / 2, k = a, u = i + L / 2, _ = r + L / 2, f = o, h = a, y = i, v = r, d = o, p = a) : (s && (i = s.x() + s.get("dx", 0)), n && (r = n.x() + n.get("dx", 0)), o = z.y0 || 0, a = z.y1 || 0, o += s.get("dy", 0), a += n.get("dy", 0), r < i && ([i, r] = [r, i], [o, a] = [a, o]), e.get("unknown") && (o = a, i = i + (r - i) / 2), t.get("unknown") && (a = o, r = i + (r - i) / 2), l = i, c = o - L / 2, g = r, k = a - L / 2, u = i, _ = r, f = o + L / 2, h = a + L / 2, y = i, v = r, d = o, p = a), I(l, 3) == I(g, 3) && (g += 0.01), I(c, 3) == I(k, 3) && (k += 0.01), I(u, 3) == I(_, 3) && (_ += 0.01), I(f, 3) == I(h, 3) && (h += 0.01);
1024
+ let D = this.get("controlPointDistance", 0.2);
1025
+ D = Math.min(0.4999, D);
1026
+ let K = l + (g - l) * D * b(A), q = c + (k - c) * D * x(A), $ = g - (g - l) * D * b(N), J = k - (k - c) * D * x(N), He = y + (v - y) * D * b(A), Ye = d + (p - d) * D * x(A), Ee = v - (v - y) * D * b(N), Xe = p - (p - d) * D * x(N), Q = H({ x: K, y: q }, { x: $, y: J }), U = (L / b(Q) - L) / Se(Q) * b(A), Z = (L / x(Q) - L) * Se(Q) * x(A), ge = -U / 2 + u + (_ - u) * D * b(A), de = -Z / 2 + f + (h - f) * D * x(A), ue = -U / 2 + _ - (_ - u) * D * b(N), fe = -Z / 2 + h - (h - f) * D * x(N);
1027
+ K += U / 2, q += Z / 2, $ += U / 2, J += Z / 2, xe == "vertical" ? (q = Math.min(k, Math.max(c + 1, q)), de = Math.min(h, Math.max(f + 1, de)), J = Math.max(c, Math.min(k - 1, J)), fe = Math.max(f, Math.min(h - 1, fe))) : (K = Math.min(g, Math.max(l + 1, K)), ge = Math.min(_, Math.max(u + 1, ge)), $ = Math.max(l, Math.min(g - 1, $)), ue = Math.max(u, Math.min(_ - 1, ue)));
1028
+ let Ke = [[l, c, u, f], [K, q, ge, de], [$, J, ue, fe], [g, k, _, h]];
1029
+ this.set("draw", ($e) => {
1030
+ const Ne = this.series;
1031
+ Ne._fillGenerator.context($e), Ne._fillGenerator(Ke);
1032
+ });
1033
+ let qe = [[y, d], [He, Ye], [Ee, Xe], [v, p]];
1034
+ const be = this.series._strokeGenerator(qe);
1035
+ be && (this._svgPath.setAttribute("d", be), this._totalLength = this._svgPath.getTotalLength());
1036
+ }
1037
+ }
1038
+ }
1039
+ this.series && this.dataItem && this.series._positionBullets(this.dataItem);
1040
+ }
1041
+ getPoint(t) {
1042
+ if (this._svgPath && this._svgPath.getAttribute("d")) {
1043
+ let e = this._svgPath.getPointAtLength(t * this._totalLength - 0.1), s = this._svgPath.getPointAtLength(t * this._totalLength + 0.1), n = this.toGlobal(this._svgPath.getPointAtLength(t * this._totalLength));
1044
+ return { x: n.x, y: n.y, angle: H(e, s) };
1045
+ }
1046
+ return { x: 0, y: 0, angle: 0 };
1047
+ }
1048
+ _getTooltipPoint() {
1049
+ return this.toLocal(super._getTooltipPoint());
1050
+ }
1051
+ }
1052
+ re.className = "SankeyLink";
1053
+ re.classNames = M.classNames.concat([re.className]);
1054
+ class ve extends R {
1055
+ constructor() {
1056
+ super(...arguments), this.links = this.addDisposer(new T(C.new({}), () => re._new(this._root, { themeTags: ["link", "shape"] }, [this.links.template]))), this.nodes = this.children.push(oe.new(this._root, {})), this._d3Sankey = gt(), this._fillGenerator = nt(), this._strokeGenerator = lt();
1057
+ }
1058
+ _afterNew() {
1059
+ this._settings.themeTags = E(this._settings.themeTags, ["sankey", this._settings.orientation || "horizontal"]), this._fillGenerator.y0(function(t) {
1060
+ return t[3];
1061
+ }), this._fillGenerator.x0(function(t) {
1062
+ return t[2];
1063
+ }), this._fillGenerator.y1(function(t) {
1064
+ return t[1];
1065
+ }), this._fillGenerator.x1(function(t) {
1066
+ return t[0];
1067
+ }), super._afterNew();
1068
+ }
1069
+ /**
1070
+ * @ignore
1071
+ */
1072
+ makeLink(t) {
1073
+ const e = t.get("source"), s = t.get("target"), n = this.links.make();
1074
+ return e.get("unknown") && (n.addTag("source"), n.addTag("unknown")), s.get("unknown") && (n.addTag("target"), n.addTag("unknown")), this.linksContainer.children.push(n), n._setDataItem(t), n.set("source", e), n.set("target", s), n.series = this, this.links.push(n), n;
1075
+ }
1076
+ /**
1077
+ * @ignore
1078
+ */
1079
+ updateSankey() {
1080
+ const t = this._d3Graph;
1081
+ t && (this._d3Sankey.update(t), w(this.dataItems, (e) => {
1082
+ const s = e.get("link");
1083
+ s.setPrivate("orientation", this.get("orientation")), s.markDirty();
1084
+ }));
1085
+ }
1086
+ _updateLinkColor(t) {
1087
+ super._updateLinkColor(t);
1088
+ const e = this.get("orientation"), s = t.get("link")._fillGradient, n = t.get("link")._strokeGradient;
1089
+ e == "vertical" ? (s && s.set("rotation", 90), n && n.set("rotation", 90)) : (s && s.set("rotation", 0), n && n.set("rotation", 0));
1090
+ }
1091
+ _getBulletLocation(t) {
1092
+ return this.get("orientation") == "vertical" ? t.get("locationY", 0) : t.get("locationX", 0);
1093
+ }
1094
+ _prepareChildren() {
1095
+ super._prepareChildren();
1096
+ let t = !1;
1097
+ if (this.get("orientation") == "vertical" && (t = !0), this.isDirty("orientation") || this.isDirty("linkTension")) {
1098
+ const e = this.get("linkTension", 0.5);
1099
+ t ? (this._fillGenerator.curve(Ce(e)), this._strokeGenerator.curve(Ce(e))) : (this._fillGenerator.curve(Pe(e)), this._strokeGenerator.curve(Pe(e)));
1100
+ }
1101
+ if ((this._valuesDirty || this._sizeDirty || this.isDirty("nodePadding") || this.isDirty("nodeWidth") || this.isDirty("nodeAlign") || this.isDirty("nodeSort") || this.isDirty("orientation") || this.isDirty("linkTension") || this.isDirty("linkSort")) && this._nodesData.length > 0) {
1102
+ const e = this._d3Sankey;
1103
+ let s = this.innerWidth(), n = this.innerHeight();
1104
+ switch (t && ([s, n] = [n, s]), e.size([s, n]), e.nodePadding(this.get("nodePadding", 10)), e.nodeWidth(this.get("nodeWidth", 10)), e.nodeSort(this.get("nodeSort", null)), e.linkSort(this.get("linkSort")), this.get("nodeAlign")) {
1105
+ case "right":
1106
+ e.nodeAlign(pt);
1107
+ break;
1108
+ case "justify":
1109
+ e.nodeAlign(ft);
1110
+ break;
1111
+ case "center":
1112
+ e.nodeAlign(ut);
1113
+ break;
1114
+ default:
1115
+ e.nodeAlign(dt);
1116
+ break;
1117
+ }
1118
+ this._d3Graph = e({ nodes: this._nodesData, links: this._linksData }), w(this.dataItems, (r) => {
1119
+ const o = r.get("link");
1120
+ o.setPrivate("orientation", this.get("orientation")), o.markDirty();
1121
+ });
1122
+ const i = this._d3Graph;
1123
+ if (i) {
1124
+ const r = i.nodes;
1125
+ w(r, (o) => {
1126
+ const a = o.dataItem, l = a.get("node");
1127
+ let c, g, k, u;
1128
+ t ? (c = o.y0, g = o.y1, k = o.x0, u = o.x1) : (c = o.x0, g = o.x1, k = o.y0, u = o.y1), F(c) && F(g) && F(k) && F(u) && (l.setAll({ x: c, y: k, width: g - c, height: u - k }), a.get("rectangle").setAll({ width: g - c, height: u - k }));
1129
+ });
1130
+ }
1131
+ }
1132
+ }
1133
+ }
1134
+ ve.className = "Sankey";
1135
+ ve.classNames = R.classNames.concat([ve.className]);
1136
+ class le extends G {
1137
+ constructor() {
1138
+ super(...arguments), this.labels = this.addDisposer(new T(C.new({}), () => Oe._new(this._root, {}, [this.labels.template]))), this._dAngle = 0, this.circles = this.addDisposer(new T(C.new({}), () => mt._new(this._root, { themeTags: ["shape"] }, [this.circles.template])));
1139
+ }
1140
+ /**
1141
+ * @ignore
1142
+ */
1143
+ makeNode(t) {
1144
+ const e = super.makeNode(t, "ArcDiagram"), s = e.children.insertIndex(0, this.circles.make());
1145
+ t.set("circle", s), s._setSoft("fill", t.get("fill")), s._setSoft("fillPattern", t.get("fillPattern"));
1146
+ const n = this.labels.make();
1147
+ return this.labels.push(n), n.addTag("flow"), n.addTag("arcdiagram"), n.addTag("node"), e.children.push(n), t.set("label", n), n._setDataItem(t), s._setDataItem(t), e;
1148
+ }
1149
+ /**
1150
+ * @ignore
1151
+ */
1152
+ disposeDataItem(t) {
1153
+ super.disposeDataItem(t);
1154
+ let e = t.get("circle");
1155
+ e && (this.circles.removeValue(e), e.dispose());
1156
+ }
1157
+ _updateNodeColor(t) {
1158
+ const e = t.get("circle");
1159
+ e && (e.set("fill", t.get("fill")), e.set("fillPattern", t.get("fillPattern")));
1160
+ }
1161
+ }
1162
+ le.className = "ArcDiagramNodes";
1163
+ le.classNames = G.classNames.concat([le.className]);
1164
+ class ce extends M {
1165
+ constructor() {
1166
+ super(...arguments), this._radius = 0;
1167
+ }
1168
+ _beforeChanged() {
1169
+ if (super._beforeChanged(), this.isDirty("source")) {
1170
+ const t = this.get("source");
1171
+ if (t) {
1172
+ const e = t.get("node");
1173
+ this._disposers.push(e.events.on("positionchanged", () => {
1174
+ this._markDirtyKey("stroke");
1175
+ }));
1176
+ }
1177
+ }
1178
+ if (this.isDirty("target")) {
1179
+ const t = this.get("target");
1180
+ if (t) {
1181
+ const e = t.get("node");
1182
+ this._disposers.push(e.events.on("positionchanged", () => {
1183
+ this._markDirtyKey("stroke");
1184
+ }));
1185
+ }
1186
+ }
1187
+ if (this.isPrivateDirty("orientation")) {
1188
+ const t = this.series, e = this.dataItem;
1189
+ e && t && t._updateLinkColor(e);
1190
+ }
1191
+ this.series && this.dataItem && this.series._positionBullets(this.dataItem), this.get("strokeStyle") == "gradient" ? this.set("isMeasured", !0) : this.set("isMeasured", !1);
1192
+ }
1193
+ _changed() {
1194
+ super._changed(), this._clear && this._draw();
1195
+ }
1196
+ _draw() {
1197
+ const t = this.get("target"), e = this.get("source");
1198
+ if (e && t) {
1199
+ let s = e.get("node"), n = t.get("node");
1200
+ const i = s.x(), r = s.y(), o = n.x(), a = n.y();
1201
+ this._p0 = { x: i, y: r }, this._p1 = { x: o, y: a };
1202
+ let l = 0;
1203
+ if (this.getPrivate("orientation") == "vertical") {
1204
+ l = (a - r) / 2;
1205
+ let c = 1;
1206
+ r > a && (c = -1), this._display.arc(i, r + l, l * c, -Math.PI / 2, Math.PI / 2);
1207
+ } else {
1208
+ l = (o - i) / 2;
1209
+ let c = 1;
1210
+ i > o && (c = -1), this._display.arc(i + l, r, l * c, -Math.PI, 0);
1211
+ }
1212
+ this._radius = l;
1213
+ }
1214
+ }
1215
+ getPoint(t) {
1216
+ if (this._p0 && this._p1) {
1217
+ const e = this._radius;
1218
+ if (this.getPrivate("orientation") == "vertical") {
1219
+ let s = -90 + 180 * t;
1220
+ return { y: this._p0.y + e + e * x(s), x: e * b(s), angle: s + 90 };
1221
+ } else {
1222
+ let s = 180 + 180 * t;
1223
+ return { x: this._p0.x + e + e * b(s), y: e * x(s), angle: s + 90 };
1224
+ }
1225
+ }
1226
+ return { x: 0, y: 0, angle: 0 };
1227
+ }
1228
+ }
1229
+ ce.className = "ArcDiagramLink";
1230
+ ce.classNames = M.classNames.concat([ce.className]);
1231
+ class De extends R {
1232
+ constructor() {
1233
+ super(...arguments), this.links = this.addDisposer(new T(C.new({}), () => ce._new(this._root, { themeTags: ["link", "shape"] }, [this.links.template]))), this.nodes = this.children.push(le.new(this._root, {}));
1234
+ }
1235
+ _afterNew() {
1236
+ this._settings.themeTags = E(this._settings.themeTags, ["arcdiagram", this._settings.orientation || "horizontal"]), super._afterNew(), this.nodes.children.push(this.bulletsContainer);
1237
+ }
1238
+ /**
1239
+ * @ignore
1240
+ */
1241
+ makeLink(t) {
1242
+ const e = this.nodes.children.moveValue(this.links.make(), 0);
1243
+ return this.links.push(e), e._setDataItem(t), e.set("source", t.get("source")), e.set("target", t.get("target")), e.series = this, e;
1244
+ }
1245
+ _prepareChildren() {
1246
+ if (super._prepareChildren(), this._valuesDirty || this._sizeDirty || this.isDirty("orientation")) {
1247
+ let t = 1;
1248
+ const e = this.get("orientation");
1249
+ w(this.dataItems, (_) => {
1250
+ _.get("link").setPrivate("orientation", this.get("orientation"));
1251
+ }), e == "vertical" ? t = this.innerHeight() : t = this.innerWidth();
1252
+ let s = 0, n = 1 / 0, i = this.get("radiusKey");
1253
+ i != "none" && w(this.nodes.dataItems, (_) => {
1254
+ let f = _.get(i + "Working");
1255
+ s += f, n = Math.min(n, f);
1256
+ });
1257
+ const r = this.nodes.dataItems.length, o = this.get("nodePadding", 10), a = this.get("minRadius", 5);
1258
+ t = t - r * (o + a * 2), t <= 0 && (t = 0);
1259
+ let l = s - r * n, c = t / l, g = 0;
1260
+ const k = this.get("animationDuration", 0), u = this.get("animationEasing");
1261
+ w(this.nodes.dataItems, (_) => {
1262
+ let f = _.get(i + "Working");
1263
+ const h = _.get("node");
1264
+ let y = a + c * (f - n) / 2;
1265
+ if (i == "none" && (y = a + t / r / 2), e == "vertical") {
1266
+ h.set("x", 0);
1267
+ const v = g + o + y;
1268
+ h.y() == 0 ? h.set("y", v) : h.animate({ key: "y", to: v, duration: k, easing: u });
1269
+ } else {
1270
+ h.set("y", 0);
1271
+ const v = g + o + y;
1272
+ h.x() == 0 ? h.set("x", v) : h.animate({ key: "x", to: v, duration: k, easing: u });
1273
+ }
1274
+ g = g + o + y * 2, _.get("circle").set("radius", y);
1275
+ });
1276
+ }
1277
+ }
1278
+ _updateLinkColor(t) {
1279
+ super._updateLinkColor(t);
1280
+ const e = this.get("orientation"), s = t.get("link")._fillGradient, n = t.get("link")._strokeGradient;
1281
+ e == "vertical" ? (s && s.set("rotation", 90), n && n.set("rotation", 90)) : (s && s.set("rotation", 0), n && n.set("rotation", 0));
1282
+ }
1283
+ }
1284
+ De.className = "ArcDiagram";
1285
+ De.classNames = R.classNames.concat([De.className]);
1286
+ export {
1287
+ De as ArcDiagram,
1288
+ ce as ArcDiagramLink,
1289
+ le as ArcDiagramNodes,
1290
+ W as Chord,
1291
+ ye as ChordDirected,
1292
+ Y as ChordLink,
1293
+ ae as ChordLinkDirected,
1294
+ ne as ChordNodes,
1295
+ we as ChordNonRibbon,
1296
+ kt as DefaultTheme,
1297
+ R as Flow,
1298
+ M as FlowLink,
1299
+ ie as FlowNode,
1300
+ G as FlowNodes,
1301
+ ve as Sankey,
1302
+ re as SankeyLink,
1303
+ oe as SankeyNodes
1304
+ };