@fecp/designer 5.6.27 → 5.6.29

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 (687) hide show
  1. package/es/_virtual/index2.mjs +5 -3
  2. package/es/_virtual/index3.mjs +3 -5
  3. package/es/_virtual/index4.mjs +2 -2
  4. package/es/_virtual/index5.mjs +2 -2
  5. package/es/designer/package.json.mjs +1 -1
  6. package/es/designer/src/components/DataSourceSelect.vue.mjs +6 -2
  7. package/es/designer/src/layout/property/index.vue.mjs +1 -1
  8. package/es/designer/src/packages/dialogGlobal/index.vue.mjs +1 -1
  9. package/es/designer.css +585 -164
  10. package/es/node_modules/@braintree/sanitize-url/dist/index.mjs +1 -1
  11. package/es/node_modules/cose-base/cose-base.mjs +1090 -0
  12. package/es/node_modules/cytoscape-cose-bilkent/cytoscape-cose-bilkent.mjs +1 -1
  13. package/es/node_modules/d3-sankey/src/sankeyLinkHorizontal.mjs +1 -1
  14. package/es/node_modules/diagram-js/lib/model/index.mjs +1 -1
  15. package/es/node_modules/echarts/core.mjs +86 -0
  16. package/es/node_modules/echarts/lib/animation/basicTransition.mjs +148 -0
  17. package/es/node_modules/echarts/lib/animation/customGraphicKeyframeAnimation.mjs +79 -0
  18. package/es/node_modules/echarts/lib/animation/customGraphicTransition.mjs +338 -0
  19. package/es/node_modules/echarts/lib/chart/bar/BarSeries.mjs +66 -0
  20. package/es/node_modules/echarts/lib/chart/bar/BarView.mjs +782 -0
  21. package/es/node_modules/echarts/lib/chart/bar/BaseBarSeries.mjs +104 -0
  22. package/es/node_modules/echarts/lib/chart/bar/install.mjs +30 -0
  23. package/es/node_modules/echarts/lib/chart/funnel/FunnelSeries.mjs +99 -0
  24. package/es/node_modules/echarts/lib/chart/funnel/FunnelView.mjs +165 -0
  25. package/es/node_modules/echarts/lib/chart/funnel/funnelLayout.mjs +282 -0
  26. package/es/node_modules/echarts/lib/chart/funnel/install.mjs +13 -0
  27. package/es/node_modules/echarts/lib/chart/helper/Symbol.mjs +248 -0
  28. package/es/node_modules/echarts/lib/chart/helper/SymbolDraw.mjs +156 -0
  29. package/es/node_modules/echarts/lib/chart/helper/createClipPathFromCoordSys.mjs +104 -0
  30. package/es/node_modules/echarts/lib/chart/helper/createRenderPlanner.mjs +16 -0
  31. package/es/node_modules/echarts/lib/chart/helper/createSeriesData.mjs +113 -0
  32. package/es/node_modules/echarts/lib/chart/helper/createSeriesDataSimply.mjs +18 -0
  33. package/es/node_modules/echarts/lib/chart/helper/labelHelper.mjs +34 -0
  34. package/es/node_modules/echarts/lib/chart/helper/sectorHelper.mjs +22 -0
  35. package/es/node_modules/echarts/lib/chart/line/LineSeries.mjs +108 -0
  36. package/es/node_modules/echarts/lib/chart/line/LineView.mjs +966 -0
  37. package/es/node_modules/echarts/lib/chart/line/helper.mjs +80 -0
  38. package/es/node_modules/echarts/lib/chart/line/install.mjs +24 -0
  39. package/es/node_modules/echarts/lib/chart/line/lineAnimationDiff.mjs +112 -0
  40. package/es/node_modules/echarts/lib/chart/line/poly.mjs +303 -0
  41. package/es/node_modules/echarts/lib/chart/pie/PieSeries.mjs +159 -0
  42. package/es/node_modules/echarts/lib/chart/pie/PieView.mjs +229 -0
  43. package/es/node_modules/echarts/lib/chart/pie/install.mjs +18 -0
  44. package/es/node_modules/echarts/lib/chart/pie/labelLayout.mjs +390 -0
  45. package/es/node_modules/echarts/lib/chart/pie/pieLayout.mjs +185 -0
  46. package/es/node_modules/echarts/lib/chart/radar/RadarSeries.mjs +92 -0
  47. package/es/node_modules/echarts/lib/chart/radar/RadarView.mjs +187 -0
  48. package/es/node_modules/echarts/lib/chart/radar/backwardCompat.mjs +33 -0
  49. package/es/node_modules/echarts/lib/chart/radar/install.mjs +18 -0
  50. package/es/node_modules/echarts/lib/chart/radar/radarLayout.mjs +35 -0
  51. package/es/node_modules/echarts/lib/component/axis/AxisBuilder.mjs +507 -0
  52. package/es/node_modules/echarts/lib/component/axis/AxisView.mjs +54 -0
  53. package/es/node_modules/echarts/lib/component/axis/CartesianAxisView.mjs +199 -0
  54. package/es/node_modules/echarts/lib/component/axis/axisSplitHelper.mjs +82 -0
  55. package/es/node_modules/echarts/lib/component/axisPointer/AxisPointerModel.mjs +74 -0
  56. package/es/node_modules/echarts/lib/component/axisPointer/AxisPointerView.mjs +39 -0
  57. package/es/node_modules/echarts/lib/component/axisPointer/BaseAxisPointer.mjs +286 -0
  58. package/es/node_modules/echarts/lib/component/axisPointer/CartesianAxisPointer.mjs +105 -0
  59. package/es/node_modules/echarts/lib/component/axisPointer/axisTrigger.mjs +292 -0
  60. package/es/node_modules/echarts/lib/component/axisPointer/findPointFromSeries.mjs +52 -0
  61. package/es/node_modules/echarts/lib/component/axisPointer/globalListener.mjs +86 -0
  62. package/es/node_modules/echarts/lib/component/axisPointer/install.mjs +32 -0
  63. package/es/node_modules/echarts/lib/component/axisPointer/modelHelper.mjs +206 -0
  64. package/es/node_modules/echarts/lib/component/axisPointer/viewHelper.mjs +143 -0
  65. package/es/node_modules/echarts/lib/component/dataset/install.mjs +57 -0
  66. package/es/node_modules/echarts/lib/component/graphic/GraphicModel.mjs +161 -0
  67. package/es/node_modules/echarts/lib/component/graphic/GraphicView.mjs +307 -0
  68. package/es/node_modules/echarts/lib/component/graphic/install.mjs +26 -0
  69. package/es/node_modules/echarts/lib/component/grid/install.mjs +10 -0
  70. package/es/node_modules/echarts/lib/component/grid/installSimple.mjs +58 -0
  71. package/es/node_modules/echarts/lib/component/helper/listComponent.mjs +23 -0
  72. package/es/node_modules/echarts/lib/component/legend/LegendModel.mjs +261 -0
  73. package/es/node_modules/echarts/lib/component/legend/LegendView.mjs +417 -0
  74. package/es/node_modules/echarts/lib/component/legend/ScrollableLegendModel.mjs +59 -0
  75. package/es/node_modules/echarts/lib/component/legend/ScrollableLegendView.mjs +313 -0
  76. package/es/node_modules/echarts/lib/component/legend/install.mjs +10 -0
  77. package/es/node_modules/echarts/lib/component/legend/installLegendPlain.mjs +16 -0
  78. package/es/node_modules/echarts/lib/component/legend/installLegendScroll.mjs +14 -0
  79. package/es/node_modules/echarts/lib/component/legend/legendAction.mjs +59 -0
  80. package/es/node_modules/echarts/lib/component/legend/legendFilter.mjs +18 -0
  81. package/es/node_modules/echarts/lib/component/legend/scrollableLegendAction.mjs +15 -0
  82. package/es/node_modules/echarts/lib/component/radar/RadarView.mjs +161 -0
  83. package/es/node_modules/echarts/lib/component/radar/install.mjs +21 -0
  84. package/es/node_modules/echarts/lib/component/title/install.mjs +183 -0
  85. package/es/node_modules/echarts/lib/component/tooltip/TooltipHTMLContent.mjs +299 -0
  86. package/es/node_modules/echarts/lib/component/tooltip/TooltipModel.mjs +86 -0
  87. package/es/node_modules/echarts/lib/component/tooltip/TooltipRichContent.mjs +153 -0
  88. package/es/node_modules/echarts/lib/component/tooltip/TooltipView.mjs +693 -0
  89. package/es/node_modules/echarts/lib/component/tooltip/helper.mjs +39 -0
  90. package/es/node_modules/echarts/lib/component/tooltip/install.mjs +23 -0
  91. package/es/node_modules/echarts/lib/component/tooltip/seriesFormatTooltip.mjs +95 -0
  92. package/es/node_modules/echarts/lib/component/tooltip/tooltipMarkup.mjs +252 -0
  93. package/es/node_modules/echarts/lib/component/transform/filterTransform.mjs +46 -0
  94. package/es/node_modules/echarts/lib/component/transform/install.mjs +9 -0
  95. package/es/node_modules/echarts/lib/component/transform/sortTransform.mjs +81 -0
  96. package/es/node_modules/echarts/lib/coord/Axis.mjs +176 -0
  97. package/es/node_modules/echarts/lib/coord/CoordinateSystem.mjs +6 -0
  98. package/es/node_modules/echarts/lib/coord/axisAlignTicks.mjs +76 -0
  99. package/es/node_modules/echarts/lib/coord/axisCommonTypes.mjs +9 -0
  100. package/es/node_modules/echarts/lib/coord/axisDefault.mjs +164 -0
  101. package/es/node_modules/echarts/lib/coord/axisHelper.mjs +223 -0
  102. package/es/node_modules/echarts/lib/coord/axisModelCommonMixin.mjs +18 -0
  103. package/es/node_modules/echarts/lib/coord/axisModelCreator.mjs +62 -0
  104. package/es/node_modules/echarts/lib/coord/axisTickLabelBuilder.mjs +266 -0
  105. package/es/node_modules/echarts/lib/coord/cartesian/Axis2D.mjs +40 -0
  106. package/es/node_modules/echarts/lib/coord/cartesian/AxisModel.mjs +24 -0
  107. package/es/node_modules/echarts/lib/coord/cartesian/Cartesian.mjs +35 -0
  108. package/es/node_modules/echarts/lib/coord/cartesian/Cartesian2D.mjs +116 -0
  109. package/es/node_modules/echarts/lib/coord/cartesian/Grid.mjs +376 -0
  110. package/es/node_modules/echarts/lib/coord/cartesian/GridModel.mjs +34 -0
  111. package/es/node_modules/echarts/lib/coord/cartesian/cartesianAxisHelper.mjs +67 -0
  112. package/es/node_modules/echarts/lib/coord/geo/Region.mjs +231 -0
  113. package/es/node_modules/echarts/lib/coord/geo/parseGeoJson.mjs +94 -0
  114. package/es/node_modules/echarts/lib/coord/radar/IndicatorAxis.mjs +19 -0
  115. package/es/node_modules/echarts/lib/coord/radar/Radar.mjs +138 -0
  116. package/es/node_modules/echarts/lib/coord/radar/RadarModel.mjs +116 -0
  117. package/es/node_modules/echarts/lib/coord/scaleRawExtentInfo.mjs +134 -0
  118. package/es/node_modules/echarts/lib/core/CoordinateSystem.mjs +36 -0
  119. package/es/node_modules/echarts/lib/core/ExtensionAPI.mjs +35 -0
  120. package/es/node_modules/echarts/lib/core/Scheduler.mjs +350 -0
  121. package/es/node_modules/echarts/lib/core/echarts.mjs +1782 -0
  122. package/es/node_modules/echarts/lib/core/impl.mjs +11 -0
  123. package/es/node_modules/echarts/lib/core/lifecycle.mjs +5 -0
  124. package/es/node_modules/echarts/lib/core/locale.mjs +49 -0
  125. package/es/node_modules/echarts/lib/core/task.mjs +171 -0
  126. package/es/node_modules/echarts/lib/data/DataDiffer.mjs +153 -0
  127. package/es/node_modules/echarts/lib/data/DataStore.mjs +820 -0
  128. package/es/node_modules/echarts/lib/data/OrdinalMeta.mjs +65 -0
  129. package/es/node_modules/echarts/lib/data/SeriesData.mjs +647 -0
  130. package/es/node_modules/echarts/lib/data/SeriesDimensionDefine.mjs +16 -0
  131. package/es/node_modules/echarts/lib/data/Source.mjs +211 -0
  132. package/es/node_modules/echarts/lib/data/helper/SeriesDataSchema.mjs +144 -0
  133. package/es/node_modules/echarts/lib/data/helper/createDimensions.mjs +215 -0
  134. package/es/node_modules/echarts/lib/data/helper/dataProvider.mjs +226 -0
  135. package/es/node_modules/echarts/lib/data/helper/dataStackHelper.mjs +107 -0
  136. package/es/node_modules/echarts/lib/data/helper/dataValueHelper.mjs +126 -0
  137. package/es/node_modules/echarts/lib/data/helper/dimensionHelper.mjs +100 -0
  138. package/es/node_modules/echarts/lib/data/helper/sourceHelper.mjs +242 -0
  139. package/es/node_modules/echarts/lib/data/helper/sourceManager.mjs +222 -0
  140. package/es/node_modules/echarts/lib/data/helper/transform.mjs +247 -0
  141. package/es/node_modules/echarts/lib/export/api/format.mjs +16 -0
  142. package/es/node_modules/echarts/lib/export/api/graphic.mjs +54 -0
  143. package/es/node_modules/echarts/lib/export/api/helper.mjs +49 -0
  144. package/es/node_modules/echarts/lib/export/api/number.mjs +21 -0
  145. package/es/node_modules/echarts/lib/export/api/time.mjs +6 -0
  146. package/es/node_modules/echarts/lib/export/api/util.mjs +19 -0
  147. package/es/node_modules/echarts/lib/export/api.mjs +34 -0
  148. package/es/node_modules/echarts/lib/extension.mjs +69 -0
  149. package/es/node_modules/echarts/lib/i18n/langEN.mjs +114 -0
  150. package/es/node_modules/echarts/lib/i18n/langZH.mjs +114 -0
  151. package/es/node_modules/echarts/lib/label/labelGuideHelper.mjs +215 -0
  152. package/es/node_modules/echarts/lib/label/labelLayoutHelper.mjs +215 -0
  153. package/es/node_modules/echarts/lib/label/labelStyle.mjs +330 -0
  154. package/es/node_modules/echarts/lib/label/sectorLabel.mjs +152 -0
  155. package/es/node_modules/echarts/lib/layout/barGrid.mjs +368 -0
  156. package/es/node_modules/echarts/lib/layout/points.mjs +59 -0
  157. package/es/node_modules/echarts/lib/legacy/dataSelectAction.mjs +68 -0
  158. package/es/node_modules/echarts/lib/legacy/getTextRect.mjs +20 -0
  159. package/es/node_modules/echarts/lib/loading/default.mjs +108 -0
  160. package/es/node_modules/echarts/lib/model/Component.mjs +118 -0
  161. package/es/node_modules/echarts/lib/model/Global.mjs +471 -0
  162. package/es/node_modules/echarts/lib/model/Model.mjs +102 -0
  163. package/es/node_modules/echarts/lib/model/OptionManager.mjs +179 -0
  164. package/es/node_modules/echarts/lib/model/Series.mjs +375 -0
  165. package/es/node_modules/echarts/lib/model/globalDefault.mjs +89 -0
  166. package/es/node_modules/echarts/lib/model/internalComponentCreator.mjs +16 -0
  167. package/es/node_modules/echarts/lib/model/mixin/areaStyle.mjs +27 -0
  168. package/es/node_modules/echarts/lib/model/mixin/dataFormat.mjs +108 -0
  169. package/es/node_modules/echarts/lib/model/mixin/itemStyle.mjs +34 -0
  170. package/es/node_modules/echarts/lib/model/mixin/lineStyle.mjs +33 -0
  171. package/es/node_modules/echarts/lib/model/mixin/makeStyleMapper.mjs +26 -0
  172. package/es/node_modules/echarts/lib/model/mixin/palette.mjs +55 -0
  173. package/es/node_modules/echarts/lib/model/mixin/textStyle.mjs +40 -0
  174. package/es/node_modules/echarts/lib/model/referHelper.mjs +90 -0
  175. package/es/node_modules/echarts/lib/preprocessor/backwardCompat.mjs +178 -0
  176. package/es/node_modules/echarts/lib/preprocessor/helper/compatStyle.mjs +239 -0
  177. package/es/node_modules/echarts/lib/processor/dataFilter.mjs +26 -0
  178. package/es/node_modules/echarts/lib/processor/dataSample.mjs +83 -0
  179. package/es/node_modules/echarts/lib/processor/dataStack.mjs +73 -0
  180. package/es/node_modules/echarts/lib/processor/negativeDataFilter.mjs +20 -0
  181. package/es/node_modules/echarts/lib/renderer/installCanvasRenderer.mjs +7 -0
  182. package/es/node_modules/echarts/lib/scale/Interval.mjs +191 -0
  183. package/es/node_modules/echarts/lib/scale/Log.mjs +120 -0
  184. package/es/node_modules/echarts/lib/scale/Ordinal.mjs +124 -0
  185. package/es/node_modules/echarts/lib/scale/Scale.mjs +47 -0
  186. package/es/node_modules/echarts/lib/scale/Time.mjs +373 -0
  187. package/es/node_modules/echarts/lib/scale/helper.mjs +70 -0
  188. package/es/node_modules/echarts/lib/theme/dark.mjs +184 -0
  189. package/es/node_modules/echarts/lib/theme/light.mjs +8 -0
  190. package/es/node_modules/echarts/lib/util/ECEventProcessor.mjs +79 -0
  191. package/es/node_modules/echarts/lib/util/clazz.mjs +149 -0
  192. package/es/node_modules/echarts/lib/util/component.mjs +112 -0
  193. package/es/node_modules/echarts/lib/util/conditionalExpression.mjs +218 -0
  194. package/es/node_modules/echarts/lib/util/decal.mjs +280 -0
  195. package/es/node_modules/echarts/lib/util/event.mjs +16 -0
  196. package/es/node_modules/echarts/lib/util/format.mjs +148 -0
  197. package/es/node_modules/echarts/lib/util/graphic.mjs +378 -0
  198. package/es/node_modules/echarts/lib/util/innerStore.mjs +24 -0
  199. package/es/node_modules/echarts/lib/util/layout.mjs +248 -0
  200. package/es/node_modules/echarts/lib/util/log.mjs +6 -0
  201. package/es/node_modules/echarts/lib/util/model.mjs +385 -0
  202. package/es/node_modules/echarts/lib/util/number.mjs +322 -0
  203. package/es/node_modules/echarts/lib/util/shape/sausage.mjs +67 -0
  204. package/es/node_modules/echarts/lib/util/states.mjs +558 -0
  205. package/es/node_modules/echarts/lib/util/styleCompat.mjs +75 -0
  206. package/es/node_modules/echarts/lib/util/symbol.mjs +266 -0
  207. package/es/node_modules/echarts/lib/util/throttle.mjs +84 -0
  208. package/es/node_modules/echarts/lib/util/time.mjs +254 -0
  209. package/es/node_modules/echarts/lib/util/types.mjs +21 -0
  210. package/es/node_modules/echarts/lib/util/vendor.mjs +12 -0
  211. package/es/node_modules/echarts/lib/view/Chart.mjs +127 -0
  212. package/es/node_modules/echarts/lib/view/Component.mjs +38 -0
  213. package/es/node_modules/echarts/lib/visual/LegendVisualProvider.mjs +29 -0
  214. package/es/node_modules/echarts/lib/visual/decal.mjs +26 -0
  215. package/es/node_modules/echarts/lib/visual/helper.mjs +30 -0
  216. package/es/node_modules/echarts/lib/visual/style.mjs +159 -0
  217. package/es/node_modules/echarts/lib/visual/symbol.mjs +81 -0
  218. package/es/node_modules/grid-layout-plus/es/components/grid-item.vue.mjs +32 -2
  219. package/es/node_modules/grid-layout-plus/es/index.mjs +5 -1
  220. package/es/node_modules/layout-base/layout-base.mjs +3197 -0
  221. package/es/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-LMCZKHZV.mjs +1 -1
  222. package/es/node_modules/mermaid/dist/chunks/mermaid.core/chunk-32BRIVSS.mjs +1 -1
  223. package/es/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ICXQ74PX.mjs +1 -1
  224. package/es/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-OUVF2IWQ.mjs +1 -1
  225. package/es/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-v2-EOCWNBFH.mjs +1 -1
  226. package/es/node_modules/mermaid/dist/chunks/mermaid.core/flowDiagram-23GEKE2U.mjs +1 -1
  227. package/es/node_modules/mermaid/dist/chunks/mermaid.core/ganttDiagram-NO4QXBWP.mjs +1 -1
  228. package/es/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-DBY2YBRQ.mjs +1 -1
  229. package/es/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-2N3HPSRC.mjs +1 -1
  230. package/es/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-v2-6OUMAXLB.mjs +1 -1
  231. package/es/node_modules/mermaid/dist/chunks/mermaid.core/swimlanesDiagram-G3AALYLV.mjs +1 -1
  232. package/es/node_modules/object-refs/index.mjs +1 -1
  233. package/es/node_modules/tslib/tslib.es6.mjs +34 -0
  234. package/es/node_modules/zrender/lib/Element.mjs +974 -0
  235. package/es/node_modules/zrender/lib/Handler.mjs +295 -0
  236. package/es/node_modules/zrender/lib/Storage.mjs +156 -0
  237. package/es/node_modules/zrender/lib/animation/Animation.mjs +146 -0
  238. package/es/node_modules/zrender/lib/animation/Animator.mjs +701 -0
  239. package/es/node_modules/zrender/lib/animation/Clip.mjs +63 -0
  240. package/es/node_modules/zrender/lib/animation/cubicEasing.mjs +23 -0
  241. package/es/node_modules/zrender/lib/animation/easing.mjs +187 -0
  242. package/es/node_modules/zrender/lib/animation/requestAnimationFrame.mjs +8 -0
  243. package/es/node_modules/zrender/lib/canvas/Layer.mjs +286 -0
  244. package/es/node_modules/zrender/lib/canvas/Painter.mjs +610 -0
  245. package/es/node_modules/zrender/lib/canvas/dashStyle.mjs +26 -0
  246. package/es/node_modules/zrender/lib/canvas/graphic.mjs +521 -0
  247. package/es/node_modules/zrender/lib/canvas/helper.mjs +82 -0
  248. package/es/node_modules/zrender/lib/config.mjs +17 -0
  249. package/es/node_modules/zrender/lib/contain/arc.mjs +36 -0
  250. package/es/node_modules/zrender/lib/contain/cubic.mjs +15 -0
  251. package/es/node_modules/zrender/lib/contain/line.mjs +23 -0
  252. package/es/node_modules/zrender/lib/contain/path.mjs +289 -0
  253. package/es/node_modules/zrender/lib/contain/polygon.mjs +25 -0
  254. package/es/node_modules/zrender/lib/contain/quadratic.mjs +15 -0
  255. package/es/node_modules/zrender/lib/contain/text.mjs +173 -0
  256. package/es/node_modules/zrender/lib/contain/util.mjs +11 -0
  257. package/es/node_modules/zrender/lib/contain/windingLine.mjs +18 -0
  258. package/es/node_modules/zrender/lib/core/BoundingRect.mjs +203 -0
  259. package/es/node_modules/zrender/lib/core/Eventful.mjs +153 -0
  260. package/es/node_modules/zrender/lib/core/GestureMgr.mjs +81 -0
  261. package/es/node_modules/zrender/lib/core/LRU.mjs +108 -0
  262. package/es/node_modules/zrender/lib/core/OrientedBoundingRect.mjs +119 -0
  263. package/es/node_modules/zrender/lib/core/PathProxy.mjs +693 -0
  264. package/es/node_modules/zrender/lib/core/Point.mjs +131 -0
  265. package/es/node_modules/zrender/lib/core/Transformable.mjs +236 -0
  266. package/es/node_modules/zrender/lib/core/WeakMap.mjs +43 -0
  267. package/es/node_modules/zrender/lib/core/bbox.mjs +108 -0
  268. package/es/node_modules/zrender/lib/core/curve.mjs +336 -0
  269. package/es/node_modules/zrender/lib/core/dom.mjs +92 -0
  270. package/es/node_modules/zrender/lib/core/env.mjs +71 -0
  271. package/es/node_modules/zrender/lib/core/event.mjs +96 -0
  272. package/es/node_modules/zrender/lib/core/fourPointsTransform.mjs +59 -0
  273. package/es/node_modules/zrender/lib/core/matrix.mjs +112 -0
  274. package/es/node_modules/zrender/lib/core/platform.mjs +77 -0
  275. package/es/node_modules/zrender/lib/core/timsort.mjs +510 -0
  276. package/es/node_modules/zrender/lib/core/util.mjs +559 -0
  277. package/es/node_modules/zrender/lib/core/vector.mjs +136 -0
  278. package/es/node_modules/zrender/lib/dom/HandlerProxy.mjs +300 -0
  279. package/es/node_modules/zrender/lib/graphic/CompoundPath.mjs +51 -0
  280. package/es/node_modules/zrender/lib/graphic/Displayable.mjs +314 -0
  281. package/es/node_modules/zrender/lib/graphic/Gradient.mjs +15 -0
  282. package/es/node_modules/zrender/lib/graphic/Group.mjs +174 -0
  283. package/es/node_modules/zrender/lib/graphic/Image.mjs +73 -0
  284. package/es/node_modules/zrender/lib/graphic/IncrementalDisplayable.mjs +113 -0
  285. package/es/node_modules/zrender/lib/graphic/LinearGradient.mjs +19 -0
  286. package/es/node_modules/zrender/lib/graphic/Path.mjs +393 -0
  287. package/es/node_modules/zrender/lib/graphic/RadialGradient.mjs +18 -0
  288. package/es/node_modules/zrender/lib/graphic/TSpan.mjs +66 -0
  289. package/es/node_modules/zrender/lib/graphic/Text.mjs +503 -0
  290. package/es/node_modules/zrender/lib/graphic/constants.mjs +8 -0
  291. package/es/node_modules/zrender/lib/graphic/helper/image.mjs +55 -0
  292. package/es/node_modules/zrender/lib/graphic/helper/parseText.mjs +474 -0
  293. package/es/node_modules/zrender/lib/graphic/helper/poly.mjs +27 -0
  294. package/es/node_modules/zrender/lib/graphic/helper/roundRect.mjs +73 -0
  295. package/es/node_modules/zrender/lib/graphic/helper/roundSector.mjs +218 -0
  296. package/es/node_modules/zrender/lib/graphic/helper/smoothBezier.mjs +64 -0
  297. package/es/node_modules/zrender/lib/graphic/helper/subPixelOptimize.mjs +59 -0
  298. package/es/node_modules/zrender/lib/graphic/shape/Arc.mjs +46 -0
  299. package/es/node_modules/zrender/lib/graphic/shape/BezierCurve.mjs +98 -0
  300. package/es/node_modules/zrender/lib/graphic/shape/Circle.mjs +29 -0
  301. package/es/node_modules/zrender/lib/graphic/shape/Ellipse.mjs +41 -0
  302. package/es/node_modules/zrender/lib/graphic/shape/Line.mjs +70 -0
  303. package/es/node_modules/zrender/lib/graphic/shape/Polygon.mjs +29 -0
  304. package/es/node_modules/zrender/lib/graphic/shape/Polyline.mjs +36 -0
  305. package/es/node_modules/zrender/lib/graphic/shape/Rect.mjs +57 -0
  306. package/es/node_modules/zrender/lib/graphic/shape/Ring.mjs +35 -0
  307. package/es/node_modules/zrender/lib/graphic/shape/Sector.mjs +37 -0
  308. package/es/node_modules/zrender/lib/mixin/Draggable.mjs +68 -0
  309. package/es/node_modules/zrender/lib/svg/helper.mjs +27 -0
  310. package/es/node_modules/zrender/lib/tool/color.mjs +501 -0
  311. package/es/node_modules/zrender/lib/tool/path.mjs +338 -0
  312. package/es/node_modules/zrender/lib/tool/transformPath.mjs +84 -0
  313. package/es/node_modules/zrender/lib/zrender.mjs +323 -0
  314. package/es/packages/mobile/index.mjs +17 -0
  315. package/es/packages/mobile/src/components/all.mjs +18 -1
  316. package/es/packages/mobile/src/components/base/card/Card.vue.mjs +2 -2
  317. package/es/packages/mobile/src/components/custom/aiAssistant/AiAssistant.vue.mjs +91 -0
  318. package/es/packages/mobile/src/components/custom/aiAssistant/index.mjs +10 -0
  319. package/es/packages/mobile/src/components/custom/appDetail/AppDetail.vue.mjs +25 -16
  320. package/es/packages/mobile/src/components/custom/approvalBar/ApprovalBar.vue.mjs +7 -3
  321. package/es/packages/mobile/src/components/custom/document/Document.vue.mjs +2 -2
  322. package/es/packages/mobile/src/components/dataDisplay/cardList/CardLayoutRenderer.vue.mjs +246 -0
  323. package/es/packages/mobile/src/components/dataDisplay/cardList/CardList.vue.mjs +60 -10
  324. package/es/packages/mobile/src/components/dataDisplay/cardList/index.mjs +2 -0
  325. package/es/packages/mobile/src/components/dataDisplay/cardList/layoutDefinitions.mjs +77 -0
  326. package/es/packages/mobile/src/components/dataDisplay/chart/Chart.vue.mjs +314 -0
  327. package/es/packages/mobile/src/components/dataDisplay/chart/formatters.mjs +20 -0
  328. package/es/packages/mobile/src/components/dataDisplay/chart/index.mjs +7 -0
  329. package/es/packages/mobile/src/components/dataDisplay/chart/optionBuilder.mjs +340 -0
  330. package/es/packages/mobile/src/components/dataDisplay/chart/presets.mjs +29 -0
  331. package/es/packages/mobile/src/components/dataDisplay/chart/useEcharts.mjs +42 -0
  332. package/es/packages/mobile/src/components/form/fieldDrawerSelect/FieldDrawerSelect.vue.mjs +676 -0
  333. package/es/packages/mobile/src/components/form/fieldDrawerSelect/index.mjs +10 -0
  334. package/es/packages/mobile/src/components/navigation/anchorNav/AnchorNav.vue.mjs +101 -0
  335. package/es/packages/mobile/src/components/navigation/anchorNav/index.mjs +7 -0
  336. package/es/packages/mobile/src/components/navigation/tabbar/Tabbar.vue.mjs +2 -2
  337. package/es/packages/mobile/src/index.vue.mjs +21 -71
  338. package/es/packages/mobile/src/page.vue.mjs +79 -37
  339. package/es/packages/mobile/src/utils/idea/vue3sfc.mjs +49 -2
  340. package/es/packages/vue/src/components/bus/flowChart/bpmnjs/component/NodeItem.vue.mjs +1 -1
  341. package/es/packages/vue/src/components/bus/flowChart/bpmnjs/component/timeline.vue.mjs +1 -1
  342. package/es/packages/vue/src/components/forms/form/Form.vue.mjs +184 -40
  343. package/es/packages/vue/src/components/forms/formItem/FormItem.vue.mjs +12 -2
  344. package/lib/_virtual/index2.js +6 -4
  345. package/lib/_virtual/index3.js +4 -6
  346. package/lib/_virtual/index4.js +2 -2
  347. package/lib/_virtual/index5.js +2 -2
  348. package/lib/designer/package.json.js +1 -1
  349. package/lib/designer/src/components/DataSourceSelect.vue.js +6 -2
  350. package/lib/designer/src/layout/property/index.vue.js +1 -1
  351. package/lib/designer/src/packages/dialogGlobal/index.vue.js +1 -1
  352. package/lib/designer.css +585 -164
  353. package/lib/node_modules/@braintree/sanitize-url/dist/index.js +1 -1
  354. package/lib/node_modules/cose-base/cose-base.js +1090 -0
  355. package/lib/node_modules/cytoscape-cose-bilkent/cytoscape-cose-bilkent.js +1 -1
  356. package/lib/node_modules/d3-sankey/src/sankeyLinkHorizontal.js +1 -1
  357. package/lib/node_modules/diagram-js/lib/model/index.js +1 -1
  358. package/lib/node_modules/echarts/core.js +86 -0
  359. package/lib/node_modules/echarts/lib/animation/basicTransition.js +148 -0
  360. package/lib/node_modules/echarts/lib/animation/customGraphicKeyframeAnimation.js +79 -0
  361. package/lib/node_modules/echarts/lib/animation/customGraphicTransition.js +338 -0
  362. package/lib/node_modules/echarts/lib/chart/bar/BarSeries.js +66 -0
  363. package/lib/node_modules/echarts/lib/chart/bar/BarView.js +782 -0
  364. package/lib/node_modules/echarts/lib/chart/bar/BaseBarSeries.js +104 -0
  365. package/lib/node_modules/echarts/lib/chart/bar/install.js +30 -0
  366. package/lib/node_modules/echarts/lib/chart/funnel/FunnelSeries.js +99 -0
  367. package/lib/node_modules/echarts/lib/chart/funnel/FunnelView.js +165 -0
  368. package/lib/node_modules/echarts/lib/chart/funnel/funnelLayout.js +282 -0
  369. package/lib/node_modules/echarts/lib/chart/funnel/install.js +13 -0
  370. package/lib/node_modules/echarts/lib/chart/helper/Symbol.js +248 -0
  371. package/lib/node_modules/echarts/lib/chart/helper/SymbolDraw.js +156 -0
  372. package/lib/node_modules/echarts/lib/chart/helper/createClipPathFromCoordSys.js +104 -0
  373. package/lib/node_modules/echarts/lib/chart/helper/createRenderPlanner.js +16 -0
  374. package/lib/node_modules/echarts/lib/chart/helper/createSeriesData.js +113 -0
  375. package/lib/node_modules/echarts/lib/chart/helper/createSeriesDataSimply.js +18 -0
  376. package/lib/node_modules/echarts/lib/chart/helper/labelHelper.js +34 -0
  377. package/lib/node_modules/echarts/lib/chart/helper/sectorHelper.js +22 -0
  378. package/lib/node_modules/echarts/lib/chart/line/LineSeries.js +108 -0
  379. package/lib/node_modules/echarts/lib/chart/line/LineView.js +966 -0
  380. package/lib/node_modules/echarts/lib/chart/line/helper.js +80 -0
  381. package/lib/node_modules/echarts/lib/chart/line/install.js +24 -0
  382. package/lib/node_modules/echarts/lib/chart/line/lineAnimationDiff.js +112 -0
  383. package/lib/node_modules/echarts/lib/chart/line/poly.js +303 -0
  384. package/lib/node_modules/echarts/lib/chart/pie/PieSeries.js +159 -0
  385. package/lib/node_modules/echarts/lib/chart/pie/PieView.js +229 -0
  386. package/lib/node_modules/echarts/lib/chart/pie/install.js +18 -0
  387. package/lib/node_modules/echarts/lib/chart/pie/labelLayout.js +390 -0
  388. package/lib/node_modules/echarts/lib/chart/pie/pieLayout.js +185 -0
  389. package/lib/node_modules/echarts/lib/chart/radar/RadarSeries.js +92 -0
  390. package/lib/node_modules/echarts/lib/chart/radar/RadarView.js +187 -0
  391. package/lib/node_modules/echarts/lib/chart/radar/backwardCompat.js +33 -0
  392. package/lib/node_modules/echarts/lib/chart/radar/install.js +18 -0
  393. package/lib/node_modules/echarts/lib/chart/radar/radarLayout.js +35 -0
  394. package/lib/node_modules/echarts/lib/component/axis/AxisBuilder.js +507 -0
  395. package/lib/node_modules/echarts/lib/component/axis/AxisView.js +54 -0
  396. package/lib/node_modules/echarts/lib/component/axis/CartesianAxisView.js +199 -0
  397. package/lib/node_modules/echarts/lib/component/axis/axisSplitHelper.js +82 -0
  398. package/lib/node_modules/echarts/lib/component/axisPointer/AxisPointerModel.js +74 -0
  399. package/lib/node_modules/echarts/lib/component/axisPointer/AxisPointerView.js +39 -0
  400. package/lib/node_modules/echarts/lib/component/axisPointer/BaseAxisPointer.js +285 -0
  401. package/lib/node_modules/echarts/lib/component/axisPointer/CartesianAxisPointer.js +105 -0
  402. package/lib/node_modules/echarts/lib/component/axisPointer/axisTrigger.js +292 -0
  403. package/lib/node_modules/echarts/lib/component/axisPointer/findPointFromSeries.js +52 -0
  404. package/lib/node_modules/echarts/lib/component/axisPointer/globalListener.js +86 -0
  405. package/lib/node_modules/echarts/lib/component/axisPointer/install.js +32 -0
  406. package/lib/node_modules/echarts/lib/component/axisPointer/modelHelper.js +206 -0
  407. package/lib/node_modules/echarts/lib/component/axisPointer/viewHelper.js +143 -0
  408. package/lib/node_modules/echarts/lib/component/dataset/install.js +57 -0
  409. package/lib/node_modules/echarts/lib/component/graphic/GraphicModel.js +161 -0
  410. package/lib/node_modules/echarts/lib/component/graphic/GraphicView.js +307 -0
  411. package/lib/node_modules/echarts/lib/component/graphic/install.js +26 -0
  412. package/lib/node_modules/echarts/lib/component/grid/install.js +10 -0
  413. package/lib/node_modules/echarts/lib/component/grid/installSimple.js +58 -0
  414. package/lib/node_modules/echarts/lib/component/helper/listComponent.js +23 -0
  415. package/lib/node_modules/echarts/lib/component/legend/LegendModel.js +261 -0
  416. package/lib/node_modules/echarts/lib/component/legend/LegendView.js +417 -0
  417. package/lib/node_modules/echarts/lib/component/legend/ScrollableLegendModel.js +59 -0
  418. package/lib/node_modules/echarts/lib/component/legend/ScrollableLegendView.js +313 -0
  419. package/lib/node_modules/echarts/lib/component/legend/install.js +10 -0
  420. package/lib/node_modules/echarts/lib/component/legend/installLegendPlain.js +16 -0
  421. package/lib/node_modules/echarts/lib/component/legend/installLegendScroll.js +14 -0
  422. package/lib/node_modules/echarts/lib/component/legend/legendAction.js +59 -0
  423. package/lib/node_modules/echarts/lib/component/legend/legendFilter.js +18 -0
  424. package/lib/node_modules/echarts/lib/component/legend/scrollableLegendAction.js +15 -0
  425. package/lib/node_modules/echarts/lib/component/radar/RadarView.js +161 -0
  426. package/lib/node_modules/echarts/lib/component/radar/install.js +21 -0
  427. package/lib/node_modules/echarts/lib/component/title/install.js +183 -0
  428. package/lib/node_modules/echarts/lib/component/tooltip/TooltipHTMLContent.js +299 -0
  429. package/lib/node_modules/echarts/lib/component/tooltip/TooltipModel.js +86 -0
  430. package/lib/node_modules/echarts/lib/component/tooltip/TooltipRichContent.js +153 -0
  431. package/lib/node_modules/echarts/lib/component/tooltip/TooltipView.js +693 -0
  432. package/lib/node_modules/echarts/lib/component/tooltip/helper.js +39 -0
  433. package/lib/node_modules/echarts/lib/component/tooltip/install.js +23 -0
  434. package/lib/node_modules/echarts/lib/component/tooltip/seriesFormatTooltip.js +95 -0
  435. package/lib/node_modules/echarts/lib/component/tooltip/tooltipMarkup.js +252 -0
  436. package/lib/node_modules/echarts/lib/component/transform/filterTransform.js +46 -0
  437. package/lib/node_modules/echarts/lib/component/transform/install.js +9 -0
  438. package/lib/node_modules/echarts/lib/component/transform/sortTransform.js +81 -0
  439. package/lib/node_modules/echarts/lib/coord/Axis.js +176 -0
  440. package/lib/node_modules/echarts/lib/coord/CoordinateSystem.js +6 -0
  441. package/lib/node_modules/echarts/lib/coord/axisAlignTicks.js +76 -0
  442. package/lib/node_modules/echarts/lib/coord/axisCommonTypes.js +9 -0
  443. package/lib/node_modules/echarts/lib/coord/axisDefault.js +164 -0
  444. package/lib/node_modules/echarts/lib/coord/axisHelper.js +223 -0
  445. package/lib/node_modules/echarts/lib/coord/axisModelCommonMixin.js +18 -0
  446. package/lib/node_modules/echarts/lib/coord/axisModelCreator.js +62 -0
  447. package/lib/node_modules/echarts/lib/coord/axisTickLabelBuilder.js +266 -0
  448. package/lib/node_modules/echarts/lib/coord/cartesian/Axis2D.js +40 -0
  449. package/lib/node_modules/echarts/lib/coord/cartesian/AxisModel.js +24 -0
  450. package/lib/node_modules/echarts/lib/coord/cartesian/Cartesian.js +35 -0
  451. package/lib/node_modules/echarts/lib/coord/cartesian/Cartesian2D.js +116 -0
  452. package/lib/node_modules/echarts/lib/coord/cartesian/Grid.js +376 -0
  453. package/lib/node_modules/echarts/lib/coord/cartesian/GridModel.js +34 -0
  454. package/lib/node_modules/echarts/lib/coord/cartesian/cartesianAxisHelper.js +67 -0
  455. package/lib/node_modules/echarts/lib/coord/geo/Region.js +231 -0
  456. package/lib/node_modules/echarts/lib/coord/geo/parseGeoJson.js +94 -0
  457. package/lib/node_modules/echarts/lib/coord/radar/IndicatorAxis.js +19 -0
  458. package/lib/node_modules/echarts/lib/coord/radar/Radar.js +138 -0
  459. package/lib/node_modules/echarts/lib/coord/radar/RadarModel.js +116 -0
  460. package/lib/node_modules/echarts/lib/coord/scaleRawExtentInfo.js +134 -0
  461. package/lib/node_modules/echarts/lib/core/CoordinateSystem.js +36 -0
  462. package/lib/node_modules/echarts/lib/core/ExtensionAPI.js +35 -0
  463. package/lib/node_modules/echarts/lib/core/Scheduler.js +350 -0
  464. package/lib/node_modules/echarts/lib/core/echarts.js +1781 -0
  465. package/lib/node_modules/echarts/lib/core/impl.js +11 -0
  466. package/lib/node_modules/echarts/lib/core/lifecycle.js +5 -0
  467. package/lib/node_modules/echarts/lib/core/locale.js +49 -0
  468. package/lib/node_modules/echarts/lib/core/task.js +171 -0
  469. package/lib/node_modules/echarts/lib/data/DataDiffer.js +153 -0
  470. package/lib/node_modules/echarts/lib/data/DataStore.js +820 -0
  471. package/lib/node_modules/echarts/lib/data/OrdinalMeta.js +65 -0
  472. package/lib/node_modules/echarts/lib/data/SeriesData.js +647 -0
  473. package/lib/node_modules/echarts/lib/data/SeriesDimensionDefine.js +16 -0
  474. package/lib/node_modules/echarts/lib/data/Source.js +211 -0
  475. package/lib/node_modules/echarts/lib/data/helper/SeriesDataSchema.js +144 -0
  476. package/lib/node_modules/echarts/lib/data/helper/createDimensions.js +215 -0
  477. package/lib/node_modules/echarts/lib/data/helper/dataProvider.js +226 -0
  478. package/lib/node_modules/echarts/lib/data/helper/dataStackHelper.js +107 -0
  479. package/lib/node_modules/echarts/lib/data/helper/dataValueHelper.js +126 -0
  480. package/lib/node_modules/echarts/lib/data/helper/dimensionHelper.js +100 -0
  481. package/lib/node_modules/echarts/lib/data/helper/sourceHelper.js +242 -0
  482. package/lib/node_modules/echarts/lib/data/helper/sourceManager.js +222 -0
  483. package/lib/node_modules/echarts/lib/data/helper/transform.js +247 -0
  484. package/lib/node_modules/echarts/lib/export/api/format.js +16 -0
  485. package/lib/node_modules/echarts/lib/export/api/graphic.js +54 -0
  486. package/lib/node_modules/echarts/lib/export/api/helper.js +49 -0
  487. package/lib/node_modules/echarts/lib/export/api/number.js +21 -0
  488. package/lib/node_modules/echarts/lib/export/api/time.js +6 -0
  489. package/lib/node_modules/echarts/lib/export/api/util.js +19 -0
  490. package/lib/node_modules/echarts/lib/export/api.js +34 -0
  491. package/lib/node_modules/echarts/lib/extension.js +69 -0
  492. package/lib/node_modules/echarts/lib/i18n/langEN.js +114 -0
  493. package/lib/node_modules/echarts/lib/i18n/langZH.js +114 -0
  494. package/lib/node_modules/echarts/lib/label/labelGuideHelper.js +215 -0
  495. package/lib/node_modules/echarts/lib/label/labelLayoutHelper.js +215 -0
  496. package/lib/node_modules/echarts/lib/label/labelStyle.js +330 -0
  497. package/lib/node_modules/echarts/lib/label/sectorLabel.js +152 -0
  498. package/lib/node_modules/echarts/lib/layout/barGrid.js +368 -0
  499. package/lib/node_modules/echarts/lib/layout/points.js +59 -0
  500. package/lib/node_modules/echarts/lib/legacy/dataSelectAction.js +68 -0
  501. package/lib/node_modules/echarts/lib/legacy/getTextRect.js +20 -0
  502. package/lib/node_modules/echarts/lib/loading/default.js +108 -0
  503. package/lib/node_modules/echarts/lib/model/Component.js +118 -0
  504. package/lib/node_modules/echarts/lib/model/Global.js +471 -0
  505. package/lib/node_modules/echarts/lib/model/Model.js +102 -0
  506. package/lib/node_modules/echarts/lib/model/OptionManager.js +179 -0
  507. package/lib/node_modules/echarts/lib/model/Series.js +375 -0
  508. package/lib/node_modules/echarts/lib/model/globalDefault.js +89 -0
  509. package/lib/node_modules/echarts/lib/model/internalComponentCreator.js +16 -0
  510. package/lib/node_modules/echarts/lib/model/mixin/areaStyle.js +27 -0
  511. package/lib/node_modules/echarts/lib/model/mixin/dataFormat.js +108 -0
  512. package/lib/node_modules/echarts/lib/model/mixin/itemStyle.js +34 -0
  513. package/lib/node_modules/echarts/lib/model/mixin/lineStyle.js +33 -0
  514. package/lib/node_modules/echarts/lib/model/mixin/makeStyleMapper.js +26 -0
  515. package/lib/node_modules/echarts/lib/model/mixin/palette.js +55 -0
  516. package/lib/node_modules/echarts/lib/model/mixin/textStyle.js +40 -0
  517. package/lib/node_modules/echarts/lib/model/referHelper.js +90 -0
  518. package/lib/node_modules/echarts/lib/preprocessor/backwardCompat.js +178 -0
  519. package/lib/node_modules/echarts/lib/preprocessor/helper/compatStyle.js +239 -0
  520. package/lib/node_modules/echarts/lib/processor/dataFilter.js +26 -0
  521. package/lib/node_modules/echarts/lib/processor/dataSample.js +83 -0
  522. package/lib/node_modules/echarts/lib/processor/dataStack.js +73 -0
  523. package/lib/node_modules/echarts/lib/processor/negativeDataFilter.js +20 -0
  524. package/lib/node_modules/echarts/lib/renderer/installCanvasRenderer.js +7 -0
  525. package/lib/node_modules/echarts/lib/scale/Interval.js +191 -0
  526. package/lib/node_modules/echarts/lib/scale/Log.js +120 -0
  527. package/lib/node_modules/echarts/lib/scale/Ordinal.js +124 -0
  528. package/lib/node_modules/echarts/lib/scale/Scale.js +47 -0
  529. package/lib/node_modules/echarts/lib/scale/Time.js +373 -0
  530. package/lib/node_modules/echarts/lib/scale/helper.js +70 -0
  531. package/lib/node_modules/echarts/lib/theme/dark.js +184 -0
  532. package/lib/node_modules/echarts/lib/theme/light.js +8 -0
  533. package/lib/node_modules/echarts/lib/util/ECEventProcessor.js +79 -0
  534. package/lib/node_modules/echarts/lib/util/clazz.js +149 -0
  535. package/lib/node_modules/echarts/lib/util/component.js +112 -0
  536. package/lib/node_modules/echarts/lib/util/conditionalExpression.js +218 -0
  537. package/lib/node_modules/echarts/lib/util/decal.js +280 -0
  538. package/lib/node_modules/echarts/lib/util/event.js +16 -0
  539. package/lib/node_modules/echarts/lib/util/format.js +148 -0
  540. package/lib/node_modules/echarts/lib/util/graphic.js +377 -0
  541. package/lib/node_modules/echarts/lib/util/innerStore.js +24 -0
  542. package/lib/node_modules/echarts/lib/util/layout.js +248 -0
  543. package/lib/node_modules/echarts/lib/util/log.js +6 -0
  544. package/lib/node_modules/echarts/lib/util/model.js +385 -0
  545. package/lib/node_modules/echarts/lib/util/number.js +322 -0
  546. package/lib/node_modules/echarts/lib/util/shape/sausage.js +67 -0
  547. package/lib/node_modules/echarts/lib/util/states.js +558 -0
  548. package/lib/node_modules/echarts/lib/util/styleCompat.js +75 -0
  549. package/lib/node_modules/echarts/lib/util/symbol.js +266 -0
  550. package/lib/node_modules/echarts/lib/util/throttle.js +84 -0
  551. package/lib/node_modules/echarts/lib/util/time.js +254 -0
  552. package/lib/node_modules/echarts/lib/util/types.js +21 -0
  553. package/lib/node_modules/echarts/lib/util/vendor.js +12 -0
  554. package/lib/node_modules/echarts/lib/view/Chart.js +127 -0
  555. package/lib/node_modules/echarts/lib/view/Component.js +38 -0
  556. package/lib/node_modules/echarts/lib/visual/LegendVisualProvider.js +29 -0
  557. package/lib/node_modules/echarts/lib/visual/decal.js +26 -0
  558. package/lib/node_modules/echarts/lib/visual/helper.js +30 -0
  559. package/lib/node_modules/echarts/lib/visual/style.js +159 -0
  560. package/lib/node_modules/echarts/lib/visual/symbol.js +81 -0
  561. package/lib/node_modules/grid-layout-plus/es/components/grid-item.vue.js +32 -2
  562. package/lib/node_modules/grid-layout-plus/es/index.js +4 -1
  563. package/lib/node_modules/layout-base/layout-base.js +3197 -0
  564. package/lib/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-LMCZKHZV.js +1 -1
  565. package/lib/node_modules/mermaid/dist/chunks/mermaid.core/chunk-32BRIVSS.js +1 -1
  566. package/lib/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ICXQ74PX.js +1 -1
  567. package/lib/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-OUVF2IWQ.js +1 -1
  568. package/lib/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-v2-EOCWNBFH.js +1 -1
  569. package/lib/node_modules/mermaid/dist/chunks/mermaid.core/flowDiagram-23GEKE2U.js +1 -1
  570. package/lib/node_modules/mermaid/dist/chunks/mermaid.core/ganttDiagram-NO4QXBWP.js +1 -1
  571. package/lib/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-DBY2YBRQ.js +1 -1
  572. package/lib/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-2N3HPSRC.js +1 -1
  573. package/lib/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-v2-6OUMAXLB.js +1 -1
  574. package/lib/node_modules/mermaid/dist/chunks/mermaid.core/swimlanesDiagram-G3AALYLV.js +1 -1
  575. package/lib/node_modules/object-refs/index.js +1 -1
  576. package/lib/node_modules/tslib/tslib.es6.js +34 -0
  577. package/lib/node_modules/zrender/lib/Element.js +974 -0
  578. package/lib/node_modules/zrender/lib/Handler.js +295 -0
  579. package/lib/node_modules/zrender/lib/Storage.js +156 -0
  580. package/lib/node_modules/zrender/lib/animation/Animation.js +146 -0
  581. package/lib/node_modules/zrender/lib/animation/Animator.js +701 -0
  582. package/lib/node_modules/zrender/lib/animation/Clip.js +63 -0
  583. package/lib/node_modules/zrender/lib/animation/cubicEasing.js +23 -0
  584. package/lib/node_modules/zrender/lib/animation/easing.js +187 -0
  585. package/lib/node_modules/zrender/lib/animation/requestAnimationFrame.js +7 -0
  586. package/lib/node_modules/zrender/lib/canvas/Layer.js +286 -0
  587. package/lib/node_modules/zrender/lib/canvas/Painter.js +610 -0
  588. package/lib/node_modules/zrender/lib/canvas/dashStyle.js +26 -0
  589. package/lib/node_modules/zrender/lib/canvas/graphic.js +521 -0
  590. package/lib/node_modules/zrender/lib/canvas/helper.js +82 -0
  591. package/lib/node_modules/zrender/lib/config.js +17 -0
  592. package/lib/node_modules/zrender/lib/contain/arc.js +36 -0
  593. package/lib/node_modules/zrender/lib/contain/cubic.js +15 -0
  594. package/lib/node_modules/zrender/lib/contain/line.js +23 -0
  595. package/lib/node_modules/zrender/lib/contain/path.js +289 -0
  596. package/lib/node_modules/zrender/lib/contain/polygon.js +25 -0
  597. package/lib/node_modules/zrender/lib/contain/quadratic.js +15 -0
  598. package/lib/node_modules/zrender/lib/contain/text.js +173 -0
  599. package/lib/node_modules/zrender/lib/contain/util.js +11 -0
  600. package/lib/node_modules/zrender/lib/contain/windingLine.js +18 -0
  601. package/lib/node_modules/zrender/lib/core/BoundingRect.js +203 -0
  602. package/lib/node_modules/zrender/lib/core/Eventful.js +153 -0
  603. package/lib/node_modules/zrender/lib/core/GestureMgr.js +81 -0
  604. package/lib/node_modules/zrender/lib/core/LRU.js +108 -0
  605. package/lib/node_modules/zrender/lib/core/OrientedBoundingRect.js +119 -0
  606. package/lib/node_modules/zrender/lib/core/PathProxy.js +693 -0
  607. package/lib/node_modules/zrender/lib/core/Point.js +131 -0
  608. package/lib/node_modules/zrender/lib/core/Transformable.js +236 -0
  609. package/lib/node_modules/zrender/lib/core/WeakMap.js +43 -0
  610. package/lib/node_modules/zrender/lib/core/bbox.js +108 -0
  611. package/lib/node_modules/zrender/lib/core/curve.js +336 -0
  612. package/lib/node_modules/zrender/lib/core/dom.js +92 -0
  613. package/lib/node_modules/zrender/lib/core/env.js +71 -0
  614. package/lib/node_modules/zrender/lib/core/event.js +96 -0
  615. package/lib/node_modules/zrender/lib/core/fourPointsTransform.js +59 -0
  616. package/lib/node_modules/zrender/lib/core/matrix.js +112 -0
  617. package/lib/node_modules/zrender/lib/core/platform.js +77 -0
  618. package/lib/node_modules/zrender/lib/core/timsort.js +510 -0
  619. package/lib/node_modules/zrender/lib/core/util.js +559 -0
  620. package/lib/node_modules/zrender/lib/core/vector.js +136 -0
  621. package/lib/node_modules/zrender/lib/dom/HandlerProxy.js +300 -0
  622. package/lib/node_modules/zrender/lib/graphic/CompoundPath.js +51 -0
  623. package/lib/node_modules/zrender/lib/graphic/Displayable.js +314 -0
  624. package/lib/node_modules/zrender/lib/graphic/Gradient.js +15 -0
  625. package/lib/node_modules/zrender/lib/graphic/Group.js +174 -0
  626. package/lib/node_modules/zrender/lib/graphic/Image.js +73 -0
  627. package/lib/node_modules/zrender/lib/graphic/IncrementalDisplayable.js +113 -0
  628. package/lib/node_modules/zrender/lib/graphic/LinearGradient.js +19 -0
  629. package/lib/node_modules/zrender/lib/graphic/Path.js +393 -0
  630. package/lib/node_modules/zrender/lib/graphic/RadialGradient.js +18 -0
  631. package/lib/node_modules/zrender/lib/graphic/TSpan.js +66 -0
  632. package/lib/node_modules/zrender/lib/graphic/Text.js +503 -0
  633. package/lib/node_modules/zrender/lib/graphic/constants.js +8 -0
  634. package/lib/node_modules/zrender/lib/graphic/helper/image.js +55 -0
  635. package/lib/node_modules/zrender/lib/graphic/helper/parseText.js +474 -0
  636. package/lib/node_modules/zrender/lib/graphic/helper/poly.js +27 -0
  637. package/lib/node_modules/zrender/lib/graphic/helper/roundRect.js +73 -0
  638. package/lib/node_modules/zrender/lib/graphic/helper/roundSector.js +218 -0
  639. package/lib/node_modules/zrender/lib/graphic/helper/smoothBezier.js +64 -0
  640. package/lib/node_modules/zrender/lib/graphic/helper/subPixelOptimize.js +59 -0
  641. package/lib/node_modules/zrender/lib/graphic/shape/Arc.js +46 -0
  642. package/lib/node_modules/zrender/lib/graphic/shape/BezierCurve.js +98 -0
  643. package/lib/node_modules/zrender/lib/graphic/shape/Circle.js +29 -0
  644. package/lib/node_modules/zrender/lib/graphic/shape/Ellipse.js +41 -0
  645. package/lib/node_modules/zrender/lib/graphic/shape/Line.js +70 -0
  646. package/lib/node_modules/zrender/lib/graphic/shape/Polygon.js +29 -0
  647. package/lib/node_modules/zrender/lib/graphic/shape/Polyline.js +36 -0
  648. package/lib/node_modules/zrender/lib/graphic/shape/Rect.js +57 -0
  649. package/lib/node_modules/zrender/lib/graphic/shape/Ring.js +35 -0
  650. package/lib/node_modules/zrender/lib/graphic/shape/Sector.js +37 -0
  651. package/lib/node_modules/zrender/lib/mixin/Draggable.js +68 -0
  652. package/lib/node_modules/zrender/lib/svg/helper.js +27 -0
  653. package/lib/node_modules/zrender/lib/tool/color.js +501 -0
  654. package/lib/node_modules/zrender/lib/tool/path.js +338 -0
  655. package/lib/node_modules/zrender/lib/tool/transformPath.js +84 -0
  656. package/lib/node_modules/zrender/lib/zrender.js +323 -0
  657. package/lib/packages/mobile/index.js +129 -112
  658. package/lib/packages/mobile/src/components/all.js +127 -110
  659. package/lib/packages/mobile/src/components/base/card/Card.vue.js +2 -2
  660. package/lib/packages/mobile/src/components/custom/aiAssistant/AiAssistant.vue.js +91 -0
  661. package/lib/packages/mobile/src/components/custom/aiAssistant/index.js +10 -0
  662. package/lib/packages/mobile/src/components/custom/appDetail/AppDetail.vue.js +25 -16
  663. package/lib/packages/mobile/src/components/custom/approvalBar/ApprovalBar.vue.js +7 -3
  664. package/lib/packages/mobile/src/components/custom/document/Document.vue.js +2 -2
  665. package/lib/packages/mobile/src/components/dataDisplay/cardList/CardLayoutRenderer.vue.js +246 -0
  666. package/lib/packages/mobile/src/components/dataDisplay/cardList/CardList.vue.js +59 -9
  667. package/lib/packages/mobile/src/components/dataDisplay/cardList/index.js +2 -0
  668. package/lib/packages/mobile/src/components/dataDisplay/cardList/layoutDefinitions.js +77 -0
  669. package/lib/packages/mobile/src/components/dataDisplay/chart/Chart.vue.js +314 -0
  670. package/lib/packages/mobile/src/components/dataDisplay/chart/formatters.js +20 -0
  671. package/lib/packages/mobile/src/components/dataDisplay/chart/index.js +7 -0
  672. package/lib/packages/mobile/src/components/dataDisplay/chart/optionBuilder.js +340 -0
  673. package/lib/packages/mobile/src/components/dataDisplay/chart/presets.js +29 -0
  674. package/lib/packages/mobile/src/components/dataDisplay/chart/useEcharts.js +42 -0
  675. package/lib/packages/mobile/src/components/form/fieldDrawerSelect/FieldDrawerSelect.vue.js +676 -0
  676. package/lib/packages/mobile/src/components/form/fieldDrawerSelect/index.js +10 -0
  677. package/lib/packages/mobile/src/components/navigation/anchorNav/AnchorNav.vue.js +101 -0
  678. package/lib/packages/mobile/src/components/navigation/anchorNav/index.js +7 -0
  679. package/lib/packages/mobile/src/components/navigation/tabbar/Tabbar.vue.js +2 -2
  680. package/lib/packages/mobile/src/index.vue.js +24 -74
  681. package/lib/packages/mobile/src/page.vue.js +79 -37
  682. package/lib/packages/mobile/src/utils/idea/vue3sfc.js +49 -2
  683. package/lib/packages/vue/src/components/bus/flowChart/bpmnjs/component/NodeItem.vue.js +1 -1
  684. package/lib/packages/vue/src/components/bus/flowChart/bpmnjs/component/timeline.vue.js +1 -1
  685. package/lib/packages/vue/src/components/forms/form/Form.vue.js +183 -39
  686. package/lib/packages/vue/src/components/forms/formItem/FormItem.vue.js +11 -1
  687. package/package.json +1 -1
