paul-ai-assistant 0.1.16

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 (512) hide show
  1. package/README.md +249 -0
  2. package/dist/1.async.js +61 -0
  3. package/dist/1013.async.js +1 -0
  4. package/dist/123.async.js +258 -0
  5. package/dist/1387.async.js +321 -0
  6. package/dist/1481.async.js +1 -0
  7. package/dist/1548.async.js +2 -0
  8. package/dist/1815.async.js +3 -0
  9. package/dist/1819.async.js +1 -0
  10. package/dist/1851.async.js +1 -0
  11. package/dist/2491.async.js +132 -0
  12. package/dist/2517.async.js +247 -0
  13. package/dist/2678.async.js +1 -0
  14. package/dist/2856.async.js +267 -0
  15. package/dist/295.async.js +1 -0
  16. package/dist/3098.async.js +1 -0
  17. package/dist/3138.async.js +1 -0
  18. package/dist/34.async.js +137 -0
  19. package/dist/3472.async.js +1 -0
  20. package/dist/3614.async.js +25 -0
  21. package/dist/3959.async.js +69 -0
  22. package/dist/404.html +44 -0
  23. package/dist/4484.async.js +10 -0
  24. package/dist/4498.async.js +37 -0
  25. package/dist/4911.async.js +1 -0
  26. package/dist/4927.async.js +104 -0
  27. package/dist/5067.async.js +44 -0
  28. package/dist/5588.async.js +8 -0
  29. package/dist/5754.async.js +5 -0
  30. package/dist/6254.async.js +30286 -0
  31. package/dist/6355.async.js +10 -0
  32. package/dist/6662.async.js +177 -0
  33. package/dist/6680.async.js +2615 -0
  34. package/dist/6690.async.js +153 -0
  35. package/dist/7267.async.js +31 -0
  36. package/dist/7329.async.js +180 -0
  37. package/dist/7718.async.js +61 -0
  38. package/dist/7762.async.js +3 -0
  39. package/dist/7787.async.js +7 -0
  40. package/dist/7929.async.js +1 -0
  41. package/dist/8164.async.js +1 -0
  42. package/dist/834.async.js +221 -0
  43. package/dist/8456.async.js +146 -0
  44. package/dist/8542.async.js +25 -0
  45. package/dist/8749.async.js +1 -0
  46. package/dist/8914.async.js +66 -0
  47. package/dist/9570.async.js +65 -0
  48. package/dist/9725.async.js +18 -0
  49. package/dist/components/llm-trace-v2/index.html +44 -0
  50. package/dist/components/llm-trace-v3/index.html +44 -0
  51. package/dist/components/llm-trace-v3-advanced/index.html +44 -0
  52. package/dist/components/llm-trace-v3-examples/index.html +44 -0
  53. package/dist/components/llm-trace-v3-visual-demos/index.html +44 -0
  54. package/dist/demos.async.js +594 -0
  55. package/dist/demos__index.md.async.js +1 -0
  56. package/dist/demos__markdown-latex-mermaid__index.md.async.js +1 -0
  57. package/dist/demos__toolChatType__index.md.async.js +1 -0
  58. package/dist/docs/index.html +44 -0
  59. package/dist/docs__components__llm-trace-v2.md.async.js +1 -0
  60. package/dist/docs__components__llm-trace-v3-advanced.md.async.js +1 -0
  61. package/dist/docs__components__llm-trace-v3-examples.md.async.js +1 -0
  62. package/dist/docs__components__llm-trace-v3-visual-demos.md.async.js +1 -0
  63. package/dist/docs__components__llm-trace-v3.md.async.js +61 -0
  64. package/dist/docs__docs__index.md.async.js +108 -0
  65. package/dist/docs__index.md.async.js +1 -0
  66. package/dist/dumi__tmp-production__dumi__theme__ContextWrapper.async.js +1 -0
  67. package/dist/index.html +44 -0
  68. package/dist/markdown-latex-mermaid/index.html +44 -0
  69. package/dist/meta__demos.async.js +4272 -0
  70. package/dist/meta__docs.async.js +3416 -0
  71. package/dist/nm__dumi__dist__client__pages__404.async.js +29 -0
  72. package/dist/nm__dumi__dist__client__pages__Demo__index.async.js +5 -0
  73. package/dist/nm__dumi__theme-default__layouts__DocLayout__index.async.js +1 -0
  74. package/dist/preload_helper.js +1 -0
  75. package/dist/static/KaTeX_AMS-Regular.1608a09b.woff +0 -0
  76. package/dist/static/KaTeX_AMS-Regular.4aafdb68.ttf +0 -0
  77. package/dist/static/KaTeX_AMS-Regular.a79f1c31.woff2 +0 -0
  78. package/dist/static/KaTeX_Caligraphic-Bold.b6770918.woff +0 -0
  79. package/dist/static/KaTeX_Caligraphic-Bold.cce5b8ec.ttf +0 -0
  80. package/dist/static/KaTeX_Caligraphic-Bold.ec17d132.woff2 +0 -0
  81. package/dist/static/KaTeX_Caligraphic-Regular.07ef19e7.ttf +0 -0
  82. package/dist/static/KaTeX_Caligraphic-Regular.55fac258.woff2 +0 -0
  83. package/dist/static/KaTeX_Caligraphic-Regular.dad44a7f.woff +0 -0
  84. package/dist/static/KaTeX_Fraktur-Bold.9f256b85.woff +0 -0
  85. package/dist/static/KaTeX_Fraktur-Bold.b18f59e1.ttf +0 -0
  86. package/dist/static/KaTeX_Fraktur-Bold.d42a5579.woff2 +0 -0
  87. package/dist/static/KaTeX_Fraktur-Regular.7c187121.woff +0 -0
  88. package/dist/static/KaTeX_Fraktur-Regular.d3c882a6.woff2 +0 -0
  89. package/dist/static/KaTeX_Fraktur-Regular.ed38e79f.ttf +0 -0
  90. package/dist/static/KaTeX_Main-Bold.b74a1a8b.ttf +0 -0
  91. package/dist/static/KaTeX_Main-Bold.c3fb5ac2.woff2 +0 -0
  92. package/dist/static/KaTeX_Main-Bold.d181c465.woff +0 -0
  93. package/dist/static/KaTeX_Main-BoldItalic.6f2bb1df.woff2 +0 -0
  94. package/dist/static/KaTeX_Main-BoldItalic.70d8b0a5.ttf +0 -0
  95. package/dist/static/KaTeX_Main-BoldItalic.e3f82f9d.woff +0 -0
  96. package/dist/static/KaTeX_Main-Italic.47373d1e.ttf +0 -0
  97. package/dist/static/KaTeX_Main-Italic.8916142b.woff2 +0 -0
  98. package/dist/static/KaTeX_Main-Italic.9024d815.woff +0 -0
  99. package/dist/static/KaTeX_Main-Regular.0462f03b.woff2 +0 -0
  100. package/dist/static/KaTeX_Main-Regular.7f51fe03.woff +0 -0
  101. package/dist/static/KaTeX_Main-Regular.b7f8fe9b.ttf +0 -0
  102. package/dist/static/KaTeX_Math-BoldItalic.572d331f.woff2 +0 -0
  103. package/dist/static/KaTeX_Math-BoldItalic.a879cf83.ttf +0 -0
  104. package/dist/static/KaTeX_Math-BoldItalic.f1035d8d.woff +0 -0
  105. package/dist/static/KaTeX_Math-Italic.5295ba48.woff +0 -0
  106. package/dist/static/KaTeX_Math-Italic.939bc644.ttf +0 -0
  107. package/dist/static/KaTeX_Math-Italic.f28c23ac.woff2 +0 -0
  108. package/dist/static/KaTeX_SansSerif-Bold.8c5b5494.woff2 +0 -0
  109. package/dist/static/KaTeX_SansSerif-Bold.94e1e8dc.ttf +0 -0
  110. package/dist/static/KaTeX_SansSerif-Bold.bf59d231.woff +0 -0
  111. package/dist/static/KaTeX_SansSerif-Italic.3b1e59b3.woff2 +0 -0
  112. package/dist/static/KaTeX_SansSerif-Italic.7c9bc82b.woff +0 -0
  113. package/dist/static/KaTeX_SansSerif-Italic.b4c20c84.ttf +0 -0
  114. package/dist/static/KaTeX_SansSerif-Regular.74048478.woff +0 -0
  115. package/dist/static/KaTeX_SansSerif-Regular.ba21ed5f.woff2 +0 -0
  116. package/dist/static/KaTeX_SansSerif-Regular.d4d7ba48.ttf +0 -0
  117. package/dist/static/KaTeX_Script-Regular.03e9641d.woff2 +0 -0
  118. package/dist/static/KaTeX_Script-Regular.07505710.woff +0 -0
  119. package/dist/static/KaTeX_Script-Regular.fe9cbbe1.ttf +0 -0
  120. package/dist/static/KaTeX_Size1-Regular.e1e279cb.woff +0 -0
  121. package/dist/static/KaTeX_Size1-Regular.eae34984.woff2 +0 -0
  122. package/dist/static/KaTeX_Size1-Regular.fabc004a.ttf +0 -0
  123. package/dist/static/KaTeX_Size2-Regular.57727022.woff +0 -0
  124. package/dist/static/KaTeX_Size2-Regular.5916a24f.woff2 +0 -0
  125. package/dist/static/KaTeX_Size2-Regular.d6b476ec.ttf +0 -0
  126. package/dist/static/KaTeX_Size3-Regular.9acaf01c.woff +0 -0
  127. package/dist/static/KaTeX_Size3-Regular.a144ef58.ttf +0 -0
  128. package/dist/static/KaTeX_Size3-Regular.b4230e7e.woff2 +0 -0
  129. package/dist/static/KaTeX_Size4-Regular.10d95fd3.woff2 +0 -0
  130. package/dist/static/KaTeX_Size4-Regular.7a996c9d.woff +0 -0
  131. package/dist/static/KaTeX_Size4-Regular.fbccdabe.ttf +0 -0
  132. package/dist/static/KaTeX_Typewriter-Regular.6258592b.woff +0 -0
  133. package/dist/static/KaTeX_Typewriter-Regular.a8709e36.woff2 +0 -0
  134. package/dist/static/KaTeX_Typewriter-Regular.d97aaf4a.ttf +0 -0
  135. package/dist/tool-chat-type/index.html +44 -0
  136. package/dist/umi.js +1534 -0
  137. package/dist/~demos/:id/index.html +44 -0
  138. package/dist/~demos/demos-markdown-latex-mermaid-demo-markdown-latex-mermaid/index.html +44 -0
  139. package/dist/~demos/demos-tool-chat-type-demo-agentschemaformdemo/index.html +44 -0
  140. package/dist/~demos/demos-tool-chat-type-demo-assistant-drawer/index.html +44 -0
  141. package/dist/~demos/demos-tool-chat-type-demo-chat-input-demo/index.html +44 -0
  142. package/dist/~demos/demos-tool-chat-type-demo-chat-list-demo/index.html +44 -0
  143. package/dist/~demos/demos-tool-chat-type-demo-chat-scenario-demo/index.html +44 -0
  144. package/dist/~demos/demos-tool-chat-type-demo-schema-input/index.html +44 -0
  145. package/dist/~demos/demos-tool-chat-type-demo-toolchattype/index.html +44 -0
  146. package/dist/~demos/docs-components-llm-trace-v-2-demo-0/index.html +44 -0
  147. package/dist/~demos/docs-components-llm-trace-v-2-demo-1/index.html +44 -0
  148. package/dist/~demos/docs-components-llm-trace-v-2-demo-2/index.html +44 -0
  149. package/dist/~demos/docs-components-llm-trace-v-2-demo-3/index.html +44 -0
  150. package/dist/~demos/docs-components-llm-trace-v-2-demo-4/index.html +44 -0
  151. package/dist/~demos/docs-components-llm-trace-v-3-advanced-demo-0/index.html +44 -0
  152. package/dist/~demos/docs-components-llm-trace-v-3-advanced-demo-1/index.html +44 -0
  153. package/dist/~demos/docs-components-llm-trace-v-3-advanced-demo-2/index.html +44 -0
  154. package/dist/~demos/docs-components-llm-trace-v-3-advanced-demo-3/index.html +44 -0
  155. package/dist/~demos/docs-components-llm-trace-v-3-demo-0/index.html +44 -0
  156. package/dist/~demos/docs-components-llm-trace-v-3-demo-1/index.html +44 -0
  157. package/dist/~demos/docs-components-llm-trace-v-3-demo-2/index.html +44 -0
  158. package/dist/~demos/docs-components-llm-trace-v-3-demo-3/index.html +44 -0
  159. package/dist/~demos/docs-components-llm-trace-v-3-examples-demo-0/index.html +44 -0
  160. package/dist/~demos/docs-components-llm-trace-v-3-examples-demo-1/index.html +44 -0
  161. package/dist/~demos/docs-components-llm-trace-v-3-examples-demo-2/index.html +44 -0
  162. package/dist/~demos/docs-components-llm-trace-v-3-examples-demo-3/index.html +44 -0
  163. package/dist/~demos/docs-components-llm-trace-v-3-examples-demo-4/index.html +44 -0
  164. package/dist/~demos/docs-components-llm-trace-v-3-visual-demos-demo-0/index.html +44 -0
  165. package/dist/~demos/docs-components-llm-trace-v-3-visual-demos-demo-1/index.html +44 -0
  166. package/dist/~demos/docs-components-llm-trace-v-3-visual-demos-demo-2/index.html +44 -0
  167. package/dist/~demos/docs-components-llm-trace-v-3-visual-demos-demo-3/index.html +44 -0
  168. package/dist/~demos/docs-components-llm-trace-v-3-visual-demos-demo-4/index.html +44 -0
  169. package/dist/~demos/docs-components-llm-trace-v-3-visual-demos-demo-5/index.html +44 -0
  170. package/dist/~demos/docs-components-llm-trace-v-3-visual-demos-demo-6/index.html +44 -0
  171. package/dist/~demos/docs-components-llm-trace-v-3-visual-demos-demo-7/index.html +44 -0
  172. package/es/AssistantChat/AssistantChatApp/CardMatchRender/index.d.ts +8 -0
  173. package/es/AssistantChat/AssistantChatApp/CardMatchRender/index.js +124 -0
  174. package/es/AssistantChat/AssistantChatApp/OperationMatchRender/index.d.ts +9 -0
  175. package/es/AssistantChat/AssistantChatApp/OperationMatchRender/index.js +64 -0
  176. package/es/AssistantChat/AssistantChatApp/const.d.ts +51 -0
  177. package/es/AssistantChat/AssistantChatApp/const.js +105 -0
  178. package/es/AssistantChat/AssistantChatApp/index.d.ts +4 -0
  179. package/es/AssistantChat/AssistantChatApp/index.js +281 -0
  180. package/es/AssistantChat/AssistantChatApp/index.scss +327 -0
  181. package/es/AssistantChat/AssistantChatCard/AgentCardRender/TemplateCard.d.ts +3 -0
  182. package/es/AssistantChat/AssistantChatCard/AgentCardRender/TemplateCard.js +125 -0
  183. package/es/AssistantChat/AssistantChatCard/AgentCardRender/common/types.d.ts +3 -0
  184. package/es/AssistantChat/AssistantChatCard/AgentCardRender/common/types.js +1 -0
  185. package/es/AssistantChat/AssistantChatCard/AgentCardRender/component/TemplateHeader.d.ts +5 -0
  186. package/es/AssistantChat/AssistantChatCard/AgentCardRender/component/TemplateHeader.js +24 -0
  187. package/es/AssistantChat/AssistantChatCard/AgentCardRender/component/TemplateHtml.d.ts +7 -0
  188. package/es/AssistantChat/AssistantChatCard/AgentCardRender/component/TemplateHtml.js +58 -0
  189. package/es/AssistantChat/AssistantChatCard/AgentCardRender/component/TemplateParagraph.d.ts +3 -0
  190. package/es/AssistantChat/AssistantChatCard/AgentCardRender/component/TemplateParagraph.js +8 -0
  191. package/es/AssistantChat/AssistantChatCard/AgentCardRender/component/TemplateTitle.d.ts +3 -0
  192. package/es/AssistantChat/AssistantChatCard/AgentCardRender/component/TemplateTitle.js +9 -0
  193. package/es/AssistantChat/AssistantChatCard/AgentCardRender/component/TraceComponent.d.ts +3 -0
  194. package/es/AssistantChat/AssistantChatCard/AgentCardRender/component/TraceComponent.js +47 -0
  195. package/es/AssistantChat/AssistantChatCard/AgentCardRender/context/index.d.ts +29 -0
  196. package/es/AssistantChat/AssistantChatCard/AgentCardRender/context/index.js +95 -0
  197. package/es/AssistantChat/AssistantChatCard/AgentCardRender/index.d.ts +4 -0
  198. package/es/AssistantChat/AssistantChatCard/AgentCardRender/index.js +100 -0
  199. package/es/AssistantChat/AssistantChatCard/AgentCardRender/index.scss +18 -0
  200. package/es/AssistantChat/AssistantChatCard/AgentCardRender/utils.d.ts +2 -0
  201. package/es/AssistantChat/AssistantChatCard/AgentCardRender/utils.js +36 -0
  202. package/es/AssistantChat/AssistantChatCard/AgentCommonCard/index.d.ts +4 -0
  203. package/es/AssistantChat/AssistantChatCard/AgentCommonCard/index.js +95 -0
  204. package/es/AssistantChat/AssistantChatCard/AgentCommonCard/index.scss +20 -0
  205. package/es/AssistantChat/AssistantChatCard/AgentExecutionCard/index.d.ts +16 -0
  206. package/es/AssistantChat/AssistantChatCard/AgentExecutionCard/index.js +17 -0
  207. package/es/AssistantChat/AssistantChatCard/AgentExecutionCard/index.scss +99 -0
  208. package/es/AssistantChat/AssistantChatCard/LlmGenerateCard/index.d.ts +14 -0
  209. package/es/AssistantChat/AssistantChatCard/LlmGenerateCard/index.js +273 -0
  210. package/es/AssistantChat/AssistantChatCard/LlmGenerateCard/index.scss +101 -0
  211. package/es/AssistantChat/AssistantChatCard/LlmGenerateCardV5/index.d.ts +78 -0
  212. package/es/AssistantChat/AssistantChatCard/LlmGenerateCardV5/index.js +123 -0
  213. package/es/AssistantChat/AssistantChatCard/LlmGenerateCardV5/index.scss +12 -0
  214. package/es/AssistantChat/AssistantChatCard/OperationCard/AigcTipsRender/index.d.ts +7 -0
  215. package/es/AssistantChat/AssistantChatCard/OperationCard/AigcTipsRender/index.js +29 -0
  216. package/es/AssistantChat/AssistantChatCard/OperationCard/Copy/index.d.ts +7 -0
  217. package/es/AssistantChat/AssistantChatCard/OperationCard/Copy/index.js +64 -0
  218. package/es/AssistantChat/AssistantChatCard/OperationCard/CopyRequestId/index.d.ts +3 -0
  219. package/es/AssistantChat/AssistantChatCard/OperationCard/CopyRequestId/index.js +19 -0
  220. package/es/AssistantChat/AssistantChatCard/OperationCard/FeedBack/index.d.ts +11 -0
  221. package/es/AssistantChat/AssistantChatCard/OperationCard/FeedBack/index.js +91 -0
  222. package/es/AssistantChat/AssistantChatCard/OperationCard/ShareButton/index.d.ts +3 -0
  223. package/es/AssistantChat/AssistantChatCard/OperationCard/ShareButton/index.js +26 -0
  224. package/es/AssistantChat/AssistantChatCard/OperationCard/index.d.ts +4 -0
  225. package/es/AssistantChat/AssistantChatCard/OperationCard/index.js +43 -0
  226. package/es/AssistantChat/AssistantChatCard/OperationCard/index.scss +14 -0
  227. package/es/AssistantChat/AssistantChatCard/UserQueryCardRender/AttachmentsRender.d.ts +21 -0
  228. package/es/AssistantChat/AssistantChatCard/UserQueryCardRender/AttachmentsRender.js +141 -0
  229. package/es/AssistantChat/AssistantChatCard/UserQueryCardRender/ImageRender.d.ts +7 -0
  230. package/es/AssistantChat/AssistantChatCard/UserQueryCardRender/ImageRender.js +74 -0
  231. package/es/AssistantChat/AssistantChatCard/UserQueryCardRender/index.d.ts +8 -0
  232. package/es/AssistantChat/AssistantChatCard/UserQueryCardRender/index.js +54 -0
  233. package/es/AssistantChat/AssistantChatCard/UserQueryCardRender/index.scss +98 -0
  234. package/es/AssistantChat/AssistantChatCard/index.d.ts +5 -0
  235. package/es/AssistantChat/AssistantChatCard/index.js +10 -0
  236. package/es/AssistantChat/AssistantChatInput/index.d.ts +5 -0
  237. package/es/AssistantChat/AssistantChatInput/index.js +172 -0
  238. package/es/AssistantChat/AssistantChatInput/index.scss +85 -0
  239. package/es/AssistantChat/AssistantToolApp/const.d.ts +12 -0
  240. package/es/AssistantChat/AssistantToolApp/const.js +22 -0
  241. package/es/AssistantChat/AssistantToolApp/index.d.ts +4 -0
  242. package/es/AssistantChat/AssistantToolApp/index.js +159 -0
  243. package/es/AssistantChat/AssistantToolApp/index.scss +76 -0
  244. package/es/AssistantChat/AssistantToolExecutionApp/const.d.ts +7 -0
  245. package/es/AssistantChat/AssistantToolExecutionApp/const.js +23 -0
  246. package/es/AssistantChat/AssistantToolExecutionApp/index.d.ts +4 -0
  247. package/es/AssistantChat/AssistantToolExecutionApp/index.js +66 -0
  248. package/es/AssistantChat/AssistantToolExecutionApp/index.scss +39 -0
  249. package/es/AssistantChat/AssistentError/index.d.ts +5 -0
  250. package/es/AssistantChat/AssistentError/index.js +138 -0
  251. package/es/AssistantChat/index.d.ts +6 -0
  252. package/es/AssistantChat/index.js +166 -0
  253. package/es/AssistantChat/index.scss +30 -0
  254. package/es/AssistantChat/logCallback/aTagLog.d.ts +1 -0
  255. package/es/AssistantChat/logCallback/aTagLog.js +23 -0
  256. package/es/AssistantChat/logCallback/copyLog.d.ts +3 -0
  257. package/es/AssistantChat/logCallback/copyLog.js +63 -0
  258. package/es/ErrorBoundary/ErrorBoundaryFallback/index.d.ts +5 -0
  259. package/es/ErrorBoundary/ErrorBoundaryFallback/index.js +134 -0
  260. package/es/ErrorBoundary/index.d.ts +22 -0
  261. package/es/ErrorBoundary/index.js +69 -0
  262. package/es/common/registerAssistChatForm.d.ts +2 -0
  263. package/es/common/registerAssistChatForm.js +14 -0
  264. package/es/components/AgentCardSubmit/index.d.ts +20 -0
  265. package/es/components/AgentCardSubmit/index.js +90 -0
  266. package/es/components/AgentResult/index.d.ts +8 -0
  267. package/es/components/AgentResult/index.js +77 -0
  268. package/es/components/AgentResult/index.scss +11 -0
  269. package/es/components/AgentSchemaForm/ScreenshotView.d.ts +12 -0
  270. package/es/components/AgentSchemaForm/ScreenshotView.js +194 -0
  271. package/es/components/AgentSchemaForm/ScreenshotView.scss +86 -0
  272. package/es/components/AgentSchemaForm/_interface.d.ts +37 -0
  273. package/es/components/AgentSchemaForm/_interface.js +13 -0
  274. package/es/components/AgentSchemaForm/index.d.ts +9 -0
  275. package/es/components/AgentSchemaForm/index.js +190 -0
  276. package/es/components/AgentSchemaForm/index.scss +37 -0
  277. package/es/components/AgentText/index.d.ts +4 -0
  278. package/es/components/AgentText/index.js +8 -0
  279. package/es/components/AgentText/index.scss +5 -0
  280. package/es/components/AigcTips/index.d.ts +9 -0
  281. package/es/components/AigcTips/index.js +17 -0
  282. package/es/components/AigcTips/index.scss +6 -0
  283. package/es/components/ArrayInput/index.d.ts +3 -0
  284. package/es/components/ArrayInput/index.js +36 -0
  285. package/es/components/AssistantDrawer/index.d.ts +22 -0
  286. package/es/components/AssistantDrawer/index.js +112 -0
  287. package/es/components/AssistantDrawer/index.scss +96 -0
  288. package/es/components/EmptyIcon/index.d.ts +3 -0
  289. package/es/components/EmptyIcon/index.js +124 -0
  290. package/es/components/HeaderSvgIcon/index.d.ts +3 -0
  291. package/es/components/HeaderSvgIcon/index.js +1 -0
  292. package/es/components/InspectionCard/index.d.ts +66 -0
  293. package/es/components/InspectionCard/index.js +246 -0
  294. package/es/components/InspectionCard/index.module.less +193 -0
  295. package/es/components/InspectionCard/result.d.ts +13 -0
  296. package/es/components/InspectionCard/result.js +26 -0
  297. package/es/components/InspectionCard/result.module.less +36 -0
  298. package/es/components/LlmMarkDown/MdAmarkGuess/index.d.ts +16 -0
  299. package/es/components/LlmMarkDown/MdAmarkGuess/index.js +41 -0
  300. package/es/components/LlmMarkDown/MdAmarkReference/index.d.ts +21 -0
  301. package/es/components/LlmMarkDown/MdAmarkReference/index.js +300 -0
  302. package/es/components/LlmMarkDown/MdAmarkReference/index.scss +122 -0
  303. package/es/components/LlmMarkDown/index.d.ts +30 -0
  304. package/es/components/LlmMarkDown/index.js +202 -0
  305. package/es/components/LlmMarkDown/index.scss +23 -0
  306. package/es/components/LlmModelChange/index.d.ts +57 -0
  307. package/es/components/LlmModelChange/index.js +138 -0
  308. package/es/components/LlmModelChange/index.scss +60 -0
  309. package/es/components/LlmReference/index.d.ts +25 -0
  310. package/es/components/LlmReference/index.js +147 -0
  311. package/es/components/LlmReference/index.scss +92 -0
  312. package/es/components/LlmTitle/index.d.ts +14 -0
  313. package/es/components/LlmTitle/index.js +26 -0
  314. package/es/components/LlmTitle/index.scss +20 -0
  315. package/es/components/LlmTrace/index.d.ts +17 -0
  316. package/es/components/LlmTrace/index.js +119 -0
  317. package/es/components/LlmTrace/index.scss +79 -0
  318. package/es/components/LlmTraceComponents/Disassemble/index.d.ts +24 -0
  319. package/es/components/LlmTraceComponents/Disassemble/index.js +89 -0
  320. package/es/components/LlmTraceComponents/Disassemble/index.scss +19 -0
  321. package/es/components/LlmTraceComponents/ReadResource/index.d.ts +24 -0
  322. package/es/components/LlmTraceComponents/ReadResource/index.js +19 -0
  323. package/es/components/LlmTraceComponents/ReadResource/index.scss +5 -0
  324. package/es/components/LlmTraceComponents/Rewrite/index.d.ts +23 -0
  325. package/es/components/LlmTraceComponents/Rewrite/index.js +49 -0
  326. package/es/components/LlmTraceComponents/Rewrite/index.scss +13 -0
  327. package/es/components/LlmTraceComponents/TraceMarkDown/index.d.ts +22 -0
  328. package/es/components/LlmTraceComponents/TraceMarkDown/index.js +44 -0
  329. package/es/components/LlmTraceComponents/TraceMarkDown/index.scss +18 -0
  330. package/es/components/LlmTraceComponents/const.d.ts +25 -0
  331. package/es/components/LlmTraceComponents/const.js +23 -0
  332. package/es/components/LlmTraceV2/index.d.ts +56 -0
  333. package/es/components/LlmTraceV2/index.js +384 -0
  334. package/es/components/LlmTraceV2/index.scss +115 -0
  335. package/es/components/LlmTraceV3/components/TraceContentComponents/BusinessFlow/index.d.ts +13 -0
  336. package/es/components/LlmTraceV3/components/TraceContentComponents/BusinessFlow/index.js +38 -0
  337. package/es/components/LlmTraceV3/components/TraceContentComponents/BusinessFlow/index.scss +56 -0
  338. package/es/components/LlmTraceV3/components/TraceContentComponents/CodeBlock/index.d.ts +18 -0
  339. package/es/components/LlmTraceV3/components/TraceContentComponents/CodeBlock/index.js +82 -0
  340. package/es/components/LlmTraceV3/components/TraceContentComponents/CodeBlock/index.scss +36 -0
  341. package/es/components/LlmTraceV3/components/TraceContentComponents/DeepThinking/index.d.ts +13 -0
  342. package/es/components/LlmTraceV3/components/TraceContentComponents/DeepThinking/index.js +26 -0
  343. package/es/components/LlmTraceV3/components/TraceContentComponents/DeepThinking/index.scss +54 -0
  344. package/es/components/LlmTraceV3/components/TraceContentComponents/InfoMissing/index.d.ts +13 -0
  345. package/es/components/LlmTraceV3/components/TraceContentComponents/InfoMissing/index.js +25 -0
  346. package/es/components/LlmTraceV3/components/TraceContentComponents/InfoMissing/index.scss +38 -0
  347. package/es/components/LlmTraceV3/components/TraceContentComponents/LinkList/index.d.ts +20 -0
  348. package/es/components/LlmTraceV3/components/TraceContentComponents/LinkList/index.js +49 -0
  349. package/es/components/LlmTraceV3/components/TraceContentComponents/LinkList/index.scss +37 -0
  350. package/es/components/LlmTraceV3/components/TraceContentComponents/SearchResults/index.d.ts +13 -0
  351. package/es/components/LlmTraceV3/components/TraceContentComponents/SearchResults/index.js +93 -0
  352. package/es/components/LlmTraceV3/components/TraceContentComponents/SearchResults/index.scss +151 -0
  353. package/es/components/LlmTraceV3/components/TraceContentComponents/TaskPlanning/index.d.ts +12 -0
  354. package/es/components/LlmTraceV3/components/TraceContentComponents/TaskPlanning/index.js +28 -0
  355. package/es/components/LlmTraceV3/components/TraceContentComponents/ToolCall/index.d.ts +13 -0
  356. package/es/components/LlmTraceV3/components/TraceContentComponents/ToolCall/index.js +46 -0
  357. package/es/components/LlmTraceV3/components/TraceContentComponents/ToolCall/index.scss +70 -0
  358. package/es/components/LlmTraceV3/components/TraceContentComponents/ToolResult/index.d.ts +13 -0
  359. package/es/components/LlmTraceV3/components/TraceContentComponents/ToolResult/index.js +72 -0
  360. package/es/components/LlmTraceV3/components/TraceContentComponents/ToolResult/index.scss +90 -0
  361. package/es/components/LlmTraceV3/components/TraceContentComponents/const.d.ts +32 -0
  362. package/es/components/LlmTraceV3/components/TraceContentComponents/const.js +27 -0
  363. package/es/components/LlmTraceV3/components/TraceGroup/index.d.ts +8 -0
  364. package/es/components/LlmTraceV3/components/TraceGroup/index.js +81 -0
  365. package/es/components/LlmTraceV3/components/TraceHeader/index.d.ts +8 -0
  366. package/es/components/LlmTraceV3/components/TraceHeader/index.js +64 -0
  367. package/es/components/LlmTraceV3/components/TraceItem/index.d.ts +8 -0
  368. package/es/components/LlmTraceV3/components/TraceItem/index.js +126 -0
  369. package/es/components/LlmTraceV3/components/TraceSlide/index.d.ts +30 -0
  370. package/es/components/LlmTraceV3/components/TraceSlide/index.js +278 -0
  371. package/es/components/LlmTraceV3/components/TraceSlide/index.scss +204 -0
  372. package/es/components/LlmTraceV3/components/TraceStatusIcon/index.d.ts +8 -0
  373. package/es/components/LlmTraceV3/components/TraceStatusIcon/index.js +41 -0
  374. package/es/components/LlmTraceV3/hooks/useGroupCollapse.d.ts +18 -0
  375. package/es/components/LlmTraceV3/hooks/useGroupCollapse.js +91 -0
  376. package/es/components/LlmTraceV3/hooks/useItemCollapse.d.ts +18 -0
  377. package/es/components/LlmTraceV3/hooks/useItemCollapse.js +61 -0
  378. package/es/components/LlmTraceV3/hooks/useTraceAnimation.d.ts +15 -0
  379. package/es/components/LlmTraceV3/hooks/useTraceAnimation.js +54 -0
  380. package/es/components/LlmTraceV3/hooks/useTraceCollapse.d.ts +17 -0
  381. package/es/components/LlmTraceV3/hooks/useTraceCollapse.js +80 -0
  382. package/es/components/LlmTraceV3/index.d.ts +11 -0
  383. package/es/components/LlmTraceV3/index.js +173 -0
  384. package/es/components/LlmTraceV3/index.scss +333 -0
  385. package/es/components/LlmTraceV3/types.d.ts +263 -0
  386. package/es/components/LlmTraceV3/types.js +108 -0
  387. package/es/components/LlmTraceV3/utils/collapseLogic.d.ts +26 -0
  388. package/es/components/LlmTraceV3/utils/collapseLogic.js +86 -0
  389. package/es/components/LlmTraceV3/utils/traceHelpers.d.ts +42 -0
  390. package/es/components/LlmTraceV3/utils/traceHelpers.js +94 -0
  391. package/es/components/MarkDown/index.d.ts +11 -0
  392. package/es/components/MarkDown/index.js +222 -0
  393. package/es/components/MarkDown/index.scss +179 -0
  394. package/es/components/ModelSelect/ModeDropdown.d.ts +8 -0
  395. package/es/components/ModelSelect/ModeDropdown.js +118 -0
  396. package/es/components/ModelSelect/const.d.ts +30 -0
  397. package/es/components/ModelSelect/const.js +61 -0
  398. package/es/components/ModelSelect/index.d.ts +4 -0
  399. package/es/components/ModelSelect/index.js +45 -0
  400. package/es/components/ModelSelect/index.scss +121 -0
  401. package/es/components/PaulButtonGroup/Select.d.ts +3 -0
  402. package/es/components/PaulButtonGroup/Select.js +109 -0
  403. package/es/components/PaulButtonGroup/index.d.ts +16 -0
  404. package/es/components/PaulButtonGroup/index.js +209 -0
  405. package/es/components/PaulButtonGroup/index.scss +19 -0
  406. package/es/components/PopAuth/index.d.ts +4 -0
  407. package/es/components/PopAuth/index.js +62 -0
  408. package/es/components/PopAuth/index.scss +16 -0
  409. package/es/components/ReferenceInfoItem/index.d.ts +49 -0
  410. package/es/components/ReferenceInfoItem/index.js +43 -0
  411. package/es/components/ReferenceInfoItem/index.scss +46 -0
  412. package/es/components/ReferenceTag/index.d.ts +11 -0
  413. package/es/components/ReferenceTag/index.js +27 -0
  414. package/es/components/ReferenceTag/index.scss +19 -0
  415. package/es/components/SchemaInput/SchemaInputCore/index.d.ts +4 -0
  416. package/es/components/SchemaInput/SchemaInputCore/index.js +113 -0
  417. package/es/components/SchemaInput/SchemaInputCore/index.scss +35 -0
  418. package/es/components/SchemaInput/SchemaInputCore/utils.d.ts +1 -0
  419. package/es/components/SchemaInput/SchemaInputCore/utils.js +77 -0
  420. package/es/components/SchemaInput/SimpleJSONEditor/index.d.ts +4 -0
  421. package/es/components/SchemaInput/SimpleJSONEditor/index.js +35 -0
  422. package/es/components/SchemaInput/SimpleJSONEditor/index.scss +7 -0
  423. package/es/components/SchemaInput/index.d.ts +8 -0
  424. package/es/components/SchemaInput/index.js +30 -0
  425. package/es/components/SelectBlurry/index.d.ts +3 -0
  426. package/es/components/SelectBlurry/index.js +74 -0
  427. package/es/components/SendMessageSvgIcon/index.d.ts +3 -0
  428. package/es/components/SendMessageSvgIcon/index.js +70 -0
  429. package/es/components/ShareContent/index.d.ts +21 -0
  430. package/es/components/ShareContent/index.js +176 -0
  431. package/es/components/ShareContent/index.scss +36 -0
  432. package/es/components/ShareModal/index.d.ts +15 -0
  433. package/es/components/ShareModal/index.js +185 -0
  434. package/es/components/ShareModal/index.scss +199 -0
  435. package/es/components/ShareOperationBar/index.d.ts +4 -0
  436. package/es/components/ShareOperationBar/index.js +152 -0
  437. package/es/components/ShareOperationBar/index.scss +47 -0
  438. package/es/components/TextContent/index.d.ts +14 -0
  439. package/es/components/TextContent/index.js +37 -0
  440. package/es/components/TextContent/index.scss +31 -0
  441. package/es/components/TraceMarkdownWithCard/index.d.ts +6 -0
  442. package/es/components/TraceMarkdownWithCard/index.js +21 -0
  443. package/es/components/TraceMarkdownWithCard/index.module.less +29 -0
  444. package/es/components/TraceWithAgent/index.d.ts +23 -0
  445. package/es/components/TraceWithAgent/index.js +93 -0
  446. package/es/components/TraceWithAgent/index.less +74 -0
  447. package/es/constants/assistChatEvent.d.ts +33 -0
  448. package/es/constants/assistChatEvent.js +33 -0
  449. package/es/constants/common.d.ts +71 -0
  450. package/es/constants/common.js +90 -0
  451. package/es/constants/logTrace.d.ts +3 -0
  452. package/es/constants/logTrace.js +4 -0
  453. package/es/constants/reference.d.ts +109 -0
  454. package/es/constants/reference.js +111 -0
  455. package/es/constants/traceDataStatus.d.ts +34 -0
  456. package/es/constants/traceDataStatus.js +37 -0
  457. package/es/context/index.d.ts +13 -0
  458. package/es/context/index.js +785 -0
  459. package/es/context/utils/messages.d.ts +33 -0
  460. package/es/context/utils/messages.js +194 -0
  461. package/es/context/utils/send.d.ts +29 -0
  462. package/es/context/utils/send.js +187 -0
  463. package/es/context/utils/tool.d.ts +19 -0
  464. package/es/context/utils/tool.js +89 -0
  465. package/es/index.d.ts +37 -0
  466. package/es/index.js +63 -0
  467. package/es/index.scss +39 -0
  468. package/es/interface/IAgent.d.ts +12 -0
  469. package/es/interface/IAgent.js +1 -0
  470. package/es/interface/IChatBottom.d.ts +69 -0
  471. package/es/interface/IChatBottom.js +1 -0
  472. package/es/interface/IChatCard.d.ts +40 -0
  473. package/es/interface/IChatCard.js +1 -0
  474. package/es/interface/IChatContext.d.ts +59 -0
  475. package/es/interface/IChatContext.js +1 -0
  476. package/es/interface/IChatRef.d.ts +75 -0
  477. package/es/interface/IChatRef.js +1 -0
  478. package/es/interface/IGuessQuestion.d.ts +43 -0
  479. package/es/interface/IGuessQuestion.js +15 -0
  480. package/es/interface/IMessage.d.ts +17 -0
  481. package/es/interface/IMessage.js +1 -0
  482. package/es/interface/ISend.d.ts +19 -0
  483. package/es/interface/ISend.js +1 -0
  484. package/es/interface/index.d.ts +272 -0
  485. package/es/interface/index.js +7 -0
  486. package/es/utils/CSEIconTool.d.ts +8 -0
  487. package/es/utils/CSEIconTool.js +6 -0
  488. package/es/utils/apushAssistant.d.ts +73 -0
  489. package/es/utils/apushAssistant.js +518 -0
  490. package/es/utils/clientPlugin.d.ts +3 -0
  491. package/es/utils/clientPlugin.js +73 -0
  492. package/es/utils/common.d.ts +10 -0
  493. package/es/utils/common.js +40 -0
  494. package/es/utils/copyToClipboard.d.ts +2 -0
  495. package/es/utils/copyToClipboard.js +70 -0
  496. package/es/utils/formDataFormat.d.ts +3 -0
  497. package/es/utils/formDataFormat.js +55 -0
  498. package/es/utils/formatData.d.ts +14 -0
  499. package/es/utils/formatData.js +104 -0
  500. package/es/utils/log.d.ts +18 -0
  501. package/es/utils/log.js +37 -0
  502. package/es/utils/parseUrl.d.ts +9 -0
  503. package/es/utils/parseUrl.js +48 -0
  504. package/es/utils/screenshot.d.ts +45 -0
  505. package/es/utils/screenshot.js +650 -0
  506. package/es/utils/send.d.ts +10 -0
  507. package/es/utils/send.js +8 -0
  508. package/es/utils/uploadImage.d.ts +9 -0
  509. package/es/utils/uploadImage.js +226 -0
  510. package/es/utils/websocketLogger.d.ts +176 -0
  511. package/es/utils/websocketLogger.js +267 -0
  512. package/package.json +166 -0