@@ -0,0 +1,3197 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const layoutBase$1 = require("../../_virtual/layout-base2.js");
4
+ var layoutBase = layoutBase$1.__module.exports;
5
+ var hasRequiredLayoutBase;
6
+ function requireLayoutBase() {
7
+ if (hasRequiredLayoutBase) return layoutBase$1.__module.exports;
8
+ hasRequiredLayoutBase = 1;
9
+ (function(module2, exports2) {
10
+ (function webpackUniversalModuleDefinition(root, factory) {
11
+ module2.exports = factory();
12
+ })(layoutBase, function() {
13
+ return (
14
+ /******/
15
+ function(modules) {
16
+ var installedModules = {};
17
+ function __webpack_require__(moduleId) {
18
+ if (installedModules[moduleId]) {
19
+ return installedModules[moduleId].exports;
20
+ }
21
+ var module3 = installedModules[moduleId] = {
22
+ /******/
23
+ i: moduleId,
24
+ /******/
25
+ l: false,
26
+ /******/
27
+ exports: {}
28
+ /******/
29
+ };
30
+ modules[moduleId].call(module3.exports, module3, module3.exports, __webpack_require__);
31
+ module3.l = true;
32
+ return module3.exports;
33
+ }
34
+ __webpack_require__.m = modules;
35
+ __webpack_require__.c = installedModules;
36
+ __webpack_require__.i = function(value) {
37
+ return value;
38
+ };
39
+ __webpack_require__.d = function(exports3, name, getter) {
40
+ if (!__webpack_require__.o(exports3, name)) {
41
+ Object.defineProperty(exports3, name, {
42
+ /******/
43
+ configurable: false,
44
+ /******/
45
+ enumerable: true,
46
+ /******/
47
+ get: getter
48
+ /******/
49
+ });
50
+ }
51
+ };
52
+ __webpack_require__.n = function(module3) {
53
+ var getter = module3 && module3.__esModule ? (
54
+ /******/
55
+ function getDefault() {
56
+ return module3["default"];
57
+ }
58
+ ) : (
59
+ /******/
60
+ function getModuleExports() {
61
+ return module3;
62
+ }
63
+ );
64
+ __webpack_require__.d(getter, "a", getter);
65
+ return getter;
66
+ };
67
+ __webpack_require__.o = function(object, property) {
68
+ return Object.prototype.hasOwnProperty.call(object, property);
69
+ };
70
+ __webpack_require__.p = "";
71
+ return __webpack_require__(__webpack_require__.s = 26);
72
+ }([
73
+ /* 0 */
74
+ /***/
75
+ function(module3, exports3, __webpack_require__) {
76
+ function LayoutConstants() {
77
+ }
78
+ LayoutConstants.QUALITY = 1;
79
+ LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED = false;
80
+ LayoutConstants.DEFAULT_INCREMENTAL = false;
81
+ LayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT = true;
82
+ LayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT = false;
83
+ LayoutConstants.DEFAULT_ANIMATION_PERIOD = 50;
84
+ LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES = false;
85
+ LayoutConstants.DEFAULT_GRAPH_MARGIN = 15;
86
+ LayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = false;
87
+ LayoutConstants.SIMPLE_NODE_SIZE = 40;
88
+ LayoutConstants.SIMPLE_NODE_HALF_SIZE = LayoutConstants.SIMPLE_NODE_SIZE / 2;
89
+ LayoutConstants.EMPTY_COMPOUND_NODE_SIZE = 40;
90
+ LayoutConstants.MIN_EDGE_LENGTH = 1;
91
+ LayoutConstants.WORLD_BOUNDARY = 1e6;
92
+ LayoutConstants.INITIAL_WORLD_BOUNDARY = LayoutConstants.WORLD_BOUNDARY / 1e3;
93
+ LayoutConstants.WORLD_CENTER_X = 1200;
94
+ LayoutConstants.WORLD_CENTER_Y = 900;
95
+ module3.exports = LayoutConstants;
96
+ },
97
+ /* 1 */
98
+ /***/
99
+ function(module3, exports3, __webpack_require__) {
100
+ var LGraphObject = __webpack_require__(2);
101
+ var IGeometry = __webpack_require__(8);
102
+ var IMath = __webpack_require__(9);
103
+ function LEdge(source, target, vEdge) {
104
+ LGraphObject.call(this, vEdge);
105
+ this.isOverlapingSourceAndTarget = false;
106
+ this.vGraphObject = vEdge;
107
+ this.bendpoints = [];
108
+ this.source = source;
109
+ this.target = target;
110
+ }
111
+ LEdge.prototype = Object.create(LGraphObject.prototype);
112
+ for (var prop in LGraphObject) {
113
+ LEdge[prop] = LGraphObject[prop];
114
+ }
115
+ LEdge.prototype.getSource = function() {
116
+ return this.source;
117
+ };
118
+ LEdge.prototype.getTarget = function() {
119
+ return this.target;
120
+ };
121
+ LEdge.prototype.isInterGraph = function() {
122
+ return this.isInterGraph;
123
+ };
124
+ LEdge.prototype.getLength = function() {
125
+ return this.length;
126
+ };
127
+ LEdge.prototype.isOverlapingSourceAndTarget = function() {
128
+ return this.isOverlapingSourceAndTarget;
129
+ };
130
+ LEdge.prototype.getBendpoints = function() {
131
+ return this.bendpoints;
132
+ };
133
+ LEdge.prototype.getLca = function() {
134
+ return this.lca;
135
+ };
136
+ LEdge.prototype.getSourceInLca = function() {
137
+ return this.sourceInLca;
138
+ };
139
+ LEdge.prototype.getTargetInLca = function() {
140
+ return this.targetInLca;
141
+ };
142
+ LEdge.prototype.getOtherEnd = function(node) {
143
+ if (this.source === node) {
144
+ return this.target;
145
+ } else if (this.target === node) {
146
+ return this.source;
147
+ } else {
148
+ throw "Node is not incident with this edge";
149
+ }
150
+ };
151
+ LEdge.prototype.getOtherEndInGraph = function(node, graph) {
152
+ var otherEnd = this.getOtherEnd(node);
153
+ var root = graph.getGraphManager().getRoot();
154
+ while (true) {
155
+ if (otherEnd.getOwner() == graph) {
156
+ return otherEnd;
157
+ }
158
+ if (otherEnd.getOwner() == root) {
159
+ break;
160
+ }
161
+ otherEnd = otherEnd.getOwner().getParent();
162
+ }
163
+ return null;
164
+ };
165
+ LEdge.prototype.updateLength = function() {
166
+ var clipPointCoordinates = new Array(4);
167
+ this.isOverlapingSourceAndTarget = IGeometry.getIntersection(this.target.getRect(), this.source.getRect(), clipPointCoordinates);
168
+ if (!this.isOverlapingSourceAndTarget) {
169
+ this.lengthX = clipPointCoordinates[0] - clipPointCoordinates[2];
170
+ this.lengthY = clipPointCoordinates[1] - clipPointCoordinates[3];
171
+ if (Math.abs(this.lengthX) < 1) {
172
+ this.lengthX = IMath.sign(this.lengthX);
173
+ }
174
+ if (Math.abs(this.lengthY) < 1) {
175
+ this.lengthY = IMath.sign(this.lengthY);
176
+ }
177
+ this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY);
178
+ }
179
+ };
180
+ LEdge.prototype.updateLengthSimple = function() {
181
+ this.lengthX = this.target.getCenterX() - this.source.getCenterX();
182
+ this.lengthY = this.target.getCenterY() - this.source.getCenterY();
183
+ if (Math.abs(this.lengthX) < 1) {
184
+ this.lengthX = IMath.sign(this.lengthX);
185
+ }
186
+ if (Math.abs(this.lengthY) < 1) {
187
+ this.lengthY = IMath.sign(this.lengthY);
188
+ }
189
+ this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY);
190
+ };
191
+ module3.exports = LEdge;
192
+ },
193
+ /* 2 */
194
+ /***/
195
+ function(module3, exports3, __webpack_require__) {
196
+ function LGraphObject(vGraphObject) {
197
+ this.vGraphObject = vGraphObject;
198
+ }
199
+ module3.exports = LGraphObject;
200
+ },
201
+ /* 3 */
202
+ /***/
203
+ function(module3, exports3, __webpack_require__) {
204
+ var LGraphObject = __webpack_require__(2);
205
+ var Integer = __webpack_require__(10);
206
+ var RectangleD = __webpack_require__(13);
207
+ var LayoutConstants = __webpack_require__(0);
208
+ var RandomSeed = __webpack_require__(16);
209
+ var PointD = __webpack_require__(4);
210
+ function LNode(gm, loc, size, vNode) {
211
+ if (size == null && vNode == null) {
212
+ vNode = loc;
213
+ }
214
+ LGraphObject.call(this, vNode);
215
+ if (gm.graphManager != null) gm = gm.graphManager;
216
+ this.estimatedSize = Integer.MIN_VALUE;
217
+ this.inclusionTreeDepth = Integer.MAX_VALUE;
218
+ this.vGraphObject = vNode;
219
+ this.edges = [];
220
+ this.graphManager = gm;
221
+ if (size != null && loc != null) this.rect = new RectangleD(loc.x, loc.y, size.width, size.height);
222
+ else this.rect = new RectangleD();
223
+ }
224
+ LNode.prototype = Object.create(LGraphObject.prototype);
225
+ for (var prop in LGraphObject) {
226
+ LNode[prop] = LGraphObject[prop];
227
+ }
228
+ LNode.prototype.getEdges = function() {
229
+ return this.edges;
230
+ };
231
+ LNode.prototype.getChild = function() {
232
+ return this.child;
233
+ };
234
+ LNode.prototype.getOwner = function() {
235
+ return this.owner;
236
+ };
237
+ LNode.prototype.getWidth = function() {
238
+ return this.rect.width;
239
+ };
240
+ LNode.prototype.setWidth = function(width) {
241
+ this.rect.width = width;
242
+ };
243
+ LNode.prototype.getHeight = function() {
244
+ return this.rect.height;
245
+ };
246
+ LNode.prototype.setHeight = function(height) {
247
+ this.rect.height = height;
248
+ };
249
+ LNode.prototype.getCenterX = function() {
250
+ return this.rect.x + this.rect.width / 2;
251
+ };
252
+ LNode.prototype.getCenterY = function() {
253
+ return this.rect.y + this.rect.height / 2;
254
+ };
255
+ LNode.prototype.getCenter = function() {
256
+ return new PointD(this.rect.x + this.rect.width / 2, this.rect.y + this.rect.height / 2);
257
+ };
258
+ LNode.prototype.getLocation = function() {
259
+ return new PointD(this.rect.x, this.rect.y);
260
+ };
261
+ LNode.prototype.getRect = function() {
262
+ return this.rect;
263
+ };
264
+ LNode.prototype.getDiagonal = function() {
265
+ return Math.sqrt(this.rect.width * this.rect.width + this.rect.height * this.rect.height);
266
+ };
267
+ LNode.prototype.getHalfTheDiagonal = function() {
268
+ return Math.sqrt(this.rect.height * this.rect.height + this.rect.width * this.rect.width) / 2;
269
+ };
270
+ LNode.prototype.setRect = function(upperLeft, dimension) {
271
+ this.rect.x = upperLeft.x;
272
+ this.rect.y = upperLeft.y;
273
+ this.rect.width = dimension.width;
274
+ this.rect.height = dimension.height;
275
+ };
276
+ LNode.prototype.setCenter = function(cx, cy) {
277
+ this.rect.x = cx - this.rect.width / 2;
278
+ this.rect.y = cy - this.rect.height / 2;
279
+ };
280
+ LNode.prototype.setLocation = function(x, y) {
281
+ this.rect.x = x;
282
+ this.rect.y = y;
283
+ };
284
+ LNode.prototype.moveBy = function(dx, dy) {
285
+ this.rect.x += dx;
286
+ this.rect.y += dy;
287
+ };
288
+ LNode.prototype.getEdgeListToNode = function(to) {
289
+ var edgeList = [];
290
+ var self = this;
291
+ self.edges.forEach(function(edge) {
292
+ if (edge.target == to) {
293
+ if (edge.source != self) throw "Incorrect edge source!";
294
+ edgeList.push(edge);
295
+ }
296
+ });
297
+ return edgeList;
298
+ };
299
+ LNode.prototype.getEdgesBetween = function(other) {
300
+ var edgeList = [];
301
+ var self = this;
302
+ self.edges.forEach(function(edge) {
303
+ if (!(edge.source == self || edge.target == self)) throw "Incorrect edge source and/or target";
304
+ if (edge.target == other || edge.source == other) {
305
+ edgeList.push(edge);
306
+ }
307
+ });
308
+ return edgeList;
309
+ };
310
+ LNode.prototype.getNeighborsList = function() {
311
+ var neighbors = /* @__PURE__ */ new Set();
312
+ var self = this;
313
+ self.edges.forEach(function(edge) {
314
+ if (edge.source == self) {
315
+ neighbors.add(edge.target);
316
+ } else {
317
+ if (edge.target != self) {
318
+ throw "Incorrect incidency!";
319
+ }
320
+ neighbors.add(edge.source);
321
+ }
322
+ });
323
+ return neighbors;
324
+ };
325
+ LNode.prototype.withChildren = function() {
326
+ var withNeighborsList = /* @__PURE__ */ new Set();
327
+ var childNode;
328
+ var children;
329
+ withNeighborsList.add(this);
330
+ if (this.child != null) {
331
+ var nodes = this.child.getNodes();
332
+ for (var i = 0; i < nodes.length; i++) {
333
+ childNode = nodes[i];
334
+ children = childNode.withChildren();
335
+ children.forEach(function(node) {
336
+ withNeighborsList.add(node);
337
+ });
338
+ }
339
+ }
340
+ return withNeighborsList;
341
+ };
342
+ LNode.prototype.getNoOfChildren = function() {
343
+ var noOfChildren = 0;
344
+ var childNode;
345
+ if (this.child == null) {
346
+ noOfChildren = 1;
347
+ } else {
348
+ var nodes = this.child.getNodes();
349
+ for (var i = 0; i < nodes.length; i++) {
350
+ childNode = nodes[i];
351
+ noOfChildren += childNode.getNoOfChildren();
352
+ }
353
+ }
354
+ if (noOfChildren == 0) {
355
+ noOfChildren = 1;
356
+ }
357
+ return noOfChildren;
358
+ };
359
+ LNode.prototype.getEstimatedSize = function() {
360
+ if (this.estimatedSize == Integer.MIN_VALUE) {
361
+ throw "assert failed";
362
+ }
363
+ return this.estimatedSize;
364
+ };
365
+ LNode.prototype.calcEstimatedSize = function() {
366
+ if (this.child == null) {
367
+ return this.estimatedSize = (this.rect.width + this.rect.height) / 2;
368
+ } else {
369
+ this.estimatedSize = this.child.calcEstimatedSize();
370
+ this.rect.width = this.estimatedSize;
371
+ this.rect.height = this.estimatedSize;
372
+ return this.estimatedSize;
373
+ }
374
+ };
375
+ LNode.prototype.scatter = function() {
376
+ var randomCenterX;
377
+ var randomCenterY;
378
+ var minX = -LayoutConstants.INITIAL_WORLD_BOUNDARY;
379
+ var maxX = LayoutConstants.INITIAL_WORLD_BOUNDARY;
380
+ randomCenterX = LayoutConstants.WORLD_CENTER_X + RandomSeed.nextDouble() * (maxX - minX) + minX;
381
+ var minY = -LayoutConstants.INITIAL_WORLD_BOUNDARY;
382
+ var maxY = LayoutConstants.INITIAL_WORLD_BOUNDARY;
383
+ randomCenterY = LayoutConstants.WORLD_CENTER_Y + RandomSeed.nextDouble() * (maxY - minY) + minY;
384
+ this.rect.x = randomCenterX;
385
+ this.rect.y = randomCenterY;
386
+ };
387
+ LNode.prototype.updateBounds = function() {
388
+ if (this.getChild() == null) {
389
+ throw "assert failed";
390
+ }
391
+ if (this.getChild().getNodes().length != 0) {
392
+ var childGraph = this.getChild();
393
+ childGraph.updateBounds(true);
394
+ this.rect.x = childGraph.getLeft();
395
+ this.rect.y = childGraph.getTop();
396
+ this.setWidth(childGraph.getRight() - childGraph.getLeft());
397
+ this.setHeight(childGraph.getBottom() - childGraph.getTop());
398
+ if (LayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS) {
399
+ var width = childGraph.getRight() - childGraph.getLeft();
400
+ var height = childGraph.getBottom() - childGraph.getTop();
401
+ if (this.labelWidth > width) {
402
+ this.rect.x -= (this.labelWidth - width) / 2;
403
+ this.setWidth(this.labelWidth);
404
+ }
405
+ if (this.labelHeight > height) {
406
+ if (this.labelPos == "center") {
407
+ this.rect.y -= (this.labelHeight - height) / 2;
408
+ } else if (this.labelPos == "top") {
409
+ this.rect.y -= this.labelHeight - height;
410
+ }
411
+ this.setHeight(this.labelHeight);
412
+ }
413
+ }
414
+ }
415
+ };
416
+ LNode.prototype.getInclusionTreeDepth = function() {
417
+ if (this.inclusionTreeDepth == Integer.MAX_VALUE) {
418
+ throw "assert failed";
419
+ }
420
+ return this.inclusionTreeDepth;
421
+ };
422
+ LNode.prototype.transform = function(trans) {
423
+ var left = this.rect.x;
424
+ if (left > LayoutConstants.WORLD_BOUNDARY) {
425
+ left = LayoutConstants.WORLD_BOUNDARY;
426
+ } else if (left < -LayoutConstants.WORLD_BOUNDARY) {
427
+ left = -LayoutConstants.WORLD_BOUNDARY;
428
+ }
429
+ var top = this.rect.y;
430
+ if (top > LayoutConstants.WORLD_BOUNDARY) {
431
+ top = LayoutConstants.WORLD_BOUNDARY;
432
+ } else if (top < -LayoutConstants.WORLD_BOUNDARY) {
433
+ top = -LayoutConstants.WORLD_BOUNDARY;
434
+ }
435
+ var leftTop = new PointD(left, top);
436
+ var vLeftTop = trans.inverseTransformPoint(leftTop);
437
+ this.setLocation(vLeftTop.x, vLeftTop.y);
438
+ };
439
+ LNode.prototype.getLeft = function() {
440
+ return this.rect.x;
441
+ };
442
+ LNode.prototype.getRight = function() {
443
+ return this.rect.x + this.rect.width;
444
+ };
445
+ LNode.prototype.getTop = function() {
446
+ return this.rect.y;
447
+ };
448
+ LNode.prototype.getBottom = function() {
449
+ return this.rect.y + this.rect.height;
450
+ };
451
+ LNode.prototype.getParent = function() {
452
+ if (this.owner == null) {
453
+ return null;
454
+ }
455
+ return this.owner.getParent();
456
+ };
457
+ module3.exports = LNode;
458
+ },
459
+ /* 4 */
460
+ /***/
461
+ function(module3, exports3, __webpack_require__) {
462
+ function PointD(x, y) {
463
+ if (x == null && y == null) {
464
+ this.x = 0;
465
+ this.y = 0;
466
+ } else {
467
+ this.x = x;
468
+ this.y = y;
469
+ }
470
+ }
471
+ PointD.prototype.getX = function() {
472
+ return this.x;
473
+ };
474
+ PointD.prototype.getY = function() {
475
+ return this.y;
476
+ };
477
+ PointD.prototype.setX = function(x) {
478
+ this.x = x;
479
+ };
480
+ PointD.prototype.setY = function(y) {
481
+ this.y = y;
482
+ };
483
+ PointD.prototype.getDifference = function(pt) {
484
+ return new DimensionD(this.x - pt.x, this.y - pt.y);
485
+ };
486
+ PointD.prototype.getCopy = function() {
487
+ return new PointD(this.x, this.y);
488
+ };
489
+ PointD.prototype.translate = function(dim) {
490
+ this.x += dim.width;
491
+ this.y += dim.height;
492
+ return this;
493
+ };
494
+ module3.exports = PointD;
495
+ },
496
+ /* 5 */
497
+ /***/
498
+ function(module3, exports3, __webpack_require__) {
499
+ var LGraphObject = __webpack_require__(2);
500
+ var Integer = __webpack_require__(10);
501
+ var LayoutConstants = __webpack_require__(0);
502
+ var LGraphManager = __webpack_require__(6);
503
+ var LNode = __webpack_require__(3);
504
+ var LEdge = __webpack_require__(1);
505
+ var RectangleD = __webpack_require__(13);
506
+ var Point2 = __webpack_require__(12);
507
+ var LinkedList = __webpack_require__(11);
508
+ function LGraph(parent, obj2, vGraph) {
509
+ LGraphObject.call(this, vGraph);
510
+ this.estimatedSize = Integer.MIN_VALUE;
511
+ this.margin = LayoutConstants.DEFAULT_GRAPH_MARGIN;
512
+ this.edges = [];
513
+ this.nodes = [];
514
+ this.isConnected = false;
515
+ this.parent = parent;
516
+ if (obj2 != null && obj2 instanceof LGraphManager) {
517
+ this.graphManager = obj2;
518
+ } else if (obj2 != null && obj2 instanceof Layout) {
519
+ this.graphManager = obj2.graphManager;
520
+ }
521
+ }
522
+ LGraph.prototype = Object.create(LGraphObject.prototype);
523
+ for (var prop in LGraphObject) {
524
+ LGraph[prop] = LGraphObject[prop];
525
+ }
526
+ LGraph.prototype.getNodes = function() {
527
+ return this.nodes;
528
+ };
529
+ LGraph.prototype.getEdges = function() {
530
+ return this.edges;
531
+ };
532
+ LGraph.prototype.getGraphManager = function() {
533
+ return this.graphManager;
534
+ };
535
+ LGraph.prototype.getParent = function() {
536
+ return this.parent;
537
+ };
538
+ LGraph.prototype.getLeft = function() {
539
+ return this.left;
540
+ };
541
+ LGraph.prototype.getRight = function() {
542
+ return this.right;
543
+ };
544
+ LGraph.prototype.getTop = function() {
545
+ return this.top;
546
+ };
547
+ LGraph.prototype.getBottom = function() {
548
+ return this.bottom;
549
+ };
550
+ LGraph.prototype.isConnected = function() {
551
+ return this.isConnected;
552
+ };
553
+ LGraph.prototype.add = function(obj1, sourceNode, targetNode) {
554
+ if (sourceNode == null && targetNode == null) {
555
+ var newNode = obj1;
556
+ if (this.graphManager == null) {
557
+ throw "Graph has no graph mgr!";
558
+ }
559
+ if (this.getNodes().indexOf(newNode) > -1) {
560
+ throw "Node already in graph!";
561
+ }
562
+ newNode.owner = this;
563
+ this.getNodes().push(newNode);
564
+ return newNode;
565
+ } else {
566
+ var newEdge = obj1;
567
+ if (!(this.getNodes().indexOf(sourceNode) > -1 && this.getNodes().indexOf(targetNode) > -1)) {
568
+ throw "Source or target not in graph!";
569
+ }
570
+ if (!(sourceNode.owner == targetNode.owner && sourceNode.owner == this)) {
571
+ throw "Both owners must be this graph!";
572
+ }
573
+ if (sourceNode.owner != targetNode.owner) {
574
+ return null;
575
+ }
576
+ newEdge.source = sourceNode;
577
+ newEdge.target = targetNode;
578
+ newEdge.isInterGraph = false;
579
+ this.getEdges().push(newEdge);
580
+ sourceNode.edges.push(newEdge);
581
+ if (targetNode != sourceNode) {
582
+ targetNode.edges.push(newEdge);
583
+ }
584
+ return newEdge;
585
+ }
586
+ };
587
+ LGraph.prototype.remove = function(obj) {
588
+ var node = obj;
589
+ if (obj instanceof LNode) {
590
+ if (node == null) {
591
+ throw "Node is null!";
592
+ }
593
+ if (!(node.owner != null && node.owner == this)) {
594
+ throw "Owner graph is invalid!";
595
+ }
596
+ if (this.graphManager == null) {
597
+ throw "Owner graph manager is invalid!";
598
+ }
599
+ var edgesToBeRemoved = node.edges.slice();
600
+ var edge;
601
+ var s = edgesToBeRemoved.length;
602
+ for (var i = 0; i < s; i++) {
603
+ edge = edgesToBeRemoved[i];
604
+ if (edge.isInterGraph) {
605
+ this.graphManager.remove(edge);
606
+ } else {
607
+ edge.source.owner.remove(edge);
608
+ }
609
+ }
610
+ var index = this.nodes.indexOf(node);
611
+ if (index == -1) {
612
+ throw "Node not in owner node list!";
613
+ }
614
+ this.nodes.splice(index, 1);
615
+ } else if (obj instanceof LEdge) {
616
+ var edge = obj;
617
+ if (edge == null) {
618
+ throw "Edge is null!";
619
+ }
620
+ if (!(edge.source != null && edge.target != null)) {
621
+ throw "Source and/or target is null!";
622
+ }
623
+ if (!(edge.source.owner != null && edge.target.owner != null && edge.source.owner == this && edge.target.owner == this)) {
624
+ throw "Source and/or target owner is invalid!";
625
+ }
626
+ var sourceIndex = edge.source.edges.indexOf(edge);
627
+ var targetIndex = edge.target.edges.indexOf(edge);
628
+ if (!(sourceIndex > -1 && targetIndex > -1)) {
629
+ throw "Source and/or target doesn't know this edge!";
630
+ }
631
+ edge.source.edges.splice(sourceIndex, 1);
632
+ if (edge.target != edge.source) {
633
+ edge.target.edges.splice(targetIndex, 1);
634
+ }
635
+ var index = edge.source.owner.getEdges().indexOf(edge);
636
+ if (index == -1) {
637
+ throw "Not in owner's edge list!";
638
+ }
639
+ edge.source.owner.getEdges().splice(index, 1);
640
+ }
641
+ };
642
+ LGraph.prototype.updateLeftTop = function() {
643
+ var top = Integer.MAX_VALUE;
644
+ var left = Integer.MAX_VALUE;
645
+ var nodeTop;
646
+ var nodeLeft;
647
+ var margin;
648
+ var nodes = this.getNodes();
649
+ var s = nodes.length;
650
+ for (var i = 0; i < s; i++) {
651
+ var lNode = nodes[i];
652
+ nodeTop = lNode.getTop();
653
+ nodeLeft = lNode.getLeft();
654
+ if (top > nodeTop) {
655
+ top = nodeTop;
656
+ }
657
+ if (left > nodeLeft) {
658
+ left = nodeLeft;
659
+ }
660
+ }
661
+ if (top == Integer.MAX_VALUE) {
662
+ return null;
663
+ }
664
+ if (nodes[0].getParent().paddingLeft != void 0) {
665
+ margin = nodes[0].getParent().paddingLeft;
666
+ } else {
667
+ margin = this.margin;
668
+ }
669
+ this.left = left - margin;
670
+ this.top = top - margin;
671
+ return new Point2(this.left, this.top);
672
+ };
673
+ LGraph.prototype.updateBounds = function(recursive) {
674
+ var left = Integer.MAX_VALUE;
675
+ var right = -Integer.MAX_VALUE;
676
+ var top = Integer.MAX_VALUE;
677
+ var bottom = -Integer.MAX_VALUE;
678
+ var nodeLeft;
679
+ var nodeRight;
680
+ var nodeTop;
681
+ var nodeBottom;
682
+ var margin;
683
+ var nodes = this.nodes;
684
+ var s = nodes.length;
685
+ for (var i = 0; i < s; i++) {
686
+ var lNode = nodes[i];
687
+ if (recursive && lNode.child != null) {
688
+ lNode.updateBounds();
689
+ }
690
+ nodeLeft = lNode.getLeft();
691
+ nodeRight = lNode.getRight();
692
+ nodeTop = lNode.getTop();
693
+ nodeBottom = lNode.getBottom();
694
+ if (left > nodeLeft) {
695
+ left = nodeLeft;
696
+ }
697
+ if (right < nodeRight) {
698
+ right = nodeRight;
699
+ }
700
+ if (top > nodeTop) {
701
+ top = nodeTop;
702
+ }
703
+ if (bottom < nodeBottom) {
704
+ bottom = nodeBottom;
705
+ }
706
+ }
707
+ var boundingRect = new RectangleD(left, top, right - left, bottom - top);
708
+ if (left == Integer.MAX_VALUE) {
709
+ this.left = this.parent.getLeft();
710
+ this.right = this.parent.getRight();
711
+ this.top = this.parent.getTop();
712
+ this.bottom = this.parent.getBottom();
713
+ }
714
+ if (nodes[0].getParent().paddingLeft != void 0) {
715
+ margin = nodes[0].getParent().paddingLeft;
716
+ } else {
717
+ margin = this.margin;
718
+ }
719
+ this.left = boundingRect.x - margin;
720
+ this.right = boundingRect.x + boundingRect.width + margin;
721
+ this.top = boundingRect.y - margin;
722
+ this.bottom = boundingRect.y + boundingRect.height + margin;
723
+ };
724
+ LGraph.calculateBounds = function(nodes) {
725
+ var left = Integer.MAX_VALUE;
726
+ var right = -Integer.MAX_VALUE;
727
+ var top = Integer.MAX_VALUE;
728
+ var bottom = -Integer.MAX_VALUE;
729
+ var nodeLeft;
730
+ var nodeRight;
731
+ var nodeTop;
732
+ var nodeBottom;
733
+ var s = nodes.length;
734
+ for (var i = 0; i < s; i++) {
735
+ var lNode = nodes[i];
736
+ nodeLeft = lNode.getLeft();
737
+ nodeRight = lNode.getRight();
738
+ nodeTop = lNode.getTop();
739
+ nodeBottom = lNode.getBottom();
740
+ if (left > nodeLeft) {
741
+ left = nodeLeft;
742
+ }
743
+ if (right < nodeRight) {
744
+ right = nodeRight;
745
+ }
746
+ if (top > nodeTop) {
747
+ top = nodeTop;
748
+ }
749
+ if (bottom < nodeBottom) {
750
+ bottom = nodeBottom;
751
+ }
752
+ }
753
+ var boundingRect = new RectangleD(left, top, right - left, bottom - top);
754
+ return boundingRect;
755
+ };
756
+ LGraph.prototype.getInclusionTreeDepth = function() {
757
+ if (this == this.graphManager.getRoot()) {
758
+ return 1;
759
+ } else {
760
+ return this.parent.getInclusionTreeDepth();
761
+ }
762
+ };
763
+ LGraph.prototype.getEstimatedSize = function() {
764
+ if (this.estimatedSize == Integer.MIN_VALUE) {
765
+ throw "assert failed";
766
+ }
767
+ return this.estimatedSize;
768
+ };
769
+ LGraph.prototype.calcEstimatedSize = function() {
770
+ var size = 0;
771
+ var nodes = this.nodes;
772
+ var s = nodes.length;
773
+ for (var i = 0; i < s; i++) {
774
+ var lNode = nodes[i];
775
+ size += lNode.calcEstimatedSize();
776
+ }
777
+ if (size == 0) {
778
+ this.estimatedSize = LayoutConstants.EMPTY_COMPOUND_NODE_SIZE;
779
+ } else {
780
+ this.estimatedSize = size / Math.sqrt(this.nodes.length);
781
+ }
782
+ return this.estimatedSize;
783
+ };
784
+ LGraph.prototype.updateConnected = function() {
785
+ var self = this;
786
+ if (this.nodes.length == 0) {
787
+ this.isConnected = true;
788
+ return;
789
+ }
790
+ var queue = new LinkedList();
791
+ var visited = /* @__PURE__ */ new Set();
792
+ var currentNode = this.nodes[0];
793
+ var neighborEdges;
794
+ var currentNeighbor;
795
+ var childrenOfNode = currentNode.withChildren();
796
+ childrenOfNode.forEach(function(node) {
797
+ queue.push(node);
798
+ visited.add(node);
799
+ });
800
+ while (queue.length !== 0) {
801
+ currentNode = queue.shift();
802
+ neighborEdges = currentNode.getEdges();
803
+ var size = neighborEdges.length;
804
+ for (var i = 0; i < size; i++) {
805
+ var neighborEdge = neighborEdges[i];
806
+ currentNeighbor = neighborEdge.getOtherEndInGraph(currentNode, this);
807
+ if (currentNeighbor != null && !visited.has(currentNeighbor)) {
808
+ var childrenOfNeighbor = currentNeighbor.withChildren();
809
+ childrenOfNeighbor.forEach(function(node) {
810
+ queue.push(node);
811
+ visited.add(node);
812
+ });
813
+ }
814
+ }
815
+ }
816
+ this.isConnected = false;
817
+ if (visited.size >= this.nodes.length) {
818
+ var noOfVisitedInThisGraph = 0;
819
+ visited.forEach(function(visitedNode) {
820
+ if (visitedNode.owner == self) {
821
+ noOfVisitedInThisGraph++;
822
+ }
823
+ });
824
+ if (noOfVisitedInThisGraph == this.nodes.length) {
825
+ this.isConnected = true;
826
+ }
827
+ }
828
+ };
829
+ module3.exports = LGraph;
830
+ },
831
+ /* 6 */
832
+ /***/
833
+ function(module3, exports3, __webpack_require__) {
834
+ var LGraph;
835
+ var LEdge = __webpack_require__(1);
836
+ function LGraphManager(layout) {
837
+ LGraph = __webpack_require__(5);
838
+ this.layout = layout;
839
+ this.graphs = [];
840
+ this.edges = [];
841
+ }
842
+ LGraphManager.prototype.addRoot = function() {
843
+ var ngraph = this.layout.newGraph();
844
+ var nnode = this.layout.newNode(null);
845
+ var root = this.add(ngraph, nnode);
846
+ this.setRootGraph(root);
847
+ return this.rootGraph;
848
+ };
849
+ LGraphManager.prototype.add = function(newGraph, parentNode, newEdge, sourceNode, targetNode) {
850
+ if (newEdge == null && sourceNode == null && targetNode == null) {
851
+ if (newGraph == null) {
852
+ throw "Graph is null!";
853
+ }
854
+ if (parentNode == null) {
855
+ throw "Parent node is null!";
856
+ }
857
+ if (this.graphs.indexOf(newGraph) > -1) {
858
+ throw "Graph already in this graph mgr!";
859
+ }
860
+ this.graphs.push(newGraph);
861
+ if (newGraph.parent != null) {
862
+ throw "Already has a parent!";
863
+ }
864
+ if (parentNode.child != null) {
865
+ throw "Already has a child!";
866
+ }
867
+ newGraph.parent = parentNode;
868
+ parentNode.child = newGraph;
869
+ return newGraph;
870
+ } else {
871
+ targetNode = newEdge;
872
+ sourceNode = parentNode;
873
+ newEdge = newGraph;
874
+ var sourceGraph = sourceNode.getOwner();
875
+ var targetGraph = targetNode.getOwner();
876
+ if (!(sourceGraph != null && sourceGraph.getGraphManager() == this)) {
877
+ throw "Source not in this graph mgr!";
878
+ }
879
+ if (!(targetGraph != null && targetGraph.getGraphManager() == this)) {
880
+ throw "Target not in this graph mgr!";
881
+ }
882
+ if (sourceGraph == targetGraph) {
883
+ newEdge.isInterGraph = false;
884
+ return sourceGraph.add(newEdge, sourceNode, targetNode);
885
+ } else {
886
+ newEdge.isInterGraph = true;
887
+ newEdge.source = sourceNode;
888
+ newEdge.target = targetNode;
889
+ if (this.edges.indexOf(newEdge) > -1) {
890
+ throw "Edge already in inter-graph edge list!";
891
+ }
892
+ this.edges.push(newEdge);
893
+ if (!(newEdge.source != null && newEdge.target != null)) {
894
+ throw "Edge source and/or target is null!";
895
+ }
896
+ if (!(newEdge.source.edges.indexOf(newEdge) == -1 && newEdge.target.edges.indexOf(newEdge) == -1)) {
897
+ throw "Edge already in source and/or target incidency list!";
898
+ }
899
+ newEdge.source.edges.push(newEdge);
900
+ newEdge.target.edges.push(newEdge);
901
+ return newEdge;
902
+ }
903
+ }
904
+ };
905
+ LGraphManager.prototype.remove = function(lObj) {
906
+ if (lObj instanceof LGraph) {
907
+ var graph = lObj;
908
+ if (graph.getGraphManager() != this) {
909
+ throw "Graph not in this graph mgr";
910
+ }
911
+ if (!(graph == this.rootGraph || graph.parent != null && graph.parent.graphManager == this)) {
912
+ throw "Invalid parent node!";
913
+ }
914
+ var edgesToBeRemoved = [];
915
+ edgesToBeRemoved = edgesToBeRemoved.concat(graph.getEdges());
916
+ var edge;
917
+ var s = edgesToBeRemoved.length;
918
+ for (var i = 0; i < s; i++) {
919
+ edge = edgesToBeRemoved[i];
920
+ graph.remove(edge);
921
+ }
922
+ var nodesToBeRemoved = [];
923
+ nodesToBeRemoved = nodesToBeRemoved.concat(graph.getNodes());
924
+ var node;
925
+ s = nodesToBeRemoved.length;
926
+ for (var i = 0; i < s; i++) {
927
+ node = nodesToBeRemoved[i];
928
+ graph.remove(node);
929
+ }
930
+ if (graph == this.rootGraph) {
931
+ this.setRootGraph(null);
932
+ }
933
+ var index = this.graphs.indexOf(graph);
934
+ this.graphs.splice(index, 1);
935
+ graph.parent = null;
936
+ } else if (lObj instanceof LEdge) {
937
+ edge = lObj;
938
+ if (edge == null) {
939
+ throw "Edge is null!";
940
+ }
941
+ if (!edge.isInterGraph) {
942
+ throw "Not an inter-graph edge!";
943
+ }
944
+ if (!(edge.source != null && edge.target != null)) {
945
+ throw "Source and/or target is null!";
946
+ }
947
+ if (!(edge.source.edges.indexOf(edge) != -1 && edge.target.edges.indexOf(edge) != -1)) {
948
+ throw "Source and/or target doesn't know this edge!";
949
+ }
950
+ var index = edge.source.edges.indexOf(edge);
951
+ edge.source.edges.splice(index, 1);
952
+ index = edge.target.edges.indexOf(edge);
953
+ edge.target.edges.splice(index, 1);
954
+ if (!(edge.source.owner != null && edge.source.owner.getGraphManager() != null)) {
955
+ throw "Edge owner graph or owner graph manager is null!";
956
+ }
957
+ if (edge.source.owner.getGraphManager().edges.indexOf(edge) == -1) {
958
+ throw "Not in owner graph manager's edge list!";
959
+ }
960
+ var index = edge.source.owner.getGraphManager().edges.indexOf(edge);
961
+ edge.source.owner.getGraphManager().edges.splice(index, 1);
962
+ }
963
+ };
964
+ LGraphManager.prototype.updateBounds = function() {
965
+ this.rootGraph.updateBounds(true);
966
+ };
967
+ LGraphManager.prototype.getGraphs = function() {
968
+ return this.graphs;
969
+ };
970
+ LGraphManager.prototype.getAllNodes = function() {
971
+ if (this.allNodes == null) {
972
+ var nodeList = [];
973
+ var graphs = this.getGraphs();
974
+ var s = graphs.length;
975
+ for (var i = 0; i < s; i++) {
976
+ nodeList = nodeList.concat(graphs[i].getNodes());
977
+ }
978
+ this.allNodes = nodeList;
979
+ }
980
+ return this.allNodes;
981
+ };
982
+ LGraphManager.prototype.resetAllNodes = function() {
983
+ this.allNodes = null;
984
+ };
985
+ LGraphManager.prototype.resetAllEdges = function() {
986
+ this.allEdges = null;
987
+ };
988
+ LGraphManager.prototype.resetAllNodesToApplyGravitation = function() {
989
+ this.allNodesToApplyGravitation = null;
990
+ };
991
+ LGraphManager.prototype.getAllEdges = function() {
992
+ if (this.allEdges == null) {
993
+ var edgeList = [];
994
+ var graphs = this.getGraphs();
995
+ graphs.length;
996
+ for (var i = 0; i < graphs.length; i++) {
997
+ edgeList = edgeList.concat(graphs[i].getEdges());
998
+ }
999
+ edgeList = edgeList.concat(this.edges);
1000
+ this.allEdges = edgeList;
1001
+ }
1002
+ return this.allEdges;
1003
+ };
1004
+ LGraphManager.prototype.getAllNodesToApplyGravitation = function() {
1005
+ return this.allNodesToApplyGravitation;
1006
+ };
1007
+ LGraphManager.prototype.setAllNodesToApplyGravitation = function(nodeList) {
1008
+ if (this.allNodesToApplyGravitation != null) {
1009
+ throw "assert failed";
1010
+ }
1011
+ this.allNodesToApplyGravitation = nodeList;
1012
+ };
1013
+ LGraphManager.prototype.getRoot = function() {
1014
+ return this.rootGraph;
1015
+ };
1016
+ LGraphManager.prototype.setRootGraph = function(graph) {
1017
+ if (graph.getGraphManager() != this) {
1018
+ throw "Root not in this graph mgr!";
1019
+ }
1020
+ this.rootGraph = graph;
1021
+ if (graph.parent == null) {
1022
+ graph.parent = this.layout.newNode("Root node");
1023
+ }
1024
+ };
1025
+ LGraphManager.prototype.getLayout = function() {
1026
+ return this.layout;
1027
+ };
1028
+ LGraphManager.prototype.isOneAncestorOfOther = function(firstNode, secondNode) {
1029
+ if (!(firstNode != null && secondNode != null)) {
1030
+ throw "assert failed";
1031
+ }
1032
+ if (firstNode == secondNode) {
1033
+ return true;
1034
+ }
1035
+ var ownerGraph = firstNode.getOwner();
1036
+ var parentNode;
1037
+ do {
1038
+ parentNode = ownerGraph.getParent();
1039
+ if (parentNode == null) {
1040
+ break;
1041
+ }
1042
+ if (parentNode == secondNode) {
1043
+ return true;
1044
+ }
1045
+ ownerGraph = parentNode.getOwner();
1046
+ if (ownerGraph == null) {
1047
+ break;
1048
+ }
1049
+ } while (true);
1050
+ ownerGraph = secondNode.getOwner();
1051
+ do {
1052
+ parentNode = ownerGraph.getParent();
1053
+ if (parentNode == null) {
1054
+ break;
1055
+ }
1056
+ if (parentNode == firstNode) {
1057
+ return true;
1058
+ }
1059
+ ownerGraph = parentNode.getOwner();
1060
+ if (ownerGraph == null) {
1061
+ break;
1062
+ }
1063
+ } while (true);
1064
+ return false;
1065
+ };
1066
+ LGraphManager.prototype.calcLowestCommonAncestors = function() {
1067
+ var edge;
1068
+ var sourceNode;
1069
+ var targetNode;
1070
+ var sourceAncestorGraph;
1071
+ var targetAncestorGraph;
1072
+ var edges = this.getAllEdges();
1073
+ var s = edges.length;
1074
+ for (var i = 0; i < s; i++) {
1075
+ edge = edges[i];
1076
+ sourceNode = edge.source;
1077
+ targetNode = edge.target;
1078
+ edge.lca = null;
1079
+ edge.sourceInLca = sourceNode;
1080
+ edge.targetInLca = targetNode;
1081
+ if (sourceNode == targetNode) {
1082
+ edge.lca = sourceNode.getOwner();
1083
+ continue;
1084
+ }
1085
+ sourceAncestorGraph = sourceNode.getOwner();
1086
+ while (edge.lca == null) {
1087
+ edge.targetInLca = targetNode;
1088
+ targetAncestorGraph = targetNode.getOwner();
1089
+ while (edge.lca == null) {
1090
+ if (targetAncestorGraph == sourceAncestorGraph) {
1091
+ edge.lca = targetAncestorGraph;
1092
+ break;
1093
+ }
1094
+ if (targetAncestorGraph == this.rootGraph) {
1095
+ break;
1096
+ }
1097
+ if (edge.lca != null) {
1098
+ throw "assert failed";
1099
+ }
1100
+ edge.targetInLca = targetAncestorGraph.getParent();
1101
+ targetAncestorGraph = edge.targetInLca.getOwner();
1102
+ }
1103
+ if (sourceAncestorGraph == this.rootGraph) {
1104
+ break;
1105
+ }
1106
+ if (edge.lca == null) {
1107
+ edge.sourceInLca = sourceAncestorGraph.getParent();
1108
+ sourceAncestorGraph = edge.sourceInLca.getOwner();
1109
+ }
1110
+ }
1111
+ if (edge.lca == null) {
1112
+ throw "assert failed";
1113
+ }
1114
+ }
1115
+ };
1116
+ LGraphManager.prototype.calcLowestCommonAncestor = function(firstNode, secondNode) {
1117
+ if (firstNode == secondNode) {
1118
+ return firstNode.getOwner();
1119
+ }
1120
+ var firstOwnerGraph = firstNode.getOwner();
1121
+ do {
1122
+ if (firstOwnerGraph == null) {
1123
+ break;
1124
+ }
1125
+ var secondOwnerGraph = secondNode.getOwner();
1126
+ do {
1127
+ if (secondOwnerGraph == null) {
1128
+ break;
1129
+ }
1130
+ if (secondOwnerGraph == firstOwnerGraph) {
1131
+ return secondOwnerGraph;
1132
+ }
1133
+ secondOwnerGraph = secondOwnerGraph.getParent().getOwner();
1134
+ } while (true);
1135
+ firstOwnerGraph = firstOwnerGraph.getParent().getOwner();
1136
+ } while (true);
1137
+ return firstOwnerGraph;
1138
+ };
1139
+ LGraphManager.prototype.calcInclusionTreeDepths = function(graph, depth) {
1140
+ if (graph == null && depth == null) {
1141
+ graph = this.rootGraph;
1142
+ depth = 1;
1143
+ }
1144
+ var node;
1145
+ var nodes = graph.getNodes();
1146
+ var s = nodes.length;
1147
+ for (var i = 0; i < s; i++) {
1148
+ node = nodes[i];
1149
+ node.inclusionTreeDepth = depth;
1150
+ if (node.child != null) {
1151
+ this.calcInclusionTreeDepths(node.child, depth + 1);
1152
+ }
1153
+ }
1154
+ };
1155
+ LGraphManager.prototype.includesInvalidEdge = function() {
1156
+ var edge;
1157
+ var s = this.edges.length;
1158
+ for (var i = 0; i < s; i++) {
1159
+ edge = this.edges[i];
1160
+ if (this.isOneAncestorOfOther(edge.source, edge.target)) {
1161
+ return true;
1162
+ }
1163
+ }
1164
+ return false;
1165
+ };
1166
+ module3.exports = LGraphManager;
1167
+ },
1168
+ /* 7 */
1169
+ /***/
1170
+ function(module3, exports3, __webpack_require__) {
1171
+ var LayoutConstants = __webpack_require__(0);
1172
+ function FDLayoutConstants() {
1173
+ }
1174
+ for (var prop in LayoutConstants) {
1175
+ FDLayoutConstants[prop] = LayoutConstants[prop];
1176
+ }
1177
+ FDLayoutConstants.MAX_ITERATIONS = 2500;
1178
+ FDLayoutConstants.DEFAULT_EDGE_LENGTH = 50;
1179
+ FDLayoutConstants.DEFAULT_SPRING_STRENGTH = 0.45;
1180
+ FDLayoutConstants.DEFAULT_REPULSION_STRENGTH = 4500;
1181
+ FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH = 0.4;
1182
+ FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = 1;
1183
+ FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR = 3.8;
1184
+ FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = 1.5;
1185
+ FDLayoutConstants.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION = true;
1186
+ FDLayoutConstants.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION = true;
1187
+ FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = 0.3;
1188
+ FDLayoutConstants.COOLING_ADAPTATION_FACTOR = 0.33;
1189
+ FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT = 1e3;
1190
+ FDLayoutConstants.ADAPTATION_UPPER_NODE_LIMIT = 5e3;
1191
+ FDLayoutConstants.MAX_NODE_DISPLACEMENT_INCREMENTAL = 100;
1192
+ FDLayoutConstants.MAX_NODE_DISPLACEMENT = FDLayoutConstants.MAX_NODE_DISPLACEMENT_INCREMENTAL * 3;
1193
+ FDLayoutConstants.MIN_REPULSION_DIST = FDLayoutConstants.DEFAULT_EDGE_LENGTH / 10;
1194
+ FDLayoutConstants.CONVERGENCE_CHECK_PERIOD = 100;
1195
+ FDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = 0.1;
1196
+ FDLayoutConstants.MIN_EDGE_LENGTH = 1;
1197
+ FDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD = 10;
1198
+ module3.exports = FDLayoutConstants;
1199
+ },
1200
+ /* 8 */
1201
+ /***/
1202
+ function(module3, exports3, __webpack_require__) {
1203
+ var Point2 = __webpack_require__(12);
1204
+ function IGeometry() {
1205
+ }
1206
+ IGeometry.calcSeparationAmount = function(rectA, rectB, overlapAmount, separationBuffer) {
1207
+ if (!rectA.intersects(rectB)) {
1208
+ throw "assert failed";
1209
+ }
1210
+ var directions = new Array(2);
1211
+ this.decideDirectionsForOverlappingNodes(rectA, rectB, directions);
1212
+ overlapAmount[0] = Math.min(rectA.getRight(), rectB.getRight()) - Math.max(rectA.x, rectB.x);
1213
+ overlapAmount[1] = Math.min(rectA.getBottom(), rectB.getBottom()) - Math.max(rectA.y, rectB.y);
1214
+ if (rectA.getX() <= rectB.getX() && rectA.getRight() >= rectB.getRight()) {
1215
+ overlapAmount[0] += Math.min(rectB.getX() - rectA.getX(), rectA.getRight() - rectB.getRight());
1216
+ } else if (rectB.getX() <= rectA.getX() && rectB.getRight() >= rectA.getRight()) {
1217
+ overlapAmount[0] += Math.min(rectA.getX() - rectB.getX(), rectB.getRight() - rectA.getRight());
1218
+ }
1219
+ if (rectA.getY() <= rectB.getY() && rectA.getBottom() >= rectB.getBottom()) {
1220
+ overlapAmount[1] += Math.min(rectB.getY() - rectA.getY(), rectA.getBottom() - rectB.getBottom());
1221
+ } else if (rectB.getY() <= rectA.getY() && rectB.getBottom() >= rectA.getBottom()) {
1222
+ overlapAmount[1] += Math.min(rectA.getY() - rectB.getY(), rectB.getBottom() - rectA.getBottom());
1223
+ }
1224
+ var slope = Math.abs((rectB.getCenterY() - rectA.getCenterY()) / (rectB.getCenterX() - rectA.getCenterX()));
1225
+ if (rectB.getCenterY() === rectA.getCenterY() && rectB.getCenterX() === rectA.getCenterX()) {
1226
+ slope = 1;
1227
+ }
1228
+ var moveByY = slope * overlapAmount[0];
1229
+ var moveByX = overlapAmount[1] / slope;
1230
+ if (overlapAmount[0] < moveByX) {
1231
+ moveByX = overlapAmount[0];
1232
+ } else {
1233
+ moveByY = overlapAmount[1];
1234
+ }
1235
+ overlapAmount[0] = -1 * directions[0] * (moveByX / 2 + separationBuffer);
1236
+ overlapAmount[1] = -1 * directions[1] * (moveByY / 2 + separationBuffer);
1237
+ };
1238
+ IGeometry.decideDirectionsForOverlappingNodes = function(rectA, rectB, directions) {
1239
+ if (rectA.getCenterX() < rectB.getCenterX()) {
1240
+ directions[0] = -1;
1241
+ } else {
1242
+ directions[0] = 1;
1243
+ }
1244
+ if (rectA.getCenterY() < rectB.getCenterY()) {
1245
+ directions[1] = -1;
1246
+ } else {
1247
+ directions[1] = 1;
1248
+ }
1249
+ };
1250
+ IGeometry.getIntersection2 = function(rectA, rectB, result) {
1251
+ var p1x = rectA.getCenterX();
1252
+ var p1y = rectA.getCenterY();
1253
+ var p2x = rectB.getCenterX();
1254
+ var p2y = rectB.getCenterY();
1255
+ if (rectA.intersects(rectB)) {
1256
+ result[0] = p1x;
1257
+ result[1] = p1y;
1258
+ result[2] = p2x;
1259
+ result[3] = p2y;
1260
+ return true;
1261
+ }
1262
+ var topLeftAx = rectA.getX();
1263
+ var topLeftAy = rectA.getY();
1264
+ var topRightAx = rectA.getRight();
1265
+ var bottomLeftAx = rectA.getX();
1266
+ var bottomLeftAy = rectA.getBottom();
1267
+ var bottomRightAx = rectA.getRight();
1268
+ var halfWidthA = rectA.getWidthHalf();
1269
+ var halfHeightA = rectA.getHeightHalf();
1270
+ var topLeftBx = rectB.getX();
1271
+ var topLeftBy = rectB.getY();
1272
+ var topRightBx = rectB.getRight();
1273
+ var bottomLeftBx = rectB.getX();
1274
+ var bottomLeftBy = rectB.getBottom();
1275
+ var bottomRightBx = rectB.getRight();
1276
+ var halfWidthB = rectB.getWidthHalf();
1277
+ var halfHeightB = rectB.getHeightHalf();
1278
+ var clipPointAFound = false;
1279
+ var clipPointBFound = false;
1280
+ if (p1x === p2x) {
1281
+ if (p1y > p2y) {
1282
+ result[0] = p1x;
1283
+ result[1] = topLeftAy;
1284
+ result[2] = p2x;
1285
+ result[3] = bottomLeftBy;
1286
+ return false;
1287
+ } else if (p1y < p2y) {
1288
+ result[0] = p1x;
1289
+ result[1] = bottomLeftAy;
1290
+ result[2] = p2x;
1291
+ result[3] = topLeftBy;
1292
+ return false;
1293
+ } else ;
1294
+ } else if (p1y === p2y) {
1295
+ if (p1x > p2x) {
1296
+ result[0] = topLeftAx;
1297
+ result[1] = p1y;
1298
+ result[2] = topRightBx;
1299
+ result[3] = p2y;
1300
+ return false;
1301
+ } else if (p1x < p2x) {
1302
+ result[0] = topRightAx;
1303
+ result[1] = p1y;
1304
+ result[2] = topLeftBx;
1305
+ result[3] = p2y;
1306
+ return false;
1307
+ } else ;
1308
+ } else {
1309
+ var slopeA = rectA.height / rectA.width;
1310
+ var slopeB = rectB.height / rectB.width;
1311
+ var slopePrime = (p2y - p1y) / (p2x - p1x);
1312
+ var cardinalDirectionA = void 0;
1313
+ var cardinalDirectionB = void 0;
1314
+ var tempPointAx = void 0;
1315
+ var tempPointAy = void 0;
1316
+ var tempPointBx = void 0;
1317
+ var tempPointBy = void 0;
1318
+ if (-slopeA === slopePrime) {
1319
+ if (p1x > p2x) {
1320
+ result[0] = bottomLeftAx;
1321
+ result[1] = bottomLeftAy;
1322
+ clipPointAFound = true;
1323
+ } else {
1324
+ result[0] = topRightAx;
1325
+ result[1] = topLeftAy;
1326
+ clipPointAFound = true;
1327
+ }
1328
+ } else if (slopeA === slopePrime) {
1329
+ if (p1x > p2x) {
1330
+ result[0] = topLeftAx;
1331
+ result[1] = topLeftAy;
1332
+ clipPointAFound = true;
1333
+ } else {
1334
+ result[0] = bottomRightAx;
1335
+ result[1] = bottomLeftAy;
1336
+ clipPointAFound = true;
1337
+ }
1338
+ }
1339
+ if (-slopeB === slopePrime) {
1340
+ if (p2x > p1x) {
1341
+ result[2] = bottomLeftBx;
1342
+ result[3] = bottomLeftBy;
1343
+ clipPointBFound = true;
1344
+ } else {
1345
+ result[2] = topRightBx;
1346
+ result[3] = topLeftBy;
1347
+ clipPointBFound = true;
1348
+ }
1349
+ } else if (slopeB === slopePrime) {
1350
+ if (p2x > p1x) {
1351
+ result[2] = topLeftBx;
1352
+ result[3] = topLeftBy;
1353
+ clipPointBFound = true;
1354
+ } else {
1355
+ result[2] = bottomRightBx;
1356
+ result[3] = bottomLeftBy;
1357
+ clipPointBFound = true;
1358
+ }
1359
+ }
1360
+ if (clipPointAFound && clipPointBFound) {
1361
+ return false;
1362
+ }
1363
+ if (p1x > p2x) {
1364
+ if (p1y > p2y) {
1365
+ cardinalDirectionA = this.getCardinalDirection(slopeA, slopePrime, 4);
1366
+ cardinalDirectionB = this.getCardinalDirection(slopeB, slopePrime, 2);
1367
+ } else {
1368
+ cardinalDirectionA = this.getCardinalDirection(-slopeA, slopePrime, 3);
1369
+ cardinalDirectionB = this.getCardinalDirection(-slopeB, slopePrime, 1);
1370
+ }
1371
+ } else {
1372
+ if (p1y > p2y) {
1373
+ cardinalDirectionA = this.getCardinalDirection(-slopeA, slopePrime, 1);
1374
+ cardinalDirectionB = this.getCardinalDirection(-slopeB, slopePrime, 3);
1375
+ } else {
1376
+ cardinalDirectionA = this.getCardinalDirection(slopeA, slopePrime, 2);
1377
+ cardinalDirectionB = this.getCardinalDirection(slopeB, slopePrime, 4);
1378
+ }
1379
+ }
1380
+ if (!clipPointAFound) {
1381
+ switch (cardinalDirectionA) {
1382
+ case 1:
1383
+ tempPointAy = topLeftAy;
1384
+ tempPointAx = p1x + -halfHeightA / slopePrime;
1385
+ result[0] = tempPointAx;
1386
+ result[1] = tempPointAy;
1387
+ break;
1388
+ case 2:
1389
+ tempPointAx = bottomRightAx;
1390
+ tempPointAy = p1y + halfWidthA * slopePrime;
1391
+ result[0] = tempPointAx;
1392
+ result[1] = tempPointAy;
1393
+ break;
1394
+ case 3:
1395
+ tempPointAy = bottomLeftAy;
1396
+ tempPointAx = p1x + halfHeightA / slopePrime;
1397
+ result[0] = tempPointAx;
1398
+ result[1] = tempPointAy;
1399
+ break;
1400
+ case 4:
1401
+ tempPointAx = bottomLeftAx;
1402
+ tempPointAy = p1y + -halfWidthA * slopePrime;
1403
+ result[0] = tempPointAx;
1404
+ result[1] = tempPointAy;
1405
+ break;
1406
+ }
1407
+ }
1408
+ if (!clipPointBFound) {
1409
+ switch (cardinalDirectionB) {
1410
+ case 1:
1411
+ tempPointBy = topLeftBy;
1412
+ tempPointBx = p2x + -halfHeightB / slopePrime;
1413
+ result[2] = tempPointBx;
1414
+ result[3] = tempPointBy;
1415
+ break;
1416
+ case 2:
1417
+ tempPointBx = bottomRightBx;
1418
+ tempPointBy = p2y + halfWidthB * slopePrime;
1419
+ result[2] = tempPointBx;
1420
+ result[3] = tempPointBy;
1421
+ break;
1422
+ case 3:
1423
+ tempPointBy = bottomLeftBy;
1424
+ tempPointBx = p2x + halfHeightB / slopePrime;
1425
+ result[2] = tempPointBx;
1426
+ result[3] = tempPointBy;
1427
+ break;
1428
+ case 4:
1429
+ tempPointBx = bottomLeftBx;
1430
+ tempPointBy = p2y + -halfWidthB * slopePrime;
1431
+ result[2] = tempPointBx;
1432
+ result[3] = tempPointBy;
1433
+ break;
1434
+ }
1435
+ }
1436
+ }
1437
+ return false;
1438
+ };
1439
+ IGeometry.getCardinalDirection = function(slope, slopePrime, line) {
1440
+ if (slope > slopePrime) {
1441
+ return line;
1442
+ } else {
1443
+ return 1 + line % 4;
1444
+ }
1445
+ };
1446
+ IGeometry.getIntersection = function(s1, s2, f1, f2) {
1447
+ if (f2 == null) {
1448
+ return this.getIntersection2(s1, s2, f1);
1449
+ }
1450
+ var x1 = s1.x;
1451
+ var y1 = s1.y;
1452
+ var x2 = s2.x;
1453
+ var y2 = s2.y;
1454
+ var x3 = f1.x;
1455
+ var y3 = f1.y;
1456
+ var x4 = f2.x;
1457
+ var y4 = f2.y;
1458
+ var x = void 0, y = void 0;
1459
+ var a1 = void 0, a2 = void 0, b1 = void 0, b2 = void 0, c1 = void 0, c2 = void 0;
1460
+ var denom = void 0;
1461
+ a1 = y2 - y1;
1462
+ b1 = x1 - x2;
1463
+ c1 = x2 * y1 - x1 * y2;
1464
+ a2 = y4 - y3;
1465
+ b2 = x3 - x4;
1466
+ c2 = x4 * y3 - x3 * y4;
1467
+ denom = a1 * b2 - a2 * b1;
1468
+ if (denom === 0) {
1469
+ return null;
1470
+ }
1471
+ x = (b1 * c2 - b2 * c1) / denom;
1472
+ y = (a2 * c1 - a1 * c2) / denom;
1473
+ return new Point2(x, y);
1474
+ };
1475
+ IGeometry.angleOfVector = function(Cx, Cy, Nx, Ny) {
1476
+ var C_angle = void 0;
1477
+ if (Cx !== Nx) {
1478
+ C_angle = Math.atan((Ny - Cy) / (Nx - Cx));
1479
+ if (Nx < Cx) {
1480
+ C_angle += Math.PI;
1481
+ } else if (Ny < Cy) {
1482
+ C_angle += this.TWO_PI;
1483
+ }
1484
+ } else if (Ny < Cy) {
1485
+ C_angle = this.ONE_AND_HALF_PI;
1486
+ } else {
1487
+ C_angle = this.HALF_PI;
1488
+ }
1489
+ return C_angle;
1490
+ };
1491
+ IGeometry.doIntersect = function(p1, p2, p3, p4) {
1492
+ var a = p1.x;
1493
+ var b = p1.y;
1494
+ var c = p2.x;
1495
+ var d = p2.y;
1496
+ var p = p3.x;
1497
+ var q = p3.y;
1498
+ var r = p4.x;
1499
+ var s = p4.y;
1500
+ var det = (c - a) * (s - q) - (r - p) * (d - b);
1501
+ if (det === 0) {
1502
+ return false;
1503
+ } else {
1504
+ var lambda = ((s - q) * (r - a) + (p - r) * (s - b)) / det;
1505
+ var gamma = ((b - d) * (r - a) + (c - a) * (s - b)) / det;
1506
+ return 0 < lambda && lambda < 1 && 0 < gamma && gamma < 1;
1507
+ }
1508
+ };
1509
+ IGeometry.HALF_PI = 0.5 * Math.PI;
1510
+ IGeometry.ONE_AND_HALF_PI = 1.5 * Math.PI;
1511
+ IGeometry.TWO_PI = 2 * Math.PI;
1512
+ IGeometry.THREE_PI = 3 * Math.PI;
1513
+ module3.exports = IGeometry;
1514
+ },
1515
+ /* 9 */
1516
+ /***/
1517
+ function(module3, exports3, __webpack_require__) {
1518
+ function IMath() {
1519
+ }
1520
+ IMath.sign = function(value) {
1521
+ if (value > 0) {
1522
+ return 1;
1523
+ } else if (value < 0) {
1524
+ return -1;
1525
+ } else {
1526
+ return 0;
1527
+ }
1528
+ };
1529
+ IMath.floor = function(value) {
1530
+ return value < 0 ? Math.ceil(value) : Math.floor(value);
1531
+ };
1532
+ IMath.ceil = function(value) {
1533
+ return value < 0 ? Math.floor(value) : Math.ceil(value);
1534
+ };
1535
+ module3.exports = IMath;
1536
+ },
1537
+ /* 10 */
1538
+ /***/
1539
+ function(module3, exports3, __webpack_require__) {
1540
+ function Integer() {
1541
+ }
1542
+ Integer.MAX_VALUE = 2147483647;
1543
+ Integer.MIN_VALUE = -2147483648;
1544
+ module3.exports = Integer;
1545
+ },
1546
+ /* 11 */
1547
+ /***/
1548
+ function(module3, exports3, __webpack_require__) {
1549
+ var _createClass = /* @__PURE__ */ function() {
1550
+ function defineProperties(target, props) {
1551
+ for (var i = 0; i < props.length; i++) {
1552
+ var descriptor = props[i];
1553
+ descriptor.enumerable = descriptor.enumerable || false;
1554
+ descriptor.configurable = true;
1555
+ if ("value" in descriptor) descriptor.writable = true;
1556
+ Object.defineProperty(target, descriptor.key, descriptor);
1557
+ }
1558
+ }
1559
+ return function(Constructor, protoProps, staticProps) {
1560
+ if (protoProps) defineProperties(Constructor.prototype, protoProps);
1561
+ if (staticProps) defineProperties(Constructor, staticProps);
1562
+ return Constructor;
1563
+ };
1564
+ }();
1565
+ function _classCallCheck(instance, Constructor) {
1566
+ if (!(instance instanceof Constructor)) {
1567
+ throw new TypeError("Cannot call a class as a function");
1568
+ }
1569
+ }
1570
+ var nodeFrom = function nodeFrom2(value) {
1571
+ return { value, next: null, prev: null };
1572
+ };
1573
+ var add = function add2(prev, node, next, list) {
1574
+ if (prev !== null) {
1575
+ prev.next = node;
1576
+ } else {
1577
+ list.head = node;
1578
+ }
1579
+ if (next !== null) {
1580
+ next.prev = node;
1581
+ } else {
1582
+ list.tail = node;
1583
+ }
1584
+ node.prev = prev;
1585
+ node.next = next;
1586
+ list.length++;
1587
+ return node;
1588
+ };
1589
+ var _remove = function _remove2(node, list) {
1590
+ var prev = node.prev, next = node.next;
1591
+ if (prev !== null) {
1592
+ prev.next = next;
1593
+ } else {
1594
+ list.head = next;
1595
+ }
1596
+ if (next !== null) {
1597
+ next.prev = prev;
1598
+ } else {
1599
+ list.tail = prev;
1600
+ }
1601
+ node.prev = node.next = null;
1602
+ list.length--;
1603
+ return node;
1604
+ };
1605
+ var LinkedList = function() {
1606
+ function LinkedList2(vals) {
1607
+ var _this = this;
1608
+ _classCallCheck(this, LinkedList2);
1609
+ this.length = 0;
1610
+ this.head = null;
1611
+ this.tail = null;
1612
+ if (vals != null) {
1613
+ vals.forEach(function(v) {
1614
+ return _this.push(v);
1615
+ });
1616
+ }
1617
+ }
1618
+ _createClass(LinkedList2, [{
1619
+ key: "size",
1620
+ value: function size() {
1621
+ return this.length;
1622
+ }
1623
+ }, {
1624
+ key: "insertBefore",
1625
+ value: function insertBefore(val, otherNode) {
1626
+ return add(otherNode.prev, nodeFrom(val), otherNode, this);
1627
+ }
1628
+ }, {
1629
+ key: "insertAfter",
1630
+ value: function insertAfter(val, otherNode) {
1631
+ return add(otherNode, nodeFrom(val), otherNode.next, this);
1632
+ }
1633
+ }, {
1634
+ key: "insertNodeBefore",
1635
+ value: function insertNodeBefore(newNode, otherNode) {
1636
+ return add(otherNode.prev, newNode, otherNode, this);
1637
+ }
1638
+ }, {
1639
+ key: "insertNodeAfter",
1640
+ value: function insertNodeAfter(newNode, otherNode) {
1641
+ return add(otherNode, newNode, otherNode.next, this);
1642
+ }
1643
+ }, {
1644
+ key: "push",
1645
+ value: function push(val) {
1646
+ return add(this.tail, nodeFrom(val), null, this);
1647
+ }
1648
+ }, {
1649
+ key: "unshift",
1650
+ value: function unshift(val) {
1651
+ return add(null, nodeFrom(val), this.head, this);
1652
+ }
1653
+ }, {
1654
+ key: "remove",
1655
+ value: function remove(node) {
1656
+ return _remove(node, this);
1657
+ }
1658
+ }, {
1659
+ key: "pop",
1660
+ value: function pop() {
1661
+ return _remove(this.tail, this).value;
1662
+ }
1663
+ }, {
1664
+ key: "popNode",
1665
+ value: function popNode() {
1666
+ return _remove(this.tail, this);
1667
+ }
1668
+ }, {
1669
+ key: "shift",
1670
+ value: function shift() {
1671
+ return _remove(this.head, this).value;
1672
+ }
1673
+ }, {
1674
+ key: "shiftNode",
1675
+ value: function shiftNode() {
1676
+ return _remove(this.head, this);
1677
+ }
1678
+ }, {
1679
+ key: "get_object_at",
1680
+ value: function get_object_at(index) {
1681
+ if (index <= this.length()) {
1682
+ var i = 1;
1683
+ var current = this.head;
1684
+ while (i < index) {
1685
+ current = current.next;
1686
+ i++;
1687
+ }
1688
+ return current.value;
1689
+ }
1690
+ }
1691
+ }, {
1692
+ key: "set_object_at",
1693
+ value: function set_object_at(index, value) {
1694
+ if (index <= this.length()) {
1695
+ var i = 1;
1696
+ var current = this.head;
1697
+ while (i < index) {
1698
+ current = current.next;
1699
+ i++;
1700
+ }
1701
+ current.value = value;
1702
+ }
1703
+ }
1704
+ }]);
1705
+ return LinkedList2;
1706
+ }();
1707
+ module3.exports = LinkedList;
1708
+ },
1709
+ /* 12 */
1710
+ /***/
1711
+ function(module3, exports3, __webpack_require__) {
1712
+ function Point2(x, y, p) {
1713
+ this.x = null;
1714
+ this.y = null;
1715
+ if (x == null && y == null && p == null) {
1716
+ this.x = 0;
1717
+ this.y = 0;
1718
+ } else if (typeof x == "number" && typeof y == "number" && p == null) {
1719
+ this.x = x;
1720
+ this.y = y;
1721
+ } else if (x.constructor.name == "Point" && y == null && p == null) {
1722
+ p = x;
1723
+ this.x = p.x;
1724
+ this.y = p.y;
1725
+ }
1726
+ }
1727
+ Point2.prototype.getX = function() {
1728
+ return this.x;
1729
+ };
1730
+ Point2.prototype.getY = function() {
1731
+ return this.y;
1732
+ };
1733
+ Point2.prototype.getLocation = function() {
1734
+ return new Point2(this.x, this.y);
1735
+ };
1736
+ Point2.prototype.setLocation = function(x, y, p) {
1737
+ if (x.constructor.name == "Point" && y == null && p == null) {
1738
+ p = x;
1739
+ this.setLocation(p.x, p.y);
1740
+ } else if (typeof x == "number" && typeof y == "number" && p == null) {
1741
+ if (parseInt(x) == x && parseInt(y) == y) {
1742
+ this.move(x, y);
1743
+ } else {
1744
+ this.x = Math.floor(x + 0.5);
1745
+ this.y = Math.floor(y + 0.5);
1746
+ }
1747
+ }
1748
+ };
1749
+ Point2.prototype.move = function(x, y) {
1750
+ this.x = x;
1751
+ this.y = y;
1752
+ };
1753
+ Point2.prototype.translate = function(dx, dy) {
1754
+ this.x += dx;
1755
+ this.y += dy;
1756
+ };
1757
+ Point2.prototype.equals = function(obj) {
1758
+ if (obj.constructor.name == "Point") {
1759
+ var pt = obj;
1760
+ return this.x == pt.x && this.y == pt.y;
1761
+ }
1762
+ return this == obj;
1763
+ };
1764
+ Point2.prototype.toString = function() {
1765
+ return new Point2().constructor.name + "[x=" + this.x + ",y=" + this.y + "]";
1766
+ };
1767
+ module3.exports = Point2;
1768
+ },
1769
+ /* 13 */
1770
+ /***/
1771
+ function(module3, exports3, __webpack_require__) {
1772
+ function RectangleD(x, y, width, height) {
1773
+ this.x = 0;
1774
+ this.y = 0;
1775
+ this.width = 0;
1776
+ this.height = 0;
1777
+ if (x != null && y != null && width != null && height != null) {
1778
+ this.x = x;
1779
+ this.y = y;
1780
+ this.width = width;
1781
+ this.height = height;
1782
+ }
1783
+ }
1784
+ RectangleD.prototype.getX = function() {
1785
+ return this.x;
1786
+ };
1787
+ RectangleD.prototype.setX = function(x) {
1788
+ this.x = x;
1789
+ };
1790
+ RectangleD.prototype.getY = function() {
1791
+ return this.y;
1792
+ };
1793
+ RectangleD.prototype.setY = function(y) {
1794
+ this.y = y;
1795
+ };
1796
+ RectangleD.prototype.getWidth = function() {
1797
+ return this.width;
1798
+ };
1799
+ RectangleD.prototype.setWidth = function(width) {
1800
+ this.width = width;
1801
+ };
1802
+ RectangleD.prototype.getHeight = function() {
1803
+ return this.height;
1804
+ };
1805
+ RectangleD.prototype.setHeight = function(height) {
1806
+ this.height = height;
1807
+ };
1808
+ RectangleD.prototype.getRight = function() {
1809
+ return this.x + this.width;
1810
+ };
1811
+ RectangleD.prototype.getBottom = function() {
1812
+ return this.y + this.height;
1813
+ };
1814
+ RectangleD.prototype.intersects = function(a) {
1815
+ if (this.getRight() < a.x) {
1816
+ return false;
1817
+ }
1818
+ if (this.getBottom() < a.y) {
1819
+ return false;
1820
+ }
1821
+ if (a.getRight() < this.x) {
1822
+ return false;
1823
+ }
1824
+ if (a.getBottom() < this.y) {
1825
+ return false;
1826
+ }
1827
+ return true;
1828
+ };
1829
+ RectangleD.prototype.getCenterX = function() {
1830
+ return this.x + this.width / 2;
1831
+ };
1832
+ RectangleD.prototype.getMinX = function() {
1833
+ return this.getX();
1834
+ };
1835
+ RectangleD.prototype.getMaxX = function() {
1836
+ return this.getX() + this.width;
1837
+ };
1838
+ RectangleD.prototype.getCenterY = function() {
1839
+ return this.y + this.height / 2;
1840
+ };
1841
+ RectangleD.prototype.getMinY = function() {
1842
+ return this.getY();
1843
+ };
1844
+ RectangleD.prototype.getMaxY = function() {
1845
+ return this.getY() + this.height;
1846
+ };
1847
+ RectangleD.prototype.getWidthHalf = function() {
1848
+ return this.width / 2;
1849
+ };
1850
+ RectangleD.prototype.getHeightHalf = function() {
1851
+ return this.height / 2;
1852
+ };
1853
+ module3.exports = RectangleD;
1854
+ },
1855
+ /* 14 */
1856
+ /***/
1857
+ function(module3, exports3, __webpack_require__) {
1858
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) {
1859
+ return typeof obj;
1860
+ } : function(obj) {
1861
+ return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
1862
+ };
1863
+ function UniqueIDGeneretor() {
1864
+ }
1865
+ UniqueIDGeneretor.lastID = 0;
1866
+ UniqueIDGeneretor.createID = function(obj) {
1867
+ if (UniqueIDGeneretor.isPrimitive(obj)) {
1868
+ return obj;
1869
+ }
1870
+ if (obj.uniqueID != null) {
1871
+ return obj.uniqueID;
1872
+ }
1873
+ obj.uniqueID = UniqueIDGeneretor.getString();
1874
+ UniqueIDGeneretor.lastID++;
1875
+ return obj.uniqueID;
1876
+ };
1877
+ UniqueIDGeneretor.getString = function(id) {
1878
+ if (id == null) id = UniqueIDGeneretor.lastID;
1879
+ return "Object#" + id;
1880
+ };
1881
+ UniqueIDGeneretor.isPrimitive = function(arg) {
1882
+ var type = typeof arg === "undefined" ? "undefined" : _typeof(arg);
1883
+ return arg == null || type != "object" && type != "function";
1884
+ };
1885
+ module3.exports = UniqueIDGeneretor;
1886
+ },
1887
+ /* 15 */
1888
+ /***/
1889
+ function(module3, exports3, __webpack_require__) {
1890
+ function _toConsumableArray(arr) {
1891
+ if (Array.isArray(arr)) {
1892
+ for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {
1893
+ arr2[i] = arr[i];
1894
+ }
1895
+ return arr2;
1896
+ } else {
1897
+ return Array.from(arr);
1898
+ }
1899
+ }
1900
+ var LayoutConstants = __webpack_require__(0);
1901
+ var LGraphManager = __webpack_require__(6);
1902
+ var LNode = __webpack_require__(3);
1903
+ var LEdge = __webpack_require__(1);
1904
+ var LGraph = __webpack_require__(5);
1905
+ var PointD = __webpack_require__(4);
1906
+ var Transform = __webpack_require__(17);
1907
+ var Emitter = __webpack_require__(27);
1908
+ function Layout2(isRemoteUse) {
1909
+ Emitter.call(this);
1910
+ this.layoutQuality = LayoutConstants.QUALITY;
1911
+ this.createBendsAsNeeded = LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED;
1912
+ this.incremental = LayoutConstants.DEFAULT_INCREMENTAL;
1913
+ this.animationOnLayout = LayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT;
1914
+ this.animationDuringLayout = LayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT;
1915
+ this.animationPeriod = LayoutConstants.DEFAULT_ANIMATION_PERIOD;
1916
+ this.uniformLeafNodeSizes = LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES;
1917
+ this.edgeToDummyNodes = /* @__PURE__ */ new Map();
1918
+ this.graphManager = new LGraphManager(this);
1919
+ this.isLayoutFinished = false;
1920
+ this.isSubLayout = false;
1921
+ this.isRemoteUse = false;
1922
+ if (isRemoteUse != null) {
1923
+ this.isRemoteUse = isRemoteUse;
1924
+ }
1925
+ }
1926
+ Layout2.RANDOM_SEED = 1;
1927
+ Layout2.prototype = Object.create(Emitter.prototype);
1928
+ Layout2.prototype.getGraphManager = function() {
1929
+ return this.graphManager;
1930
+ };
1931
+ Layout2.prototype.getAllNodes = function() {
1932
+ return this.graphManager.getAllNodes();
1933
+ };
1934
+ Layout2.prototype.getAllEdges = function() {
1935
+ return this.graphManager.getAllEdges();
1936
+ };
1937
+ Layout2.prototype.getAllNodesToApplyGravitation = function() {
1938
+ return this.graphManager.getAllNodesToApplyGravitation();
1939
+ };
1940
+ Layout2.prototype.newGraphManager = function() {
1941
+ var gm = new LGraphManager(this);
1942
+ this.graphManager = gm;
1943
+ return gm;
1944
+ };
1945
+ Layout2.prototype.newGraph = function(vGraph) {
1946
+ return new LGraph(null, this.graphManager, vGraph);
1947
+ };
1948
+ Layout2.prototype.newNode = function(vNode) {
1949
+ return new LNode(this.graphManager, vNode);
1950
+ };
1951
+ Layout2.prototype.newEdge = function(vEdge) {
1952
+ return new LEdge(null, null, vEdge);
1953
+ };
1954
+ Layout2.prototype.checkLayoutSuccess = function() {
1955
+ return this.graphManager.getRoot() == null || this.graphManager.getRoot().getNodes().length == 0 || this.graphManager.includesInvalidEdge();
1956
+ };
1957
+ Layout2.prototype.runLayout = function() {
1958
+ this.isLayoutFinished = false;
1959
+ if (this.tilingPreLayout) {
1960
+ this.tilingPreLayout();
1961
+ }
1962
+ this.initParameters();
1963
+ var isLayoutSuccessfull;
1964
+ if (this.checkLayoutSuccess()) {
1965
+ isLayoutSuccessfull = false;
1966
+ } else {
1967
+ isLayoutSuccessfull = this.layout();
1968
+ }
1969
+ if (LayoutConstants.ANIMATE === "during") {
1970
+ return false;
1971
+ }
1972
+ if (isLayoutSuccessfull) {
1973
+ if (!this.isSubLayout) {
1974
+ this.doPostLayout();
1975
+ }
1976
+ }
1977
+ if (this.tilingPostLayout) {
1978
+ this.tilingPostLayout();
1979
+ }
1980
+ this.isLayoutFinished = true;
1981
+ return isLayoutSuccessfull;
1982
+ };
1983
+ Layout2.prototype.doPostLayout = function() {
1984
+ if (!this.incremental) {
1985
+ this.transform();
1986
+ }
1987
+ this.update();
1988
+ };
1989
+ Layout2.prototype.update2 = function() {
1990
+ if (this.createBendsAsNeeded) {
1991
+ this.createBendpointsFromDummyNodes();
1992
+ this.graphManager.resetAllEdges();
1993
+ }
1994
+ if (!this.isRemoteUse) {
1995
+ var allEdges = this.graphManager.getAllEdges();
1996
+ for (var i = 0; i < allEdges.length; i++) {
1997
+ allEdges[i];
1998
+ }
1999
+ var nodes = this.graphManager.getRoot().getNodes();
2000
+ for (var i = 0; i < nodes.length; i++) {
2001
+ nodes[i];
2002
+ }
2003
+ this.update(this.graphManager.getRoot());
2004
+ }
2005
+ };
2006
+ Layout2.prototype.update = function(obj) {
2007
+ if (obj == null) {
2008
+ this.update2();
2009
+ } else if (obj instanceof LNode) {
2010
+ var node = obj;
2011
+ if (node.getChild() != null) {
2012
+ var nodes = node.getChild().getNodes();
2013
+ for (var i = 0; i < nodes.length; i++) {
2014
+ update(nodes[i]);
2015
+ }
2016
+ }
2017
+ if (node.vGraphObject != null) {
2018
+ var vNode = node.vGraphObject;
2019
+ vNode.update(node);
2020
+ }
2021
+ } else if (obj instanceof LEdge) {
2022
+ var edge = obj;
2023
+ if (edge.vGraphObject != null) {
2024
+ var vEdge = edge.vGraphObject;
2025
+ vEdge.update(edge);
2026
+ }
2027
+ } else if (obj instanceof LGraph) {
2028
+ var graph = obj;
2029
+ if (graph.vGraphObject != null) {
2030
+ var vGraph = graph.vGraphObject;
2031
+ vGraph.update(graph);
2032
+ }
2033
+ }
2034
+ };
2035
+ Layout2.prototype.initParameters = function() {
2036
+ if (!this.isSubLayout) {
2037
+ this.layoutQuality = LayoutConstants.QUALITY;
2038
+ this.animationDuringLayout = LayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT;
2039
+ this.animationPeriod = LayoutConstants.DEFAULT_ANIMATION_PERIOD;
2040
+ this.animationOnLayout = LayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT;
2041
+ this.incremental = LayoutConstants.DEFAULT_INCREMENTAL;
2042
+ this.createBendsAsNeeded = LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED;
2043
+ this.uniformLeafNodeSizes = LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES;
2044
+ }
2045
+ if (this.animationDuringLayout) {
2046
+ this.animationOnLayout = false;
2047
+ }
2048
+ };
2049
+ Layout2.prototype.transform = function(newLeftTop) {
2050
+ if (newLeftTop == void 0) {
2051
+ this.transform(new PointD(0, 0));
2052
+ } else {
2053
+ var trans = new Transform();
2054
+ var leftTop = this.graphManager.getRoot().updateLeftTop();
2055
+ if (leftTop != null) {
2056
+ trans.setWorldOrgX(newLeftTop.x);
2057
+ trans.setWorldOrgY(newLeftTop.y);
2058
+ trans.setDeviceOrgX(leftTop.x);
2059
+ trans.setDeviceOrgY(leftTop.y);
2060
+ var nodes = this.getAllNodes();
2061
+ var node;
2062
+ for (var i = 0; i < nodes.length; i++) {
2063
+ node = nodes[i];
2064
+ node.transform(trans);
2065
+ }
2066
+ }
2067
+ }
2068
+ };
2069
+ Layout2.prototype.positionNodesRandomly = function(graph) {
2070
+ if (graph == void 0) {
2071
+ this.positionNodesRandomly(this.getGraphManager().getRoot());
2072
+ this.getGraphManager().getRoot().updateBounds(true);
2073
+ } else {
2074
+ var lNode;
2075
+ var childGraph;
2076
+ var nodes = graph.getNodes();
2077
+ for (var i = 0; i < nodes.length; i++) {
2078
+ lNode = nodes[i];
2079
+ childGraph = lNode.getChild();
2080
+ if (childGraph == null) {
2081
+ lNode.scatter();
2082
+ } else if (childGraph.getNodes().length == 0) {
2083
+ lNode.scatter();
2084
+ } else {
2085
+ this.positionNodesRandomly(childGraph);
2086
+ lNode.updateBounds();
2087
+ }
2088
+ }
2089
+ }
2090
+ };
2091
+ Layout2.prototype.getFlatForest = function() {
2092
+ var flatForest = [];
2093
+ var isForest = true;
2094
+ var allNodes = this.graphManager.getRoot().getNodes();
2095
+ var isFlat = true;
2096
+ for (var i = 0; i < allNodes.length; i++) {
2097
+ if (allNodes[i].getChild() != null) {
2098
+ isFlat = false;
2099
+ }
2100
+ }
2101
+ if (!isFlat) {
2102
+ return flatForest;
2103
+ }
2104
+ var visited = /* @__PURE__ */ new Set();
2105
+ var toBeVisited = [];
2106
+ var parents = /* @__PURE__ */ new Map();
2107
+ var unProcessedNodes = [];
2108
+ unProcessedNodes = unProcessedNodes.concat(allNodes);
2109
+ while (unProcessedNodes.length > 0 && isForest) {
2110
+ toBeVisited.push(unProcessedNodes[0]);
2111
+ while (toBeVisited.length > 0 && isForest) {
2112
+ var currentNode = toBeVisited[0];
2113
+ toBeVisited.splice(0, 1);
2114
+ visited.add(currentNode);
2115
+ var neighborEdges = currentNode.getEdges();
2116
+ for (var i = 0; i < neighborEdges.length; i++) {
2117
+ var currentNeighbor = neighborEdges[i].getOtherEnd(currentNode);
2118
+ if (parents.get(currentNode) != currentNeighbor) {
2119
+ if (!visited.has(currentNeighbor)) {
2120
+ toBeVisited.push(currentNeighbor);
2121
+ parents.set(currentNeighbor, currentNode);
2122
+ } else {
2123
+ isForest = false;
2124
+ break;
2125
+ }
2126
+ }
2127
+ }
2128
+ }
2129
+ if (!isForest) {
2130
+ flatForest = [];
2131
+ } else {
2132
+ var temp = [].concat(_toConsumableArray(visited));
2133
+ flatForest.push(temp);
2134
+ for (var i = 0; i < temp.length; i++) {
2135
+ var value = temp[i];
2136
+ var index = unProcessedNodes.indexOf(value);
2137
+ if (index > -1) {
2138
+ unProcessedNodes.splice(index, 1);
2139
+ }
2140
+ }
2141
+ visited = /* @__PURE__ */ new Set();
2142
+ parents = /* @__PURE__ */ new Map();
2143
+ }
2144
+ }
2145
+ return flatForest;
2146
+ };
2147
+ Layout2.prototype.createDummyNodesForBendpoints = function(edge) {
2148
+ var dummyNodes = [];
2149
+ var prev = edge.source;
2150
+ var graph = this.graphManager.calcLowestCommonAncestor(edge.source, edge.target);
2151
+ for (var i = 0; i < edge.bendpoints.length; i++) {
2152
+ var dummyNode = this.newNode(null);
2153
+ dummyNode.setRect(new Point(0, 0), new Dimension(1, 1));
2154
+ graph.add(dummyNode);
2155
+ var dummyEdge = this.newEdge(null);
2156
+ this.graphManager.add(dummyEdge, prev, dummyNode);
2157
+ dummyNodes.add(dummyNode);
2158
+ prev = dummyNode;
2159
+ }
2160
+ var dummyEdge = this.newEdge(null);
2161
+ this.graphManager.add(dummyEdge, prev, edge.target);
2162
+ this.edgeToDummyNodes.set(edge, dummyNodes);
2163
+ if (edge.isInterGraph()) {
2164
+ this.graphManager.remove(edge);
2165
+ } else {
2166
+ graph.remove(edge);
2167
+ }
2168
+ return dummyNodes;
2169
+ };
2170
+ Layout2.prototype.createBendpointsFromDummyNodes = function() {
2171
+ var edges = [];
2172
+ edges = edges.concat(this.graphManager.getAllEdges());
2173
+ edges = [].concat(_toConsumableArray(this.edgeToDummyNodes.keys())).concat(edges);
2174
+ for (var k = 0; k < edges.length; k++) {
2175
+ var lEdge = edges[k];
2176
+ if (lEdge.bendpoints.length > 0) {
2177
+ var path = this.edgeToDummyNodes.get(lEdge);
2178
+ for (var i = 0; i < path.length; i++) {
2179
+ var dummyNode = path[i];
2180
+ var p = new PointD(dummyNode.getCenterX(), dummyNode.getCenterY());
2181
+ var ebp = lEdge.bendpoints.get(i);
2182
+ ebp.x = p.x;
2183
+ ebp.y = p.y;
2184
+ dummyNode.getOwner().remove(dummyNode);
2185
+ }
2186
+ this.graphManager.add(lEdge, lEdge.source, lEdge.target);
2187
+ }
2188
+ }
2189
+ };
2190
+ Layout2.transform = function(sliderValue, defaultValue, minDiv, maxMul) {
2191
+ if (minDiv != void 0 && maxMul != void 0) {
2192
+ var value = defaultValue;
2193
+ if (sliderValue <= 50) {
2194
+ var minValue = defaultValue / minDiv;
2195
+ value -= (defaultValue - minValue) / 50 * (50 - sliderValue);
2196
+ } else {
2197
+ var maxValue = defaultValue * maxMul;
2198
+ value += (maxValue - defaultValue) / 50 * (sliderValue - 50);
2199
+ }
2200
+ return value;
2201
+ } else {
2202
+ var a, b;
2203
+ if (sliderValue <= 50) {
2204
+ a = 9 * defaultValue / 500;
2205
+ b = defaultValue / 10;
2206
+ } else {
2207
+ a = 9 * defaultValue / 50;
2208
+ b = -8 * defaultValue;
2209
+ }
2210
+ return a * sliderValue + b;
2211
+ }
2212
+ };
2213
+ Layout2.findCenterOfTree = function(nodes) {
2214
+ var list = [];
2215
+ list = list.concat(nodes);
2216
+ var removedNodes = [];
2217
+ var remainingDegrees = /* @__PURE__ */ new Map();
2218
+ var foundCenter = false;
2219
+ var centerNode = null;
2220
+ if (list.length == 1 || list.length == 2) {
2221
+ foundCenter = true;
2222
+ centerNode = list[0];
2223
+ }
2224
+ for (var i = 0; i < list.length; i++) {
2225
+ var node = list[i];
2226
+ var degree = node.getNeighborsList().size;
2227
+ remainingDegrees.set(node, node.getNeighborsList().size);
2228
+ if (degree == 1) {
2229
+ removedNodes.push(node);
2230
+ }
2231
+ }
2232
+ var tempList = [];
2233
+ tempList = tempList.concat(removedNodes);
2234
+ while (!foundCenter) {
2235
+ var tempList2 = [];
2236
+ tempList2 = tempList2.concat(tempList);
2237
+ tempList = [];
2238
+ for (var i = 0; i < list.length; i++) {
2239
+ var node = list[i];
2240
+ var index = list.indexOf(node);
2241
+ if (index >= 0) {
2242
+ list.splice(index, 1);
2243
+ }
2244
+ var neighbours = node.getNeighborsList();
2245
+ neighbours.forEach(function(neighbour) {
2246
+ if (removedNodes.indexOf(neighbour) < 0) {
2247
+ var otherDegree = remainingDegrees.get(neighbour);
2248
+ var newDegree = otherDegree - 1;
2249
+ if (newDegree == 1) {
2250
+ tempList.push(neighbour);
2251
+ }
2252
+ remainingDegrees.set(neighbour, newDegree);
2253
+ }
2254
+ });
2255
+ }
2256
+ removedNodes = removedNodes.concat(tempList);
2257
+ if (list.length == 1 || list.length == 2) {
2258
+ foundCenter = true;
2259
+ centerNode = list[0];
2260
+ }
2261
+ }
2262
+ return centerNode;
2263
+ };
2264
+ Layout2.prototype.setGraphManager = function(gm) {
2265
+ this.graphManager = gm;
2266
+ };
2267
+ module3.exports = Layout2;
2268
+ },
2269
+ /* 16 */
2270
+ /***/
2271
+ function(module3, exports3, __webpack_require__) {
2272
+ function RandomSeed() {
2273
+ }
2274
+ RandomSeed.seed = 1;
2275
+ RandomSeed.x = 0;
2276
+ RandomSeed.nextDouble = function() {
2277
+ RandomSeed.x = Math.sin(RandomSeed.seed++) * 1e4;
2278
+ return RandomSeed.x - Math.floor(RandomSeed.x);
2279
+ };
2280
+ module3.exports = RandomSeed;
2281
+ },
2282
+ /* 17 */
2283
+ /***/
2284
+ function(module3, exports3, __webpack_require__) {
2285
+ var PointD = __webpack_require__(4);
2286
+ function Transform(x, y) {
2287
+ this.lworldOrgX = 0;
2288
+ this.lworldOrgY = 0;
2289
+ this.ldeviceOrgX = 0;
2290
+ this.ldeviceOrgY = 0;
2291
+ this.lworldExtX = 1;
2292
+ this.lworldExtY = 1;
2293
+ this.ldeviceExtX = 1;
2294
+ this.ldeviceExtY = 1;
2295
+ }
2296
+ Transform.prototype.getWorldOrgX = function() {
2297
+ return this.lworldOrgX;
2298
+ };
2299
+ Transform.prototype.setWorldOrgX = function(wox) {
2300
+ this.lworldOrgX = wox;
2301
+ };
2302
+ Transform.prototype.getWorldOrgY = function() {
2303
+ return this.lworldOrgY;
2304
+ };
2305
+ Transform.prototype.setWorldOrgY = function(woy) {
2306
+ this.lworldOrgY = woy;
2307
+ };
2308
+ Transform.prototype.getWorldExtX = function() {
2309
+ return this.lworldExtX;
2310
+ };
2311
+ Transform.prototype.setWorldExtX = function(wex) {
2312
+ this.lworldExtX = wex;
2313
+ };
2314
+ Transform.prototype.getWorldExtY = function() {
2315
+ return this.lworldExtY;
2316
+ };
2317
+ Transform.prototype.setWorldExtY = function(wey) {
2318
+ this.lworldExtY = wey;
2319
+ };
2320
+ Transform.prototype.getDeviceOrgX = function() {
2321
+ return this.ldeviceOrgX;
2322
+ };
2323
+ Transform.prototype.setDeviceOrgX = function(dox) {
2324
+ this.ldeviceOrgX = dox;
2325
+ };
2326
+ Transform.prototype.getDeviceOrgY = function() {
2327
+ return this.ldeviceOrgY;
2328
+ };
2329
+ Transform.prototype.setDeviceOrgY = function(doy) {
2330
+ this.ldeviceOrgY = doy;
2331
+ };
2332
+ Transform.prototype.getDeviceExtX = function() {
2333
+ return this.ldeviceExtX;
2334
+ };
2335
+ Transform.prototype.setDeviceExtX = function(dex) {
2336
+ this.ldeviceExtX = dex;
2337
+ };
2338
+ Transform.prototype.getDeviceExtY = function() {
2339
+ return this.ldeviceExtY;
2340
+ };
2341
+ Transform.prototype.setDeviceExtY = function(dey) {
2342
+ this.ldeviceExtY = dey;
2343
+ };
2344
+ Transform.prototype.transformX = function(x) {
2345
+ var xDevice = 0;
2346
+ var worldExtX = this.lworldExtX;
2347
+ if (worldExtX != 0) {
2348
+ xDevice = this.ldeviceOrgX + (x - this.lworldOrgX) * this.ldeviceExtX / worldExtX;
2349
+ }
2350
+ return xDevice;
2351
+ };
2352
+ Transform.prototype.transformY = function(y) {
2353
+ var yDevice = 0;
2354
+ var worldExtY = this.lworldExtY;
2355
+ if (worldExtY != 0) {
2356
+ yDevice = this.ldeviceOrgY + (y - this.lworldOrgY) * this.ldeviceExtY / worldExtY;
2357
+ }
2358
+ return yDevice;
2359
+ };
2360
+ Transform.prototype.inverseTransformX = function(x) {
2361
+ var xWorld = 0;
2362
+ var deviceExtX = this.ldeviceExtX;
2363
+ if (deviceExtX != 0) {
2364
+ xWorld = this.lworldOrgX + (x - this.ldeviceOrgX) * this.lworldExtX / deviceExtX;
2365
+ }
2366
+ return xWorld;
2367
+ };
2368
+ Transform.prototype.inverseTransformY = function(y) {
2369
+ var yWorld = 0;
2370
+ var deviceExtY = this.ldeviceExtY;
2371
+ if (deviceExtY != 0) {
2372
+ yWorld = this.lworldOrgY + (y - this.ldeviceOrgY) * this.lworldExtY / deviceExtY;
2373
+ }
2374
+ return yWorld;
2375
+ };
2376
+ Transform.prototype.inverseTransformPoint = function(inPoint) {
2377
+ var outPoint = new PointD(this.inverseTransformX(inPoint.x), this.inverseTransformY(inPoint.y));
2378
+ return outPoint;
2379
+ };
2380
+ module3.exports = Transform;
2381
+ },
2382
+ /* 18 */
2383
+ /***/
2384
+ function(module3, exports3, __webpack_require__) {
2385
+ function _toConsumableArray(arr) {
2386
+ if (Array.isArray(arr)) {
2387
+ for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {
2388
+ arr2[i] = arr[i];
2389
+ }
2390
+ return arr2;
2391
+ } else {
2392
+ return Array.from(arr);
2393
+ }
2394
+ }
2395
+ var Layout2 = __webpack_require__(15);
2396
+ var FDLayoutConstants = __webpack_require__(7);
2397
+ var LayoutConstants = __webpack_require__(0);
2398
+ var IGeometry = __webpack_require__(8);
2399
+ var IMath = __webpack_require__(9);
2400
+ function FDLayout() {
2401
+ Layout2.call(this);
2402
+ this.useSmartIdealEdgeLengthCalculation = FDLayoutConstants.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION;
2403
+ this.idealEdgeLength = FDLayoutConstants.DEFAULT_EDGE_LENGTH;
2404
+ this.springConstant = FDLayoutConstants.DEFAULT_SPRING_STRENGTH;
2405
+ this.repulsionConstant = FDLayoutConstants.DEFAULT_REPULSION_STRENGTH;
2406
+ this.gravityConstant = FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH;
2407
+ this.compoundGravityConstant = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH;
2408
+ this.gravityRangeFactor = FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR;
2409
+ this.compoundGravityRangeFactor = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR;
2410
+ this.displacementThresholdPerNode = 3 * FDLayoutConstants.DEFAULT_EDGE_LENGTH / 100;
2411
+ this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL;
2412
+ this.initialCoolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL;
2413
+ this.totalDisplacement = 0;
2414
+ this.oldTotalDisplacement = 0;
2415
+ this.maxIterations = FDLayoutConstants.MAX_ITERATIONS;
2416
+ }
2417
+ FDLayout.prototype = Object.create(Layout2.prototype);
2418
+ for (var prop in Layout2) {
2419
+ FDLayout[prop] = Layout2[prop];
2420
+ }
2421
+ FDLayout.prototype.initParameters = function() {
2422
+ Layout2.prototype.initParameters.call(this, arguments);
2423
+ this.totalIterations = 0;
2424
+ this.notAnimatedIterations = 0;
2425
+ this.useFRGridVariant = FDLayoutConstants.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION;
2426
+ this.grid = [];
2427
+ };
2428
+ FDLayout.prototype.calcIdealEdgeLengths = function() {
2429
+ var edge;
2430
+ var lcaDepth;
2431
+ var source;
2432
+ var target;
2433
+ var sizeOfSourceInLca;
2434
+ var sizeOfTargetInLca;
2435
+ var allEdges = this.getGraphManager().getAllEdges();
2436
+ for (var i = 0; i < allEdges.length; i++) {
2437
+ edge = allEdges[i];
2438
+ edge.idealLength = this.idealEdgeLength;
2439
+ if (edge.isInterGraph) {
2440
+ source = edge.getSource();
2441
+ target = edge.getTarget();
2442
+ sizeOfSourceInLca = edge.getSourceInLca().getEstimatedSize();
2443
+ sizeOfTargetInLca = edge.getTargetInLca().getEstimatedSize();
2444
+ if (this.useSmartIdealEdgeLengthCalculation) {
2445
+ edge.idealLength += sizeOfSourceInLca + sizeOfTargetInLca - 2 * LayoutConstants.SIMPLE_NODE_SIZE;
2446
+ }
2447
+ lcaDepth = edge.getLca().getInclusionTreeDepth();
2448
+ edge.idealLength += FDLayoutConstants.DEFAULT_EDGE_LENGTH * FDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR * (source.getInclusionTreeDepth() + target.getInclusionTreeDepth() - 2 * lcaDepth);
2449
+ }
2450
+ }
2451
+ };
2452
+ FDLayout.prototype.initSpringEmbedder = function() {
2453
+ var s = this.getAllNodes().length;
2454
+ if (this.incremental) {
2455
+ if (s > FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) {
2456
+ this.coolingFactor = Math.max(this.coolingFactor * FDLayoutConstants.COOLING_ADAPTATION_FACTOR, this.coolingFactor - (s - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) / (FDLayoutConstants.ADAPTATION_UPPER_NODE_LIMIT - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) * this.coolingFactor * (1 - FDLayoutConstants.COOLING_ADAPTATION_FACTOR));
2457
+ }
2458
+ this.maxNodeDisplacement = FDLayoutConstants.MAX_NODE_DISPLACEMENT_INCREMENTAL;
2459
+ } else {
2460
+ if (s > FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) {
2461
+ this.coolingFactor = Math.max(FDLayoutConstants.COOLING_ADAPTATION_FACTOR, 1 - (s - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) / (FDLayoutConstants.ADAPTATION_UPPER_NODE_LIMIT - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) * (1 - FDLayoutConstants.COOLING_ADAPTATION_FACTOR));
2462
+ } else {
2463
+ this.coolingFactor = 1;
2464
+ }
2465
+ this.initialCoolingFactor = this.coolingFactor;
2466
+ this.maxNodeDisplacement = FDLayoutConstants.MAX_NODE_DISPLACEMENT;
2467
+ }
2468
+ this.maxIterations = Math.max(this.getAllNodes().length * 5, this.maxIterations);
2469
+ this.totalDisplacementThreshold = this.displacementThresholdPerNode * this.getAllNodes().length;
2470
+ this.repulsionRange = this.calcRepulsionRange();
2471
+ };
2472
+ FDLayout.prototype.calcSpringForces = function() {
2473
+ var lEdges = this.getAllEdges();
2474
+ var edge;
2475
+ for (var i = 0; i < lEdges.length; i++) {
2476
+ edge = lEdges[i];
2477
+ this.calcSpringForce(edge, edge.idealLength);
2478
+ }
2479
+ };
2480
+ FDLayout.prototype.calcRepulsionForces = function() {
2481
+ var gridUpdateAllowed = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true;
2482
+ var forceToNodeSurroundingUpdate = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
2483
+ var i, j;
2484
+ var nodeA, nodeB;
2485
+ var lNodes = this.getAllNodes();
2486
+ var processedNodeSet;
2487
+ if (this.useFRGridVariant) {
2488
+ if (this.totalIterations % FDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD == 1 && gridUpdateAllowed) {
2489
+ this.updateGrid();
2490
+ }
2491
+ processedNodeSet = /* @__PURE__ */ new Set();
2492
+ for (i = 0; i < lNodes.length; i++) {
2493
+ nodeA = lNodes[i];
2494
+ this.calculateRepulsionForceOfANode(nodeA, processedNodeSet, gridUpdateAllowed, forceToNodeSurroundingUpdate);
2495
+ processedNodeSet.add(nodeA);
2496
+ }
2497
+ } else {
2498
+ for (i = 0; i < lNodes.length; i++) {
2499
+ nodeA = lNodes[i];
2500
+ for (j = i + 1; j < lNodes.length; j++) {
2501
+ nodeB = lNodes[j];
2502
+ if (nodeA.getOwner() != nodeB.getOwner()) {
2503
+ continue;
2504
+ }
2505
+ this.calcRepulsionForce(nodeA, nodeB);
2506
+ }
2507
+ }
2508
+ }
2509
+ };
2510
+ FDLayout.prototype.calcGravitationalForces = function() {
2511
+ var node;
2512
+ var lNodes = this.getAllNodesToApplyGravitation();
2513
+ for (var i = 0; i < lNodes.length; i++) {
2514
+ node = lNodes[i];
2515
+ this.calcGravitationalForce(node);
2516
+ }
2517
+ };
2518
+ FDLayout.prototype.moveNodes = function() {
2519
+ var lNodes = this.getAllNodes();
2520
+ var node;
2521
+ for (var i = 0; i < lNodes.length; i++) {
2522
+ node = lNodes[i];
2523
+ node.move();
2524
+ }
2525
+ };
2526
+ FDLayout.prototype.calcSpringForce = function(edge, idealLength) {
2527
+ var sourceNode = edge.getSource();
2528
+ var targetNode = edge.getTarget();
2529
+ var length;
2530
+ var springForce;
2531
+ var springForceX;
2532
+ var springForceY;
2533
+ if (this.uniformLeafNodeSizes && sourceNode.getChild() == null && targetNode.getChild() == null) {
2534
+ edge.updateLengthSimple();
2535
+ } else {
2536
+ edge.updateLength();
2537
+ if (edge.isOverlapingSourceAndTarget) {
2538
+ return;
2539
+ }
2540
+ }
2541
+ length = edge.getLength();
2542
+ if (length == 0) return;
2543
+ springForce = this.springConstant * (length - idealLength);
2544
+ springForceX = springForce * (edge.lengthX / length);
2545
+ springForceY = springForce * (edge.lengthY / length);
2546
+ sourceNode.springForceX += springForceX;
2547
+ sourceNode.springForceY += springForceY;
2548
+ targetNode.springForceX -= springForceX;
2549
+ targetNode.springForceY -= springForceY;
2550
+ };
2551
+ FDLayout.prototype.calcRepulsionForce = function(nodeA, nodeB) {
2552
+ var rectA = nodeA.getRect();
2553
+ var rectB = nodeB.getRect();
2554
+ var overlapAmount = new Array(2);
2555
+ var clipPoints = new Array(4);
2556
+ var distanceX;
2557
+ var distanceY;
2558
+ var distanceSquared;
2559
+ var distance;
2560
+ var repulsionForce;
2561
+ var repulsionForceX;
2562
+ var repulsionForceY;
2563
+ if (rectA.intersects(rectB)) {
2564
+ IGeometry.calcSeparationAmount(rectA, rectB, overlapAmount, FDLayoutConstants.DEFAULT_EDGE_LENGTH / 2);
2565
+ repulsionForceX = 2 * overlapAmount[0];
2566
+ repulsionForceY = 2 * overlapAmount[1];
2567
+ var childrenConstant = nodeA.noOfChildren * nodeB.noOfChildren / (nodeA.noOfChildren + nodeB.noOfChildren);
2568
+ nodeA.repulsionForceX -= childrenConstant * repulsionForceX;
2569
+ nodeA.repulsionForceY -= childrenConstant * repulsionForceY;
2570
+ nodeB.repulsionForceX += childrenConstant * repulsionForceX;
2571
+ nodeB.repulsionForceY += childrenConstant * repulsionForceY;
2572
+ } else {
2573
+ if (this.uniformLeafNodeSizes && nodeA.getChild() == null && nodeB.getChild() == null) {
2574
+ distanceX = rectB.getCenterX() - rectA.getCenterX();
2575
+ distanceY = rectB.getCenterY() - rectA.getCenterY();
2576
+ } else {
2577
+ IGeometry.getIntersection(rectA, rectB, clipPoints);
2578
+ distanceX = clipPoints[2] - clipPoints[0];
2579
+ distanceY = clipPoints[3] - clipPoints[1];
2580
+ }
2581
+ if (Math.abs(distanceX) < FDLayoutConstants.MIN_REPULSION_DIST) {
2582
+ distanceX = IMath.sign(distanceX) * FDLayoutConstants.MIN_REPULSION_DIST;
2583
+ }
2584
+ if (Math.abs(distanceY) < FDLayoutConstants.MIN_REPULSION_DIST) {
2585
+ distanceY = IMath.sign(distanceY) * FDLayoutConstants.MIN_REPULSION_DIST;
2586
+ }
2587
+ distanceSquared = distanceX * distanceX + distanceY * distanceY;
2588
+ distance = Math.sqrt(distanceSquared);
2589
+ repulsionForce = this.repulsionConstant * nodeA.noOfChildren * nodeB.noOfChildren / distanceSquared;
2590
+ repulsionForceX = repulsionForce * distanceX / distance;
2591
+ repulsionForceY = repulsionForce * distanceY / distance;
2592
+ nodeA.repulsionForceX -= repulsionForceX;
2593
+ nodeA.repulsionForceY -= repulsionForceY;
2594
+ nodeB.repulsionForceX += repulsionForceX;
2595
+ nodeB.repulsionForceY += repulsionForceY;
2596
+ }
2597
+ };
2598
+ FDLayout.prototype.calcGravitationalForce = function(node) {
2599
+ var ownerGraph;
2600
+ var ownerCenterX;
2601
+ var ownerCenterY;
2602
+ var distanceX;
2603
+ var distanceY;
2604
+ var absDistanceX;
2605
+ var absDistanceY;
2606
+ var estimatedSize;
2607
+ ownerGraph = node.getOwner();
2608
+ ownerCenterX = (ownerGraph.getRight() + ownerGraph.getLeft()) / 2;
2609
+ ownerCenterY = (ownerGraph.getTop() + ownerGraph.getBottom()) / 2;
2610
+ distanceX = node.getCenterX() - ownerCenterX;
2611
+ distanceY = node.getCenterY() - ownerCenterY;
2612
+ absDistanceX = Math.abs(distanceX) + node.getWidth() / 2;
2613
+ absDistanceY = Math.abs(distanceY) + node.getHeight() / 2;
2614
+ if (node.getOwner() == this.graphManager.getRoot()) {
2615
+ estimatedSize = ownerGraph.getEstimatedSize() * this.gravityRangeFactor;
2616
+ if (absDistanceX > estimatedSize || absDistanceY > estimatedSize) {
2617
+ node.gravitationForceX = -this.gravityConstant * distanceX;
2618
+ node.gravitationForceY = -this.gravityConstant * distanceY;
2619
+ }
2620
+ } else {
2621
+ estimatedSize = ownerGraph.getEstimatedSize() * this.compoundGravityRangeFactor;
2622
+ if (absDistanceX > estimatedSize || absDistanceY > estimatedSize) {
2623
+ node.gravitationForceX = -this.gravityConstant * distanceX * this.compoundGravityConstant;
2624
+ node.gravitationForceY = -this.gravityConstant * distanceY * this.compoundGravityConstant;
2625
+ }
2626
+ }
2627
+ };
2628
+ FDLayout.prototype.isConverged = function() {
2629
+ var converged;
2630
+ var oscilating = false;
2631
+ if (this.totalIterations > this.maxIterations / 3) {
2632
+ oscilating = Math.abs(this.totalDisplacement - this.oldTotalDisplacement) < 2;
2633
+ }
2634
+ converged = this.totalDisplacement < this.totalDisplacementThreshold;
2635
+ this.oldTotalDisplacement = this.totalDisplacement;
2636
+ return converged || oscilating;
2637
+ };
2638
+ FDLayout.prototype.animate = function() {
2639
+ if (this.animationDuringLayout && !this.isSubLayout) {
2640
+ if (this.notAnimatedIterations == this.animationPeriod) {
2641
+ this.update();
2642
+ this.notAnimatedIterations = 0;
2643
+ } else {
2644
+ this.notAnimatedIterations++;
2645
+ }
2646
+ }
2647
+ };
2648
+ FDLayout.prototype.calcNoOfChildrenForAllNodes = function() {
2649
+ var node;
2650
+ var allNodes = this.graphManager.getAllNodes();
2651
+ for (var i = 0; i < allNodes.length; i++) {
2652
+ node = allNodes[i];
2653
+ node.noOfChildren = node.getNoOfChildren();
2654
+ }
2655
+ };
2656
+ FDLayout.prototype.calcGrid = function(graph) {
2657
+ var sizeX = 0;
2658
+ var sizeY = 0;
2659
+ sizeX = parseInt(Math.ceil((graph.getRight() - graph.getLeft()) / this.repulsionRange));
2660
+ sizeY = parseInt(Math.ceil((graph.getBottom() - graph.getTop()) / this.repulsionRange));
2661
+ var grid = new Array(sizeX);
2662
+ for (var i = 0; i < sizeX; i++) {
2663
+ grid[i] = new Array(sizeY);
2664
+ }
2665
+ for (var i = 0; i < sizeX; i++) {
2666
+ for (var j = 0; j < sizeY; j++) {
2667
+ grid[i][j] = new Array();
2668
+ }
2669
+ }
2670
+ return grid;
2671
+ };
2672
+ FDLayout.prototype.addNodeToGrid = function(v, left, top) {
2673
+ var startX = 0;
2674
+ var finishX = 0;
2675
+ var startY = 0;
2676
+ var finishY = 0;
2677
+ startX = parseInt(Math.floor((v.getRect().x - left) / this.repulsionRange));
2678
+ finishX = parseInt(Math.floor((v.getRect().width + v.getRect().x - left) / this.repulsionRange));
2679
+ startY = parseInt(Math.floor((v.getRect().y - top) / this.repulsionRange));
2680
+ finishY = parseInt(Math.floor((v.getRect().height + v.getRect().y - top) / this.repulsionRange));
2681
+ for (var i = startX; i <= finishX; i++) {
2682
+ for (var j = startY; j <= finishY; j++) {
2683
+ this.grid[i][j].push(v);
2684
+ v.setGridCoordinates(startX, finishX, startY, finishY);
2685
+ }
2686
+ }
2687
+ };
2688
+ FDLayout.prototype.updateGrid = function() {
2689
+ var i;
2690
+ var nodeA;
2691
+ var lNodes = this.getAllNodes();
2692
+ this.grid = this.calcGrid(this.graphManager.getRoot());
2693
+ for (i = 0; i < lNodes.length; i++) {
2694
+ nodeA = lNodes[i];
2695
+ this.addNodeToGrid(nodeA, this.graphManager.getRoot().getLeft(), this.graphManager.getRoot().getTop());
2696
+ }
2697
+ };
2698
+ FDLayout.prototype.calculateRepulsionForceOfANode = function(nodeA, processedNodeSet, gridUpdateAllowed, forceToNodeSurroundingUpdate) {
2699
+ if (this.totalIterations % FDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD == 1 && gridUpdateAllowed || forceToNodeSurroundingUpdate) {
2700
+ var surrounding = /* @__PURE__ */ new Set();
2701
+ nodeA.surrounding = new Array();
2702
+ var nodeB;
2703
+ var grid = this.grid;
2704
+ for (var i = nodeA.startX - 1; i < nodeA.finishX + 2; i++) {
2705
+ for (var j = nodeA.startY - 1; j < nodeA.finishY + 2; j++) {
2706
+ if (!(i < 0 || j < 0 || i >= grid.length || j >= grid[0].length)) {
2707
+ for (var k = 0; k < grid[i][j].length; k++) {
2708
+ nodeB = grid[i][j][k];
2709
+ if (nodeA.getOwner() != nodeB.getOwner() || nodeA == nodeB) {
2710
+ continue;
2711
+ }
2712
+ if (!processedNodeSet.has(nodeB) && !surrounding.has(nodeB)) {
2713
+ var distanceX = Math.abs(nodeA.getCenterX() - nodeB.getCenterX()) - (nodeA.getWidth() / 2 + nodeB.getWidth() / 2);
2714
+ var distanceY = Math.abs(nodeA.getCenterY() - nodeB.getCenterY()) - (nodeA.getHeight() / 2 + nodeB.getHeight() / 2);
2715
+ if (distanceX <= this.repulsionRange && distanceY <= this.repulsionRange) {
2716
+ surrounding.add(nodeB);
2717
+ }
2718
+ }
2719
+ }
2720
+ }
2721
+ }
2722
+ }
2723
+ nodeA.surrounding = [].concat(_toConsumableArray(surrounding));
2724
+ }
2725
+ for (i = 0; i < nodeA.surrounding.length; i++) {
2726
+ this.calcRepulsionForce(nodeA, nodeA.surrounding[i]);
2727
+ }
2728
+ };
2729
+ FDLayout.prototype.calcRepulsionRange = function() {
2730
+ return 0;
2731
+ };
2732
+ module3.exports = FDLayout;
2733
+ },
2734
+ /* 19 */
2735
+ /***/
2736
+ function(module3, exports3, __webpack_require__) {
2737
+ var LEdge = __webpack_require__(1);
2738
+ var FDLayoutConstants = __webpack_require__(7);
2739
+ function FDLayoutEdge(source, target, vEdge) {
2740
+ LEdge.call(this, source, target, vEdge);
2741
+ this.idealLength = FDLayoutConstants.DEFAULT_EDGE_LENGTH;
2742
+ }
2743
+ FDLayoutEdge.prototype = Object.create(LEdge.prototype);
2744
+ for (var prop in LEdge) {
2745
+ FDLayoutEdge[prop] = LEdge[prop];
2746
+ }
2747
+ module3.exports = FDLayoutEdge;
2748
+ },
2749
+ /* 20 */
2750
+ /***/
2751
+ function(module3, exports3, __webpack_require__) {
2752
+ var LNode = __webpack_require__(3);
2753
+ function FDLayoutNode(gm, loc, size, vNode) {
2754
+ LNode.call(this, gm, loc, size, vNode);
2755
+ this.springForceX = 0;
2756
+ this.springForceY = 0;
2757
+ this.repulsionForceX = 0;
2758
+ this.repulsionForceY = 0;
2759
+ this.gravitationForceX = 0;
2760
+ this.gravitationForceY = 0;
2761
+ this.displacementX = 0;
2762
+ this.displacementY = 0;
2763
+ this.startX = 0;
2764
+ this.finishX = 0;
2765
+ this.startY = 0;
2766
+ this.finishY = 0;
2767
+ this.surrounding = [];
2768
+ }
2769
+ FDLayoutNode.prototype = Object.create(LNode.prototype);
2770
+ for (var prop in LNode) {
2771
+ FDLayoutNode[prop] = LNode[prop];
2772
+ }
2773
+ FDLayoutNode.prototype.setGridCoordinates = function(_startX, _finishX, _startY, _finishY) {
2774
+ this.startX = _startX;
2775
+ this.finishX = _finishX;
2776
+ this.startY = _startY;
2777
+ this.finishY = _finishY;
2778
+ };
2779
+ module3.exports = FDLayoutNode;
2780
+ },
2781
+ /* 21 */
2782
+ /***/
2783
+ function(module3, exports3, __webpack_require__) {
2784
+ function DimensionD2(width, height) {
2785
+ this.width = 0;
2786
+ this.height = 0;
2787
+ if (width !== null && height !== null) {
2788
+ this.height = height;
2789
+ this.width = width;
2790
+ }
2791
+ }
2792
+ DimensionD2.prototype.getWidth = function() {
2793
+ return this.width;
2794
+ };
2795
+ DimensionD2.prototype.setWidth = function(width) {
2796
+ this.width = width;
2797
+ };
2798
+ DimensionD2.prototype.getHeight = function() {
2799
+ return this.height;
2800
+ };
2801
+ DimensionD2.prototype.setHeight = function(height) {
2802
+ this.height = height;
2803
+ };
2804
+ module3.exports = DimensionD2;
2805
+ },
2806
+ /* 22 */
2807
+ /***/
2808
+ function(module3, exports3, __webpack_require__) {
2809
+ var UniqueIDGeneretor = __webpack_require__(14);
2810
+ function HashMap() {
2811
+ this.map = {};
2812
+ this.keys = [];
2813
+ }
2814
+ HashMap.prototype.put = function(key, value) {
2815
+ var theId = UniqueIDGeneretor.createID(key);
2816
+ if (!this.contains(theId)) {
2817
+ this.map[theId] = value;
2818
+ this.keys.push(key);
2819
+ }
2820
+ };
2821
+ HashMap.prototype.contains = function(key) {
2822
+ UniqueIDGeneretor.createID(key);
2823
+ return this.map[key] != null;
2824
+ };
2825
+ HashMap.prototype.get = function(key) {
2826
+ var theId = UniqueIDGeneretor.createID(key);
2827
+ return this.map[theId];
2828
+ };
2829
+ HashMap.prototype.keySet = function() {
2830
+ return this.keys;
2831
+ };
2832
+ module3.exports = HashMap;
2833
+ },
2834
+ /* 23 */
2835
+ /***/
2836
+ function(module3, exports3, __webpack_require__) {
2837
+ var UniqueIDGeneretor = __webpack_require__(14);
2838
+ function HashSet() {
2839
+ this.set = {};
2840
+ }
2841
+ HashSet.prototype.add = function(obj) {
2842
+ var theId = UniqueIDGeneretor.createID(obj);
2843
+ if (!this.contains(theId)) this.set[theId] = obj;
2844
+ };
2845
+ HashSet.prototype.remove = function(obj) {
2846
+ delete this.set[UniqueIDGeneretor.createID(obj)];
2847
+ };
2848
+ HashSet.prototype.clear = function() {
2849
+ this.set = {};
2850
+ };
2851
+ HashSet.prototype.contains = function(obj) {
2852
+ return this.set[UniqueIDGeneretor.createID(obj)] == obj;
2853
+ };
2854
+ HashSet.prototype.isEmpty = function() {
2855
+ return this.size() === 0;
2856
+ };
2857
+ HashSet.prototype.size = function() {
2858
+ return Object.keys(this.set).length;
2859
+ };
2860
+ HashSet.prototype.addAllTo = function(list) {
2861
+ var keys = Object.keys(this.set);
2862
+ var length = keys.length;
2863
+ for (var i = 0; i < length; i++) {
2864
+ list.push(this.set[keys[i]]);
2865
+ }
2866
+ };
2867
+ HashSet.prototype.size = function() {
2868
+ return Object.keys(this.set).length;
2869
+ };
2870
+ HashSet.prototype.addAll = function(list) {
2871
+ var s = list.length;
2872
+ for (var i = 0; i < s; i++) {
2873
+ var v = list[i];
2874
+ this.add(v);
2875
+ }
2876
+ };
2877
+ module3.exports = HashSet;
2878
+ },
2879
+ /* 24 */
2880
+ /***/
2881
+ function(module3, exports3, __webpack_require__) {
2882
+ var _createClass = /* @__PURE__ */ function() {
2883
+ function defineProperties(target, props) {
2884
+ for (var i = 0; i < props.length; i++) {
2885
+ var descriptor = props[i];
2886
+ descriptor.enumerable = descriptor.enumerable || false;
2887
+ descriptor.configurable = true;
2888
+ if ("value" in descriptor) descriptor.writable = true;
2889
+ Object.defineProperty(target, descriptor.key, descriptor);
2890
+ }
2891
+ }
2892
+ return function(Constructor, protoProps, staticProps) {
2893
+ if (protoProps) defineProperties(Constructor.prototype, protoProps);
2894
+ if (staticProps) defineProperties(Constructor, staticProps);
2895
+ return Constructor;
2896
+ };
2897
+ }();
2898
+ function _classCallCheck(instance, Constructor) {
2899
+ if (!(instance instanceof Constructor)) {
2900
+ throw new TypeError("Cannot call a class as a function");
2901
+ }
2902
+ }
2903
+ var LinkedList = __webpack_require__(11);
2904
+ var Quicksort = function() {
2905
+ function Quicksort2(A, compareFunction) {
2906
+ _classCallCheck(this, Quicksort2);
2907
+ if (compareFunction !== null || compareFunction !== void 0) this.compareFunction = this._defaultCompareFunction;
2908
+ var length = void 0;
2909
+ if (A instanceof LinkedList) length = A.size();
2910
+ else length = A.length;
2911
+ this._quicksort(A, 0, length - 1);
2912
+ }
2913
+ _createClass(Quicksort2, [{
2914
+ key: "_quicksort",
2915
+ value: function _quicksort(A, p, r) {
2916
+ if (p < r) {
2917
+ var q = this._partition(A, p, r);
2918
+ this._quicksort(A, p, q);
2919
+ this._quicksort(A, q + 1, r);
2920
+ }
2921
+ }
2922
+ }, {
2923
+ key: "_partition",
2924
+ value: function _partition(A, p, r) {
2925
+ var x = this._get(A, p);
2926
+ var i = p;
2927
+ var j = r;
2928
+ while (true) {
2929
+ while (this.compareFunction(x, this._get(A, j))) {
2930
+ j--;
2931
+ }
2932
+ while (this.compareFunction(this._get(A, i), x)) {
2933
+ i++;
2934
+ }
2935
+ if (i < j) {
2936
+ this._swap(A, i, j);
2937
+ i++;
2938
+ j--;
2939
+ } else return j;
2940
+ }
2941
+ }
2942
+ }, {
2943
+ key: "_get",
2944
+ value: function _get(object, index) {
2945
+ if (object instanceof LinkedList) return object.get_object_at(index);
2946
+ else return object[index];
2947
+ }
2948
+ }, {
2949
+ key: "_set",
2950
+ value: function _set(object, index, value) {
2951
+ if (object instanceof LinkedList) object.set_object_at(index, value);
2952
+ else object[index] = value;
2953
+ }
2954
+ }, {
2955
+ key: "_swap",
2956
+ value: function _swap(A, i, j) {
2957
+ var temp = this._get(A, i);
2958
+ this._set(A, i, this._get(A, j));
2959
+ this._set(A, j, temp);
2960
+ }
2961
+ }, {
2962
+ key: "_defaultCompareFunction",
2963
+ value: function _defaultCompareFunction(a, b) {
2964
+ return b > a;
2965
+ }
2966
+ }]);
2967
+ return Quicksort2;
2968
+ }();
2969
+ module3.exports = Quicksort;
2970
+ },
2971
+ /* 25 */
2972
+ /***/
2973
+ function(module3, exports3, __webpack_require__) {
2974
+ var _createClass = /* @__PURE__ */ function() {
2975
+ function defineProperties(target, props) {
2976
+ for (var i = 0; i < props.length; i++) {
2977
+ var descriptor = props[i];
2978
+ descriptor.enumerable = descriptor.enumerable || false;
2979
+ descriptor.configurable = true;
2980
+ if ("value" in descriptor) descriptor.writable = true;
2981
+ Object.defineProperty(target, descriptor.key, descriptor);
2982
+ }
2983
+ }
2984
+ return function(Constructor, protoProps, staticProps) {
2985
+ if (protoProps) defineProperties(Constructor.prototype, protoProps);
2986
+ if (staticProps) defineProperties(Constructor, staticProps);
2987
+ return Constructor;
2988
+ };
2989
+ }();
2990
+ function _classCallCheck(instance, Constructor) {
2991
+ if (!(instance instanceof Constructor)) {
2992
+ throw new TypeError("Cannot call a class as a function");
2993
+ }
2994
+ }
2995
+ var NeedlemanWunsch = function() {
2996
+ function NeedlemanWunsch2(sequence1, sequence2) {
2997
+ var match_score = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1;
2998
+ var mismatch_penalty = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : -1;
2999
+ var gap_penalty = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : -1;
3000
+ _classCallCheck(this, NeedlemanWunsch2);
3001
+ this.sequence1 = sequence1;
3002
+ this.sequence2 = sequence2;
3003
+ this.match_score = match_score;
3004
+ this.mismatch_penalty = mismatch_penalty;
3005
+ this.gap_penalty = gap_penalty;
3006
+ this.iMax = sequence1.length + 1;
3007
+ this.jMax = sequence2.length + 1;
3008
+ this.grid = new Array(this.iMax);
3009
+ for (var i = 0; i < this.iMax; i++) {
3010
+ this.grid[i] = new Array(this.jMax);
3011
+ for (var j = 0; j < this.jMax; j++) {
3012
+ this.grid[i][j] = 0;
3013
+ }
3014
+ }
3015
+ this.tracebackGrid = new Array(this.iMax);
3016
+ for (var _i = 0; _i < this.iMax; _i++) {
3017
+ this.tracebackGrid[_i] = new Array(this.jMax);
3018
+ for (var _j = 0; _j < this.jMax; _j++) {
3019
+ this.tracebackGrid[_i][_j] = [null, null, null];
3020
+ }
3021
+ }
3022
+ this.alignments = [];
3023
+ this.score = -1;
3024
+ this.computeGrids();
3025
+ }
3026
+ _createClass(NeedlemanWunsch2, [{
3027
+ key: "getScore",
3028
+ value: function getScore() {
3029
+ return this.score;
3030
+ }
3031
+ }, {
3032
+ key: "getAlignments",
3033
+ value: function getAlignments() {
3034
+ return this.alignments;
3035
+ }
3036
+ // Main dynamic programming procedure
3037
+ }, {
3038
+ key: "computeGrids",
3039
+ value: function computeGrids() {
3040
+ for (var j = 1; j < this.jMax; j++) {
3041
+ this.grid[0][j] = this.grid[0][j - 1] + this.gap_penalty;
3042
+ this.tracebackGrid[0][j] = [false, false, true];
3043
+ }
3044
+ for (var i = 1; i < this.iMax; i++) {
3045
+ this.grid[i][0] = this.grid[i - 1][0] + this.gap_penalty;
3046
+ this.tracebackGrid[i][0] = [false, true, false];
3047
+ }
3048
+ for (var _i2 = 1; _i2 < this.iMax; _i2++) {
3049
+ for (var _j2 = 1; _j2 < this.jMax; _j2++) {
3050
+ var diag = void 0;
3051
+ if (this.sequence1[_i2 - 1] === this.sequence2[_j2 - 1]) diag = this.grid[_i2 - 1][_j2 - 1] + this.match_score;
3052
+ else diag = this.grid[_i2 - 1][_j2 - 1] + this.mismatch_penalty;
3053
+ var up = this.grid[_i2 - 1][_j2] + this.gap_penalty;
3054
+ var left = this.grid[_i2][_j2 - 1] + this.gap_penalty;
3055
+ var maxOf = [diag, up, left];
3056
+ var indices = this.arrayAllMaxIndexes(maxOf);
3057
+ this.grid[_i2][_j2] = maxOf[indices[0]];
3058
+ this.tracebackGrid[_i2][_j2] = [indices.includes(0), indices.includes(1), indices.includes(2)];
3059
+ }
3060
+ }
3061
+ this.score = this.grid[this.iMax - 1][this.jMax - 1];
3062
+ }
3063
+ // Gets all possible valid sequence combinations
3064
+ }, {
3065
+ key: "alignmentTraceback",
3066
+ value: function alignmentTraceback() {
3067
+ var inProcessAlignments = [];
3068
+ inProcessAlignments.push({
3069
+ pos: [this.sequence1.length, this.sequence2.length],
3070
+ seq1: "",
3071
+ seq2: ""
3072
+ });
3073
+ while (inProcessAlignments[0]) {
3074
+ var current = inProcessAlignments[0];
3075
+ var directions = this.tracebackGrid[current.pos[0]][current.pos[1]];
3076
+ if (directions[0]) {
3077
+ inProcessAlignments.push({
3078
+ pos: [current.pos[0] - 1, current.pos[1] - 1],
3079
+ seq1: this.sequence1[current.pos[0] - 1] + current.seq1,
3080
+ seq2: this.sequence2[current.pos[1] - 1] + current.seq2
3081
+ });
3082
+ }
3083
+ if (directions[1]) {
3084
+ inProcessAlignments.push({
3085
+ pos: [current.pos[0] - 1, current.pos[1]],
3086
+ seq1: this.sequence1[current.pos[0] - 1] + current.seq1,
3087
+ seq2: "-" + current.seq2
3088
+ });
3089
+ }
3090
+ if (directions[2]) {
3091
+ inProcessAlignments.push({
3092
+ pos: [current.pos[0], current.pos[1] - 1],
3093
+ seq1: "-" + current.seq1,
3094
+ seq2: this.sequence2[current.pos[1] - 1] + current.seq2
3095
+ });
3096
+ }
3097
+ if (current.pos[0] === 0 && current.pos[1] === 0) this.alignments.push({
3098
+ sequence1: current.seq1,
3099
+ sequence2: current.seq2
3100
+ });
3101
+ inProcessAlignments.shift();
3102
+ }
3103
+ return this.alignments;
3104
+ }
3105
+ // Helper Functions
3106
+ }, {
3107
+ key: "getAllIndexes",
3108
+ value: function getAllIndexes(arr, val) {
3109
+ var indexes = [], i = -1;
3110
+ while ((i = arr.indexOf(val, i + 1)) !== -1) {
3111
+ indexes.push(i);
3112
+ }
3113
+ return indexes;
3114
+ }
3115
+ }, {
3116
+ key: "arrayAllMaxIndexes",
3117
+ value: function arrayAllMaxIndexes(array) {
3118
+ return this.getAllIndexes(array, Math.max.apply(null, array));
3119
+ }
3120
+ }]);
3121
+ return NeedlemanWunsch2;
3122
+ }();
3123
+ module3.exports = NeedlemanWunsch;
3124
+ },
3125
+ /* 26 */
3126
+ /***/
3127
+ function(module3, exports3, __webpack_require__) {
3128
+ var layoutBase2 = function layoutBase3() {
3129
+ return;
3130
+ };
3131
+ layoutBase2.FDLayout = __webpack_require__(18);
3132
+ layoutBase2.FDLayoutConstants = __webpack_require__(7);
3133
+ layoutBase2.FDLayoutEdge = __webpack_require__(19);
3134
+ layoutBase2.FDLayoutNode = __webpack_require__(20);
3135
+ layoutBase2.DimensionD = __webpack_require__(21);
3136
+ layoutBase2.HashMap = __webpack_require__(22);
3137
+ layoutBase2.HashSet = __webpack_require__(23);
3138
+ layoutBase2.IGeometry = __webpack_require__(8);
3139
+ layoutBase2.IMath = __webpack_require__(9);
3140
+ layoutBase2.Integer = __webpack_require__(10);
3141
+ layoutBase2.Point = __webpack_require__(12);
3142
+ layoutBase2.PointD = __webpack_require__(4);
3143
+ layoutBase2.RandomSeed = __webpack_require__(16);
3144
+ layoutBase2.RectangleD = __webpack_require__(13);
3145
+ layoutBase2.Transform = __webpack_require__(17);
3146
+ layoutBase2.UniqueIDGeneretor = __webpack_require__(14);
3147
+ layoutBase2.Quicksort = __webpack_require__(24);
3148
+ layoutBase2.LinkedList = __webpack_require__(11);
3149
+ layoutBase2.LGraphObject = __webpack_require__(2);
3150
+ layoutBase2.LGraph = __webpack_require__(5);
3151
+ layoutBase2.LEdge = __webpack_require__(1);
3152
+ layoutBase2.LGraphManager = __webpack_require__(6);
3153
+ layoutBase2.LNode = __webpack_require__(3);
3154
+ layoutBase2.Layout = __webpack_require__(15);
3155
+ layoutBase2.LayoutConstants = __webpack_require__(0);
3156
+ layoutBase2.NeedlemanWunsch = __webpack_require__(25);
3157
+ module3.exports = layoutBase2;
3158
+ },
3159
+ /* 27 */
3160
+ /***/
3161
+ function(module3, exports3, __webpack_require__) {
3162
+ function Emitter() {
3163
+ this.listeners = [];
3164
+ }
3165
+ var p = Emitter.prototype;
3166
+ p.addListener = function(event, callback) {
3167
+ this.listeners.push({
3168
+ event,
3169
+ callback
3170
+ });
3171
+ };
3172
+ p.removeListener = function(event, callback) {
3173
+ for (var i = this.listeners.length; i >= 0; i--) {
3174
+ var l = this.listeners[i];
3175
+ if (l.event === event && l.callback === callback) {
3176
+ this.listeners.splice(i, 1);
3177
+ }
3178
+ }
3179
+ };
3180
+ p.emit = function(event, data) {
3181
+ for (var i = 0; i < this.listeners.length; i++) {
3182
+ var l = this.listeners[i];
3183
+ if (event === l.event) {
3184
+ l.callback(data);
3185
+ }
3186
+ }
3187
+ };
3188
+ module3.exports = Emitter;
3189
+ }
3190
+ /******/
3191
+ ])
3192
+ );
3193
+ });
3194
+ })(layoutBase$1.__module);
3195
+ return layoutBase$1.__module.exports;
3196
+ }
3197
+ exports.__require = requireLayoutBase;