@@ -0,0 +1,10 @@
1
+ "use strict";(self.webpackChunk_alife_paul_ai_assistant=self.webpackChunk_alife_paul_ai_assistant||[]).push([[4484],{74484:function(ce,bt,U){var X,Z,O;U.d(bt,{diagram:function(){return le}});var T=U(99970),k=U(35096),G=U(989),St=U(64599),K=U.n(St);function ft(t,n){var o;if(n===void 0){var h=K()(t),d;try{for(h.s();!(d=h.n()).done;){var u=d.value;u!=null&&(o>u||o===void 0&&u>=u)&&(o=u)}}catch(l){h.e(l)}finally{h.f()}}else{var p=-1,y=K()(t),r;try{for(y.s();!(r=y.n()).done;){var s=r.value;(s=n(s,++p,t))!=null&&(o>s||o===void 0&&s>=s)&&(o=s)}}catch(l){y.e(l)}finally{y.f()}}return o}function wt(t){return t.target.depth}function Lt(t){return t.depth}function Et(t,n){return n-1-t.height}function yt(t,n){return t.sourceLinks.length?t.depth:n-1}function Wt(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?ft(t.sourceLinks,wt)-1:0}function rt(t,n){var o=0;if(n===void 0){var h=K()(t),d;try{for(h.s();!(d=h.n()).done;){var u=d.value;(u=+u)&&(o+=u)}}catch(l){h.e(l)}finally{h.f()}}else{var p=-1,y=K()(t),r;try{for(y.s();!(r=y.n()).done;){var s=r.value;(s=+n(s,++p,t))&&(o+=s)}}catch(l){y.e(l)}finally{y.f()}}return o}function dt(t,n){var o;if(n===void 0){var h=K()(t),d;try{for(h.s();!(d=h.n()).done;){var u=d.value;u!=null&&(o<u||o===void 0&&u>=u)&&(o=u)}}catch(l){h.e(l)}finally{h.f()}}else{var p=-1,y=K()(t),r;try{for(y.s();!(r=y.n()).done;){var s=r.value;(s=n(s,++p,t))!=null&&(o<s||o===void 0&&s>=s)&&(o=s)}}catch(l){y.e(l)}finally{y.f()}}return o}function J(t){return function(){return t}}function pt(t,n){return q(t.source,n.source)||t.index-n.index}function gt(t,n){return q(t.target,n.target)||t.index-n.index}function q(t,n){return t.y0-n.y0}function st(t){return t.value}function At(t){return t.index}function Tt(t){return t.nodes}function Mt(t){return t.links}function kt(t,n){const o=t.get(n);if(!o)throw new Error("missing: "+n);return o}function mt({nodes:t}){for(const n of t){let o=n.y0,h=o;for(const d of n.sourceLinks)d.y0=o+d.width/2,o+=d.width;for(const d of n.targetLinks)d.y1=h+d.width/2,h+=d.width}}function Nt(){let t=0,n=0,o=1,h=1,d=24,u=8,p,y=At,r=yt,s,l,x=Tt,v=Mt,g=6;function _(){const e={nodes:x.apply(null,arguments),links:v.apply(null,arguments)};return W(e),E(e),A(e),P(e),z(e),mt(e),e}_.update=function(e){return mt(e),e},_.nodeId=function(e){return arguments.length?(y=typeof e=="function"?e:J(e),_):y},_.nodeAlign=function(e){return arguments.length?(r=typeof e=="function"?e:J(e),_):r},_.nodeSort=function(e){return arguments.length?(s=e,_):s},_.nodeWidth=function(e){return arguments.length?(d=+e,_):d},_.nodePadding=function(e){return arguments.length?(u=p=+e,_):u},_.nodes=function(e){return arguments.length?(x=typeof e=="function"?e:J(e),_):x},_.links=function(e){return arguments.length?(v=typeof e=="function"?e:J(e),_):v},_.linkSort=function(e){return arguments.length?(l=e,_):l},_.size=function(e){return arguments.length?(t=n=0,o=+e[0],h=+e[1],_):[o-t,h-n]},_.extent=function(e){return arguments.length?(t=+e[0][0],o=+e[1][0],n=+e[0][1],h=+e[1][1],_):[[t,n],[o,h]]},_.iterations=function(e){return arguments.length?(g=+e,_):g};function W({nodes:e,links:c}){for(const[i,a]of e.entries())a.index=i,a.sourceLinks=[],a.targetLinks=[];const f=new Map(e.map((i,a)=>[y(i,a,e),i]));for(const[i,a]of c.entries()){a.index=i;let{source:m,target:b}=a;typeof m!="object"&&(m=a.source=kt(f,m)),typeof b!="object"&&(b=a.target=kt(f,b)),m.sourceLinks.push(a),b.targetLinks.push(a)}if(l!=null)for(const{sourceLinks:i,targetLinks:a}of e)i.sort(l),a.sort(l)}function E({nodes:e}){for(const c of e)c.value=c.fixedValue===void 0?Math.max(rt(c.sourceLinks,st),rt(c.targetLinks,st)):c.fixedValue}function A({nodes:e}){const c=e.length;let f=new Set(e),i=new Set,a=0;for(;f.size;){for(const m of f){m.depth=a;for(const{target:b}of m.sourceLinks)i.add(b)}if(++a>c)throw new Error("circular link");f=i,i=new Set}}function P({nodes:e}){const c=e.length;let f=new Set(e),i=new Set,a=0;for(;f.size;){for(const m of f){m.height=a;for(const{source:b}of m.targetLinks)i.add(b)}if(++a>c)throw new Error("circular link");f=i,i=new Set}}function j({nodes:e}){const c=dt(e,a=>a.depth)+1,f=(o-t-d)/(c-1),i=new Array(c);for(const a of e){const m=Math.max(0,Math.min(c-1,Math.floor(r.call(null,a,c))));a.layer=m,a.x0=t+m*f,a.x1=a.x0+d,i[m]?i[m].push(a):i[m]=[a]}if(s)for(const a of i)a.sort(s);return i}function R(e){const c=ft(e,f=>(h-n-(f.length-1)*p)/rt(f,st));for(const f of e){let i=n;for(const a of f){a.y0=i,a.y1=i+a.value*c,i=a.y1+p;for(const m of a.sourceLinks)m.width=m.value*c}i=(h-i+p)/(f.length+1);for(let a=0;a<f.length;++a){const m=f[a];m.y0+=i*(a+1),m.y1+=i*(a+1)}H(f)}}function z(e){const c=j(e);p=Math.min(u,(h-n)/(dt(c,f=>f.length)-1)),R(c);for(let f=0;f<g;++f){const i=Math.pow(.99,f),a=Math.max(1-i,(f+1)/g);M(c,i,a),S(c,i,a)}}function S(e,c,f){for(let i=1,a=e.length;i<a;++i){const m=e[i];for(const b of m){let B=0,I=0;for(const{source:L,value:ht}of b.targetLinks){let Q=ht*(b.layer-L.layer);B+=w(L,b)*Q,I+=Q}if(!(I>0))continue;let D=(B/I-b.y0)*c;b.y0+=D,b.y1+=D,Y(b)}s===void 0&&m.sort(q),C(m,f)}}function M(e,c,f){for(let i=e.length,a=i-2;a>=0;--a){const m=e[a];for(const b of m){let B=0,I=0;for(const{target:L,value:ht}of b.sourceLinks){let Q=ht*(L.layer-b.layer);B+=$(b,L)*Q,I+=Q}if(!(I>0))continue;let D=(B/I-b.y0)*c;b.y0+=D,b.y1+=D,Y(b)}s===void 0&&m.sort(q),C(m,f)}}function C(e,c){const f=e.length>>1,i=e[f];V(e,i.y0-p,f-1,c),N(e,i.y1+p,f+1,c),V(e,h,e.length-1,c),N(e,n,0,c)}function N(e,c,f,i){for(;f<e.length;++f){const a=e[f],m=(c-a.y0)*i;m>1e-6&&(a.y0+=m,a.y1+=m),c=a.y1+p}}function V(e,c,f,i){for(;f>=0;--f){const a=e[f],m=(a.y1-c)*i;m>1e-6&&(a.y0-=m,a.y1-=m),c=a.y0-p}}function Y({sourceLinks:e,targetLinks:c}){if(l===void 0){for(const{source:{sourceLinks:f}}of c)f.sort(gt);for(const{target:{targetLinks:f}}of e)f.sort(pt)}}function H(e){if(l===void 0)for(const{sourceLinks:c,targetLinks:f}of e)c.sort(gt),f.sort(pt)}function w(e,c){let f=e.y0-(e.sourceLinks.length-1)*p/2;for(const{target:i,width:a}of e.sourceLinks){if(i===c)break;f+=a+p}for(const{source:i,width:a}of c.targetLinks){if(i===e)break;f-=a}return f}function $(e,c){let f=c.y0-(c.targetLinks.length-1)*p/2;for(const{source:i,width:a}of c.targetLinks){if(i===e)break;f+=a+p}for(const{target:i,width:a}of e.sourceLinks){if(i===c)break;f-=a}return f}return _}var ot=Math.PI,at=2*ot,F=1e-6,It=at-F;function lt(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function xt(){return new lt}lt.prototype=xt.prototype={constructor:lt,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,o,h){this._+="Q"+ +t+","+ +n+","+(this._x1=+o)+","+(this._y1=+h)},bezierCurveTo:function(t,n,o,h,d,u){this._+="C"+ +t+","+ +n+","+ +o+","+ +h+","+(this._x1=+d)+","+(this._y1=+u)},arcTo:function(t,n,o,h,d){t=+t,n=+n,o=+o,h=+h,d=+d;var u=this._x1,p=this._y1,y=o-t,r=h-n,s=u-t,l=p-n,x=s*s+l*l;if(d<0)throw new Error("negative radius: "+d);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(x>F)if(!(Math.abs(l*y-r*s)>F)||!d)this._+="L"+(this._x1=t)+","+(this._y1=n);else{var v=o-u,g=h-p,_=y*y+r*r,W=v*v+g*g,E=Math.sqrt(_),A=Math.sqrt(x),P=d*Math.tan((ot-Math.acos((_+x-W)/(2*E*A)))/2),j=P/A,R=P/E;Math.abs(j-1)>F&&(this._+="L"+(t+j*s)+","+(n+j*l)),this._+="A"+d+","+d+",0,0,"+ +(l*v>s*g)+","+(this._x1=t+R*y)+","+(this._y1=n+R*r)}},arc:function(t,n,o,h,d,u){t=+t,n=+n,o=+o,u=!!u;var p=o*Math.cos(h),y=o*Math.sin(h),r=t+p,s=n+y,l=1^u,x=u?h-d:d-h;if(o<0)throw new Error("negative radius: "+o);this._x1===null?this._+="M"+r+","+s:(Math.abs(this._x1-r)>F||Math.abs(this._y1-s)>F)&&(this._+="L"+r+","+s),o&&(x<0&&(x=x%at+at),x>It?this._+="A"+o+","+o+",0,1,"+l+","+(t-p)+","+(n-y)+"A"+o+","+o+",0,1,"+l+","+(this._x1=r)+","+(this._y1=s):x>F&&(this._+="A"+o+","+o+",0,"+ +(x>=ot)+","+l+","+(this._x1=t+o*Math.cos(d))+","+(this._y1=n+o*Math.sin(d))))},rect:function(t,n,o,h){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +o+"v"+ +h+"h"+-o+"Z"},toString:function(){return this._}};var Pt=xt,Ct=Array.prototype.slice;function vt(t){return function(){return t}}function Ot(t){return t[0]}function zt(t){return t[1]}function Dt(t){return t.source}function jt(t){return t.target}function ct(t){var n=Dt,o=jt,h=Ot,d=zt,u=null;function p(){var y,r=Ct.call(arguments),s=n.apply(this,r),l=o.apply(this,r);if(u||(u=y=Pt()),t(u,+h.apply(this,(r[0]=s,r)),+d.apply(this,r),+h.apply(this,(r[0]=l,r)),+d.apply(this,r)),y)return u=null,y+""||null}return p.source=function(y){return arguments.length?(n=y,p):n},p.target=function(y){return arguments.length?(o=y,p):o},p.x=function(y){return arguments.length?(h=typeof y=="function"?y:vt(+y),p):h},p.y=function(y){return arguments.length?(d=typeof y=="function"?y:vt(+y),p):d},p.context=function(y){return arguments.length?(u=y==null?null:y,p):u},p}function Rt(t,n,o,h,d){t.moveTo(n,o),t.bezierCurveTo(n=(n+h)/2,o,n,d,h,d)}function $t(t,n,o,h,d){t.moveTo(n,o),t.bezierCurveTo(n,o=(o+d)/2,h,o,h,d)}function Bt(t,n,o,h,d){var u=pointRadial(n,o),p=pointRadial(n,o=(o+d)/2),y=pointRadial(h,o),r=pointRadial(h,d);t.moveTo(u[0],u[1]),t.bezierCurveTo(p[0],p[1],y[0],y[1],r[0],r[1])}function Ft(){return ct(Rt)}function ue(){return ct($t)}function he(){var t=ct(Bt);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}function Vt(t){return[t.source.x1,t.y0]}function Yt(t){return[t.target.x0,t.y1]}function Ht(){return Ft().source(Vt).target(Yt)}var ut=function(){var t=(0,k.eW)(function(y,r,s,l){for(s=s||{},l=y.length;l--;s[y[l]]=r);return s},"o"),n=[1,9],o=[1,10],h=[1,5,10,12],d={trace:(0,k.eW)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:(0,k.eW)(function(r,s,l,x,v,g,_){var W=g.length-1;switch(v){case 7:const E=x.findOrCreateNode(g[W-4].trim().replaceAll('""','"')),A=x.findOrCreateNode(g[W-2].trim().replaceAll('""','"')),P=parseFloat(g[W].trim());x.addLink(E,A,P);break;case 8:case 9:case 11:this.$=g[W];break;case 10:this.$=g[W-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:n,20:o},{1:[2,6],7:11,10:[1,12]},t(o,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(h,[2,8]),t(h,[2,9]),{19:[1,16]},t(h,[2,11]),{1:[2,1]},{1:[2,5]},t(o,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:n,20:o},{15:18,16:7,17:8,18:n,20:o},{18:[1,19]},t(o,[2,3]),{12:[1,20]},t(h,[2,10]),{15:21,16:7,17:8,18:n,20:o},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:(0,k.eW)(function(r,s){if(s.recoverable)this.trace(r);else{var l=new Error(r);throw l.hash=s,l}},"parseError"),parse:(0,k.eW)(function(r){var s=this,l=[0],x=[],v=[null],g=[],_=this.table,W="",E=0,A=0,P=0,j=2,R=1,z=g.slice.call(arguments,1),S=Object.create(this.lexer),M={yy:{}};for(var C in this.yy)Object.prototype.hasOwnProperty.call(this.yy,C)&&(M.yy[C]=this.yy[C]);S.setInput(r,M.yy),M.yy.lexer=S,M.yy.parser=this,typeof S.yylloc=="undefined"&&(S.yylloc={});var N=S.yylloc;g.push(N);var V=S.options&&S.options.ranges;typeof M.yy.parseError=="function"?this.parseError=M.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Y(L){l.length=l.length-2*L,v.length=v.length-L,g.length=g.length-L}(0,k.eW)(Y,"popStack");function H(){var L;return L=x.pop()||S.lex()||R,typeof L!="number"&&(L instanceof Array&&(x=L,L=x.pop()),L=s.symbols_[L]||L),L}(0,k.eW)(H,"lex");for(var w,$,e,c,f,i,a={},m,b,B,I;;){if(e=l[l.length-1],this.defaultActions[e]?c=this.defaultActions[e]:((w===null||typeof w=="undefined")&&(w=H()),c=_[e]&&_[e][w]),typeof c=="undefined"||!c.length||!c[0]){var D="";I=[];for(m in _[e])this.terminals_[m]&&m>j&&I.push("'"+this.terminals_[m]+"'");S.showPosition?D="Parse error on line "+(E+1)+`:
2
+ `+S.showPosition()+`
3
+ Expecting `+I.join(", ")+", got '"+(this.terminals_[w]||w)+"'":D="Parse error on line "+(E+1)+": Unexpected "+(w==R?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(D,{text:S.match,token:this.terminals_[w]||w,line:S.yylineno,loc:N,expected:I})}if(c[0]instanceof Array&&c.length>1)throw new Error("Parse Error: multiple actions possible at state: "+e+", token: "+w);switch(c[0]){case 1:l.push(w),v.push(S.yytext),g.push(S.yylloc),l.push(c[1]),w=null,$?(w=$,$=null):(A=S.yyleng,W=S.yytext,E=S.yylineno,N=S.yylloc,P>0&&P--);break;case 2:if(b=this.productions_[c[1]][1],a.$=v[v.length-b],a._$={first_line:g[g.length-(b||1)].first_line,last_line:g[g.length-1].last_line,first_column:g[g.length-(b||1)].first_column,last_column:g[g.length-1].last_column},V&&(a._$.range=[g[g.length-(b||1)].range[0],g[g.length-1].range[1]]),i=this.performAction.apply(a,[W,A,E,M.yy,c[1],v,g].concat(z)),typeof i!="undefined")return i;b&&(l=l.slice(0,-1*b*2),v=v.slice(0,-1*b),g=g.slice(0,-1*b)),l.push(this.productions_[c[1]][0]),v.push(a.$),g.push(a._$),B=_[l[l.length-2]][l[l.length-1]],l.push(B);break;case 3:return!0}}return!0},"parse")},u=function(){var y={EOF:1,parseError:(0,k.eW)(function(s,l){if(this.yy.parser)this.yy.parser.parseError(s,l);else throw new Error(s)},"parseError"),setInput:(0,k.eW)(function(r,s){return this.yy=s||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,k.eW)(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var s=r.match(/(?:\r\n?|\n).*/g);return s?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:(0,k.eW)(function(r){var s=r.length,l=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-s),this.offset-=s;var x=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var v=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===x.length?this.yylloc.first_column:0)+x[x.length-l.length].length-l[0].length:this.yylloc.first_column-s},this.options.ranges&&(this.yylloc.range=[v[0],v[0]+this.yyleng-s]),this.yyleng=this.yytext.length,this},"unput"),more:(0,k.eW)(function(){return this._more=!0,this},"more"),reject:(0,k.eW)(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:(0,k.eW)(function(r){this.unput(this.match.slice(r))},"less"),pastInput:(0,k.eW)(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,k.eW)(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,k.eW)(function(){var r=this.pastInput(),s=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
5
+ `+s+"^"},"showPosition"),test_match:(0,k.eW)(function(r,s){var l,x,v;if(this.options.backtrack_lexer&&(v={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(v.yylloc.range=this.yylloc.range.slice(0))),x=r[0].match(/(?:\r\n?|\n).*/g),x&&(this.yylineno+=x.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:x?x[x.length-1].length-x[x.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+r[0].length},this.yytext+=r[0],this.match+=r[0],this.matches=r,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(r[0].length),this.matched+=r[0],l=this.performAction.call(this,this.yy,this,s,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l)return l;if(this._backtrack){for(var g in v)this[g]=v[g];return!1}return!1},"test_match"),next:(0,k.eW)(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var r,s,l,x;this._more||(this.yytext="",this.match="");for(var v=this._currentRules(),g=0;g<v.length;g++)if(l=this._input.match(this.rules[v[g]]),l&&(!s||l[0].length>s[0].length)){if(s=l,x=g,this.options.backtrack_lexer){if(r=this.test_match(l,v[g]),r!==!1)return r;if(this._backtrack){s=!1;continue}else return!1}else if(!this.options.flex)break}return s?(r=this.test_match(s,v[x]),r!==!1?r:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,k.eW)(function(){var s=this.next();return s||this.lex()},"lex"),begin:(0,k.eW)(function(s){this.conditionStack.push(s)},"begin"),popState:(0,k.eW)(function(){var s=this.conditionStack.length-1;return s>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,k.eW)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,k.eW)(function(s){return s=this.conditionStack.length-1-Math.abs(s||0),s>=0?this.conditionStack[s]:"INITIAL"},"topState"),pushState:(0,k.eW)(function(s){this.begin(s)},"pushState"),stateStackSize:(0,k.eW)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,k.eW)(function(s,l,x,v){var g=v;switch(x){case 0:return this.pushState("csv"),4;break;case 1:return this.pushState("csv"),4;break;case 2:return 10;case 3:return 5;case 4:return 12;case 5:return this.pushState("escaped_text"),18;break;case 6:return 20;case 7:return this.popState("escaped_text"),18;break;case 8:return 19}},"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:sankey\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[2,3,4,5,6,7,8],inclusive:!1},escaped_text:{rules:[7,8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8],inclusive:!0}}};return y}();d.lexer=u;function p(){this.yy={}}return(0,k.eW)(p,"Parser"),p.prototype=d,d.Parser=p,new p}();ut.parser=ut;var tt=ut,et=[],nt=[],it=new Map,Ut=(0,k.eW)(()=>{et=[],nt=[],it=new Map,(0,T.ZH)()},"clear"),Gt=(X=class{constructor(n,o,h=0){this.source=n,this.target=o,this.value=h}},(0,k.eW)(X,"SankeyLink"),X),Kt=(0,k.eW)((t,n,o)=>{et.push(new Gt(t,n,o))},"addLink"),Xt=(Z=class{constructor(n){this.ID=n}},(0,k.eW)(Z,"SankeyNode"),Z),Zt=(0,k.eW)(t=>{t=T.SY.sanitizeText(t,(0,T.nV)());let n=it.get(t);return n===void 0&&(n=new Xt(t),it.set(t,n),nt.push(n)),n},"findOrCreateNode"),Qt=(0,k.eW)(()=>nt,"getNodes"),Jt=(0,k.eW)(()=>et,"getLinks"),qt=(0,k.eW)(()=>({nodes:nt.map(t=>({id:t.ID})),links:et.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),te={nodesMap:it,getConfig:(0,k.eW)(()=>(0,T.nV)().sankey,"getConfig"),getNodes:Qt,getLinks:Jt,getGraph:qt,addLink:Kt,findOrCreateNode:Zt,getAccTitle:T.eu,setAccTitle:T.GN,getAccDescription:T.Mx,setAccDescription:T.U$,getDiagramTitle:T.Kr,setDiagramTitle:T.g2,clear:Ut},_t=(O=class{static next(n){return new O(n+ ++O.count)}constructor(n){this.id=n,this.href=`#${n}`}toString(){return"url("+this.href+")"}},(0,k.eW)(O,"Uid"),O.count=0,O),ee={left:Lt,right:Et,center:Wt,justify:yt},ne=(0,k.eW)(function(t,n,o,h){var V,Y,H,w,$,e,c,f;const{securityLevel:d,sankey:u}=(0,T.nV)(),p=T.Fy.sankey;let y;d==="sandbox"&&(y=(0,G.Ys)("#i"+n));const r=d==="sandbox"?(0,G.Ys)(y.nodes()[0].contentDocument.body):(0,G.Ys)("body"),s=d==="sandbox"?r.select(`[id="${n}"]`):(0,G.Ys)(`[id="${n}"]`),l=(V=u==null?void 0:u.width)!=null?V:p.width,x=(Y=u==null?void 0:u.height)!=null?Y:p.width,v=(H=u==null?void 0:u.useMaxWidth)!=null?H:p.useMaxWidth,g=(w=u==null?void 0:u.nodeAlignment)!=null?w:p.nodeAlignment,_=($=u==null?void 0:u.prefix)!=null?$:p.prefix,W=(e=u==null?void 0:u.suffix)!=null?e:p.suffix,E=(c=u==null?void 0:u.showValues)!=null?c:p.showValues,A=h.db.getGraph(),P=ee[g];Nt().nodeId(i=>i.id).nodeWidth(10).nodePadding(10+(E?15:0)).nodeAlign(P).extent([[0,0],[l,x]])(A);const z=(0,G.PKp)(G.K2I);s.append("g").attr("class","nodes").selectAll(".node").data(A.nodes).join("g").attr("class","node").attr("id",i=>(i.uid=_t.next("node-")).id).attr("transform",function(i){return"translate("+i.x0+","+i.y0+")"}).attr("x",i=>i.x0).attr("y",i=>i.y0).append("rect").attr("height",i=>i.y1-i.y0).attr("width",i=>i.x1-i.x0).attr("fill",i=>z(i.id));const S=(0,k.eW)(({id:i,value:a})=>E?`${i}
7
+ ${_}${Math.round(a*100)/100}${W}`:i,"getText");s.append("g").attr("class","node-labels").attr("font-size",14).selectAll("text").data(A.nodes).join("text").attr("x",i=>i.x0<l/2?i.x1+6:i.x0-6).attr("y",i=>(i.y1+i.y0)/2).attr("dy",`${E?"0":"0.35"}em`).attr("text-anchor",i=>i.x0<l/2?"start":"end").text(S);const M=s.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(A.links).join("g").attr("class","link").style("mix-blend-mode","multiply"),C=(f=u==null?void 0:u.linkColor)!=null?f:"gradient";if(C==="gradient"){const i=M.append("linearGradient").attr("id",a=>(a.uid=_t.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",a=>a.source.x1).attr("x2",a=>a.target.x0);i.append("stop").attr("offset","0%").attr("stop-color",a=>z(a.source.id)),i.append("stop").attr("offset","100%").attr("stop-color",a=>z(a.target.id))}let N;switch(C){case"gradient":N=(0,k.eW)(i=>i.uid,"coloring");break;case"source":N=(0,k.eW)(i=>z(i.source.id),"coloring");break;case"target":N=(0,k.eW)(i=>z(i.target.id),"coloring");break;default:N=C}M.append("path").attr("d",Ht()).attr("stroke",N).attr("stroke-width",i=>Math.max(1,i.width)),(0,T.j7)(void 0,s,0,v)},"draw"),ie={draw:ne},re=(0,k.eW)(t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,`
8
+ `).trim(),"prepareTextForParsing"),se=(0,k.eW)(t=>`.label {
9
+ font-family: ${t.fontFamily};
10
+ }`,"getStyles"),oe=se,ae=tt.parse.bind(tt);tt.parse=t=>ae(re(t));var le={styles:oe,parser:tt,db:te,renderer:ie}}}]);
@@ -0,0 +1,37 @@
1
+ !(function(){var ye=Object.defineProperty,Ee=Object.defineProperties;var me=Object.getOwnPropertyDescriptors;var ve=Object.getOwnPropertySymbols;var Te=Object.prototype.hasOwnProperty,Ne=Object.prototype.propertyIsEnumerable;var de=(Yt,it,ut)=>it in Yt?ye(Yt,it,{enumerable:!0,configurable:!0,writable:!0,value:ut}):Yt[it]=ut,ee=(Yt,it)=>{for(var ut in it||(it={}))Te.call(it,ut)&&de(Yt,ut,it[ut]);if(ve)for(var ut of ve(it))Ne.call(it,ut)&&de(Yt,ut,it[ut]);return Yt},ie=(Yt,it)=>Ee(Yt,me(it));var kt=(Yt,it,ut)=>new Promise((S,d)=>{var s=r=>{try{e(ut.next(r))}catch(p){d(p)}},o=r=>{try{e(ut.throw(r))}catch(p){d(p)}},e=r=>r.done?S(r.value):Promise.resolve(r.value).then(s,o);e((ut=ut.apply(Yt,it)).next())});(self.webpackChunk_alife_paul_ai_assistant=self.webpackChunk_alife_paul_ai_assistant||[]).push([[4498],{44867:function(Yt,it,ut){(function(d,s){Yt.exports=s(ut(26914))})(this,function(S){return(()=>{"use strict";var d={658:r=>{r.exports=Object.assign!=null?Object.assign.bind(Object):function(p){for(var i=arguments.length,g=Array(i>1?i-1:0),t=1;t<i;t++)g[t-1]=arguments[t];return g.forEach(function(a){Object.keys(a).forEach(function(l){return p[l]=a[l]})}),p}},548:(r,p,i)=>{var g=function(){function l(u,c){var m=[],h=!0,C=!1,T=void 0;try{for(var N=u[Symbol.iterator](),D;!(h=(D=N.next()).done)&&(m.push(D.value),!(c&&m.length===c));h=!0);}catch(_){C=!0,T=_}finally{try{!h&&N.return&&N.return()}finally{if(C)throw T}}return m}return function(u,c){if(Array.isArray(u))return u;if(Symbol.iterator in Object(u))return l(u,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),t=i(140).layoutBase.LinkedList,a={};a.getTopMostNodes=function(l){for(var u={},c=0;c<l.length;c++)u[l[c].id()]=!0;var m=l.filter(function(h,C){typeof h=="number"&&(h=C);for(var T=h.parent()[0];T!=null;){if(u[T.id()])return!1;T=T.parent()[0]}return!0});return m},a.connectComponents=function(l,u,c,m){var h=new t,C=new Set,T=[],N=void 0,D=void 0,_=void 0,I=!1,ot=1,mt=[],vt=[],Dt=function(){var k=l.collection();vt.push(k);var n=c[0],E=l.collection();E.merge(n).merge(n.descendants().intersection(u)),T.push(n),E.forEach(function(v){h.push(v),C.add(v),k.merge(v)});for(var f=function(){n=h.shift();var R=l.collection();n.neighborhood().nodes().forEach(function(U){u.intersection(n.edgesWith(U)).length>0&&R.merge(U)});for(var w=0;w<R.length;w++){var X=R[w];if(N=c.intersection(X.union(X.ancestors())),N!=null&&!C.has(N[0])){var H=N.union(N.descendants());H.forEach(function(U){h.push(U),C.add(U),k.merge(U),c.has(U)&&T.push(U)})}}};h.length!=0;)f();if(k.forEach(function(v){u.intersection(v.connectedEdges()).forEach(function(R){k.has(R.source())&&k.has(R.target())&&k.merge(R)})}),T.length==c.length&&(I=!0),!I||I&&ot>1){D=T[0],_=D.connectedEdges().length,T.forEach(function(v){v.connectedEdges().length<_&&(_=v.connectedEdges().length,D=v)}),mt.push(D.id());var y=l.collection();y.merge(T[0]),T.forEach(function(v){y.merge(v)}),T=[],c=c.difference(y),ot++}};do Dt();while(!I);return m&&mt.length>0&&m.set("dummy"+(m.size+1),mt),vt},a.relocateComponent=function(l,u,c){if(!c.fixedNodeConstraint){var m=Number.POSITIVE_INFINITY,h=Number.NEGATIVE_INFINITY,C=Number.POSITIVE_INFINITY,T=Number.NEGATIVE_INFINITY;if(c.quality=="draft"){var N=!0,D=!1,_=void 0;try{for(var I=u.nodeIndexes[Symbol.iterator](),ot;!(N=(ot=I.next()).done);N=!0){var mt=ot.value,vt=g(mt,2),Dt=vt[0],G=vt[1],k=c.cy.getElementById(Dt);if(k){var n=k.boundingBox(),E=u.xCoords[G]-n.w/2,f=u.xCoords[G]+n.w/2,y=u.yCoords[G]-n.h/2,v=u.yCoords[G]+n.h/2;E<m&&(m=E),f>h&&(h=f),y<C&&(C=y),v>T&&(T=v)}}}catch(U){D=!0,_=U}finally{try{!N&&I.return&&I.return()}finally{if(D)throw _}}var R=l.x-(h+m)/2,w=l.y-(T+C)/2;u.xCoords=u.xCoords.map(function(U){return U+R}),u.yCoords=u.yCoords.map(function(U){return U+w})}else{Object.keys(u).forEach(function(U){var tt=u[U],ft=tt.getRect().x,B=tt.getRect().x+tt.getRect().width,lt=tt.getRect().y,j=tt.getRect().y+tt.getRect().height;ft<m&&(m=ft),B>h&&(h=B),lt<C&&(C=lt),j>T&&(T=j)});var X=l.x-(h+m)/2,H=l.y-(T+C)/2;Object.keys(u).forEach(function(U){var tt=u[U];tt.setCenter(tt.getCenterX()+X,tt.getCenterY()+H)})}}},a.calcBoundingBox=function(l,u,c,m){for(var h=Number.MAX_SAFE_INTEGER,C=Number.MIN_SAFE_INTEGER,T=Number.MAX_SAFE_INTEGER,N=Number.MIN_SAFE_INTEGER,D=void 0,_=void 0,I=void 0,ot=void 0,mt=l.descendants().not(":parent"),vt=mt.length,Dt=0;Dt<vt;Dt++){var G=mt[Dt];D=u[m.get(G.id())]-G.width()/2,_=u[m.get(G.id())]+G.width()/2,I=c[m.get(G.id())]-G.height()/2,ot=c[m.get(G.id())]+G.height()/2,h>D&&(h=D),C<_&&(C=_),T>I&&(T=I),N<ot&&(N=ot)}var k={};return k.topLeftX=h,k.topLeftY=T,k.width=C-h,k.height=N-T,k},a.calcParentsWithoutChildren=function(l,u){var c=l.collection();return u.nodes(":parent").forEach(function(m){var h=!1;m.children().forEach(function(C){C.css("display")!="none"&&(h=!0)}),h||c.merge(m)}),c},r.exports=a},816:(r,p,i)=>{var g=i(548),t=i(140).CoSELayout,a=i(140).CoSENode,l=i(140).layoutBase.PointD,u=i(140).layoutBase.DimensionD,c=i(140).layoutBase.LayoutConstants,m=i(140).layoutBase.FDLayoutConstants,h=i(140).CoSEConstants,C=function(N,D){var _=N.cy,I=N.eles,ot=I.nodes(),mt=I.edges(),vt=void 0,Dt=void 0,G=void 0,k={};N.randomize&&(vt=D.nodeIndexes,Dt=D.xCoords,G=D.yCoords);var n=function(U){return typeof U=="function"},E=function(U,tt){return n(U)?U(tt):U},f=g.calcParentsWithoutChildren(_,I),y=function H(U,tt,ft,B){for(var lt=tt.length,j=0;j<lt;j++){var O=tt[j],$=null;O.intersection(f).length==0&&($=O.children());var K=void 0,ht=O.layoutDimensions({nodeDimensionsIncludeLabels:B.nodeDimensionsIncludeLabels});if(O.outerWidth()!=null&&O.outerHeight()!=null)if(B.randomize)if(!O.isParent())K=U.add(new a(ft.graphManager,new l(Dt[vt.get(O.id())]-ht.w/2,G[vt.get(O.id())]-ht.h/2),new u(parseFloat(ht.w),parseFloat(ht.h))));else{var Mt=g.calcBoundingBox(O,Dt,G,vt);O.intersection(f).length==0?K=U.add(new a(ft.graphManager,new l(Mt.topLeftX,Mt.topLeftY),new u(Mt.width,Mt.height))):K=U.add(new a(ft.graphManager,new l(Mt.topLeftX,Mt.topLeftY),new u(parseFloat(ht.w),parseFloat(ht.h))))}else K=U.add(new a(ft.graphManager,new l(O.position("x")-ht.w/2,O.position("y")-ht.h/2),new u(parseFloat(ht.w),parseFloat(ht.h))));else K=U.add(new a(this.graphManager));if(K.id=O.data("id"),K.nodeRepulsion=E(B.nodeRepulsion,O),K.paddingLeft=parseInt(O.css("padding")),K.paddingTop=parseInt(O.css("padding")),K.paddingRight=parseInt(O.css("padding")),K.paddingBottom=parseInt(O.css("padding")),B.nodeDimensionsIncludeLabels&&(K.labelWidth=O.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,K.labelHeight=O.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,K.labelPosVertical=O.css("text-valign"),K.labelPosHorizontal=O.css("text-halign")),k[O.data("id")]=K,isNaN(K.rect.x)&&(K.rect.x=0),isNaN(K.rect.y)&&(K.rect.y=0),$!=null&&$.length>0){var rt=void 0;rt=ft.getGraphManager().add(ft.newGraph(),K),H(rt,$,ft,B)}}},v=function(U,tt,ft){for(var B=0,lt=0,j=0;j<ft.length;j++){var O=ft[j],$=k[O.data("source")],K=k[O.data("target")];if($&&K&&$!==K&&$.getEdgesBetween(K).length==0){var ht=tt.add(U.newEdge(),$,K);ht.id=O.id(),ht.idealLength=E(N.idealEdgeLength,O),ht.edgeElasticity=E(N.edgeElasticity,O),B+=ht.idealLength,lt++}}N.idealEdgeLength!=null&&(lt>0?h.DEFAULT_EDGE_LENGTH=m.DEFAULT_EDGE_LENGTH=B/lt:n(N.idealEdgeLength)?h.DEFAULT_EDGE_LENGTH=m.DEFAULT_EDGE_LENGTH=50:h.DEFAULT_EDGE_LENGTH=m.DEFAULT_EDGE_LENGTH=N.idealEdgeLength,h.MIN_REPULSION_DIST=m.MIN_REPULSION_DIST=m.DEFAULT_EDGE_LENGTH/10,h.DEFAULT_RADIAL_SEPARATION=m.DEFAULT_EDGE_LENGTH)},R=function(U,tt){tt.fixedNodeConstraint&&(U.constraints.fixedNodeConstraint=tt.fixedNodeConstraint),tt.alignmentConstraint&&(U.constraints.alignmentConstraint=tt.alignmentConstraint),tt.relativePlacementConstraint&&(U.constraints.relativePlacementConstraint=tt.relativePlacementConstraint)};N.nestingFactor!=null&&(h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=m.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=N.nestingFactor),N.gravity!=null&&(h.DEFAULT_GRAVITY_STRENGTH=m.DEFAULT_GRAVITY_STRENGTH=N.gravity),N.numIter!=null&&(h.MAX_ITERATIONS=m.MAX_ITERATIONS=N.numIter),N.gravityRange!=null&&(h.DEFAULT_GRAVITY_RANGE_FACTOR=m.DEFAULT_GRAVITY_RANGE_FACTOR=N.gravityRange),N.gravityCompound!=null&&(h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=m.DEFAULT_COMPOUND_GRAVITY_STRENGTH=N.gravityCompound),N.gravityRangeCompound!=null&&(h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=m.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=N.gravityRangeCompound),N.initialEnergyOnIncremental!=null&&(h.DEFAULT_COOLING_FACTOR_INCREMENTAL=m.DEFAULT_COOLING_FACTOR_INCREMENTAL=N.initialEnergyOnIncremental),N.tilingCompareBy!=null&&(h.TILING_COMPARE_BY=N.tilingCompareBy),N.quality=="proof"?c.QUALITY=2:c.QUALITY=0,h.NODE_DIMENSIONS_INCLUDE_LABELS=m.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=N.nodeDimensionsIncludeLabels,h.DEFAULT_INCREMENTAL=m.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=!N.randomize,h.ANIMATE=m.ANIMATE=c.ANIMATE=N.animate,h.TILE=N.tile,h.TILING_PADDING_VERTICAL=typeof N.tilingPaddingVertical=="function"?N.tilingPaddingVertical.call():N.tilingPaddingVertical,h.TILING_PADDING_HORIZONTAL=typeof N.tilingPaddingHorizontal=="function"?N.tilingPaddingHorizontal.call():N.tilingPaddingHorizontal,h.DEFAULT_INCREMENTAL=m.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=!0,h.PURE_INCREMENTAL=!N.randomize,c.DEFAULT_UNIFORM_LEAF_NODE_SIZES=N.uniformNodeDimensions,N.step=="transformed"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,h.ENFORCE_CONSTRAINTS=!1,h.APPLY_LAYOUT=!1),N.step=="enforced"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!1),N.step=="cose"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!1,h.APPLY_LAYOUT=!0),N.step=="all"&&(N.randomize?h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!0),N.fixedNodeConstraint||N.alignmentConstraint||N.relativePlacementConstraint?h.TREE_REDUCTION_ON_INCREMENTAL=!1:h.TREE_REDUCTION_ON_INCREMENTAL=!0;var w=new t,X=w.newGraphManager();return y(X.addRoot(),g.getTopMostNodes(ot),w,N),v(w,X,mt),R(w,N),w.runLayout(),k};r.exports={coseLayout:C}},212:(r,p,i)=>{var g=function(){function N(D,_){for(var I=0;I<_.length;I++){var ot=_[I];ot.enumerable=ot.enumerable||!1,ot.configurable=!0,"value"in ot&&(ot.writable=!0),Object.defineProperty(D,ot.key,ot)}}return function(D,_,I){return _&&N(D.prototype,_),I&&N(D,I),D}}();function t(N,D){if(!(N instanceof D))throw new TypeError("Cannot call a class as a function")}var a=i(658),l=i(548),u=i(657),c=u.spectralLayout,m=i(816),h=m.coseLayout,C=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1e3,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:1e-7,nodeRepulsion:function(D){return 4500},idealEdgeLength:function(D){return 50},edgeElasticity:function(D){return .45},nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}}),T=function(){function N(D){t(this,N),this.options=a({},C,D)}return g(N,[{key:"run",value:function(){var _=this,I=this.options,ot=I.cy,mt=I.eles,vt=[],Dt=void 0,G=void 0,k=[],n=void 0,E=[];I.fixedNodeConstraint&&(!Array.isArray(I.fixedNodeConstraint)||I.fixedNodeConstraint.length==0)&&(I.fixedNodeConstraint=void 0),I.alignmentConstraint&&(I.alignmentConstraint.vertical&&(!Array.isArray(I.alignmentConstraint.vertical)||I.alignmentConstraint.vertical.length==0)&&(I.alignmentConstraint.vertical=void 0),I.alignmentConstraint.horizontal&&(!Array.isArray(I.alignmentConstraint.horizontal)||I.alignmentConstraint.horizontal.length==0)&&(I.alignmentConstraint.horizontal=void 0)),I.relativePlacementConstraint&&(!Array.isArray(I.relativePlacementConstraint)||I.relativePlacementConstraint.length==0)&&(I.relativePlacementConstraint=void 0);var f=I.fixedNodeConstraint||I.alignmentConstraint||I.relativePlacementConstraint;f&&(I.tile=!1,I.packComponents=!1);var y=void 0,v=!1;if(ot.layoutUtilities&&I.packComponents&&(y=ot.layoutUtilities("get"),y||(y=ot.layoutUtilities()),v=!0),mt.nodes().length>0)if(v){var X=l.getTopMostNodes(I.eles.nodes());if(n=l.connectComponents(ot,I.eles,X),n.forEach(function(L){var M=L.boundingBox();E.push({x:M.x1+M.w/2,y:M.y1+M.h/2})}),I.randomize&&n.forEach(function(L){I.eles=L,vt.push(c(I))}),I.quality=="default"||I.quality=="proof"){var H=ot.collection();if(I.tile){var U=new Map,tt=[],ft=[],B=0,lt={nodeIndexes:U,xCoords:tt,yCoords:ft},j=[];if(n.forEach(function(L,M){L.edges().length==0&&(L.nodes().forEach(function(V,Z){H.merge(L.nodes()[Z]),V.isParent()||(lt.nodeIndexes.set(L.nodes()[Z].id(),B++),lt.xCoords.push(L.nodes()[0].position().x),lt.yCoords.push(L.nodes()[0].position().y))}),j.push(M))}),H.length>1){var O=H.boundingBox();E.push({x:O.x1+O.w/2,y:O.y1+O.h/2}),n.push(H),vt.push(lt);for(var $=j.length-1;$>=0;$--)n.splice(j[$],1),vt.splice(j[$],1),E.splice(j[$],1)}}n.forEach(function(L,M){I.eles=L,k.push(h(I,vt[M])),l.relocateComponent(E[M],k[M],I)})}else n.forEach(function(L,M){l.relocateComponent(E[M],vt[M],I)});var K=new Set;if(n.length>1){var ht=[],Mt=mt.filter(function(L){return L.css("display")=="none"});n.forEach(function(L,M){var V=void 0;if(I.quality=="draft"&&(V=vt[M].nodeIndexes),L.nodes().not(Mt).length>0){var Z={};Z.edges=[],Z.nodes=[];var Q=void 0;L.nodes().not(Mt).forEach(function(ct){if(I.quality=="draft")if(!ct.isParent())Q=V.get(ct.id()),Z.nodes.push({x:vt[M].xCoords[Q]-ct.boundingbox().w/2,y:vt[M].yCoords[Q]-ct.boundingbox().h/2,width:ct.boundingbox().w,height:ct.boundingbox().h});else{var q=l.calcBoundingBox(ct,vt[M].xCoords,vt[M].yCoords,V);Z.nodes.push({x:q.topLeftX,y:q.topLeftY,width:q.width,height:q.height})}else k[M][ct.id()]&&Z.nodes.push({x:k[M][ct.id()].getLeft(),y:k[M][ct.id()].getTop(),width:k[M][ct.id()].getWidth(),height:k[M][ct.id()].getHeight()})}),L.edges().forEach(function(ct){var q=ct.source(),at=ct.target();if(q.css("display")!="none"&&at.css("display")!="none")if(I.quality=="draft"){var et=V.get(q.id()),nt=V.get(at.id()),dt=[],Tt=[];if(q.isParent()){var gt=l.calcBoundingBox(q,vt[M].xCoords,vt[M].yCoords,V);dt.push(gt.topLeftX+gt.width/2),dt.push(gt.topLeftY+gt.height/2)}else dt.push(vt[M].xCoords[et]),dt.push(vt[M].yCoords[et]);if(at.isParent()){var A=l.calcBoundingBox(at,vt[M].xCoords,vt[M].yCoords,V);Tt.push(A.topLeftX+A.width/2),Tt.push(A.topLeftY+A.height/2)}else Tt.push(vt[M].xCoords[nt]),Tt.push(vt[M].yCoords[nt]);Z.edges.push({startX:dt[0],startY:dt[1],endX:Tt[0],endY:Tt[1]})}else k[M][q.id()]&&k[M][at.id()]&&Z.edges.push({startX:k[M][q.id()].getCenterX(),startY:k[M][q.id()].getCenterY(),endX:k[M][at.id()].getCenterX(),endY:k[M][at.id()].getCenterY()})}),Z.nodes.length>0&&(ht.push(Z),K.add(M))}});var rt=y.packComponents(ht,I.randomize).shifts;if(I.quality=="draft")vt.forEach(function(L,M){var V=L.xCoords.map(function(Q){return Q+rt[M].dx}),Z=L.yCoords.map(function(Q){return Q+rt[M].dy});L.xCoords=V,L.yCoords=Z});else{var bt=0;K.forEach(function(L){Object.keys(k[L]).forEach(function(M){var V=k[L][M];V.setCenter(V.getCenterX()+rt[bt].dx,V.getCenterY()+rt[bt].dy)}),bt++})}}}else{var R=I.eles.boundingBox();if(E.push({x:R.x1+R.w/2,y:R.y1+R.h/2}),I.randomize){var w=c(I);vt.push(w)}I.quality=="default"||I.quality=="proof"?(k.push(h(I,vt[0])),l.relocateComponent(E[0],k[0],I)):l.relocateComponent(E[0],vt[0],I)}var Rt=function(M,V){if(I.quality=="default"||I.quality=="proof"){typeof M=="number"&&(M=V);var Z=void 0,Q=void 0,ct=M.data("id");return k.forEach(function(at){ct in at&&(Z={x:at[ct].getRect().getCenterX(),y:at[ct].getRect().getCenterY()},Q=at[ct])}),I.nodeDimensionsIncludeLabels&&(Q.labelWidth&&(Q.labelPosHorizontal=="left"?Z.x+=Q.labelWidth/2:Q.labelPosHorizontal=="right"&&(Z.x-=Q.labelWidth/2)),Q.labelHeight&&(Q.labelPosVertical=="top"?Z.y+=Q.labelHeight/2:Q.labelPosVertical=="bottom"&&(Z.y-=Q.labelHeight/2))),Z==null&&(Z={x:M.position("x"),y:M.position("y")}),{x:Z.x,y:Z.y}}else{var q=void 0;return vt.forEach(function(at){var et=at.nodeIndexes.get(M.id());et!=null&&(q={x:at.xCoords[et],y:at.yCoords[et]})}),q==null&&(q={x:M.position("x"),y:M.position("y")}),{x:q.x,y:q.y}}};if(I.quality=="default"||I.quality=="proof"||I.randomize){var Xt=l.calcParentsWithoutChildren(ot,mt),x=mt.filter(function(L){return L.css("display")=="none"});I.eles=mt.not(x),mt.nodes().not(":parent").not(x).layoutPositions(_,I,Rt),Xt.length>0&&Xt.forEach(function(L){L.position(Rt(L))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),N}();r.exports=T},657:(r,p,i)=>{var g=i(548),t=i(140).layoutBase.Matrix,a=i(140).layoutBase.SVD,l=function(c){var m=c.cy,h=c.eles,C=h.nodes(),T=h.nodes(":parent"),N=new Map,D=new Map,_=new Map,I=[],ot=[],mt=[],vt=[],Dt=[],G=[],k=[],n=[],E=void 0,f=void 0,y=1e8,v=1e-9,R=c.piTol,w=c.samplingType,X=c.nodeSeparation,H=void 0,U=function(){for(var b=0,Y=0,P=!1;Y<H;){b=Math.floor(Math.random()*f),P=!1;for(var W=0;W<Y;W++)if(vt[W]==b){P=!0;break}if(!P)vt[Y]=b,Y++;else continue}},tt=function(b,Y,P){for(var W=[],yt=0,st=0,z=0,J=void 0,pt=[],Ot=0,At=1,St=0;St<f;St++)pt[St]=y;for(W[st]=b,pt[b]=0;st>=yt;){z=W[yt++];for(var Nt=I[z],Et=0;Et<Nt.length;Et++)J=D.get(Nt[Et]),pt[J]==y&&(pt[J]=pt[z]+1,W[++st]=J);G[z][Y]=pt[z]*X}if(P){for(var wt=0;wt<f;wt++)G[wt][Y]<Dt[wt]&&(Dt[wt]=G[wt][Y]);for(var Lt=0;Lt<f;Lt++)Dt[Lt]>Ot&&(Ot=Dt[Lt],At=Lt)}return At},ft=function(b){var Y=void 0;if(b){Y=Math.floor(Math.random()*f),E=Y;for(var W=0;W<f;W++)Dt[W]=y;for(var yt=0;yt<H;yt++)vt[yt]=Y,Y=tt(Y,yt,b)}else{U();for(var P=0;P<H;P++)tt(vt[P],P,b,!1)}for(var st=0;st<f;st++)for(var z=0;z<H;z++)G[st][z]*=G[st][z];for(var J=0;J<H;J++)k[J]=[];for(var pt=0;pt<H;pt++)for(var Ot=0;Ot<H;Ot++)k[pt][Ot]=G[vt[Ot]][pt]},B=function(){for(var b=a.svd(k),Y=b.S,P=b.U,W=b.V,yt=Y[0]*Y[0]*Y[0],st=[],z=0;z<H;z++){st[z]=[];for(var J=0;J<H;J++)st[z][J]=0,z==J&&(st[z][J]=Y[z]/(Y[z]*Y[z]+yt/(Y[z]*Y[z])))}n=t.multMat(t.multMat(W,st),t.transpose(P))},lt=function(){for(var b=void 0,Y=void 0,P=[],W=[],yt=[],st=[],z=0;z<f;z++)P[z]=Math.random(),W[z]=Math.random();P=t.normalize(P),W=t.normalize(W);for(var J=0,pt=v,Ot=v,At=void 0;;){J++;for(var St=0;St<f;St++)yt[St]=P[St];if(P=t.multGamma(t.multL(t.multGamma(yt),G,n)),b=t.dotProduct(yt,P),P=t.normalize(P),pt=t.dotProduct(yt,P),At=Math.abs(pt/Ot),At<=1+R&&At>=1)break;Ot=pt}for(var Nt=0;Nt<f;Nt++)yt[Nt]=P[Nt];for(J=0,Ot=v;;){J++;for(var Et=0;Et<f;Et++)st[Et]=W[Et];if(st=t.minusOp(st,t.multCons(yt,t.dotProduct(yt,st))),W=t.multGamma(t.multL(t.multGamma(st),G,n)),Y=t.dotProduct(st,W),W=t.normalize(W),pt=t.dotProduct(st,W),At=Math.abs(pt/Ot),At<=1+R&&At>=1)break;Ot=pt}for(var wt=0;wt<f;wt++)st[wt]=W[wt];ot=t.multCons(yt,Math.sqrt(Math.abs(b))),mt=t.multCons(st,Math.sqrt(Math.abs(Y)))};g.connectComponents(m,h,g.getTopMostNodes(C),N),T.forEach(function(F){g.connectComponents(m,h,g.getTopMostNodes(F.descendants().intersection(h)),N)});for(var j=0,O=0;O<C.length;O++)C[O].isParent()||D.set(C[O].id(),j++);var $=!0,K=!1,ht=void 0;try{for(var Mt=N.keys()[Symbol.iterator](),rt;!($=(rt=Mt.next()).done);$=!0){var bt=rt.value;D.set(bt,j++)}}catch(F){K=!0,ht=F}finally{try{!$&&Mt.return&&Mt.return()}finally{if(K)throw ht}}for(var Rt=0;Rt<D.size;Rt++)I[Rt]=[];T.forEach(function(F){for(var b=F.children().intersection(h);b.nodes(":childless").length==0;)b=b.nodes()[0].children().intersection(h);var Y=0,P=b.nodes(":childless")[0].connectedEdges().length;b.nodes(":childless").forEach(function(W,yt){W.connectedEdges().length<P&&(P=W.connectedEdges().length,Y=yt)}),_.set(F.id(),b.nodes(":childless")[Y].id())}),C.forEach(function(F){var b=void 0;F.isParent()?b=D.get(_.get(F.id())):b=D.get(F.id()),F.neighborhood().nodes().forEach(function(Y){h.intersection(F.edgesWith(Y)).length>0&&(Y.isParent()?I[b].push(_.get(Y.id())):I[b].push(Y.id()))})});var Xt=function(b){var Y=D.get(b),P=void 0;N.get(b).forEach(function(W){m.getElementById(W).isParent()?P=_.get(W):P=W,I[Y].push(P),I[D.get(P)].push(b)})},x=!0,L=!1,M=void 0;try{for(var V=N.keys()[Symbol.iterator](),Z;!(x=(Z=V.next()).done);x=!0){var Q=Z.value;Xt(Q)}}catch(F){L=!0,M=F}finally{try{!x&&V.return&&V.return()}finally{if(L)throw M}}f=D.size;var ct=void 0;if(f>2){H=f<c.sampleSize?f:c.sampleSize;for(var q=0;q<f;q++)G[q]=[];for(var at=0;at<H;at++)n[at]=[];return c.quality=="draft"||c.step=="all"?(ft(w),B(),lt(),ct={nodeIndexes:D,xCoords:ot,yCoords:mt}):(D.forEach(function(F,b){ot.push(m.getElementById(b).position("x")),mt.push(m.getElementById(b).position("y"))}),ct={nodeIndexes:D,xCoords:ot,yCoords:mt}),ct}else{var et=D.keys(),nt=m.getElementById(et.next().value),dt=nt.position(),Tt=nt.outerWidth();if(ot.push(dt.x),mt.push(dt.y),f==2){var gt=m.getElementById(et.next().value),A=gt.outerWidth();ot.push(dt.x+Tt/2+A/2+c.idealEdgeLength),mt.push(dt.y)}return ct={nodeIndexes:D,xCoords:ot,yCoords:mt},ct}};r.exports={spectralLayout:l}},579:(r,p,i)=>{var g=i(212),t=function(l){l&&l("layout","fcose",g)};typeof cytoscape!="undefined"&&t(cytoscape),r.exports=t},140:r=>{r.exports=S}},s={};function o(r){var p=s[r];if(p!==void 0)return p.exports;var i=s[r]={exports:{}};return d[r](i,i.exports,o),i.exports}var e=o(579);return e})()})},26914:function(Yt,it,ut){(function(d,s){Yt.exports=s(ut(13035))})(this,function(S){return(()=>{"use strict";var d={45:(r,p,i)=>{var g={};g.layoutBase=i(551),g.CoSEConstants=i(806),g.CoSEEdge=i(767),g.CoSEGraph=i(880),g.CoSEGraphManager=i(578),g.CoSELayout=i(765),g.CoSENode=i(991),g.ConstraintHandler=i(902),r.exports=g},806:(r,p,i)=>{var g=i(551).FDLayoutConstants;function t(){}for(var a in g)t[a]=g[a];t.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,t.DEFAULT_RADIAL_SEPARATION=g.DEFAULT_EDGE_LENGTH,t.DEFAULT_COMPONENT_SEPERATION=60,t.TILE=!0,t.TILING_PADDING_VERTICAL=10,t.TILING_PADDING_HORIZONTAL=10,t.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,t.ENFORCE_CONSTRAINTS=!0,t.APPLY_LAYOUT=!0,t.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,t.TREE_REDUCTION_ON_INCREMENTAL=!0,t.PURE_INCREMENTAL=t.DEFAULT_INCREMENTAL,r.exports=t},767:(r,p,i)=>{var g=i(551).FDLayoutEdge;function t(l,u,c){g.call(this,l,u,c)}t.prototype=Object.create(g.prototype);for(var a in g)t[a]=g[a];r.exports=t},880:(r,p,i)=>{var g=i(551).LGraph;function t(l,u,c){g.call(this,l,u,c)}t.prototype=Object.create(g.prototype);for(var a in g)t[a]=g[a];r.exports=t},578:(r,p,i)=>{var g=i(551).LGraphManager;function t(l){g.call(this,l)}t.prototype=Object.create(g.prototype);for(var a in g)t[a]=g[a];r.exports=t},765:(r,p,i)=>{var g=i(551).FDLayout,t=i(578),a=i(880),l=i(991),u=i(767),c=i(806),m=i(902),h=i(551).FDLayoutConstants,C=i(551).LayoutConstants,T=i(551).Point,N=i(551).PointD,D=i(551).DimensionD,_=i(551).Layout,I=i(551).Integer,ot=i(551).IGeometry,mt=i(551).LGraph,vt=i(551).Transform,Dt=i(551).LinkedList;function G(){g.call(this),this.toBeTiled={},this.constraints={}}G.prototype=Object.create(g.prototype);for(var k in g)G[k]=g[k];G.prototype.newGraphManager=function(){var n=new t(this);return this.graphManager=n,n},G.prototype.newGraph=function(n){return new a(null,this.graphManager,n)},G.prototype.newNode=function(n){return new l(this.graphManager,n)},G.prototype.newEdge=function(n){return new u(null,null,n)},G.prototype.initParameters=function(){g.prototype.initParameters.call(this,arguments),this.isSubLayout||(c.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=c.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=c.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=h.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=h.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=h.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},G.prototype.initSpringEmbedder=function(){g.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/h.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},G.prototype.layout=function(){var n=C.DEFAULT_CREATE_BENDS_AS_NEEDED;return n&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},G.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(c.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),f=this.nodesWithGravity.filter(function(R){return E.has(R)});this.graphManager.setAllNodesToApplyGravitation(f)}}else{var n=this.getFlatForest();if(n.length>0)this.positionNodesRadially(n);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),f=this.nodesWithGravity.filter(function(y){return E.has(y)});this.graphManager.setAllNodesToApplyGravitation(f),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(m.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),c.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},G.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%h.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var n=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(v){return n.has(v)});this.graphManager.setAllNodesToApplyGravitation(E),this.graphManager.updateBounds(),this.updateGrid(),c.PURE_INCREMENTAL?this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),c.PURE_INCREMENTAL?this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var f=!this.isTreeGrowing&&!this.isGrowthFinished,y=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(f,y),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},G.prototype.getPositionsData=function(){for(var n=this.graphManager.getAllNodes(),E={},f=0;f<n.length;f++){var y=n[f].rect,v=n[f].id;E[v]={id:v,x:y.getCenterX(),y:y.getCenterY(),w:y.width,h:y.height}}return E},G.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var n=!1;if(h.ANIMATE==="during")this.emit("layoutstarted");else{for(;!n;)n=this.tick();this.graphManager.updateBounds()}},G.prototype.moveNodes=function(){for(var n=this.getAllNodes(),E,f=0;f<n.length;f++)E=n[f],E.calculateDisplacement();Object.keys(this.constraints).length>0&&this.updateDisplacements();for(var f=0;f<n.length;f++)E=n[f],E.move()},G.prototype.initConstraintVariables=function(){var n=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var E=this.graphManager.getAllNodes(),f=0;f<E.length;f++){var y=E[f];this.idToNodeMap.set(y.id,y)}var v=function O($){for(var K=$.getChild().getNodes(),ht,Mt=0,rt=0;rt<K.length;rt++)ht=K[rt],ht.getChild()==null?n.fixedNodeSet.has(ht.id)&&(Mt+=100):Mt+=O(ht);return Mt};if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function(K){n.fixedNodeSet.add(K.nodeId)});for(var E=this.graphManager.getAllNodes(),y,f=0;f<E.length;f++)if(y=E[f],y.getChild()!=null){var R=v(y);R>0&&(y.fixedNodeWeight=R)}}if(this.constraints.relativePlacementConstraint){var w=new Map,X=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(O){n.fixedNodesOnHorizontal.add(O),n.fixedNodesOnVertical.add(O)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var H=this.constraints.alignmentConstraint.vertical,f=0;f<H.length;f++)this.dummyToNodeForVerticalAlignment.set("dummy"+f,[]),H[f].forEach(function($){w.set($,"dummy"+f),n.dummyToNodeForVerticalAlignment.get("dummy"+f).push($),n.fixedNodeSet.has($)&&n.fixedNodesOnHorizontal.add("dummy"+f)});if(this.constraints.alignmentConstraint.horizontal)for(var U=this.constraints.alignmentConstraint.horizontal,f=0;f<U.length;f++)this.dummyToNodeForHorizontalAlignment.set("dummy"+f,[]),U[f].forEach(function($){X.set($,"dummy"+f),n.dummyToNodeForHorizontalAlignment.get("dummy"+f).push($),n.fixedNodeSet.has($)&&n.fixedNodesOnVertical.add("dummy"+f)})}if(c.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(O){var $,K,ht;for(ht=O.length-1;ht>=2*O.length/3;ht--)$=Math.floor(Math.random()*(ht+1)),K=O[ht],O[ht]=O[$],O[$]=K;return O},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var $=w.has(O.left)?w.get(O.left):O.left,K=w.has(O.right)?w.get(O.right):O.right;n.nodesInRelativeHorizontal.includes($)||(n.nodesInRelativeHorizontal.push($),n.nodeToRelativeConstraintMapHorizontal.set($,[]),n.dummyToNodeForVerticalAlignment.has($)?n.nodeToTempPositionMapHorizontal.set($,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get($)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set($,n.idToNodeMap.get($).getCenterX())),n.nodesInRelativeHorizontal.includes(K)||(n.nodesInRelativeHorizontal.push(K),n.nodeToRelativeConstraintMapHorizontal.set(K,[]),n.dummyToNodeForVerticalAlignment.has(K)?n.nodeToTempPositionMapHorizontal.set(K,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(K)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(K,n.idToNodeMap.get(K).getCenterX())),n.nodeToRelativeConstraintMapHorizontal.get($).push({right:K,gap:O.gap}),n.nodeToRelativeConstraintMapHorizontal.get(K).push({left:$,gap:O.gap})}else{var ht=X.has(O.top)?X.get(O.top):O.top,Mt=X.has(O.bottom)?X.get(O.bottom):O.bottom;n.nodesInRelativeVertical.includes(ht)||(n.nodesInRelativeVertical.push(ht),n.nodeToRelativeConstraintMapVertical.set(ht,[]),n.dummyToNodeForHorizontalAlignment.has(ht)?n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(ht)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(ht).getCenterY())),n.nodesInRelativeVertical.includes(Mt)||(n.nodesInRelativeVertical.push(Mt),n.nodeToRelativeConstraintMapVertical.set(Mt,[]),n.dummyToNodeForHorizontalAlignment.has(Mt)?n.nodeToTempPositionMapVertical.set(Mt,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(Mt)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(Mt,n.idToNodeMap.get(Mt).getCenterY())),n.nodeToRelativeConstraintMapVertical.get(ht).push({bottom:Mt,gap:O.gap}),n.nodeToRelativeConstraintMapVertical.get(Mt).push({top:ht,gap:O.gap})}});else{var tt=new Map,ft=new Map;this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var $=w.has(O.left)?w.get(O.left):O.left,K=w.has(O.right)?w.get(O.right):O.right;tt.has($)?tt.get($).push(K):tt.set($,[K]),tt.has(K)?tt.get(K).push($):tt.set(K,[$])}else{var ht=X.has(O.top)?X.get(O.top):O.top,Mt=X.has(O.bottom)?X.get(O.bottom):O.bottom;ft.has(ht)?ft.get(ht).push(Mt):ft.set(ht,[Mt]),ft.has(Mt)?ft.get(Mt).push(ht):ft.set(Mt,[ht])}});var B=function($,K){var ht=[],Mt=[],rt=new Dt,bt=new Set,Rt=0;return $.forEach(function(Xt,x){if(!bt.has(x)){ht[Rt]=[],Mt[Rt]=!1;var L=x;for(rt.push(L),bt.add(L),ht[Rt].push(L);rt.length!=0;){L=rt.shift(),K.has(L)&&(Mt[Rt]=!0);var M=$.get(L);M.forEach(function(V){bt.has(V)||(rt.push(V),bt.add(V),ht[Rt].push(V))})}Rt++}}),{components:ht,isFixed:Mt}},lt=B(tt,n.fixedNodesOnHorizontal);this.componentsOnHorizontal=lt.components,this.fixedComponentsOnHorizontal=lt.isFixed;var j=B(ft,n.fixedNodesOnVertical);this.componentsOnVertical=j.components,this.fixedComponentsOnVertical=j.isFixed}}},G.prototype.updateDisplacements=function(){var n=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(j){var O=n.idToNodeMap.get(j.nodeId);O.displacementX=0,O.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var E=this.constraints.alignmentConstraint.vertical,f=0;f<E.length;f++){for(var y=0,v=0;v<E[f].length;v++){if(this.fixedNodeSet.has(E[f][v])){y=0;break}y+=this.idToNodeMap.get(E[f][v]).displacementX}for(var R=y/E[f].length,v=0;v<E[f].length;v++)this.idToNodeMap.get(E[f][v]).displacementX=R}if(this.constraints.alignmentConstraint.horizontal)for(var w=this.constraints.alignmentConstraint.horizontal,f=0;f<w.length;f++){for(var X=0,v=0;v<w[f].length;v++){if(this.fixedNodeSet.has(w[f][v])){X=0;break}X+=this.idToNodeMap.get(w[f][v]).displacementY}for(var H=X/w[f].length,v=0;v<w[f].length;v++)this.idToNodeMap.get(w[f][v]).displacementY=H}}if(this.constraints.relativePlacementConstraint)if(c.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function(j){if(!n.fixedNodesOnHorizontal.has(j)){var O=0;n.dummyToNodeForVerticalAlignment.has(j)?O=n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(j)[0]).displacementX:O=n.idToNodeMap.get(j).displacementX,n.nodeToRelativeConstraintMapHorizontal.get(j).forEach(function($){if($.right){var K=n.nodeToTempPositionMapHorizontal.get($.right)-n.nodeToTempPositionMapHorizontal.get(j)-O;K<$.gap&&(O-=$.gap-K)}else{var K=n.nodeToTempPositionMapHorizontal.get(j)-n.nodeToTempPositionMapHorizontal.get($.left)+O;K<$.gap&&(O+=$.gap-K)}}),n.nodeToTempPositionMapHorizontal.set(j,n.nodeToTempPositionMapHorizontal.get(j)+O),n.dummyToNodeForVerticalAlignment.has(j)?n.dummyToNodeForVerticalAlignment.get(j).forEach(function($){n.idToNodeMap.get($).displacementX=O}):n.idToNodeMap.get(j).displacementX=O}}),this.nodesInRelativeVertical.forEach(function(j){if(!n.fixedNodesOnHorizontal.has(j)){var O=0;n.dummyToNodeForHorizontalAlignment.has(j)?O=n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(j)[0]).displacementY:O=n.idToNodeMap.get(j).displacementY,n.nodeToRelativeConstraintMapVertical.get(j).forEach(function($){if($.bottom){var K=n.nodeToTempPositionMapVertical.get($.bottom)-n.nodeToTempPositionMapVertical.get(j)-O;K<$.gap&&(O-=$.gap-K)}else{var K=n.nodeToTempPositionMapVertical.get(j)-n.nodeToTempPositionMapVertical.get($.top)+O;K<$.gap&&(O+=$.gap-K)}}),n.nodeToTempPositionMapVertical.set(j,n.nodeToTempPositionMapVertical.get(j)+O),n.dummyToNodeForHorizontalAlignment.has(j)?n.dummyToNodeForHorizontalAlignment.get(j).forEach(function($){n.idToNodeMap.get($).displacementY=O}):n.idToNodeMap.get(j).displacementY=O}});else{for(var f=0;f<this.componentsOnHorizontal.length;f++){var U=this.componentsOnHorizontal[f];if(this.fixedComponentsOnHorizontal[f])for(var v=0;v<U.length;v++)this.dummyToNodeForVerticalAlignment.has(U[v])?this.dummyToNodeForVerticalAlignment.get(U[v]).forEach(function($){n.idToNodeMap.get($).displacementX=0}):this.idToNodeMap.get(U[v]).displacementX=0;else{for(var tt=0,ft=0,v=0;v<U.length;v++)if(this.dummyToNodeForVerticalAlignment.has(U[v])){var B=this.dummyToNodeForVerticalAlignment.get(U[v]);tt+=B.length*this.idToNodeMap.get(B[0]).displacementX,ft+=B.length}else tt+=this.idToNodeMap.get(U[v]).displacementX,ft++;for(var lt=tt/ft,v=0;v<U.length;v++)this.dummyToNodeForVerticalAlignment.has(U[v])?this.dummyToNodeForVerticalAlignment.get(U[v]).forEach(function($){n.idToNodeMap.get($).displacementX=lt}):this.idToNodeMap.get(U[v]).displacementX=lt}}for(var f=0;f<this.componentsOnVertical.length;f++){var U=this.componentsOnVertical[f];if(this.fixedComponentsOnVertical[f])for(var v=0;v<U.length;v++)this.dummyToNodeForHorizontalAlignment.has(U[v])?this.dummyToNodeForHorizontalAlignment.get(U[v]).forEach(function(K){n.idToNodeMap.get(K).displacementY=0}):this.idToNodeMap.get(U[v]).displacementY=0;else{for(var tt=0,ft=0,v=0;v<U.length;v++)if(this.dummyToNodeForHorizontalAlignment.has(U[v])){var B=this.dummyToNodeForHorizontalAlignment.get(U[v]);tt+=B.length*this.idToNodeMap.get(B[0]).displacementY,ft+=B.length}else tt+=this.idToNodeMap.get(U[v]).displacementY,ft++;for(var lt=tt/ft,v=0;v<U.length;v++)this.dummyToNodeForHorizontalAlignment.has(U[v])?this.dummyToNodeForHorizontalAlignment.get(U[v]).forEach(function(rt){n.idToNodeMap.get(rt).displacementY=lt}):this.idToNodeMap.get(U[v]).displacementY=lt}}}},G.prototype.calculateNodesToApplyGravitationTo=function(){var n=[],E,f=this.graphManager.getGraphs(),y=f.length,v;for(v=0;v<y;v++)E=f[v],E.updateConnected(),E.isConnected||(n=n.concat(E.getNodes()));return n},G.prototype.createBendpoints=function(){var n=[];n=n.concat(this.graphManager.getAllEdges());var E=new Set,f;for(f=0;f<n.length;f++){var y=n[f];if(!E.has(y)){var v=y.getSource(),R=y.getTarget();if(v==R)y.getBendpoints().push(new N),y.getBendpoints().push(new N),this.createDummyNodesForBendpoints(y),E.add(y);else{var w=[];if(w=w.concat(v.getEdgeListToNode(R)),w=w.concat(R.getEdgeListToNode(v)),!E.has(w[0])){if(w.length>1){var X;for(X=0;X<w.length;X++){var H=w[X];H.getBendpoints().push(new N),this.createDummyNodesForBendpoints(H)}}w.forEach(function(U){E.add(U)})}}}if(E.size==n.length)break}},G.prototype.positionNodesRadially=function(n){for(var E=new T(0,0),f=Math.ceil(Math.sqrt(n.length)),y=0,v=0,R=0,w=new N(0,0),X=0;X<n.length;X++){X%f==0&&(R=0,v=y,X!=0&&(v+=c.DEFAULT_COMPONENT_SEPERATION),y=0);var H=n[X],U=_.findCenterOfTree(H);E.x=R,E.y=v,w=G.radialLayout(H,U,E),w.y>y&&(y=Math.floor(w.y)),R=Math.floor(w.x+c.DEFAULT_COMPONENT_SEPERATION)}this.transform(new N(C.WORLD_CENTER_X-w.x/2,C.WORLD_CENTER_Y-w.y/2))},G.radialLayout=function(n,E,f){var y=Math.max(this.maxDiagonalInTree(n),c.DEFAULT_RADIAL_SEPARATION);G.branchRadialLayout(E,null,0,359,0,y);var v=mt.calculateBounds(n),R=new vt;R.setDeviceOrgX(v.getMinX()),R.setDeviceOrgY(v.getMinY()),R.setWorldOrgX(f.x),R.setWorldOrgY(f.y);for(var w=0;w<n.length;w++){var X=n[w];X.transform(R)}var H=new N(v.getMaxX(),v.getMaxY());return R.inverseTransformPoint(H)},G.branchRadialLayout=function(n,E,f,y,v,R){var w=(y-f+1)/2;w<0&&(w+=180);var X=(w+f)%360,H=X*ot.TWO_PI/360,U=Math.cos(H),tt=v*Math.cos(H),ft=v*Math.sin(H);n.setCenter(tt,ft);var B=[];B=B.concat(n.getEdges());var lt=B.length;E!=null&&lt--;for(var j=0,O=B.length,$,K=n.getEdgesBetween(E);K.length>1;){var ht=K[0];K.splice(0,1);var Mt=B.indexOf(ht);Mt>=0&&B.splice(Mt,1),O--,lt--}E!=null?$=(B.indexOf(K[0])+1)%O:$=0;for(var rt=Math.abs(y-f)/lt,bt=$;j!=lt;bt=++bt%O){var Rt=B[bt].getOtherEnd(n);if(Rt!=E){var Xt=(f+j*rt)%360,x=(Xt+rt)%360;G.branchRadialLayout(Rt,n,Xt,x,v+R,R),j++}}},G.maxDiagonalInTree=function(n){for(var E=I.MIN_VALUE,f=0;f<n.length;f++){var y=n[f],v=y.getDiagonal();v>E&&(E=v)}return E},G.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},G.prototype.groupZeroDegreeMembers=function(){var n=this,E={};this.memberGroups={},this.idToDummyNode={};for(var f=[],y=this.graphManager.getAllNodes(),v=0;v<y.length;v++){var R=y[v],w=R.getParent();this.getNodeDegreeWithChildren(R)===0&&(w.id==null||!this.getToBeTiled(w))&&f.push(R)}for(var v=0;v<f.length;v++){var R=f[v],X=R.getParent().id;typeof E[X]=="undefined"&&(E[X]=[]),E[X]=E[X].concat(R)}Object.keys(E).forEach(function(H){if(E[H].length>1){var U="DummyCompound_"+H;n.memberGroups[U]=E[H];var tt=E[H][0].getParent(),ft=new l(n.graphManager);ft.id=U,ft.paddingLeft=tt.paddingLeft||0,ft.paddingRight=tt.paddingRight||0,ft.paddingBottom=tt.paddingBottom||0,ft.paddingTop=tt.paddingTop||0,n.idToDummyNode[U]=ft;var B=n.getGraphManager().add(n.newGraph(),ft),lt=tt.getChild();lt.add(ft);for(var j=0;j<E[H].length;j++){var O=E[H][j];lt.remove(O),B.add(O)}}})},G.prototype.clearCompounds=function(){var n={},E={};this.performDFSOnCompounds();for(var f=0;f<this.compoundOrder.length;f++)E[this.compoundOrder[f].id]=this.compoundOrder[f],n[this.compoundOrder[f].id]=[].concat(this.compoundOrder[f].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[f].getChild()),this.compoundOrder[f].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(n,E)},G.prototype.clearZeroDegreeMembers=function(){var n=this,E=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(f){var y=n.idToDummyNode[f];if(E[f]=n.tileNodes(n.memberGroups[f],y.paddingLeft+y.paddingRight),y.rect.width=E[f].width,y.rect.height=E[f].height,y.setCenter(E[f].centerX,E[f].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,c.NODE_DIMENSIONS_INCLUDE_LABELS){var v=y.rect.width,R=y.rect.height;y.labelWidth&&(y.labelPosHorizontal=="left"?(y.rect.x-=y.labelWidth,y.setWidth(v+y.labelWidth),y.labelMarginLeft=y.labelWidth):y.labelPosHorizontal=="center"&&y.labelWidth>v?(y.rect.x-=(y.labelWidth-v)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-v)/2):y.labelPosHorizontal=="right"&&y.setWidth(v+y.labelWidth)),y.labelHeight&&(y.labelPosVertical=="top"?(y.rect.y-=y.labelHeight,y.setHeight(R+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>R?(y.rect.y-=(y.labelHeight-R)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-R)/2):y.labelPosVertical=="bottom"&&y.setHeight(R+y.labelHeight))}})},G.prototype.repopulateCompounds=function(){for(var n=this.compoundOrder.length-1;n>=0;n--){var E=this.compoundOrder[n],f=E.id,y=E.paddingLeft,v=E.paddingTop,R=E.labelMarginLeft,w=E.labelMarginTop;this.adjustLocations(this.tiledMemberPack[f],E.rect.x,E.rect.y,y,v,R,w)}},G.prototype.repopulateZeroDegreeMembers=function(){var n=this,E=this.tiledZeroDegreePack;Object.keys(E).forEach(function(f){var y=n.idToDummyNode[f],v=y.paddingLeft,R=y.paddingTop,w=y.labelMarginLeft,X=y.labelMarginTop;n.adjustLocations(E[f],y.rect.x,y.rect.y,v,R,w,X)})},G.prototype.getToBeTiled=function(n){var E=n.id;if(this.toBeTiled[E]!=null)return this.toBeTiled[E];var f=n.getChild();if(f==null)return this.toBeTiled[E]=!1,!1;for(var y=f.getNodes(),v=0;v<y.length;v++){var R=y[v];if(this.getNodeDegree(R)>0)return this.toBeTiled[E]=!1,!1;if(R.getChild()==null){this.toBeTiled[R.id]=!1;continue}if(!this.getToBeTiled(R))return this.toBeTiled[E]=!1,!1}return this.toBeTiled[E]=!0,!0},G.prototype.getNodeDegree=function(n){for(var E=n.id,f=n.getEdges(),y=0,v=0;v<f.length;v++){var R=f[v];R.getSource().id!==R.getTarget().id&&(y=y+1)}return y},G.prototype.getNodeDegreeWithChildren=function(n){var E=this.getNodeDegree(n);if(n.getChild()==null)return E;for(var f=n.getChild().getNodes(),y=0;y<f.length;y++){var v=f[y];E+=this.getNodeDegreeWithChildren(v)}return E},G.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},G.prototype.fillCompexOrderByDFS=function(n){for(var E=0;E<n.length;E++){var f=n[E];f.getChild()!=null&&this.fillCompexOrderByDFS(f.getChild().getNodes()),this.getToBeTiled(f)&&this.compoundOrder.push(f)}},G.prototype.adjustLocations=function(n,E,f,y,v,R,w){E+=y+R,f+=v+w;for(var X=E,H=0;H<n.rows.length;H++){var U=n.rows[H];E=X;for(var tt=0,ft=0;ft<U.length;ft++){var B=U[ft];B.rect.x=E,B.rect.y=f,E+=B.rect.width+n.horizontalPadding,B.rect.height>tt&&(tt=B.rect.height)}f+=tt+n.verticalPadding}},G.prototype.tileCompoundMembers=function(n,E){var f=this;this.tiledMemberPack=[],Object.keys(n).forEach(function(y){var v=E[y];if(f.tiledMemberPack[y]=f.tileNodes(n[y],v.paddingLeft+v.paddingRight),v.rect.width=f.tiledMemberPack[y].width,v.rect.height=f.tiledMemberPack[y].height,v.setCenter(f.tiledMemberPack[y].centerX,f.tiledMemberPack[y].centerY),v.labelMarginLeft=0,v.labelMarginTop=0,c.NODE_DIMENSIONS_INCLUDE_LABELS){var R=v.rect.width,w=v.rect.height;v.labelWidth&&(v.labelPosHorizontal=="left"?(v.rect.x-=v.labelWidth,v.setWidth(R+v.labelWidth),v.labelMarginLeft=v.labelWidth):v.labelPosHorizontal=="center"&&v.labelWidth>R?(v.rect.x-=(v.labelWidth-R)/2,v.setWidth(v.labelWidth),v.labelMarginLeft=(v.labelWidth-R)/2):v.labelPosHorizontal=="right"&&v.setWidth(R+v.labelWidth)),v.labelHeight&&(v.labelPosVertical=="top"?(v.rect.y-=v.labelHeight,v.setHeight(w+v.labelHeight),v.labelMarginTop=v.labelHeight):v.labelPosVertical=="center"&&v.labelHeight>w?(v.rect.y-=(v.labelHeight-w)/2,v.setHeight(v.labelHeight),v.labelMarginTop=(v.labelHeight-w)/2):v.labelPosVertical=="bottom"&&v.setHeight(w+v.labelHeight))}})},G.prototype.tileNodes=function(n,E){var f=this.tileNodesByFavoringDim(n,E,!0),y=this.tileNodesByFavoringDim(n,E,!1),v=this.getOrgRatio(f),R=this.getOrgRatio(y),w;return R<v?w=y:w=f,w},G.prototype.getOrgRatio=function(n){var E=n.width,f=n.height,y=E/f;return y<1&&(y=1/y),y},G.prototype.calcIdealRowWidth=function(n,E){var f=c.TILING_PADDING_VERTICAL,y=c.TILING_PADDING_HORIZONTAL,v=n.length,R=0,w=0,X=0;n.forEach(function(j){R+=j.getWidth(),w+=j.getHeight(),j.getWidth()>X&&(X=j.getWidth())});var H=R/v,U=w/v,tt=Math.pow(f-y,2)+4*(H+y)*(U+f)*v,ft=(y-f+Math.sqrt(tt))/(2*(H+y)),B;E?(B=Math.ceil(ft),B==ft&&B++):B=Math.floor(ft);var lt=B*(H+y)-y;return X>lt&&(lt=X),lt+=y*2,lt},G.prototype.tileNodesByFavoringDim=function(n,E,f){var y=c.TILING_PADDING_VERTICAL,v=c.TILING_PADDING_HORIZONTAL,R=c.TILING_COMPARE_BY,w={rows:[],rowWidth:[],rowHeight:[],width:0,height:E,verticalPadding:y,horizontalPadding:v,centerX:0,centerY:0};R&&(w.idealRowWidth=this.calcIdealRowWidth(n,f));var X=function(O){return O.rect.width*O.rect.height},H=function(O,$){return X($)-X(O)};n.sort(function(j,O){var $=H;return w.idealRowWidth?($=R,$(j.id,O.id)):$(j,O)});for(var U=0,tt=0,ft=0;ft<n.length;ft++){var B=n[ft];U+=B.getCenterX(),tt+=B.getCenterY()}w.centerX=U/n.length,w.centerY=tt/n.length;for(var ft=0;ft<n.length;ft++){var B=n[ft];if(w.rows.length==0)this.insertNodeToRow(w,B,0,E);else if(this.canAddHorizontal(w,B.rect.width,B.rect.height)){var lt=w.rows.length-1;w.idealRowWidth||(lt=this.getShortestRowIndex(w)),this.insertNodeToRow(w,B,lt,E)}else this.insertNodeToRow(w,B,w.rows.length,E);this.shiftToLastRow(w)}return w},G.prototype.insertNodeToRow=function(n,E,f,y){var v=y;if(f==n.rows.length){var R=[];n.rows.push(R),n.rowWidth.push(v),n.rowHeight.push(0)}var w=n.rowWidth[f]+E.rect.width;n.rows[f].length>0&&(w+=n.horizontalPadding),n.rowWidth[f]=w,n.width<w&&(n.width=w);var X=E.rect.height;f>0&&(X+=n.verticalPadding);var H=0;X>n.rowHeight[f]&&(H=n.rowHeight[f],n.rowHeight[f]=X,H=n.rowHeight[f]-H),n.height+=H,n.rows[f].push(E)},G.prototype.getShortestRowIndex=function(n){for(var E=-1,f=Number.MAX_VALUE,y=0;y<n.rows.length;y++)n.rowWidth[y]<f&&(E=y,f=n.rowWidth[y]);return E},G.prototype.getLongestRowIndex=function(n){for(var E=-1,f=Number.MIN_VALUE,y=0;y<n.rows.length;y++)n.rowWidth[y]>f&&(E=y,f=n.rowWidth[y]);return E},G.prototype.canAddHorizontal=function(n,E,f){if(n.idealRowWidth){var y=n.rows.length-1,v=n.rowWidth[y];return v+E+n.horizontalPadding<=n.idealRowWidth}var R=this.getShortestRowIndex(n);if(R<0)return!0;var w=n.rowWidth[R];if(w+n.horizontalPadding+E<=n.width)return!0;var X=0;n.rowHeight[R]<f&&R>0&&(X=f+n.verticalPadding-n.rowHeight[R]);var H;n.width-w>=E+n.horizontalPadding?H=(n.height+X)/(w+E+n.horizontalPadding):H=(n.height+X)/n.width,X=f+n.verticalPadding;var U;return n.width<E?U=(n.height+X)/E:U=(n.height+X)/n.width,U<1&&(U=1/U),H<1&&(H=1/H),H<U},G.prototype.shiftToLastRow=function(n){var E=this.getLongestRowIndex(n),f=n.rowWidth.length-1,y=n.rows[E],v=y[y.length-1],R=v.width+n.horizontalPadding;if(n.width-n.rowWidth[f]>R&&E!=f){y.splice(-1,1),n.rows[f].push(v),n.rowWidth[E]=n.rowWidth[E]-R,n.rowWidth[f]=n.rowWidth[f]+R,n.width=n.rowWidth[instance.getLongestRowIndex(n)];for(var w=Number.MIN_VALUE,X=0;X<y.length;X++)y[X].height>w&&(w=y[X].height);E>0&&(w+=n.verticalPadding);var H=n.rowHeight[E]+n.rowHeight[f];n.rowHeight[E]=w,n.rowHeight[f]<v.height+n.verticalPadding&&(n.rowHeight[f]=v.height+n.verticalPadding);var U=n.rowHeight[E]+n.rowHeight[f];n.height+=U-H,this.shiftToLastRow(n)}},G.prototype.tilingPreLayout=function(){c.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},G.prototype.tilingPostLayout=function(){c.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},G.prototype.reduceTrees=function(){for(var n=[],E=!0,f;E;){var y=this.graphManager.getAllNodes(),v=[];E=!1;for(var R=0;R<y.length;R++)if(f=y[R],f.getEdges().length==1&&!f.getEdges()[0].isInterGraph&&f.getChild()==null){if(c.PURE_INCREMENTAL){var w=f.getEdges()[0].getOtherEnd(f),X=new D(f.getCenterX()-w.getCenterX(),f.getCenterY()-w.getCenterY());v.push([f,f.getEdges()[0],f.getOwner(),X])}else v.push([f,f.getEdges()[0],f.getOwner()]);E=!0}if(E==!0){for(var H=[],U=0;U<v.length;U++)v[U][0].getEdges().length==1&&(H.push(v[U]),v[U][0].getOwner().remove(v[U][0]));n.push(H),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=n},G.prototype.growTree=function(n){for(var E=n.length,f=n[E-1],y,v=0;v<f.length;v++)y=f[v],this.findPlaceforPrunedNode(y),y[2].add(y[0]),y[2].add(y[1],y[1].source,y[1].target);n.splice(n.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},G.prototype.findPlaceforPrunedNode=function(n){var E,f,y=n[0];if(y==n[1].source?f=n[1].target:f=n[1].source,c.PURE_INCREMENTAL)y.setCenter(f.getCenterX()+n[3].getWidth(),f.getCenterY()+n[3].getHeight());else{var v=f.startX,R=f.finishX,w=f.startY,X=f.finishY,H=0,U=0,tt=0,ft=0,B=[H,tt,U,ft];if(w>0)for(var lt=v;lt<=R;lt++)B[0]+=this.grid[lt][w-1].length+this.grid[lt][w].length-1;if(R<this.grid.length-1)for(var lt=w;lt<=X;lt++)B[1]+=this.grid[R+1][lt].length+this.grid[R][lt].length-1;if(X<this.grid[0].length-1)for(var lt=v;lt<=R;lt++)B[2]+=this.grid[lt][X+1].length+this.grid[lt][X].length-1;if(v>0)for(var lt=w;lt<=X;lt++)B[3]+=this.grid[v-1][lt].length+this.grid[v][lt].length-1;for(var j=I.MAX_VALUE,O,$,K=0;K<B.length;K++)B[K]<j?(j=B[K],O=1,$=K):B[K]==j&&O++;if(O==3&&j==0)B[0]==0&&B[1]==0&&B[2]==0?E=1:B[0]==0&&B[1]==0&&B[3]==0?E=0:B[0]==0&&B[2]==0&&B[3]==0?E=3:B[1]==0&&B[2]==0&&B[3]==0&&(E=2);else if(O==2&&j==0){var ht=Math.floor(Math.random()*2);B[0]==0&&B[1]==0?ht==0?E=0:E=1:B[0]==0&&B[2]==0?ht==0?E=0:E=2:B[0]==0&&B[3]==0?ht==0?E=0:E=3:B[1]==0&&B[2]==0?ht==0?E=1:E=2:B[1]==0&&B[3]==0?ht==0?E=1:E=3:ht==0?E=2:E=3}else if(O==4&&j==0){var ht=Math.floor(Math.random()*4);E=ht}else E=$;E==0?y.setCenter(f.getCenterX(),f.getCenterY()-f.getHeight()/2-h.DEFAULT_EDGE_LENGTH-y.getHeight()/2):E==1?y.setCenter(f.getCenterX()+f.getWidth()/2+h.DEFAULT_EDGE_LENGTH+y.getWidth()/2,f.getCenterY()):E==2?y.setCenter(f.getCenterX(),f.getCenterY()+f.getHeight()/2+h.DEFAULT_EDGE_LENGTH+y.getHeight()/2):y.setCenter(f.getCenterX()-f.getWidth()/2-h.DEFAULT_EDGE_LENGTH-y.getWidth()/2,f.getCenterY())}},r.exports=G},991:(r,p,i)=>{var g=i(551).FDLayoutNode,t=i(551).IMath;function a(u,c,m,h){g.call(this,u,c,m,h)}a.prototype=Object.create(g.prototype);for(var l in g)a[l]=g[l];a.prototype.calculateDisplacement=function(){var u=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=u.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=u.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=u.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=u.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>u.coolingFactor*u.maxNodeDisplacement&&(this.displacementX=u.coolingFactor*u.maxNodeDisplacement*t.sign(this.displacementX)),Math.abs(this.displacementY)>u.coolingFactor*u.maxNodeDisplacement&&(this.displacementY=u.coolingFactor*u.maxNodeDisplacement*t.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},a.prototype.propogateDisplacementToChildren=function(u,c){for(var m=this.getChild().getNodes(),h,C=0;C<m.length;C++)h=m[C],h.getChild()==null?(h.displacementX+=u,h.displacementY+=c):h.propogateDisplacementToChildren(u,c)},a.prototype.move=function(){var u=this.graphManager.getLayout();(this.child==null||this.child.getNodes().length==0)&&(this.moveBy(this.displacementX,this.displacementY),u.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY)),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},a.prototype.setPred1=function(u){this.pred1=u},a.prototype.getPred1=function(){return pred1},a.prototype.getPred2=function(){return pred2},a.prototype.setNext=function(u){this.next=u},a.prototype.getNext=function(){return next},a.prototype.setProcessed=function(u){this.processed=u},a.prototype.isProcessed=function(){return processed},r.exports=a},902:(r,p,i)=>{function g(m){if(Array.isArray(m)){for(var h=0,C=Array(m.length);h<m.length;h++)C[h]=m[h];return C}else return Array.from(m)}var t=i(806),a=i(551).LinkedList,l=i(551).Matrix,u=i(551).SVD;function c(){}c.handleConstraints=function(m){var h={};h.fixedNodeConstraint=m.constraints.fixedNodeConstraint,h.alignmentConstraint=m.constraints.alignmentConstraint,h.relativePlacementConstraint=m.constraints.relativePlacementConstraint;for(var C=new Map,T=new Map,N=[],D=[],_=m.getAllNodes(),I=0,ot=0;ot<_.length;ot++){var mt=_[ot];mt.getChild()==null&&(T.set(mt.id,I++),N.push(mt.getCenterX()),D.push(mt.getCenterY()),C.set(mt.id,mt))}h.relativePlacementConstraint&&h.relativePlacementConstraint.forEach(function(A){!A.gap&&A.gap!=0&&(A.left?A.gap=t.DEFAULT_EDGE_LENGTH+C.get(A.left).getWidth()/2+C.get(A.right).getWidth()/2:A.gap=t.DEFAULT_EDGE_LENGTH+C.get(A.top).getHeight()/2+C.get(A.bottom).getHeight()/2)});var vt=function(F,b){return{x:F.x-b.x,y:F.y-b.y}},Dt=function(F){var b=0,Y=0;return F.forEach(function(P){b+=N[T.get(P)],Y+=D[T.get(P)]}),{x:b/F.size,y:Y/F.size}},G=function(F,b,Y,P,W){function yt(Nt,Et){var wt=new Set(Nt),Lt=!0,Ct=!1,Ut=void 0;try{for(var xt=Et[Symbol.iterator](),Ft;!(Lt=(Ft=xt.next()).done);Lt=!0){var zt=Ft.value;wt.add(zt)}}catch(Ht){Ct=!0,Ut=Ht}finally{try{!Lt&&xt.return&&xt.return()}finally{if(Ct)throw Ut}}return wt}var st=new Map;F.forEach(function(Nt,Et){st.set(Et,0)}),F.forEach(function(Nt,Et){Nt.forEach(function(wt){st.set(wt.id,st.get(wt.id)+1)})});var z=new Map,J=new Map,pt=new a;st.forEach(function(Nt,Et){Nt==0?(pt.push(Et),Y||(b=="horizontal"?z.set(Et,T.has(Et)?N[T.get(Et)]:P.get(Et)):z.set(Et,T.has(Et)?D[T.get(Et)]:P.get(Et)))):z.set(Et,Number.NEGATIVE_INFINITY),Y&&J.set(Et,new Set([Et]))}),Y&&W.forEach(function(Nt){var Et=[];if(Nt.forEach(function(Ct){Y.has(Ct)&&Et.push(Ct)}),Et.length>0){var wt=0;Et.forEach(function(Ct){b=="horizontal"?(z.set(Ct,T.has(Ct)?N[T.get(Ct)]:P.get(Ct)),wt+=z.get(Ct)):(z.set(Ct,T.has(Ct)?D[T.get(Ct)]:P.get(Ct)),wt+=z.get(Ct))}),wt=wt/Et.length,Nt.forEach(function(Ct){Y.has(Ct)||z.set(Ct,wt)})}else{var Lt=0;Nt.forEach(function(Ct){b=="horizontal"?Lt+=T.has(Ct)?N[T.get(Ct)]:P.get(Ct):Lt+=T.has(Ct)?D[T.get(Ct)]:P.get(Ct)}),Lt=Lt/Nt.length,Nt.forEach(function(Ct){z.set(Ct,Lt)})}});for(var Ot=function(){var Et=pt.shift(),wt=F.get(Et);wt.forEach(function(Lt){if(z.get(Lt.id)<z.get(Et)+Lt.gap)if(Y&&Y.has(Lt.id)){var Ct=void 0;if(b=="horizontal"?Ct=T.has(Lt.id)?N[T.get(Lt.id)]:P.get(Lt.id):Ct=T.has(Lt.id)?D[T.get(Lt.id)]:P.get(Lt.id),z.set(Lt.id,Ct),Ct<z.get(Et)+Lt.gap){var Ut=z.get(Et)+Lt.gap-Ct;J.get(Et).forEach(function(xt){z.set(xt,z.get(xt)-Ut)})}}else z.set(Lt.id,z.get(Et)+Lt.gap);st.set(Lt.id,st.get(Lt.id)-1),st.get(Lt.id)==0&&pt.push(Lt.id),Y&&J.set(Lt.id,yt(J.get(Et),J.get(Lt.id)))})};pt.length!=0;)Ot();if(Y){var At=new Set;F.forEach(function(Nt,Et){Nt.length==0&&At.add(Et)});var St=[];J.forEach(function(Nt,Et){if(At.has(Et)){var wt=!1,Lt=!0,Ct=!1,Ut=void 0;try{for(var xt=Nt[Symbol.iterator](),Ft;!(Lt=(Ft=xt.next()).done);Lt=!0){var zt=Ft.value;Y.has(zt)&&(wt=!0)}}catch(Gt){Ct=!0,Ut=Gt}finally{try{!Lt&&xt.return&&xt.return()}finally{if(Ct)throw Ut}}if(!wt){var Ht=!1,Vt=void 0;St.forEach(function(Gt,$t){Gt.has([].concat(g(Nt))[0])&&(Ht=!0,Vt=$t)}),Ht?Nt.forEach(function(Gt){St[Vt].add(Gt)}):St.push(new Set(Nt))}}}),St.forEach(function(Nt,Et){var wt=Number.POSITIVE_INFINITY,Lt=Number.POSITIVE_INFINITY,Ct=Number.NEGATIVE_INFINITY,Ut=Number.NEGATIVE_INFINITY,xt=!0,Ft=!1,zt=void 0;try{for(var Ht=Nt[Symbol.iterator](),Vt;!(xt=(Vt=Ht.next()).done);xt=!0){var Gt=Vt.value,$t=void 0;b=="horizontal"?$t=T.has(Gt)?N[T.get(Gt)]:P.get(Gt):$t=T.has(Gt)?D[T.get(Gt)]:P.get(Gt);var Qt=z.get(Gt);$t<wt&&(wt=$t),$t>Ct&&(Ct=$t),Qt<Lt&&(Lt=Qt),Qt>Ut&&(Ut=Qt)}}catch(te){Ft=!0,zt=te}finally{try{!xt&&Ht.return&&Ht.return()}finally{if(Ft)throw zt}}var ae=(wt+Ct)/2-(Lt+Ut)/2,Kt=!0,qt=!1,jt=void 0;try{for(var Jt=Nt[Symbol.iterator](),re;!(Kt=(re=Jt.next()).done);Kt=!0){var _t=re.value;z.set(_t,z.get(_t)+ae)}}catch(te){qt=!0,jt=te}finally{try{!Kt&&Jt.return&&Jt.return()}finally{if(qt)throw jt}}})}return z},k=function(F){var b=0,Y=0,P=0,W=0;if(F.forEach(function(J){J.left?N[T.get(J.left)]-N[T.get(J.right)]>=0?b++:Y++:D[T.get(J.top)]-D[T.get(J.bottom)]>=0?P++:W++}),b>Y&&P>W)for(var yt=0;yt<T.size;yt++)N[yt]=-1*N[yt],D[yt]=-1*D[yt];else if(b>Y)for(var st=0;st<T.size;st++)N[st]=-1*N[st];else if(P>W)for(var z=0;z<T.size;z++)D[z]=-1*D[z]},n=function(F){var b=[],Y=new a,P=new Set,W=0;return F.forEach(function(yt,st){if(!P.has(st)){b[W]=[];var z=st;for(Y.push(z),P.add(z),b[W].push(z);Y.length!=0;){z=Y.shift();var J=F.get(z);J.forEach(function(pt){P.has(pt.id)||(Y.push(pt.id),P.add(pt.id),b[W].push(pt.id))})}W++}}),b},E=function(F){var b=new Map;return F.forEach(function(Y,P){b.set(P,[])}),F.forEach(function(Y,P){Y.forEach(function(W){b.get(P).push(W),b.get(W.id).push({id:P,gap:W.gap,direction:W.direction})})}),b},f=function(F){var b=new Map;return F.forEach(function(Y,P){b.set(P,[])}),F.forEach(function(Y,P){Y.forEach(function(W){b.get(W.id).push({id:P,gap:W.gap,direction:W.direction})})}),b},y=[],v=[],R=!1,w=!1,X=new Set,H=new Map,U=new Map,tt=[];if(h.fixedNodeConstraint&&h.fixedNodeConstraint.forEach(function(A){X.add(A.nodeId)}),h.relativePlacementConstraint&&(h.relativePlacementConstraint.forEach(function(A){A.left?(H.has(A.left)?H.get(A.left).push({id:A.right,gap:A.gap,direction:"horizontal"}):H.set(A.left,[{id:A.right,gap:A.gap,direction:"horizontal"}]),H.has(A.right)||H.set(A.right,[])):(H.has(A.top)?H.get(A.top).push({id:A.bottom,gap:A.gap,direction:"vertical"}):H.set(A.top,[{id:A.bottom,gap:A.gap,direction:"vertical"}]),H.has(A.bottom)||H.set(A.bottom,[]))}),U=E(H),tt=n(U)),t.TRANSFORM_ON_CONSTRAINT_HANDLING){if(h.fixedNodeConstraint&&h.fixedNodeConstraint.length>1)h.fixedNodeConstraint.forEach(function(A,F){y[F]=[A.position.x,A.position.y],v[F]=[N[T.get(A.nodeId)],D[T.get(A.nodeId)]]}),R=!0;else if(h.alignmentConstraint)(function(){var A=0;if(h.alignmentConstraint.vertical){for(var F=h.alignmentConstraint.vertical,b=function(z){var J=new Set;F[z].forEach(function(At){J.add(At)});var pt=new Set([].concat(g(J)).filter(function(At){return X.has(At)})),Ot=void 0;pt.size>0?Ot=N[T.get(pt.values().next().value)]:Ot=Dt(J).x,F[z].forEach(function(At){y[A]=[Ot,D[T.get(At)]],v[A]=[N[T.get(At)],D[T.get(At)]],A++})},Y=0;Y<F.length;Y++)b(Y);R=!0}if(h.alignmentConstraint.horizontal){for(var P=h.alignmentConstraint.horizontal,W=function(z){var J=new Set;P[z].forEach(function(At){J.add(At)});var pt=new Set([].concat(g(J)).filter(function(At){return X.has(At)})),Ot=void 0;pt.size>0?Ot=N[T.get(pt.values().next().value)]:Ot=Dt(J).y,P[z].forEach(function(At){y[A]=[N[T.get(At)],Ot],v[A]=[N[T.get(At)],D[T.get(At)]],A++})},yt=0;yt<P.length;yt++)W(yt);R=!0}h.relativePlacementConstraint&&(w=!0)})();else if(h.relativePlacementConstraint){for(var ft=0,B=0,lt=0;lt<tt.length;lt++)tt[lt].length>ft&&(ft=tt[lt].length,B=lt);if(ft<U.size/2)k(h.relativePlacementConstraint),R=!1,w=!1;else{var j=new Map,O=new Map,$=[];tt[B].forEach(function(A){H.get(A).forEach(function(F){F.direction=="horizontal"?(j.has(A)?j.get(A).push(F):j.set(A,[F]),j.has(F.id)||j.set(F.id,[]),$.push({left:A,right:F.id})):(O.has(A)?O.get(A).push(F):O.set(A,[F]),O.has(F.id)||O.set(F.id,[]),$.push({top:A,bottom:F.id}))})}),k($),w=!1;var K=G(j,"horizontal"),ht=G(O,"vertical");tt[B].forEach(function(A,F){v[F]=[N[T.get(A)],D[T.get(A)]],y[F]=[],K.has(A)?y[F][0]=K.get(A):y[F][0]=N[T.get(A)],ht.has(A)?y[F][1]=ht.get(A):y[F][1]=D[T.get(A)]}),R=!0}}if(R){for(var Mt=void 0,rt=l.transpose(y),bt=l.transpose(v),Rt=0;Rt<rt.length;Rt++)rt[Rt]=l.multGamma(rt[Rt]),bt[Rt]=l.multGamma(bt[Rt]);var Xt=l.multMat(rt,l.transpose(bt)),x=u.svd(Xt);Mt=l.multMat(x.V,l.transpose(x.U));for(var L=0;L<T.size;L++){var M=[N[L],D[L]],V=[Mt[0][0],Mt[1][0]],Z=[Mt[0][1],Mt[1][1]];N[L]=l.dotProduct(M,V),D[L]=l.dotProduct(M,Z)}w&&k(h.relativePlacementConstraint)}}if(t.ENFORCE_CONSTRAINTS){if(h.fixedNodeConstraint&&h.fixedNodeConstraint.length>0){var Q={x:0,y:0};h.fixedNodeConstraint.forEach(function(A,F){var b={x:N[T.get(A.nodeId)],y:D[T.get(A.nodeId)]},Y=A.position,P=vt(Y,b);Q.x+=P.x,Q.y+=P.y}),Q.x/=h.fixedNodeConstraint.length,Q.y/=h.fixedNodeConstraint.length,N.forEach(function(A,F){N[F]+=Q.x}),D.forEach(function(A,F){D[F]+=Q.y}),h.fixedNodeConstraint.forEach(function(A){N[T.get(A.nodeId)]=A.position.x,D[T.get(A.nodeId)]=A.position.y})}if(h.alignmentConstraint){if(h.alignmentConstraint.vertical)for(var ct=h.alignmentConstraint.vertical,q=function(F){var b=new Set;ct[F].forEach(function(W){b.add(W)});var Y=new Set([].concat(g(b)).filter(function(W){return X.has(W)})),P=void 0;Y.size>0?P=N[T.get(Y.values().next().value)]:P=Dt(b).x,b.forEach(function(W){X.has(W)||(N[T.get(W)]=P)})},at=0;at<ct.length;at++)q(at);if(h.alignmentConstraint.horizontal)for(var et=h.alignmentConstraint.horizontal,nt=function(F){var b=new Set;et[F].forEach(function(W){b.add(W)});var Y=new Set([].concat(g(b)).filter(function(W){return X.has(W)})),P=void 0;Y.size>0?P=D[T.get(Y.values().next().value)]:P=Dt(b).y,b.forEach(function(W){X.has(W)||(D[T.get(W)]=P)})},dt=0;dt<et.length;dt++)nt(dt)}h.relativePlacementConstraint&&function(){var A=new Map,F=new Map,b=new Map,Y=new Map,P=new Map,W=new Map,yt=new Set,st=new Set;if(X.forEach(function(Wt){yt.add(Wt),st.add(Wt)}),h.alignmentConstraint){if(h.alignmentConstraint.vertical)for(var z=h.alignmentConstraint.vertical,J=function(It){b.set("dummy"+It,[]),z[It].forEach(function(Pt){A.set(Pt,"dummy"+It),b.get("dummy"+It).push(Pt),X.has(Pt)&&yt.add("dummy"+It)}),P.set("dummy"+It,N[T.get(z[It][0])])},pt=0;pt<z.length;pt++)J(pt);if(h.alignmentConstraint.horizontal)for(var Ot=h.alignmentConstraint.horizontal,At=function(It){Y.set("dummy"+It,[]),Ot[It].forEach(function(Pt){F.set(Pt,"dummy"+It),Y.get("dummy"+It).push(Pt),X.has(Pt)&&st.add("dummy"+It)}),W.set("dummy"+It,D[T.get(Ot[It][0])])},St=0;St<Ot.length;St++)At(St)}var Nt=new Map,Et=new Map,wt=function(It){H.get(It).forEach(function(Pt){var Zt=void 0,Bt=void 0;Pt.direction=="horizontal"?(Zt=A.get(It)?A.get(It):It,A.get(Pt.id)?Bt={id:A.get(Pt.id),gap:Pt.gap,direction:Pt.direction}:Bt=Pt,Nt.has(Zt)?Nt.get(Zt).push(Bt):Nt.set(Zt,[Bt]),Nt.has(Bt.id)||Nt.set(Bt.id,[])):(Zt=F.get(It)?F.get(It):It,F.get(Pt.id)?Bt={id:F.get(Pt.id),gap:Pt.gap,direction:Pt.direction}:Bt=Pt,Et.has(Zt)?Et.get(Zt).push(Bt):Et.set(Zt,[Bt]),Et.has(Bt.id)||Et.set(Bt.id,[]))})},Lt=!0,Ct=!1,Ut=void 0;try{for(var xt=H.keys()[Symbol.iterator](),Ft;!(Lt=(Ft=xt.next()).done);Lt=!0){var zt=Ft.value;wt(zt)}}catch(Wt){Ct=!0,Ut=Wt}finally{try{!Lt&&xt.return&&xt.return()}finally{if(Ct)throw Ut}}var Ht=E(Nt),Vt=E(Et),Gt=n(Ht),$t=n(Vt),Qt=f(Nt),ae=f(Et),Kt=[],qt=[];Gt.forEach(function(Wt,It){Kt[It]=[],Wt.forEach(function(Pt){Qt.get(Pt).length==0&&Kt[It].push(Pt)})}),$t.forEach(function(Wt,It){qt[It]=[],Wt.forEach(function(Pt){ae.get(Pt).length==0&&qt[It].push(Pt)})});var jt=G(Nt,"horizontal",yt,P,Kt),Jt=G(Et,"vertical",st,W,qt),re=function(It){b.get(It)?b.get(It).forEach(function(Pt){N[T.get(Pt)]=jt.get(It)}):N[T.get(It)]=jt.get(It)},_t=!0,te=!1,le=void 0;try{for(var ne=jt.keys()[Symbol.iterator](),fe;!(_t=(fe=ne.next()).done);_t=!0){var oe=fe.value;re(oe)}}catch(Wt){te=!0,le=Wt}finally{try{!_t&&ne.return&&ne.return()}finally{if(te)throw le}}var pe=function(It){Y.get(It)?Y.get(It).forEach(function(Pt){D[T.get(Pt)]=Jt.get(It)}):D[T.get(It)]=Jt.get(It)},se=!0,ce=!1,ue=void 0;try{for(var he=Jt.keys()[Symbol.iterator](),ge;!(se=(ge=he.next()).done);se=!0){var oe=ge.value;pe(oe)}}catch(Wt){ce=!0,ue=Wt}finally{try{!se&&he.return&&he.return()}finally{if(ce)throw ue}}}()}for(var Tt=0;Tt<_.length;Tt++){var gt=_[Tt];gt.getChild()==null&&gt.setCenter(N[T.get(gt.id)],D[T.get(gt.id)])}},r.exports=c},551:r=>{r.exports=S}},s={};function o(r){var p=s[r];if(p!==void 0)return p.exports;var i=s[r]={exports:{}};return d[r](i,i.exports,o),i.exports}var e=o(45);return e})()})},13035:function(Yt){(function(ut,S){Yt.exports=S()})(this,function(){return function(it){var ut={};function S(d){if(ut[d])return ut[d].exports;var s=ut[d]={i:d,l:!1,exports:{}};return it[d].call(s.exports,s,s.exports,S),s.l=!0,s.exports}return S.m=it,S.c=ut,S.i=function(d){return d},S.d=function(d,s,o){S.o(d,s)||Object.defineProperty(d,s,{configurable:!1,enumerable:!0,get:o})},S.n=function(d){var s=d&&d.__esModule?function(){return d.default}:function(){return d};return S.d(s,"a",s),s},S.o=function(d,s){return Object.prototype.hasOwnProperty.call(d,s)},S.p="",S(S.s=28)}([function(it,ut,S){"use strict";function d(){}d.QUALITY=1,d.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,d.DEFAULT_INCREMENTAL=!1,d.DEFAULT_ANIMATION_ON_LAYOUT=!0,d.DEFAULT_ANIMATION_DURING_LAYOUT=!1,d.DEFAULT_ANIMATION_PERIOD=50,d.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,d.DEFAULT_GRAPH_MARGIN=15,d.NODE_DIMENSIONS_INCLUDE_LABELS=!1,d.SIMPLE_NODE_SIZE=40,d.SIMPLE_NODE_HALF_SIZE=d.SIMPLE_NODE_SIZE/2,d.EMPTY_COMPOUND_NODE_SIZE=40,d.MIN_EDGE_LENGTH=1,d.WORLD_BOUNDARY=1e6,d.INITIAL_WORLD_BOUNDARY=d.WORLD_BOUNDARY/1e3,d.WORLD_CENTER_X=1200,d.WORLD_CENTER_Y=900,it.exports=d},function(it,ut,S){"use strict";var d=S(2),s=S(8),o=S(9);function e(p,i,g){d.call(this,g),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=g,this.bendpoints=[],this.source=p,this.target=i}e.prototype=Object.create(d.prototype);for(var r in d)e[r]=d[r];e.prototype.getSource=function(){return this.source},e.prototype.getTarget=function(){return this.target},e.prototype.isInterGraph=function(){return this.isInterGraph},e.prototype.getLength=function(){return this.length},e.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},e.prototype.getBendpoints=function(){return this.bendpoints},e.prototype.getLca=function(){return this.lca},e.prototype.getSourceInLca=function(){return this.sourceInLca},e.prototype.getTargetInLca=function(){return this.targetInLca},e.prototype.getOtherEnd=function(p){if(this.source===p)return this.target;if(this.target===p)return this.source;throw"Node is not incident with this edge"},e.prototype.getOtherEndInGraph=function(p,i){for(var g=this.getOtherEnd(p),t=i.getGraphManager().getRoot();;){if(g.getOwner()==i)return g;if(g.getOwner()==t)break;g=g.getOwner().getParent()}return null},e.prototype.updateLength=function(){var p=new Array(4);this.isOverlapingSourceAndTarget=s.getIntersection(this.target.getRect(),this.source.getRect(),p),this.isOverlapingSourceAndTarget||(this.lengthX=p[0]-p[2],this.lengthY=p[1]-p[3],Math.abs(this.lengthX)<1&&(this.lengthX=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},e.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},it.exports=e},function(it,ut,S){"use strict";function d(s){this.vGraphObject=s}it.exports=d},function(it,ut,S){"use strict";var d=S(2),s=S(10),o=S(13),e=S(0),r=S(16),p=S(5);function i(t,a,l,u){l==null&&u==null&&(u=a),d.call(this,u),t.graphManager!=null&&(t=t.graphManager),this.estimatedSize=s.MIN_VALUE,this.inclusionTreeDepth=s.MAX_VALUE,this.vGraphObject=u,this.edges=[],this.graphManager=t,l!=null&&a!=null?this.rect=new o(a.x,a.y,l.width,l.height):this.rect=new o}i.prototype=Object.create(d.prototype);for(var g in d)i[g]=d[g];i.prototype.getEdges=function(){return this.edges},i.prototype.getChild=function(){return this.child},i.prototype.getOwner=function(){return this.owner},i.prototype.getWidth=function(){return this.rect.width},i.prototype.setWidth=function(t){this.rect.width=t},i.prototype.getHeight=function(){return this.rect.height},i.prototype.setHeight=function(t){this.rect.height=t},i.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},i.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},i.prototype.getCenter=function(){return new p(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},i.prototype.getLocation=function(){return new p(this.rect.x,this.rect.y)},i.prototype.getRect=function(){return this.rect},i.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},i.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},i.prototype.setRect=function(t,a){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=a.width,this.rect.height=a.height},i.prototype.setCenter=function(t,a){this.rect.x=t-this.rect.width/2,this.rect.y=a-this.rect.height/2},i.prototype.setLocation=function(t,a){this.rect.x=t,this.rect.y=a},i.prototype.moveBy=function(t,a){this.rect.x+=t,this.rect.y+=a},i.prototype.getEdgeListToNode=function(t){var a=[],l,u=this;return u.edges.forEach(function(c){if(c.target==t){if(c.source!=u)throw"Incorrect edge source!";a.push(c)}}),a},i.prototype.getEdgesBetween=function(t){var a=[],l,u=this;return u.edges.forEach(function(c){if(!(c.source==u||c.target==u))throw"Incorrect edge source and/or target";(c.target==t||c.source==t)&&a.push(c)}),a},i.prototype.getNeighborsList=function(){var t=new Set,a=this;return a.edges.forEach(function(l){if(l.source==a)t.add(l.target);else{if(l.target!=a)throw"Incorrect incidency!";t.add(l.source)}}),t},i.prototype.withChildren=function(){var t=new Set,a,l;if(t.add(this),this.child!=null)for(var u=this.child.getNodes(),c=0;c<u.length;c++)a=u[c],l=a.withChildren(),l.forEach(function(m){t.add(m)});return t},i.prototype.getNoOfChildren=function(){var t=0,a;if(this.child==null)t=1;else for(var l=this.child.getNodes(),u=0;u<l.length;u++)a=l[u],t+=a.getNoOfChildren();return t==0&&(t=1),t},i.prototype.getEstimatedSize=function(){if(this.estimatedSize==s.MIN_VALUE)throw"assert failed";return this.estimatedSize},i.prototype.calcEstimatedSize=function(){return this.child==null?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},i.prototype.scatter=function(){var t,a,l=-e.INITIAL_WORLD_BOUNDARY,u=e.INITIAL_WORLD_BOUNDARY;t=e.WORLD_CENTER_X+r.nextDouble()*(u-l)+l;var c=-e.INITIAL_WORLD_BOUNDARY,m=e.INITIAL_WORLD_BOUNDARY;a=e.WORLD_CENTER_Y+r.nextDouble()*(m-c)+c,this.rect.x=t,this.rect.y=a},i.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var t=this.getChild();if(t.updateBounds(!0),this.rect.x=t.getLeft(),this.rect.y=t.getTop(),this.setWidth(t.getRight()-t.getLeft()),this.setHeight(t.getBottom()-t.getTop()),e.NODE_DIMENSIONS_INCLUDE_LABELS){var a=t.getRight()-t.getLeft(),l=t.getBottom()-t.getTop();this.labelWidth&&(this.labelPosHorizontal=="left"?(this.rect.x-=this.labelWidth,this.setWidth(a+this.labelWidth)):this.labelPosHorizontal=="center"&&this.labelWidth>a?(this.rect.x-=(this.labelWidth-a)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(a+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(l+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>l?(this.rect.y-=(this.labelHeight-l)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(l+this.labelHeight))}}},i.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==s.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},i.prototype.transform=function(t){var a=this.rect.x;a>e.WORLD_BOUNDARY?a=e.WORLD_BOUNDARY:a<-e.WORLD_BOUNDARY&&(a=-e.WORLD_BOUNDARY);var l=this.rect.y;l>e.WORLD_BOUNDARY?l=e.WORLD_BOUNDARY:l<-e.WORLD_BOUNDARY&&(l=-e.WORLD_BOUNDARY);var u=new p(a,l),c=t.inverseTransformPoint(u);this.setLocation(c.x,c.y)},i.prototype.getLeft=function(){return this.rect.x},i.prototype.getRight=function(){return this.rect.x+this.rect.width},i.prototype.getTop=function(){return this.rect.y},i.prototype.getBottom=function(){return this.rect.y+this.rect.height},i.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},it.exports=i},function(it,ut,S){"use strict";var d=S(0);function s(){}for(var o in d)s[o]=d[o];s.MAX_ITERATIONS=2500,s.DEFAULT_EDGE_LENGTH=50,s.DEFAULT_SPRING_STRENGTH=.45,s.DEFAULT_REPULSION_STRENGTH=4500,s.DEFAULT_GRAVITY_STRENGTH=.4,s.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,s.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,s.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,s.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,s.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,s.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,s.COOLING_ADAPTATION_FACTOR=.33,s.ADAPTATION_LOWER_NODE_LIMIT=1e3,s.ADAPTATION_UPPER_NODE_LIMIT=5e3,s.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,s.MAX_NODE_DISPLACEMENT=s.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,s.MIN_REPULSION_DIST=s.DEFAULT_EDGE_LENGTH/10,s.CONVERGENCE_CHECK_PERIOD=100,s.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,s.MIN_EDGE_LENGTH=1,s.GRID_CALCULATION_CHECK_PERIOD=10,it.exports=s},function(it,ut,S){"use strict";function d(s,o){s==null&&o==null?(this.x=0,this.y=0):(this.x=s,this.y=o)}d.prototype.getX=function(){return this.x},d.prototype.getY=function(){return this.y},d.prototype.setX=function(s){this.x=s},d.prototype.setY=function(s){this.y=s},d.prototype.getDifference=function(s){return new DimensionD(this.x-s.x,this.y-s.y)},d.prototype.getCopy=function(){return new d(this.x,this.y)},d.prototype.translate=function(s){return this.x+=s.width,this.y+=s.height,this},it.exports=d},function(it,ut,S){"use strict";var d=S(2),s=S(10),o=S(0),e=S(7),r=S(3),p=S(1),i=S(13),g=S(12),t=S(11);function a(u,c,m){d.call(this,m),this.estimatedSize=s.MIN_VALUE,this.margin=o.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=u,c!=null&&c instanceof e?this.graphManager=c:c!=null&&c instanceof Layout&&(this.graphManager=c.graphManager)}a.prototype=Object.create(d.prototype);for(var l in d)a[l]=d[l];a.prototype.getNodes=function(){return this.nodes},a.prototype.getEdges=function(){return this.edges},a.prototype.getGraphManager=function(){return this.graphManager},a.prototype.getParent=function(){return this.parent},a.prototype.getLeft=function(){return this.left},a.prototype.getRight=function(){return this.right},a.prototype.getTop=function(){return this.top},a.prototype.getBottom=function(){return this.bottom},a.prototype.isConnected=function(){return this.isConnected},a.prototype.add=function(u,c,m){if(c==null&&m==null){var h=u;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(h)>-1)throw"Node already in graph!";return h.owner=this,this.getNodes().push(h),h}else{var C=u;if(!(this.getNodes().indexOf(c)>-1&&this.getNodes().indexOf(m)>-1))throw"Source or target not in graph!";if(!(c.owner==m.owner&&c.owner==this))throw"Both owners must be this graph!";return c.owner!=m.owner?null:(C.source=c,C.target=m,C.isInterGraph=!1,this.getEdges().push(C),c.edges.push(C),m!=c&&m.edges.push(C),C)}},a.prototype.remove=function(u){var c=u;if(u instanceof r){if(c==null)throw"Node is null!";if(!(c.owner!=null&&c.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var m=c.edges.slice(),h,C=m.length,T=0;T<C;T++)h=m[T],h.isInterGraph?this.graphManager.remove(h):h.source.owner.remove(h);var N=this.nodes.indexOf(c);if(N==-1)throw"Node not in owner node list!";this.nodes.splice(N,1)}else if(u instanceof p){var h=u;if(h==null)throw"Edge is null!";if(!(h.source!=null&&h.target!=null))throw"Source and/or target is null!";if(!(h.source.owner!=null&&h.target.owner!=null&&h.source.owner==this&&h.target.owner==this))throw"Source and/or target owner is invalid!";var D=h.source.edges.indexOf(h),_=h.target.edges.indexOf(h);if(!(D>-1&&_>-1))throw"Source and/or target doesn't know this edge!";h.source.edges.splice(D,1),h.target!=h.source&&h.target.edges.splice(_,1);var N=h.source.owner.getEdges().indexOf(h);if(N==-1)throw"Not in owner's edge list!";h.source.owner.getEdges().splice(N,1)}},a.prototype.updateLeftTop=function(){for(var u=s.MAX_VALUE,c=s.MAX_VALUE,m,h,C,T=this.getNodes(),N=T.length,D=0;D<N;D++){var _=T[D];m=_.getTop(),h=_.getLeft(),u>m&&(u=m),c>h&&(c=h)}return u==s.MAX_VALUE?null:(T[0].getParent().paddingLeft!=null?C=T[0].getParent().paddingLeft:C=this.margin,this.left=c-C,this.top=u-C,new g(this.left,this.top))},a.prototype.updateBounds=function(u){for(var c=s.MAX_VALUE,m=-s.MAX_VALUE,h=s.MAX_VALUE,C=-s.MAX_VALUE,T,N,D,_,I,ot=this.nodes,mt=ot.length,vt=0;vt<mt;vt++){var Dt=ot[vt];u&&Dt.child!=null&&Dt.updateBounds(),T=Dt.getLeft(),N=Dt.getRight(),D=Dt.getTop(),_=Dt.getBottom(),c>T&&(c=T),m<N&&(m=N),h>D&&(h=D),C<_&&(C=_)}var G=new i(c,h,m-c,C-h);c==s.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),ot[0].getParent().paddingLeft!=null?I=ot[0].getParent().paddingLeft:I=this.margin,this.left=G.x-I,this.right=G.x+G.width+I,this.top=G.y-I,this.bottom=G.y+G.height+I},a.calculateBounds=function(u){for(var c=s.MAX_VALUE,m=-s.MAX_VALUE,h=s.MAX_VALUE,C=-s.MAX_VALUE,T,N,D,_,I=u.length,ot=0;ot<I;ot++){var mt=u[ot];T=mt.getLeft(),N=mt.getRight(),D=mt.getTop(),_=mt.getBottom(),c>T&&(c=T),m<N&&(m=N),h>D&&(h=D),C<_&&(C=_)}var vt=new i(c,h,m-c,C-h);return vt},a.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},a.prototype.getEstimatedSize=function(){if(this.estimatedSize==s.MIN_VALUE)throw"assert failed";return this.estimatedSize},a.prototype.calcEstimatedSize=function(){for(var u=0,c=this.nodes,m=c.length,h=0;h<m;h++){var C=c[h];u+=C.calcEstimatedSize()}return u==0?this.estimatedSize=o.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=u/Math.sqrt(this.nodes.length),this.estimatedSize},a.prototype.updateConnected=function(){var u=this;if(this.nodes.length==0){this.isConnected=!0;return}var c=new t,m=new Set,h=this.nodes[0],C,T,N=h.withChildren();for(N.forEach(function(vt){c.push(vt),m.add(vt)});c.length!==0;){h=c.shift(),C=h.getEdges();for(var D=C.length,_=0;_<D;_++){var I=C[_];if(T=I.getOtherEndInGraph(h,this),T!=null&&!m.has(T)){var ot=T.withChildren();ot.forEach(function(vt){c.push(vt),m.add(vt)})}}}if(this.isConnected=!1,m.size>=this.nodes.length){var mt=0;m.forEach(function(vt){vt.owner==u&&mt++}),mt==this.nodes.length&&(this.isConnected=!0)}},it.exports=a},function(it,ut,S){"use strict";var d,s=S(1);function o(e){d=S(6),this.layout=e,this.graphs=[],this.edges=[]}o.prototype.addRoot=function(){var e=this.layout.newGraph(),r=this.layout.newNode(null),p=this.add(e,r);return this.setRootGraph(p),this.rootGraph},o.prototype.add=function(e,r,p,i,g){if(p==null&&i==null&&g==null){if(e==null)throw"Graph is null!";if(r==null)throw"Parent node is null!";if(this.graphs.indexOf(e)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(e),e.parent!=null)throw"Already has a parent!";if(r.child!=null)throw"Already has a child!";return e.parent=r,r.child=e,e}else{g=p,i=r,p=e;var t=i.getOwner(),a=g.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(a!=null&&a.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==a)return p.isInterGraph=!1,t.add(p,i,g);if(p.isInterGraph=!0,p.source=i,p.target=g,this.edges.indexOf(p)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(p),!(p.source!=null&&p.target!=null))throw"Edge source and/or target is null!";if(!(p.source.edges.indexOf(p)==-1&&p.target.edges.indexOf(p)==-1))throw"Edge already in source and/or target incidency list!";return p.source.edges.push(p),p.target.edges.push(p),p}},o.prototype.remove=function(e){if(e instanceof d){var r=e;if(r.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(r==this.rootGraph||r.parent!=null&&r.parent.graphManager==this))throw"Invalid parent node!";var p=[];p=p.concat(r.getEdges());for(var i,g=p.length,t=0;t<g;t++)i=p[t],r.remove(i);var a=[];a=a.concat(r.getNodes());var l;g=a.length;for(var t=0;t<g;t++)l=a[t],r.remove(l);r==this.rootGraph&&this.setRootGraph(null);var u=this.graphs.indexOf(r);this.graphs.splice(u,1),r.parent=null}else if(e instanceof s){if(i=e,i==null)throw"Edge is null!";if(!i.isInterGraph)throw"Not an inter-graph edge!";if(!(i.source!=null&&i.target!=null))throw"Source and/or target is null!";if(!(i.source.edges.indexOf(i)!=-1&&i.target.edges.indexOf(i)!=-1))throw"Source and/or target doesn't know this edge!";var u=i.source.edges.indexOf(i);if(i.source.edges.splice(u,1),u=i.target.edges.indexOf(i),i.target.edges.splice(u,1),!(i.source.owner!=null&&i.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(i.source.owner.getGraphManager().edges.indexOf(i)==-1)throw"Not in owner graph manager's edge list!";var u=i.source.owner.getGraphManager().edges.indexOf(i);i.source.owner.getGraphManager().edges.splice(u,1)}},o.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},o.prototype.getGraphs=function(){return this.graphs},o.prototype.getAllNodes=function(){if(this.allNodes==null){for(var e=[],r=this.getGraphs(),p=r.length,i=0;i<p;i++)e=e.concat(r[i].getNodes());this.allNodes=e}return this.allNodes},o.prototype.resetAllNodes=function(){this.allNodes=null},o.prototype.resetAllEdges=function(){this.allEdges=null},o.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},o.prototype.getAllEdges=function(){if(this.allEdges==null){for(var e=[],r=this.getGraphs(),p=r.length,i=0;i<r.length;i++)e=e.concat(r[i].getEdges());e=e.concat(this.edges),this.allEdges=e}return this.allEdges},o.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},o.prototype.setAllNodesToApplyGravitation=function(e){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=e},o.prototype.getRoot=function(){return this.rootGraph},o.prototype.setRootGraph=function(e){if(e.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=e,e.parent==null&&(e.parent=this.layout.newNode("Root node"))},o.prototype.getLayout=function(){return this.layout},o.prototype.isOneAncestorOfOther=function(e,r){if(!(e!=null&&r!=null))throw"assert failed";if(e==r)return!0;var p=e.getOwner(),i;do{if(i=p.getParent(),i==null)break;if(i==r)return!0;if(p=i.getOwner(),p==null)break}while(!0);p=r.getOwner();do{if(i=p.getParent(),i==null)break;if(i==e)return!0;if(p=i.getOwner(),p==null)break}while(!0);return!1},o.prototype.calcLowestCommonAncestors=function(){for(var e,r,p,i,g,t=this.getAllEdges(),a=t.length,l=0;l<a;l++){if(e=t[l],r=e.source,p=e.target,e.lca=null,e.sourceInLca=r,e.targetInLca=p,r==p){e.lca=r.getOwner();continue}for(i=r.getOwner();e.lca==null;){for(e.targetInLca=p,g=p.getOwner();e.lca==null;){if(g==i){e.lca=g;break}if(g==this.rootGraph)break;if(e.lca!=null)throw"assert failed";e.targetInLca=g.getParent(),g=e.targetInLca.getOwner()}if(i==this.rootGraph)break;e.lca==null&&(e.sourceInLca=i.getParent(),i=e.sourceInLca.getOwner())}if(e.lca==null)throw"assert failed"}},o.prototype.calcLowestCommonAncestor=function(e,r){if(e==r)return e.getOwner();var p=e.getOwner();do{if(p==null)break;var i=r.getOwner();do{if(i==null)break;if(i==p)return i;i=i.getParent().getOwner()}while(!0);p=p.getParent().getOwner()}while(!0);return p},o.prototype.calcInclusionTreeDepths=function(e,r){e==null&&r==null&&(e=this.rootGraph,r=1);for(var p,i=e.getNodes(),g=i.length,t=0;t<g;t++)p=i[t],p.inclusionTreeDepth=r,p.child!=null&&this.calcInclusionTreeDepths(p.child,r+1)},o.prototype.includesInvalidEdge=function(){for(var e,r=[],p=this.edges.length,i=0;i<p;i++)e=this.edges[i],this.isOneAncestorOfOther(e.source,e.target)&&r.push(e);for(var i=0;i<r.length;i++)this.remove(r[i]);return!1},it.exports=o},function(it,ut,S){"use strict";var d=S(12);function s(){}s.calcSeparationAmount=function(o,e,r,p){if(!o.intersects(e))throw"assert failed";var i=new Array(2);this.decideDirectionsForOverlappingNodes(o,e,i),r[0]=Math.min(o.getRight(),e.getRight())-Math.max(o.x,e.x),r[1]=Math.min(o.getBottom(),e.getBottom())-Math.max(o.y,e.y),o.getX()<=e.getX()&&o.getRight()>=e.getRight()?r[0]+=Math.min(e.getX()-o.getX(),o.getRight()-e.getRight()):e.getX()<=o.getX()&&e.getRight()>=o.getRight()&&(r[0]+=Math.min(o.getX()-e.getX(),e.getRight()-o.getRight())),o.getY()<=e.getY()&&o.getBottom()>=e.getBottom()?r[1]+=Math.min(e.getY()-o.getY(),o.getBottom()-e.getBottom()):e.getY()<=o.getY()&&e.getBottom()>=o.getBottom()&&(r[1]+=Math.min(o.getY()-e.getY(),e.getBottom()-o.getBottom()));var g=Math.abs((e.getCenterY()-o.getCenterY())/(e.getCenterX()-o.getCenterX()));e.getCenterY()===o.getCenterY()&&e.getCenterX()===o.getCenterX()&&(g=1);var t=g*r[0],a=r[1]/g;r[0]<a?a=r[0]:t=r[1],r[0]=-1*i[0]*(a/2+p),r[1]=-1*i[1]*(t/2+p)},s.decideDirectionsForOverlappingNodes=function(o,e,r){o.getCenterX()<e.getCenterX()?r[0]=-1:r[0]=1,o.getCenterY()<e.getCenterY()?r[1]=-1:r[1]=1},s.getIntersection2=function(o,e,r){var p=o.getCenterX(),i=o.getCenterY(),g=e.getCenterX(),t=e.getCenterY();if(o.intersects(e))return r[0]=p,r[1]=i,r[2]=g,r[3]=t,!0;var a=o.getX(),l=o.getY(),u=o.getRight(),c=o.getX(),m=o.getBottom(),h=o.getRight(),C=o.getWidthHalf(),T=o.getHeightHalf(),N=e.getX(),D=e.getY(),_=e.getRight(),I=e.getX(),ot=e.getBottom(),mt=e.getRight(),vt=e.getWidthHalf(),Dt=e.getHeightHalf(),G=!1,k=!1;if(p===g){if(i>t)return r[0]=p,r[1]=l,r[2]=g,r[3]=ot,!1;if(i<t)return r[0]=p,r[1]=m,r[2]=g,r[3]=D,!1}else if(i===t){if(p>g)return r[0]=a,r[1]=i,r[2]=_,r[3]=t,!1;if(p<g)return r[0]=u,r[1]=i,r[2]=N,r[3]=t,!1}else{var n=o.height/o.width,E=e.height/e.width,f=(t-i)/(g-p),y=void 0,v=void 0,R=void 0,w=void 0,X=void 0,H=void 0;if(-n===f?p>g?(r[0]=c,r[1]=m,G=!0):(r[0]=u,r[1]=l,G=!0):n===f&&(p>g?(r[0]=a,r[1]=l,G=!0):(r[0]=h,r[1]=m,G=!0)),-E===f?g>p?(r[2]=I,r[3]=ot,k=!0):(r[2]=_,r[3]=D,k=!0):E===f&&(g>p?(r[2]=N,r[3]=D,k=!0):(r[2]=mt,r[3]=ot,k=!0)),G&&k)return!1;if(p>g?i>t?(y=this.getCardinalDirection(n,f,4),v=this.getCardinalDirection(E,f,2)):(y=this.getCardinalDirection(-n,f,3),v=this.getCardinalDirection(-E,f,1)):i>t?(y=this.getCardinalDirection(-n,f,1),v=this.getCardinalDirection(-E,f,3)):(y=this.getCardinalDirection(n,f,2),v=this.getCardinalDirection(E,f,4)),!G)switch(y){case 1:w=l,R=p+-T/f,r[0]=R,r[1]=w;break;case 2:R=h,w=i+C*f,r[0]=R,r[1]=w;break;case 3:w=m,R=p+T/f,r[0]=R,r[1]=w;break;case 4:R=c,w=i+-C*f,r[0]=R,r[1]=w;break}if(!k)switch(v){case 1:H=D,X=g+-Dt/f,r[2]=X,r[3]=H;break;case 2:X=mt,H=t+vt*f,r[2]=X,r[3]=H;break;case 3:H=ot,X=g+Dt/f,r[2]=X,r[3]=H;break;case 4:X=I,H=t+-vt*f,r[2]=X,r[3]=H;break}}return!1},s.getCardinalDirection=function(o,e,r){return o>e?r:1+r%4},s.getIntersection=function(o,e,r,p){if(p==null)return this.getIntersection2(o,e,r);var i=o.x,g=o.y,t=e.x,a=e.y,l=r.x,u=r.y,c=p.x,m=p.y,h=void 0,C=void 0,T=void 0,N=void 0,D=void 0,_=void 0,I=void 0,ot=void 0,mt=void 0;return T=a-g,D=i-t,I=t*g-i*a,N=m-u,_=l-c,ot=c*u-l*m,mt=T*_-N*D,mt===0?null:(h=(D*ot-_*I)/mt,C=(N*I-T*ot)/mt,new d(h,C))},s.angleOfVector=function(o,e,r,p){var i=void 0;return o!==r?(i=Math.atan((p-e)/(r-o)),r<o?i+=Math.PI:p<e&&(i+=this.TWO_PI)):p<e?i=this.ONE_AND_HALF_PI:i=this.HALF_PI,i},s.doIntersect=function(o,e,r,p){var i=o.x,g=o.y,t=e.x,a=e.y,l=r.x,u=r.y,c=p.x,m=p.y,h=(t-i)*(m-u)-(c-l)*(a-g);if(h===0)return!1;var C=((m-u)*(c-i)+(l-c)*(m-g))/h,T=((g-a)*(c-i)+(t-i)*(m-g))/h;return 0<C&&C<1&&0<T&&T<1},s.findCircleLineIntersections=function(o,e,r,p,i,g,t){var a=(r-o)*(r-o)+(p-e)*(p-e),l=2*((o-i)*(r-o)+(e-g)*(p-e)),u=(o-i)*(o-i)+(e-g)*(e-g)-t*t,c=l*l-4*a*u;if(c>=0){var m=(-l+Math.sqrt(l*l-4*a*u))/(2*a),h=(-l-Math.sqrt(l*l-4*a*u))/(2*a),C=null;return m>=0&&m<=1?[m]:h>=0&&h<=1?[h]:C}else return null},s.HALF_PI=.5*Math.PI,s.ONE_AND_HALF_PI=1.5*Math.PI,s.TWO_PI=2*Math.PI,s.THREE_PI=3*Math.PI,it.exports=s},function(it,ut,S){"use strict";function d(){}d.sign=function(s){return s>0?1:s<0?-1:0},d.floor=function(s){return s<0?Math.ceil(s):Math.floor(s)},d.ceil=function(s){return s<0?Math.floor(s):Math.ceil(s)},it.exports=d},function(it,ut,S){"use strict";function d(){}d.MAX_VALUE=2147483647,d.MIN_VALUE=-2147483648,it.exports=d},function(it,ut,S){"use strict";var d=function(){function i(g,t){for(var a=0;a<t.length;a++){var l=t[a];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(g,l.key,l)}}return function(g,t,a){return t&&i(g.prototype,t),a&&i(g,a),g}}();function s(i,g){if(!(i instanceof g))throw new TypeError("Cannot call a class as a function")}var o=function(g){return{value:g,next:null,prev:null}},e=function(g,t,a,l){return g!==null?g.next=t:l.head=t,a!==null?a.prev=t:l.tail=t,t.prev=g,t.next=a,l.length++,t},r=function(g,t){var a=g.prev,l=g.next;return a!==null?a.next=l:t.head=l,l!==null?l.prev=a:t.tail=a,g.prev=g.next=null,t.length--,g},p=function(){function i(g){var t=this;s(this,i),this.length=0,this.head=null,this.tail=null,g!=null&&g.forEach(function(a){return t.push(a)})}return d(i,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(t,a){return e(a.prev,o(t),a,this)}},{key:"insertAfter",value:function(t,a){return e(a,o(t),a.next,this)}},{key:"insertNodeBefore",value:function(t,a){return e(a.prev,t,a,this)}},{key:"insertNodeAfter",value:function(t,a){return e(a,t,a.next,this)}},{key:"push",value:function(t){return e(this.tail,o(t),null,this)}},{key:"unshift",value:function(t){return e(null,o(t),this.head,this)}},{key:"remove",value:function(t){return r(t,this)}},{key:"pop",value:function(){return r(this.tail,this).value}},{key:"popNode",value:function(){return r(this.tail,this)}},{key:"shift",value:function(){return r(this.head,this).value}},{key:"shiftNode",value:function(){return r(this.head,this)}},{key:"get_object_at",value:function(t){if(t<=this.length()){for(var a=1,l=this.head;a<t;)l=l.next,a++;return l.value}}},{key:"set_object_at",value:function(t,a){if(t<=this.length()){for(var l=1,u=this.head;l<t;)u=u.next,l++;u.value=a}}}]),i}();it.exports=p},function(it,ut,S){"use strict";function d(s,o,e){this.x=null,this.y=null,s==null&&o==null&&e==null?(this.x=0,this.y=0):typeof s=="number"&&typeof o=="number"&&e==null?(this.x=s,this.y=o):s.constructor.name=="Point"&&o==null&&e==null&&(e=s,this.x=e.x,this.y=e.y)}d.prototype.getX=function(){return this.x},d.prototype.getY=function(){return this.y},d.prototype.getLocation=function(){return new d(this.x,this.y)},d.prototype.setLocation=function(s,o,e){s.constructor.name=="Point"&&o==null&&e==null?(e=s,this.setLocation(e.x,e.y)):typeof s=="number"&&typeof o=="number"&&e==null&&(parseInt(s)==s&&parseInt(o)==o?this.move(s,o):(this.x=Math.floor(s+.5),this.y=Math.floor(o+.5)))},d.prototype.move=function(s,o){this.x=s,this.y=o},d.prototype.translate=function(s,o){this.x+=s,this.y+=o},d.prototype.equals=function(s){if(s.constructor.name=="Point"){var o=s;return this.x==o.x&&this.y==o.y}return this==s},d.prototype.toString=function(){return new d().constructor.name+"[x="+this.x+",y="+this.y+"]"},it.exports=d},function(it,ut,S){"use strict";function d(s,o,e,r){this.x=0,this.y=0,this.width=0,this.height=0,s!=null&&o!=null&&e!=null&&r!=null&&(this.x=s,this.y=o,this.width=e,this.height=r)}d.prototype.getX=function(){return this.x},d.prototype.setX=function(s){this.x=s},d.prototype.getY=function(){return this.y},d.prototype.setY=function(s){this.y=s},d.prototype.getWidth=function(){return this.width},d.prototype.setWidth=function(s){this.width=s},d.prototype.getHeight=function(){return this.height},d.prototype.setHeight=function(s){this.height=s},d.prototype.getRight=function(){return this.x+this.width},d.prototype.getBottom=function(){return this.y+this.height},d.prototype.intersects=function(s){return!(this.getRight()<s.x||this.getBottom()<s.y||s.getRight()<this.x||s.getBottom()<this.y)},d.prototype.getCenterX=function(){return this.x+this.width/2},d.prototype.getMinX=function(){return this.getX()},d.prototype.getMaxX=function(){return this.getX()+this.width},d.prototype.getCenterY=function(){return this.y+this.height/2},d.prototype.getMinY=function(){return this.getY()},d.prototype.getMaxY=function(){return this.getY()+this.height},d.prototype.getWidthHalf=function(){return this.width/2},d.prototype.getHeightHalf=function(){return this.height/2},it.exports=d},function(it,ut,S){"use strict";var d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o};function s(){}s.lastID=0,s.createID=function(o){return s.isPrimitive(o)?o:(o.uniqueID!=null||(o.uniqueID=s.getString(),s.lastID++),o.uniqueID)},s.getString=function(o){return o==null&&(o=s.lastID),"Object#"+o},s.isPrimitive=function(o){var e=typeof o=="undefined"?"undefined":d(o);return o==null||e!="object"&&e!="function"},it.exports=s},function(it,ut,S){"use strict";function d(l){if(Array.isArray(l)){for(var u=0,c=Array(l.length);u<l.length;u++)c[u]=l[u];return c}else return Array.from(l)}var s=S(0),o=S(7),e=S(3),r=S(1),p=S(6),i=S(5),g=S(17),t=S(29);function a(l){t.call(this),this.layoutQuality=s.QUALITY,this.createBendsAsNeeded=s.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=s.DEFAULT_INCREMENTAL,this.animationOnLayout=s.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=s.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=s.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=s.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new o(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,l!=null&&(this.isRemoteUse=l)}a.RANDOM_SEED=1,a.prototype=Object.create(t.prototype),a.prototype.getGraphManager=function(){return this.graphManager},a.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},a.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},a.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},a.prototype.newGraphManager=function(){var l=new o(this);return this.graphManager=l,l},a.prototype.newGraph=function(l){return new p(null,this.graphManager,l)},a.prototype.newNode=function(l){return new e(this.graphManager,l)},a.prototype.newEdge=function(l){return new r(null,null,l)},a.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},a.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var l;return this.checkLayoutSuccess()?l=!1:l=this.layout(),s.ANIMATE==="during"?!1:(l&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,l)},a.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},a.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var l,u=this.graphManager.getAllEdges(),c=0;c<u.length;c++)l=u[c];for(var m,h=this.graphManager.getRoot().getNodes(),c=0;c<h.length;c++)m=h[c];this.update(this.graphManager.getRoot())}},a.prototype.update=function(l){if(l==null)this.update2();else if(l instanceof e){var u=l;if(u.getChild()!=null)for(var c=u.getChild().getNodes(),m=0;m<c.length;m++)update(c[m]);if(u.vGraphObject!=null){var h=u.vGraphObject;h.update(u)}}else if(l instanceof r){var C=l;if(C.vGraphObject!=null){var T=C.vGraphObject;T.update(C)}}else if(l instanceof p){var N=l;if(N.vGraphObject!=null){var D=N.vGraphObject;D.update(N)}}},a.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=s.QUALITY,this.animationDuringLayout=s.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=s.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=s.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=s.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=s.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=s.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},a.prototype.transform=function(l){if(l==null)this.transform(new i(0,0));else{var u=new g,c=this.graphManager.getRoot().updateLeftTop();if(c!=null){u.setWorldOrgX(l.x),u.setWorldOrgY(l.y),u.setDeviceOrgX(c.x),u.setDeviceOrgY(c.y);for(var m=this.getAllNodes(),h,C=0;C<m.length;C++)h=m[C],h.transform(u)}}},a.prototype.positionNodesRandomly=function(l){if(l==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var u,c,m=l.getNodes(),h=0;h<m.length;h++)u=m[h],c=u.getChild(),c==null||c.getNodes().length==0?u.scatter():(this.positionNodesRandomly(c),u.updateBounds())},a.prototype.getFlatForest=function(){for(var l=[],u=!0,c=this.graphManager.getRoot().getNodes(),m=!0,h=0;h<c.length;h++)c[h].getChild()!=null&&(m=!1);if(!m)return l;var C=new Set,T=[],N=new Map,D=[];for(D=D.concat(c);D.length>0&&u;){for(T.push(D[0]);T.length>0&&u;){var _=T[0];T.splice(0,1),C.add(_);for(var I=_.getEdges(),h=0;h<I.length;h++){var ot=I[h].getOtherEnd(_);if(N.get(_)!=ot)if(!C.has(ot))T.push(ot),N.set(ot,_);else{u=!1;break}}}if(!u)l=[];else{var mt=[].concat(d(C));l.push(mt);for(var h=0;h<mt.length;h++){var vt=mt[h],Dt=D.indexOf(vt);Dt>-1&&D.splice(Dt,1)}C=new Set,N=new Map}}return l},a.prototype.createDummyNodesForBendpoints=function(l){for(var u=[],c=l.source,m=this.graphManager.calcLowestCommonAncestor(l.source,l.target),h=0;h<l.bendpoints.length;h++){var C=this.newNode(null);C.setRect(new Point(0,0),new Dimension(1,1)),m.add(C);var T=this.newEdge(null);this.graphManager.add(T,c,C),u.add(C),c=C}var T=this.newEdge(null);return this.graphManager.add(T,c,l.target),this.edgeToDummyNodes.set(l,u),l.isInterGraph()?this.graphManager.remove(l):m.remove(l),u},a.prototype.createBendpointsFromDummyNodes=function(){var l=[];l=l.concat(this.graphManager.getAllEdges()),l=[].concat(d(this.edgeToDummyNodes.keys())).concat(l);for(var u=0;u<l.length;u++){var c=l[u];if(c.bendpoints.length>0){for(var m=this.edgeToDummyNodes.get(c),h=0;h<m.length;h++){var C=m[h],T=new i(C.getCenterX(),C.getCenterY()),N=c.bendpoints.get(h);N.x=T.x,N.y=T.y,C.getOwner().remove(C)}this.graphManager.add(c,c.source,c.target)}}},a.transform=function(l,u,c,m){if(c!=null&&m!=null){var h=u;if(l<=50){var C=u/c;h-=(u-C)/50*(50-l)}else{var T=u*m;h+=(T-u)/50*(l-50)}return h}else{var N,D;return l<=50?(N=9*u/500,D=u/10):(N=9*u/50,D=-8*u),N*l+D}},a.findCenterOfTree=function(l){var u=[];u=u.concat(l);var c=[],m=new Map,h=!1,C=null;(u.length==1||u.length==2)&&(h=!0,C=u[0]);for(var T=0;T<u.length;T++){var N=u[T],D=N.getNeighborsList().size;m.set(N,N.getNeighborsList().size),D==1&&c.push(N)}var _=[];for(_=_.concat(c);!h;){var I=[];I=I.concat(_),_=[];for(var T=0;T<u.length;T++){var N=u[T],ot=u.indexOf(N);ot>=0&&u.splice(ot,1);var mt=N.getNeighborsList();mt.forEach(function(G){if(c.indexOf(G)<0){var k=m.get(G),n=k-1;n==1&&_.push(G),m.set(G,n)}})}c=c.concat(_),(u.length==1||u.length==2)&&(h=!0,C=u[0])}return C},a.prototype.setGraphManager=function(l){this.graphManager=l},it.exports=a},function(it,ut,S){"use strict";function d(){}d.seed=1,d.x=0,d.nextDouble=function(){return d.x=Math.sin(d.seed++)*1e4,d.x-Math.floor(d.x)},it.exports=d},function(it,ut,S){"use strict";var d=S(5);function s(o,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}s.prototype.getWorldOrgX=function(){return this.lworldOrgX},s.prototype.setWorldOrgX=function(o){this.lworldOrgX=o},s.prototype.getWorldOrgY=function(){return this.lworldOrgY},s.prototype.setWorldOrgY=function(o){this.lworldOrgY=o},s.prototype.getWorldExtX=function(){return this.lworldExtX},s.prototype.setWorldExtX=function(o){this.lworldExtX=o},s.prototype.getWorldExtY=function(){return this.lworldExtY},s.prototype.setWorldExtY=function(o){this.lworldExtY=o},s.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},s.prototype.setDeviceOrgX=function(o){this.ldeviceOrgX=o},s.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},s.prototype.setDeviceOrgY=function(o){this.ldeviceOrgY=o},s.prototype.getDeviceExtX=function(){return this.ldeviceExtX},s.prototype.setDeviceExtX=function(o){this.ldeviceExtX=o},s.prototype.getDeviceExtY=function(){return this.ldeviceExtY},s.prototype.setDeviceExtY=function(o){this.ldeviceExtY=o},s.prototype.transformX=function(o){var e=0,r=this.lworldExtX;return r!=0&&(e=this.ldeviceOrgX+(o-this.lworldOrgX)*this.ldeviceExtX/r),e},s.prototype.transformY=function(o){var e=0,r=this.lworldExtY;return r!=0&&(e=this.ldeviceOrgY+(o-this.lworldOrgY)*this.ldeviceExtY/r),e},s.prototype.inverseTransformX=function(o){var e=0,r=this.ldeviceExtX;return r!=0&&(e=this.lworldOrgX+(o-this.ldeviceOrgX)*this.lworldExtX/r),e},s.prototype.inverseTransformY=function(o){var e=0,r=this.ldeviceExtY;return r!=0&&(e=this.lworldOrgY+(o-this.ldeviceOrgY)*this.lworldExtY/r),e},s.prototype.inverseTransformPoint=function(o){var e=new d(this.inverseTransformX(o.x),this.inverseTransformY(o.y));return e},it.exports=s},function(it,ut,S){"use strict";function d(t){if(Array.isArray(t)){for(var a=0,l=Array(t.length);a<t.length;a++)l[a]=t[a];return l}else return Array.from(t)}var s=S(15),o=S(4),e=S(0),r=S(8),p=S(9);function i(){s.call(this),this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=o.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=o.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=o.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=o.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*o.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=o.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=o.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=o.MAX_ITERATIONS}i.prototype=Object.create(s.prototype);for(var g in s)i[g]=s[g];i.prototype.initParameters=function(){s.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=o.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},i.prototype.calcIdealEdgeLengths=function(){for(var t,a,l,u,c,m,h,C=this.getGraphManager().getAllEdges(),T=0;T<C.length;T++)t=C[T],a=t.idealLength,t.isInterGraph&&(u=t.getSource(),c=t.getTarget(),m=t.getSourceInLca().getEstimatedSize(),h=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=m+h-2*e.SIMPLE_NODE_SIZE),l=t.getLca().getInclusionTreeDepth(),t.idealLength+=a*o.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(u.getInclusionTreeDepth()+c.getInclusionTreeDepth()-2*l))},i.prototype.initSpringEmbedder=function(){var t=this.getAllNodes().length;this.incremental?(t>o.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*o.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-o.ADAPTATION_LOWER_NODE_LIMIT)/(o.ADAPTATION_UPPER_NODE_LIMIT-o.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-o.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=o.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>o.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(o.COOLING_ADAPTATION_FACTOR,1-(t-o.ADAPTATION_LOWER_NODE_LIMIT)/(o.ADAPTATION_UPPER_NODE_LIMIT-o.ADAPTATION_LOWER_NODE_LIMIT)*(1-o.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=o.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*o.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},i.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),a,l=0;l<t.length;l++)a=t[l],this.calcSpringForce(a,a.idealLength)},i.prototype.calcRepulsionForces=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,l,u,c,m,h=this.getAllNodes(),C;if(this.useFRGridVariant)for(this.totalIterations%o.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),C=new Set,l=0;l<h.length;l++)c=h[l],this.calculateRepulsionForceOfANode(c,C,t,a),C.add(c);else for(l=0;l<h.length;l++)for(c=h[l],u=l+1;u<h.length;u++)m=h[u],c.getOwner()==m.getOwner()&&this.calcRepulsionForce(c,m)},i.prototype.calcGravitationalForces=function(){for(var t,a=this.getAllNodesToApplyGravitation(),l=0;l<a.length;l++)t=a[l],this.calcGravitationalForce(t)},i.prototype.moveNodes=function(){for(var t=this.getAllNodes(),a,l=0;l<t.length;l++)a=t[l],a.move()},i.prototype.calcSpringForce=function(t,a){var l=t.getSource(),u=t.getTarget(),c,m,h,C;if(this.uniformLeafNodeSizes&&l.getChild()==null&&u.getChild()==null)t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;c=t.getLength(),c!=0&&(m=t.edgeElasticity*(c-a),h=m*(t.lengthX/c),C=m*(t.lengthY/c),l.springForceX+=h,l.springForceY+=C,u.springForceX-=h,u.springForceY-=C)},i.prototype.calcRepulsionForce=function(t,a){var l=t.getRect(),u=a.getRect(),c=new Array(2),m=new Array(4),h,C,T,N,D,_,I;if(l.intersects(u)){r.calcSeparationAmount(l,u,c,o.DEFAULT_EDGE_LENGTH/2),_=2*c[0],I=2*c[1];var ot=t.noOfChildren*a.noOfChildren/(t.noOfChildren+a.noOfChildren);t.repulsionForceX-=ot*_,t.repulsionForceY-=ot*I,a.repulsionForceX+=ot*_,a.repulsionForceY+=ot*I}else this.uniformLeafNodeSizes&&t.getChild()==null&&a.getChild()==null?(h=u.getCenterX()-l.getCenterX(),C=u.getCenterY()-l.getCenterY()):(r.getIntersection(l,u,m),h=m[2]-m[0],C=m[3]-m[1]),Math.abs(h)<o.MIN_REPULSION_DIST&&(h=p.sign(h)*o.MIN_REPULSION_DIST),Math.abs(C)<o.MIN_REPULSION_DIST&&(C=p.sign(C)*o.MIN_REPULSION_DIST),T=h*h+C*C,N=Math.sqrt(T),D=(t.nodeRepulsion/2+a.nodeRepulsion/2)*t.noOfChildren*a.noOfChildren/T,_=D*h/N,I=D*C/N,t.repulsionForceX-=_,t.repulsionForceY-=I,a.repulsionForceX+=_,a.repulsionForceY+=I},i.prototype.calcGravitationalForce=function(t){var a,l,u,c,m,h,C,T;a=t.getOwner(),l=(a.getRight()+a.getLeft())/2,u=(a.getTop()+a.getBottom())/2,c=t.getCenterX()-l,m=t.getCenterY()-u,h=Math.abs(c)+t.getWidth()/2,C=Math.abs(m)+t.getHeight()/2,t.getOwner()==this.graphManager.getRoot()?(T=a.getEstimatedSize()*this.gravityRangeFactor,(h>T||C>T)&&(t.gravitationForceX=-this.gravityConstant*c,t.gravitationForceY=-this.gravityConstant*m)):(T=a.getEstimatedSize()*this.compoundGravityRangeFactor,(h>T||C>T)&&(t.gravitationForceX=-this.gravityConstant*c*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*m*this.compoundGravityConstant))},i.prototype.isConverged=function(){var t,a=!1;return this.totalIterations>this.maxIterations/3&&(a=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,t||a},i.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},i.prototype.calcNoOfChildrenForAllNodes=function(){for(var t,a=this.graphManager.getAllNodes(),l=0;l<a.length;l++)t=a[l],t.noOfChildren=t.getNoOfChildren()},i.prototype.calcGrid=function(t){var a=0,l=0;a=parseInt(Math.ceil((t.getRight()-t.getLeft())/this.repulsionRange)),l=parseInt(Math.ceil((t.getBottom()-t.getTop())/this.repulsionRange));for(var u=new Array(a),c=0;c<a;c++)u[c]=new Array(l);for(var c=0;c<a;c++)for(var m=0;m<l;m++)u[c][m]=new Array;return u},i.prototype.addNodeToGrid=function(t,a,l){var u=0,c=0,m=0,h=0;u=parseInt(Math.floor((t.getRect().x-a)/this.repulsionRange)),c=parseInt(Math.floor((t.getRect().width+t.getRect().x-a)/this.repulsionRange)),m=parseInt(Math.floor((t.getRect().y-l)/this.repulsionRange)),h=parseInt(Math.floor((t.getRect().height+t.getRect().y-l)/this.repulsionRange));for(var C=u;C<=c;C++)for(var T=m;T<=h;T++)this.grid[C][T].push(t),t.setGridCoordinates(u,c,m,h)},i.prototype.updateGrid=function(){var t,a,l=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),t=0;t<l.length;t++)a=l[t],this.addNodeToGrid(a,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},i.prototype.calculateRepulsionForceOfANode=function(t,a,l,u){if(this.totalIterations%o.GRID_CALCULATION_CHECK_PERIOD==1&&l||u){var c=new Set;t.surrounding=new Array;for(var m,h=this.grid,C=t.startX-1;C<t.finishX+2;C++)for(var T=t.startY-1;T<t.finishY+2;T++)if(!(C<0||T<0||C>=h.length||T>=h[0].length)){for(var N=0;N<h[C][T].length;N++)if(m=h[C][T][N],!(t.getOwner()!=m.getOwner()||t==m)&&!a.has(m)&&!c.has(m)){var D=Math.abs(t.getCenterX()-m.getCenterX())-(t.getWidth()/2+m.getWidth()/2),_=Math.abs(t.getCenterY()-m.getCenterY())-(t.getHeight()/2+m.getHeight()/2);D<=this.repulsionRange&&_<=this.repulsionRange&&c.add(m)}}t.surrounding=[].concat(d(c))}for(C=0;C<t.surrounding.length;C++)this.calcRepulsionForce(t,t.surrounding[C])},i.prototype.calcRepulsionRange=function(){return 0},it.exports=i},function(it,ut,S){"use strict";var d=S(1),s=S(4);function o(r,p,i){d.call(this,r,p,i),this.idealLength=s.DEFAULT_EDGE_LENGTH,this.edgeElasticity=s.DEFAULT_SPRING_STRENGTH}o.prototype=Object.create(d.prototype);for(var e in d)o[e]=d[e];it.exports=o},function(it,ut,S){"use strict";var d=S(3),s=S(4);function o(r,p,i,g){d.call(this,r,p,i,g),this.nodeRepulsion=s.DEFAULT_REPULSION_STRENGTH,this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}o.prototype=Object.create(d.prototype);for(var e in d)o[e]=d[e];o.prototype.setGridCoordinates=function(r,p,i,g){this.startX=r,this.finishX=p,this.startY=i,this.finishY=g},it.exports=o},function(it,ut,S){"use strict";function d(s,o){this.width=0,this.height=0,s!==null&&o!==null&&(this.height=o,this.width=s)}d.prototype.getWidth=function(){return this.width},d.prototype.setWidth=function(s){this.width=s},d.prototype.getHeight=function(){return this.height},d.prototype.setHeight=function(s){this.height=s},it.exports=d},function(it,ut,S){"use strict";var d=S(14);function s(){this.map={},this.keys=[]}s.prototype.put=function(o,e){var r=d.createID(o);this.contains(r)||(this.map[r]=e,this.keys.push(o))},s.prototype.contains=function(o){var e=d.createID(o);return this.map[o]!=null},s.prototype.get=function(o){var e=d.createID(o);return this.map[e]},s.prototype.keySet=function(){return this.keys},it.exports=s},function(it,ut,S){"use strict";var d=S(14);function s(){this.set={}}s.prototype.add=function(o){var e=d.createID(o);this.contains(e)||(this.set[e]=o)},s.prototype.remove=function(o){delete this.set[d.createID(o)]},s.prototype.clear=function(){this.set={}},s.prototype.contains=function(o){return this.set[d.createID(o)]==o},s.prototype.isEmpty=function(){return this.size()===0},s.prototype.size=function(){return Object.keys(this.set).length},s.prototype.addAllTo=function(o){for(var e=Object.keys(this.set),r=e.length,p=0;p<r;p++)o.push(this.set[e[p]])},s.prototype.size=function(){return Object.keys(this.set).length},s.prototype.addAll=function(o){for(var e=o.length,r=0;r<e;r++){var p=o[r];this.add(p)}},it.exports=s},function(it,ut,S){"use strict";function d(){}d.multMat=function(s,o){for(var e=[],r=0;r<s.length;r++){e[r]=[];for(var p=0;p<o[0].length;p++){e[r][p]=0;for(var i=0;i<s[0].length;i++)e[r][p]+=s[r][i]*o[i][p]}}return e},d.transpose=function(s){for(var o=[],e=0;e<s[0].length;e++){o[e]=[];for(var r=0;r<s.length;r++)o[e][r]=s[r][e]}return o},d.multCons=function(s,o){for(var e=[],r=0;r<s.length;r++)e[r]=s[r]*o;return e},d.minusOp=function(s,o){for(var e=[],r=0;r<s.length;r++)e[r]=s[r]-o[r];return e},d.dotProduct=function(s,o){for(var e=0,r=0;r<s.length;r++)e+=s[r]*o[r];return e},d.mag=function(s){return Math.sqrt(this.dotProduct(s,s))},d.normalize=function(s){for(var o=[],e=this.mag(s),r=0;r<s.length;r++)o[r]=s[r]/e;return o},d.multGamma=function(s){for(var o=[],e=0,r=0;r<s.length;r++)e+=s[r];e*=-1/s.length;for(var p=0;p<s.length;p++)o[p]=e+s[p];return o},d.multL=function(s,o,e){for(var r=[],p=[],i=[],g=0;g<o[0].length;g++){for(var t=0,a=0;a<o.length;a++)t+=-.5*o[a][g]*s[a];p[g]=t}for(var l=0;l<e.length;l++){for(var u=0,c=0;c<e.length;c++)u+=e[l][c]*p[c];i[l]=u}for(var m=0;m<o.length;m++){for(var h=0,C=0;C<o[0].length;C++)h+=o[m][C]*i[C];r[m]=h}return r},it.exports=d},function(it,ut,S){"use strict";var d=function(){function r(p,i){for(var g=0;g<i.length;g++){var t=i[g];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(p,t.key,t)}}return function(p,i,g){return i&&r(p.prototype,i),g&&r(p,g),p}}();function s(r,p){if(!(r instanceof p))throw new TypeError("Cannot call a class as a function")}var o=S(11),e=function(){function r(p,i){s(this,r),(i!==null||i!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var g=void 0;p instanceof o?g=p.size():g=p.length,this._quicksort(p,0,g-1)}return d(r,[{key:"_quicksort",value:function(i,g,t){if(g<t){var a=this._partition(i,g,t);this._quicksort(i,g,a),this._quicksort(i,a+1,t)}}},{key:"_partition",value:function(i,g,t){for(var a=this._get(i,g),l=g,u=t;;){for(;this.compareFunction(a,this._get(i,u));)u--;for(;this.compareFunction(this._get(i,l),a);)l++;if(l<u)this._swap(i,l,u),l++,u--;else return u}}},{key:"_get",value:function(i,g){return i instanceof o?i.get_object_at(g):i[g]}},{key:"_set",value:function(i,g,t){i instanceof o?i.set_object_at(g,t):i[g]=t}},{key:"_swap",value:function(i,g,t){var a=this._get(i,g);this._set(i,g,this._get(i,t)),this._set(i,t,a)}},{key:"_defaultCompareFunction",value:function(i,g){return g>i}}]),r}();it.exports=e},function(it,ut,S){"use strict";function d(){}d.svd=function(s){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=s.length,this.n=s[0].length;var o=Math.min(this.m,this.n);this.s=function(xt){for(var Ft=[];xt-- >0;)Ft.push(0);return Ft}(Math.min(this.m+1,this.n)),this.U=function(xt){var Ft=function zt(Ht){if(Ht.length==0)return 0;for(var Vt=[],Gt=0;Gt<Ht[0];Gt++)Vt.push(zt(Ht.slice(1)));return Vt};return Ft(xt)}([this.m,o]),this.V=function(xt){var Ft=function zt(Ht){if(Ht.length==0)return 0;for(var Vt=[],Gt=0;Gt<Ht[0];Gt++)Vt.push(zt(Ht.slice(1)));return Vt};return Ft(xt)}([this.n,this.n]);for(var e=function(xt){for(var Ft=[];xt-- >0;)Ft.push(0);return Ft}(this.n),r=function(xt){for(var Ft=[];xt-- >0;)Ft.push(0);return Ft}(this.m),p=!0,i=!0,g=Math.min(this.m-1,this.n),t=Math.max(0,Math.min(this.n-2,this.m)),a=0;a<Math.max(g,t);a++){if(a<g){this.s[a]=0;for(var l=a;l<this.m;l++)this.s[a]=d.hypot(this.s[a],s[l][a]);if(this.s[a]!==0){s[a][a]<0&&(this.s[a]=-this.s[a]);for(var u=a;u<this.m;u++)s[u][a]/=this.s[a];s[a][a]+=1}this.s[a]=-this.s[a]}for(var c=a+1;c<this.n;c++){if(function(xt,Ft){return xt&&Ft}(a<g,this.s[a]!==0)){for(var m=0,h=a;h<this.m;h++)m+=s[h][a]*s[h][c];m=-m/s[a][a];for(var C=a;C<this.m;C++)s[C][c]+=m*s[C][a]}e[c]=s[a][c]}if(function(xt,Ft){return xt&&Ft}(p,a<g))for(var T=a;T<this.m;T++)this.U[T][a]=s[T][a];if(a<t){e[a]=0;for(var N=a+1;N<this.n;N++)e[a]=d.hypot(e[a],e[N]);if(e[a]!==0){e[a+1]<0&&(e[a]=-e[a]);for(var D=a+1;D<this.n;D++)e[D]/=e[a];e[a+1]+=1}if(e[a]=-e[a],function(xt,Ft){return xt&&Ft}(a+1<this.m,e[a]!==0)){for(var _=a+1;_<this.m;_++)r[_]=0;for(var I=a+1;I<this.n;I++)for(var ot=a+1;ot<this.m;ot++)r[ot]+=e[I]*s[ot][I];for(var mt=a+1;mt<this.n;mt++)for(var vt=-e[mt]/e[a+1],Dt=a+1;Dt<this.m;Dt++)s[Dt][mt]+=vt*r[Dt]}if(i)for(var G=a+1;G<this.n;G++)this.V[G][a]=e[G]}}var k=Math.min(this.n,this.m+1);if(g<this.n&&(this.s[g]=s[g][g]),this.m<k&&(this.s[k-1]=0),t+1<k&&(e[t]=s[t][k-1]),e[k-1]=0,p){for(var n=g;n<o;n++){for(var E=0;E<this.m;E++)this.U[E][n]=0;this.U[n][n]=1}for(var f=g-1;f>=0;f--)if(this.s[f]!==0){for(var y=f+1;y<o;y++){for(var v=0,R=f;R<this.m;R++)v+=this.U[R][f]*this.U[R][y];v=-v/this.U[f][f];for(var w=f;w<this.m;w++)this.U[w][y]+=v*this.U[w][f]}for(var X=f;X<this.m;X++)this.U[X][f]=-this.U[X][f];this.U[f][f]=1+this.U[f][f];for(var H=0;H<f-1;H++)this.U[H][f]=0}else{for(var U=0;U<this.m;U++)this.U[U][f]=0;this.U[f][f]=1}}if(i)for(var tt=this.n-1;tt>=0;tt--){if(function(xt,Ft){return xt&&Ft}(tt<t,e[tt]!==0))for(var ft=tt+1;ft<o;ft++){for(var B=0,lt=tt+1;lt<this.n;lt++)B+=this.V[lt][tt]*this.V[lt][ft];B=-B/this.V[tt+1][tt];for(var j=tt+1;j<this.n;j++)this.V[j][ft]+=B*this.V[j][tt]}for(var O=0;O<this.n;O++)this.V[O][tt]=0;this.V[tt][tt]=1}for(var $=k-1,K=0,ht=Math.pow(2,-52),Mt=Math.pow(2,-966);k>0;){var rt=void 0,bt=void 0;for(rt=k-2;rt>=-1&&rt!==-1;rt--)if(Math.abs(e[rt])<=Mt+ht*(Math.abs(this.s[rt])+Math.abs(this.s[rt+1]))){e[rt]=0;break}if(rt===k-2)bt=4;else{var Rt=void 0;for(Rt=k-1;Rt>=rt&&Rt!==rt;Rt--){var Xt=(Rt!==k?Math.abs(e[Rt]):0)+(Rt!==rt+1?Math.abs(e[Rt-1]):0);if(Math.abs(this.s[Rt])<=Mt+ht*Xt){this.s[Rt]=0;break}}Rt===rt?bt=3:Rt===k-1?bt=1:(bt=2,rt=Rt)}switch(rt++,bt){case 1:{var x=e[k-2];e[k-2]=0;for(var L=k-2;L>=rt;L--){var M=d.hypot(this.s[L],x),V=this.s[L]/M,Z=x/M;if(this.s[L]=M,L!==rt&&(x=-Z*e[L-1],e[L-1]=V*e[L-1]),i)for(var Q=0;Q<this.n;Q++)M=V*this.V[Q][L]+Z*this.V[Q][k-1],this.V[Q][k-1]=-Z*this.V[Q][L]+V*this.V[Q][k-1],this.V[Q][L]=M}}break;case 2:{var ct=e[rt-1];e[rt-1]=0;for(var q=rt;q<k;q++){var at=d.hypot(this.s[q],ct),et=this.s[q]/at,nt=ct/at;if(this.s[q]=at,ct=-nt*e[q],e[q]=et*e[q],p)for(var dt=0;dt<this.m;dt++)at=et*this.U[dt][q]+nt*this.U[dt][rt-1],this.U[dt][rt-1]=-nt*this.U[dt][q]+et*this.U[dt][rt-1],this.U[dt][q]=at}}break;case 3:{var Tt=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[k-1]),Math.abs(this.s[k-2])),Math.abs(e[k-2])),Math.abs(this.s[rt])),Math.abs(e[rt])),gt=this.s[k-1]/Tt,A=this.s[k-2]/Tt,F=e[k-2]/Tt,b=this.s[rt]/Tt,Y=e[rt]/Tt,P=((A+gt)*(A-gt)+F*F)/2,W=gt*F*(gt*F),yt=0;(function(xt,Ft){return xt||Ft})(P!==0,W!==0)&&(yt=Math.sqrt(P*P+W),P<0&&(yt=-yt),yt=W/(P+yt));for(var st=(b+gt)*(b-gt)+yt,z=b*Y,J=rt;J<k-1;J++){var pt=d.hypot(st,z),Ot=st/pt,At=z/pt;if(J!==rt&&(e[J-1]=pt),st=Ot*this.s[J]+At*e[J],e[J]=Ot*e[J]-At*this.s[J],z=At*this.s[J+1],this.s[J+1]=Ot*this.s[J+1],i)for(var St=0;St<this.n;St++)pt=Ot*this.V[St][J]+At*this.V[St][J+1],this.V[St][J+1]=-At*this.V[St][J]+Ot*this.V[St][J+1],this.V[St][J]=pt;if(pt=d.hypot(st,z),Ot=st/pt,At=z/pt,this.s[J]=pt,st=Ot*e[J]+At*this.s[J+1],this.s[J+1]=-At*e[J]+Ot*this.s[J+1],z=At*e[J+1],e[J+1]=Ot*e[J+1],p&&J<this.m-1)for(var Nt=0;Nt<this.m;Nt++)pt=Ot*this.U[Nt][J]+At*this.U[Nt][J+1],this.U[Nt][J+1]=-At*this.U[Nt][J]+Ot*this.U[Nt][J+1],this.U[Nt][J]=pt}e[k-2]=st,K=K+1}break;case 4:{if(this.s[rt]<=0&&(this.s[rt]=this.s[rt]<0?-this.s[rt]:0,i))for(var Et=0;Et<=$;Et++)this.V[Et][rt]=-this.V[Et][rt];for(;rt<$&&!(this.s[rt]>=this.s[rt+1]);){var wt=this.s[rt];if(this.s[rt]=this.s[rt+1],this.s[rt+1]=wt,i&&rt<this.n-1)for(var Lt=0;Lt<this.n;Lt++)wt=this.V[Lt][rt+1],this.V[Lt][rt+1]=this.V[Lt][rt],this.V[Lt][rt]=wt;if(p&&rt<this.m-1)for(var Ct=0;Ct<this.m;Ct++)wt=this.U[Ct][rt+1],this.U[Ct][rt+1]=this.U[Ct][rt],this.U[Ct][rt]=wt;rt++}K=0,k--}break}}var Ut={U:this.U,V:this.V,S:this.s};return Ut},d.hypot=function(s,o){var e=void 0;return Math.abs(s)>Math.abs(o)?(e=o/s,e=Math.abs(s)*Math.sqrt(1+e*e)):o!=0?(e=s/o,e=Math.abs(o)*Math.sqrt(1+e*e)):e=0,e},it.exports=d},function(it,ut,S){"use strict";var d=function(){function e(r,p){for(var i=0;i<p.length;i++){var g=p[i];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(r,g.key,g)}}return function(r,p,i){return p&&e(r.prototype,p),i&&e(r,i),r}}();function s(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(r,p){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,g=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;s(this,e),this.sequence1=r,this.sequence2=p,this.match_score=i,this.mismatch_penalty=g,this.gap_penalty=t,this.iMax=r.length+1,this.jMax=p.length+1,this.grid=new Array(this.iMax);for(var a=0;a<this.iMax;a++){this.grid[a]=new Array(this.jMax);for(var l=0;l<this.jMax;l++)this.grid[a][l]=0}this.tracebackGrid=new Array(this.iMax);for(var u=0;u<this.iMax;u++){this.tracebackGrid[u]=new Array(this.jMax);for(var c=0;c<this.jMax;c++)this.tracebackGrid[u][c]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return d(e,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var p=1;p<this.jMax;p++)this.grid[0][p]=this.grid[0][p-1]+this.gap_penalty,this.tracebackGrid[0][p]=[!1,!1,!0];for(var i=1;i<this.iMax;i++)this.grid[i][0]=this.grid[i-1][0]+this.gap_penalty,this.tracebackGrid[i][0]=[!1,!0,!1];for(var g=1;g<this.iMax;g++)for(var t=1;t<this.jMax;t++){var a=void 0;this.sequence1[g-1]===this.sequence2[t-1]?a=this.grid[g-1][t-1]+this.match_score:a=this.grid[g-1][t-1]+this.mismatch_penalty;var l=this.grid[g-1][t]+this.gap_penalty,u=this.grid[g][t-1]+this.gap_penalty,c=[a,l,u],m=this.arrayAllMaxIndexes(c);this.grid[g][t]=c[m[0]],this.tracebackGrid[g][t]=[m.includes(0),m.includes(1),m.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var p=[];for(p.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});p[0];){var i=p[0],g=this.tracebackGrid[i.pos[0]][i.pos[1]];g[0]&&p.push({pos:[i.pos[0]-1,i.pos[1]-1],seq1:this.sequence1[i.pos[0]-1]+i.seq1,seq2:this.sequence2[i.pos[1]-1]+i.seq2}),g[1]&&p.push({pos:[i.pos[0]-1,i.pos[1]],seq1:this.sequence1[i.pos[0]-1]+i.seq1,seq2:"-"+i.seq2}),g[2]&&p.push({pos:[i.pos[0],i.pos[1]-1],seq1:"-"+i.seq1,seq2:this.sequence2[i.pos[1]-1]+i.seq2}),i.pos[0]===0&&i.pos[1]===0&&this.alignments.push({sequence1:i.seq1,sequence2:i.seq2}),p.shift()}return this.alignments}},{key:"getAllIndexes",value:function(p,i){for(var g=[],t=-1;(t=p.indexOf(i,t+1))!==-1;)g.push(t);return g}},{key:"arrayAllMaxIndexes",value:function(p){return this.getAllIndexes(p,Math.max.apply(null,p))}}]),e}();it.exports=o},function(it,ut,S){"use strict";var d=function(){};d.FDLayout=S(18),d.FDLayoutConstants=S(4),d.FDLayoutEdge=S(19),d.FDLayoutNode=S(20),d.DimensionD=S(21),d.HashMap=S(22),d.HashSet=S(23),d.IGeometry=S(8),d.IMath=S(9),d.Integer=S(10),d.Point=S(12),d.PointD=S(5),d.RandomSeed=S(16),d.RectangleD=S(13),d.Transform=S(17),d.UniqueIDGeneretor=S(14),d.Quicksort=S(25),d.LinkedList=S(11),d.LGraphObject=S(2),d.LGraph=S(6),d.LEdge=S(1),d.LGraphManager=S(7),d.LNode=S(3),d.Layout=S(15),d.LayoutConstants=S(0),d.NeedlemanWunsch=S(27),d.Matrix=S(24),d.SVD=S(26),it.exports=d},function(it,ut,S){"use strict";function d(){this.listeners=[]}var s=d.prototype;s.addListener=function(o,e){this.listeners.push({event:o,callback:e})},s.removeListener=function(o,e){for(var r=this.listeners.length;r>=0;r--){var p=this.listeners[r];p.event===o&&p.callback===e&&this.listeners.splice(r,1)}},s.emit=function(o,e){for(var r=0;r<this.listeners.length;r++){var p=this.listeners[r];o===p.event&&p.callback(e)}},it.exports=d}])})},64498:function(Yt,it,ut){"use strict";var Xt;ut.d(it,{diagram:function(){return Rt}});var S=ut(88674),d=ut(21347),s=ut(25925),o=ut(4284),e=ut(99970),r=ut(35096),p=ut(12491),i=ut(1387),g=ut(44867),t=ut(989),a={L:"left",R:"right",T:"top",B:"bottom"},l={L:(0,r.eW)(x=>`${x},${x/2} 0,${x} 0,0`,"L"),R:(0,r.eW)(x=>`0,${x/2} ${x},0 ${x},${x}`,"R"),T:(0,r.eW)(x=>`0,0 ${x},0 ${x/2},${x}`,"T"),B:(0,r.eW)(x=>`${x/2},0 ${x},${x} 0,${x}`,"B")},u={L:(0,r.eW)((x,L)=>x-L+2,"L"),R:(0,r.eW)((x,L)=>x-2,"R"),T:(0,r.eW)((x,L)=>x-L+2,"T"),B:(0,r.eW)((x,L)=>x-2,"B")},c=(0,r.eW)(function(x){return h(x)?x==="L"?"R":"L":x==="T"?"B":"T"},"getOppositeArchitectureDirection"),m=(0,r.eW)(function(x){const L=x;return L==="L"||L==="R"||L==="T"||L==="B"},"isArchitectureDirection"),h=(0,r.eW)(function(x){const L=x;return L==="L"||L==="R"},"isArchitectureDirectionX"),C=(0,r.eW)(function(x){const L=x;return L==="T"||L==="B"},"isArchitectureDirectionY"),T=(0,r.eW)(function(x,L){const M=h(x)&&C(L),V=C(x)&&h(L);return M||V},"isArchitectureDirectionXY"),N=(0,r.eW)(function(x){const L=x[0],M=x[1],V=h(L)&&C(M),Z=C(L)&&h(M);return V||Z},"isArchitecturePairXY"),D=(0,r.eW)(function(x){return x!=="LL"&&x!=="RR"&&x!=="TT"&&x!=="BB"},"isValidArchitectureDirectionPair"),_=(0,r.eW)(function(x,L){const M=`${x}${L}`;return D(M)?M:void 0},"getArchitectureDirectionPair"),I=(0,r.eW)(function([x,L],M){const V=M[0],Z=M[1];return h(V)?C(Z)?[x+(V==="L"?-1:1),L+(Z==="T"?1:-1)]:[x+(V==="L"?-1:1),L]:h(Z)?[x+(Z==="L"?1:-1),L+(V==="T"?1:-1)]:[x,L+(V==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),ot=(0,r.eW)(function(x){return x==="LT"||x==="TL"?[1,1]:x==="BL"||x==="LB"?[1,-1]:x==="BR"||x==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),mt=(0,r.eW)(function(x,L){return T(x,L)?"bend":h(x)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),vt=(0,r.eW)(function(x){return x.type==="service"},"isArchitectureService"),Dt=(0,r.eW)(function(x){return x.type==="junction"},"isArchitectureJunction"),G=(0,r.eW)(x=>x.data(),"edgeData"),k=(0,r.eW)(x=>x.data(),"nodeData"),n=e.vZ.architecture,E=(Xt=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.setAccTitle=e.GN,this.getAccTitle=e.eu,this.setDiagramTitle=e.g2,this.getDiagramTitle=e.Kr,this.getAccDescription=e.Mx,this.setAccDescription=e.U$,this.clear()}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},(0,e.ZH)()}addService({id:L,icon:M,in:V,title:Z,iconText:Q}){if(this.registeredIds[L]!==void 0)throw new Error(`The service id [${L}] is already in use by another ${this.registeredIds[L]}`);if(V!==void 0){if(L===V)throw new Error(`The service [${L}] cannot be placed within itself`);if(this.registeredIds[V]===void 0)throw new Error(`The service [${L}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[V]==="node")throw new Error(`The service [${L}]'s parent is not a group`)}this.registeredIds[L]="node",this.nodes[L]={id:L,type:"service",icon:M,iconText:Q,title:Z,edges:[],in:V}}getServices(){return Object.values(this.nodes).filter(vt)}addJunction({id:L,in:M}){this.registeredIds[L]="node",this.nodes[L]={id:L,type:"junction",edges:[],in:M}}getJunctions(){return Object.values(this.nodes).filter(Dt)}getNodes(){return Object.values(this.nodes)}getNode(L){var M;return(M=this.nodes[L])!=null?M:null}addGroup({id:L,icon:M,in:V,title:Z}){var Q,ct,q;if(((Q=this.registeredIds)==null?void 0:Q[L])!==void 0)throw new Error(`The group id [${L}] is already in use by another ${this.registeredIds[L]}`);if(V!==void 0){if(L===V)throw new Error(`The group [${L}] cannot be placed within itself`);if(((ct=this.registeredIds)==null?void 0:ct[V])===void 0)throw new Error(`The group [${L}]'s parent does not exist. Please make sure the parent is created before this group`);if(((q=this.registeredIds)==null?void 0:q[V])==="node")throw new Error(`The group [${L}]'s parent is not a group`)}this.registeredIds[L]="group",this.groups[L]={id:L,icon:M,title:Z,in:V}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:L,rhsId:M,lhsDir:V,rhsDir:Z,lhsInto:Q,rhsInto:ct,lhsGroup:q,rhsGroup:at,title:et}){if(!m(V))throw new Error(`Invalid direction given for left hand side of edge ${L}--${M}. Expected (L,R,T,B) got ${String(V)}`);if(!m(Z))throw new Error(`Invalid direction given for right hand side of edge ${L}--${M}. Expected (L,R,T,B) got ${String(Z)}`);if(this.nodes[L]===void 0&&this.groups[L]===void 0)throw new Error(`The left-hand id [${L}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[M]===void 0&&this.groups[M]===void 0)throw new Error(`The right-hand id [${M}] does not yet exist. Please create the service/group before declaring an edge to it.`);const nt=this.nodes[L].in,dt=this.nodes[M].in;if(q&&nt&&dt&&nt==dt)throw new Error(`The left-hand id [${L}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(at&&nt&&dt&&nt==dt)throw new Error(`The right-hand id [${M}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const Tt={lhsId:L,lhsDir:V,lhsInto:Q,lhsGroup:q,rhsId:M,rhsDir:Z,rhsInto:ct,rhsGroup:at,title:et};this.edges.push(Tt),this.nodes[L]&&this.nodes[M]&&(this.nodes[L].edges.push(this.edges[this.edges.length-1]),this.nodes[M].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(this.dataStructures===void 0){const L={},M=Object.entries(this.nodes).reduce((at,[et,nt])=>(at[et]=nt.edges.reduce((dt,Tt)=>{var F,b,Y,P;const gt=(F=this.getNode(Tt.lhsId))==null?void 0:F.in,A=(b=this.getNode(Tt.rhsId))==null?void 0:b.in;if(gt&&A&&gt!==A){const W=mt(Tt.lhsDir,Tt.rhsDir);W!=="bend"&&((Y=L[gt])!=null||(L[gt]={}),L[gt][A]=W,(P=L[A])!=null||(L[A]={}),L[A][gt]=W)}if(Tt.lhsId===et){const W=_(Tt.lhsDir,Tt.rhsDir);W&&(dt[W]=Tt.rhsId)}else{const W=_(Tt.rhsDir,Tt.lhsDir);W&&(dt[W]=Tt.lhsId)}return dt},{}),at),{}),V=Object.keys(M)[0],Z={[V]:1},Q=Object.keys(M).reduce((at,et)=>et===V?at:ie(ee({},at),{[et]:1}),{}),ct=(0,r.eW)(at=>{const et={[at]:[0,0]},nt=[at];for(;nt.length>0;){const dt=nt.shift();if(dt){Z[dt]=1,delete Q[dt];const Tt=M[dt],[gt,A]=et[dt];Object.entries(Tt).forEach(([F,b])=>{Z[b]||(et[b]=I([gt,A],F),nt.push(b))})}}return et},"BFS"),q=[ct(V)];for(;Object.keys(Q).length>0;)q.push(ct(Object.keys(Q)[0]));this.dataStructures={adjList:M,spatialMaps:q,groupAlignments:L}}return this.dataStructures}setElementForId(L,M){this.elements[L]=M}getElementById(L){return this.elements[L]}getConfig(){return(0,o.Rb)(ee(ee({},n),(0,e.iE)().architecture))}getConfigField(L){return this.getConfig()[L]}},(0,r.eW)(Xt,"ArchitectureDB"),Xt),f=(0,r.eW)((x,L)=>{(0,s.A)(x,L),x.groups.map(M=>L.addGroup(M)),x.services.map(M=>L.addService(ie(ee({},M),{type:"service"}))),x.junctions.map(M=>L.addJunction(ie(ee({},M),{type:"junction"}))),x.edges.map(M=>L.addEdge(M))},"populateDb"),y={parser:{yy:void 0},parse:(0,r.eW)(x=>kt(this,null,function*(){var V;const L=yield(0,p.Qc)("architecture",x);r.cM.debug(L);const M=(V=y.parser)==null?void 0:V.yy;if(!(M instanceof E))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");f(L,M)}),"parse")},v=(0,r.eW)(x=>`
2
+ .edge {
3
+ stroke-width: ${x.archEdgeWidth};
4
+ stroke: ${x.archEdgeColor};
5
+ fill: none;
6
+ }
7
+
8
+ .arrow {
9
+ fill: ${x.archEdgeArrowColor};
10
+ }
11
+
12
+ .node-bkg {
13
+ fill: none;
14
+ stroke: ${x.archGroupBorderColor};
15
+ stroke-width: ${x.archGroupBorderWidth};
16
+ stroke-dasharray: 8;
17
+ }
18
+ .node-icon-text {
19
+ display: flex;
20
+ align-items: center;
21
+ }
22
+
23
+ .node-icon-text > div {
24
+ color: #fff;
25
+ margin: 1px;
26
+ height: fit-content;
27
+ text-align: center;
28
+ overflow: hidden;
29
+ display: -webkit-box;
30
+ -webkit-box-orient: vertical;
31
+ }
32
+ `,"getStyles"),R=v,w=(0,r.eW)(x=>`<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/>${x}</g>`,"wrapIcon"),X={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:w('<path id="b" data-name="4" d="m20,57.86c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="c" data-name="3" d="m20,45.95c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="d" data-name="2" d="m20,34.05c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse id="e" data-name="1" cx="40" cy="22.14" rx="20" ry="7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="20" y1="57.86" x2="20" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="60" y1="57.86" x2="60" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},server:{body:w('<rect x="17.5" y="17.5" width="45" height="45" rx="2" ry="2" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="32.5" x2="62.5" y2="32.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="47.5" x2="62.5" y2="47.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><g><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g>')},disk:{body:w('<rect x="20" y="15" width="40" height="50" rx="1" ry="1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="14" ry="14.58" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="4" ry="4.17" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m37.51,42.52l-4.83,13.22c-.26.71-1.1,1.02-1.76.64l-4.18-2.42c-.66-.38-.81-1.26-.33-1.84l9.01-10.8c.88-1.05,2.56-.08,2.09,1.2Z" style="fill: #fff; stroke-width: 0px;"/>')},internet:{body:w('<circle cx="40" cy="40" r="22.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="40" y1="17.5" x2="40" y2="62.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="40" x2="62.5" y2="40" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m39.99,17.51c-15.28,11.1-15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m40.01,17.51c15.28,11.1,15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="30.1" x2="60.25" y2="30.1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="49.9" x2="60.25" y2="49.9" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},cloud:{body:w('<path d="m65,47.5c0,2.76-2.24,5-5,5H20c-2.76,0-5-2.24-5-5,0-1.87,1.03-3.51,2.56-4.36-.04-.21-.06-.42-.06-.64,0-2.6,2.48-4.74,5.65-4.97,1.65-4.51,6.34-7.76,11.85-7.76.86,0,1.69.08,2.5.23,2.09-1.57,4.69-2.5,7.5-2.5,6.1,0,11.19,4.38,12.28,10.17,2.14.56,3.72,2.51,3.72,4.83,0,.03,0,.07-.01.1,2.29.46,4.01,2.48,4.01,4.9Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},unknown:d.cN,blank:{body:w("")}}},H=(0,r.eW)(function(x,L,M){return kt(this,null,function*(){const V=M.getConfigField("padding"),Z=M.getConfigField("iconSize"),Q=Z/2,ct=Z/6,q=ct/2;yield Promise.all(L.edges().map(at=>kt(this,null,function*(){var Ot,At;const{source:et,sourceDir:nt,sourceArrow:dt,sourceGroup:Tt,target:gt,targetDir:A,targetArrow:F,targetGroup:b,label:Y}=G(at);let{x:P,y:W}=at[0].sourceEndpoint();const{x:yt,y:st}=at[0].midpoint();let{x:z,y:J}=at[0].targetEndpoint();const pt=V+4;if(Tt&&(h(nt)?P+=nt==="L"?-pt:pt:W+=nt==="T"?-pt:pt+18),b&&(h(A)?z+=A==="L"?-pt:pt:J+=A==="T"?-pt:pt+18),!Tt&&((Ot=M.getNode(et))==null?void 0:Ot.type)==="junction"&&(h(nt)?P+=nt==="L"?Q:-Q:W+=nt==="T"?Q:-Q),!b&&((At=M.getNode(gt))==null?void 0:At.type)==="junction"&&(h(A)?z+=A==="L"?Q:-Q:J+=A==="T"?Q:-Q),at[0]._private.rscratch){const St=x.insert("g");if(St.insert("path").attr("d",`M ${P},${W} L ${yt},${st} L${z},${J} `).attr("class","edge").attr("id",(0,o.Ln)(et,gt,{prefix:"L"})),dt){const Nt=h(nt)?u[nt](P,ct):P-q,Et=C(nt)?u[nt](W,ct):W-q;St.insert("polygon").attr("points",l[nt](ct)).attr("transform",`translate(${Nt},${Et})`).attr("class","arrow")}if(F){const Nt=h(A)?u[A](z,ct):z-q,Et=C(A)?u[A](J,ct):J-q;St.insert("polygon").attr("points",l[A](ct)).attr("transform",`translate(${Nt},${Et})`).attr("class","arrow")}if(Y){const Nt=T(nt,A)?"XY":h(nt)?"X":"Y";let Et=0;Nt==="X"?Et=Math.abs(P-z):Nt==="Y"?Et=Math.abs(W-J)/1.5:Et=Math.abs(P-z)/2;const wt=St.append("g");if(yield(0,d.rw)(wt,Y,{useHtmlLabels:!1,width:Et,classes:"architecture-service-label"},(0,e.nV)()),wt.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),Nt==="X")wt.attr("transform","translate("+yt+", "+st+")");else if(Nt==="Y")wt.attr("transform","translate("+yt+", "+st+") rotate(-90)");else if(Nt==="XY"){const Lt=_(nt,A);if(Lt&&N(Lt)){const Ct=wt.node().getBoundingClientRect(),[Ut,xt]=ot(Lt);wt.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*Ut*xt*45})`);const Ft=wt.node().getBoundingClientRect();wt.attr("transform",`
33
+ translate(${yt}, ${st-Ct.height/2})
34
+ translate(${Ut*Ft.width/2}, ${xt*Ft.height/2})
35
+ rotate(${-1*Ut*xt*45}, 0, ${Ct.height/2})
36
+ `)}}}}})))})},"drawEdges"),U=(0,r.eW)(function(x,L,M){return kt(this,null,function*(){const Z=M.getConfigField("padding")*.75,Q=M.getConfigField("fontSize"),q=M.getConfigField("iconSize")/2;yield Promise.all(L.nodes().map(at=>kt(this,null,function*(){const et=k(at);if(et.type==="group"){const{h:nt,w:dt,x1:Tt,y1:gt}=at.boundingBox(),A=x.append("rect");A.attr("id",`group-${et.id}`).attr("x",Tt+q).attr("y",gt+q).attr("width",dt).attr("height",nt).attr("class","node-bkg");const F=x.append("g");let b=Tt,Y=gt;if(et.icon){const P=F.append("g");P.html(`<g>${yield(0,d.s4)(et.icon,{height:Z,width:Z,fallbackPrefix:X.prefix})}</g>`),P.attr("transform","translate("+(b+q+1)+", "+(Y+q+1)+")"),b+=Z,Y+=Q/2-1-2}if(et.label){const P=F.append("g");yield(0,d.rw)(P,et.label,{useHtmlLabels:!1,width:dt,classes:"architecture-service-label"},(0,e.nV)()),P.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),P.attr("transform","translate("+(b+q+4)+", "+(Y+q+2)+")")}M.setElementForId(et.id,A)}})))})},"drawGroups"),tt=(0,r.eW)(function(x,L,M){return kt(this,null,function*(){var Z;const V=(0,e.nV)();for(const Q of M){const ct=L.append("g"),q=x.getConfigField("iconSize");if(Q.title){const dt=ct.append("g");yield(0,d.rw)(dt,Q.title,{useHtmlLabels:!1,width:q*1.5,classes:"architecture-service-label"},V),dt.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),dt.attr("transform","translate("+q/2+", "+q+")")}const at=ct.append("g");if(Q.icon)at.html(`<g>${yield(0,d.s4)(Q.icon,{height:q,width:q,fallbackPrefix:X.prefix})}</g>`);else if(Q.iconText){at.html(`<g>${yield(0,d.s4)("blank",{height:q,width:q,fallbackPrefix:X.prefix})}</g>`);const gt=at.append("g").append("foreignObject").attr("width",q).attr("height",q).append("div").attr("class","node-icon-text").attr("style",`height: ${q}px;`).append("div").html((0,e.oO)(Q.iconText,V)),A=(Z=parseInt(window.getComputedStyle(gt.node(),null).getPropertyValue("font-size").replace(/\D/g,"")))!=null?Z:16;gt.attr("style",`-webkit-line-clamp: ${Math.floor((q-2)/A)};`)}else at.append("path").attr("class","node-bkg").attr("id","node-"+Q.id).attr("d",`M0 ${q} v${-q} q0,-5 5,-5 h${q} q5,0 5,5 v${q} H0 Z`);ct.attr("id",`service-${Q.id}`).attr("class","architecture-service");const{width:et,height:nt}=ct.node().getBBox();Q.width=et,Q.height=nt,x.setElementForId(Q.id,ct)}return 0})},"drawServices"),ft=(0,r.eW)(function(x,L,M){M.forEach(V=>{const Z=L.append("g"),Q=x.getConfigField("iconSize");Z.append("g").append("rect").attr("id","node-"+V.id).attr("fill-opacity","0").attr("width",Q).attr("height",Q),Z.attr("class","architecture-junction");const{width:q,height:at}=Z._groups[0][0].getBBox();Z.width=q,Z.height=at,x.setElementForId(V.id,Z)})},"drawJunctions");(0,d.ef)([{name:X.prefix,icons:X}]),i.Z.use(g);function B(x,L,M){x.forEach(V=>{L.add({group:"nodes",data:{type:"service",id:V.id,icon:V.icon,label:V.title,parent:V.in,width:M.getConfigField("iconSize"),height:M.getConfigField("iconSize")},classes:"node-service"})})}(0,r.eW)(B,"addServices");function lt(x,L,M){x.forEach(V=>{L.add({group:"nodes",data:{type:"junction",id:V.id,parent:V.in,width:M.getConfigField("iconSize"),height:M.getConfigField("iconSize")},classes:"node-junction"})})}(0,r.eW)(lt,"addJunctions");function j(x,L){L.nodes().map(M=>{const V=k(M);if(V.type==="group")return;V.x=M.position().x,V.y=M.position().y,x.getElementById(V.id).attr("transform","translate("+(V.x||0)+","+(V.y||0)+")")})}(0,r.eW)(j,"positionNodes");function O(x,L){x.forEach(M=>{L.add({group:"nodes",data:{type:"group",id:M.id,icon:M.icon,label:M.title,parent:M.in},classes:"node-group"})})}(0,r.eW)(O,"addGroups");function $(x,L){x.forEach(M=>{const{lhsId:V,rhsId:Z,lhsInto:Q,lhsGroup:ct,rhsInto:q,lhsDir:at,rhsDir:et,rhsGroup:nt,title:dt}=M,Tt=T(M.lhsDir,M.rhsDir)?"segments":"straight",gt={id:`${V}-${Z}`,label:dt,source:V,sourceDir:at,sourceArrow:Q,sourceGroup:ct,sourceEndpoint:at==="L"?"0 50%":at==="R"?"100% 50%":at==="T"?"50% 0":"50% 100%",target:Z,targetDir:et,targetArrow:q,targetGroup:nt,targetEndpoint:et==="L"?"0 50%":et==="R"?"100% 50%":et==="T"?"50% 0":"50% 100%"};L.add({group:"edges",data:gt,classes:Tt})})}(0,r.eW)($,"addEdges");function K(x,L,M){const V=(0,r.eW)((q,at)=>Object.entries(q).reduce((et,[nt,dt])=>{var A,F,b;let Tt=0;const gt=Object.entries(dt);if(gt.length===1)return et[nt]=gt[0][1],et;for(let Y=0;Y<gt.length-1;Y++)for(let P=Y+1;P<gt.length;P++){const[W,yt]=gt[Y],[st,z]=gt[P];if(((A=M[W])==null?void 0:A[st])===at)(F=et[nt])!=null||(et[nt]=[]),et[nt]=[...et[nt],...yt,...z];else if(W==="default"||st==="default")(b=et[nt])!=null||(et[nt]=[]),et[nt]=[...et[nt],...yt,...z];else{const pt=`${nt}-${Tt++}`;et[pt]=yt;const Ot=`${nt}-${Tt++}`;et[Ot]=z}}return et},{}),"flattenAlignments"),Z=L.map(q=>{const at={},et={};return Object.entries(q).forEach(([nt,[dt,Tt]])=>{var A,F,b,Y,P,W,yt,st;const gt=(F=(A=x.getNode(nt))==null?void 0:A.in)!=null?F:"default";(b=at[Tt])!=null||(at[Tt]={}),(P=(Y=at[Tt])[gt])!=null||(Y[gt]=[]),at[Tt][gt].push(nt),(W=et[dt])!=null||(et[dt]={}),(st=(yt=et[dt])[gt])!=null||(yt[gt]=[]),et[dt][gt].push(nt)}),{horiz:Object.values(V(at,"horizontal")).filter(nt=>nt.length>1),vert:Object.values(V(et,"vertical")).filter(nt=>nt.length>1)}}),[Q,ct]=Z.reduce(([q,at],{horiz:et,vert:nt})=>[[...q,...et],[...at,...nt]],[[],[]]);return{horizontal:Q,vertical:ct}}(0,r.eW)(K,"getAlignments");function ht(x,L){const M=[],V=(0,r.eW)(Q=>`${Q[0]},${Q[1]}`,"posToStr"),Z=(0,r.eW)(Q=>Q.split(",").map(ct=>parseInt(ct)),"strToPos");return x.forEach(Q=>{const ct=Object.fromEntries(Object.entries(Q).map(([nt,dt])=>[V(dt),nt])),q=[V([0,0])],at={},et={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;q.length>0;){const nt=q.shift();if(nt){at[nt]=1;const dt=ct[nt];if(dt){const Tt=Z(nt);Object.entries(et).forEach(([gt,A])=>{const F=V([Tt[0]+A[0],Tt[1]+A[1]]),b=ct[F];b&&!at[F]&&(q.push(F),M.push({[a[gt]]:b,[a[c(gt)]]:dt,gap:1.5*L.getConfigField("iconSize")}))})}}}}),M}(0,r.eW)(ht,"getRelativeConstraints");function Mt(x,L,M,V,Z,{spatialMaps:Q,groupAlignments:ct}){return new Promise(q=>{const at=(0,t.Ys)("body").append("div").attr("id","cy").attr("style","display:none"),et=(0,i.Z)({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight",label:"data(label)","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":`${Z.getConfigField("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${Z.getConfigField("padding")}px`}}],layout:{name:"grid",boundingBox:{x1:0,x2:100,y1:0,y2:100}}});at.remove(),O(M,et),B(x,et,Z),lt(L,et,Z),$(V,et);const nt=K(Z,Q,ct),dt=ht(Q,Z),Tt=et.layout({name:"fcose",quality:"proof",styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(gt){const[A,F]=gt.connectedNodes(),{parent:b}=k(A),{parent:Y}=k(F);return b===Y?1.5*Z.getConfigField("iconSize"):.5*Z.getConfigField("iconSize")},edgeElasticity(gt){const[A,F]=gt.connectedNodes(),{parent:b}=k(A),{parent:Y}=k(F);return b===Y?.45:.001},alignmentConstraint:nt,relativePlacementConstraint:dt});Tt.one("layoutstop",()=>{var A;function gt(F,b,Y,P){let W,yt;const{x:st,y:z}=F,{x:J,y:pt}=b;yt=(P-z+(st-Y)*(z-pt)/(st-J))/Math.sqrt(1+Math.pow((z-pt)/(st-J),2)),W=Math.sqrt(Math.pow(P-z,2)+Math.pow(Y-st,2)-Math.pow(yt,2));const Ot=Math.sqrt(Math.pow(J-st,2)+Math.pow(pt-z,2));W=W/Ot;let At=(J-st)*(P-z)-(pt-z)*(Y-st);switch(!0){case At>=0:At=1;break;case At<0:At=-1;break}let St=(J-st)*(Y-st)+(pt-z)*(P-z);switch(!0){case St>=0:St=1;break;case St<0:St=-1;break}return yt=Math.abs(yt)*At,W=W*St,{distances:yt,weights:W}}(0,r.eW)(gt,"getSegmentWeights"),et.startBatch();for(const F of Object.values(et.edges()))if((A=F.data)!=null&&A.call(F)){const{x:b,y:Y}=F.source().position(),{x:P,y:W}=F.target().position();if(b!==P&&Y!==W){const yt=F.sourceEndpoint(),st=F.targetEndpoint(),{sourceDir:z}=G(F),[J,pt]=C(z)?[yt.x,st.y]:[st.x,yt.y],{weights:Ot,distances:At}=gt(yt,st,J,pt);F.style("segment-distances",At),F.style("segment-weights",Ot)}}et.endBatch(),Tt.run()}),Tt.run(),et.ready(gt=>{r.cM.info("Ready",gt),q(et)})})}(0,r.eW)(Mt,"layoutArchitecture");var rt=(0,r.eW)((x,L,M,V)=>kt(this,null,function*(){const Z=V.db,Q=Z.getServices(),ct=Z.getJunctions(),q=Z.getGroups(),at=Z.getEdges(),et=Z.getDataStructures(),nt=(0,S.P)(L),dt=nt.append("g");dt.attr("class","architecture-edges");const Tt=nt.append("g");Tt.attr("class","architecture-services");const gt=nt.append("g");gt.attr("class","architecture-groups"),yield tt(Z,Tt,Q),ft(Z,Tt,ct);const A=yield Mt(Q,ct,q,at,Z,et);yield H(dt,A,Z),yield U(gt,A,Z),j(Z,A),(0,e.j7)(void 0,nt,Z.getConfigField("padding"),Z.getConfigField("useMaxWidth"))}),"draw"),bt={draw:rt},Rt={parser:y,get db(){return new E},renderer:bt,styles:R}},25925:function(Yt,it,ut){"use strict";ut.d(it,{A:function(){return d}});var S=ut(35096);function d(s,o){var e,r,p;s.accDescr&&((e=o.setAccDescription)==null||e.call(o,s.accDescr)),s.accTitle&&((r=o.setAccTitle)==null||r.call(o,s.accTitle)),s.title&&((p=o.setDiagramTitle)==null||p.call(o,s.title))}(0,S.eW)(d,"populateCommonDb")}}]);
37
+ }());
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_alife_paul_ai_assistant=self.webpackChunk_alife_paul_ai_assistant||[]).push([[4911],{14911:function(tt,A,f){f.d(A,{diagram:function(){return q}});var v=f(80834),et=f(26620),nt=f(43663),at=f(23386),it=f(28659),rt=f(84593),st=f(31792),dt=f(5016),ot=f(2831),ct=f(21347),k=f(4284),t=f(99970),o=f(35096),S=f(989),N=f(88749),R=f(45625),C=(0,o.eW)(e=>e.append("circle").attr("class","start-state").attr("r",(0,t.nV)().state.sizeUnit).attr("cx",(0,t.nV)().state.padding+(0,t.nV)().state.sizeUnit).attr("cy",(0,t.nV)().state.padding+(0,t.nV)().state.sizeUnit),"drawStartState"),I=(0,o.eW)(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",(0,t.nV)().state.textHeight).attr("class","divider").attr("x2",(0,t.nV)().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),U=(0,o.eW)((e,a)=>{const d=e.append("text").attr("x",2*(0,t.nV)().state.padding).attr("y",(0,t.nV)().state.textHeight+2*(0,t.nV)().state.padding).attr("font-size",(0,t.nV)().state.fontSize).attr("class","state-title").text(a.id),h=d.node().getBBox();return e.insert("rect",":first-child").attr("x",(0,t.nV)().state.padding).attr("y",(0,t.nV)().state.padding).attr("width",h.width+2*(0,t.nV)().state.padding).attr("height",h.height+2*(0,t.nV)().state.padding).attr("rx",(0,t.nV)().state.radius),d},"drawSimpleState"),H=(0,o.eW)((e,a)=>{const d=(0,o.eW)(function(g,B,y){const m=g.append("tspan").attr("x",2*(0,t.nV)().state.padding).text(B);y||m.attr("dy",(0,t.nV)().state.textHeight)},"addTspan"),r=e.append("text").attr("x",2*(0,t.nV)().state.padding).attr("y",(0,t.nV)().state.textHeight+1.3*(0,t.nV)().state.padding).attr("font-size",(0,t.nV)().state.fontSize).attr("class","state-title").text(a.descriptions[0]).node().getBBox(),p=r.height,u=e.append("text").attr("x",(0,t.nV)().state.padding).attr("y",p+(0,t.nV)().state.padding*.4+(0,t.nV)().state.dividerMargin+(0,t.nV)().state.textHeight).attr("class","state-description");let n=!0,s=!0;a.descriptions.forEach(function(g){n||(d(u,g,s),s=!1),n=!1});const V=e.append("line").attr("x1",(0,t.nV)().state.padding).attr("y1",(0,t.nV)().state.padding+p+(0,t.nV)().state.dividerMargin/2).attr("y2",(0,t.nV)().state.padding+p+(0,t.nV)().state.dividerMargin/2).attr("class","descr-divider"),x=u.node().getBBox(),c=Math.max(x.width,r.width);return V.attr("x2",c+3*(0,t.nV)().state.padding),e.insert("rect",":first-child").attr("x",(0,t.nV)().state.padding).attr("y",(0,t.nV)().state.padding).attr("width",c+2*(0,t.nV)().state.padding).attr("height",x.height+p+2*(0,t.nV)().state.padding).attr("rx",(0,t.nV)().state.radius),e},"drawDescrState"),K=(0,o.eW)((e,a,d)=>{const h=(0,t.nV)().state.padding,r=2*(0,t.nV)().state.padding,p=e.node().getBBox(),u=p.width,n=p.x,s=e.append("text").attr("x",0).attr("y",(0,t.nV)().state.titleShift).attr("font-size",(0,t.nV)().state.fontSize).attr("class","state-title").text(a.id),x=s.node().getBBox().width+r;let c=Math.max(x,u);c===u&&(c=c+r);let g;const B=e.node().getBBox();a.doc,g=n-h,x>u&&(g=(u-c)/2+h),Math.abs(n-B.x)<h&&x>u&&(g=n-(x-u)/2);const y=1-(0,t.nV)().state.textHeight;return e.insert("rect",":first-child").attr("x",g).attr("y",y).attr("class",d?"alt-composit":"composit").attr("width",c).attr("height",B.height+(0,t.nV)().state.textHeight+(0,t.nV)().state.titleShift+1).attr("rx","0"),s.attr("x",g+h),x<=u&&s.attr("x",n+(c-r)/2-x/2+h),e.insert("rect",":first-child").attr("x",g).attr("y",(0,t.nV)().state.titleShift-(0,t.nV)().state.textHeight-(0,t.nV)().state.padding).attr("width",c).attr("height",(0,t.nV)().state.textHeight*3).attr("rx",(0,t.nV)().state.radius),e.insert("rect",":first-child").attr("x",g).attr("y",(0,t.nV)().state.titleShift-(0,t.nV)().state.textHeight-(0,t.nV)().state.padding).attr("width",c).attr("height",B.height+3+2*(0,t.nV)().state.textHeight).attr("rx",(0,t.nV)().state.radius),e},"addTitleAndBox"),z=(0,o.eW)(e=>(e.append("circle").attr("class","end-state-outer").attr("r",(0,t.nV)().state.sizeUnit+(0,t.nV)().state.miniPadding).attr("cx",(0,t.nV)().state.padding+(0,t.nV)().state.sizeUnit+(0,t.nV)().state.miniPadding).attr("cy",(0,t.nV)().state.padding+(0,t.nV)().state.sizeUnit+(0,t.nV)().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",(0,t.nV)().state.sizeUnit).attr("cx",(0,t.nV)().state.padding+(0,t.nV)().state.sizeUnit+2).attr("cy",(0,t.nV)().state.padding+(0,t.nV)().state.sizeUnit+2)),"drawEndState"),Y=(0,o.eW)((e,a)=>{let d=(0,t.nV)().state.forkWidth,h=(0,t.nV)().state.forkHeight;if(a.parentId){let r=d;d=h,h=r}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",h).attr("x",(0,t.nV)().state.padding).attr("y",(0,t.nV)().state.padding)},"drawForkJoinState"),j=(0,o.eW)((e,a,d,h)=>{let r=0;const p=h.append("text");p.style("text-anchor","start"),p.attr("class","noteText");let u=e.replace(/\r\n/g,"<br/>");u=u.replace(/\n/g,"<br/>");const n=u.split(t.SY.lineBreakRegex);let s=1.25*(0,t.nV)().state.noteMargin;for(const V of n){const x=V.trim();if(x.length>0){const c=p.append("tspan");if(c.text(x),s===0){const g=c.node().getBBox();s+=g.height}r+=s,c.attr("x",a+(0,t.nV)().state.noteMargin),c.attr("y",d+r+1.25*(0,t.nV)().state.noteMargin)}}return{textWidth:p.node().getBBox().width,textHeight:r}},"_drawLongText"),G=(0,o.eW)((e,a)=>{a.attr("class","state-note");const d=a.append("rect").attr("x",0).attr("y",(0,t.nV)().state.padding),h=a.append("g"),{textWidth:r,textHeight:p}=j(e,0,0,h);return d.attr("height",p+2*(0,t.nV)().state.noteMargin),d.attr("width",r+(0,t.nV)().state.noteMargin*2),d},"drawNote"),b=(0,o.eW)(function(e,a){const d=a.id,h={id:d,label:a.id,width:0,height:0},r=e.append("g").attr("id",d).attr("class","stateGroup");a.type==="start"&&C(r),a.type==="end"&&z(r),(a.type==="fork"||a.type==="join")&&Y(r,a),a.type==="note"&&G(a.note.text,r),a.type==="divider"&&I(r),a.type==="default"&&a.descriptions.length===0&&U(r,a),a.type==="default"&&a.descriptions.length>0&&H(r,a);const p=r.node().getBBox();return h.width=p.width+2*(0,t.nV)().state.padding,h.height=p.height+2*(0,t.nV)().state.padding,h},"drawState"),D=0,J=(0,o.eW)(function(e,a,d){const h=(0,o.eW)(function(s){switch(s){case v.oI.relationType.AGGREGATION:return"aggregation";case v.oI.relationType.EXTENSION:return"extension";case v.oI.relationType.COMPOSITION:return"composition";case v.oI.relationType.DEPENDENCY:return"dependency"}},"getRelationType");a.points=a.points.filter(s=>!Number.isNaN(s.y));const r=a.points,p=(0,S.jvg)().x(function(s){return s.x}).y(function(s){return s.y}).curve(S.$0Z),u=e.append("path").attr("d",p(r)).attr("id","edge"+D).attr("class","transition");let n="";if((0,t.nV)().state.arrowMarkerAbsolute&&(n=(0,t.Gr)(!0)),u.attr("marker-end","url("+n+"#"+h(v.oI.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:V,y:x}=k.w8.calcLabelPosition(a.points),c=t.SY.getRows(d.title);let g=0;const B=[];let y=0,m=0;for(let i=0;i<=c.length;i++){const _=s.append("text").attr("text-anchor","middle").text(c[i]).attr("x",V).attr("y",x+g),l=_.node().getBBox();y=Math.max(y,l.width),m=Math.min(m,l.x),o.cM.info(l.x,V,x+g),g===0&&(g=_.node().getBBox().height,o.cM.info("Title height",g,x)),B.push(_)}let W=g*c.length;if(c.length>1){const i=(c.length-1)*g*.5;B.forEach((_,l)=>_.attr("y",x+l*g-i)),W=g*c.length}const P=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",V-y/2-(0,t.nV)().state.padding/2).attr("y",x-W/2-(0,t.nV)().state.padding/2-3.5).attr("width",y+(0,t.nV)().state.padding).attr("height",W+(0,t.nV)().state.padding),o.cM.info(P)}D++},"drawEdge"),E,T={},F=(0,o.eW)(function(){},"setConf"),X=(0,o.eW)(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),Z=(0,o.eW)(function(e,a,d,h){E=(0,t.nV)().state;const r=(0,t.nV)().securityLevel;let p;r==="sandbox"&&(p=(0,S.Ys)("#i"+a));const u=r==="sandbox"?(0,S.Ys)(p.nodes()[0].contentDocument.body):(0,S.Ys)("body"),n=r==="sandbox"?p.nodes()[0].contentDocument:document;o.cM.debug("Rendering diagram "+e);const s=u.select(`[id='${a}']`);X(s);const V=h.db.getRootDoc();L(V,s,void 0,!1,u,n,h);const x=E.padding,c=s.node().getBBox(),g=c.width+x*2,B=c.height+x*2,y=g*1.75;(0,t.v2)(s,B,y,E.useMaxWidth),s.attr("viewBox",`${c.x-E.padding} ${c.y-E.padding} `+g+" "+B)},"draw"),$=(0,o.eW)(e=>e?e.length*E.fontSizeFactor:1,"getLabelWidth"),L=(0,o.eW)((e,a,d,h,r,p,u)=>{const n=new R.k({compound:!0,multigraph:!0});let s,V=!0;for(s=0;s<e.length;s++)if(e[s].stmt==="relation"){V=!1;break}d?n.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:V?1:E.edgeLengthFactor,nodeSep:V?1:50,isMultiGraph:!0}):n.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:V?1:E.edgeLengthFactor,nodeSep:V?1:50,ranker:"tight-tree",isMultiGraph:!0}),n.setDefaultEdgeLabel(function(){return{}});const x=u.db.getStates(),c=u.db.getRelations(),g=Object.keys(x);let B=!0;for(const i of g){const _=x[i];d&&(_.parentId=d);let l;if(_.doc){let M=a.append("g").attr("id",_.id).attr("class","stateGroup");if(l=L(_.doc,M,_.id,!h,r,p,u),B){M=K(M,_,h);let w=M.node().getBBox();l.width=w.width,l.height=w.height+E.padding/2,T[_.id]={y:E.compositTitleSize}}else{let w=M.node().getBBox();l.width=w.width,l.height=w.height}}else l=b(a,_,n);if(_.note){const M={descriptions:[],id:_.id+"-note",note:_.note,type:"note"},w=b(a,M,n);_.note.position==="left of"?(n.setNode(l.id+"-note",w),n.setNode(l.id,l)):(n.setNode(l.id,l),n.setNode(l.id+"-note",w)),n.setParent(l.id,l.id+"-group"),n.setParent(l.id+"-note",l.id+"-group")}else n.setNode(l.id,l)}o.cM.debug("Count=",n.nodeCount(),n);let y=0;c.forEach(function(i){y++,o.cM.debug("Setting edge",i),n.setEdge(i.id1,i.id2,{relation:i,width:$(i.title),height:E.labelHeight*t.SY.getRows(i.title).length,labelpos:"c"},"id"+y)}),(0,N.bK)(n),o.cM.debug("Graph after layout",n.nodes());const m=a.node();n.nodes().forEach(function(i){i!==void 0&&n.node(i)!==void 0?(o.cM.warn("Node "+i+": "+JSON.stringify(n.node(i))),r.select("#"+m.id+" #"+i).attr("transform","translate("+(n.node(i).x-n.node(i).width/2)+","+(n.node(i).y+(T[i]?T[i].y:0)-n.node(i).height/2)+" )"),r.select("#"+m.id+" #"+i).attr("data-x-shift",n.node(i).x-n.node(i).width/2),p.querySelectorAll("#"+m.id+" #"+i+" .divider").forEach(l=>{const M=l.parentElement;let w=0,O=0;M&&(M.parentElement&&(w=M.parentElement.getBBox().width),O=parseInt(M.getAttribute("data-x-shift"),10),Number.isNaN(O)&&(O=0)),l.setAttribute("x1",0-O+8),l.setAttribute("x2",w-O-8)})):o.cM.debug("No Node "+i+": "+JSON.stringify(n.node(i)))});let W=m.getBBox();n.edges().forEach(function(i){i!==void 0&&n.edge(i)!==void 0&&(o.cM.debug("Edge "+i.v+" -> "+i.w+": "+JSON.stringify(n.edge(i))),J(a,n.edge(i),n.edge(i).relation))}),W=m.getBBox();const P={id:d||"root",label:d||"root",width:0,height:0};return P.width=W.width+2*E.padding,P.height=W.height+2*E.padding,o.cM.debug("Doc rendered",P,n),P},"renderDoc"),Q={setConf:F,draw:Z},q={parser:v.J8,get db(){return new v.oI(1)},renderer:Q,styles:v.Ee,init:(0,o.eW)(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}}}]);